Changeset 1533 for branches/multiuser
- Timestamp:
- 08/11/06 09:23:07 (2 years ago)
- Location:
- branches/multiuser
- Files:
-
- 3 modified
-
admin/index.php (modified) (6 diffs)
-
admin/users.php (modified) (2 diffs)
-
intl/en.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/multiuser/admin/index.php
r1530 r1533 43 43 require_once('themes.php'); 44 44 require_once('tags.php'); 45 require_once('users.php'); 45 46 require_once('../cls/wrappers/toolkit.php'); 46 47 … … 70 71 define ('CST_ADMIN_DOMAIN_THEME_OPTIONS','theme_options'); 71 72 define ('CST_ADMIN_DOMAIN_TAGS','tags'); 73 define('CST_ADMIN_DOMAIN_USERS','users'); 72 74 // OPML import target 73 75 define ('CST_ADMIN_OPML_IMPORT_WIPE',1); … … 89 91 } 90 92 set_admin_pass($admin_uname,$admin_pass); 91 } else{92 rss_login_form();93 exit();93 } else if(!rss_user_check_user_level(RSS_USER_LEVEL_BASIC)){ 94 rss_login_form(); 95 exit(); 94 96 } 95 97 } 96 98 97 99 admin_header(); 98 admin_main( $auth);100 admin_main(rss_user_level()); 99 101 admin_footer(); 100 102 … … 139 141 $show = theme_options_admin(); 140 142 break; 143 case CST_ADMIN_DOMAIN_USERS: 144 $show = users_admin(); 145 break; 141 146 default: 142 147 break; … … 187 192 theme_options(); 188 193 break; 194 case CST_ADMIN_DOMAIN_USERS: 195 users(); 196 break; 189 197 default: 190 198 } … … 225 233 array (CST_ADMIN_DOMAIN_FOLDER, LBL_ADMIN_DOMAIN_FOLDER_LBL), 226 234 array (CST_ADMIN_DOMAIN_OPML, LBL_ADMIN_DOMAIN_LBL_OPML_LBL), 227 array (CST_ADMIN_DOMAIN_TAGS, LBL_TAG_TAGS)) as $item) { 235 array (CST_ADMIN_DOMAIN_TAGS, LBL_TAG_TAGS), 236 array (CST_ADMIN_DOMAIN_USERS, LBL_ADMIN_USERS)) as $item) { 228 237 229 238 $link = "index.php?view=".$item[0]; -
branches/multiuser/admin/users.php
r1441 r1533 97 97 ."<legend>" . LBL_ADMIN_LOGIN . "</legend>\n" 98 98 ."<p><label style=\"display:block\" for=\"username\">".LBL_USERNAME.":</label>\n" 99 ."<input type=\"text\" id=\"username\" name=\"username\" /></p>\n"99 ."<input type=\"text\" id=\"username\" name=\"username\" value=\"$uname\" /></p>\n" 100 100 ."<p><label style=\"display:block\" for=\"password\">".LBL_PASSWORD.":</label>\n" 101 ."<input type=\"password\" id=\"password\" name=\"password\" /></p>\n"101 ."<input type=\"password\" id=\"password\" name=\"password\" value=\"$pass\" /></p>\n" 102 102 ."<p id=\"admin_login_submit\"><input type=\"submit\" value=\"".LBL_LOG_IN."\" /></p>\n" 103 103 ."<span style=\"display:inline;\" id=\"admin_login_result\"></span>\n" … … 110 110 } 111 111 112 113 function users(){ 114 echo "<h2 class=\"trigger\">".LBL_ADMIN_USERS."</h2>\n"; 115 if(rss_user_check_user_level(RSS_USER_LEVEL_ADMIN)){ 116 // TODO: we need more labels here 117 echo "<table>\n" 118 ."<tr>\n" 119 ."\t<th>" . LBL_USERNAME . "</th>\n" 120 ."\t<th></th>\n" 121 ."\t<th></th>\n" 122 ."\t<th></th>\n" 123 ."</tr>\n"; 124 $sql = "select uid, uname, realname, ulevel, lastlogin from " .getTable("users"); 125 $res = rss_query($sql); 126 $cntr = 0; 127 while (list($uid, $uname, $realname, $ulevel, $lastlogin) = rss_fetch_row($res)){ 128 $class_ = (($cntr++ % 2 == 0)?"even":"odd"); 129 echo "<tr class=\"$class_\" id=\"u$uid\">\n" 130 ."\t<td>$uname</td>\n" 131 ."\t<td>$realname</td>\n" 132 ."\t<td>$ulevel</td>\n" 133 ."\t<td>$lastlogin</td>\n" 134 ."</tr>\n"; 135 } 136 echo "</table>\n"; 137 // TODO: add new user dialog 138 }else if($auth_level == RSS_USER_LEVEL_BASIC){ 139 // TODO: allow user to edit own profile 140 } 141 } 142 143 function users_admin(){ 144 // perform actions 145 } 112 146 ?> -
branches/multiuser/intl/en.php
r1502 r1533 305 305 define ('LBL_FLAG','Flagged'); 306 306 307 define('LBL_ADMIN_USERS','Users'); 307 308 ?>
