PHP Code:
<?php
///////////////b-o-h-e-m-i-a/////////
//////////////wapadmin.info////////
///////n is lucky for me/////////
include 'config.inc.php';
error_reporting(0);
include 'functions.inc.php';
require('top.php');
//---------------------------------------------------------------
ini_set ('session.use_cookies', 0);
ini_set ('session.use_trans_sid', 1);
session_name('sid');
session_start();
connect_to_db();
//---------------------------------------------------------------
include "config.php";
$today = date("Ymd");
@mysql_query("UPDATE weeks,users SET weeks.cat=users.cat WHERE weeks.uid=users.uid");
$res=mysql_query("SELECT count(`cat`) FROM `weeks` WHERE `host` > 0 and `date`=$today");
$cnt = mysql_fetch_row($res);
$c = $cnt[0];
?>
<?
//Check input page
if (empty($_GET['p'])) $page = 1;
else {$page=$_GET['p'];
}
//Check input id
if (!empty($_GET['uid']))
{
$uid=(int)$_GET['uid'];
$uid=@mysql_escape_string($uid);
// Check for your account
$result = mysql_query("SELECT site_name,link,admin,info,cat FROM users WHERE uid=$uid");
$row=mysql_fetch_array($result);
if (!empty($row))
{
//===================== It
$week_day = date("w");
$today = date("Ymd");
// Count
$result = mysql_query("SELECT `in` FROM `weeks` WHERE `date`=$today AND `uid`=$uid LIMIT 1");
$row=mysql_fetch_array($result);
if (empty($row))
{
$dayNext =$week_day + 7;
if ($dayNext > 7){
$dayNext-=7;
}
$cntDay=8-$dayNext;
$nextMonday=date("Ymd",mktime(0,0,0,date("m"),date("d")+$cntDay));
@mysql_query("INSERT INTO `weeks` VALUES ('',$uid,$nextMonday,$today,$week_day,0,0,0,0)");
$in_count = 0;
} else{
$in_count = $row['in'];
}
$in_count++;
// Save
@mysql_query("UPDATE `weeks` SET `in`=$in_count WHERE `date`=$today AND `uid`=$uid LIMIT 1");
$today = date("Ymd");
$hour = date("H");
}
}
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: http://$host$uri/");
?>
Comment