Location: PHPKode > scripts > Open4Listing > cont/edit_cont.php
<?php

header("Cache-Control: no-cache, must-revalidate");

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");



include '../setari.php';

$cxn = @ConnectToDb($dbServer, $dbUser9, $dbPass9, $dbName9);

if ($_POST[submit])

{

$error=0;

if(!trim($_POST[nume]))

{

die("<font color=red face=verdana size=1><b>Name field is empty!<br>Press back and try again!</font><br><br>");

$error++;

}

if(!trim($_POST[adresa]))

{

die("<font color=red face=verdana size=1><b>Contact field is empty!<br>Press back and try again!</font><br><br>");

$error++;

}



if($error==0)

{

if(isset($_COOKIE['vanzinch_email'])) 

{ 

$username =$_COOKIE['vanzinch_email']; 

$pass = $_COOKIE['vanzinch_pass'];

$check = mysql_query("SELECT * FROM clienti WHERE email = '$username'")or die(mysql_error()); 

while($myrow = mysql_fetch_array( $check )) 

{ 



//if the cookie has the wrong password, they are taken to the login page 

if ($pass != $myrow['parola']) 

{

header("Location: login.php"); 

} 

 
$_POST[companie]=preg_replace("#(\n)#","<br />",$_POST[companie]); 
$_POST[adresa]=preg_replace("#(\n)#","<br />",$_POST[adresa]); 

$upd="UPDATE clienti SET nume='$_POST[nume]', telefon='$_POST[telefon]', fax='$_POST[fax]', adresa='$_POST[adresa]', companie='$_POST[companie]', currency='$_POST[currency]', system='$_POST[system]'  WHERE id='$myrow[id]' LIMIT 1";

$rsult = mysql_query($upd) or die("Query failed aici");

header("Location: cont.php");

MYSQL_CLOSE();

}}}

}





