[ Index ] |
|
Code source de e107 0.7.8 |
1 global $tp; 2 $ret = ""; 3 $custom_query = explode('+', $parm); 4 switch($custom_query[0]) 5 { 6 case "login": 7 case "login noprofile": 8 @include_once(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php"); 9 @include_once(e_PLUGIN."login_menu/languages/English.php"); 10 11 if (USER == TRUE){ 12 $ret .= "<span class='mediumtext'>".LOGIN_MENU_L5." ".USERNAME." .:. "; 13 if(ADMIN == TRUE){ 14 $ret .= "<a href='".e_ADMIN."admin.php'>".LOGIN_MENU_L11."</a> .:. "; 15 } 16 $ret .= ($custom_query[0] != "login noprofile") ? "<a href='".e_BASE."user.php?id.".USERID."'>".LOGIN_MENU_L13."</a>\n.:. ":""; 17 $ret .= "<a href='" . e_BASE . "usersettings.php'>".LOGIN_MENU_L12."</a> .:. <a href='".e_BASE."index.php?logout'>".LOGIN_MENU_L8."</a> .:.</span>"; 18 } else { 19 $ret .= "<form method='post' action='".e_SELF."'>\n<div class='loginc_div'>\n".LOGIN_MENU_L1."<input class='tbox loginc user' type='text' name='username' size='15' value='$username' maxlength='20' /> \n".LOGIN_MENU_L2."<input class='tbox loginc pass' type='password' name='userpass' size='15' value='' maxlength='20' /> \n<input type='checkbox' name='autologin' value='1' />".LOGIN_MENU_L6." \n<input class='button loginc' type='submit' name='userlogin' value='".LOGIN_MENU_L28."' />"; 20 if($pref['user_reg']) 21 { 22 $ret .= " <a href='".e_SIGNUP."'>".LOGIN_MENU_L3."</a>"; 23 } 24 $ret .= "</div>\n</form>"; 25 } 26 return $ret; 27 break; 28 29 case "search": 30 if(!check_class($pref['search_restrict'])) 31 { 32 return ""; 33 } 34 $searchflat = TRUE; 35 include_once(e_PLUGIN."search_menu/search_menu.php"); 36 return ""; 37 break; 38 39 case "quote": 40 $qotd_file = e_BASE."quote.txt"; 41 if(!file_exists($qotd_file)) 42 { 43 $quote = "Quote file not found ($qotd_file)"; 44 } 45 else 46 { 47 $quotes = file(e_BASE."quote.txt"); 48 $quote = $tp->toHTML($quotes[rand(0, count($quotes) -1 )], TRUE); 49 } 50 return $quote; 51 break; 52 53 case "language": 54 55 require_once(e_HANDLER."file_class.php"); 56 $fl = new e_file; 57 $reject = array('.','..','/','CVS','thumbs.db','*._$'); 58 $lanlist = $fl->get_dirs(e_LANGUAGEDIR); 59 sort($lanlist); 60 $action = (e_QUERY && !$_GET['elan']) ? e_SELF."?".e_QUERY : e_SELF; 61 $lantext = "<form method='post' action='".$action."' id='langchange'> 62 <div><select name='sitelanguage' class='tbox' onchange=\"document.getElementById('langchange').submit()\">\n"; 63 64 foreach($lanlist as $langval) { 65 $langname = $langval; 66 $langval = ($langval == $pref['sitelanguage']) ? "" : $langval; 67 $selected = ($langval == USERLAN) ? "selected='selected'" : ""; 68 $lantext .= "<option value='".$langval."' $selected>".$langname."</option>\n "; 69 } 70 71 $lantext .= "</select>\n"; 72 $lantext .= "<input type='hidden' name='setlanguage' value='1' />"; 73 $lantext .= "</div></form>"; 74 return $lantext; 75 break; 76 77 78 79 case "clock": 80 $clock_flat = TRUE; 81 include_once(e_PLUGIN."clock_menu/clock_menu.php"); 82 return ""; 83 break; 84 85 86 87 case "welcomemessage": 88 89 return $tp->parseTemplate("{WMESSAGE}"); 90 break; 91 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |