View file index.php

File size: 1.02Kb
<? $page_name="Главная страница"; include("include/1.php"); require "include/avto.php";
if(isset($_GET['error']))
{if($_GET['error']==404)echo error("Ошибка 404.<br/>Страница(файл) не найдена<br/>", '');
if($_GET['error']==403)echo error("Ошибка 403.<br/>Доступ запрещен<br/>", '');
echo '<hr/>';
}


if(!isset($_SESSION['user_id'])){echo '<form action="include/avto.php" method="post"><b>Авторизация</b><br>
Логин<br><input name="auth_name" type="text" /><br>
Пароль<br><input name="auth_pass" type="password" /><input name="" type="submit" value="Вход" /></form><br>
<a href="reg.php">Регистрация</a><hr>';}


$index_news1=mysql_query("select * from `shurik_news` order by `date` desc limit 1");
if(mysql_num_rows($index_news1) == 1){
$index_news2=mysql_fetch_array($index_news1);
do {echo "<a href=new.php?id=$index_news2[id]>$index_news2[name]</a><br><small>$index_news2[text]</small><hr>";}
while ($index_news2=mysql_fetch_array($index_news1));}

include("include/menu.php");

$it_index_page=1;include("include/2.php"); ?>