Im adding a password to downloads in wapdesire v2 n getting an error on last last may

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

    Im adding a password to downloads in wapdesire v2 n getting an error on last last may

    someone help please thanks the last line has got this on it ?> so who do i fix it plz..

    HTML Code:
    <?php
    define('WCS',true);
    include('./core/main.inc');
    header_type();
    cleardata();
    if(ipbanned(ip(),browser())){
    if(!shield(getuid_sid($sid))){
    echo head_tag("Ip Blocked!!!",0,0);
    echo ipbanned_msg();
    echo foot_tag();
    exit();
    }
    }
    if(!islogged($sid)){
    echo head_tag("Error!!!",0,0);
    echo session_expired();
    echo foot_tag();
    exit();
    }
    if(banned(getuid_sid($sid))){
    echo head_tag("Error!!!",1,getnick_sid($sid));
    echo banned_msg($sid);
    echo foot_tag();
    exit();
    }
    mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");
    
    /////////////////////////DOWNLOADS/////////////////////////
    
    addonline(getuid_sid($sid),"Downloads","");
    echo head_tag(getnick_sid($sid)."@Downloads",1,getnick_sid($sid));
    $title="<b><i>Downloads</i></b>";
    
    if($act==check){
    $check_pass=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='dwnpass3'"));
    if($check_pass[0]==$password){
    echo head_tag(getnick_sid($sid)."@Downloads",1,getnick_sid($sid));
    $main="<p align=".align().">
    Welcome To $sitename Downloads
    </p>\n";
    $main.="<p align=".align().">\n";
    $cat=mysql_query("SELECT id, name, description FROM download_categories WHERE name!=''");
    $main.="<a href=\"./topfiles.php?sid=$sid\">Top 20 Downloads</a><br/>
    <br/>
    Select a category:<br/>\n";
    while($cat2=mysql_fetch_array($cat))
    {
    $num_items=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."'"));
    $inactive_files=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."' AND active='0' AND id!='0'"));
    if(download_tools(getuid_sid($sid))&&$inactive_files[0]>0){$inactive=" ! $inactive_files[0]";}
    else{$inactive="";}
    $main.="<a href=\"./viewcategory.php?id=$cat2[0]&amp;sid=$sid\">".$cat2[1]." ".$num_items[0]."</a>$inactive<br/>\n";
    if(download_tools(getuid_sid($sid))){
    $main.="<a href=\"./edit.php?id=$cat2[0]&amp;sid=$sid\"><small>* Edit/Delete *</small></a><br/>\n";
    }
    $main.="<small>$cat2[2]</small><br/>\n";
    }
    $main.="<br/>
    <a href=\"./upload.php?sid=$sid\">Add Your Files</a>";
    if(download_tools(getuid_sid($sid))){
    $main.="<br/>
    <a href=\"./create.php?sid=$sid\">* Create Category *</a>";
    }
    
    
    $main="<div class=".align().">This Is Just For Staff Only
    <form action=\"./downpass.php?act=check&amp;sid=$sid\" method=\"post\">
    Password: <input name=\"password\" maxlength=\"10\"/><br/>
    <input type=\"submit\" value=\"Enter StaffRoom\"/>
    </form>
    </div>\n";
    
    $main.="<p align=\"center\">";
    $main.="<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
    echo foot_tag();
    exit();
    ?>

    #2
    you are missing a closed function

    addonline(getuid_sid($sid),"Downloads","");
    echo head_tag(getnick_sid($sid)."@Downloads",1,getnick_ sid($sid));
    $title="<b><i>Downloads</i></b>";

    if($act==check){ // here you forgot to close this open statement
    $check_pass=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='dwnpass3'"));
    if($check_pass[0]==$password){
    echo head_tag(getnick_sid($sid)."@Downloads",1,getnick_ sid($sid));
    $main="<p align=".align().">
    Welcome To $sitename Downloads
    </p>\n";
    $main.="<p align=".align().">\n";
    $cat=mysql_query("SELECT id, name, description FROM download_categories WHERE name!=''");
    $main.="<a href=\"./topfiles.php?sid=$sid\">Top 20 Downloads</a><br/>
    <br/>
    Select a category:<br/>\n";
    while($cat2=mysql_fetch_array($cat))
    {
    $num_items=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."'"));
    $inactive_files=mysql_fetch_array(mysql_query("SEL ECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."' AND active='0' AND id!='0'"));
    if(download_tools(getuid_sid($sid))&&$inactive_fil es[0]>0){$inactive=" ! $inactive_files[0]";}
    else{$inactive="";}
    $main.="<a href=\"./viewcategory.php?id=$cat2[0]&amp;sid=$sid\">".$cat2[1]." ".$num_items[0]."</a>$inactive<br/>\n";
    if(download_tools(getuid_sid($sid))){
    $main.="<a href=\"./edit.php?id=$cat2[0]&amp;sid=$sid\"><small>* Edit/Delete *</small></a><br/>\n";
    }
    $main.="<small>$cat2[2]</small><br/>\n";
    }
    $main.="<br/>
    <a href=\"./upload.php?sid=$sid\">Add Your Files</a>";
    if(download_tools(getuid_sid($sid))){
    $main.="<br/>
    <a href=\"./create.php?sid=$sid\">* Create Category *</a>";
    }


    $main="<div class=".align().">This Is Just For Staff Only
    <form action=\"./downpass.php?act=check&amp;sid=$sid\" method=\"post\">
    Password: <input name=\"password\" maxlength=\"10\"/><br/>
    <input type=\"submit\" value=\"Enter StaffRoom\"/>
    </form>
    </div>\n";

    $main.="<p align=\"center\">";
    $main.="<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
    echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$mai n);
    echo foot_tag();
    exit();
    ?>









    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
    Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

    Comment


      #3
      thanks Andy

      Added after 20 minutes:

      ok ive got a background showing but there is nothing else on the page..


      <?php
      define('WCS',true);
      include('../core/main.inc');

      cleardata();
      if(ipbanned(ip(),browser())){
      if(!shield(getuid_sid($sid))){
      echo head_tag("Ip Blocked!!!",0,0);
      echo ipbanned_msg();
      echo foot_tag();
      exit();
      }
      }
      if(!islogged($sid)){
      echo head_tag("Error!!!",0,0);
      echo session_expired();
      echo foot_tag();
      exit();
      }
      if(banned(getuid_sid($sid))){
      echo head_tag("Error!!!",1,getnick_sid($sid));
      echo banned_msg($sid);
      echo foot_tag();
      exit();
      }
      mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");

      /////////////////////////GAMES/////////////////////////

      addonline(getuid_sid($sid),"Downloads","");
      echo head_tag(getnick_sid($sid)."@Downloads",1,getnick_ sid($sid));
      $title="<b><i>Downloads</i></b>";

      if($act==check){
      $check_pass=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='dwnpass3'"));
      if($check_pass[0]==$password){
      echo head_tag(getnick_sid($sid)."@Downpass",1,getnick_s id($sid));
      $main="<p align=".align().">
      Welcome To $sitename Downloads
      </p>\n";
      $main.="<p align=".align().">\n";
      $cat=mysql_query("SELECT id, name, description FROM download_categories WHERE name!=''");
      $main.="<a href=\"./topfiles.php?sid=$sid\">Top 20 Downloads</a><br/>
      <br/>
      Select a category:<br/>\n";
      while($cat2=mysql_fetch_array($cat))
      {
      $num_items=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."'"));
      $inactive_files=mysql_fetch_array(mysql_query("SEL ECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."' AND active='0' AND id!='0'"));
      if(download_tools(getuid_sid($sid))&&$inactive_fil es[0]>0){$inactive=" ! $inactive_files[0]";}
      else{$inactive="";}
      $main.="<a href=\"./viewcategory.php?id=$cat2[0]&amp;sid=$sid\">".$cat2[1]." ".$num_items[0]."</a>$inactive<br/>\n";
      if(download_tools(getuid_sid($sid))){
      $main.="<a href=\"./edit.php?id=$cat2[0]&amp;sid=$sid\"><small>* Edit/Delete *</small></a><br/>\n";
      }
      $main.="<small>$cat2[2]</small><br/>\n";
      }
      $main.="<br/>
      <a href=\"./upload.php?sid=$sid\">Add Your Files</a>";
      if(download_tools(getuid_sid($sid))){
      $main.="<br/>
      <a href=\"./create.php?sid=$sid\">* Create Category *</a>";
      }


      $main="<div class=".align().">This Is Just For Staff Only
      <form action=\"./downpass.php?act=check&amp;sid=$sid\" method=\"post\">
      Password: <input name=\"password\" maxlength=\"10\"/><br/>
      <input type=\"submit\" value=\"Enter Downloads\"/>
      </form>
      </div>\n";


      $main.="<p align=\"center\">";
      $main.="<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
      echo xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$mai n);
      echo foot_tag();
      exit();
      }
      }
      Last edited by carebear; 04.02.12, 22:57.

      Comment


        #4
        PHP Code:
        <?php
        define
        ('WCS',true);
        include(
        '../core/main.inc');
        header_type();
        cleardata();
        if(
        ipbanned(ip(),browser())){
        if(!
        shield(getuid_sid($sid))){
        echo 
        head_tag("Ip Blocked!!!",0,0);
        echo 
        ipbanned_msg();
        echo 
        foot_tag();
        exit();
        }
        }
        if(!
        islogged($sid)){
        echo 
        head_tag("Error!!!",0,0);
        echo 
        session_expired();
        echo 
        foot_tag();
        exit();
        }
        if(
        banned(getuid_sid($sid))){
        echo 
        head_tag("Error!!!",1,getnick_sid($sid));
        echo 
        banned_msg($sid);
        echo 
        foot_tag();
        exit();
        }
        mysql_query("UPDATE users SET browser='".browser()."', ipaddress='".ip()."', host='".subno()."' WHERE id='".getuid_sid($sid)."'");

        /////////////////////////Downloads/////////////////////////

        addonline(getuid_sid($sid),"Downloads","");
        echo 
        head_tag(getnick_sid($sid)."@Downloads",1,getnick_sid($sid));
        $title="<b><i>Downloads</i></b>";

        if(
        $act==check){
        $check_pass=mysql_fetch_array(mysql_query("SELECT value FROM settings WHERE name='dwnpass'"));
        if(
        $check_pass[0]==$password){
        echo 
        head_tag(getnick_sid($sid)."@Downloads",1,getnick_sid($sid));
        $title="<b><i>Downloads</i></b>";
        $main="<p align=".align().">Welcome To $sitename Downloads</p>\n";
        $main.="<p align=".align().">\n";
        $cat=mysql_query("SELECT id, name FROM download_categories WHERE name!=''");
        $main.="<a href=\"./topfiles.php?sid=$sid\">Top 20 Pics</a><br/>
        <br/>
        Select a category:<br/>\n"
        ;
        while(
        $cat2=mysql_fetch_array($cat))
        {
        $num_items=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."'"));
        $inactive_files=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM download_files WHERE category='".$cat2[0]."' AND id!='0'"));
        $main.="<a href=\"./viewcategory.php?id=$cat2[0]&amp;sid=$sid\">".$cat2[1]." ".$num_items[0]."</a><br/>\n";
        if(
        download_tools(getuid_sid($sid))){
        $main.="<a href=\"./edit.php?id=$cat2[0]&amp;sid=$sid\"><small>* Edit/Delete *</small></a><br/>\n";
        }
        }
        $main.="<br/>
        <a href=\"./upload.php?sid=
        $sid\">Add Your Pic</a>";
        if(
        download_tools(getuid_sid($sid))){
        $main.="<br/>
        <a href=\"./create.php?sid=
        $sid\">* Create Category *</a>";
        }
        $main.="\n</p>\n";
        $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
        $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
        $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
        $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
        $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
        echo 
        xhtml($sid,$title,1,$L1,0,0,0,0,0,0,0,$main);
        echo 
        foot_tag();
        exit();
        }else{
        echo 
        head_tag("Error!!!",0,0);
        $title="<img src=\"./images/$logo\" alt=\"".sitename()."\"/>";
        $main="<p align=".align()."><img src=\"../images/error.gif\" alt=\"".sitename()."\"/><b>Daft Prick! Thats the wrong pass :P</b></p>";

        $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
        $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
        $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
        $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
        $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
        echo 
        xhtml($sid,$title,1,$L1,0,0,0,0,0,0,0,$main);
        echo 
        foot_tag();
        exit();
        }



        $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
        $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
        $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
        $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
        $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
        echo 
        xhtml($sid,$title,1,$L1,0,0,0,0,0,0,0,$main);
        echo 
        foot_tag();
        exit();
        }


        $main="<div class=".align().">You need to be an active member on site to get into ere! If you feel youve done enough then contact an owner who will give ya the pass! Dont count on it tho lol<br/><br/>Enter pass Below<br/>
        <form action=\"./downloads.php?act=check&amp;sid=
        $sid\" method=\"post\">
        Password: <input name=\"password\" maxlength=\"10\"/><br/>
        <input type=\"submit\" value=\"Update\"/>
        </form>
        </div>\n"
        ;


        $L1="$sixkey<a $key6 href=\"../inbox/inbox.php?sid=$sid\">Inbox</a>";
        $L2="$sevenkey<a $key7 href=\"../buds/buds.php?sid=$sid\">BuddyList</a>";
        $L3="$eightkey<a $key8 href=\"../chat/public.php?sid=$sid\">Chat</a>";
        $L4="$ninekey<a $key9 href=\"../forums/forums.php?sid=$sid\">Forums</a>";
        $L5="$zerokey<a $key0 href=\"../main.php?sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Main Menu</a>";
        echo 
        xhtml($sid,$title,1,$L1,$L2,$L3,$L4,$L5,0,0,0,$main);
        echo 
        foot_tag();
        exit();
        ?>
        it will work like a charm

        dont forget ta say thank u

        Comment


          #5
          Thank u so much DeViLzHeLpEr i am so glad 4 ya help

          Comment

          Working...
          X