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


PHP page1函数代码示例

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


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

示例1: count

    $num = $empire->gettotal($totalquery);
} else {
    //需审核
    if ($class_r[$classid][checkpl]) {
        $totalquery = "select count(*) as total from {$dbtbpre}enewspl_" . $n_r['restb'] . " where pubid='{$pubid}' and checked=0";
        $num = $empire->gettotal($totalquery);
    } else {
        $num = $n_r['plnum'];
    }
}
//排序
$addorder = 'plid desc';
$myorder = (int) $_GET['myorder'];
if ($myorder == 1) {
    $addorder = 'plid';
    $search .= '&myorder=' . $myorder;
}
$query .= " order by " . $addorder . " limit {$offset},{$line}";
$sql = $empire->query($query);
//伪静态
$pagefunr = eReturnRewritePlUrl($classid, $id, $rewritedoaction, $myorder, $rewritetempid, 0);
$pagefunr['repagenum'] = 0;
//分页
if ($pagefunr['rewrite'] == 1) {
    $listpage = InfoUsePage($num, $line, $page_line, $start, $page, $search, $pagefunr);
} else {
    $listpage = page1($num, $line, $page_line, $start, $page, $search);
}
@(require ECMS_PATH . DASHBOARD . '/data/filecache/template/pl' . $tempid . '.php');
db_close();
$empire = null;
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:index.php

示例2: LoadLang

require "../../class/q_functions.php";
require "../class/user.php";
require "../../data/dbcache/class.php";
require "../" . LoadLang("pub/fun.php");
$link = db_connect();
$empire = new mysqlquery();
$editor = 1;
eCheckCloseMods('member');
//关闭模块
//是否登陆
$user = islogin();
$page = (int) $_GET['page'];
$page = RepPIntvar($page);
$start = 0;
$line = 25;
//每页显示条数
$page_line = 10;
//每页显示链接数
$offset = $page * $line;
//总偏移量
$totalquery = "select count(*) as total from {$dbtbpre}enewsdownrecord where userid='{$user['userid']}'";
$num = $empire->gettotal($totalquery);
//取得总条数
$query = "select * from {$dbtbpre}enewsdownrecord where userid='{$user['userid']}'";
$query = $query . " order by truetime desc limit {$offset},{$line}";
$sql = $empire->query($query);
$returnpage = page1($num, $line, $page_line, $start, $page, $search);
//导入模板
require ECMS_PATH . DASHBOARD . '/template/member/downbak.php';
db_close();
$empire = null;
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:index.php

示例3: mysql_close

  </tr>
  <tr>
   <th class="errormessage">{$mes}</th>

  </tr>
 </table>
 </center>
</body>
</html>
HTML;
    if (isset($link)) {
        mysql_close();
    }
    die;
}
// Inicio
switch ($_GET['step']) {
    case 2:
        page2();
        break;
    case 3:
        page3();
        break;
    case 4:
        page4();
        break;
    default:
        page1();
        // pagina de bienvenida
}
// Created by Perberos. All rights reversed (C) 2006
开发者ID:sonicmaster,项目名称:RPG,代码行数:31,代码来源:install.php

示例4: DtGetHtml

function DtGetHtml($add, $newstemp_r, $mid, $tbname, $line, $page_line, $start, $page, $search)
{
    global $public_r, $class_r, $class_zr, $class_tr, $fun_r, $empire, $dbtbpre, $emod_r, $level_r;
    //更新点击
    $empire->query("update {$dbtbpre}ecms_" . $tbname . " set onclick=onclick+1 where id='{$add['id']}' limit 1");
    $add['onclick'] = $add['onclick'] + 1;
    //模板参数
    $newstemptext = $newstemp_r[temptext];
    $formatdate = $newstemp_r[showdate];
    //页面
    $pagetitle = htmlspecialchars($add[title]);
    $url = ReturnClassLink($add[classid]);
    //导航
    $newstemptext = Info_ReplaceSvars($newstemptext, $url, $add[classid], $pagetitle, $add[keyboard], $pagetitle);
    //相关信息
    if (strstr($newstemptext, '[!--other.link--]')) {
        $keyboardtext = GetKeyboard($add[keyboard], $add[keyid], $add[classid], $add[id], $class_r[$add[classid]][link_num]);
    }
    //分页字段
    $ptitle = $add['title'];
    $truepage = '';
    $titleselect = '';
    $expage = '[!--empirenews.page--]';
    //分页符
    $pf = $emod_r[$mid]['pagef'];
    if ($pf && strstr($add[$pf], $expage)) {
        $n_r = explode($expage, $add[$pf]);
        $thispagenum = count($n_r);
        if ($page < 0 || $page > $thispagenum - 1) {
            $page = 0;
        }
        $add[$pf] = $n_r[$page];
        if ($page) {
            $ti_r = explode('[/!--empirenews.page--]', $n_r[$page]);
            if (count($ti_r) >= 2) {
                $ptitle = $ti_r[0];
                $add[$pf] = $ti_r[1];
            } else {
                $ptitle = $add['title'] . '(' . ($page + 1) . ')';
            }
        }
        //取得分页
        $truepage = page1($thispagenum, $line, $page_line, $start, $page, $search);
        //下拉式分页
        if (strstr($newstemptext, '[!--title.select--]')) {
            for ($j = 0; $j < $thispagenum; $j++) {
                $spurl = "ShowInfo.php?classid={$add['classid']}&id={$add['id']}&page={$j}";
                if ($j == 0) {
                    $sptitle = $add[title];
                } else {
                    $ti_r = explode('[/!--empirenews.page--]', $n_r[$j]);
                    $sptitle = count($ti_r) >= 2 ? $ti_r[0] : $add[title] . '(' . ($j + 1) . ')';
                }
                $select = '';
                if ($page == $j) {
                    $ptitle = $sptitle;
                    $select = ' selected';
                }
                $titleselect .= '<option value="' . $spurl . '"' . $select . '>' . $sptitle . '</option>';
            }
            $titleselect = '<select name="titleselect" onchange="self.location.href=this.options[this.selectedIndex].value">' . $titleselect . '</select>';
        }
        //下一页链接
        if ($page == $thispagenum - 1) {
            $thisnextlink = "ShowInfo.php?classid={$add['classid']}&id={$add['id']}&page=0";
        } else {
            $thisnextlink = "ShowInfo.php?classid={$add['classid']}&id={$add['id']}&page=" . ($page + 1);
        }
    }
    //返回替换验证字符
    $docheckrep = ReturnCheckDoRepStr();
    if ($add[newstext]) {
        if (empty($public_r['dorepword']) && $docheckrep[3]) {
            $add[newstext] = ReplaceWord($add[newstext]);
            //过滤字符
        }
        if (empty($public_r['dorepkey']) && $docheckrep[4] && !empty($add[dokey])) {
            $add[newstext] = ReplaceKey($add[newstext]);
        }
        if ($public_r['opencopytext']) {
            $add[newstext] = AddNotCopyRndStr($add[newstext]);
            //随机复制字符
        }
    }
    //变量
    $tempf = $emod_r[$mid]['tempf'];
    $fr = explode(',', $tempf);
    $fcount = count($fr) - 1;
    //变量替换
    $newstempstr = $newstemptext;
    //模板
    for ($i = 1; $i < $fcount; $i++) {
        $f = $fr[$i];
        $value = $add[$f];
        if ($f == 'downpath') {
            if (strstr($newstemptext, '[!--downpath--]')) {
                $value = ReturnDownSoftHtml($add);
            }
        } elseif ($f == 'onlinepath') {
            if (strstr($newstemptext, '[!--onlinepath--]')) {
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:101,代码来源:ShowInfo.php

示例5: page

             }
             $data1 .= '</td>';
         }
         $data1 .= '</table><td>';
     }
     $data3 .= $data2 . '</table></td></td><td style="width: 1600px; overflow: auto; display: block;"><table>' . $data1 . '</table></td></tr></table>';
     $data['aaData'] = $data3;
     break;
 case "get_edit_page":
     $data['page'][] = page();
     break;
 case 'disable':
     mysql_query("UPDATE `person_work_graphic` SET `actived`='0' WHERE (`id`='{$_REQUEST['graphic_id']}')");
     break;
 case 'get_add_page':
     $data['page'][] = page1($_REQUEST[id]);
     break;
 case 'save_dialog':
     //---------------- save / edit ---------------
     $date = split(' - ', $_REQUEST[graphic_time]);
     if (empty($_REQUEST[id])) {
         $qvr = mysql_query("SELECT * FROM `person_work_graphic`\r\n                        WHERE person_id='{$_REQUEST['user']}' AND  (date(`start`)='{$_REQUEST['date']}' OR date(`end`)='{$_REQUEST['date']}') AND actived=1;");
         if (mysql_num_rows($qvr) > 0) {
             $error = "ამ დღეს ამ მომხმარებელზე უკვე არსებობს გრაფიკი";
         } else {
             mysql_query("\r\n\tINSERT INTO `person_work_graphic` (`user_id`, `start`, `end`,`person_id`)\r\n\tVALUES ('{$user_id}', '{$_REQUEST['date']} {$date['0']}' , IF('{$date['0']}'<'{$date['1']}', '{$_REQUEST['date']} {$date['1']}',ADDTIME('{$_REQUEST['date']} {$date['1']}','24:00:00')),'{$_REQUEST['user']}')\r\n");
         }
     } else {
         mysql_query("UPDATE `person_work_graphic` \r\n            SET \r\n            `user_id`='{$user_id}',\r\n            `start` ='{$_REQUEST['date']} {$date['0']}', \r\n            `end`   =IF('{$date['0']}'<'{$date['1']}', '{$_REQUEST['date']} {$date['1']}',ADDTIME('{$_REQUEST['date']} {$date['1']}','24:00:00'))\r\n    WHERE (`id`='{$_REQUEST['id']}')");
     }
     //------------------------------------
开发者ID:aleqsandre553,项目名称:ktg,代码行数:31,代码来源:work_menager.action.php

示例6: page

     }
     break;
 case "get_edit_page":
     $data['page'][] = page();
     break;
 case 'getworc':
     $code[] = dateRange($_REQUEST[start], $_REQUEST[end]);
     print_r($code);
     break;
     /////////////////////////////////////////////////////////////////////9999999999999999999999999999999999
 /////////////////////////////////////////////////////////////////////9999999999999999999999999999999999
 case 'disable':
     mysql_query("UPDATE `work_graphic` SET `actived`='0' WHERE (`id`='{$_REQUEST['id']}')");
     break;
 case 'get_add_page':
     $data['page'][] = page1();
     break;
 case 'get_list1':
     $count = $_REQUEST['count'];
     $hidden = $_REQUEST['hidden'];
     $res1 = mysql_fetch_array(mysql_query("SELECT work_graphic_id\r\n\t\t\t\tFROM person_work_graphic\r\n\t\t\t\tWHERE `date`=\r\n\t\t\t\t ('" . date('Y-m-d', strtotime($_REQUEST[date])) . "') + INTERVAL {$_REQUEST['id']}-1 DAY\r\n\t\t\t\t AND user_id={$user_id}"));
     //return 0;
     $rResult = mysql_query(" SELECT \twork_graphic.id,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`start`,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`breack_start`,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`breack_end`,\r\n\t\t\t\t\t\t\t\t\twork_graphic.`end`\r\n\t\t\t\t\t\t\t\t\tFROM `work_graphic`\r\n\t\t\t\t\t\t\t\t\tleft JOIN person_work_graphic ON person_work_graphic.work_graphic_id = work_graphic.id\r\n\t\t\t\t\t\t\t\t\tWHERE work_graphic.week_day_id = {$_REQUEST['id']} AND work_graphic.actived=1");
     $data = array("aaData" => array());
     while ($aRow = mysql_fetch_array($rResult)) {
         $row = array();
         for ($i = 0; $i < $count; $i++) {
             /* General output */
             if ($i == $count - 1) {
                 //	echo "$res1[0]__$aRow[id]";
                 if ($res1[0] == $aRow[$hidden]) {
开发者ID:aleqsandre553,项目名称:ktg,代码行数:31,代码来源:persons_work.action.php


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