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


PHP session::del方法代码示例

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


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

示例1: logout

 /**
  *	Log out user
  */
 public static function logout()
 {
     session::del(array('uid', 'ulogin', 'uhash'), AUTH_DI);
     // Get instance of authentification data interface
     $auth = data_interface::get_instance(AUTH_DI);
     $auth->is_logged = FALSE;
 }
开发者ID:rigidus,项目名称:SBIN-DIESEL,代码行数:10,代码来源:authenticate.lib.php

示例2: logout_action

 function logout_action() {
     cookie::del('login_username');
     cookie::del('login_password');
     session::del('username');
     session::del('roles');
     require_once ROOT.'/celive/include/config.inc.php';
     require_once ROOT.'/celive/include/celive.class.php';
     $login=new celive();
     $login->auth();
     $GLOBALS['auth']->logout();
     $GLOBALS['auth']->check_logout1();
     front::redirect(url::create('index'));
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:13,代码来源:index_admin.php

示例3: edit_action

 function edit_action() {
     if (front::post('submit') &&$this->manage->vaild()) {
         $this->manage->filter($this->Exc);
         $this->manage->edit_before();
         $this->manage->save_before();
         $update=$this->_table->rec_update(front::$post,front::get('id'));
         if ($update <1) {
             front::flash("{$this->tname}修改失败!");
         }
         else {
             $this->manage->save_after(front::get('id'));
             $info='';
             front::flash("{$this->tname}修改成功!$info");
             $from=session::get('from');
             session::del('from');
             if (!front::post('onlymodify')) front::redirect(url::modify('act/list',true));
         }
     }
     if (!session::get('from')) session::set('from',front::$from);
     if (!front::get('id')) exit("PAGE_NOT FOUND!");
     $this->_view_table=$this->_table->getrow(front::get('id'),'1',$this->_table->getcols('modify'));
     if (!is_array($this->_view_table)) exit("PAGE_NOT FOUND!");
     $this->manage->view_before($this->_view_table);
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:24,代码来源:logistics_admin.php

示例4: save_after

 function save_after($aid) {
     //$tag=preg_replace('/\s+/',' ',trim(front::$post['tag']));
     $tags=explode(',',trim(front::$post['tag']));
     //var_dump($tags);
     $tag_table=new tag();
     $arctag_table=new arctag();
     foreach($tags as $tag) {
         if($tag)
             if(!$tag_table->getrow('tagname="'.$tag.'"'))
                 $tag_table->rec_insert(array('tagname'=>$tag));
         $tag=$tag_table->getrow('tagname="'.$tag.'"');
         $arctag_table->rec_replace(array('aid'=>$aid,'tagid'=>$tag['tagid']));
     }
     //exit;
     $doit = false;
     if(session::get('attachment_id') ||front::post('attachment_id')) {
         $attachment_id=session::get('attachment_id')?session::get('attachment_id'):front::post('attachment_id');
         $attachment=new attachment();
         $attachment->rec_update(array('aid'=>$aid,'intro'=>front::post('attachment_intro')),$attachment_id);
         $doit = true;
         if(session::get('attachment_id')) session::del('attachment_id');
     }
     if(front::post('attachment_path') != '' && $doit == false) {
         $attachment=new attachment();
         $attachment->rec_insert(array('aid'=>$aid,'path'=>front::post('attachment_path'),'intro'=>front::post('attachment_intro'),'adddate'=>date('Y-m-d H:i:s')));
         $doit = false;
     }
     if(front::post('_ranks')) {
         $_ranks=serialize(front::post('_ranks'));
         $rank=new rank();
         if(is_array($rank->getrow(array('aid'=>$aid))))
             $rank->rec_update(array('ranks'=>$_ranks),'aid='.$aid);
         else
             $rank->rec_insert(array('aid'=>$aid,'ranks'=>$_ranks));
     }
     else {
         $rank=new rank();
         $rank->rec_delete('aid='.$aid);
     }
     if(front::post('vote')) {
         $votes=front::$post['vote'];
         $images=front::$post['vote_image'];
         $vote=new vote();
         $_vote=$vote->getrow('aid='.$aid);
         if(!$_vote) $_vote=array('aid'=>$aid);
         $_vote['titles']=serialize($votes);
         $_vote['images']=serialize($images);
         $vote->rec_replace($_vote,$aid);
     }
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:50,代码来源:table_archive.php

示例5: showflash

 static function showflash($key='message') {
     $message=session::get($key);
     session::del($key);
     return $message;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:5,代码来源:front_class.php

示例6: index_action

 function index_action() {
     session::del('mod');
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:3,代码来源:map_admin.php

示例7: PUT_phoneAction

 /**
  * 修改用户手机
  * PUT /user/1/phone {code:"C09E"}
  * @method GET_infoAction
  * @param  integer        $id [description]
  * @author NewFuture
  */
 public function PUT_phoneAction($id = 0)
 {
     $id = $this->auth($id);
     $response['status'] = 0;
     if (!Input::put('code', $code, 'ctype_alnum')) {
         $response['info'] = '验证码格式不对';
     } elseif (!($verify = Session::get('code_phone'))) {
         $response['info'] = '验证码已过期,请重新生成';
     } elseif (!Safe::checkTry('phone_code_' . $id)) {
         $response['info'] = '此验证码尝试次数过多,请重新发送短信';
         Session::del('code_phone');
     } elseif (key($verify) != strtoupper($code)) {
         $response['info'] = '验证码错误';
     } else {
         session::del('code_phone');
         Safe::del('phone_code_' . $id);
         $phone = $verify[strtoupper($code)];
         //读取号码
         if (UserModel::SavePhone($phone)) {
             $response['info'] = '手机号已经更新';
             $response['status'] = 1;
         } else {
             $response['info'] = '手机号保存失败';
         }
     }
     $this->response = $response;
 }
开发者ID:derek-chow,项目名称:YunYinService,代码行数:34,代码来源:User.php

示例8: mail_action

 function mail_action() {
 	chkpw('seo_mail_usersend');
     $where=null;
     $ordre='1 desc';
     if ($this->table == 'archive') {
         $ordre="`order`,1 DESC";
         $where=$this->_table->get_where('manage');
         if (!front::post('_typeid'))
             session::del('_typeid');
         if (get('_typeid')) {
             $typeid=get('_typeid');
             session::set('_typeid',$typeid);
             $this->type=type::getInstance();
             $types=$this->type->sons($typeid);
             $types[]=$typeid;
             $where .=' and typeid in('.trim(implode(',',$types),',').')';
         }
         if (get('typeid')) {
             $typeid=get('typeid');
             $where .=' and typeid='.$typeid;
         }
         if (!front::post('_title'))
             session::del('_title');
         if (get('_title')) {
             $title=get('_title');
             session::set('_title',$title);
             $where .=" and title like '%$title%' ";
         }
     }
     if ($this->table == 'templatetag') {
         if (front::get('tagfrom')) {
             $where="tagfrom='".front::get('tagfrom')."'";
         }
         else
             $where="tagfrom='define'";
         $where .=" and (`tagvar` IS NULL OR `tagvar` = '') ";
     }
     if ($this->table == 'option') {
         $ballot=new ballot();
         $where=array('bid'=>front::$get['bid']);
         session::set('bid',front::$get['bid']);
         $row=$ballot->getrow(array('id'=>front::$get['bid']));
         $this->view->ballot=$row;
     }
     $limit=((front::get('page') -1) * $this->_pagesize).','.$this->_pagesize;
     $this->_view_table=$this->_table->getrows($where,$limit,$ordre,$this->_table->getcols('manage'));
     $this->view->record_count=$this->_table->record_count;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:48,代码来源:table_admin.php

示例9: edit_action

 function edit_action() {
     $from=session::get('from');
     front::check_type(front::get('id'));
     if(front::post('submit') &&$this->manage->vaild()) {
         $this->manage->filter();
         $info=$this->_table->getrow(front::get('id'));
         if($info['userid'] != $this->view->user['userid'] ) {
             front::flash('记录修改失败!(原因:未经授权!)');
             header("Location: ".$from,TRUE,302);
             exit;
         }
         if($info['checked']) {
             front::flash('记录修改失败!(原因:已通过审核!)');
             header("Location: ".$from,TRUE,302);
             exit;
         }
         $this->manage->save_before();
         $data=array();
         $fieldlimit=$this->_table->getcols(front::$act=='list'?'user_manage':'user_modify');
         $fieldlimits=explode(',',$fieldlimit);
         foreach(front::$post as $key=>$value) {
         	if(preg_match('/(select|union|and|\'|"|\))/i',$value)){
         		exit('非法参数');
         	}
             if(in_array($key,$fieldlimits))
                 $data[$key]=$value;
         }
         $update=$this->_table->rec_update($data,front::get('id'));
         if($update<1) {
             front::flash(lang('记录修改失败!'));
         }
         else {
             front::flash(lang('记录修改成功!'));
             $from=session::get('from');
             session::del('from');
             header("Location: ".$from,TRUE,302);
             exit;
         }
     }
     if(!session::get('from')) session::set('from',front::$from);
     $this->_view_table=$this->_table->getrow(front::get('id'),'1',$this->_table->getcols('modify'));
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:42,代码来源:manage_act.php

示例10: logout_action

 function logout_action() {
     cookie::del('login_username');
     cookie::del('login_password');
     session::del('username');
     front::redirect(url::create('user/login'));
     exit;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:7,代码来源:user_act.php

示例11: edit_action

 function edit_action() {
     if (front::post('submit') &&$this->manage->vaild()) {
         $this->manage->filter($this->Exc);
         $this->manage->edit_before();
         $this->manage->save_before();
         front::$post['ologin_config'] = array();
         if (isset(front::$post['cfg_value']) &&is_array(front::$post['cfg_value'])) {
             for ($i = 0;$i <count(front::$post['cfg_value']);$i++) {
                 $ologin_config[] = array('name'=>trim(front::$post['cfg_name'][$i]),
                         'type'=>trim(front::$post['cfg_type'][$i]),
                         'value'=>trim(front::$post['cfg_value'][$i])
                 );
             }
         }
         front::$post['ologin_config'] = serialize($ologin_config);
         front::$post['enabled'] = 1;
         $update=$this->_table->rec_update(front::$post,front::get('id'));
         if ($update <1) {
             front::flash("{$this->tname}修改失败!");
         }
         else {
             $this->manage->save_after(front::get('id'));
             $info='';
             front::flash("{$this->tname}修改成功!$info");
             $from=session::get('from');
             session::del('from');
             if (!front::post('onlymodify')) front::redirect(url::modify('act/list',true));
         }
     }
     if (!session::get('from')) session::set('from',front::$from);
     if (!front::get('id')) exit("PAGE_NOT FOUND!");
     $this->_view_table=$this->_table->getrow(front::get('id'),'1',$this->_table->getcols('modify'));
     $set_modules = true;
     global $_LANG;
     include_once(ROOT.'/lib/plugins/ologin/'.$this->_view_table['ologin_code'].'.php');
     $data = $modules[0];
     $ologin = $this->_view_table;
     if (is_string($ologin['ologin_config'])) {
         $store = unserialize($ologin['ologin_config']);
         $code_list = array();
         foreach ($store as $key=>$value) {
             $code_list[$value['name']] = $value['value'];
         }
         $ologin['ologin_config'] = array();
         foreach ($data['config'] as $key =>$value) {
             $ologin['ologin_config'][$key]['desc'] = (isset($_LANG[$value['name'] .'_desc'])) ?$_LANG[$value['name'] .'_desc'] : '';
             $ologin['ologin_config'][$key]['label'] = $_LANG[$value['name']];
             $ologin['ologin_config'][$key]['name'] = $value['name'];
             $ologin['ologin_config'][$key]['type'] = $value['type'];
             if (isset($code_list[$value['name']])) {
                 $ologin['ologin_config'][$key]['value'] = $code_list[$value['name']];
             }
             else {
                 $ologin['ologin_config'][$key]['value'] = $value['value'];
             }
             if ($ologin['ologin_config'][$key]['type'] == 'select'||
                     $ologin['ologin_config'][$key]['type'] == 'radiobox') {
                 $ologin['ologin_config'][$key]['range'] = $_LANG[$ologin['ologin_config'][$key]['name'] .'_range'];
             }
         }
     }
     if (!is_array($this->_view_table)) exit("PAGE_NOT FOUND!");
     $this->_view_table['ologincfg'] = unserialize($this->_view_table['ologincfg']);
     $this->_view_table['ologin'] = $ologin;
     $this->manage->view_before($this->_view_table);
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:66,代码来源:ologin_admin.php

示例12: ImageOK

var FCKDialog		= E.FCKDialog ;
var FCKBrowserInfo	= E.FCKBrowserInfo ;
var FCKConfig		= E.FCKConfig ;*/

/*var oEditor= window.parent.InnerDialogLoaded() ;
var oDOM= oEditor.FCK.EditorDocument ;
var FCK = oEditor.FCK;
var FCKDialog	=  oEditor.FCKDialog ;
*/
var oEditor= window.parent.InnerDialogLoaded() ;
var FCKeditorAPI=oEditor.FCKeditorAPI;
<?php
$fcid=session::get('fcid');
if(!$fcid || time()>session::get('fcid_life')) $fcid='content';
session::del('fcid');
session::del('fcid_life');
?>
var FCKoEditor = FCKeditorAPI.GetInstance('{$fcid}');

function ImageOK(img)
{
	inImg  = '<img src="'+img+'"/>';
	FCKoEditor.InsertHtml(inImg) ;
	window.parent.Cancel();

/*	//获得焦点,否则图片会飞出去~
	FCKoEditor.Focus();
	if(document.all) oDOM.selection.createRange().pasteHTML(inImg);
	else FCK.InsertHtml(inImg);
	window.parent.Cancel();*/
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:30,代码来源:fckupload.php


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