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

header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
include_once("../setari.php");
$cauta=$_GET[cauta];
$cxn = @ConnectToDb($dbServer, $dbUser9, $dbPass9, $dbName9);

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"); 

} 





else 

{?> 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ADMIN</title>
<style type="text/css"><!-- 

A{text-decoration:none}

-->

</style>
<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">

		

		

		

	<table cellpadding="4" width="860">

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

<p><font color="#FFFFFF" face="Verdana" size="2"><b>&nbsp;

</span><span lang="en-us">Wellcome</span>!</b></font><td valign="top" bgcolor="#000000" width="233">

<p align="center"><u><b><font color="#FFFFFF" face="Verdana" size="2">
<a href="../index.php" target=_blank><font color="#FFFFFF"><u>click here to view your site</u></font></a></font></b></u><td class=anunttitlu2 width=162 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>

	<div align="center">

<table width=860 cellpadding=0>

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

<?php

echo "<br><font face=verdana color=#FFFFFF size=2><B>".$myrow["nume"]."</B><br>";

echo "<font face=verdana color=#FFFFFF size=1>".$myrow["fax"]."<br><br>";

echo "<font face=verdana color=#FFFFFF size=1>".$myrow["adresa"]."<br>";

echo $myrow["cont"]."</font><br>";?><b><font color="#FFFFFF"> </font>
<br><br></bre>
<a href="edit_cont.php">
<font color="#FFFFFF" size="2" face="arial">
<u>edit website info</span></u></font></a></b><br>
<font face="Verdana" size="1" color="#FFFFFF">(logo, company name, </font>
<br><font face="Verdana" size="1" color="#FFFFFF">about, contact, 
currency)</font></td>

	<td width="80%" bgcolor=#EEF3F9 align="center">



















<?php

$check = mysql_query("SELECT * FROM oferte WHERE idclient='$myrow[id]' and descriere like '%$cauta%' ORDER BY rank desc, idoferta DESC")or die(mysql_error()); 

$number = mysql_numrows($check);

echo "<br><br>



<form method=GET action=cauta.php><FONT SIZE=1 FACE=VERDANA COLOR=#000000><B>Search Keyword:</B> 
<input type=text name=cauta size=20><input type=submit value=Cauta>
</form>
<br><br><br><font color=#999999 face=verdana size=2><b>Keyword: ".$cauta." / Listings: ".$number."</b></br>
<a href=cont.php><font size=1 color=red><u>back to admin</u></font></a>
<br><br>
<table width=90%  border=0 cellspacing=2 align=center>";





while($mzrow = mysql_fetch_array( $check )) 

{

if(!trim($mzrow[camere]))

{$categorie="";}else{$categorie="$mzrow[camere]";}

if(!trim($mzrow[suprafata]))

{$suprafata="";}else{$suprafata="<font face=arial color=#666666 size=2><b>Suprafata: $mzrow[suprafata] metri patrati</b><br></font>";}

if(!trim($mzrow[year]))

{$an="";}else{$an="<font face=arial color=#666666 size=2>Constructie $mzrow[year]<br></font>";}

if(!trim($mzrow[pret]))

{$pret="";}else{$pret="<font face=verdana color=#666666 size=1>| <b>$mzrow[pret] $mzrow[moneda]</b><br></font>";}



echo "<tr><td bgcolor=#ffffff width=76%><font size=1 face=verdana><b>(R:".$mzrow[rank].") ".$mzrow[titlu].": ".$categorie." ".$mzrow[tranzactie]." ".$mzrow["zona"]." (".$mzrow["judet"].") ".$pret."</b></td><td width=12% bgcolor=#ffffff align=center><a href=detaliianunt.php?anuntnr=".$mzrow["idoferta"]."><font size=1 face=verdana color=#4C83C8><b>View Listing</b></a></font></td><td width=12% bgcolor=#ffffff align=right><a href=deleteanunt.php?action=delete&anuntnr=".$mzrow["idoferta"]."><font size=1 face=verdana color=red>delete [x]</a></td></tr>";

}

echo "</table>";



echo "<br><br><a href=adauga_anunt0.php><font color=#ff0000 size=2 face=verdana><b><u>Add a New Listing</b></u></font></a><br><br>";







}}}



else 



//if the cookie does not exist, they are taken to the login screen 

{ 

header("Location: login.php"); 

} 



?>



<br>

	<p>&nbsp;</p>





	<p style="margin:0 15px; ">

&nbsp;</p>

	<p style="margin:0 15px; ">

<font face="Arial" size="2">

	</p>

	<p style="margin:0 15px; ">

&nbsp;</p>

<br><br><br><br><br><br><br><br><br><br>

</td>

</tr>

</td>

</tr>



</table></div>

</td>

</tr>



</table>

</div>

</div>

<tr>

<td colspan="2">



</td>

</tr>



</table>







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



</body>

</html>
Return current item: Open4Listing