Help to see the next PHP file, no effect, do not know where the wrong

Source: Internet
Author: User
Help to see the next PHP file, no effect, do not know where the wrong
Accessed via http://127.0.0.1/index.php?id=2, the following is the code for index.php
The database is properly architected. However, there is no access to the database after the
This file is a generalized php file, which is accessed by the above address will increase the user's score of UID 2. Please help to see what is wrong, first thank you
PHP Code
  
  GetOne ("Select * from ' #@__homepageset '"); $row [' templet '] = Mftemplet ($row [' Templet ']); $PV = new Partview (); $PV Settemplet ($cfg _basedir. $cfg _templets_dir. "/" . $row [' Templet ']); $PV->display ();} To detect whether you are using the 2else{//, brackets to detect whether you are promoting, brackets 3//detect IP start//*************************************************if ($_server[" Http_x_forwarded_for "]) {if ($_server[" Http_client_ip ") {$proxy = $_server[" Http_client_ip "];} else {$proxy = $_server ["REMOTE_ADDR"];} $ip = $_server["Http_x_forwarded_for"];} else {if ($_server["Http_client_ip"]) {$ip = $_server["Http_client_ip"];} else {$ip = $_server["REMOTE_ADDR"];}} Detect IP End//*************************************************if (isset ($proxy)) {//Determine if there is a proxy IP, bracket 1ShowMsg ("Do not use proxy IP  ! ", ' index.php '); Detected using proxy IP hint, end}//detected using proxy IP hint, bracket 2else//to determine if there is proxy IP otherwise execute {//To determine if there is a proxy IP, parentheses 3//write data start $sql = "SELECT * FROM #@__tgreg wher E username= ' $u ' "; Read Tgreg data sheet, condition userid= URL ID?  =*** $NIC _arcrow = $dsql->getone ($sql);   Conditions of establishment, a data $userid = $NIC _arcrow[' userid '); Output Tgreg numberAccording to the username value in the table $username = $NIC _arcrow[' username ']; Output Tgreg username value in data table $row = $dsql->getone ("select * from ' #@__tgip ' where userid= ' $userid ' or username= ' $username ' and TGIP like ' $ip ');//Read data, detect IP use if (Is_array ($row))//Detect duplicates perform the following {//Detect duplicates Execute the following brackets 1 header (' location:index.ph    P ');//Detect duplicate IP to execute jump index.php exit (); }//detection repeats the execution of the following brackets 2 End if (empty ($username))//detect user empty, jump index.php{//detect user empty brackets 1 header (' location:index.php ');//Jump INDEX.P Hpexit;} Detect the user empty parenthesis 2 end $TGIP = $IP;//define the IP address obtained at the time of the =time ();//Get the current $lailu =$_server[' http_referer '];//get the antecedents $query = "INSERT INTO ' #@__tgip ' (userid, username, time, TGIP, Lailu) VALUES (' $userid ', ' $username ', ' $time ', ' $ip ', ' $lailu '); ";//write Data//write Data End if ($dsql->executenonequery ($query))//detect write on {//detect there is write on bracket 1//reserved here to write a sentence to get the background settings of the number, to Jifena use after the manual  The $jifena = 100; Manual Setup Jifena recommended an increase in how many points//reserved $jifenb =100;//settings Jifenb recommend an increase in how many points//$dsql->executenonequery ("Update ' #@__member ' set ' Scores ' = scores + $jifena where mid= ' ". $userid." '//sql Execute Write user bonus points//above This example directly update user data plus 100 points, update user table Member//die ($dsql); $dsql->executenonequery ("Update ' #@__tgreg ' Set ' Jifena ' =jifena + $jifena, ' Cishu ' =cishu+1 where userid= ' ". $userid." ' and Username= ' ". $username." ' ");//sql perform write user bonus points//above this sentence update promotion person's integral system Jifena class. Note the distinction between Class A and Class B user tables tgreg//$dsql->executenonequery ("Update ' #@__tgreg ' set ' jifenb ' = Jifenb + $jifenb where userid= '". $ UserID. "' and Username= '". $username. "' //sql perform write user bonus points//reserved above this sentence update promotion person's integral system Jifenb class. Note the distinction between Class A and Class B user tables Tgreg header (' location:index.php ');//After the write also to jump the}//detection has written in brackets 2 exit ();//Detect duplicate IP exit}//determine if there is proxy IP junction Bundle, bracket 4}//detect whether to use the U extension end, brackets 4//----------------------}//detect whether to use ID promotion, brackets 2else{//detect whether to use ID promotion, brackets 3//----------------------/ /below are the ID promotion section//Detect IP start//*************************************************if ($_server["Http_x_forwarded_for"]) {if ( $_server["Http_client_ip"]) {$proxy = $_server["Http_client_ip"];} else {$proxy = $_server["REMOTE_ADDR"];} $ip = $_server["Http_x_forwarded_for"];} else {if ($_server["Http_client_ip"]) {$ip = $_server["Http_client_ip"];} else {$ip = $_server["REMOTE_ADDR"];}} Detect IP End//*************************************************if (isset ($proxy)) {//Determine if there is a proxy IP, bracket 1ShowMsg ("Do not use proxy IP  ! ", ' index.php '); Detected using proxy IP hint, end}//detected using proxy IP hint, bracket 2else//to determine if there is proxy IP otherwise execute {//To determine if there is a proxy IP, parentheses 3//write data start $sql = "SELECT * FROM #@__tgreg wher E userid= ' $id ' "; Read Tgreg data sheet, condition userid= URL ID?  =*** $NIC _arcrow = $dsql->getone ($sql);   Conditions of establishment, a data $userid = $NIC _arcrow[' userid ');   Output Tgreg Username value in the data table $username = $NIC _arcrow[' username ']; Output Tgreg username value in data table $row = $dsql->getone ("select * from ' #@__tgip ' where userid= ' $userid ' or username= ' $username ' and TGIP like ' $ip ');//Read data, detect IP use if (Is_array ($row))//Detect duplicates Execute the following {//Detect duplicates Execute the following brackets 1 showmsg ("Repeat ip!", ' index.php?i          D=3 ');    Header (' location:index.php ');//Detect duplicate IP to execute jump index.php exit (); }//detection repeats the execution of the following brackets 2 End if (empty ($username))//detect user empty, jump index.php{//detect user empty brackets 1 header (' location:index.php ');//Jump INDEX.P Hpexit;} Detect user Empty brackets 2 end $tgip = $ip;Define the acquired IP address at-------()//Get the current time $lailu =$_server[' http_referer '];//get the antecedents $query = "INSERT INTO ' #@__tgip ' (userid, Username, time, TGIP, Lailu) VALUES (' $userid ', ' $username ', ' $time ', ' $ip ', ' $lailu '); ";//write Data//write Data End if ($dsql->executenonequery ($query))//detect write on {//detect there is write on bracket 1//reserved here to write a sentence to get the background settings of the number, to Jifena use after the manual  The $jifena = 100; Manual Setup Jifena recommended an increase in how many points//reserved $jifenb =100;//settings Jifenb recommend an increase in how many points//$dsql->executenonequery ("Update ' #@__member ' set ' Scores ' = scores + $jifena where mid= ' ". $userid." ' //sql Execute Write user bonus points//above This example directly update user data plus 100 points, update user table Member//die ($dsql); $dsql->executenonequery ("Update ' #@__tgreg ' Set ' Jifena ' =jifena + $jifena, ' Cishu ' =cishu+1 where userid= ' ". $userid." ' and Username= ' ". $username." ' ");//sql perform write user bonus points//above this sentence update promotion person's integral system Jifena class. Note the distinction between Class A and Class B user tables tgreg//$dsql->executenonequery ("Update ' #@__tgreg ' set ' jifenb ' = Jifenb + $jifenb where userid= '". $ UserID. "' and Username= '". $username. "' //sql perform write user bonus points//reserved above this sentence update promotion person's integral system Jifenb class. Note the distinction between Class A and Class B user tables Tgreg header (' LOcation:index.php ');//write to jump after}//detection has written in brackets 2 exit ();//Detect duplicate IP exit}//to determine if there is a proxy IP end, brackets 4}//detect whether to use ID promotion end, brackets 4?> 
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.