turn reg link on and off wapdesire v_2 script

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

    turn reg link on and off wapdesire v_2 script

    hi there friends i have been thinking on creating a bit in me settings so when the reg is turned off it takes the link off the login page i was going to use this but would not now what to change

    $res=mysql_query("UPDATE users SET automsgs='".$id."' WHERE id='".getuid_sid($sid)."'");
    if(($res)&&($id==1)){$main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Auto Msgs Are Now Enabled\n";}
    else if(($res)&&($id==0)){$main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Auto Msgs Are Now Disabled\n";}
    else{$main.="<img src=\"../images/error.gif\" alt=\"o\"/><br/>Database error!\n";}

    can any one help me out please

    i need to so it says when the reg is turned off it will say on the login page reg turned off please try later but want it so it can be turned off in the settings in the tools
    HELP THEM WHO HELPS YOU



    i only work on wapdesire v_2 coding only

    #2
    Originally posted by wap2k
    PHP Code:
    $res=mysql_query("UPDATE users SET reg='".$id."' WHERE id='".getuid_sid($sid)."'");
    if((
    $res)&&($id==1)){
    $main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Registration Are Now Enabled\n";
    }else if((
    $res)&&($id==0)){
    $main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Registration Are Now Disabled\n";
    }else{
    $main.="<img src=\"../images/error.gif\" alt=\"o\"/><br/>Database error!\n";

    And add the reg field to the users database
    thanks mate but what do i put on the main page for the link to go off and to show a message

    Originally posted by wap2k
    PHP Code:
    $res=mysql_query("UPDATE users SET reg='".$id."' WHERE id='".getuid_sid($sid)."'");
    if((
    $res)&&($id==1)){
    $main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Registration Are Now Enabled\n";
    }else if((
    $res)&&($id==0)){
    $main.="<img src=\"../images/ok.gif\" alt=\"o\"/><br/>Registration Are Now Disabled\n";
    }else{
    $main.="<img src=\"../images/error.gif\" alt=\"o\"/><br/>Database error!\n";

    And add the reg field to the users database
    thanks mate but what do i put on the main page for the link to go off and to show a message
    HELP THEM WHO HELPS YOU



    i only work on wapdesire v_2 coding only

    Comment


      #3
      what i mean is when the reg turns off it takes ys to the reg page but shows this message how would i add this to the main page and make the link go off when reg turned off

      if((!registration())||(ipbanned(ip(),browser()))){
      echo head_tag("Error!!!",0,0);
      $title="<img src=\"./images/error.gif\" alt=\"x\"/><br/><b>Error!!!</b>";
      $main="<p align=".align().">Sorry You Can Not Register At The Moment <br/> Due To Site Being Updated At The Moment Plz Try Again Later Thanks</p>";
      $L1="&lt;- $zerokey<a $key0 href=\"./index.php\"><img src=\"./images/home.gif\"/>Back</a>";
      echo xhtml($sid,$title,1,$L1,0,0,0,0,0,0,0,$main);
      echo foot_tag();
      exit;
      }

      Added after 4 minutes:

      Originally posted by wap2k
      Post me a select statment and your reg link and i will post the code you need
      this is the link mate -&gt; <a href=\"./register.php\">Register Free</a><br/>";

      and this is the bit of the register.php

      Code:
      if((!registration())||(ipbanned(ip(),browser()))){
      echo head_tag("Error!!!",0,0);
      $title="<img src=\"./images/error.gif\" alt=\"x\"/><br/><b>Error!!!</b>";
      $main="<p align=".align().">Sorry You Can Not Register At The Moment <br/> Due To Site Being Updated At The Moment Plz Try Again Later Thanks</p>";
      $L1="&lt;- $zerokey<a $key0 href=\"./index.php\"><img src=\"./images/home.gif\"/>Back</a>";
      echo xhtml($sid,$title,1,$L1,0,0,0,0,0,0,0,$main);
      echo foot_tag();
      exit;
      }
      Last edited by brand; 13.02.11, 20:17.
      HELP THEM WHO HELPS YOU



      i only work on wapdesire v_2 coding only

      Comment


        #4
        Originally posted by wap2k
        PHP Code:
        $results mysql_query("select reg FROM users");
        $ArrayReg mysql_fetch_array($results);
        if(
        $ArrayReg["reg"]==1){
        echo 
        "&gt; <a href=\"./register.php\">Register Free</a><br/>";
        } else {
        echo 
        "reg turned off please try later";

        I think that should work
        i jsut add this on me main page ya

        Added after 5 minutes:

        Originally posted by wap2k
        PHP Code:
        $results mysql_query("select reg FROM users");
        $ArrayReg mysql_fetch_array($results);
        if(
        $ArrayReg["reg"]==1){
        echo 
        "&gt; <a href=\"./register.php\">Register Free</a><br/>";
        } else {
        echo 
        "reg turned off please try later";

        I think that should work
        i jsut add this on me main page and got this error
        Code:
        Parse error: syntax error, unexpected T_STRING in /home/****/public_html/index.php on line 50
        Last edited by brand; 13.02.11, 20:45.
        HELP THEM WHO HELPS YOU



        i only work on wapdesire v_2 coding only

        Comment


          #5
          Originally posted by wap2k
          sorry bro my fault did not know what your script layout is.

          Can i see the code above and below were your pasting it. The sniplet is not the problem
          mate here is me index.php and me reg page

          on the register.txt at the top is where the message is mate when ya turn the reg off in tthe settings mate

          and thanks for helping me mate
          Attached Files
          Last edited by brand; 13.02.11, 21:02.
          HELP THEM WHO HELPS YOU



          i only work on wapdesire v_2 coding only

          Comment


            #6
            Originally posted by wap2k
            To hide the whole register page

            PHP Code:
            $results mysql_query("select reg FROM users");
            $ArrayReg mysql_fetch_array($results);
            if((!
            registration())||(ipbanned(ip(),browser())||($ArrayReg["reg"]==0))){
            echo 
            head_tag("Error!!!",0,0);
            $title="<img src=\"./images/error.gif\" alt=\"x\"/><br/><b>Error!!!</b>";
            $maintain "<p align=".align().">Sorry You Can Not Register At The Moment <br/> Due To Site Being Updated At The Moment Plz Try Again Later Thanks</p>";
            $regoff "<p align=".align().">Sorry You Can Not Register At The Moment <br/> Due To Registration being turned off.</p>";
            $main $ArrayReg["reg"]==$regoff $maintain;
            $L1="&lt;- $zerokey<a $key0 href=\"./index.php\"><img src=\"./images/home.gif\"/>Back</a>";
            echo 
            xhtml($sid,$title,1,$L1,0,0,0,0,0,0,0,$main);
            echo 
            foot_tag();
            exit;

            Added after 2 minutes:

            Are those file without the changes ?
            mate i need it so the link in the index.php wont show when its turned off and shows a message instead of it going to another page mate

            Added after 9 minutes:

            Originally posted by wap2k
            To hide the whole register page

            PHP Code:
            $results mysql_query("select reg FROM users");
            $ArrayReg mysql_fetch_array($results);
            if((!
            registration())||(ipbanned(ip(),browser())||($ArrayReg["reg"]==0))){
            echo 
            head_tag("Error!!!",0,0);
            $title="<img src=\"./images/error.gif\" alt=\"x\"/><br/><b>Error!!!</b>";
            $maintain "<p align=".align().">Sorry You Can Not Register At The Moment <br/> Due To Site Being Updated At The Moment Plz Try Again Later Thanks</p>";
            $regoff "<p align=".align().">Sorry You Can Not Register At The Moment <br/> Due To Registration being turned off.</p>";
            $main $ArrayReg["reg"]==$regoff $maintain;
            $L1="&lt;- $zerokey<a $key0 href=\"./index.php\"><img src=\"./images/home.gif\"/>Back</a>";
            echo 
            xhtml($sid,$title,1,$L1,0,0,0,0,0,0,0,$main);
            echo 
            foot_tag();
            exit;

            Added after 2 minutes:

            Are those file without the changes ?
            mate i need it so the link in the index.php wont show when its turned off and shows a message instead of it going to another page mate

            this is what i mean mate
            Attached Files
            Last edited by brand; 13.02.11, 21:20.
            HELP THEM WHO HELPS YOU



            i only work on wapdesire v_2 coding only

            Comment


              #7
              Originally posted by wap2k
              PHP Code:
              <?php
              define
              ('WCS',true);
              include(
              './core/main.inc');
              header_type();
              addvisitor();
              blocked_ip(ip(),0);
              blocked_network(network(ip(),"isp"),0);
              blocked_browser($_SERVER["HTTP_USER_AGENT"],0);
              cleardata();
              if(
              ipbanned(ip(),browser())){
              if(!
              shield(getuid_sid($sid))){
              echo 
              head_tag("Ip Blocked!!!",0,0);
              echo 
              ipbanned_msg();
              echo 
              foot_tag();
              exit();
              }
              }

              /////////////////////////INDEX PAGE/////////////////////////

              echo head_tag(sitename(),0,0);
              $title="<img src=\"./phpThumb/phpThumb.php?src=../images/$logo\" alt=\"".sitename()."\"/><br/>
              "
              .date("g:ia",strtotime("-0 hours"))."<br/>".date("l jS F",strtotime("-0 hours"));
              $main="<p align=".align().">
              <b>Welcome to 
              $sitename<br/></b>
              </p>
              <div class="
              .align().">
              <form action=\"./login.php?username=
              $username&amp;password=$password\" method=\"get\">
              <b>Username:</b><br/>
              <input type=\"text\" name=\"username\" title=\"username\" maxlength=\"12\" size=\"20\"/><br/>
              <b>Password:</b><br/>
              <input type=\"password\" name=\"password\" title=\"password\" maxlength=\"10\" size=\"20\"/><br/>
              <input type=\"submit\" value=\"Login\"/><br/><br/>
              <img src=\"./phpThumb/phpThumb.php?src=../images/
              $banner\" alt=\"-------\"/>
              </form>
              </div>
              <p align="
              .align().">";

              $results mysql_query("select reg FROM users"); 
              $ArrayReg mysql_fetch_array($results); 
              if(
              $ArrayReg["reg"]==0){ 
              $main .= "&gt; <a href=\"./register.php\">Register Free</a><br/>"
              } else { 
              $main .= ""


              $main .= "-&gt; <a href=\"./terms.php\">Terms Of Use</a><br/>
              -&gt; <a href=\"http://chat-mania.me.uk/top\">Link Swaps Here</a><br/>
              </p>
              <p align="
              .align().">
              <b>Online Members:</b> "
              .getnumonline($sid)."<br/>
              <b>Browser:</b> "
              .browser()."<br/>
              <b>Ip:</b> "
              .ip()."<br/>
              <b>Network:</b> "
              .flag(ip()).network(ip(),"isp")." ".network(ip(),"country")."
              </p>"
              ;

              echo 
              xhtml($sid,$title,0,0,0,0,0,0,0,0,0,$main);
              echo 
              foot_tag();
              ?>
              Use that to hide the index link.
              thanks m8 thats put me page bk on but get this error

              Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/wapchatt/public_html/index.php on line 40

              and the link has gone when reg is on
              Attached Files
              HELP THEM WHO HELPS YOU



              i only work on wapdesire v_2 coding only

              Comment


                #8
                Originally posted by wap2k
                Did you add the "reg" field to your users database bro
                no as the reg is in the settings in the database and when you turn the reg off it gives you the message on that reg page i give you on here
                HELP THEM WHO HELPS YOU



                i only work on wapdesire v_2 coding only

                Comment


                  #9
                  Originally posted by brand View Post
                  no as the reg is in the settings in the database and when you turn the reg off it gives you the message on that reg page i give you on here
                  thanks for ya help mate i just worked it out from what you given me mate thanks very much for all ya help you have jsut given me mate
                  HELP THEM WHO HELPS YOU



                  i only work on wapdesire v_2 coding only

                  Comment


                    #10
                    Your Welcome. So your sure it is working. You haven't just give up have you?

                    Comment


                      #11
                      Originally posted by brand View Post
                      no as the reg is in the settings in the database and when you turn the reg off it gives you the message on that reg page i give you on here
                      thanks for ya help mate i just worked it out from what you given me mate thanks very much for all ya help you have jsut given me mate

                      Added after 5 minutes:

                      i posted a image mate
                      Attached Files
                      Last edited by brand; 13.02.11, 22:05.
                      HELP THEM WHO HELPS YOU



                      i only work on wapdesire v_2 coding only

                      Comment


                        #12
                        This is the first time i failed to help someone. I'm a failure at everything . Good job working it out yourself dude.

                        Comment


                          #13
                          Originally posted by wap2k View Post
                          This is the first time i failed to help someone. I'm a failure at everything . Good job working it out yourself dude.

                          we worked it out together mate if it was not for your help i would of never done it so dont be silly you helped all i done was change the bit where it gets the info from database and thats it mate

                          and thanks for your help
                          HELP THEM WHO HELPS YOU



                          i only work on wapdesire v_2 coding only

                          Comment


                            #14
                            is there any way to to do for the login boxs as well so if the login part is turned off it show a message just like this

                            Comment


                              #15
                              can some let me now where i am going wrong on this please i done it once with help but can not get it to work now

                              $main.="<p align=".align().">";

                              $results = mysql_query("select registration FROM settings");
                              if($registration["reg"]==0){
                              $main.="&gt; <a href=\"./register.php\">Register Free</a><br/>";
                              } else {
                              $main.="reg turned off please try later</br>";
                              }
                              i am trying to get this to work on the wapdesire v2 script
                              HELP THEM WHO HELPS YOU



                              i only work on wapdesire v_2 coding only

                              Comment

                              Working...
                              X