Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Prev Previous Post   Next Post Next
  #5  
Old 11-03-2008, 04:07 AM
qbn720's Avatar
qbn720 qbn720 is offline
 
Join Date: Mar 2007
Location: New York
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is my main index.php file. The beginning part of the page is where I declare the global.php. Once I declare it, any time I click on any of my links on the site, it automatically redirects to my first defined case, in this case, faq.php.

PHP Code:
<?php
        $curdir 
getcwd ();
        
chdir('/home1/otakunow/public_html/forums');
        require_once(
'/home1/otakunow/public_html/forums/global.php');
        
chdir ($curdir);
        
       if (isset(
$_GET['p'])) {
            
$_GET['p'] = str_replace('-''_'$_GET['p']);
       }
?>
<html>
<head>
<meta name="copyright" content="November 2008">
<LINK REL=StyleSheet HREF="css/style.css" TYPE="text/css" MEDIA="Screen" />
</head>
<body>
<div align="center">
    <div style="width: 800px; background-color: black;">
  <table width="800" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="800" valign="top"><?php include('partials/banner.php'); ?>
        <br />
        <table width="800" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="210" height="259" valign="top">
          <!-- Begin Navbar -->
          <table width="190" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="190" height="24" valign="top" style="background: url('images/layout/naruto/navbar/navbar-header.jpg') repeat-y top left;"><span class="section_head_white">Otaku</span> <span class="section_head_orange">Navigation</span> </td>
            </tr>
            <tr>
              <td valign="top" style="background: url('layout/naruto/navbar/navbar-cell.jpg') repeat-y top left;"><?PHP include("partials/navigation.php");
              
?></td>
            </tr>
            <tr>
              <td valign="top"><img src="images/layout/naruto/navbar/navbar-footer.jpg" /></td>
            </tr>
          </table>          
          <!-- END Navbar --><br />
          <!-- Begin Affiliates -->          
          <table width="190" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="190" height="24" valign="top" style="background: url('images/layout/naruto/navbar/navbar-header.jpg') repeat-y top left;"><span class="section_head_white">Otaku</span> <span class="section_head_orange">Affiliates</span> </td>
            </tr>
            <tr>
              <td valign="top" style="background: url('images/layout/naruto/navbar/navbar-cell.jpg') repeat-y top left;" ><?php include("partials/affiliates.php"); ?></td>
            </tr>
            <tr>
                <td valign="top" style="background: url('images/layout/naruto/navbar/navbar-cell.jpg') repeat-y top left;" ><?PHP require_once("partials/sitetools.php"); ?></td>
            </tr>
            <tr>
              <td valign="top"><img src="images/layout/naruto/navbar/navbar-footer.jpg" /></td>
            </tr>
          </table> 
          <br />
          <!-- END Affiliates -->
          </td>
          <td width="590" valign="top">
          
          <!-- Begin Latest Updates -->
          
          <table width="559" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="559" background="images/layout/naruto/content/content-header.jpg"><span class="section_head_white">Latest</span> <span class="section_head_orange">Updates</span> </td>
            </tr>
            <tr>
              <td background="images/layout/naruto/content/content-cell.jpg"><?php include("partials/latestupdates.php");?></td>
            </tr>
            <tr>
              <td><img src="images/layout/naruto/content/content-footer.jpg" /></td>
            </tr>
          </table>
<!-- End Latest Updates -->
            <br />            
          <!-- Begin Content -->
        <table width="559" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="559" background="images/layout/naruto/content/content-header.jpg">
                  <span class="section_head_white">Otaku</span> <span class="section_head_orange">Content</span>
              </td>
            </tr>
            <tr>
              <td background="images/layout/naruto/content/content-cell.jpg" width="558px">
                  <div class="margin">
                                    // Acquire IDs for Dynamic Switching.
                                    <?php include("partials/get_id.php"); ?>
                  </div>
              </td>
            </tr>
            <tr>
              <td><img src="images/layout/naruto/content/content-footer.jpg" /></td>
            </tr>
          </table>
        <!-- End Content -->
        
        <!-- Begin Footer -->
        
        <tr>
          <td height="81" colspan="2" valign="top"><div align="center"><?PHP include('partials/footer.php');?></div></td>
          </tr>
      </table></td>
    </tr>
  </table>
</div>
</div>

<!-- End Footer -->
</body>
</html>
This here is the "get_id.php" file. I use this file as a partial that is included via PHP my index.php page. I have no problems with this page when I comment out global.php, however, global.php is essentially needed so that the login-box above mentioned works correctly.

PHP Code:
<?php

    
switch($_GET['p'])
    { 
                case 
"faq": include ('faq.php'); break;
                case 
"staff": include ('staff.php'); break;
                case 
"affiliation": include('affiliation.php'); break;
                case 
"linktous": include('linktous.php'); break;
                case 
"mailer": include('contact/mailer.php'); break;
                case 
"featured": include ('featured.php'); break;
                case 
"forbidden": include('forbidden.php'); break;
                case 
"popdod": include ('popdod.php'); break;
                case 
"staff": include('staff.php'); break;
                case 
"login": include('login.php'); break;
                case 
"logout": include ('logout.php'); break;
                case 
"qotm": include('interactive/quizzes/quiz.php'); break;
                case 
"newsarchive": include('news/show_archives.php'); break;
                case 
"comment_submit": include('comments/comments_process.php'); break;
    }
?>
Thank you very much for coming to my aid. If you need me to, I can also post the login-box inclusion code though, from my analysis I don't think it is a problem. But if you need me to, I will provide it.


--------------- Added [DATE]1225757446[/DATE] at [TIME]1225757446[/TIME] ---------------

I know it's a great deal to deal with but if any hints or assistance can be made, I would greatly appreciate it.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06829 seconds
  • Memory Usage 2,467KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (3)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete