Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2006, 11:21 PM
fkatzenb fkatzenb is offline
 
Join Date: Dec 2005
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default What am I doing wrong?

Page in question.... everything works nice except for links to private message, navbar stuff, etc.
http://www.squirrelpf.com/gearingcalc/index.php
Thanks for the help!


My template called TEST

PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>$vboptions[bbtitle]</title>
$headinclude
</head>
<
body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat">$page_title</td>
</
tr>
<
tr>
    <
td class="alt1">$page_content</td>
</
tr>
</
table>

$footer
</body>
</
html
My PHP file....

PHP Code:
<?php

$page_title 
'Gearing/MPH Calculator';
$page_content '<div id="content" style="background-image: url(\'gear_bg.jpg\');background-position: 325px 1px;background-repeat: no-repeat;">
            <form method="post" action="index.php">'
;


if (
$submit == "Submit Gears")
      {
    
$page_content .=  '
        <table style="clear:left;padding:3px;text-align:right;border: 1px solid black;margin:10px;">
        <tr style="font-weight:bold;"><td></td><td>Gearing</td><td>Max MPH</td><td></tr> '
;    

     if (
$final_drive2 != AND $final_drive2 !="")
        {
         
$final_drive $final_drive2;
          }

     
$wheel_rate =  $tire_size 3.1416 63360 60;

     if (
$first_gear != 0)
         { 
         
$first_mph =  ($tc_slip/100) * $redline $final_drive $wheel_rate $first_gear
         
$page_content .=  '<tr><td>1st</td><td>' round($first_gear2) . '</td><td>' round($first_mph0) . '</td></tr>';
        }
     if (
$second_gear != 0)
         { 
         
$second_mph =  ($tc_slip/100) * $redline $final_drive $wheel_rate $second_gear;
         
$page_content .=  '<tr><td>2nd </td><td>' round($second_gear2) . '</td><td>' round($second_mph0) . '</td></tr>';
        }
     if (
$third_gear != 0)
         { 
         
$third_mph =  ($tc_slip/100) * $redline $final_drive $wheel_rate $third_gear;
         
$page_content .=  '<tr><td>3rd</td><td>' round($third_gear2) . '</td><td>' round($third_mph0) . '</td></tr>';
        }
     if (
$fourth_gear != 0)
         {
         
$fourth_mph = ($tc_slip/100) * $redline $final_drive $wheel_rate $fourth_gear;
         
$page_content .=  '<tr><td>4th</td><td>' round($fourth_gear2) . '</td><td>' round($fourth_mph0) . '</td></tr>';
        }
     if (
$fifth_gear != 0)
         { 
         
$fifth_mph =  ($tc_slip/100) * $redline $final_drive $wheel_rate $fifth_gear;
         
$page_content .=  '<tr><td>5th</td><td>' round($fifth_gear2) . '</td><td>' round($fifth_mph0) . '</td></tr>';
        }
     if (
$sixth_gear != 0)
         { 
         
$sixth_mph =  ($tc_slip/100) * $redline $final_drive $wheel_rate $sixth_gear;
         
$page_content .=  '<tr><td>6th gear</td><td>' round($sixth_gear2) . '</td><td>' round($sixth_mph0) . '</td></tr>';
        }
    
$page_content .=  '
    </table> <input type="submit" id="user-inputs" name="submit" value="Reset" style="margin: 10px;">
    <br /><br />
    <hr />

      <h3>Further Info...</h3>
      <p>Thanks for using the Gearing Calculator!  This is based on my original work which can be downloaded as an excel spreadsheet <a href="gearing.xls">here</a>.  Be advised that it is no longer supported and has some annoying bugs.  This new version has many new benifits - no longer requires excel, has less features, and allows for custom inputs.</p>
      <p>I have also included a tire size calculator to make life easier and can be found <a href="tirecalc.php" onclick="return popitup(\'tirecalc.php\')">here</a>.  You can also e-mail me transmission setups to be included in the drop down list.  Just use the contact link below!</p>
      <h3>To Do\'s</h3>
      <p>I am going to stream line the code sometime in the near future, so that the tranny information is more dynamic.  AKA, only show fields which have data, and allow more then 2 final drives per group.</p>
      <br /><br />'
;
    }

