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

Размер файла: 1.85Kb
<?php
$title="Ваши покупки\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")));

if(empty($_GET['o']) or $_GET['o'] <= 0)
{
	$o = 0;
}
else
{
	$o = (int) $_GET['o'];
}
$limit = $o*15;


if(isset($_GET['id']))
{	
	$id = (int) $_GET['id'];
	mysql_query("DELETE FROM `cclub_nomera` WHERE `whopay`='$_USER[id]' and `stats`='0' and `id`='$id' ");
}

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


$sql = mysql_query("SELECT * FROM `cclub_nomera` WHERE `whopay`='$_USER[id]' and `stats`='0' ORDER BY `znak` DESC limit $limit,15");

if($kol_s[0] == 0)
{
	echo("---<br/>В данной момент вы еще ничего не купили.<br />\n");
}
echo "<div class='header_rek'>Мои покупки:</div>".
	"Номер [стоймость] (Пароль)<br/>---<br/>";
while($sa = mysql_fetch_array($sql))
{
	$ccena =  $sa['cena'];
	$nnomer = $sa['nomer'];
	$kurs =  $sa['kurs'];
	$id = (int) $sa['id'];
	$prod = $sa['login'];
	$pass = $sa['pass'];
	echo "
	<img src='/images/icq.gif' alt='+' /></a>
	$nnomer</a> - $ccena кред. ($pass)<a href='my_pay.php".$_zapros."id=$id'>[del]</a><br/>\n";
}

echo '<br/>---<br/>';

if($o != 0)
	echo '<a href="my_pay.php'.$_zapros.'o='.($o-1).'">Назад</a>';
else
	echo 'Назад';

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

if($kol > ($o+1))
	echo ' <a href="my_pay.php'.$_zapros.'o='.($o+1).'">Далее</a>';
else
	echo ' Далее';

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