View file banners.ru/www/admin/rules.php

File size: 3.45Kb
<?
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 rules SET
                                r1='$r1',
                                r2='$r2',
                                r3='$r3',
                                r4='$r4',
                                r5='$r5'");
        print "<br><font color=green><b>изменения внесены</b><br>";
        }

print "<center class=p><b>ПРАВИЛА СЕТИ</b></center>";



$result= mysql_query("SELECT * FROM rules");
while ($row = mysql_fetch_array($result))
        {
        print "
        <center><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>общие положения</td>
                        <td align=left valign=top class=p>
                        <TEXTAREA rows=8 cols=100 name=r1 class=p>$row[r1]</TEXTAREA>
                        </td>
                </tr>
                <tr>
                        <td align=left valign=top class=p>
                        <b>требования к сайтам</td>
                        <td align=left valign=top class=p>
                        <TEXTAREA rows=8 cols=100 name=r2 class=p>$row[r2]</TEXTAREA></td>
                </tr>
                <tr>
                        <td align=left valign=top class=p>
                        <b>Правила создания баннеров</td>
                        <td align=left valign=top class=p>
                        <TEXTAREA rows=8 cols=100 name=r3 class=p>$row[r3]</TEXTAREA></td>
                </tr>
                <tr>
                        <td align=left valign=top class=p>
                        <b>Правила размещения баннеров сетей</td>
                        <td align=left valign=top class=p>
                        <TEXTAREA rows=8 cols=100 name=r4 class=p>$row[r4]</TEXTAREA></td>
                </tr>
                <tr>
                        <td align=left valign=top class=p>
                        <b>Запрещяется:</td>
                        <td align=left valign=top class=p>
                        <TEXTAREA rows=8 cols=100 name=r5 class=p>$row[r5]</TEXTAREA></td>
                </tr>


                <tr>
                        <td align=left valign=top class=p>
                        <input type=hidden name=action value=edit></td>
                        <td align=left valign=top class=p>
                        <input type=submit value=\"изменить\" class=p></td>
                </tr>
        </form>
        </table>
        </center>";
        }
?>
</center>
</body>
</html>