elseif (
$submit == "Submit Gearbox")
    {
     if (
$gearbox == "custom")
        {
          
$page_content .=  '
         <h3>Enter you gears:</h3>
         <span id="gear_spans">1st Gear: <input id="user-inputs" type="text" name="first_gear" size="5"></span>        
         <span id="gear_spans">2nd Gear: <input id="user-inputs" type="text" name="second_gear" size="5"></span>            
         <span id="gear_spans">3rd Gear: <input id="user-inputs" type="text" name="third_gear" size="5"></span><br /><br />            
         <span id="gear_spans">4th Gear: <input id="user-inputs" type="text" name="fourth_gear" size="5"></span>            
         <span id="gear_spans">5th Gear: <input id="user-inputs" type="text" name="fifth_gear" size="5"></span>            
         <span id="gear_spans">6th Gear: <input id="user-inputs" type="text" name="six_gear" size="5"></span> <br /><br />            
         <span id="gear_spans">Final Drive: <input id="user-inputs" type="text" name="final_drive" size="5"></span> <br /><br /><br />            
         <h3>Enter Conditions</h3>
         <span id="gear_spans">Redline: <input id="user-inputs" type="text" name="redline" size="5"></span>
         <span id="gear_spans">TC Slip (%): <input id="user-inputs" type="text" name="tc_slip" size="5"></span>
         <span id="gear_spans">Tire Size (in): <input id="user-inputs" type="text" name="tire_size" size="5"></span>    
         <a href="tirecalc.php" onclick="return popitup(\'tirecalc.php\')">Click for Tire Calc...</a> <br /><br />
         <input type="submit" id="user-inputs" name="submit" value="Submit Gears">
         <input type="submit" id="user-inputs" name="submit" value="Reset">'
;
        }
     else
        {
         require(
'/var/www/vhosts/squirrelpf.com/httpdocs/gearingcalc/gear_data.php');
         
$current_gear $gears[$gearbox];
         
$current_fd $fd[$gearbox];

          
$page_content .=  '
         <h3>Review your gears:</h3>
         <span id="gear_spans">1st Gear: <input id="user-inputs" type="text" name="first_gear" value="' 
$current_gear['1st'] . '" size="5"></span>        
         <span id="gear_spans">2nd Gear: <input id="user-inputs" type="text" name="second_gear" value="' 
$current_gear['2nd'] . '" size="5"></span>            
         <span id="gear_spans">3rd Gear: <input id="user-inputs" type="text" name="third_gear" value="' 
$current_gear['3rd'] . '" size="5"></span><br /><br />            
         <span id="gear_spans">4th Gear: <input id="user-inputs" type="text" name="fourth_gear" value="' 
$current_gear['4th'] . '" size="5"></span>            
         <span id="gear_spans">5th Gear: <input id="user-inputs" type="text" name="fifth_gear" value="' 
$current_gear['5th'] . '" size="5"></span>            
         <span id="gear_spans">6th Gear: <input id="user-inputs" type="text" name="sixth_gear" value="' 
$current_gear['6th'] . '" size="5"></span> <br /><br />            
         <span id="gear_spans">Final Drive: <select id="user-inputs" name="final_drive"><option value="' 
$current_fd['Opt1'] . '">' $current_fd['Opt1'] . '</option><option value="' $current_fd['Opt2'] . '">' $current_fd['Opt2'] . '</option></select></span> 
         <span id="gear_spans">or Custom FD:<input id="user-inputs" type="text" name="final_drive2" size="5"></span> <br /><br /><br />            
         <h3>Enter Conditions</h3>
         <span id="gear_spans">Redline: <input id="user-inputs" type="text" name="redline" size="5"></span>
         <span id="gear_spans">TC Slip (%): <input id="user-inputs" type="text" name="tc_slip" size="5"></span>
         <span id="gear_spans">Tire Size (in): <input id="user-inputs" type="text" name="tire_size" size="5"></span>    
         <a href="tirecalc.php" onclick="return popitup(\'tirecalc.php\')">Click for Tire Calc...</a> <br /><br />
         <input type="submit" id="user-inputs" name="submit" value="Submit Gears">
         <input type="submit" id="user-inputs" name="submit" value="Reset"> '
;
        }

    }
elseif (
$submit == "" OR $submit =="Reset")
    { 
     
$page_content .=  '
     <h3>Select your gearbox:</h3>
     <select id="user-inputs" name="gearbox">
        <option value="custom">Enter your custom gearing, OR</option>
        <option value="a413-1">Dodge A-413/670 Group 1 (2.60 & 2.78)</option>
        <option value="a413-2">Dodge A-413/670 Group 2 (3.02 & 3.22)</option>
        <option value="a413-3">Dodge A-413/670 Group 3 (3.50 & 3.72)</option>
        <option value="a460">Dodge A-460</option>
        <option value="a465">Dodge A-465</option>
        <option value="a520">Dodge A-520</option>
        <option value="a523-1">Dodge A-523 (90-91)</option>
        <option value="a523-2">Dodge A-523 (92)</option>
        <option value="a525">Dodge A-525</option>
        <option value="a543-1">Dodge A-543 (90-91)</option>
        <option value="a543-2">Dodge A-543 (92)</option>
        <option value="a555">Dodge A-555</option>
        <option value="a568-1">Dodge A-568 (90-91)</option>
        <option value="a568-2">Dodge A-568 (92)</option>
        <option value="a604">Dodge A-604 (all)</option>
     </select> <br /><br />
     <input type="submit" id="user-inputs" name="submit" value="Submit Gearbox">
      <br /><br />
     <hr />
      <h3>Further Info...</h3>
      <p>Thanks for using the Gearing Calculator!  This is based on my original work which can be downloaded as an excel spreadsheet <a href="gearing.xls">here</a>.  Be advised that it is no longer supported and has some annoying bugs.  This new version has many new benifits - no longer requires excel, has less features, and allows for custom inputs.</p>
      <p>I have also included a tire size calculator to make life easier and can be found <a href="tirecalc.php" onclick="return popitup(\'tirecalc.php\')">here</a>.  You can also e-mail me transmission setups to be included in the drop down list.  Just use the contact link below!</p>
      <h3>To Do\'s</h3>
      <p>I am going to stream line the code sometime in the near future, so that the tranny information is more dynamic.  AKA, only show fields which have data, and allow more then 2 final drives per group.</p>
      <br /><br />'
;

    }

$page_content .=  '</div></form>';


// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''test.php'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(
    
);

// pre-cache templates used by all actions
$globaltemplates = array(
    
'TEST',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

chdir('/var/www/vhosts/squirrelpf.com/httpdocs/forums');

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = $page_title;

$navbits construct_navbits($navbits);
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('TEST') . '");');

?>
Reply With Quote
Reply


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 06:49 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.03270 seconds
  • Memory Usage 2,350KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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_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