View Single Post
  #7  
Old 04-19-2010, 06:04 PM
NickyDee NickyDee is offline
 
Join Date: Aug 2008
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you may be right, heres my statsinner.php code:

PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT''Stats');
define('CSRF_PROTECTION'true);  
// 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('cpage_Statsmain',);

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

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/Forum');
require_once('./global.php');
?>
<script type="text/javascript">
function load() { 
    var urlstring = window.location.href;
    if (urlstring.indexOf("ch1=a") > -1) { document.form1.ch1.checked = true } else { document.form1.ch1.checked = false };
    if (urlstring.indexOf("ch2=b") > -1) { document.form1.ch2.checked = true } else { document.form1.ch2.checked = false };
    if (urlstring.indexOf("ch3=c") > -1) { document.form1.ch3.checked = true } else { document.form1.ch3.checked = false };
    if (urlstring.indexOf("ch4=d") > -1) { document.form1.ch4.checked = true } else { document.form1.ch4.checked = false };
    if (urlstring.indexOf("ch5=e") > -1) { document.form1.ch5.checked = true } else { document.form1.ch5.checked = false };
    if (urlstring.indexOf("ch6=f") > -1) { document.form1.ch6.checked = true } else { document.form1.ch6.checked = false };
}
</script>
<?

if (isset($_GET['Submit1'])) {

    if (isset($_GET['ch1'])) { $ch1 = $_GET['ch1'];
    if ($ch1 == 'a') { $ch1 = 'checked';}
    }
    if (isset($_GET['ch2'])) { $ch2 = $_GET['ch2'];
    if ($ch2 == 'b') { $ch2 = 'checked';}
    }
    if (isset($_GET['ch3'])) { $ch3 = $_GET['ch3'];
    if ($ch3 == 'c') { $ch3 = 'checked';}
    }
    if (isset($_GET['ch4'])) { $ch4 = $_GET['ch4'];
    if ($ch4 == 'd') { $ch4 = 'checked';}
    }
    if (isset($_GET['ch5'])) { $ch5 = $_GET['ch5'];
    if ($ch5 == 'e') { $ch5 = 'checked';}
    }
    if (isset($_GET['ch6'])) { $ch6 = $_GET['ch6'];
    if ($ch6 == 'f') { $ch6 = 'checked';}
    }
}

//select the table

$query="SELECT * FROM medical_school WHERE CourseT = 'UG'";
if ($ch1 == checked) { // Order by resits only
  $query .= " AND Resits = 'Yes'";
} if ($ch2 == checked) { // Order by clearing only
  $query .= " AND Clearing = 'Yes'";
} if ($ch3 == checked) { // Order by biology only
  $query .= " AND Biology = '-'";
} if ($ch4 == checked) { // Order by chemistry only
  $query .= " AND Chemistry = '-'";
} if ($ch5 == checked) { // Order by ukcat only
  $query .= " AND UKCAT = '-'";
} if ($ch6 == checked) { // Order by ukcat only
  $query .= " AND Tests = '-'";}

$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close(); ?>

<div style="width:880px; margin-left: 20px;">

<!-- Start of search options !-->
<a href="javascript:;" onmousedown="toggleDiv('advoptions');"><div id="sidebarheader" style="width:750px; margin-left: auto; margin-right: auto;">Advanced Search<div style="float:right"><img name="optionsimg" src="/nick/bararup.png" alt="minimize"  border="0"/></div></div></a>
<div id="advoptions" class="calitext" style="width: 750px; padding: 5px 5px 5px 5px; border: 1px solid #A0A0A0; border-top: 0px; margin-left: auto; margin-right: auto; display: none;">
    <form name="form1" method="GET" action="database5yr.php">
        <table width="730" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="240" align="left" valign="top">Show  courses that may allow:<br />
                <input type = "Checkbox" Name ="ch1" value ="a" <? if ($ch1 == 'a') { echo 'checked';} else { echo 'unchecked'; }?> >
                    Resits<br />
                <input type = "Checkbox" Name ="ch2" value ="b" <? if ($ch2 == 'b') { echo 'checked';}?>>
                    Clearing
            </td>
            <td width="240" align="left" valign="top">Show  courses that do not request:<br />
              <input type = "Checkbox" Name ="ch3" value ="c" <? if ($ch3 == 'c') { echo 'checked';}?>>
                    Biology<br />
              <input type = "Checkbox" Name ="ch4" value ="d" <? if ($ch4 == 'd') { echo 'checked';}?>>
                    Chemistry            </td>
            <td width="240" align="left" valign="top">
              Show  courses that do not use the:<br />
              <input type = "Checkbox" Name ="ch5" value ="e" <? if ($ch5 == 'e') { echo 'checked';}?>>
                    UKCAT<br />
              <input type = "Checkbox" Name ="ch6" value ="f" <? if ($ch6 == 'f') { echo 'checked';}?>>
                    BMAT<br />
                    <div style="float: right"><input type = "Submit" name = "Submit1" value = "Find" /></div>
                    <br />
            </td>
          </tr>
        </table>
    </form></div>
