. For more information, visit http://sourceforge.net/projects/ipreg, or contact me at wietsew@users.sourceforge.net *****************************************************************************/ // includes include("includes.php"); // get vars $userclass_id = $_POST['userclass_id']; $item = $_POST['item']; // check authorisation $auth = auth("userclassauthadd", $config_auth_userclassauthadd, 0); // start output include("header.php"); // set template $tp = new Template("tpl/userclassauthaddsubitem.tpl"); // set language variables $tp->setvars($lang); // get userclass info $result = mysql_query("SELECT userclass_name FROM userclass WHERE userclass_id='$userclass_id'") or die(mysql_error()); $row = mysql_fetch_object($result); $tp->set("userclass_id", $userclass_id); $tp->set("userclass_name", $row->userclass_name); $tp->set("authitem", $item); $tp->set("authitem_name", $authitems[$item]['name']); // get subitem info if($item=="ipreg") { $tp->hide("items"); } else { $txt_item_id = $authitems[$item]['item_id']; $txt_item_name = $authitems[$item]['item_name']; $result = mysql_query("SELECT $txt_item_id AS item_id, $txt_item_name AS item_name FROM $item ORDER BY $txt_item_name") or die(mysql_error()); for ($i=0;$row=mysql_fetch_object($result);$i++) { $tp->set("item_id", $row->item_id); $tp->set("item_name", $row->item_name); $tp->parse("itemrow"); } if (($i>0) ? $tp->parse("items") : $tp->hide("items")); } // output $tp->parse(); $tp->spit(); include("footer.php"); ?>