Вход Регистрация
Файл: darkworld/userquest.php
Строк: 29
<?
include_once("files/zag.php");
if (
md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {
 
switch(@
$go) {

default:
 
echo
"<small>
     <a href="
userquest.php?log=$log&amp;pas=$pas&amp;go=active">Активные</a><br/>
     <a href="
userquest.php?log=$log&amp;pas=$pas&amp;go=complete">Завершенные</a>
     </small>"
;
 
break;
 
case 
'active':
 
$file = @file("data/userquest/$log.dat");
$total count($file);

for (
$i 0$i $total$i++){
$data explode("||",$file[$i]);

if(
$data[2]=="active"){

$data_0[]=$data[0];
}} 
 
if(empty(
$data_0)){echo"<small>Нет активных квестов.</small>"; include_once"files/down.php"; exit;}

foreach(
$data_0 as $k=>$v)
{
$dat_screen[]="<small>$data_0[$k]</small><br/>";
}


$total count($dat_screen);


if (empty(
$_GET['start'])) $start 0;
else 
$start $_GET['start'];
if (
$total $start 10){ $end $total; }
else {
$end $start 10; }
for (
$i $start$i $end$i++){

echo
"$dat_screen[$i]";

}


if (
$start !== 0) {echo '<small><a href="userquest.php?start='.($start 10).'&amp;log='.$log.'&amp;pas='.$pas.'&amp;go=active">&#x41D;&#x430;&#x437;&#x430;&#x434;</a> </small>';}
if (
$total $start 10) {echo '<small> <a href="userquest.php?start='.($start 10).'&amp;log='.$log.'&amp;pas='.$pas.'&amp;go=active">&#x414;&#x430;&#x43B;&#x435;&#x435;</a></small>';}

break;

case 
'complete':
 
$file = @file("data/userquest/$log.dat");
$total count($file);

for (
$i 0$i $total$i++){
$data explode("||",$file[$i]);

if(
$data[2]=="completeok"){

$data_0[]=$data[0];
}} 
 
if(empty(
$data_0)){echo"<small>Нет завершенных квестов.</small>"; include_once"files/down.php"; exit;}

foreach(
$data_0 as $k=>$v)
{
$dat_screen[]="<small>$data_0[$k]</small><br/>";
}


$total count($dat_screen);


if (empty(
$_GET['start'])) $start 0;
else 
$start $_GET['start'];
if (
$total $start 10){ $end $total; }
else {
$end $start 10; }
for (
$i $start$i $end$i++){

echo
"$dat_screen[$i]";

}


if (
$start !== 0) {echo '<small><a href="userquest.php?start='.($start 10).'&amp;log='.$log.'&amp;pas='.$pas.'&amp;go=active">&#x41D;&#x430;&#x437;&#x430;&#x434;</a> </small>';}
if (
$total $start 10) {echo '<small> <a href="userquest.php?start='.($start 10).'&amp;log='.$log.'&amp;pas='.$pas.'&amp;go=active">&#x414;&#x430;&#x43B;&#x435;&#x435;</a></small>';}

break;
}
}else{echo
"<small>&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x438;&#x43B;&#x438; &#x43B;&#x43E;&#x433;&#x438;&#x43D; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x435;&#x43D;!</small>";}

include_once
"files/down.php";
?>
Онлайн: 2
Реклама