toplist script in.php error please fix it

Started on the old forum in November 2012 · view the original in the archive · old links redirect here

4 replies · 601 views · started 14 years ago · 1 min read

3 participants
shohel Junior · 19 posts #1
<?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/");

		
	
?>
something else Fellow · 2,296 posts #2

here's a fixed version:

<?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/");
*/

?>
something else Fellow · 2,296 posts #3

try putting:

error_reporting  (E_ALL);
ini_set ('display_errors', true);

at the top of the page (on your original page) to see what error it gives you

shohel Junior · 19 posts #4

still showing blank page

something else wrote: try putting:

error_reporting  (E_ALL);
ini_set ('display_errors', true);

at the top of the page (on your original page) to see what error it gives you

its showing blank page again

subzero Super moderator Fellow · 3,954 posts #5
<?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)) 
                { 
                   
                    $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/"); 

         
     
?>

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close