<?php
session_start();
include '../login/db_connect.php';
include '../login/post_login.php';
ini_set('display_errors', 'on');
if ( !defined('VIRTUAL_IN') )
{
die("This is a Hacking attempt");
}
if (!$_SESSION['admin_username']) //inceput sessionby username
{
echo '<Script language="javascript">window.location="index.php"</script>';
}
echo '<link href="../css/default.css" rel="stylesheet" type="text/css">';
$query="SELECT * from aliases_number";
$result=pg_exec($db_connect,$query);
$numrows=pg_numrows($result);
if (!$result)
{
echo "<h1>Database Error!</h1>";
exit;
}
if ($numrows=='')
{
echo '<p align="center"><font color="#FF0000"><strong>No aliases in db</strong></font> </p> ';
exit;
}
else
{
do
{
$myrow = pg_fetch_row ($result,$row);
if ($myrow[1]==''&&$myrow[0]==''&&$myrow==''&&$row[0]=='')
{
printf ("<font color='#FF0000'><strong>No aliases in db</strong></font>");
}
else
{
printf ("Aliases nummber:%s",$myrow[0]);
}
$row++;
}
while ($row < $numrows);
}
?>