Размер файла: 1.52Kb
<?php
// Автор: waphak
// ICQ: 9988817
session_name("SID");
session_start();
include_once "theme/index.php";
require_once"conf.php";
require_once"config.php";
include_once "template/login.php";
if (!$_SESSION[uin]=="" && !md5($_SESSION[par])=="" && md5($_SESSION[par])==$provpar && $_SESSION[uin]==$provuin)
{
echo'<br><center><big>Добавление контакта</big></center><br>';
if(empty($list)){$list="1";}
$dir=opendir("users");
$n = "0";
while(($k=readdir($dir))!==false){
if ($k=='.'||$k=='..'||$k=='index.php'||$k=='.htaccess') continue;
$n++;
}
closedir($dir);
if ($num!==(int)$num){$foo = (int) $num;
$fo = ($foo + 1);
}
else
{
$fo=$num;
}
for ($i="1"; $i<=$fo; $i++)
if ($list == "")
{
$c="0";
}
else
{
$c=($col*($list-1));
}
$dir = opendir ("users");
while ($file = readdir ($dir))
{
if (( $file != ".") && ($file != "..") && ($file != ".htaccess") && ($file != "index.php"))
{
$file= str_replace(".log","",$file);
$nickname= "$file";
$text = @file("users/$nickname.log");
$udata = explode(":||:",$text[0]);
$uins = trim($udata[2]);
$name = trim($udata[3]);
$la = $la + 1;
if($list=="1"){$col=round(1+1);}
if($la>$c-1 and $la<$c+$col){
echo'Введите UIN:<br>
<form method="post" action="anketa.php?uins='.$nickname.'">
<input type="text" name="uins" value=""><br>
<input value="Найти" type="submit"></form><br>';
}}}
closedir ($dir);
}else{
header ("Location: index.php?".SID);
}
include_once "theme/foot.php";
?>