Просмотр файла techno/library.php

Размер файла: 1.45Kb
<?php
define('PROTECTOR', 1);

$head = 'library';//фикс. места

$textl='Помощь по игре';
@include('files/db.php');
@include('files/auth.php');
@include('files/func.php');
@include('files/core.php');
@include('files/head.php');
@include('files/zag.php');

$whiel = mysql_query("SELECT id, title FROM `library` ORDER by `id`ASC");
switch($_GET[mod]){

default:
$sta=mysql_num_rows($whiel);
if($sta==0){
echo'Нет статей!<br/>';
@include('files/down.php');
exit;}

while($lists = mysql_fetch_array($whiel)){
echo" <img src=\"pic/main/lib.png\" alt=\"i\"> <a href=\"library.php?id=$lists[id]&mod=read\">
$lists[title]</a><br/>";}
break;

case 'read':
if(empty($_GET['id'])){
echo'Невыбрана статья!<br/>';
@include('files/down.php');
exit;}else{
$_GET[id] = htmlspecialchars(stripslashes(addslashes($_GET['id'])));
$whiel = mysql_query("SELECT * FROM library WHERE id='$_GET[id]'");
$sta=mysql_num_rows($whiel);
if($sta==0){
echo'Невыбрана статья!<br/>';
@include('files/down.php');
exit;}
else{
$lists = mysql_fetch_array($whiel);

echo "<font color='#ffc22b'><center> <b>$lists[title]</b></font></center></div><div class='menu'>";
echo ''.$lists[text].'<br/> </div><div class="menu">';
if($udata[prava]>=4){echo "[<a href=\"adm_panel.php?mod=27&id=$lists[id]?\">ред</a>]</br>";}

echo "<a href=\"library.php?\">Назад</a><br/>";
}
}

}
@include('files/down.php');
?>