Файл: chats/cpanel/apanel.php
Строк: 164
<?php
require( "../inc/conf.inc.php" );
require( "../inc/check.php" );
$login = autorize();
$login = $row['login'];
$level = $row['level'];
echo "<title>{$cname}</title>";
echo "<link rel="shortcut icon" href="http://sim-sim.h2m.ru/logo/icon.php">";
echo "<style type="text/css">";
echo "body { font-size: {$fs}; color: {$tcol}; background-color: {$bcol}; text-align: center }";
echo "a:link,a:visited { text-decoration: none; color: {$lcol} }";
echo "div { border-style:solid; border-width: 1px; background-color: {$rcol} }";
echo "</style>";
echo "</head>";
echo "<body>";
if ( $level < 6 )
{
echo "<div>Гандон Ипаш нахуй Эта дыра закрыта Котом waufon.ru</div>";
}
else
{
echo "<div>Настройка системы</div>";
switch ( $go )
{
case 'link':
$setting = @mysql_query ("Select * from setting where klu4=1");
$set = mysql_fetch_array ($setting);
echo "<form method="POST" action="apanel.php?id={$id}&pass={$pass}&go=updlink$takep" name="auth">n";
echo "<p align="left">» <b>Ссылка при входе в чЯт.</b>";
echo "<div><p align="left">http://";
echo "<input name="link1" maxlength="120" value="".$set["link1"]."" title="link1"/><br/>n";
echo "<b>Название ссылки</b><br/>";
echo "<input name="link1_name" maxlength="40" value="".$set["link1_name"]."" title="link1_name"/></div>n";
echo "<p align="left">» <b>Ссылка в прихожей</b><br/>";
echo "<div><p align="left">http://";
echo "<input name="link2" maxlength="120" value="".$set["link2"]."" title="link2"/><br/>n";
echo "<b>Название ссылки</b><br/>";
echo $fsize2;
echo "<input name="link2_name" maxlength="40" value="".$set["link2_name"]."" title="link2_name"/></div>n";
echo "<p align="left">» <b>Адрес картинки при входе в чат</b>";
echo "<div><p align="left">";
echo "<input name="link3" maxlength="120" value="".$set["link3"]."" title="link3"/></div>n";
echo "<p align="left"><b>Приветствие при входе в чат</b><br/>";
echo "<div><p align="left"><input name="link3_name" maxlength="40" value="".$set["link3_name"]."" title="link3_name"/></div>n";
echo "<p align="left"><input type="submit" value="Изменить" name="enter"><br/>n";
break;
case 'updlink':
if(!eregi("^((([a-z0-9-]+(.[a-z0-9-]+)*(.[a-z;]{2,3}))|(([0-9]{1,3}.){3}([0-9]{1,3})))((/|?)[a-z0-9~#%&'_+=:;?.-]*)*)$", $link1))$link1="";
if(!eregi("^((([a-z0-9-]+(.[a-z0-9-]+)*(.[a-z;]{2,3}))|(([0-9]{1,3}.){3}([0-9]{1,3})))((/|?)[a-z0-9~#%&'_+=:;?.-]*)*)$", $link2))$link2="";
if(!eregi("^((([a-z0-9-]+(.[a-z0-9-]+)*(.[a-z;]{2,3}))|(([0-9]{1,3}.){3}([0-9]{1,3})))((/|?)[a-z0-9~#%&'_+=:;?.-]*)*)$", $link3))$link3="";
$link1_name = check($link1_name);
$link2_name = check($link2_name);
$link3_name = check($link3_name);
$link1_name = mysql_escape_string($link1_name);
$link2_name = mysql_escape_string($link2_name);
$link3_name = mysql_escape_string($link3_name);
if (!isset($error)) {
$result = mysql_query ("Select * setting where klu4 = '1'");
if (mysql_affected_rows() == 0) {
$error = "database error...";
} else {
mysql_query ("Update setting set link1='".$link1."', link2='".$link2."', link3='".$link3."', link1_name='".$link1_name."', link2_name='".$link2_name."', link3_name='".$link3_name."' where klu4 = '1'");
$msg = "Настройки Линков сохранены";
}
} else {
$error = " ".mysql_error()." ";
}
if (isset($error)) {
echo $fsize1;
echo "$errorn";
echo $fsize2;
}
echo $fsize1;
echo "<b>$msg</b><br/>n";
echo $fsize2;
break;
////////ГЛАВНАЯ///////
default :
echo "<br/><div><p align="left">» <a href="apanel.php?id={$id}&pass={$pass}&ref={$ref}&go=link$takep">Рекламные Ссылки</a><br/>";
echo "» </div>";
}
}
print "<a href="index.php?id={$id}&pass={$pass}">cPanel</a><br/>";
echo "<a href="../enter.php?id={$id}&pass={$pass}">Прихожая</a><br/><p>{$ip}</p>";
$end = gettime( );
echo "<p align="center">";
echo "[".round( $end - $mystart, 5 )."]";
echo "</p></body></html>";
mysql_close( $link );
?>