toplist script in.php error please fix it

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    toplist script in.php error please fix it

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

            
        
    ?>
    Last edited by arnage; 19.11.12, 18:36.

    #2
    here's a fixed version:
    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


      #3
      try putting:

      PHP Code:
      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

      Comment


        #4
        still showing blank page

        Originally posted by something else View Post
        try putting:

        PHP Code:
        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

        Comment


          #5
          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)) 
                          { 
                             
                              
          $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...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment

          Working...
          X