当前位置: 首页>>代码示例>>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;未经允许,请勿转载。