There Were No Results for Your Search"; //print "
$sqlquery
"; } else { while ($number > $i) { // Name //------------------------- $key = mysql_result($result,$i,"id"); $subject = mysql_result($result,$i,"subject"); $draft = mysql_result($result,$i,"draft"); $public = mysql_result($result,$i,"public"); if ($i%2) {$bgc = "FFFFFF";} else {$bgc = "CADDA6";} if ($key) { print ""; // Subject - Topic //---------------------------------------- // SQL Draft & Public //---------------------- if ($loggedIn) { if ($UserType == "Admin") {$subject_where = "WHERE (`subject`=$key)";} else {$subject_where = "WHERE (`draft` = 'no' and `subject`=$key)";} } else {$subject_where = "WHERE (`draft` = 'no' and `public` = 'yes' and `subject`=$key)";} $topic_sqlquery = "SELECT * FROM topics $subject_where order by sort ASC"; //$topic_sqlquery = "SELECT * FROM topics WHERE (`draft` = 'no' and `public` = 'yes' and `subject`=$key) order by sort ASC"; $topic_result = mysql_query($topic_sqlquery); $topic_number = mysql_numrows($topic_result); $topic_i = 0; if ($topic_number < 1) { print "
There Were No Results for Your Search
"; //print "
$topic_sqlquery
"; } else { while ($topic_number > $topic_i) { // Name //------------------------- $topic_key = mysql_result($topic_result,$topic_i,"id"); $topic_topic = mysql_result($topic_result,$topic_i,"topic"); $topic_link = mysql_result($topic_result,$topic_i,"link"); $topic_dn_only = mysql_result($topic_result,$topic_i,"inside_dn_only"); $topic_draft = mysql_result($topic_result,$topic_i,"draft"); $topic_public = mysql_result($topic_result,$topic_i,"public"); if ($topic_dn_only == 'yes') { $my_ip_address = $_SERVER['REMOTE_ADDR']; if ($my_ip_address == $district_network_address) { $topic_note = "This link is only available within the School District"; } else { $topic_key = ''; $topic_note = "Outside User"; } } else {$topic_note = "";} if ($topic_key) { print ""; print ""; print ""; print ""; print ""; print ""; print ""; } //---------------------------------------- $topic_i++; } } mysql_free_result( $topic_result ); } // Next Subject //---------------------------------------- $i++; } } //-- Close SQL Connection //---------------------------------------- mysql_free_result( $result ); mysql_close($con); ?>
$subject
$topic_topic$topic_note"; if ($UserType == "Admin") {$image_src = $b_admin;} else {$image_src = $b_edit;} if ($UserType == "Admin"||$UserType=="Editor") {print "";} print " "; if ($loggedIn) { if ($topic_draft == "yes") {print ' D';} else {print '   ';} if ($topic_public == "no") {print ' P';} } print "