Просмотр файла admin.php

Размер файла: 2.06Kb
<?php
error_reporting(0);
ob_start();
ob_implicit_flush(0);
session_name("sid");
session_start();

require("config.php");
include 'head.php';

if (isset($_REQUEST['mode'])) {$mode=$_REQUEST['mode'];}




if (isset($_REQUEST['login']) && isset($_REQUEST['pass'])) 
{
$login=$_REQUEST['login'];
$pass=$_REQUEST['pass'];
$_SESSION['login']=$login;
$_SESSION['pass']=$pass;
}
else {
if (isset($_SESSION['login']) && isset($_SESSION['pass']))
{
$login=$_SESSION['login'];
$pass=$_SESSION['pass'];
}
else {
$login="false";
$pass="false";
echo '<div class="err">Вы не авторизированы!<p><a href="/login.php"><b>Войти</b></a></div>';
}
}

if ($login!=="false" && $pass!=="false")
{

?>
<div align="center">
<table border="1" align="center" class="table" width="80%">

  <tr><td>ID</td>
  <td>ip</td> 
  <td>Логин</td> 
   <td>Пасс</td>
    <td>Страна</td>
  <td>Версия ОС</td>
  <td>Проц</td>
  <td>ОЗУ</td>
  <td>Входящая</td>  
  <td>Исходящая</td>  
  <td>Цена</td>  
  <td>Ссылка</td>
    <td></td>
	  <td></td>
  </tr>
<? 
$sql = mysql_query("SELECT*FROM deds");
      while($record = mysql_fetch_array($sql))
   { 
  print '<tr><td>'.$record['id'].'</td>
  <td>'.$record['ip'].'</td>
  <td>'.$record['login'].'</td>
  <td>'.$record['pass'].'</td>
  <td>'.$record['country'].'</td>   
  <td>'.$record['os'].'</td>
  <td>'.$record['proc'].'</td>
  <td>'.$record['ram'].'</td>
  <td>'.$record['down'].'</td>  
  <td>'.$record['up'].'</td>  
  <td>'.$record['cash'].'</td>   
  <td>'.$record['link'].'</td> 
  <td><a href="del.php?id='.$record['id'].'">Удалить</a></td>
  <td><a href="edit.php?id='.$record['id'].'">Изменить</a></td>
  </tr>';
   }

?>
<tr><td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>  
  <td></td>  
  <td></td> 
  <td></td> 
  <td></td> 
  <td></td>
  <td><a href="add.php">Добавить</a></td>
  </tr>

</table></div>
<?}


include 'foot.php';

?>