Web Analytics Made Easy -
StatCounter Php Act= Page, Nothing Shows - CodingForum

Announcement

Collapse
No announcement yet.

Php Act= Page, Nothing Shows

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

  • Php Act= Page, Nothing Shows

    Im making an act= page for my forum. It is for my rpg mod and i have all the links for my rpg mod in that page. But everytime i try to go to the url of the page it is blank. The attached file is what i have done. And i also did an edit in the index.php name
    Code:
    'rpgindex.php => 'rpgindex.php'
    Is there somethign wrong with my edits? Or my coding? How come i keep getting a blank page? Can anyone help? Also this mod is for Invision Power Board.


    **NOTE** Attached doc is my work of the mod!!!
    Attached Files

  • #2
    try using $_GET["Act"]

    Comment


    • #3
      Instead of page? Change $page to $_GET["Act"] sry if i sound dumb lol. It i 5am here and im very tired. Been working on trying to get this fixed all night,.

      Comment


      • #4
        Your post confuses me, so I'm not sure what your problem is. Just by going by super kob's reply, if you're wanting to get the value of a variable from a url, eg

        page.php?act=page

        Then you'd get it by using
        PHP Code:
        <?php
        $act 
        $_GET['act'];
        // rest of code
        ?>
        Last edited by Nightfire; Feb 19, 2004, 05:39 AM.

        Comment


        • #5
          k. Im trying to make a act= page for a bunch of links. All that is going in that page is links. I made the code but when i upload it and everything i go to the url and i get a blank screen.
          http://sharp.gbdhosting.com/KillerTest/index.php?act=rpgindex there is the link to the page. Im asking if you could help me in fixing my code or help me in telling me why i get a blank page. Here is what is in that text document.
          Code:
          SKIN (name= skin_index.php)
          ###################################################################
          <?php
          
          class skin_links {
          
          function render_page($content) {
          global $ibforums;
          return <<<EOF
          <table cellpadding=0 cellspacing='1' border='0' width='100%' align='center'>
          <tr>
          <td width="100%" vAlign=top>
          <center>Killer RPG Links<br><br><br><br> {$content}
          </td>
          </tr>
          </table>
          EOF;
          }
          
          }
          ?>
          
          #######################################################################
          /SOURCES (Name= rpgindex.php)
          #######################################################################
          <?php
          $idx = new links;
          
          class links {
          
          var $output = "";
          var $page_title = "";
          var $nav = array();
          var $html = "";
          
          
          function donate () {
          global $ibforums , $DB , $std , $print;
          
          
          require "./Skin/" . $ibforums -> skin_id . "/skin_index.php";
          
          $this -> html = new skin_links ();
          
          $this -> base_url = " { $ibforums -> vars [ 'board_url' ]} /index. { $ibforums -> vars [ 'php_ext' ]} ?s= { $ibforums -> session_id } ";
          
          $page= "<center><a href='{$ibforums->base_url}&act=RPG'>Itemshop</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Bank'>Bank</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=sendm'>Transfer</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Heal'>Hospital</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=VAB'>Arena</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Clans'>Clans</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Stats'>Stats</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Lottery'>Lottery</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Store'>Shop</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Jobs'>Jobs</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Equip'>Equip</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Upgrdde'>Upgrade</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Adventures'>Adventures</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Steal'>Steal</a><br><br>
          <center><a href='{$ibforums->base_url}&act=RPG&CODE=Help'>Help</a><br><br>";
          
          $this -> output = $this -> html -> render_page ($page);
          
          $print->add_output("$this->output");
          
          $this -> page_title = $ibforums -> vars [ 'board_name' ];
          
          $this->nav = array(rpgindex);
          
          $print -> do_output ( array( 'TITLE' => $this -> page_title , 'JS' => 0 , NAV => $this -> nav ) );
          
          
          }
          
          }
          ?>
          #######################################################################
          DATABASE FILE TO RUN (Name =Install_Indexdb.php)
          #######################################################################
          <?php
          /*
          +--------------------------------------------------------------------------+
          | This will help you add the Killer RPG Index database!
          +--------------------------------------------------------------------------+
          */
          
          require "conf_global.php";
          require "sources/functions.php";
          
          $file = "Killer RPG Index Database";
          $file2 = "Killer RPG Index Database Installer";
          
          $std   = new FUNC;
          $input = $std->parse_incoming();
          
          //--------------------------------
          // Load the DB driver and such
          //--------------------------------
          
          $INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];
          
          $to_require = "sources/Drivers/".$INFO['sql_driver'].".php";
          require ($to_require);
          
          $DB = new db_driver;
          
          $DB->obj['sql_database']     = $INFO['sql_database'];
          $DB->obj['sql_user']         = $INFO['sql_user'];
          $DB->obj['sql_pass']         = $INFO['sql_pass'];
          $DB->obj['sql_host']         = $INFO['sql_host'];
          $DB->obj['sql_tbl_prefix']   = $INFO['sql_tbl_prefix'];
          
          //--------------------------------
          // Get a DB connection
          //--------------------------------
          
          $DB->connect();
          
          if ($input['act'] == "")
          {
          print "<HEAD><TITLE>$file Installer</TITLE></HEAD>
          <span style='text-transform: capitalize'>
          <table align=center cellspacing=0 cellpadding=0 style='border: solid black 1px' width=602>
          <tr valign=top><td align=center valign=bottom colspan=2 width=600 style='border-bottom: solid black 1px'>
          Adding Index Page</td></tr>
          <tr><td align=center colspan=2 style='border-bottom: solid black 1px' width=600>
          <b><font size=4 color=000000>$file2</font></td></tr>
          <tr><td valign=top align=center style='border-right: solid black 1px' width=140>
          <b>$file</b><hr><p>
          [ <a href=?act=install>Install</a> ]</td>
          <td align=center width=459>
          $file2<br>
          Please select install.<br><br>
          &nbsp;</table></span>";
          
          }
          else if ($input['act'] == "install")
          {
          
          $query1="DROP TABLE IF EXISTS ".$INFO['sql_tbl_prefix']."rpgindex";
          
          
          $query2="ALTER TABLE ".$INFO['sql_tbl_prefix']."groups ADD g_view_rpgindex tinyint(1) DEFAULT '1'";
          
          $DB->query($query1);
          $DB->query($query2);
          
          
          print "<title>$file Installation</title>
          <span style='text-transform: capitalize'>
          <table align=center cellspacing=0 cellpadding=0 style='border: solid black 1px' width=602>
          <tr valign=top><td align=center valign=bottom colspan=2 width=600 style='border-bottom: solid black 1px'>
          Custom Page Db Installer</td></tr>
          <tr><td align=center colspan=2 style='border-bottom: solid black 1px' width=600>
          <font size=4><b>This will help you add Killer RPG Index Database</font></td></tr>
          <tr>
           <td valign=top align=center style='border-right: solid black 1px' width=130>
          <b>$file2 </b><hr>
          <p>Installing....<p><b>Finished!</b></td>
          <td align=center width=469>
          <br>
          Congratulations, you have finished the $file Installation.<br>
          Please Delete this file right now!<p>
          <br></table></span>";
          }
          ?>
          Last edited by XIWhiteFoxIX; Feb 19, 2004, 04:20 PM.

          Comment


          • #6
            Anyone? This is very important. Sorry for bumpin the topic.

            Comment


            • #7
              It's using an ipb variable, but anyway, try this

              PHP Code:
              $input['act'] = $_GET['act']; 
              Put that at the top of your page.

              Next time just show the part of the script you'll be using, instead of posting everything. It saves everyone time from having to hunt through the script to understand what's going on

              Comment


              • #8
                sorry... Also tried that still a blank page. I did only make 1 edit. In the index.php on my IPB. I put under
                Code:
                'calender' => "calender",
                I put
                Code:
                 'rpgindex' => "rpgindex",

                Comment

                Working...
                X