Bonjour, J'ai un petit souci de script avec cette page... les donnees ne vont pas dans la base... existerai t il une erreur dans ce code.... c'est un code telechargé...donc je ne suis pas un as en la matiere.... merci bien pour toute info qui pourrai m'eclairer...

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<?
 
include_once "accesscontrol.php";
include_once "../configuration.inc.php";
$q1 = "select * from job_employer_info where ename = \"$ename\" ";
$r1 = mysql_query($q1) or die(mysql_error(Error5));
$a1 = mysql_fetch_array($r1);
if(!empty($a1[plan]))
{
$a11 = $a1[JP_number];
 
  if(isset($submit) && $submit == 'Post this job')
  {
	$q2 = "select * from job_employer_info where ename = \"$ename\" ";
	$r2 = mysql_query($q2) or die(mysql_error(Error1));
	$a2 = mysql_fetch_array($r2);
 
	if (is_array($JobCategory))
	{
		$JobStr = implode("," , $JobCategory);
	}
 
	$qc = "select job_id from job_post order by job_id desc";
	$rc = mysql_query($qc) or die(mysql_error(Error2));
	$ac = mysql_fetch_array($rc);
	$job_id = $ac[0] + 1;
 
	$position = strip_tags($position);
	$description = strip_tags($description);
 
 
	$EXday = date('d', mktime(0,0,0,0, date(d) + $_POST[exdays1], 0));
	$EXmonth = date('m', mktime(0,0,0, date(m), date(d) + $_POST[exdays1], 0));
	$EXyear = date('Y', mktime(0,0,0,date(m) ,date(d) + $_POST[exdays1], date(Y)));
 
	$q3 = "insert into job_post set
	job_id = \"$job_id\",
	 ename = \"$ename\", 
	CompanyCountry = \"$a2[CompanyCountry]\",
	JobIn = \"$JobIn\", 
	CompanyState = \"$a2[CompanyState]\",
	Company = \"$a2[CompanyName]\", 
	position = \"$position\", 
	JobCategory = \"$JobStr\", 
	description = \"$description\",  
	j_target = \"$j_target\", 
	salary = \"$salary\", 
	postdate = \"$postdate\", 
	s_period = \"$s_period\",
	EXmonth = \"$EXmonth\",
	EXday = \"$EXday\",
	EXyear = \"$EXyear\"  ";
	$r3 = mysql_query($q3) or die(mysql_error(Error3));
 
	$a11 = $a11 - 1;
	$q4 = "update job_employer_info set JP_number = \"$a11\" where ename = \"$ename\" ";
	$r4 = mysql_query($q4) or die(mysql_error(Error4));
 
$to = $a2[CompanyEmail];
$subject = "Votre mission sur $mydomain";
$message = "Vous trouverez dans ce courrier une copie de votre mission.\n\n Details:\n Job ID# $job_id \n Mission: $position \n Categorie: $JobStr \n Description: $description \n Expire le: $EXmonth/$EXday/$EXyear\n\n\n Pour modifier ou effacer cette mission Cliquez ici: http://$myurl/employers/employers7.php ";
$from = "De: $contactemail";
 
mail($to, $subject, $message, $from);
 
echo "
<table width='100%' border='0' cellspacing='1' cellpadding='5'>
  <tr> 
    <td height='16' bgcolor='#FFCC00'><center>
        <b><font color='#000000'>$POSTJJ</font></b> 
      </center></td>
  </tr>
</table><br><br><br>
";
 
  }
 
	if ($a11 < 1)
	{
		echo "<center><br><br><br>$POSTJ2</center><br><br>";
		include_once "employers1.php";
	}
 
	else
	{
 
 
 
echo "";
?>
 
<SCRIPT LANGUAGE="JavaScript">
 
function checkFields() {
missinginfo = "";
 
if (document.form.position.value == "") {
missinginfo += "\n     -  Position";
}
if (document.form.description.value == "") {
missinginfo += "\n     -  Description";
}
if (document.form.salary.value == "") {
missinginfo += "\n     -  Salary";
}
 
if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}
</script>
 
<br>	
<table width=100%>
  <tr>
		<td colspan=2>
		<b><?=$USINGPLAN?> <font color=blue><?=$a1[plan]?></font> . <br><?=$POSTJ3?></b>
		<ul>
		<li>poster <?=$a11?> mission; </li>
		<li>voir <?=$a1[JS_number]?> profils; </li>
		</ul>		</td>
	<tr>
	<tr><td colspan=2> <br>
<br>
<br>
<b><font color=green><?=$TOPOST?> :</font></b><br>
<br>
</td></tr>
<td width="24%"><form action=<?=$PHP_SELF?> method=post name=form onSubmit="return checkFields();">
	<tr><td><?=$POSITION?></td>
 
	<td width="76%">
	<input type=text name=position>	</td>
	</tr>
 
	<tr>
	<td valign=top>
	<?=$JOBCATEGORY?> <br>	</td>
 
	<td valign=top>
	<SELECT NAME="JobCategory[]" multiple size=5>
        <?php
        $title_query=mysql_query("select * from job_jobcategories");
          while ($title_result=mysql_fetch_array($title_query))
        {
        echo '<option value="'.$title_result['jobcategory'].'"';
        if (strstr($job_result['jobcategory'],$title_result['jobcategory'])) {echo "selected";}
        echo '>'.$title_result['jobcategory'].'</option>';
        }
        ?>
	</SELECT><br>	</td>
	<tr><td valign=top><?=$DESCR?>:</td>
	<td><textarea rows=6 cols=35 name=description></textarea></td>
	</tr>
 
	<tr>
	<td><?=$TARGET?>: </td>
 
	<td>
	<select name="j_target">
	<option value=""> </option>
	   <option>Selectionner</option>
            <option value="Bac +2">Bac +2</option>
            <option value="Bac +3">Bac +3</option>
            <option value="Bac +4">Bac +4</option>
            <option value="Bac +5">Bac +5</option>
            <option value="Autre">Autre</option>
	</select></td>
	</tr>
 
	<tr><td> </td>
	<td>&nbsp;</td>
	</tr>
 
 
<tr>
	<td>
 
	<?=$WILLEXPIRE?>:	</td>
 
	<td>
	<select name=exdays1>
	<option value=30> 30 </option>
	<option value=60> 60 </option>
	<option value=90> 90 </option>
	</select>
	jours
	.	</td>
	</tr>
	<tr><td><?=$AVAILIN?>:</td>
	<td>
	<input type=text name=JobIn value="pays ou adresse">	</td>
	</tr>
	<tr>
	<tr><td><?=$POSTEDON?>:</td>
	<td>
	<input type=text name=postdate value='<? print date("d/M/Y"); ?>'>	</td>
	</tr>
	<tr>
	<td align=left><input type=submit name=submit value="Poster la mission" /></td>
	</tr>
</table>
 
<?
}
}
else
{
include "employers1.php";
}
 
?>
 
<? include_once('../footer.php'); ?>