Файл: public_html/light_faq.php
Строк: 79
<?
define('PROTECTOR', 1);
defined('index') or die('Error: restricted access');
$head = 'faq';//фикс. места
$textl='Помощь по игре';
@include_once('files/db.php');
@include_once('files/auth.php');
@include_once('include.php');
@include_once('files/vip.php');
@include_once('files/online.php');
@include_once('files/sql.php');
@include_once('files/lvl.php');
@include_once('files/func.php');
@include_once('files/regeneration.php');
auth();
$close_mysql = @mysql_fetch_assoc( @mysql_query_new("SELECT `$head` FROM `close` LIMIT 1"));
if($close_mysql["$head"]==1){
@include_once('files/head.php');
@include_once('files/zag.php');
location_exit("$textl");
@include_once('files/down.php'); exit;}
switch($_GET['mod']){
default:
@include_once('files/head.php');
@include_once('files/zag.php');
$whiel = @mysql_query_new("SELECT `id`,`title` FROM `library` WHERE `status`='1' ORDER by `id` ASC");
$sta = @mysql_num_rows( @mysql_query_new("SELECT `id`,`title` FROM `library` WHERE `status`='1' ORDER by `id` ASC"));
if($sta==0){ echo"n$divn Нет статей! </div>n $javabackn"; break;}
if($udata['prava']>=5){ echo"n<a href='$_LINK/index.php?r=admin&mod=library' $bt_r> Админка</a>n"; }
echo"
$balka
<div class='inner_content_flamingo'>
<center> <b>Помошь по игре</b></center></div>
n$div";
while($lists = @mysql_fetch_array($whiel)){
echo"
$imglibraly
<a href='$_LINK/index.php?r=faq&mod=read&id=$lists[id]'> $lists[title] </a>
<br>
";}
echo"
</div>
$javabacksea";
break;
case 'read':
$whiel = @mysql_query_new("SELECT * FROM `library` WHERE `id`='$_GET[id]' and `status`='1'");
$lists = @mysql_fetch_array($whiel);
if(empty($_GET['id']) or empty($lists['id'])){
$_SESSION['msg']="$baloon <center> Невыбрана статья! </div>";
@header("Location: $_LINK/index.php?$_get_r"); exit;}
@include_once('files/head.php');
@include_once('files/zag.php');
echo "
<h1 class='center'><b>$lists[title]</b></h1>
$baloon
". img($lists['text']) ."
<br>
</div>
<a href='$_LINK/index.php?$_get_r' $bt_s>Назад</a>
";
if($udata['prava']>=4)
{echo "<a href='/index.php?r=admin&mod=red_library&id=$lists[id]' $bt_gr>Редактировать</a>";}
}
@include_once('files/down.php');
?>