Changeset 2071 in ExiteCMS
- Timestamp:
- 11/26/08 16:24:46 (3 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
administration/administrators.php (modified) (1 diff)
-
includes/core_functions.php (modified) (1 diff)
-
includes/session_functions.php (modified) (3 diffs)
-
includes/templates/admin.administrators.tpl (modified) (2 diffs)
-
themes (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/administrators.php
r2033 r2071 81 81 82 82 // get the list of members with administrator or webmaster level 83 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_ level>='102' AND user_status = '0' ORDER BY user_level DESC, user_name");83 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_status = '0' ORDER BY user_level DESC, user_name"); 84 84 $variables['admins'] = array(); 85 while ($data = dbarray($result)) {86 $data['user_rights'] = $data['user_rights'] ? str_replace(".", " ", $data['user_rights']) : "".$locale['405'];87 $data['user_level'] = getuserlevel($data['user_level']);88 if ($data['user_id'] == "1" || $data['user_id'] == $userdata['user_id']) {89 // no editing of the webmaster or the members own rights90 $data['can_edit'] = false;91 } elseif ($data['user_level'] != "103") {92 // admins can always be edited93 $data['can_edit'] = true;94 } else {95 // catch-all, no editing possible!96 $data['can_edit'] = false;97 }98 $variables['admins'][] = $data;99 }100 101 // get the list of all members (remove the user himself from the list!)102 $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_status = '0' ORDER BY user_name");103 85 $variables['users'] = array(); 104 86 while ($data = dbarray($result)) { 105 if ($data['user_id'] != $userdata['user_id']) $variables['users'][] = $data; 87 if ($data['user_level'] >= 102) { 88 // it's a webmaster or administrator 89 $data['user_rights'] = $data['user_rights'] ? str_replace(".", " ", $data['user_rights']) : "".$locale['405']; 90 $data['user_level'] = getuserlevel($data['user_level']); 91 if ($data['user_id'] == "1" || $data['user_id'] == $userdata['user_id']) { 92 // no editing of the webmaster or the members own rights 93 $data['can_edit'] = false; 94 } elseif ($data['user_level'] != "103") { 95 // admins can always be edited 96 $data['can_edit'] = true; 97 } else { 98 // catch-all, no editing possible! 99 $data['can_edit'] = false; 100 } 101 $variables['admins'][] = $data; 102 } else { 103 // it's a member 104 $variables['users'][] = $data; 105 } 106 106 } 107 107 -
trunk/includes/core_functions.php
r2028 r2071 21 21 // disable error reporting, we don't want to give anything away 22 22 error_reporting(E_USER_ERROR); 23 24 // make sure we have enough memory to work with (independent of the php.ini setting) 25 ini_set('memory_limit', '32M'); 23 26 24 27 // check the environment to see if we can run -
trunk/includes/session_functions.php
r2019 r2071 46 46 // start the session 47 47 session_start(); 48 49 // update the timestamp of the session cookie, we want expiry after the last page load, not after the session has started! 50 setcookie(ini_get("session.name"), session_id(), time()+ini_get("session.gc_maxlifetime")); 48 51 49 52 // if the user changed the state of a panel, a cookie has been created to record the new state … … 68 71 } 69 72 73 // mark all variables in flash as used, so they get deleted at the end of this page request 74 foreach($_SESSION['_flash'] as $key => $value) { 75 $_SESSION['_flash'][$key]['used'] = true; 76 } 77 78 70 79 /*---------------------------------------------------+ 71 80 | Session related global functions | … … 123 132 return false; 124 133 } else { 125 // mark the info in the session flash as used126 $_SESSION['_flash'][$name]['used'] = true;127 134 return $_SESSION['_flash'][$name]['var']; 128 135 } -
trunk/includes/templates/admin.administrators.tpl
r1935 r2071 18 18 {* *} 19 19 {***************************************************************************} 20 {include file="_opentable.tpl" name=$_name title=$locale.400 state=$_state style=$_style}21 <table align='center' cellpadding='0' cellspacing='1' width='500' class='tbl-border'>22 <tr>23 <td class='tbl2'>24 <b>{$locale.401}</b>25 </td>26 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'>27 <b>{$locale.402}</b>28 </td>29 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'>30 <b>{$locale.403}</b>31 </td>32 </tr>33 {section name=id loop=$admins}34 <tr>35 <td class='{cycle values='tbl1,tbl2' advance=no}'>36 <span title='{$admins[id].user_rights}' style='cursor:hand;'>{$admins[id].user_name}</span>37 </td>38 <td align='center' width='1%' class='{cycle values='tbl1,tbl2' advance=no}' style='white-space:nowrap'>39 {$admins[id].user_level}40 </td>41 <td align='center' width='1%' class='{cycle values='tbl1,tbl2'}' style='white-space:nowrap'>42 {if $admins[id].can_edit && $admins[id].user_id != "1"}43 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&edit={$admins[id].user_id}'><img src='{$smarty.const.THEME}images/page_edit.gif' alt='{$locale.406}' title='{$locale.406}' /></a> 44 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&remove={$admins[id].user_id}'><img src='{$smarty.const.THEME}images/page_delete.gif' alt='{$locale.407}' title='{$locale.407}' /></a>45 {/if}46 </td>47 </tr>48 {/section}49 {section name=id loop=$users}50 {if $smarty.section.id.first}51 <tr>52 <td align='center' colspan='3' class='tbl1'>53 <form name='adminform' method='post' action='{$smarty.const.FUSION_SELF}{$aidlink}'>54 <select name='user_id' class='textbox'>55 {/if}56 <option value='{$users[id].user_id}'>{$users[id].user_name}</option>57 {if $smarty.section.id.last}58 </select>59 <input type='submit' name='edit_rights' value='{$locale.410}' class='button' />60 <br />61 <input type='checkbox' name='all_rights' value='1' /> {$locale.411}62 {if $userdata.user_id == "1"}63 <br />64 <input type='checkbox' name='make_super' value='1' /> {$locale.user3|string_format:$locale.412}65 {/if}66 </form>67 </td>68 </tr>69 {/if}70 {/section}71 </table>72 {include file="_closetable.tpl"}73 20 {if $show_edit_panel} 74 21 {assign var='page' value=''} … … 129 76 {/if} 130 77 {/section} 78 {else} 79 {include file="_opentable.tpl" name=$_name title=$locale.400 state=$_state style=$_style} 80 <table align='center' cellpadding='0' cellspacing='1' width='500' class='tbl-border'> 81 <tr> 82 <td class='tbl2'> 83 <b>{$locale.401}</b> 84 </td> 85 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 86 <b>{$locale.402}</b> 87 </td> 88 <td align='center' width='1%' class='tbl2' style='white-space:nowrap'> 89 <b>{$locale.403}</b> 90 </td> 91 </tr> 92 {section name=id loop=$admins} 93 <tr> 94 <td class='{cycle values='tbl1,tbl2' advance=no}'> 95 <span title='{$admins[id].user_rights}' style='cursor:hand;'>{$admins[id].user_name}</span> 96 </td> 97 <td align='center' width='1%' class='{cycle values='tbl1,tbl2' advance=no}' style='white-space:nowrap'> 98 {$admins[id].user_level} 99 </td> 100 <td align='center' width='1%' class='{cycle values='tbl1,tbl2'}' style='white-space:nowrap'> 101 {if $admins[id].can_edit && $admins[id].user_id != "1"} 102 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&edit={$admins[id].user_id}'><img src='{$smarty.const.THEME}images/page_edit.gif' alt='{$locale.406}' title='{$locale.406}' /></a> 103 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&remove={$admins[id].user_id}'><img src='{$smarty.const.THEME}images/page_delete.gif' alt='{$locale.407}' title='{$locale.407}' /></a> 104 {/if} 105 </td> 106 </tr> 107 {/section} 108 {section name=id loop=$users} 109 {if $smarty.section.id.first} 110 <tr> 111 <td align='center' colspan='3' class='tbl1'> 112 <form name='adminform' method='post' action='{$smarty.const.FUSION_SELF}{$aidlink}'> 113 <select name='user_id' class='textbox'> 114 {/if} 115 <option value='{$users[id].user_id}'>{$users[id].user_name}</option> 116 {if $smarty.section.id.last} 117 </select> 118 <input type='submit' name='edit_rights' value='{$locale.410}' class='button' /> 119 <br /> 120 <input type='checkbox' name='all_rights' value='1' /> {$locale.411} 121 {if $userdata.user_id == "1"} 122 <br /> 123 <input type='checkbox' name='make_super' value='1' /> {$locale.user3|string_format:$locale.412} 124 {/if} 125 </form> 126 </td> 127 </tr> 128 {/if} 129 {/section} 130 </table> 131 {include file="_closetable.tpl"} 131 132 {/if} 132 133 {literal} -
trunk/themes
- Property svn:externals
-
old new 3 3 DIV https://www.exitecms.org/svn-auth/ExiteCMS/themes/public/DIV/php-files/themes/DIV 4 4 Hezo https://www.exitecms.org/svn-auth/ExiteCMS/themes/public/Hezo/php-files/themes/Hezo 5 ChristmasDays https://www.exitecms.org/svn-auth/ExiteCMS/themes/public/ChristmasDays/php-files/themes/ChristmasDays 6 Hobugt https://www.exitecms.org/svn-auth/ExiteCMS/themes/public/Hobugt/php-files/themes/Hobugt 7 Localize https://www.exitecms.org/svn-auth/ExiteCMS/themes/public/Localize/php-files/themes/Localize 8 Luna https://www.exitecms.org/svn-auth/ExiteCMS/themes/public/Luna/php-files/themes/Luna
-
- Property svn:externals
Note: See TracChangeset
for help on using the changeset viewer.
