Просмотр файла guest/index.php

Размер файла: 4.17Kb
<?
	/////////// Powered by Giga!!! /////////
	/////////// http://gwap.net.ru /////////
	/////////// [email protected] /////////
	include "set.php";
	echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
<meta http-equiv="Cache-control" content="max-age=2" forua="true"/>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>';
echo "<title>$site-гостевая</title>";
echo '<link rel="shortcut icon" href="/img/icon.gif"/>
<link rel="home" href="/"/><link rel="up" href="../"/>
<style type="text/css">
	body {background-color:#FFFFFF; margin:0px; padding:0px; font-family: sans-serif; font-size: small;}
	h1 {color: #000000;font-size: medium;}
	h2 {color: #666666; font-size: medium;}
	img {border:0px; border-spacing:0;}
	table.header {border-spacing:0; font-size:0px; }
	td, div {margin: 0 0 0 0; padding: 0 0 0 0;}
	.block {display:block; float: left;}
	a {color: #ff0000; text-decoration: none; font-size: small}
	.UpLink a {text-transform: uppercase;}
</style>
</head>
<body>';
  $dir_rec = dir("rec");
  $i = 0;
  while($entry = $dir_rec->read())
  {
    if (substr($entry,0,3)=="rec")
    {
      $names[$i]=substr($entry,4);
      $i++;
    }
  }
  $dir_rec->close();
  @rsort($names);
  $count = $i;
  $count1 = $count;
  if (empty($start))
  {
    $start = 0;
  }
  $start = intval($start);
  if ($start < 0)
  {
    $start = 0;
  }
  echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" width=\"100%\" bgcolor=\"#faad1e\">
  <tr bgcolor=\"#fce1ae\" align=\"center\"><td><a href=\"http://$site\"><font size=\"2\" color=\"maroon\">$site</font></a></td></tr>
  <tr align=\"center\"><td>
  ";
  if ($count > $start + $pp) $count = $start + $pp;
  if ($start != 0)
  {
    print "<a href=index.php?start=".($start - $pp)."><font size=\"1\">назад</font></a>:";
  }
  print "<a href=add.php><font size=\"1\">добавить</font></a>";
  if ($count1 > $start + $pp)
  {
    print ":<a href=index.php?start=".($start + $pp)."><font size=\"1\">далее</font></a> \n";
  }
  print "</td></tr></table>";
   for ($i = $start; $i < $count; $i++)
  {
    $entry = $names[$i];
    $data = file("rec/rec.".$entry);
    $date = $entry;
    $name = trim($data[0]);
    $time = trim($data[1]);
    $email = trim($data[2]);
    $url = trim($data[3]);
    $msg = trim($data[4]);
    $answer = trim($data[5]);
    print "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">
    <tr bgcolor=#FFFF99><td>";
    print "<b>$name:</b>";
    if (!empty($time)) print " $time";
    if (!empty($email)) print "/ <a href=mailto:$email><i>$email</i></A>\n";
    if (!empty($url)) print "/ <a href=\"http://$url\">$url</a>";
    print "</td></tr><tr><td>";
    print "<p>".$msg."</p>\n";
    if (!empty($answer))
    {
      print "<p><font color=\"#FF0000\">Админ: $answer</font></p>";
    }   
    print "</td></tr></table>\n<br><br>\n";
  }
  print "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" width=\"100%\" bgcolor=\"#faad1e\">
<tr align=\"center\"><td>";
  if ($count > $start + $pp) $count = $start + $pp;
  if ($start != 0)
  {
    print "<a href=index.php?start=".($start - $pp)."><font size=\"1\">назад</font></a>:";
  }
  print "<a href=add.php><font size=\"1\">добавить</font></a>";
  if ($count1 > $start + $pp)
  {
    print ":<a href=index.php?start=".($start + $pp)."><font size=\"1\">далее</font></a> \n";
  }
  print "</td></tr><tr bgcolor=\"#fce1ae\" align=\"center\"><td><a href=\"http://$site\"><font size=\"2\" color=\"maroon\">$site</font></a></td></tr>
 </table>";
  echo '</body></html>';
  /////////// Лучшая и к тому же беплатная коллекция php скриптов на http://visavi.net !!! /////////
    ////////// Опасайтесь подделок!!! ///////////
    ///////// Удачи!!! ////////
    	?>