<!-- End of search options !-->
<div id="ukmsabout" class="calitext" style="width: 880px; margin-left: auto; margin-right: auto; font-weight: bold; font-size: 14px;">
Click on a medical school name for more information</div>
<div id="sidebarheader" style="width: 880px; text-align:center; line-height: 35px; height: 35px; background-image: url(/nick/sidebarheaderback30.png)">
        <table width="860" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="125"></td>
            <td width="75"><div style="text-align: center">Applications:</div></td>
            <td width="75"><div style="text-align: center">Places:</div></td>
            <td width="75"><div style="text-align: center">Per place:</div></td>
            <td width="75"><div style="text-align: center">Overseas:</div></td>
            <td width="65"><div style="text-align: center">Offer:</div></td>
            <td width="130"><div style="text-align: center">Subjects:</div></td>
            <td width="120"><div style="text-align: center">Tests:</div></td>
            <td width="60"><div style="text-align: center">Resits:</div></td>
            <td width="60"><div style="text-align: center">Clearing:</div></td>
          </tr>
      </table>
    </div>

<? $i=0;
while ($i < $num) {

$Name=mysql_result($result,$i,"Name");
$Applied=mysql_result($result,$i,"Applied");
$Foreign=mysql_result($result,$i,"Foreign");
$APP=mysql_result($result,$i,"APP");
$Accepted=mysql_result($result,$i,"Accepted");
$Biology=mysql_result($result,$i,"Biology");
$Chemistry=mysql_result($result,$i,"Chemistry");
$Grades=mysql_result($result,$i,"Other");
$UKCAT=mysql_result($result,$i,"UKCAT");
$Test=mysql_result($result,$i,"Tests");
$Resits=mysql_result($result,$i,"Resits");
$Clearing=mysql_result($result,$i,"Clearing");
$ID=mysql_result($result,$i,"ID");
?>

<div id="entry<? echo $ID; ?>" class="medschoolbox">
  <table width="860" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="125"><div style="font-weight: bold; margin-left: 10px;"><a href="/Forum/schoolstats.php?det=<? echo $ID; ?>"><? echo $Name; ?></a></div></td>
      <td width="75"><div style="text-align: center"><? echo $Applied; ?></div></td>
      <td width="75"><div style="text-align: center"><? echo $Accepted; ?></div></td>
      <td width="75"><div style="text-align: center"><? echo $APP; ?></div></td>
      <td width="75"><div style="text-align: center"><? echo $Foreign; ?></div></td>
      <td width="65"><div style="text-align: center"><? echo $Grades; ?></div></td>
      <td width="65"><div style="text-align: center"><? if ($Biology == '-') {} else {?> <img src="/nick/<? echo $Biology;  ?>b.png" /><? } ?></div></td>
      <td width="65"><div style="text-align: center"><? if ($Chemistry == '-') {} else {?> <img src="/nick/<? echo $Chemistry;  ?>c.png" /><? } ?></div></td>
      <td width="120"><div style="text-align: center">
        <? if ($UKCAT == '-') {} else { echo $UKCAT; } ?>
        <? if ($Test == '-') {} else { echo $Test; }  ?>
      </div></td>
      <td width="60"><div style="text-align: center">
        <? if ($Resits == '-') {} else { echo $Resits; }  ?>
      </div></td>
      <td width="60"><div style="text-align: center">
        <? if ($Clearing == '-') {} else { echo $Clearing; }  ?>
      </div></td>
    </tr>
  </table>
</div>
<? $i++; } ?>
I can't see where I am getting a conflict though
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01257 seconds
  • Memory Usage 1,852KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)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)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete