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


PHP page函数代码示例

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


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

示例1: Recovery

 public function Recovery() {
     BM::singleton()->getObject('temp')->buildFromTemplates('recovery.html');
     page()->setTitle('Recovery');
     BM::singleton()->getObject('temp')->parseExtras();
     BM::singleton()->getObject('temp')->parseOutput();
     print BM::singleton()->getObject('temp')->getPage()->getContent();
 }
开发者ID:suavid,项目名称:warbook,代码行数:7,代码来源:login.php

示例2: show_form

 public function show_form() {
     BM::singleton()->getObject('temp')->buildFromTemplates('login.html');
     page()->setTitle('Acceso');
     BM::singleton()->getObject('temp')->parseExtras();
     BM::singleton()->getObject('temp')->parseOutput();
     print BM::singleton()->getObject('temp')->getPage()->getContent();
 }
开发者ID:suavid,项目名称:terceros,代码行数:7,代码来源:login.php

示例3: edit

 public function edit($id = null)
 {
     $pagina = page($this->dados['modulo'], 'form');
     //se formulário for submetido
     if ($this->input->post()) {
         //setando os valores a serem enviado ao bd
         $data = setData($this->input->post());
         $data['administrador_id'] = $this->administrador_id;
         //alteracao
         if ($data['veiculo_id'] > 0) {
             $this->veiculo->update($data['veiculo_id'], $data);
         } else {
             $data['veiculo_data'] = date('Y-m-d H:i:s');
             $this->veiculo->insert($data);
         }
         redirect('veiculo');
     } else {
         $this->load->model('computador_model');
         $this->dados['computadores'] = $this->computador_model->getAll(array('computador_status' => 1), array('computador_nome', 'asc'));
         //alteracao
         if (!is_null($id)) {
             $this->dados['veiculo'] = $this->veiculo->getById($id);
         }
         //pagina do formulário
         $this->template->view($pagina, $this->dados);
     }
 }
开发者ID:aet-comunicacao,项目名称:hello-world,代码行数:27,代码来源:veiculo.php

示例4: get_cms

 function get_cms($param)
 {
     if (CMS_ENABLE) {
         $table_p = CMSDB::table('archives');
         $table_t = CMSDB::table('arctype');
         $table_c = CMSDB::table('addonarticle');
         $table = CMSDB::table('feedback');
         $turl = "/plus/list.php?tid=";
         $furl = "/plus/view.php?aid=";
         $curl = "/plus/feedback.php?aid=";
         $where_sql = " p.arcrank =0 ";
         $order_by = " p.id DESC ";
         $total_record = CMSDB::result_first("SELECT COUNT(*) FROM {$table_p} AS p WHERE {$where_sql} LIMIT 1000");
         if ($total_record > 0) {
             if ($param['perpage']) {
                 $page_arr = page($total_record, $param['perpage'], $param['page_url'], array('return' => 'array'));
                 $limit_sql = $page_arr['limit'];
             } else {
                 if ($param['limit']) {
                     $limit_sql = ' LIMIT ' . $param['limit'];
                 }
             }
             $query = CMSDB::query("SELECT p.id,p.typeid,p.title,p.writer,p.description,p.pubdate,t.typename,c.body FROM {$table_p} p LEFT JOIN {$table_t} t ON p.typeid = t.id  LEFT JOIN {$table_c} c ON p.id = c.aid WHERE {$where_sql} ORDER BY {$order_by} {$limit_sql} ");
             $topic_list = array();
             while ($value = CMSDB::fetch($query)) {
                 if ($user_lists[$value['writer']]) {
                     $p_m_user = $user_lists[$value['writer']];
                 } else {
                     $p_user = $this->TopicLogic->GetMember($this->_getuid($value['writer']), "`uid`,`ucuid`,`nickname`,`face`,`level`,`signature`,`validate`,`validate_category`");
                     $p_m_user = empty($p_user) ? array() : jsg_member_make($p_user);
                     $user_lists[$value['writer']] = $p_m_user;
                 }
                 $replytime = CMSDB::result_first("SELECT dtime FROM {$table} WHERE aid = '" . $value['id'] . "' order by id DESC LIMIT 1");
                 $topic_list[$value['id']]['pid'] = $value['id'];
                 $topic_list[$value['id']]['replys'] = CMSDB::result_first("SELECT COUNT(*) FROM {$table} WHERE aid = '" . $value['id'] . "'");
                 $topic_list[$value['id']]['replytime'] = $replytime ? my_date_format2($replytime) : my_date_format2($value['pubdate']);
                 $topic_list[$value['id']]['replyurl'] = CMS_API_URL . $curl . $value['id'];
                 $topic_list[$value['id']]['dateline'] = my_date_format2($value['pubdate']);
                 $topic_list[$value['id']]['content'] = $this->_format($value['description']);
                 $topic_list[$value['id']]['content_full'] = $this->_format($value['body'], 'long');
                 $topic_list[$value['id']]['title'] = $this->_format($value['title']);
                 $topic_list[$value['id']]['face'] = $p_m_user['face'];
                 $topic_list[$value['id']]['level'] = $p_m_user['level'];
                 $topic_list[$value['id']]['nickname'] = empty($p_m_user['nickname']) ? $value['writer'] : $p_m_user['nickname'];
                 $topic_list[$value['id']]['cmsurl'] = CMS_API_URL . $furl . $value['id'];
                 $topic_list[$value['id']]['username'] = $value['writer'];
                 $topic_list[$value['id']]['longtext'] = $this->_format($value['body'], 'islong');
                 $topic_list[$value['id']]['typetitle'] = $value['typename'];
                 $topic_list[$value['id']]['typeurl'] = CMS_API_URL . $turl . $value['typeid'];
                 $topic_list[$value['id']]['uid'] = $p_m_user['uid'];
                 $topic_list[$value['id']]['tid'] = $value['id'];
                 $topic_list[$value['id']]['signature'] = $p_m_user['signature'];
                 $topic_list[$value['id']]['validate_html'] = $p_m_user['validate_html'];
             }
             $info = array('list' => $topic_list, 'count' => $total_record, 'page' => $page_arr);
             return $info;
         }
     }
     return false;
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:60,代码来源:topic_cms.logic.php

示例5: GetAllComplaints

function GetAllComplaints($var, $gm)
{
    global $tbl_list_complaint;
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        echo "<script src='/js/page.js'></script>\n";
        echo "<script src='/js/checkbox.js'></script>\n";
        form($var, $gm);
        checkbox(true, true);
        ReturnAndBack();
        echo "</form>\n";
        return eachServerFrame($var, $gm);
    } else {
        $serv_id = intval($var["serverindex"]);
    }
    global $page_main, $tbl_sys_msg;
    $query_string = "select ua.ua_nMsgType, us.us_sName, c.c_sName, ua.ua_sErrorMsg, ua.ua_dtTime, ua.ua_uErrorCode from tbl_user_advice ua, tbl_char c, tbl_char_static cs, tbl_user_static us where ua.cs_uId = c.cs_uId and c.cs_uId = cs.cs_uId and cs.us_uId = us.us_uId order by ua_dtTime desc";
    page($var, $query_string, 58, "Game", $serv_id, $result, $page, $desc);
    echo "<table class='list_table'>\n";
    echo "<tr><th class='type' style='width:60px;'>" . $page_main["category"] . "</th><th style='width:80px;'>" . $page_main["user_name"] . "</th><th style='width:80px;'>" . $page_main["role_name"] . "</th><th>" . $page_main["content"] . "</th><th style='width:40px;'>" . $tbl_sys_msg["status"] . "</th><th style='width:120px;'>" . $tbl_sys_msg["time"] . "</th></tr>\n";
    while ($row = mysql_fetch_row($result)) {
        printf("<tr><td>%s</td><td><input type='checkbox' flag='user' value='%s' onclick='Checkbox(this)' />%s</td><td><input type='checkbox' flag='role' value='%s' onclick='Checkbox(this)' />%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $tbl_list_complaint[$row[0]], $row[1], $row[1], $row[2], $row[2], $row[3], "-", $row[4]);
    }
    echo "</table>\n";
    echo $page;
    return true;
}
开发者ID:svn2github,项目名称:ybtx,代码行数:26,代码来源:GetAllComplaints.php

示例6: __construct

 public function __construct($params = array())
 {
     $defaults = array('page' => page(), 'headline' => 'Mentions');
     if (is_a($params, 'Page')) {
         $params = array('page' => $params);
     } else {
         if (is_string($params)) {
             $params = array('headline' => $params);
         }
     }
     $this->options = array_merge($defaults, $params);
     $this->page = $this->options['page'];
     $this->root = $this->page->root() . DS . '.webmentions';
     $this->headline = new Field($this->page, 'headline', $this->options['headline']);
     if (!is_dir($this->root)) {
         return;
     }
     $files = dir::read($this->root);
     // flip direction
     rsort($files);
     foreach ($files as $file) {
         // skip the pings cache
         if ($file == 'pings.json') {
             continue;
         }
         // register a new webmention
         try {
             $mention = new Mention($this->page, $this->root . DS . $file);
             $this->append($mention->id(), $mention);
         } catch (Exception $e) {
         }
     }
 }
开发者ID:aizlewood,项目名称:2016,代码行数:33,代码来源:mentions.php

示例7: delete

function delete($table, $bid, $cid, $pageid, $TotalRows)
{
    $objResponse = new xajaxResponse();
    include 'settings/config.php';
    include 'settings/tables.php';
    include 'settings/template.php';
    require_once 'lib/modify.php';
    if ($table == $tbl_blog_comments) {
        $comment = new ModifyEntry();
        $comment->table = $tbl_blog_comments;
        $comment->changes = " deleted = '1' ";
        $comment->condition = " id = '{$cid}' ";
        $comment->update();
        unset($comment);
    }
    $TotalRows = $TotalRows - 1;
    $max_pages = ceil($TotalRows / $set[0]["perpage_comments"]);
    if ($pageid > $max_pages) {
        $pageid = $pageid - 1;
    }
    $p_name = "p_num_" . $bid;
    $objResponse->assign($p_name, "innerHTML", $TotalRows);
    if ($max_pages == 0) {
        $p_main = "p_comments_" . $bid;
        $p_out = "p_page_" . $bid;
        $p_out2 = "p_page2_" . $bid;
        $objResponse->remove($p_main);
        $objResponse->remove($p_out);
        $objResponse->remove($p_out2);
    } else {
        $objResponse->loadcommands(page($table, $bid, $pageid, $TotalRows));
    }
    return $objResponse;
}
开发者ID:nbgmaster,项目名称:master2008,代码行数:34,代码来源:index.server.php

示例8: __construct

 public function __construct($field)
 {
     $this->field = $field;
     $defaults = array('page' => $field->page->id(), 'fetch' => 'children', 'value' => '{{uid}}', 'text' => '{{title}}', 'flip' => false, 'filters' => []);
     $query = array_merge($defaults, $field->query);
     $page = page($query['page']);
     $items = $this->items($page, $query['fetch']);
     foreach ($query['filters'] as $field => $value) {
         if (!is_string($field)) {
             continue;
         }
         $items = $items->filterBy($field, $value);
     }
     if ($query['flip']) {
         $items = $items->flip();
     }
     foreach ($items as $item) {
         $value = $this->tpl($query['value'], $item);
         $text = $this->tpl($query['text'], $item);
         $this->options[$value] = $text;
     }
     // sorting
     if (!empty($this->field->sort)) {
         switch (strtolower($this->field->sort)) {
             case 'asc':
                 asort($this->options);
                 break;
             case 'desc':
                 arsort($this->options);
                 break;
         }
     }
 }
开发者ID:hisamu,项目名称:kirby-entity-field,代码行数:33,代码来源:fieldoptions.php

示例9: department

 public function department()
 {
     $did = (int) $this->input->get('did');
     $per_page_job = 8;
     //招聘职位
     $per_page = 5;
     //员工
     $p = (int) page_cur();
     // 获取当前页码
     $employee_table = 'yj_employee';
     $employee_job = 'yj_job';
     $data['p'] = $p;
     $data['employ'] = $this->join_us_m->get_department_employee($did, $per_page, $per_page * ($p - 1));
     $data['job'] = $this->join_us_m->get_department_job($did, $per_page_job, $per_page_job * ($p - 1));
     if ($this->join_us_m->get_depar_num($did, $employee_job) / $per_page_job > $this->join_us_m->get_depar_num($did, $employee_table) / $per_page) {
         $num = $this->join_us_m->get_depar_num($did, $employee_job);
         $data['page_html'] = page($num, $per_page_job);
     } else {
         $num = $this->join_us_m->get_depar_num($did, $employee_table);
         $data['page_html'] = page($num, $per_page);
     }
     $data['depart'] = $this->join_us_m->get_department($did);
     $data['topic'] = $this->join_us_m->get_topic();
     $data['imgs'] = $this->home_pic_m->pic_info(5);
     $data['imgs_num'] = $this->home_pic_m->pic_num(5);
     $data['partners'] = $this->partners_m->get_all();
     $this->load->view('join_us', $data);
 }
开发者ID:shanliqun,项目名称:yanjun,代码行数:28,代码来源:join_us.php

示例10: _index

 private function _index()
 {
     $where = array();
     $shop_id = get('shop_id');
     $shop_ids = getMyShopId();
     if ($shop_id && in_array($shop_id, $shop_ids)) {
         $where[] = "shop_id ='{$shop_id}'";
     } else {
         $where[] = 'shop_id in(' . implode(',', $shop_ids) . ')';
     }
     $level_id = get('level_id');
     if (!empty($level_id)) {
         $where[] = " level_id ='{$level_id}'";
     }
     $kw = get('kw');
     if (!empty($kw)) {
         $where[] = "(card like '%{$kw}%' OR \n\t\t\t\t\t\tname like '%{$kw}%' OR \n\t\t\t\t\t\tpinyin like '%{$kw}%' OR \n\t\t\t\t\t\tbirth like '%{$kw}%' OR \n\t\t\t\t\t\tphone like '%{$kw}%' OR \n\t\t\t\t\t\taddress like '%{$kw}%' OR \n\t\t\t\t\t\tmemo like '%{$kw}%')";
     }
     $order = array();
     $sort = get('sort');
     if (is_array($sort)) {
         foreach ($sort as $key => $val) {
             $order[] = $key . ' ' . $val;
         }
     }
     $member_mod = m('Member');
     $data = array();
     $data['data'] = $member_mod->getList($where, $order, page());
     $data['count'] = $member_mod->getCount($where);
     echo json_encode($data);
 }
开发者ID:frycnx,项目名称:jxc,代码行数:31,代码来源:Member.php

示例11: tabList

 /**
  * Tab list
  */
 public function tabList()
 {
     $fields_all = D('Tab')->field_list();
     $fields = array('id', 'title', 'ico', 'url', 'sort_order', 'date_modify');
     $parent_id = intval($_GET['parent_id']);
     if (empty($parent_id)) {
         $parent_id = 0;
     }
     $map = array('parent_id' => $parent_id);
     $page = page(D('Tab')->getCount($map));
     $list = D('Tab')->field($fields)->where($map)->order('sort_order')->limit($page->firstRow, $page->listRows)->select();
     foreach ($list as $k => $v) {
         $list[$k]['action_list'] = array(array('type' => 'ls', 'url' => U('Tab/tabList', array('parent_id' => $v['id']))), array('type' => 'edit', 'url' => U('Tab/tabInfo', array('id' => $v['id']))), array('type' => 'del', 'url' => U('Tab/del', array('id' => $v['id']))));
     }
     $btn_list = array(array('title' => '添加菜单', 'url' => U('Tab/tabInfo', array('parent_id' => $parent_id)), 'class' => 'primary'), array('title' => '批量删除', 'url' => U('Tab/del'), 'class' => 'danger', 'type' => 'form'));
     $fields[] = 'action_list';
     $data = array('title' => '系统菜单列表', 'btn_list' => $btn_list, 'field_list' => $this->get_field_list($fields_all, $fields), 'field_info' => $list, 'page_list' => $page->show());
     if (!empty($parent_id)) {
         $ids = D('Tab')->get_ids($parent_id);
         $ids = array_reverse($ids);
         foreach ($ids as $k => $v) {
             $title = D('Tab')->where('id=' . $v)->getField('title');
             $bread_list[$k]['title'] = $title ? $title : '菜单列表';
             $bread_list[$k]['url'] = U('Tab/tabList', array('parent_id' => $v));
         }
         $title = D('Tab')->where('id=' . $parent_id)->getField('title');
         $bread_list[] = array('title' => $title, 'url' => 'javascript:;', 'type' => 'current');
         $data['bread_list'] = $bread_list;
     }
     $this->assign($data);
     $this->display('Public:list');
 }
开发者ID:alic1234567890,项目名称:wshowco,代码行数:35,代码来源:TabAction.class.php

示例12: index

 /**
  * 
  * 系统用户首页
  */
 public function index()
 {
     $data = array();
     if (checkRight('admin_list') === FALSE) {
         $this->showView('denied', $data);
         exit;
     }
     if ($this->input->get('msg')) {
         $data['msg'] = $this->input->get('msg');
     }
     $this->load->model('MIS_Admin');
     $keyword = '';
     if ($this->input->get('keyword')) {
         $keyword = $this->input->get('keyword');
     }
     $offset = 0;
     $pageUrl = '';
     page(formatUrl('admin/index') . '?', $this->MIS_Admin->getCount($keyword), PER_COUNT, $offset, $pageUrl);
     $dataList = $this->MIS_Admin->getList($keyword, $offset, PER_COUNT);
     $data['pageUrl'] = $pageUrl;
     $data['adminList'] = $dataList;
     $data['keyword'] = $keyword;
     $this->load->model('MIS_Role');
     $rolelist = $this->MIS_Role->getAll();
     $role = array();
     foreach ($rolelist as $v) {
         $role[$v['id']] = $v['role_name'];
     }
     $role[0] = '管理员';
     $data['role'] = $role;
     $this->showView('adminList', $data);
 }
开发者ID:shaoyi88,项目名称:mis,代码行数:36,代码来源:admin.php

示例13: ondefault

 function ondefault()
 {
     $navtitle = "问答动态";
     $type = 'atentto';
     $recivetype = $this->get[2];
     if ($recivetype) {
         $type = $recivetype;
     }
     if (!$this->user['uid']) {
         $type = 'all';
     }
     $navtitletable = array('all' => '问答动态', 'my' => '我的动态', 'atentto' => '关注的动态');
     $navtitle = $navtitletable[$type];
     $page = max(1, intval($this->get[3]));
     $pagesize = $this->setting['list_default'];
     $startindex = ($page - 1) * $pagesize;
     $doinglist = $_ENV['doing']->list_by_type($type, $this->user['uid'], $startindex, $pagesize);
     $rownum = $_ENV['doing']->rownum_by_type($type, $this->user['uid']);
     $departstr = page($rownum, $pagesize, $page, "doing/default/{$type}");
     if ($type == 'atentto') {
         $recommendsize = $rownum ? 3 : 6;
         $recommandusers = $_ENV['doing']->recommend_user($recommendsize);
     }
     include template('doing');
 }
开发者ID:source-hunter,项目名称:tipask,代码行数:25,代码来源:doing.php

示例14: menuList

 /**
  * 菜单列表
  */
 public function menuList()
 {
     $fields_all = D('WechatMenu')->field_list();
     $fields = array('id', 'name', 'type', 'value', 'sort_order', 'date_modify');
     $parent_id = intval($_GET['parent_id']);
     $map = array('user_id' => $_SESSION['uid'], 'parent_id' => $parent_id);
     $page = page(D('WechatMenu')->getCount($map));
     $list = D('WechatMenu')->field($fields)->where($map)->order('sort_order desc')->limit($page->firstRow, $page->listRows)->select();
     foreach ($list as $k => $v) {
         $list[$k]['action_list'] = array(array('url' => U('Menu/menuInfo', array('id' => $v['id'])), 'type' => 'edit'), array('url' => U('Menu/del', array('id' => $v['id'])), 'type' => 'del'));
         if (empty($parent_id)) {
             $list[$k]['action_list'] = array_merge(array(array('url' => U('Menu/menuList', array('parent_id' => $v['id'])), 'type' => 'ls')), $list[$k]['action_list']);
         }
     }
     $fields[] = 'action_list';
     $btn_list = array(array('title' => '批量删除', 'url' => U('Menu/menuInfo'), 'class' => 'danger', 'type' => 'form'), array('title' => '添加菜单', 'url' => U('Menu/menuInfo', array('parent_id' => $parent_id)), 'class' => 'primary'));
     if (empty($parent_id)) {
         $btn_list = array_merge($btn_list, array(array('title' => '同步菜单', 'url' => U('Menu/createMenu'), 'class' => 'default')));
     }
     $data = array('title' => '菜单设置', 'btn_list' => $btn_list, 'field_list' => $this->get_field_list($fields_all, $fields), 'field_info' => $list, 'page_list' => $page->show());
     if (!empty($parent_id)) {
         $title = D('WechatMenu')->where('id=' . $parent_id)->getField('name');
         $bread_list = array(array('title' => '菜单列表', 'url' => U('MenuList')), array('title' => $title, 'url' => 'javascript:;', 'type' => 'current'));
         $data['bread_list'] = $bread_list;
     }
     $this->assign($data);
     $this->display('Public:list');
 }
开发者ID:alic1234567890,项目名称:wshowco,代码行数:31,代码来源:MenuAction.class.php

示例15: showMenu2

	function showMenu2($menu,$started=false)
	{
		$name=$menu[0];
		$title=$menu[1];
		$view=$menu[2];
		$ar=$menu[3];
		
		if($name==getInput("page"))
			$title=boldMenuItem($title);
		if($title!="")
			$c=anchor(page($name),$title);//,"menu_title");
		if(is_array($ar))
		{
			foreach($ar as $a)
			{
				if($c!="")
					$c.=" | ";
				$c.=showMenu2($a,true);
			}
		}
		if($started)
			return $c;
		else
			return $c;//table(tr($c),"full_width");
	}
开发者ID:BackupTheBerlios,项目名称:antargis-svn,代码行数:25,代码来源:menu.inc.php


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