*/ if (empty($site)) { $site="beta"; } $bn_action="list"; $bn_action_mode="L"; require ("./init.inc"); $header_footer = ($bn_frames==0) ? true : false; /* Execute before_access program */ if ($bn_before_access) { include "$bn_dir/$bn_before_access"; } display_header ("List", $header_footer); DspMsg (11); $first=(isset($first)) ? $first : 0; $last=(isset($last)) ? $last : 0; $sort=(isset($sort)) ? $sort : ""; $where=(isset($where)) ? $where : ""; # if forum is not defined then list forums into this site # ------------------------------------------------------- if (!empty ($sort) || !empty($where)) { $ret = $db->listNotes ($bn_db, $first, $last, $sort); } elseif (!empty ($bn_sort)) { $ret = $db->listNotes ($bn_db, $first, $last, $bn_sort); } else { $ret = $db->listThreads ($bn_db, $first, $last); } if (!is_array ($ret) || ($ret < 0)) { echo "
"; DspMsg (6); echo "
"; } elseif ($ret["total"] == 0) { echo "
"; DspMsg (16); echo "
"; } else { $last= $ret["last"]; $first = $ret["first"]; $l=addSlashes(stripSlashes($bn_list_header)); eval ("echo stripSlashes(\"$l\");"); $db->getChild (0, "list"); $l=addSlashes(stripSlashes($bn_list_footer)); eval ("echo stripSlashes(\"$l\");"); if (!isset($ret["prev"])) $ret["prev"] = 0; if (!isset($ret["next"])) $ret["next"] = 0; if ($ret["prev"] || $ret["next"]) { echo "
"; if ($ret["prev"]) { $help=msg(65); displayURL ("$PHP_SELF?bn=$bn&expnd=$expnd&last=$first&sort=$sort&where=$where", "", " $help", $help); } echo ""; if ($ret["next"]) { $help=msg(66); displayURL ("$PHP_SELF?bn=$bn&expnd=$expnd&first=$last&sort=$sort&where=$where", "", " $help", $help); } echo "
\n"; } } # Display form if option set # ---------------------------- if ($bn_list_post) { $setUserField = true; // Set username and password in form fields $mail_reply = 1; // set default to checked in the form $form_action = "./insert.$ext"; $back_form="list"; $bn_popup=0; # in case of public forum, allows user to set a password so that he can # later edit/delete his message # --------------------------------------------------------------------- if ( ($forum["type"] == "pub") && ($bn_modify || $bn_delete) ) { $checkPassword = true; } include "$inc_dir/form.$ext"; } display_footer ($header_footer); ?>