else {



if(isset($_COOKIE['vanzinch_email'])) 

{ 

$username = $_COOKIE['vanzinch_email']; 

$pass = $_COOKIE['vanzinch_pass'];

$check = mysql_query("SELECT * FROM clienti WHERE email = '$username'")or die(mysql_error()); 

while($myrow = mysql_fetch_array( $check )) 

{ 

$myrow[companie]=str_replace("<br />", "",$myrow[companie]);
$myrow[adresa]=str_replace("<br />", "",$myrow[adresa]);
//if the cookie has the wrong password, they are taken to the login page 

if ($pass != $myrow['parola']) 

{

header("Location: login.php"); 

} 





?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Website Info</title>



<style type="text/css"><!-- 

A{text-decoration:none}

-->

</style>


</head>

<body bgcolor="#333333">

 

<div align="center">

 <br><br>
<?php
include 'sus.php';
?>
<table border="1" width="860" cellspacing="0" cellpadding="0" bordercolor="#006699" bordercolorlight="#808080" bgcolor="#ffffff">

<tr><td>








<div align="center">



<table border="0" cellspacing="0" cellpadding="0" width="100%">

<tr>

<td width="800" align=center bgcolor="#FFFFFF" valign="top">

		

		

		

	<div align="center">

		

		

		

	<table cellspacing="1" cellpadding="2" width="860">

<tr><td valign="top" bgcolor="#CC3300" width="418">

<span lang="en-us"><b><font face="Verdana" size="2" color="#FFFFFF">&nbsp;Website 
info:</font></b></span><td bgcolor="#333333">

<p align="center"><b><font color="#FFFFFF" size="1" face="Verdana">

</b><a href="cont.php"><span lang="en-us"><b><font face="Verdana" size="1" color="#FFFFFF">Cancel - Back 

to Main Page</font></b></span></a><td class=anunttitlu2 width=20% bgcolor="#FF0000">

	<p align=center><b><a href=logout.php>

	<font face=Verdana color=#ffffff size=1>Logout</font></a><span lang="en-us"><font face=Verdana color=#FFFFFF size=1>&gt;&gt;&gt;</font></span></b></p></td></tr></table>

<table width=860 cellpadding=0>

<tr><td width="20%" bgcolor="#AFC7E2" valign="top" align="center">

<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">



	<p align="center">&nbsp;</p>



	<table border="0" width="96%" cellpadding="2" cellspacing="4">


		<tr>

			<td bgcolor="#666666">

			<b><font size="1" face="Verdana" color="#FFFFFF">Company name:*</font></b></td>

			<td width="533" bgcolor="#666666">

			<font color="#FFFFFF" face="Verdana" size="1">

			<input name="nume" size="30" style="font-weight: 700" value="<?php echo $myrow['nume'];?>"></font></td>

		</tr>
<tr>

			<td bgcolor="#666666">

			<p style="margin-top: 0; margin-bottom: 0">

			<b><font face="Verdana" size="1" color="#FFFFFF">Tagline*:</font></b></p></td>

			<td width="533" bgcolor="#666666">

			<p style="margin-top: 0; margin-bottom: 0">

			<font color="#FFFFFF" face="Verdana" size="1">

			<input name="fax" size="31" style="font-weight: 700" value="<?php echo $myrow['fax'];?>"></font><p style="margin-top: 0; margin-bottom: 0">

			<font size="1" face="Verdana" color="#FFFFFF">
			<span style="background-color: #808080">Company specialization -
			keep it short and simple</span></font><font color="#FFFFFF" size="1" face="Arial"><span style="background-color: #808080"> 
			(for example: Luxury Apartments in Manhattan, NY)</span></font></td>

		</tr>
		<tr>

			<td bgcolor="#666666">

			<b><font color="#FFFFFF" size="1" face="Verdana">Full company 
			description, history, etc:</font></b></td>

			<td width="533" bgcolor="#666666">

			<font color="#FFFFFF" face="Verdana" size="1">

			<textarea rows="13" name="companie" cols="61" style="font-weight: 700"><?php echo $myrow['companie'];?></textarea></font></td>

		</tr>

		<tr>

			<td bgcolor="#666666">

<b><font face="Verdana" size="1" color="#FFFFFF">Default 
contact name /phone:</font></b><br>
<font face="Verdana" size="1" color="#FFFFFF">&nbsp;(for listings)</span></font></td>
<td width="533" bgcolor="#666666">
<font color="#FFFFFF" face="Verdana" size="1">
<textarea rows="2" name="telefon" cols="61" style="font-weight: 700"><?php echo $myrow['telefon'];?></textarea></font></td>

		</tr>

		<tr>

			<td bgcolor="#666666">

			<b><font color="#FFFFFF" face="Verdana" size="1">Default currency: </font></b>
			<font size="1" color="#FFFFFF" face="Verdana">&nbsp;(for listings)</font></td>

			<td width="533" bgcolor="#666666">
			
<select size="1" name="currency">		
<option><?php echo $myrow['currency'];?></option>		
<option  value="EUR">Euro (EUR)</option>
<option  value="USD">US Dollar (USD)</option>
<option  value="AED">United Arab Emirates Dirham (AED)</option>
<option  value="ANG">Netherlands Antillean Guilder (ANG)</option>
<option  value="ARS">Argentine Peso (ARS)</option>
<option  value="AUD">Australian Dollar (AUD)</option>
<option  value="BDT">Bangladeshi Taka (BDT)</option>
<option  value="BGN">Bulgarian Lev (BGN)</option>
<option  value="BHD">Bahraini Dinar (BHD)</option>
<option  value="BND">Brunei Dollar (BND)</option>
<option  value="BOB">Bolivian Boliviano (BOB)</option>
<option  value="BRL">Brazilian Real (BRL)</option>
<option  value="BWP">Botswanan Pula (BWP)</option>
<option  value="CAD">Canadian Dollar (CAD)</option>
<option  value="CHF">Swiss Franc (CHF)</option>
<option  value="CLP">Chilean Peso (CLP)</option>
<option  value="CNY">Chinese Yuan (CNY)</option>
<option  value="COP">Colombian Peso (COP)</option>
<option  value="CRC">Costa Rican Colón (CRC)</option>
<option  value="CZK">Czech Republic Koruna (CZK)</option>
<option  value="DKK">Danish Krone (DKK)</option>
<option  value="DOP">Dominican Peso (DOP)</option>
<option  value="DZD">Algerian Dinar (DZD)</option>
<option  value="EEK">Estonian Kroon (EEK)</option>
<option  value="EGP">Egyptian Pound (EGP)</option>
<option  value="FJD">Fijian Dollar (FJD)</option>
<option  value="GBP">British Pound Sterling (GBP)</option>
<option  value="HKD">Hong Kong Dollar (HKD)</option>
<option  value="HNL">Honduran Lempira (HNL)</option>
<option  value="HRK">Croatian Kuna (HRK)</option>
<option  value="HUF">Hungarian Forint (HUF)</option>
<option  value="IDR">Indonesian Rupiah (IDR)</option>
<option  value="ILS">Israeli New Sheqel (ILS)</option>
<option  value="INR">Indian Rupee (INR)</option>
<option  value="ISK">Icelandic Króna (ISK)</option>
<option  value="JMD">Jamaican Dollar (JMD)</option>
<option  value="JOD">Jordanian Dinar (JOD)</option>
<option  value="JPY">Japanese Yen (JPY)</option>
<option  value="KES">Kenyan Shilling (KES)</option>
<option  value="KRW">South Korean Won (KRW)</option>
<option  value="KWD">Kuwaiti Dinar (KWD)</option>
<option  value="KYD">Cayman Islands Dollar (KYD)</option>
<option  value="KZT">Kazakhstani Tenge (KZT)</option>
<option  value="LBP">Lebanese Pound (LBP)</option>
<option  value="LKR">Sri Lankan Rupee (LKR)</option>
<option  value="LTL">Lithuanian Litas (LTL)</option>
<option  value="LVL">Latvian Lats (LVL)</option>
<option  value="MAD">Moroccan Dirham (MAD)</option>
<option  value="MDL">Moldovan Leu (MDL)</option>
<option  value="MKD">Macedonian Denar (MKD)</option>
<option  value="MUR">Mauritian Rupee (MUR)</option>
<option  value="MVR">Maldivian Rufiyaa (MVR)</option>
<option  value="MXN">Mexican Peso (MXN)</option>
<option  value="MYR">Malaysian Ringgit (MYR)</option>
<option  value="NAD">Namibian Dollar (NAD)</option>
<option  value="NGN">Nigerian Naira (NGN)</option>
<option  value="NIO">Nicaraguan Córdoba (NIO)</option>
<option  value="NOK">Norwegian Krone (NOK)</option>
<option  value="NPR">Nepalese Rupee (NPR)</option>
<option  value="NZD">New Zealand Dollar (NZD)</option>
<option  value="OMR">Omani Rial (OMR)</option>
<option  value="PEN">Peruvian Nuevo Sol (PEN)</option>
<option  value="PGK">Papua New Guinean Kina (PGK)</option>
<option  value="PHP">Philippine Peso (PHP)</option>
<option  value="PKR">Pakistani Rupee (PKR)</option>
<option  value="PLN">Polish Zloty (PLN)</option>
<option  value="PYG">Paraguayan Guarani (PYG)</option>
<option  value="QAR">Qatari Rial (QAR)</option>
<option  value="RON">Romanian Leu (RON)</option>
<option  value="RSD">Serbian Dinar (RSD)</option>
<option  value="RUB">Russian Ruble (RUB)</option>
<option  value="SAR">Saudi Riyal (SAR)</option>
<option  value="SCR">Seychellois Rupee (SCR)</option>
<option  value="SEK">Swedish Krona (SEK)</option>
<option  value="SGD">Singapore Dollar (SGD)</option>
<option  value="SKK">Slovak Koruna (SKK)</option>
<option  value="SLL">Sierra Leonean Leone (SLL)</option>
<option  value="SVC">Salvadoran Colón (SVC)</option>
<option  value="THB">Thai Baht (THB)</option>
<option  value="TND">Tunisian Dinar (TND)</option>
<option  value="TRY">Turkish Lira (TRY)</option>
<option  value="TTD">Trinidad and Tobago Dollar (TTD)</option>
<option  value="TWD">New Taiwan Dollar (TWD)</option>
<option  value="TZS">Tanzanian Shilling (TZS)</option>
<option  value="UAH">Ukrainian Hryvnia (UAH)</option>
<option  value="UGX">Ugandan Shilling (UGX)</option>
<option  value="UYU">Uruguayan Peso (UYU)</option>
<option  value="UZS">Uzbekistan Som (UZS)</option>
<option  value="VEF">Venezuelan Bolívar (VEF)</option>
<option  value="VND">Vietnamese Dong (VND)</option>
<option  value="XOF">CFA Franc BCEAO (XOF)</option>
<option  value="YER">Yemeni Rial (YER)</option>
<option  value="ZAR">South African Rand (ZAR)</option>
<option  value="ZMK">Zambian Kwacha (ZMK)</option></td>
</select>
		</tr>

		<tr>

			<td bgcolor="#666666">

			<b><font size="1" face="Verdana" color="#FFFFFF">Default area 
			system: </font></b><font size="1" color="#FFFFFF" face="Verdana">
			&nbsp;(for listings)</font></td>

			<td width="533" bgcolor="#666666">

			<select size="1" name="system">
			
			<option><?php echo $myrow['system'];?></option>
			<option>Sq Ft</option>
			<option>sqm</option>
			<option>mt2</option>
			<option>m2</option>
			<option>mp</option>
			<option></option>
			</select></td>

		</tr>

		<tr>

			<td bgcolor="#666666">

			<p style="margin-top: 0; margin-bottom: 0"><b>

			<font size="1" face="Verdana" color="#FFFFFF"><span lang="en-us">
			Contact Details:</span></font></b></p>
			<p style="margin-top: 0; margin-bottom: 0"><b>

			<font size="1" face="Verdana" color="#FFFFFF"><span lang="en-us">
			(address, phones, fax, etc):</span></font></b></p>

			</td>

			<td width="533" bgcolor="#666666">

			<font color="#FFFFFF" face="Verdana" size="1">

			<textarea rows="4" name="adresa" cols="47" style="font-weight: 700"><?php echo $myrow['adresa'];?></textarea></font></td>

		</tr>

		
		</table>

	<p><input type="submit" name="submit" value="Save Changes"></p>

</form>











</table></table>





</div>

</div>

<tr>

<td colspan="2">



</td>

</tr>



</table>







</tr></td></table>



</body>

</html>

<?php

}}}



?>
Return current item: Open4Listing