<?php
set_magic_quotes_runtime(0);
include ("txt/vars.php");
if (isset($_COOKIE['cookpass_auc'])) {
$cookpass_auc=$_COOKIE['cookpass_auc'];
}
if (isset($_COOKIE['cookname_auc'])) {
$cookname_auc=$_COOKIE['cookname_auc'];
}
if (isset($_GET['exit'])) {
if ($_GET['exit']=='yes') {
SetCookie ("cookname_auc","");
SetCookie ("cookpass_auc","");
unset ($cookname_auc);
unset ($cookpass_auc);
}
}

?>
<html>
<head>
<title>Auction</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta name="description" content="hope-auction бесплатный качественный скрипт для организации аукциона">
<meta name="keywords" content="hope-scripts.ru hope-auction скрипты аукцион">
<LINK rel="stylesheet" type="text/css" href="css/main.css">
</head>

<body>
<div align="center">
<table width="745" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td height="69" align="center" valign="middle" ><table width="745" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="519"><center><div align="center"><img src="images/pub.jpg" width="729" height="123"></div></td>
</tr>
</table></td>
</tr>
<tr> 
<td height="22">&nbsp;</td>
</tr>
<tr> 
<td height="22" class="menu"><div align=right>
<?php
if (!isset($cookpass_auc) || !isset($cookname_auc)) {
echo "Добро пожаловать, гость!";
}
else {
$cookname_auc=stripslashes($cookname_auc);
echo "Вы авторизованы как $cookname_auc (<a href='index.php?exit=yes'><u>Выход</u></a>)";
}
?>
</div> </td>
</tr>
<tr> 
<td align="center" valign="top">&nbsp;</td>
</tr>
<tr> 
<td><table width="745" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="165" align="left" valign="top">

<table width="155" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td height="22"  class="menu"><div align="center">Меню</div></td>
</tr>
<tr> 
<td align="center" valign="top" class="menu"><table width="155" border="0" cellspacing="1" cellpadding="0">
<tr> 
<td align="center" valign="top" bgcolor="#FFFFFF"><table width="145" border="0" cellspacing="5" cellpadding="0">
<tr> 
<td>
<?php
$link=mysql_connect("$mysqlhost","$mysqllogin","$mysqlpass") or die("Could not connect");
mysql_select_db($mysqldb) or die("Could not select database");
$query="select name,link from menu";
$res=mysql_query($query);
while ($myrow=mysql_fetch_assoc($res)) {
$name_of_menu=$myrow ["name"];
$name_of_menu=stripslashes($name_of_menu);
$link_of_menu=$myrow ["link"];
$link_of_menu=stripslashes($link_of_menu);
echo "<img src='images/puce.gif' width='10' height='9'> ";
echo "<a href='$link_of_menu'>$name_of_menu</a><br>";
}
if (isset($cookpass_auc) && isset($cookname_auc)) {
echo "<img src='images/puce.gif' width='10' height='9'> ";
echo "<a href='cp.php'>Ваш кабинет</a><br>";
}
?>
 
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br> <table width="155" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td height="22" class="menu"><div align="center">Категории</div></td>
</tr>
<tr> 
<td align="center" valign="top" class="menu"><table width="155" border="0" cellspacing="1" cellpadding="0">
<tr> <td align="center" valign="top" bgcolor="#FFFFFF"><table width="145" border="0" cellspacing="5" cellpadding="0">
<tr> 
<td>
<?php
$query="select * from categories";
$catres=mysql_query($query);
while ($myrow=mysql_fetch_assoc($catres)) {
$name_of_category=$myrow ["name"];
$name_of_category=stripslashes($name_of_category);
$id_of_category=$myrow ["first"];
echo "<img src='images/puce.gif' width='10' height='9'> ";
echo "<a href='categories.php?category=$id_of_category'>$name_of_category</a><br>";
}
?>
</td></tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
 <table width="155" border="0" cellspacing="0" cellpadding="0">


</table>
<?php
if (!isset($cookpass_auc) || !isset($cookname_auc)) {
echo "<br> <table width=155 border=0 cellspacing=0 cellpadding=0>";
echo "<tr><td height=22 class='menu'><div align='center'>Быстрый вход</div></td>";
echo "</tr><tr> <td align='center' valign='top' class='menu'><table width=155 border=0 cellspacing=1 cellpadding=0>";
echo "<tr> <td align='center' valign='top' bgcolor='#FFFFFF'><table width=145 border=0 cellspacing=5 cellpadding=0>";
echo "<tr><td><form action='enter.php' method=post>";
echo "<table><tr><td>Логин:</td><td><input type=text name=username size=12 style='height:17;font-size:9'></td></tr>";
echo "<tr><td>Пароль:</td><td><input type=password name=password size=16 style='height:17;font-size:9'></td>";
echo "</tr><tr><td colspan=2><center><input type=submit value='Войти' style='height:20;font-size:9'></td></tr>";
echo "</table></table></td></tr></table></td></tr></table></form>";
}
?>
<br>

<br>
<table width="155" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td height="22" class="menu"><div align="center">Партнеры</div></td>
</tr>
<tr> 
<td align="center" valign="top" class="menu"><table width="155" border="0" cellspacing="1" cellpadding="0">
<tr> 
<td align="center" valign="top" bgcolor="#FFFFFF"><table width="145" border="0" cellspacing="5" cellpadding="0">
<tr> 
<td><div align="center">
<a href="http://ваша ссылка" target="_blank"><img src="images/ban88.gif" width="88" height="31" border="0"></a> 
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
</td>
<td width="580" align="right" valign="top">