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


PHP front::get方法代码示例

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


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

示例1: getjs_action

    function getjs_action() {
        $lang=include ROOT.'/lang/'.config::get('lang_type').'/system.php';
        $id=front::get('id');
        if(preg_match('/select/i',$id)){
        	exit('非法参数');
        }
        $ballot=new ballot();
        $option=new option();
        $where=array('id'=>$id);
        $arr=$ballot->getrow($where);
        $row=$option->getrows(array('bid'=>$id),null,'num desc');
        $this->view->arr=$arr;
        $this->view->row=$row;
        $this->view->lang=$lang;
        /*$html='document.write(\'<form name="form1" method="post" action="'.url("ballot").'">\');';
        $html .= 'document.write(\'<input type="hidden" name="bid" id="bid" value="'.$arr['id'].'" />\');';
		$html .= 'document.write(\'<h5>\');';
        $html .= 'document.write(\''.$arr['title']."</h5>');";
        foreach ($row as $option) {
            if ($arr['type'] == 'radio') {
                $html .= 'document.write(\'<input type="radio" name="ballot" id="ballot" value="'.$option['id'].'" />\');';
            }
            else {
                $html .= 'document.write(\'<input type="checkbox" name="ballot[]" id="ballot" value="'.$option['id'].'" />\');';
            }
            $html .= 'document.write(\' '.$option['name'].' ('.$option['num'].')<br>\');';
        }
        $html .= 'document.write(\'<input type="submit" name="submit" id="button" value=" '.$lang['vote'].'" /></form>\');';
        echo $html;*/
    }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:30,代码来源:ballot_act.php

示例2: respond

    function respond() {
        
        ini_set("display_errors","On");
        $where = array('ologin_code'=>front::$get['ologin_code']);
        $ologins = ologin::getInstance()->getrows($where);
        $ologin = unserialize_config($ologins[0]['ologin_config']);

        //var_dump($ologin);
        
        $aliapy_config['partner'] = $ologin['alipaylogin_id'];
        $aliapy_config['key'] = $ologin['alipaylogin_key'];
        $aliapy_config['return_url'] = ologin::url(basename(__FILE__,'.php'));
        $aliapy_config['sign_type']    = 'MD5';
        $aliapy_config['input_charset']= 'utf-8';
        $aliapy_config['transport']    = 'http';
        $aliapy_config['cacert']    = getcwd().'/lib/plugins/alipayauth/cacert.pem';
        //var_dump($aliapy_config);
        unset($_GET['case']);unset($_GET['act']);unset($_GET['ologin_code']);unset($_GET['site']);
        require_once("alipayauth/alipay_notify.class.php");
        $alipayNotify = new AlipayNotify($aliapy_config);
        //var_dump($alipayNotify);
        $verify_result = $alipayNotify->verifyReturn();
        //var_dump($verify_result);
        if($verify_result) {//验证成功
            $user_id = front::$get['user_id'];
            $token = front::$get['token'];
            session::set('access_token',$token);
            session::set("openid",$user_id);
            return array('nickname'=>  front::get('real_name'));
        }
        else {
            echo "验证失败";exit;
        }
    }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:34,代码来源:alipaylogin.php

