. For more information, visit http://sourceforge.net/projects/ipreg, or contact me at wietsew@users.sourceforge.net *****************************************************************************/ // includes include("includes.php"); // get id $user_id = $_GET['user_id']; // check authorisation $auth = auth("user", $config_auth_userview, $user_id); // start output include("header.php"); // set template $tp = new Template("tpl/userview.tpl"); // set language variables $tp->setvars($lang); // get user info $result = mysql_query("SELECT user_name, user_displayname, user_mac, user_lang FROM user WHERE user_id='$user_id'") or die(mysql_error()); $row=mysql_fetch_object($result); $tp->set("user_id", $user_id); $tp->set("user_name", $row->user_name); $tp->set("user_displayname", $row->user_displayname); $tp->set("user_mac", $row->user_mac); $tp->set("user_lang", $row->user_lang); // get userclass info $result = mysql_query("SELECT uc.userclass_id, uc.userclass_name FROM userclass uc, useruserclass uuc WHERE uuc.user_id='$user_id' AND uuc.userclass_id=uc.userclass_id ORDER BY uc.userclass_name") or die(mysql_error()); for ($i=0;$row=mysql_fetch_object($result);$i++) { $tp->set("userclass_id", $row->userclass_id); $tp->set("userclass_name", $row->userclass_name); $tp->set("userclasscount", $i+1); $tp->parse("userclassrow"); } if (($i>0) ? $tp->parse("userclass") : $tp->hide("userclass")); // output $tp->parse(); $tp->spit(); include("footer.php"); ?>