Размер файла: 2.64Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
session_start();
require ('../data/config.php');
require ('../data/mysql.php');
require ('../data/functions.php');
require ('../data/mail.php');
if ($cookie_user<>$admin_login and $cookie_passwd<>$admin_passw)
{
header("Location:/index.php?err=falce");
exit();
}
?>
<html>
<head> <meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml" charset="utf-8"/>
<title>Администраторская - <? print "$site_title";?></title>
<? require ('../html/style.php');?>
</head>
<BODY BGCOLOR=#D3DDF4 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<center>
<? require ('../html/up_admin.php');?>
<?
if ($action=="edit")
{
$result= mysql_query("UPDATE contacts SET
email='$email',
telefon='$telefon',
icq='$icq'");
print "<br><font color=green><b>изменения внесены</b><br>";
}
$result= mysql_query("SELECT * FROM contacts");
$row = mysql_fetch_array($result);
print "
<center><br><br>
<TABLE WIDTH=600 BORDER=0 CELLPADDING=2 CELLSPACING=2>
<form action=$PHP_SELF method=post>
<tr>
<td align=left valign=top class=p>
<b>e-mail:</td>
<td align=left valign=top class=p>
<input type=text name=email size=40 class=p value=\"$row[email]\"></td>
</tr>
<tr>
<td align=left valign=top class=p>
<b>телефоны:</td>
<td align=left valign=top class=p>
<input type=text name=telefon size=40 class=p value=\"$row[telefon]\"></td>
</tr>
<tr>
<td align=left valign=top class=p>
<b>ICQ:</td>
<td align=left valign=top class=p>
<input type=text name=icq size=40 class=p value=\"$row[icq]\"></td>
</tr>
<tr>
<td align=left valign=top class=p>
<input type=hidden name=id value=$id>
<input type=hidden name=action value=edit></td>
<td align=left valign=top class=p><br><br>
<input type=submit value=\"изменить\" class=p></td>
</tr>
</form>
</table>
</center>";
?>
</center>
</body>
</html>