<br />...<br />// DO NOT EDIT THIS SECTION<br />// Require the library<br /> require ("$threadspath/includes/main.inc.php");<br /><br /> $userob = new user;<br /> $user = $userob -> authenticate("U_Groups");<br /> <br />// --------------------<br />// Authenticate the user<br />$html = new html;<br />if (!$user['U_Username']){<br /> $html -> not_right ($ubbt_lang['NO_AUTH'],$Cat);<br />}<br /><br />$Groups = $user['U_Groups'];<br />if (!$Groups) {<br /> $Groups = "-4-";<br />}<br /><br />// --------------------------------------------------------------<br />$Grouparray = split("-",$Groups);<br />$gsize = sizeof($Grouparray);<br />$g = 0;<br />for ($i=0; $i<=$gsize;$i++) {<br /> if (!isset($Grouparray[$i])) { continue; }<br /> //Change the [5-6] below to whatever range of groups you want to allow through to your template<br /> if (preg_match("/[5-6]/",$Grouparray[$i]))<br /> {<br /> $g = 1;<br /> continue;<br /> }<br />}<br />if($g == 0){<br /> $html -> not_right($ubbt_lang['BAD_GROUP'],$Cat);<br />}<br /><br /> $html -> send_header($pagetitle,$Cat,0,$user);<br /><br />// ---------------------<br />// Grab the tablewrapper<br /> list($tbopen,$tbclose) = $html -> table_wrapper();<br /> <br />// ***** YOU MAY NEED TO EDIT THE NAME OF THE TEMPLATE ******<br /><br /> if (!$debug) {<br /> include("$thispath/templates/$tempstyle/generic.tmpl");<br /> }<br /><br />// Send the footer<br /> $html -> send_footer();<br />?><br />