當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PHPWS_Core::killSession方法代碼示例

本文整理匯總了PHP中PHPWS_Core::killSession方法的典型用法代碼示例。如果您正苦於以下問題:PHP PHPWS_Core::killSession方法的具體用法?PHP PHPWS_Core::killSession怎麽用?PHP PHPWS_Core::killSession使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PHPWS_Core的用法示例。


在下文中一共展示了PHPWS_Core::killSession方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: createConfig

 public function createConfig()
 {
     $this->initConfigSet();
     if (!isset($_SESSION['configSettings']['database']) || $_SESSION['configSettings']['database'] == false) {
         $this->databaseConfig();
     } else {
         $configDir = PHPWS_SOURCE_DIR . 'config/core/';
         if (is_file($configDir . 'config.php')) {
             $this->content[] = dgettext('core', 'Your configuration file already exists.');
             $this->content[] = dgettext('core', 'Remove the following file and refresh to continue:');
             $this->content[] = '<pre>' . $configDir . 'config.php</pre>';
         } elseif ($this->writeConfigFile()) {
             PHPWS_Core::killSession('configSettings');
             $this->content[] = dgettext('core', 'Your configuration file was written successfully!') . '<br />';
             $this->content[] = '<a href="index.php?step=3">' . dgettext('core', 'Move on to Step 3') . '</a>';
         } else {
             $this->content[] = dgettext('core', 'Your configuration file could not be written into the following directory:');
             $this->content[] = "<pre>{$configDir}</pre>";
             $this->content[] = dgettext('core', 'Please check your directory permissions and try again.');
             $this->content[] = '<a href="help/permissions.' . DEFAULT_LANGUAGE . '.txt">' . dgettext('core', 'Permission Help') . '</a>';
         }
     }
     $this->title = dgettext('core', 'Create Configuration File');
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:24,代碼來源:Setup.php

示例2:

<?php

/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
// Destroy unused sessions
if (PHPWS_Core::getCurrentModule() != 'users') {
    PHPWS_Core::killSession('Member_Pager');
    PHPWS_Core::killSession('All_Demo');
    PHPWS_Core::killSession('User_Manager');
    PHPWS_Core::killSession('Group_Manager');
}
Current_User::permissionMenu();
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:14,代碼來源:close.php

示例3: loadMessage

 function loadMessage()
 {
     if (isset($_SESSION['Whatsnew_Message'])) {
         $this->message = $_SESSION['Whatsnew_Message']['message'];
         if (isset($_SESSION['Whatsnew_Message']['title'])) {
             $this->title = $_SESSION['Whatsnew_Message']['title'];
         }
         PHPWS_Core::killSession('Whatsnew_Message');
     }
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:10,代碼來源:Whatsnew.php

示例4: adminAction


//.........這裏部分代碼省略.........
                 return;
             }
             User_Action::activateUser($_REQUEST['user_id'], true);
             PHPWS_Core::goBack();
             break;
             /** End User Forms * */
             /*             * ******************** Group Forms *********************** */
         /** End User Forms * */
         /*             * ******************** Group Forms *********************** */
         case 'setGroupPermissions':
             if (!Current_User::authorized('users', 'edit_permissions')) {
                 PHPWS_User::disallow();
                 return;
             }
             PHPWS_Core::initModClass('users', 'Group.php');
             $title = dgettext('users', 'Set Group Permissions') . ' : ' . $group->getName();
             $content = User_Form::setPermissions($_REQUEST['group_id'], 'group');
             break;
         case 'new_group':
             $title = dgettext('users', 'Create Group');
             $content = User_Form::groupForm($group);
             break;
         case 'edit_group':
             $title = dgettext('users', 'Edit Group');
             $content = User_Form::groupForm($group);
             break;
         case 'remove_group':
             $group->kill();
             $title = dgettext('users', 'Manage Groups');
             $content = User_Form::manageGroups();
             break;
         case 'manage_groups':
             $panel->setCurrentTab('manage_groups');
             PHPWS_Core::killSession('Last_Member_Search');
             $title = dgettext('users', 'Manage Groups');
             $content = User_Form::manageGroups();
             break;
         case 'manageMembers':
             PHPWS_Core::initModClass('users', 'Group.php');
             $title = dgettext('users', 'Manage Members') . ' : ' . $group->getName();
             $content = User_Form::manageMembers($group);
             break;
         case 'postMembers':
             if (!Current_User::authorized('users', 'add_edit_groups')) {
                 Current_User::disallow();
                 return;
             }
             $title = dgettext('users', 'Manage Members') . ' : ' . $group->getName();
             $content = User_Form::manageMembers($group);
             break;
             /*             * *********************** End Group Forms ****************** */
             /*             * *********************** Misc Forms *********************** */
         /*             * *********************** End Group Forms ****************** */
         /*             * *********************** Misc Forms *********************** */
         case 'settings':
             if (!Current_User::authorized('users', 'settings')) {
                 Current_User::disallow();
                 return;
             }
             $title = dgettext('users', 'Settings');
             $content = User_Form::settings();
             break;
             /** End Misc Forms * */
             /** Action cases * */
         /** End Misc Forms * */
         /** Action cases * */
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:67,代碼來源:Action.php

示例5: sendEmail

 /**
  * Sends everyone (limited by search) in a specific sheet an email
  */
 public function sendEmail()
 {
     PHPWS_Core::initCoreClass('Mail.php');
     if (!isset($_SESSION['Email_Applicants'])) {
         $_SESSION['Email_Applicants']['email'] =& $this->email;
         $_SESSION['Email_Applicants']['sheet_id'] = $this->sheet->id;
         $_SESSION['Email_Applicants']['search'] = @$_REQUEST['search'];
         $vars['aop'] = 'send_email';
         Layout::metaRoute(PHPWS_Text::linkAddress('signup', $vars, true), 1);
         $this->title = dgettext('signup', 'Sending emails');
         $this->content = dgettext('signup', 'Please wait');
         return;
     }
     $email_session =& $_SESSION['Email_Applicants'];
     $mail = new PHPWS_Mail();
     $mail->setSubject($email_session['email']['subject']);
     $mail->setFrom($email_session['email']['from']);
     $mail->setReplyTo($email_session['email']['from']);
     $mail->setMessageBody($email_session['email']['message']);
     $mail->sendIndividually(true);
     $this->loadSheet($email_session['sheet_id']);
     if (!$this->sheet->id) {
         $this->title = dgettext('signup', 'Sorry');
         $this->content = dgettext('signup', 'Unable to send emails. Signup sheet does not exist.');
         PHPWS_Core::killSession('Email_Applicants');
         return;
     }
     $db = new PHPWS_DB('signup_peeps');
     $db->addColumn('email');
     $db->addWhere('sheet_id', $this->sheet->id);
     if (isset($email_session['search'])) {
         $search = explode('+', $email_session['search']);
         foreach ($search as $s) {
             $db->addWhere('first_name', "%{$s}%", 'like', 'or', 1);
             $db->addWhere('last_name', "%{$s}%", 'like', 'or', 1);
         }
     }
     $result = $db->select('col');
     if (empty($result)) {
         $this->title = dgettext('signup', 'Emails not sent');
         $this->content = dgettext('signup', 'Signup sheet did not contain any applicants.');
         return;
     } elseif (PHPWS_Error::logIfError($result)) {
         $this->title = dgettext('signup', 'Emails not sent');
         $this->content = dgettext('signup', 'An error occurred when pulling applicants.');
         return;
     }
     foreach ($result as $address) {
         $mail->addSendTo($address);
     }
     $mail->send();
     $vars['aop'] = 'report';
     $vars['sheet_id'] = $this->sheet->id;
     $link = PHPWS_Text::linkAddress('signup', $vars, true);
     $this->title = dgettext('signup', 'Emails sent');
     $this->content = dgettext('signup', 'Returning to applicant listing.');
     Layout::metaRoute($link, 5);
     PHPWS_Core::killSession('Email_Applicants');
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:62,代碼來源:Signup.php

示例6: dropUser

 public function dropUser()
 {
     PHPWS_Core::killSession('User');
 }
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:4,代碼來源:xmlrpc.php


注:本文中的PHPWS_Core::killSession方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。