Jump to content

It was working (Display issue)


Chezshire

Recommended Posts

Hi - I'm a hobbist (at best i can call myself a hobbist)

  My problem occurs when i try to select something from one of the pulldowns. Ideally when i select something, the profiles which correspond to this the item selected from the pull down should display the thumbnail which you can click on and go to the profile of said displayed thumbnail. I'm not sure what the issue is - i'm not getting errors, and when I look at the html (view source code, I can see the images etc in the code, but ti's not displaying to the browser).

 

help, thanks in advance!

 

http://www.earth23.net/computo.php

 

 

<?php
$section = "computo";
include("functions.php");

include("header.php");

$thisPage = $_SERVER["PHP_SELF"];
?>

<table width="100%" height='101' cellpadding="0" border="0" cellspacing="0"><tr><td width='367'><img src="/images/computo.jpg" alt="Computo Welcomes You" width="367" height="101" border="0"></td>
<td align='center'><TABLE cellpadding='1'><TR>

<TD COLSPAN="2"><select id="cb_type" onChange="javascript:cb_update('cerebra_results');">
<option value=''> -- Type?</option>
<?php

$options = array("xaviers", "ally", "human", "nonaligned", "rival", "location");

FOREACH ($options as $option) {
echo "<option value='$option'>" . ucfirst($option) . "</option>\n";
} // end foreach

?></select>  <select id="cb_affiliation" onChange="javascript:cb_update('cerebra_results');">
<option value=''> -- Affiliation?</option>
<?php

// we're going to build a "smart" affiliation list that does not include multiple affiliation entries, but splits them up and adds them to the list

$rough = mysql_query("SELECT affiliation from cerebra GROUP BY affiliation");
$real_list = array();

WHILE ($row = mysql_fetch_assoc($rough)) { 
$thisGroup = $row["affiliation"];
if (!$thisGroup) { $thisGroup = "[No Affiliation]"; }
echo "<!-- Affiliation: $thisGroup -->\n";

if (!preg_match("/[,;]/", $thisGroup)) {

if (!in_array($thisGroup, $real_list)) { array_push ($real_list, $thisGroup); }
echo "<!-- Not in list yet: " . $thisGroup . " -->\n";

} else {

if (preg_match("/([,;])/", $thisGroup, $matches)) {
$multis = explode($matches[1], $thisGroup);
FOREACH ($multis as $multi) {
$multi = trim($multi); 
if (!in_array($multi, $real_list)) {
echo "<!-- Not in list yet - multi: " . $multi . " -->\n";
array_push ($real_list, $multi); }
} // end FOREACH
} // end if multiples

} // end if found , or ;

} // end WHILE

echo "<!-- Found " . count($real_list) . " different affiliations! -->\n";

sort($real_list);

FOREACH ($real_list as $thisGroup) { echo "<OPTION VALUE='$thisGroup'>$thisGroup</option>\n"; }

?></select></TD></TR>

<TR>
<TD COLSPAN="2"><select id='cb_status' onChange="javascript:cb_update('cerebra_results');">
<option value=''> -- Status?</option>
<option value='alive'>Alive</option>
<option value='crippled'>Crippled</option>
<option value='loa'>LOA</option>
<option value='mia'>MIA</option>
<option value='deceased'>Deceased</option>
</select>  <select id='cb_inplay' 		onChange="javascript:cb_update('cerebra_results');">
<option value=''> -- In Play?</option>
<option value='available'>Available</option>
<option value='taken'>In Play</option>
</select><?php

if ($moderator) {
echo "  <select id='cb_approval' onChange=\"javascript:cb_update('cerebra_results');\">
	<option value=''> -- Approval?</option>
	<option value='approved'>Approved</option>
	<option value='pending'>Pending</option>
	<option value='inactive'>Inactive</option>
</select>";
} else {
echo "<input type='hidden' value='true'  id='cb_approval'>";
} // end if not moderator

?></TD>

</TR>

<TR>
<TD>
	<input type='text' id="cb_keyword" size ='25' onKeyUp="javascript:cb_update('cerebra_results');" title="Press return when finished, or click the search button at the right." onFocus="javascript: 
		if(this.value=='Enter Keyword') { 
			this.value='';  this.style.color='#0046ca'; 
		}" 
		onBlur="javascript: if(this.value=='') {
			this.value='Enter Keyword'; 
			this.style.color='#939598';
		}" value='Enter Keyword' style='color: #939598'>  

		<input type='checkbox' value='Online Only' title='Show Online Players only' id='cb_onlineonly' 

		onChange="javascript: cb_update('cerebra_results');">
		<label for='cb_onlineonly' class='fineprint'>Online Only</label>
</TD>

<TD WIDTH='13'>
	<div style='position:relative'><img src='images/cerebra_search.gif' align='absmiddle' onClick="javascript:cb_update('cerebra_results');" 

	title="Click to refresh keyword search results.">
		<div style="display: none; position:absolute; left:0; top:0; z-index: 1;" id='systemWorking'><img src='images/indicator.black.gif' align='absmiddle'>
	</div>
	</div></TD>
</TD>
</TR>


</TABLE></td></tr></table>

<hr color='#050F1D' size='5'>

<div id='cerebra_results'><center><?php

//--- add 'AND player' after 'true' and it's only the player characters

// bring out your dead!
$criteria = "approved != 'unlisted' AND approved != 'pending' and approved != 'inactive' and approved != ''";
include("cerebra_thumbs.php");

echo "</center></div>\n";

echo "<hr color='#050F1D' size='5'>\n";

if (!$moderator) {

?>
<p>The LoSH's Computo Database contains various levels of character profiles detailing many of the universes known heroes, villains and super-powered beings who inhabit the varient world of Earth23's. In addition, Computo also contains detailed information on various locals and maps of noteable locations which make up e23. Records are editable only by those with administrator access, but are accessible by those with a security clearance of 3 or higher for the purpose of research and training. <a href="/login.php">If you are an administrator, click here to authenticate.</a></p>
<?php

} else {

?>
<p>The LoSH's Computo Database contains various levels of character profiles detailing many of the universes known heroes, villains and super-powered beings who inhabit the varient world of Earth23's future. In addition, Computo also contains detailed information on various locals and maps of noteable locations which make up universe of e23. You have administrative privileges to all Database entries.</p>
<?php

} // end

?>
<p>To search the Database for a character or location, choose from the appropriate categories and/or enter a keyword using the form at the top of the page. To add new record, <i>CLICK HERE FOR A</i> <a href="/computo/edit.php">CHARACTER</a> or <i>CLICK HERE FOR A </i><a href="/locations/edit.php">LOCATION</a>.</p>

<?php 
include("mods.php");
include("footer.php");
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/172734-it-was-working-display-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.