View file release_fix#2/mods/news.php

File size: 779B
<?php
$mod_title="новости";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
include "server_config.php";
$pg="0";
$pg2="10";
$pg3="-10";
if(empty($_GET['_page']))
{
}
else
{
$pg=$_GET['_page'];
$pg2=$pg+"10";
$pg3=$pg-"10";
}
$query = "SELECT * FROM news ORDER BY ID DESC LIMIT $pg,$pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$text) = mysql_fetch_row($cat))
{
echo "$id-$name<br>$text<br><br>";
}
echo "
<a href='?do=news&_page=$pg3'>назад</a>|<a href='?do=news&_page=$pg2'>далее</a><br>
<br>";
include "data/button.php";
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>