"); addnav("","user.php?op=special&userid=$userid$returnpetition"); $grant = translate_inline("Grant New Day"); rawoutput(""); $fix = translate_inline("Fix Broken Navs"); rawoutput(""); $mark = translate_inline("Mark Email As Valid"); rawoutput(""); rawoutput(""); //Show a user's usertable rawoutput("
"); addnav("","user.php?op=save&userid=$userid$returnpetition"); $save = translate_inline("Save"); rawoutput(""); if ($row['loggedin']==1 && $row['laston']>date("Y-m-d H:i:s",strtotime("-".getsetting("LOGINTIMEOUT",900)." seconds"))){ output_notl("`\$"); rawoutput(""); output("`\$Warning:`0"); rawoutput(""); output("`\$This user is probably logged in at the moment!`0"); } // Okay, munge the display name down to just the players name sans // title $row['name'] = get_player_basename($row); /*careful using this hook! add only things with 'viewonly' in there, nothing will be saved if do otherwise! Example: do_hook of your module: array_push($args['userinfo'], "Some Stuff to have a look at,title"); $args['userinfo']['test'] = "The truth!!!,viewonly"; $args['user']['test'] = "Is out there???"; */ $showformargs = modulehook("modifyuserview", array("userinfo"=>$userinfo, "user"=>$row)); $info = showform($showformargs['userinfo'],$showformargs['user']); rawoutput(""); rawoutput("
"); output("`n`nLast Page Viewed:`n"); rawoutput(""); }elseif(httpget("subop")=="module"){ //Show a user's prefs for a given module. addnav("Operations"); addnav("Edit user","user.php?op=edit&userid=$userid$returnpetition"); $module = httpget('module'); $info = get_module_info($module); if (count($info['prefs']) > 0) { $data = array(); $msettings = array(); while (list($key,$val)=each($info['prefs'])){ // Handle vals which are arrays. if (is_array($val)) { $v = $val[0]; $x = explode("|", $v); $val[0] = $x[0]; $x[0] = $val; } else { $x = explode("|",$val); } $msettings[$key] = $x[0]; // Set up the defaults as well. if (isset($x[1])) $data[$key] = $x[1]; } $sql = "SELECT * FROM " . db_prefix("module_userprefs") ." WHERE modulename='$module' AND userid='$userid'"; $result = db_query($sql); while ($row = db_fetch_assoc($result)){ $data[$row['setting']] = $row['value']; } rawoutput("
"); addnav("","user.php?op=savemodule&module=$module&userid=$userid$returnpetition"); tlschema("module-$module"); showform($msettings,$data); tlschema(); rawoutput("
"); }else{ output("The $module module doesn't appear to define any user preferences."); } } module_editor_navs('prefs', "user.php?op=edit&subop=module&userid=$userid$returnpetition&module="); addnav("","user.php?op=lasthit&userid=$userid"); ?>