示例3: show_action

 function show_action() {
     $this->view->page=front::get('page')?front::get('page'):1;
     $this->pagesize=config::get('list_pagesize');
     $limit=(($this->view->page-1)*$this->pagesize).','.$this->pagesize;
     $special=new special();
     $this->view->special=$special->getrow('spid='.front::get('spid'));
     $this->view->archive['title'] =  $this->view->special['title'];
     $this->view->pages=true;
     $archive=new archive();
     $archives=$archive->getrows('spid='.front::get('spid'),$limit);
     foreach($archives as $order=>$arc) {
         $archives[$order]['url']=archive::url($arc);
         $archives[$order]['catname']=category::name($arc['catid']);
         $archives[$order]['caturl']=category::url($arc['catid']);
         $archives[$order]['adddate']= sdate($arc['adddate']);
         $archives[$order]['stitle']= strip_tags($arc['title']);
     }
     $this->view->archives=$archives;
     $this->view->record_count=$archive->rec_count('spid='.front::get('spid'));
     front::$record_count=$this->view->record_count;
     $this->view->spid=front::get('spid');
     if (front::get('t') == 'wap') {
     	$this->out('wap/special_show.html');
     	return;
     }
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:26,代码来源:special_act.php

示例4: delete_action

 function delete_action() {
 	chkpw('defined_form_del');
     $table=new defind(front::get('table'));
     $delete=archive::getInstance()->query("DROP TABLE {$table->name}");
     if($delete)  front::flash("删除表单成功!");
     front::redirect(url::modify('act/listform/table/'.$table->name));
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:7,代码来源:form_admin.php

示例5: click_action

 function click_action() {
     $friendlink=new friendlink();
     $friendlink->rec_update(array('hits'=>'[hits+1]'),front::get('id'));
     $where=" id=".front::get('id')." ";
     $friendlinks=$friendlink->getrows($where,$limit,'listorder asc,id asc');
     $url=$friendlinks[0][url];
     header("location: $url");
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:8,代码来源:friendlink_act.php

示例6: manage_action

 function manage_action() {
 	chkpw('func_data_adminlogs');
     $where = null;
     $ordre = '`id` DESC';
     $limit = ((front::get('page') -1) * $this->_pagesize).','.$this->_pagesize;
     $this->view->data = $this->_table->getrows($where,$limit,$ordre,$this->_table->getcols('manage'));
     $this->view->record_count = $this->_table->record_count;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:8,代码来源:adminlogs_admin.php

示例7: comment_js_action

 function comment_js_action() {
     front::check_type(front::get('aid'));
     $comment=new comment();
     $this->view->comments=$comment->getrows('state=1 and aid='.front::get('aid'),20,'1');
     $this->view->aid=front::get('aid');
     echo  tool::text_javascript($this->fetch());
     exit;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:8,代码来源:comment_act.php

示例8: edit_action

    function edit_action() {
        $path=ROOT.'/lang/'.config::get('lang_type').'/system.php';
        $tipspath=ROOT.'/lang/cn/system.php';
        if (front::post('submit')) {
            $content=file_get_contents($path);
            $to_delete_items=front::$post['to_delete_items'];
            unset(front::$post['to_delete_items']);
            foreach (front::$post as $key=>$val) {
                preg_match_all("/'".$key."'=>'(.*?)',/",$content,$out);
                if (is_array($to_delete_items) && in_array($key,$to_delete_items))
                    $content=str_replace($out[0][0],'',$content);
                else
                    $content=str_replace($out[1][0],$val,$content);
            }
            file_put_contents($path,$content);
            if ($_GET['site'] != 'default') {
                $ftp=new nobftp();
                $ftpconfig=config::get('website');
                $ftp->connect($ftpconfig['ftpip'],$ftpconfig['ftpuser'],$ftpconfig['ftppwd'],$ftpconfig['ftpport']);
                $ftperror=$ftp->returnerror();
                if ($ftperror) {
                    exit($ftperror);
                }
                else {
                    $ftp->nobchdir($ftpconfig['ftppath']);
                    $ftp->nobput($ftpconfig['ftppath'].'/lang/'.config::get('lang_type').'/system.php',$path);
                }
            }
            unset($content);
            event::log('修改语言包','成功');
            echo '<script type="text/javascript">alert("操作完成!");window.location.href="'.url('language/edit',true).'";</script>';
        }
        $content=include($path);
        $tips=include($tipspath);
        $this->view->tips=$tips;
        //分页
        $limit = 30;
        if(!front::get('page'))
            $page = 1;
        else
            $page = front::get('page');
        $total = ceil(count($content)/$limit);
        if($page < 1) $page = 1;
        if($page > $total) $page = $total;
        $start = ($page-1) * $limit;
        $end = $start+$limit-1;
        $tmp = range($start,$end);
        $list_content_arr = array();
        $i = 0;
        foreach($content as $k => $v){
        	if(in_array($i++,$tmp))
        	     $list_content_arr[$k] = $v;
        }
        $this->view->sys_lang=$list_content_arr;
        $this->view->link_str = listPage($total,$limit,$page);

    }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:57,代码来源:language_admin.php

示例9: end

 function end() {
     if (front::get('t') == 'wap') {
         $this->render('wap/index.html');
         return;
     }
     if (front::$debug)
         $this->render('style/index.html');
     else
         $this->render();
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:10,代码来源:index_act.php

示例10: dorestore_action

 function dorestore_action() {
     $dir=ROOT.'/data/'.front::get('db_dir');
     if(is_dir($dir)) {
         $db_files=front::scan($dir);
         foreach($db_files as $db_file) {
             if(!preg_match('/^\./',$db_file)) tdatabase::getInstance()->restoreTables($dir.'/'.$db_file);
         }
         front::flash('数据库还原成功!');
     }
     front::redirect(url::create('database/restore'));
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:11,代码来源:database_admin.php

示例11: visual_action

 function visual_action() {
     if ($this->view->usergroupid != '888')
         exit('PAGE NOT FOUND!');
     $id=front::get('id');
     $tpl=str_replace('_d_','/',$id);
     $tpl=str_replace('#','',$tpl);
     $tpl=str_replace('_html','.html',$tpl);
     $content=file_get_contents(TEMPLATE.'/'.config::get('template_dir').'/'.$tpl);
     echo @front::$view->_eval(front::$view->compile($content));
     $this->render('../admin/system/tag_visual.php');
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:11,代码来源:templatetag_act.php

示例12: __construct

 function __construct() {
     if (ADMIN_DIR!=config::get('admin_dir')) {
         config::modify(array('admin_dir'=>ADMIN_DIR));
         front::flash('后台目录更改成功!');
     }
     front::$rewrite=false;
     parent::__construct();
     $servip = gethostbyname($_SERVER['SERVER_NAME']);
     //if($this instanceof file_admin && in_array(front::get('act'), array('updialog','upfile','upfilesave','netfile','netfilesave','swfsave'))) return;
     if($servip==front::ip()&&front::get('ishtml')==1) return;
     $this->check_admin();
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:12,代码来源:admin.php

示例13: note_action

 function note_action() {
 	chkpw('template_note');
     if (front::post('submit')) {
         unset(front::$post['submit']);
         help::$_var['template_note'] = front::$post;
         help::save();
     }
     $dir = ROOT .'/template/'.config::get('template_dir');
     $_dir = dir($dir);
     while ($file = $_dir->read()) {
         if (!preg_match('/^\./',$file) &&is_dir($dir .'/'.$file) &&!preg_match('/[#@]/',$file)  &&!preg_match('/^_/',$file)) {
             $this->view->tps[$file] = '<b>'.$file .'</b>';
             $__dir = dir($dir .'/'.$file);
             while ($_file = $__dir->read()) {
                 if (!preg_match('/^\./',$_file) &&!preg_match('/[#@]/',$_file)) {
                     if ($file=='skin'&&!preg_match('/\.(css|js)$/',$_file))
                         continue;
                     $_file = str_replace('.','_',$_file);
                     if (is_dir($dir .'/'.$file .'/'.$_file))
                         $this->view->tps[$file .'/'.$_file] = "&nbsp;&nbsp;└<b>".$_file .'</b>';
                     else
                         $this->view->tps[$file .'/'.$_file] = "&nbsp;&nbsp;└".$_file;
                 }
             }
         }
         elseif (!preg_match('/^\./',$file) &&is_file($dir .'/'.$file) &&!preg_match('/[#@]/',$file)) {
             $file = str_replace('.','_',$file);
             $tps[$file] = $file;
         }
     }
     //$this->view->tps = array_merge($tps,$this->view->tps);
     $tps_arr = array_merge($tps,$this->view->tps);
      //分页
     $limit = 20;
     if(!front::get('page'))
         $page = 1;
     else
         $page = front::get('page');
     $total = ceil(count($tps_arr)/$limit);
     if($page < 1) $page = 1;
     if($page > $total) $page = $total;
     $start = ($page-1) * $limit;
     $end = $start+$limit-1;
     $tmp = range($start,$end);
     $list_tps_arr = array();
     $i = 0;
     foreach($tps_arr as $k => $v){
     	if(in_array($i++,$tmp))
     	     $list_tps_arr[$k] = $v;
     }
     $this->view->tps = $list_tps_arr;
     $this->view->link_str = listPage($total,$limit,$page);
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:53,代码来源:template_admin.php

示例14: deleteimg_action

 function deleteimg_action() {
     if (!front::get('dir') || !front::get('imgname'))
         return;
     $img = ROOT . '/upload/images/' . front::get('dir') . '/' . str_replace('___', '.', front::get('imgname'));
     if (!file_exists($img))
         front::flash('图片不存在');
     if (!unlink($img))
         front::flash('删除失败,请检查权限');
     else
         front::flash('图片已删除');
     front::redirect(url::modify('act/listimg/dir/' . front::get('dir')));
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:12,代码来源:image_admin.php

示例15: getbot

 public static function getbot() {
     $ServerName = $_SERVER["SERVER_NAME"];
     $ServerPort = $_SERVER["SERVER_PORT"];
     $ScriptName = $_SERVER["SCRIPT_NAME"];
     $QueryString = $_SERVER["QUERY_STRING"];
     $serverip = $_SERVER["REMOTE_ADDR"];
     $GetLocationURL=self::geturl();
     $agent1 = $_SERVER["HTTP_USER_AGENT"];
     $agent=strtolower($agent1);
     $Bot="";
     if(strpos($agent,"googlebot")>-1) {
         $Bot = "Google";
     }
     if(strpos($agent,"mediapartners-google")>-1) {
         $Bot = "Google Adsense";
     }
     if(strpos($agent,"baiduspider")>-1) {
         $Bot = "Baidu";
     }
     if(strpos($agent,"sogou")>-1) {
         $Bot = "Sogou";
     }
     if(strpos($agent,"yahoo")>-1) {
         $Bot = "Yahoo!";
     }
     if(strpos($agent,"msn")>-1) {
         $Bot = "MSN";
     }
     if(strpos($agent,"soso")>-1) {
         $Bot = "Soso";
     }
     if(strpos($agent,"iaarchiver")>-1) {
         $Bot = "Alexa";
     }
     if(strpos($agent,"sohu")>-1) {
         $Bot = "Sohu";
     }
     if(strpos($agent,"sqworm")>-1) {
         $Bot = "AOL";
     }
     if(strpos($agent,"yodaobot")>-1) {
         $Bot = "Yodao";
     }
     if(strpos($agent,"iaskspider")>-1) {
         $Bot = "Iask";
     }
     if(strlen($Bot)>0 &&!front::get('admin_dir')) {
         $stats = self::getInstance();
         $insert = $stats->rec_insert(array('bot'=>$Bot,'url'=>$GetLocationURL,'ip'=>$serverip,'time'=>date('Y-m-d H:i:s')));
     }
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:51,代码来源:stats.php


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