• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP front类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: vaild

 function vaild() {
     if (!front::post('name')) {
         front::flash('请填写名称!');
         return false;
     }
     return true;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:7,代码来源:table_templatetag.php


示例2: check_mytable

 private function check_mytable() {
     if(!preg_match('/^my_.+/',front::post('name'))) {
         front::flash('表名格式必须是是"my_abc"!');
         return false;
     }
     return true;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:7,代码来源:form_admin.php


示例3: 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


示例4: manage_action

    function manage_action() {
        if(!config::get('sms_username') || !config::get('sms_password')){
            echo '<script>alert("您需要先设置用户名和密码才能使用短信管理功能!");window.location.href="'.url('config/system/set/sms').'";</script>';
            exit;
        }
        include_once("phprpc/phprpc_client.php");
        $client = new PHPRPC_Client();
        $client->setProxy(NULL);
        $client->useService('http://pay.cmseasy.cn/sms.php');
        $client->setKeyLength(128);
        $client->setEncryptMode(3);
        $info = $client->getInfo(config::get('sms_username'),md5(config::get('sms_password')));
        $info[0] = intval($info[0]);
        $info[1] = intval($info[1]);
        $this->view->info = $info;
        if (front::post('submit')) {
            if (front::post('act') == 'test') {
                $rs = sendMsg(front::post('mobile'),'test');
                if($rs->SendSMSResult == '0'){
                    front::flash('发送成功');
                }else{
                    front::flash('发送失败,请检查用户名、密码或剩余条数');
                }
            }
        }else{
			if($info[0] < 50) front::flash('你的剩余短信不足50条,请及时充值');
		}
    }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:28,代码来源:sms_admin.php


示例5: savewysiwygAction

 public function savewysiwygAction()
 {
     $db = front::og('db');
     $alias = front::$_req['alias'];
     // проверяем права (могут быть разные для разных страниц)
     switch ($alias) {
         default:
             $permission = null;
     }
     if (!$permission || !hasPermissions($permission)) {
         return;
     }
     $text = front::$_req['form']['n_text'];
     $text = iconv('UTF-8', 'CP1251', $text);
     $text = __paramValue('ckedit', $text);
     $title = front::$_req['form']['title'];
     $title = iconv('UTF-8', 'CP1251', $title);
     $title = __paramValue('string', $title);
     $save = array('title' => $title, 'n_text' => $text);
     if ($alias) {
         $aff = $db->update('UPDATE static_pages SET ?s WHERE (alias = ?)', $save, $alias);
         if (!$aff) {
             $save['alias'] = $alias;
             $db->insert('static_pages', $save, false);
         }
     }
     echo json_encode(array('success' => true, 'alias' => $alias));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:28,代码来源:page_admin_static_pages.class.php


示例6: 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


示例7: getlistAction

 function getlistAction()
 {
     $data[] = array("title" => "Контроллеры", "_is_leaf" => false, "testable" => false, "_parent" => null, "_id" => "1");
     $data = $this->readMap(front::$map, $data);
     $data[] = array("title" => "Модели", "_is_leaf" => false, "_parent" => null, "_id" => "2");
     $dir = opendir(ROOT_DIR . "engine/models/");
     while ($file = readdir($dir)) {
         if ($file != "." && $file != ".." && $file != ".svn") {
             $testable = true;
             $class_name = array_shift(explode(".", $file));
             $test_path = "tests/models/" . $class_name . ".model.test.php";
             if (!file_exists(ROOT_DIR . "engine/" . $test_path)) {
                 $test_path = "<b>Нет " . $test_path . "</b>";
                 $testable = false;
             }
             $data[] = array("title" => $file, "path" => $test_path . "<i> для " . $file . "</i>", "testable" => $testable, "result" => $testable ? 0 : 4, "run_path" => "tests/models/" . $class_name . ".model.test.php", "_is_leaf" => true, "_parent" => "2", "_id" => "3:" . $class_name);
         }
     }
     closedir($dir);
     $data[] = array("title" => "Другие", "_is_leaf" => false, "_parent" => null, "_id" => "3");
     $dir = opendir(ROOT_DIR . "engine/tests/");
     while ($file = readdir($dir)) {
         if ($file != "." && $file != ".." && is_file(ROOT_DIR . "engine/tests/" . $file)) {
             $testable = true;
             $data[] = array("title" => $file, "path" => $file, "testable" => $testable, "result" => $testable ? 0 : 4, "run_path" => "tests/" . $file, "_is_leaf" => true, "_parent" => "3", "_id" => "4:" . $file);
         }
     }
     closedir($dir);
     $data = front::toUtf($data);
     echo json_encode(array("data" => $data));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:page_admin_tests.class.php


示例8: getlistAction

 public function getlistAction()
 {
     $data[] = array('title' => 'Контроллеры', '_is_leaf' => false, 'testable' => false, '_parent' => null, '_id' => '1');
     $data = $this->readMap(front::$map, $data);
     $data[] = array('title' => 'Модели', '_is_leaf' => false, '_parent' => null, '_id' => '2');
     $dir = opendir(ROOT_DIR . 'engine/models/');
     while ($file = readdir($dir)) {
         if ($file != '.' && $file != '..' && $file != '.svn') {
             $testable = true;
             $class_name = array_shift(explode('.', $file));
             $test_path = 'tests/models/' . $class_name . '.model.test.php';
             if (!file_exists(ROOT_DIR . 'engine/' . $test_path)) {
                 $test_path = '<b>Нет ' . $test_path . '</b>';
                 $testable = false;
             }
             $data[] = array('title' => $file, 'path' => $test_path . '<i> для ' . $file . '</i>', 'testable' => $testable, 'result' => $testable ? 0 : 4, 'run_path' => 'tests/models/' . $class_name . '.model.test.php', '_is_leaf' => true, '_parent' => '2', '_id' => '3:' . $class_name);
         }
     }
     closedir($dir);
     $data[] = array('title' => 'Другие', '_is_leaf' => false, '_parent' => null, '_id' => '3');
     $dir = opendir(ROOT_DIR . 'engine/tests/');
     while ($file = readdir($dir)) {
         if ($file != '.' && $file != '..' && is_file(ROOT_DIR . 'engine/tests/' . $file)) {
             $testable = true;
             $data[] = array('title' => $file, 'path' => $file, 'testable' => $testable, 'result' => $testable ? 0 : 4, 'run_path' => 'tests/' . $file, '_is_leaf' => true, '_parent' => '3', '_id' => '4:' . $file);
         }
     }
     closedir($dir);
     $data = front::toUtf($data);
     echo json_encode(array('data' => $data));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:page_admin_tests.class.php


示例9: 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


示例10: savewysiwygAction

 function savewysiwygAction()
 {
     $db = front::og("db");
     $alias = front::$_req["alias"];
     // проверяем права (могут быть разные для разных страниц)
     switch ($alias) {
         default:
             $permission = null;
     }
     if (!$permission || !hasPermissions($permission)) {
         return;
     }
     $text = front::$_req["form"]["n_text"];
     $text = iconv('UTF-8', 'CP1251', $text);
     $text = __paramValue('ckedit', $text);
     $title = front::$_req["form"]["title"];
     $title = iconv('UTF-8', 'CP1251', $title);
     $title = __paramValue('string', $title);
     $save = array("title" => $title, "n_text" => $text);
     if ($alias) {
         $aff = $db->update("UPDATE static_pages SET ?s WHERE (alias = ?)", $save, $alias);
         if (!$aff) {
             $save["alias"] = $alias;
             $db->insert("static_pages", $save, false);
         }
     }
     echo json_encode(array("success" => true, "alias" => $alias));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:28,代码来源:page_admin_static_pages.class.php


示例11: add_before

 function add_before(act $act) {
     front::$post['userid']=$act->view->user['userid'];
     front::$post['username']=$act->view->user['username'];
     front::$post['checked']=1;
     front::$post['adddate']=date('Y-m-d H:i:s');
     front::$post['ip']=front::ip();
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:7,代码来源:table_form.php


示例12: 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


示例13: get

 static function get($alias)
 {
     $res = front::og("db")->select("SELECT * FROM static_pages WHERE alias = ? LIMIT 1;", $alias)->fetchRow();
     if (!$res) {
         $res = array("alias" => $alias);
     }
     return $res;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:8,代码来源:static_pages.class.php


示例14: 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


示例15: get

 public static function get($alias)
 {
     $res = front::og('db')->select('SELECT * FROM static_pages WHERE alias = ? LIMIT 1;', $alias)->fetchRow();
     if (!$res) {
         $res = array('alias' => $alias);
     }
     return $res;
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:8,代码来源:static_pages.class.php


示例16: 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


示例17: 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));
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:9,代码来源:website_admin.php


示例18: 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


示例19: saveAction

 public function saveAction()
 {
     $db = front::og('db');
     $save = front::toWin(array('name' => front::$_req['form']['name'], 'login' => front::$_req['form']['login'], 'occupation' => front::$_req['form']['occupation'], 'email' => front::$_req['form']['email'], 'icq' => front::$_req['form']['icq'], 'skype' => front::$_req['form']['skype'], 'login' => front::$_req['form']['login'], 'groupid' => front::$_req['form']['groupid'], 'additional' => front::$_req['form']['additional']));
     if (intval($id = front::$_req['id']) > 0) {
         $aff = $db->update('UPDATE team_people SET ?s WHERE (id = ?n)', $save, $id);
     } else {
         $id = $db->insert('team_people', $save);
     }
     echo json_encode(array('success' => true, 'id' => $id));
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_work.class.php


示例20: saveAction

 function saveAction()
 {
     $db = front::og("db");
     $save = front::toWin(array("header" => front::$_req["form"]["header"], "n_text" => front::$_req["form"]["n_text"], "post_date" => front::$_req["form"]["post_date"]));
     if (intval($id = front::$_req["id"]) > 0) {
         $aff = $db->update("UPDATE news SET ?s WHERE (id = ?n)", $save, $id);
     } else {
         $id = $db->insert("news", $save);
     }
     echo json_encode(array("success" => true, "id" => $id));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:11,代码来源:page_admin_news.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fs类代码示例发布时间:2022-05-23
下一篇:
PHP freelancer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap