本文整理汇总了PHP中front::refresh方法的典型用法代码示例。如果您正苦于以下问题:PHP front::refresh方法的具体用法?PHP front::refresh怎么用?PHP front::refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类front
的用法示例。
在下文中一共展示了front::refresh方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: remotelogin_action
function remotelogin_action() {
cookie::del('passinfo');
$this->view->loginfalse=cookie::get('loginfalse'.md5($_SERVER['REQUEST_URI']));
if (front::$args) {
$user=new user();
$args = xxtea_decrypt(base64_decode(front::$args), config::get('cookie_password'));
$user=$user->getrow(unserialize($args));
if (is_array($user)) {
if ($user['groupid'] == '888')
front::$isadmin=true;
cookie::set('login_username',$user['username']);
cookie::set('login_password',front::cookie_encode($user['password']));
session::set('username',$user['username']);
require_once ROOT.'/celive/include/config.inc.php';
require_once ROOT.'/celive/include/celive.class.php';
$login=new celive();
$login->auth();
$GLOBALS['auth']->remotelogin($user['username'],$user['password']);
$GLOBALS['auth']->check_login1();
front::$user=$user;
}elseif (!is_array(front::$user) ||!isset(front::$isadmin)) {
cookie::set('loginfalse'.md5($_SERVER['REQUEST_URI']),(int) cookie::get('loginfalse'.md5($_SERVER['REQUEST_URI'])) +1,time() +3600);
event::log('loginfalse','失败 user='.$user['username']);
front::flash('密码错误或不存在该管理员!');
front::refresh(url('admin/login',true));
}
}
$this->render();
}
示例2: batch_action
function batch_action(){
if(front::post('batch') == 'delete'){
$sql = "DELETE FROM `".config::get('database', 'prefix')."event`";
$this->_table->query($sql);
event::log('日志清除','成功');
front::refresh(url::modify('act/manage',true));
}
}
示例3: deletewebsite_action
function deletewebsite_action() {
chkpw('website_del');
$path = ROOT.'/config/website/'.front::$get['id'].'.php';
@unlink($path);
$path = ROOT.'/config/help_'.front::$get['id'].'.php';
@unlink($path);
echo '<script type="text/javascript">alert("操作完成!")</script>';
front::refresh(url('website/listwebsite',true));
}
示例4: add_action
function add_action() {
if (front::post('submit') &&$this->manage->vaild()) {
$this->manage->filter($this->Exc);
$this->manage->add_before($this);
$this->manage->save_before();
$insert=$this->_table->rec_insert(front::$post);
$_insertid = $this->_table->insert_id();
if ($insert <1) {
front::flash("{$this->tname}添加失败!");
}
else {
$this->manage->save_after($_insertid);
$info='';
front::flash("{$this->tname}添加成功!$info");
front::refresh(url::modify('act/list',true));
}
}
$this->_view_table=array();
$this->_view_table['data']=array();
}
示例5: orders_action
//.........这里部分代码省略.........
if (front::$post['payname'] && front::$post['payname'] != 'nopay') {
echo '<script type="text/javascript">alert("' . lang('orderssuccess') . ' ' . lang('现在转入支付页面') . '");window.location.href="' . url('archive/payorders/oid/' . front::$post['oid'], true) . '";</script>';
}
echo '<script type="text/javascript">alert("' . lang('orderssuccess') . '");window.location.href="' . url('archive/orders/oid/' . front::$post['oid'], true) . '";</script>';
}
} elseif (front::get('oid')) {
preg_match_all("/-(.*)-(.*)-(.*)/isu", front::get('oid'), $oidout);
$this->view->paytype = $oidout[3][0];
if($oidout[2][0] != $this->view->user['userid']){
alertinfo('查看订单失败', url::create('index/index'));
}
$where = array();
$where['oid'] = front::get('oid');
$this->view->orders = orders::getInstance()->getrow($where);
$this->view->statusnum = $data['status'] = $this->view->orders['status'];
switch ($data['status']) {
case 1:
$data['status'] = lang('完成');
break;
case 2:
$data['status'] = lang('处理中');
break;
case 3:
$data['status'] = lang('已发货');
break;
case 4:
$data['status'] = lang('客户已付款,待审核');
break;
case 5:
$data['status'] = lang('已核实客户支付');
break;
default:
$data['status'] = lang('新订单');
break;
}
$this->view->orders['status'] = $data['status'];
if ($this->view->paytype) {
$this->view->gotopaygateway = '<a href="' . url('archive/payorders/oid/' . front::get('oid'), true) . '">进入支付页面</a>';
}
//var_dump($this->view->user);var_dump($_SESSION);exit();
$this->out('message/orderssuccess.html');
} elseif (front::get('aid')) {
$this->view->archive = archive::getInstance()->getrow(front::get('aid'));
$this->view->categorys = category::getpositionlink2($this->view->archive['catid']);
$this->view->paylist = pay::getInstance()->getrows('', 50);
$this->view->logisticslist = logistics::getInstance()->getrows('', 50);
$prices = getPrices($this->view->archive['attr2']);
$this->view->archive['attr2'] = $prices['price'];
if (!is_array($this->view->archive))
$this->out('message/error.html');
if ($this->view->archive['checked'] < 1)
exit(lang('未审核!'));
if (!rank::arcget(front::get('aid'), $this->view->usergroupid)) {
$this->out('message/error.html');
}
} else {
$oreders_c = cookie::get('ce_orders_cookie');
if(preg_match('/union/i', $oreders_c)){
alerterror("非法字符");
}
$oreders_c = stripslashes(htmlspecialchars_decode($oreders_c));
$aid = !empty($oreders_c) ? unserialize($oreders_c) : 0;
if ($aid) {
foreach ($aid as $key => $val) {
$archive = archive::getInstance()->getrow(intval($val['aid']));
$val['title'] = $archive['title'];
$prices = getPrices($archive['attr2']);
$val['attr2'] = $prices['price'];
$aid[$key] = $val;
}
$this->view->orderaidlist = $aid;
$this->view->paylist = pay::getInstance()->getrows('', 50);
$this->view->logisticslist = logistics::getInstance()->getrows('', 50);
} else {
if (isset(front::$get['oid'])) {
//echo '<script type="text/javascript">alert("' . lang('请输入订单编号!') . '");';
if ($_SERVER['HTTP_REFERER']) {
front::refresh($_SERVER['HTTP_REFERER']);
//echo 'window.location.href="' . $_SERVER['HTTP_REFERER'] . '";';
} else {
front::refresh(url('index'));
//echo 'window.location.href="' . url('index') . '";';
}
//echo '</script>';
exit;
}
echo '<script type="text/javascript">alert("' . lang('购物车暂无商品!') . '");';
if ($_SERVER['HTTP_REFERER']) {
//front::refresh($_SERVER['HTTP_REFERER']);
echo 'window.location.href="' . $_SERVER['HTTP_REFERER'] . '";';
} else {
//front::refresh(url('index'));
echo 'window.location.href="' . url('index') . '";';
}
echo '</script>';
}
}
}
示例6: add_action
//.........这里部分代码省略.........
$img_arr = image_admin::listimg_action();
foreach($img_arr as $v){
echo '<img src="upload/images/'.front::$get['dir'].'/'.$v.'" id="img'.str_replace('.','',$v).'" onClick="select_img(\'img'.str_replace('.','',$v).'\');" />';
}
exit();
}
if (front::post('submit') &&$this->manage->vaild()) {
$this->manage->filter($this->Exc);
$this->manage->add_before($this);
$this->manage->save_before();
front::$post['catname']=str_replace(' ',' ',front::$post['catname']);
front::$post['htmldir']=str_replace(' ','_',front::$post['htmldir']);
if(front::$post['introduce'] == ''){
front::$post['introduce'] = tool::cn_substr(preg_replace('/&(.*?);/is','', strip_tags(front::$post['content'])),200);
}
if($this->table == 'user'){
//var_dump($_SESSION);
if(!Phpox_token::is_token('user_add', front::$post['token'])){
exit('非法参数');
}
}
if ($this->table == 'templatetag') {
if(front::$post['tagfrom']!='define' && !preg_match('/^tag_(.*?)+\.html$/is', front::$post['tagtemplate'])){
exit('参数非法');
}
}
if($this->table == 'category'){
if (front::$post['addtype'] == 'single') {
if (!front::$post['htmldir']) {
front::$post['htmldir'] = pinyin::get(front::$post['catname']);
}
$insert=$this->_table->rec_insert(front::$post);
if ($insert <1) {
front::flash("{$this->tname}添加失败!");
}else{
$_insertid=$this->_table->insert_id();
$this->manage->save_after($_insertid);
}
} else {
$catearr = explode("\n", front::$post['batch_add']);
foreach ($catearr as $cates) {
$catetmp = explode("|", $cates);
if ($catetmp[0] != '') {
front::$post['catname'] = $catetmp[0];
front::$post['htmldir'] = $catetmp[1];
if ($catetmp[1] == '') {
front::$post['htmldir'] = pinyin::get($catetmp[0]);
}
$insert = $this->_table->rec_insert(front::$post);
if ($insert <1) {
front::flash("{$this->tname}添加失败!");
}else{
$_insertid=$this->_table->insert_id();
$this->manage->save_after($_insertid);
}
}
}
}
front::refresh(url::modify('act/list',true));
}else{
$insert = $this->_table->rec_insert(front::$post);
$_insertid=$this->_table->insert_id();
$this->manage->save_after($_insertid);
if ($insert <1) {
front::flash("{$this->tname}添加失败!");
}else {
event::log("添加".$this->tname,'成功');
$info='';
if ($this->table == 'archive') {
$url=url('archive/show/aid/'.$_insertid,false);
if (front::get('site') == 'default'||front::get('site') == '') {
$info='<a href="'.$url.'" target="_blank">查看</a>';
}
}
front::flash("{$this->tname}添加成功!$info");
if (front::get('type') == 'dialog') {
if ($this->table == 'option') {
front::flash();
exit('添加成功!');
}
}
if ($this->table == 'templatetag') {
front::refresh(url::modify('act/list/tagfrom/content',true));
}
else {
front::refresh(url::modify('act/list',true));
}
}
}
}
//$tag_option_info = settings::getInstance()->getrow(array('tag'=>'table-hottag'));
//$tag_option_arr = unserialize($tag_option_info['value']);
$this->_view_table=array();
$this->_view_table['data']=array();
$this->view->image_dir = image_admin::listdir_action();
$this->view->token = Phpox_token::grante_token('user_add');
//$this->view->tag_opton = explode("\n",$tag_option_arr['hottag']);
}
示例7: delete_action
function delete_action() {
$path=ROOT.'/lang/'.config::get('lang_type').'/system.php';
$lang=include $path;
event::log('删除语言包','成功');
exit;
front::refresh(url('language/edit',true));
}
示例8: register_action
function register_action() {
$r = $this->_union->getrow(array('userid'=>$this->view->data['userid']));
if($r) {
echo '<script type="text/javascript">alert("'.lang('你已经申请,转入联盟页面!').'")</script>';
front::refresh(url::create('union/stats'));
}
if(front::post('submit')) {
if(!config::get('reg_on')) {
front::flash(lang('网站已经关闭注册!'));
return;
}
if(config::get('verifycode')) {
if(!session::get('verify') ||front::post('verify')<>session::get('verify')) {
front::flash(lang('验证码错误!'));
return;
}
}
if(front::post('nickname') != strip_tags(front::post('nickname'))
||front::post('nickname') != htmlspecialchars(front::post('nickname'))
) {
front::flash(lang('姓名不规范!'));
return;
}
if(strlen(front::post('nickname'))<4) {
front::flash(lang('请填写认真填写真实姓名!'));
return;
}
if(strlen(front::post('payaccount'))<1) {
front::flash(lang('请填写支付账号!'));
return;
}
if(strlen(front::post('tel'))<1) {
front::flash(lang('请填写联系电话!'));
return;
}
if(strlen(front::post('address'))<1) {
front::flash(lang('请填写联系地址!'));
return;
}
if(strlen(front::post('website'))<1) {
front::flash(lang('请填写网站地址!'));
return;
}
/*if(strlen(front::post('e_mail'))<1) {
front::flash(lang('请填写邮箱!'));
return;
}*/
if(is_array($_POST)){
foreach ($_POST as $v){
if(preg_match('/(select|load_file|\[|password)/i', $v)){
exit('not access');
}
}
}
$userarr = array();
$userarr['nickname'] = front::$post['nickname'];
$userarr['tel'] = front::$post['tel'];
$userarr['address'] = front::$post['address'];
//$userarr['e_mail'] = front::$post['e_mail'];
$unionarr = array();
$unionarr['userid'] = $this->view->data['userid'];
$unionarr['username'] = $this->view->data['username'];
$unionarr['payaccount'] = front::$post['payaccount'];
$unionarr['website'] = front::$post['website'];
$unionarr['profitmargin'] = union::getconfig('profitmargin');
$unionarr['regtime'] = time();
$unionarr['regip'] = front::ip();
$unionarr['passed'] = 1;
if(front::post('nickname') &&$this->view->data['userid']) {
$insert=$this->_user->rec_update($userarr,'userid='.$this->view->user['userid']);
$insert1 = $this->_union->rec_insert($unionarr);
if($insert &&$insert1) front::flash(lang('申请成功!'));
else {
front::flash(lang('申请失败!'));
return;
}
front::redirect(url::create('union/stats'));
exit;
}
else {
front::flash(lang('申请失败!'));
return;
}
}
}
示例9: install_action
function install_action() {
if (front::post('submit') &&$this->manage->vaild()) {
$this->manage->filter($this->Exc);
$this->manage->add_before($this);
$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;
$insert=$this->_table->rec_insert(front::$post);
$_insertid = $this->_table->insert_id();
if ($insert <1) {
front::flash("{$this->tname}添加失败!");
}
else {
$this->manage->save_after($_insertid);
$info='';
front::flash("{$this->tname}添加成功!$info");
front::refresh(url::modify('act/list',true));
}
}
$set_modules = true;
global $_LANG;
include_once(ROOT.'/lib/plugins/ologin/'.front::get('name').'.php');
$data = $modules[0];
$ologin['ologin_code'] = $data['code'];
$ologin['ologin_name'] = $_LANG[$data['code']];
$ologin['ologin_desc'] = $_LANG[$data['desc']];
$ologin['is_cod'] = $data['is_cod'];
$ologin['is_online'] = $data['is_online'];
$ologin['ologin_config'] = array();
foreach ($data['config'] as $key =>$value) {
$config_desc = (isset($_LANG[$value['name'] .'_desc'])) ?$_LANG[$value['name'] .'_desc'] : '';
$ologin['ologin_config'][$key] = $value +
array('label'=>$_LANG[$value['name']],'value'=>$value['value'],'desc'=>$config_desc);
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'];
}
}
$this->_view_table['ologin'] = $ologin;
}