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


PHP Get::kill方法代码示例

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


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

示例1: moderate_mail

 /** Register a moderation decision.
  * @param $mlist MailingList: the mailing list being moderated
  * @param $mid int: the message being moderated
  */
 protected function moderate_mail($mlist, $mid)
 {
     if (Env::has('mok')) {
         $action = 'accept';
     } elseif (Env::has('mno')) {
         $action = 'refuse';
     } elseif (Env::has('mdel')) {
         $action = 'delete';
     } else {
         return false;
     }
     Get::kill('mid');
     return XDB::execute("INSERT IGNORE INTO  email_list_moderate\n                                         VALUES  ({?}, {?}, {?}, {?}, {?}, NOW(), {?}, NULL)", $mlist->mbox, $mlist->domain, $mid, S::i('uid'), $action, Post::v('reason'));
 }
开发者ID:Ekleog,项目名称:platal,代码行数:18,代码来源:lists.php

示例2: startSessionAs

 protected function startSessionAs($user, $level)
 {
     // The user must have 'groups' permission to access X.net
     if (!$user->checkPerms('groups')) {
         return false;
     }
     if ($level == AUTH_SUID) {
         S::set('auth', AUTH_PASSWD);
     }
     S::set('uid', $user->uid);
     S::set('hruid', $user->hruid);
     // XXX: Transition code, should not be in session anymore
     S::set('display_name', $user->display_name);
     S::set('full_name', $user->full_name);
     S::set('femme', $user->isFemale());
     S::set('email_format', $user->email_format);
     S::set('token', $user->token);
     S::set('perms', $user->perms);
     S::set('is_admin', $user->is_admin);
     // Add the 'user' perms to the user.
     $this->makePerms($user->perms, $user->is_admin);
     S::kill('challenge');
     S::kill('loginX');
     S::kill('may_update');
     S::kill('is_member');
     Get::kill('uid');
     Get::kill('PHPSESSID');
     $args = array();
     foreach ($_GET as $key => $val) {
         $args[] = urlencode($key) . '=' . urlencode($val);
     }
     return true;
 }
开发者ID:Ekleog,项目名称:platal,代码行数:33,代码来源:xnetsession.php

示例3: handler_admin

 function handler_admin($page)
 {
     $page->changeTpl('xnet/admin.tpl');
     if (Get::has('del')) {
         $res = XDB::query('SELECT id, nom, mail_domain
                                        FROM groups WHERE diminutif={?}', Get::v('del'));
         list($id, $nom, $domain) = $res->fetchOneRow();
         $page->assign('nom', $nom);
         if ($id && Post::has('del')) {
             S::assert_xsrf_token();
             XDB::query('DELETE FROM group_members WHERE asso_id={?}', $id);
             $page->trigSuccess('membres supprimés');
             if ($domain) {
                 XDB::execute('DELETE  v
                                 FROM  email_virtual         AS v
                           INNER JOIN  email_virtual_domains AS d ON (v.domain = d.id)
                                WHERE  d.name = {?}', $domain);
                 XDB::execute('DELETE FROM  email_virtual_domains
                                     WHERE  name = {?}', $domain);
                 $page->trigSuccess('suppression des alias mails');
                 $mmlist = new MMList(S::v('uid'), S::v('password'), $domain);
                 if ($listes = $mmlist->get_lists()) {
                     foreach ($listes as $l) {
                         $mmlist->delete_list($l['list'], true);
                     }
                     $page->trigSuccess('mail lists surpprimées');
                 }
             }
             XDB::query('DELETE FROM groups WHERE id={?}', $id);
             $page->trigSuccess("Groupe {$nom} supprimé");
             Get::kill('del');
         }
         if (!$id) {
             Get::kill('del');
         }
     }
     if (Post::has('diminutif') && Post::v('diminutif') != "") {
         S::assert_xsrf_token();
         $res = XDB::query('SELECT  COUNT(*)
                              FROM  groups
                             WHERE  diminutif = {?}', Post::v('diminutif'));
         if ($res->fetchOneCell() == 0) {
             XDB::execute('INSERT INTO  groups (id, diminutif)
                                VALUES  (NULL, {?})', Post::v('diminutif'));
             pl_redirect(Post::v('diminutif') . '/edit');
         } else {
             $page->trigError('Le diminutif demandé est déjà pris.');
         }
     }
     $res = XDB::query('SELECT  nom, diminutif
                          FROM  groups
                      ORDER BY  nom');
     $page->assign('assos', $res->fetchAllAssoc());
 }
开发者ID:Ekleog,项目名称:platal,代码行数:54,代码来源:xnet.php


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