当前位置: 首页>>代码示例>>PHP>>正文


PHP admin_tools::EditingValue方法代码示例

本文整理汇总了PHP中admin_tools::EditingValue方法的典型用法代码示例。如果您正苦于以下问题:PHP admin_tools::EditingValue方法的具体用法?PHP admin_tools::EditingValue怎么用?PHP admin_tools::EditingValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在admin_tools的用法示例。


在下文中一共展示了admin_tools::EditingValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 function create(&$user_info, $username)
 {
     global $dataDir, $langmessage;
     //update the session files to .php files
     //changes to $userinfo will be saved by UpdateAttempts() below
     $user_info = gpsession::SetSessionFileName($user_info, $username);
     $user_file_name = $user_info['file_name'];
     $user_file = $dataDir . '/data/_sessions/' . $user_file_name;
     //use an existing session_id if the new login matches an existing session (uid and file_name)
     $sessions = gpsession::GetSessionIds();
     $uid = gpsession::auth_browseruid();
     $session_id = false;
     foreach ($sessions as $sess_temp_id => $sess_temp_info) {
         if (isset($sess_temp_info['uid']) && $sess_temp_info['uid'] == $uid && $sess_temp_info['file_name'] == $user_file_name) {
             $session_id = $sess_temp_id;
         }
     }
     //create a unique session id if needed
     if ($session_id === false) {
         do {
             $session_id = common::RandomString(40);
         } while (isset($sessions[$session_id]));
     }
     $expires = !isset($_POST['remember']);
     gpsession::cookie(gp_session_cookie, $session_id, $expires);
     //save session id
     $sessions[$session_id] = array();
     $sessions[$session_id]['file_name'] = $user_file_name;
     $sessions[$session_id]['uid'] = $uid;
     //$sessions[$session_id]['time'] = time(); //for session locking
     if (!gpsession::SaveSessionIds($sessions)) {
         return false;
     }
     //make sure the user's file exists
     $new_data = gpsession::SessionData($user_file, $checksum);
     $new_data['username'] = $username;
     $new_data['granted'] = $user_info['granted'];
     admin_tools::EditingValue($new_data);
     gpFiles::SaveArray($user_file, 'gpAdmin', $new_data);
     return $session_id;
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:41,代码来源:sessions.php

示例2: GetUsers

 function GetUsers()
 {
     $this->users = gpFiles::Get('_site/users');
     //fix the editing value
     foreach ($this->users as $username => $userinfo) {
         $userinfo += array('granted' => '');
         admin_tools::EditingValue($userinfo);
         $this->users[$username] = $userinfo;
     }
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:10,代码来源:admin_users.php

示例3: GetUsers

 function GetUsers()
 {
     global $dataDir;
     require $dataDir . '/data/_site/users.php';
     $this->users = $users;
     //fix the editing value
     foreach ($this->users as $username => $userinfo) {
         $userinfo += array('granted' => '');
         admin_tools::EditingValue($userinfo);
         $this->users[$username] = $userinfo;
     }
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:12,代码来源:admin_users.php


注:本文中的admin_tools::EditingValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。