<?php 
if (!isset($_SESSION['member_id'])) {
	$job_cv_id = 0;
	if(isset($_POST['chcAction'])) {
		foreach ($_POST as $k=>$v) {
			${$k} = $v;
		}
	}
	
	if(isset($_REQUEST['job_cv_id'])) $job_cv_id = intval($_REQUEST['job_cv_id']);
	
	?>
	<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
	    <tr>
		    <td>
			    <table width="100%" border="0" cellspacing="0" cellpadding="0">
				    <tr>
					    <td>
						    <table border="0" cellspacing="0" cellpadding="0">
							    <tr>
								    <td><img src="<?php echo $path;?>images/navigation/featured_box/featured_left.gif" width="14" height="29"></td>
								    <td class="featuredHeader">Post a CV</td>
								    <td><img src="<?php echo $path;?>images/navigation/featured_box/featured_cor.gif" width="29" height="29"></td>
							    </tr>
						    </table>
					    </td>
					    <td align="right">.</td>
				    </tr>
			    </table>
		    </td>
	    </tr>
	    <tr>
			<td>
				<table align=center border=0 cellpadding=0 cellspacing=0 width="100%">
					<tr>
						<td height=10 width=10><img height="10" src="<?php echo $path;?>images/navigation/featured_box/box_1.gif" width="10"/></td>
						<td background="<?php echo $path;?>images/navigation/featured_box/box_top.gif"></td>
						<td width=10><img height="10" src="<?php echo $path;?>images/navigation/featured_box/box_2.gif" width="12"/></td>
					</tr>
					<tr>
						<td background="<?php echo $path;?>images/navigation/featured_box/box_left.gif"></td>
							<td align="center" valign="top">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td valign="top">
											<table align="center" width="100%" border="0" cellpadding="5" cellspacing="1">
												<tr>
													<td>
														<b>To post a CV you must be registered member. Please <a href="account/add_member.html">register</a>. It is absolutely free. </b>
														<br/>
														<br/>
														<style type="text/css">
															div.attention {
															border: 1px solid #003366;
															padding: 5px;
															background-color: #FFEFEF;
															}
															div.attention span {
															font: bold 12px Arial, sans-serif;
															color: #990000;
															}
															div.attention p {
															font: bold 12px Arial, sans-serif;
															color: #000000;
															}
														</style>
														<div class="attention">
															<span>Inportant Information:</span>
															<p>Please be aware that any information posted here will be available to the public and it will be crawled by search engines(eg. Google, Yahoo, Bing).</p>
														</div>
													
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
							<td background="<?php echo $path;?>images/navigation/featured_box/box_right.gif"></td>
					    </tr>
					    <tr>
						    <td height=12 width=10><img height=12 src="<?php echo $path;?>images/navigation/featured_box/box_3.gif" width=10></td>
						    <td background="<?php echo $path;?>images/navigation/featured_box/box_bot.gif"></td>
						    <td><img height=12 src="<?php echo $path;?>images/navigation/featured_box/box_4.gif"
						    width=12></td>
					    </tr>
					</table>
				</td>
			</tr>
		</table>
		<?php
} 
else {
    ?>
    <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><img src="<?php echo $path;?>images/navigation/featured_box/featured_left.gif" width="14" height="29"></td>
    <td class="featuredHeader">Post a CV</td>
    <td><img src="<?php echo $path;?>images/navigation/featured_box/featured_cor.gif" width="29" height="29"></td>
    </tr>
    </table>
    </td>
    <td align="right">.</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
    <table align=center border=0 cellpadding=0 cellspacing=0 width="100%">
    <tr>
    <td height=10 width=10><img height=10
    src="<?php echo $path;?>images/navigation/featured_box/box_1.gif" width=10></td>
    <td background="<?php echo $path;?>images/navigation/featured_box/box_top.gif"></td>
    <td width=10><img height=10
    src="<?php echo $path;?>images/navigation/featured_box/box_2.gif" width=12></td>
    </tr>
    <tr>
    <td background="<?php echo $path;?>images/navigation/featured_box/box_left.gif"></td>
    <td align="center" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top">
    <table align="center" width="100%" border="0" cellpadding="5" cellspacing="1">
    <tr>
    <td>
    <?php
    if ($_GET["Submit"]=="Renew") {
        $job_cv_id_to_renew = intval($_GET["job_cv_id"]);
        mysql_query("UPDATE job_cvs SET added_on=NOW(), added_on_time=NOW() WHERE job_cv_id='$job_cv_id_to_renew'") or die(mysql_error());
        ?>
        <span class="darkBlueBold">Your CV was Renewed successfully. Thank you!!<br/></span>
        <?php
    }
    
    $query_member_advert = "SELECT * FROM job_cvs WHERE member_id='$_SESSION[member_id]'";
    $result_member_advert = mysql_query($query_member_advert);
    $table="job_cvs";
    $rows_array= array("job_cat_id", "JobLocation", "FirstName", "LastName", "Genre", "Age", "CountryOfOrigin", "MaritalStatus", "Children", "ResCountry", "ResTown", "ResAddress", "ResPhone", "Mobile", "Email", "Qualifications", "ProfessionalExperience", "Education", "Interests", "SpecialSkills", "Languages", "Training", "Affiliations", "ReferencesOther");
    $id="job_cv_id";
    $member_id=$_SESSION["member_id"];
    $JobLocation=$JobLocations[0];
    for ($i=1; $i<=count($JobLocations)-1; $i++) {
        $JobLocation .=";";
        $JobLocation .=$JobLocations[$i];
    }
    
    if (isset($chcAction) && strlen($JobLocation)<4) {
        ?>
        Some required fields have not been completed. Please try again.<br>
        <?php
    } else {
    	if(isset($_POST['chcAction'])) {
			foreach ($_POST as $k=>$v) {
				${$k} = $v;
			}
		}
    	//echo '<pre>', var_export($_POST, true), '</pre>';
    	//echo '<br/>$chcAction=' . $chcAction;
        switch ($chcAction) {
	        case "Add":
	            //if(mysql_num_rows($result_member_advert)>0){You have already inserted one FreeListing and you are not allowed to add a second one.<br>
	            //}else{
	            $catdom_id=$domain_id;
	            $active = "no";
	            $added_on = date("Y-m-d");
	            $rows = "";
	            $variables = "";
	            for ($i=0; $i<=(count($rows_array)-2); $i++) {
	                $rows .= $rows_array[$i];
	                $variables .= "'";
	                $variables .= ${$rows_array[$i]};
	                $variables .= "'";
	                $rows .=", ";
	                $variables .=", ";
	            }
	            $rows .= $rows_array[count($rows_array)-1];
	            $variables .= "'";
	            $variables .= ${$rows_array[count($rows_array)-1]};
	            $variables .= "'";
	            $query1 = "INSERT INTO $table ($rows, catdom_id, active, member_id, added_on, added_on_time) VALUES ($variables, '$catdom_id', '$active', '$member_id', '$added_on', NOW())";
	            //echo $query1;
	            $result1 = mysql_query($query1) or die(mysql_error());
	            $job_cv_id = mysql_insert_id();
	            ?>
	            <div class="attention">Your CV was Posted successfully. Thank you!!</div>
	            <?php
	            break;
	        case "Edit":
	            $rows="";
	            $variables="";
	            for ($i=0; $i<=(count($rows_array)-2); $i++) {
	                $rows .=$rows_array[$i];
	                $rows .="=";
	                $rows .="'";
	                $rows .=${$rows_array[$i]};
	                $rows .="'";
	                $rows .=", ";
	            }
	            $rows .=$rows_array[count($rows_array)-1];
	            $rows .="=";
	            $rows .="'";
	            $rows .=${$rows_array[count($rows_array)-1]};
	            $rows .="'";
	            $query2 = "UPDATE $table SET $rows WHERE $id='${$id}'";
	            $result2 = mysql_query($query2) or die(mysql_error());
	            ?>
	            <div class="attention">Your Posted CV Updated successfully. Thank you!!</div>
	            <?php
	            break;
	        case "Delete":
	            $query1 = "SELECT * FROM $table WHERE $id='${$id}'";
	            $result1 = mysql_query($query1);
	            $line1 = mysql_fetch_array($result1);
	            $query1 = "DELETE FROM $table WHERE $id='${$id}'";
	            $result1 = mysql_query($query1) or die(mysql_error());
	            $job_cv_id=0;
	            ?>
	            <div class="attention">Your Posted CV deleted successfully. Thank you!!</div>
	            <?php
	            break;
        }
    }
    $query_job_cvs = "SELECT * FROM job_cvs WHERE job_cat_id='{$_GET['job_cat_id']}' AND JobLocation='{$_GET['Town']}'";
    $line_config=mysql_fetch_assoc(mysql_query("SELECT * FROM job_config"));
    $NeedActivation = $line_config["NeedActivationCV"];
    $DaysToLive = $line_config["DaysToLiveCV"];
    $Expiration = $line_config["ExpirationCV"];
    ?>
    
    <style type="text/css">
    div.attention {
        border: 1px solid #003366;
        padding: 5px;
        background-color: #FFEFEF;
    }
    div.attention span {
        font: bold 12px Arial, sans-serif;
        color: #990000;
    }
    div.attention p {
        font: bold 12px Arial, sans-serif;
        color: #000000;
    }
    </style>
    <div class="attention">
    <span>Inportant Information:</span>
    <p>Please be aware that any information posted here will be available to the public and it will be crawled by search engines(eg. Google, Yahoo, Bing).</p>
    </div>
    
    <?php if ($NeedActivation=="yes") {
        ?>
        <div class="attention">Attention your CVs may not be displayed as the Administrator of the site should activate them.</div>
    <?php }
    ?>
    
    <?php $result_member_advert = mysql_query($query_member_advert);
    if (mysql_num_rows($result_member_advert)>0) {
        ?>
        <p>You have already posted the following CVs:</p>
        </span>
        <table width="100%"  border="0" cellpadding="3" cellspacing="2">
			<tr bgcolor="#D9ECFF">
				<td class="darkBlueBold">CV Name </td>
				<td align="right" class="darkBlueBold">Clicks</td>
				<?php 
					if ($Expiration=="yes") {
						?>
						<td align="center" nowrap="nowrap" class="darkBlueBold" colspan="2">Expires on</td>
						</td>
						<?php 
					}
				?>
			</tr>
        <?php 
        $formcount;
        $count=1;
        while ($line_member_advert = mysql_fetch_assoc($result_member_advert)) {
            ?>
            <tr <?php if ($count>1) {echo ' bgcolor="#F5FAFF"'; $count=0; } ?>>
            <td>
            	<span class="darkBlueBold">
            		<a href="my_jobs/jobs_add_cv.html?job_cv_id=<?php echo $line_member_advert["job_cv_id"];?>">
            		<?php 
            			echo $line_member_advert["LastName"] .' ' . $line_member_advert["FirstName"];
            		?>
            		</a>
            	</span>
            </td>
            <td align="right">
	            <span class="darkBlueBold"><?php echo $line_member_advert["clicks"];?></span>
            </td>
            <?php 
            if ($Expiration=="yes") {
				?>
				<td align="center">
					<span class="darkBlueBold">
					<?php 
					$date_for_format=$line_member_advert["added_on"];
					$date_for_format=explode("-",$date_for_format);
					$expire  = mktime(0, 0, 0, $date_for_format[1]  , $date_for_format[2]+$DaysToLive, $date_for_format[0]);
					echo $ExpiresOn=date("d/m/Y", $expire);
					?>
					</span>
				</td>
				<td align="center">
					<?php 
					if ($expire<=mktime(0, 0, 0, date("m"), date("d"), date("Y"))) {
						?>
						<form name="form<?php echo $formcount;?>" method="get" action="my_jobs/jobs_add_cv.html">
							<input type="submit" name="Submit" value="Renew" class="input"/>
							<input type="hidden" name="jobs_step" value="jobs_add_cv"/>
							<input name="module_page" type="hidden" id="module_page2" value="my_jobs"/>
							<input type="hidden" name="job_cv_id" value="<?php echo $line_member_advert["job_cv_id"];?>"/>
						</form>
						<?php 
					} 
					else {
						echo '&nbsp;';
					}
					?>
				</td>
				<?php 
            }
            ?>
            </tr>
            <?php $count++;
            $formcount++;
        }
        ?>
        </table>
        <span class="darkBlueBold">
    	<?php 
    }
    
    if(!isset($job_cv_id) || intval($job_cv_id) == 0) {
    	if(isset($_REQUEST['job_cv_id'])) $job_cv_id = intval($_REQUEST['job_cv_id']);
    }
    
    if ($job_cv_id>0) {
        
        $query1 = "SELECT * FROM job_cvs";
        $query1 .=" WHERE job_cv_id='$job_cv_id' AND member_id='{$_SESSION['member_id']}'";
        $result1 = @mysql_query($query1);
        if (mysql_num_rows($result1)<1) {
        	?>
        	<u><i>You have no right to edit this CV. Please select from your own ones.</i></u>
        	<?php 
        } 
        else {
            $line_job_cvs = mysql_fetch_assoc($result1);
            
            //echo '<pre>', var_export($line_job_cvs, true), '</pre>';
        }
        ?>
        <br/>
        <?
        
    }
    ?>
    </span>
    </td>
    </tr>
    <tr>
    <td>
    <script type="text/javascript">
    function Confirm_delete()
    {
        alert("ATTENTION!! If you press Submit, your Posted CV will be DELETED.")
    }
    function checkFields()
    {
        missinginfo = "";
        if (document.form_post_cv.job_cat_id.value == "") {
            missinginfo += "\n     -  Job Category";
        }
        //if (document.form_post_cv.JobLocation.value == "") {
            //missinginfo += "\n     -  Job Location";
            //}
            if (document.form_post_cv.FirstName.value == "") {
                missinginfo += "\n     -  First Name";
            }
            if (document.form_post_cv.LastName.value == "") {
                missinginfo += "\n     -  Surname";
            }
            if (!document.form_post_cv.Genre[0].checked && !document.form_post_cv.Genre[1].checked) {
                missinginfo += "\n     -  Genre";
            }
            if (document.form_post_cv.Age.value == "") {
                missinginfo += "\n     -  Age";
            }
            if (document.form_post_cv.CountryOfOrigin.value == "") {
                missinginfo += "\n     -  Country Of Origin";
            }
            if (document.form_post_cv.ResCountry.value == "") {
                missinginfo += "\n     -  Country of Residence";
            }
            if (document.form_post_cv.ResTown.value == "") {
                missinginfo += "\n     -  Town of Residence";
            }
            if (document.form_post_cv.ResAddress.value == "") {
                missinginfo += "\n     -  Address of Residence";
            }
            if ((document.form_post_cv.Email.value.length < 4) ||
            (document.form_post_cv.Email.value.indexOf('@') == -1) ||
            (document.form_post_cv.Email.value.indexOf('.') == -1)) {
                missinginfo += "\n     -  Email address";
            }
            //if ((document.form_post_cv.email.value.indexOf('\'') >0) ||
            //(document.form_post_cv.email.value.indexOf('\"') >0)) {
            //missinginfo += "\n     -  Email address should not have apostrophes";
            //}
            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>
        <form action="my_jobs/jobs_add_cv.html" method="post" enctype="multipart/form-data" name="form_post_cv" id="form_post_cv" onSubmit="return checkFields();">
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
        <tr>
        <td class="darkBlueBold">Note: * fields required</td>
        <td valign="top">&nbsp;
        </td>
        </tr>
        <tr>
        <td>&nbsp;
        </td>
        <td valign="top">&nbsp;
        </td>
        </tr>
        <tr>
        <td>Job category: </td>
        <td valign="top">
        <?php 
        $queryjob_cat = "SELECT * FROM  job_cat WHERE active='yes' ORDER BY order_seq ASC";
        $resultjob_cat = mysql_query($queryjob_cat);
        $NumberOfFieldsjob_cat=mysql_num_rows($resultjob_cat);
        if ($NumberOfFieldsjob_cat <> 0) {
            ?>
            <select name="job_cat_id" class="input" id="job_cat_id">
            <option value="" selected>CHOOSE CATEGORY</option>
            <?php while ($linejob_cat = mysql_fetch_array($resultjob_cat)) {
                ?>
                <option value="<?php echo $linejob_cat["job_cat_id"];
                ?>"<?php if ($linejob_cat["job_cat_id"]==$line_job_cvs["job_cat_id"]) {
                    echo " selected";
                }
                ?>><?php echo $linejob_cat["title_en"];
                ?></option>
            <?php }
            ?>
            </select>
            *
        <?php } else {
            ?>
            No Categories exist yet
        <?php }
        ?></td>
        </tr>
        <tr>
        <td>&nbsp;
        </td>
        <td valign="top">&nbsp;
        </td>
        </tr>
        <tr>
        <td>Job location:</td>
        <td valign="top"><span class="right"><span class="moreInfo">
        <?php $querydistricts = "SELECT * FROM  districts WHERE active='yes' ORDER BY order_seq ASC";
        
        $resultdistricts = mysql_query($querydistricts);
        
        if (mysql_num_rows($resultdistricts) <> 0) {
            ?>
            <?php while ($linedistricts = mysql_fetch_array($resultdistricts)) {
                ?>
                <input type="checkbox" name="JobLocations[]" value="<?php echo $linedistricts["title_en"];?>"<?php if (strstr($line_job_cvs["JobLocation"],$linedistricts["title_en"])) {
                    echo " checked";
                }
                ?>>
                <?php echo $linedistricts["title_en"];
                ?>
            <?php }
            ?>
        <?php } else {
            ?>
            No districts added yet.
        <?php }
        ?>
        * </span></span></td>
        </tr>
        <tr>
        <td>&nbsp;
        </td>
        <td valign="top">&nbsp;
        </td>
        </tr>
        <tr>
        <td><strong>Personal Details:</strong></td>
        <td>&nbsp;
        </td>
        </tr>
        <tr>
        <td>First name: </td>
        <td valign="top"><input name="FirstName" type="text" class="input" id="FirstName" value="<?php echo $line_job_cvs["FirstName"];
        ?>" size="30" maxlength="80">
        *</td>
        </tr>
        <tr>
        <td>Surname:</td>
        <td valign="top"><input name="LastName" type="text" class="input" id="LastName" value="<?php echo $line_job_cvs["LastName"];
        ?>" size="30" maxlength="80">
        *</td>
        </tr>
        <tr>
        <td>Gender:</td>
        <td valign="top"><input name="Genre" type="radio" value="m"<?php if ($line_job_cvs["Genre"]=="m") {
            echo "  checked";
        }
        ?>>
        Male
        <input name="Genre" type="radio" value="f"<?php if ($line_job_cvs["Genre"]=="f") {
            echo "  checked";
        }
        ?>>
        Female * </td>
        </tr>
        <tr>
        <td>Age:</td>
        <td valign="top"><input name="Age" type="text" class="input" id="Age" value="<?php echo $line_job_cvs["Age"];
        ?>" size="30">
        *</td>
        </tr>
        <tr>
        <td>Country of origin: </td>
        <td valign="top">
        <?php $querycountries = "SELECT * FROM  countries";
        $resultcountries = mysql_query($querycountries);
        if (mysql_num_rows($resultcountries) <> 0) {
            ?>
            <select class="input" name="CountryOfOrigin" id="CountryOfOrigin">
            <option value="" selected>Select</option>
            <?php while ($linecountries = mysql_fetch_array($resultcountries)) {
                ?>
                <option value="<?php echo $linecountries["name"];?>"<?php if ($linecountries["name"]==$line_job_cvs["CountryOfOrigin"]) {
                    echo " selected";
                }
                ?>>
                <?php echo $linecountries["name"];
                ?>
                </option>
            <?php }
            ?>
            </select>
        <?php } else {
            ?>
            No Countries added yet.
        <?php }
        ?>
        *</td>
        </tr>
        <tr>
        <td>Marital status:</td>
        <td valign="top"><input name="MaritalStatus" type="radio" value="Single"<?php if ($line_job_cvs["MaritalStatus"]=="Single") {
            echo "  checked";
        }
        ?>>
        Single
        <input name="MaritalStatus" type="radio" value="Married"<?php if ($line_job_cvs["MaritalStatus"]=="Married") {
            echo "  checked";
        }
        ?>>
        Married</td>
        </tr>
        <tr>
        <td>Children:</td>
        <td valign="top">                                <input name="Children" type="text"  class="input" id="ResTown3" value="<?php echo $line_job_cvs["Children"];
        ?>" size="2" maxlength="2"></td>
        </tr>
        <tr>
        <td class="darkBlueBold">Residence:</td>
        <td valign="top">&nbsp;
        </td>
        </tr>
        <tr>
        <td>Country:</td>
        <td valign="top"><?php $querycountries = "SELECT * FROM  countries";
        $resultcountries = mysql_query($querycountries);
        if (mysql_num_rows($resultcountries) <> 0) {
            ?>
            <select class="input" name="ResCountry" id="ResCountry">
            <option value="" selected>Select</option>
            <?php
            while ($linecountries = mysql_fetch_array($resultcountries)) {
                ?>
                <option value="<?php echo $linecountries["name"];?>" <?php if ($linecountries["name"]==$line_job_cvs["ResCountry"]) {
                    echo " selected";
                }
                ?>>
                <?php echo $linecountries["name"];
                ?>
                </option>
                <?php
            }
            ?>
            </select>
            <?php
        } else {
            ?>
            No Countries added yet.
            <?php
        }
        ?>
        *</td>
        </tr>
        <tr>
        <td>Town:</td>
        <td valign="top"><input name="ResTown" type="text"  class="input" id="ResTown" value="<?php echo $line_job_cvs["ResTown"];
        ?>" size="30">
        *</td>
        </tr>
        <tr>
        <td valign="top">Address:</td>
        <td valign="top"><textarea name="ResAddress" cols="30" rows="2" wrap="VIRTUAL" class="input" id="ResAddress"><?php echo $line_job_cvs["ResAddress"];
        ?></textarea>
        *</td>
        </tr>
        <tr>
        <td>Phone:</td>
        <td valign="top"><input name="ResPhone" type="text" class="input" id="ResPhone" value="<?php echo $line_job_cvs["ResPhone"];
        ?>" size="25" maxlength="25"></td>
        </tr>
        <tr>
        <td>Mobile:</td>
        <td valign="top"><input name="Mobile" type="text" class="input" id="Mobile" value="<?php echo $line_job_cvs["Mobile"];
        ?>" size="25" maxlength="25"></td>
        </tr>
        <tr>
        <td>E-mail:</td>
        <td valign="top"><input name="Email" type="text" class="input" id="Email" value="<?php echo $line_job_cvs["Email"];
        ?>" size="30" maxlength="100">
        *</td>
        </tr>
        <tr>
        <td>&nbsp;
        </td>
        <td valign="top">&nbsp;
        </td>
        </tr>
        <tr>
        <td valign="top">Qualifications:</td>
        <td valign="top"><textarea name="Qualifications" cols="50" rows="3" wrap="VIRTUAL" class="input" id="Qualifications"><?php echo $line_job_cvs["Qualifications"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">Professional experience:</td>
        <td valign="top"><textarea name="ProfessionalExperience" cols="50" rows="3" wrap="VIRTUAL" class="input" id="ProfessionalExperience"><?php echo $line_job_cvs["ProfessionalExperience"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">Education:</td>
        <td valign="top"><textarea name="Education" cols="50" rows="3" wrap="VIRTUAL" class="input" id="Education"><?php echo $line_job_cvs["Education"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">Interests:</td>
        <td valign="top"><textarea name="Interests" cols="50" rows="3" wrap="VIRTUAL" class="input" id="Interests"><?php echo $line_job_cvs["Interests"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">Special skills:</td>
        <td valign="top"><textarea name="SpecialSkills" cols="50" rows="3" wrap="VIRTUAL" class="input" id="SpecialSkills"><?php echo $line_job_cvs["SpecialSkills"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">Languages:</td>
        <td valign="top"><textarea name="Languages" cols="50" rows="3" wrap="VIRTUAL" class="input" id="Languages"><?php echo $line_job_cvs["Languages"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">Training:</td>
        <td valign="top"><textarea name="Training" cols="50" rows="3" wrap="VIRTUAL" class="input" id="Training"><?php echo $line_job_cvs["Training"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">Affiliations:</td>
        <td valign="top"><textarea name="Affiliations" cols="50" rows="3" wrap="VIRTUAL" class="input" id="Affiliations"><?php echo $line_job_cvs["Affiliations"];
        ?></textarea></td>
        </tr>
        <tr>
        <td valign="top">References:</td>
        <td valign="top"><textarea name="ReferencesOther" cols="50" rows="3" wrap="VIRTUAL" class="input" id="ReferencesOther"><?php echo $line_job_cvs["ReferencesOther"];
        ?></textarea></td>
        </tr>
        <tr align="center">
        <td colspan="2">
        <input type="hidden" name="jobs_step" value="jobs_add_cv">
        <input name="module_page" type="hidden" id="module_page" value="my_jobs">
        <input name="job_cv_id" type="hidden" id="job_cv_id" value="<?php echo $job_cv_id;?>">
        <?php if ($job_cv_id>0 && mysql_num_rows($result1)>0) {
            ?>
            <table width="0%" border="0" cellspacing="2" cellpadding="2">
            <tr>
            <td><input class="input" name="chcAction" type="radio" value="Edit" checked>
            Edit</td>
            <td><input class="input" type="radio" name="chcAction" value="Add">
            Add New</td>
            <td><input class="input" type="radio" name="chcAction" value="Delete" onClick="Confirm_delete();">
            Delete</td>
            </tr>
            </table>
            <br>
            <span class="red"> </span>
            <input type="submit" name="Submit2" value="Submit" class="input">
        <?php } else {
            ?>
            <input name="chcAction" type="hidden" id="chcAction" value="Add">
            <input type="submit" name="Submit22" value="Add" class="input">
        <?php }
        ?>                                </td>
        </tr>
        </table>
        <input type="hidden" name="module_page" value="my_jobs"/>
        </form></td>
        </tr>
        </table></td>
        </tr>
        </table>
        </td>
        <td background="<?php echo $path;?>images/navigation/featured_box/box_right.gif"></td>
        </tr>
        <tr>
        <td height=12 width=10><img height=12 src="<?php echo $path;?>images/navigation/featured_box/box_3.gif" width=10></td>
        <td background="<?php echo $path;?>images/navigation/featured_box/box_bot.gif"></td>
        <td><img height=12 src="<?php echo $path;?>images/navigation/featured_box/box_4.gif"
        width=12></td>
        </tr>
        </table>
        </td>
        </tr>
        </table>
        <?php
}
?> 