Просмотр файла clikus/nomera.php

Размер файла: 2.82Kb
<?php

$title="ICQ Магазин\n";

include_once ('config/ini.php');
include_once ('config/function.php');
include_once ('config/header.php');
include_once ('config/connect.php');
include_once ('config/click-club.class.php');
include_once ('config/online.php');
include_once ('config/ban.php');
include_once ('config/panel.php');
@mysql_query("DELETE FROM `".prefix."clicks` WHERE `ts`<".strtotime(date("j F Y")));

$mode = $_GET['mode'];
if(empty($_GET['o']) or $_GET['o'] <= 0)
{
	$o = 0;
}
else
{
	$o = (int) $_GET['o'];
}
$limit = $o*15;
	if($_USER['admin'] and isset($_GET['del']))
	{
		$del = (int) $_GET['del'];
		$nums = mysql_fetch_array(mysql_query("SELECT `nomer` FROM `".prefix."nomera` WHERE `id`='$del'"));
		$_zapros = str_replace("del=$del","",$_zapros);
		echo'Вы уверены что хотите удалить номер '.$nums[0].'<br/> 
		
		<a href="nomera.php'.$_zapros.'del='.$del.'&amp;yes&amp;mode='.$mode.'">Да</a> <a href="nomera.php'.$_zapros.'">Нет</a><br/>';
		
		if(isset($_GET['yes']))
		{
			mysql_query("DELETE FROM `".prefix."nomera` WHERE `id`='$del'");
			header('location: nomera.php'.str_replace("&amp;","&",$_zapros).'mode='.$mode.'');
		}
		$_CONF['index_page']="enter.php".$_zapros;
		include "config/end.php";
		break;
	}


ereg("([6-9]{1})",$_GET['mode'],$pid);
$pid = $pid[0];
$sid = $_GET['sid'];

if(empty($pid)) header("shop.php?sid=$sid");

echo "<div class=\"header_rek\"><b>$pid-знаки</b></div>";

$kol_s = mysql_fetch_array(mysql_query("SELECT count(`id`) FROM `cclub_nomera` WHERE `znak` = $pid and `stats`<>'0'"));
	$kol = ceil($kol_s[0]/15);


$sql = mysql_query("SELECT * FROM `cclub_nomera` WHERE `znak` = $pid and `stats`<>'0' ORDER BY `id` DESC limit $limit,15");
if($kol_s[0] == 0)
{
echo("---<br/>В данной категории номеров пока нет.<br/>\n");
}
echo "Номер [стоймость]<br/>";
while($sa = mysql_fetch_array($sql))
{
	$ccena =  $sa['cena'];
	$nnomer = $sa['nomer'];
	$kurs =  $sa['kurs'];
	$id = (int) $sa['id'];
	$prod = $sa['login'];

	echo "---<br/>";
	echo "<img src='/images/icq.gif' alt='+' /></a>";
	echo "<a href='anknom.php".$_zapros."id=$id'>$nnomer</a> - $ccena кред.";
	if($_USER['admin'])
	{
			echo'[<a href="nomera.php'.$_zapros.'del='.$id.'&mode='.$mode.'">del</a>]';
	}
	echo "<br/>\n";
}

if($_USER['admin'])
{
	echo'---<br/>';
	echo'+<a/><a href="enter.php'.$_zapros.'mode=admin&amp;smode=icqadmin">Добавить icq</a><br/>';
}

echo "---<br/>";

if($o != 0)
	echo '<a href="nomera.php'.$_zapros.'o='.($o-1).'&amp;mode='.$_GET['mode'].'">Назад</a>';
else
	echo 'Назад';

if($o != 0)
	echo '</a>';
else
	echo ' | ';

if($kol > ($o+1))
	echo ' <a href="nomera.php'.$_zapros.'o='.($o+1).'&amp;mode='.$_GET['mode'].'">Далее</a>';
else
	echo ' Далее';
	
	

include_once ('config/end.php');
//make for clikus.ru
//Admin icq 915317
?>