コード例 #1
0
ファイル: home.php プロジェクト: MrMoDoor/Carbon-Forum
		<?php 
}
?>
								<div class="pagination">
<?php 
/*
foreach (range(1, 10) as $TotalPage) {
	foreach (range(1, $TotalPage) as $Page) {
		echo '<div class="pagination">';
		Pagination("/page/",$Page,$TotalPage);
		# code...
		echo "</div>";
	}
}
*/
Pagination("/page/", $Page, $TotalPage);
?>
									<div class="c">
									</div>
								</div>
				</div>
			</div>
			<!-- main-content end -->
			<!-- main-sider start -->
			<div class="main-sider">
				<?php 
include $TemplatePath . 'sider.php';
?>
				<div class="sider-box">
					<div class="sider-box-title"><?php 
echo $Lang['Website_Statistics'];
コード例 #2
0
ファイル: topic.php プロジェクト: richardcj/Carbon-Forum
				<div class="c"></div>
			</div>
			<?php 
        }
        ?>
			<div class="c"></div>
		</div>
		<div class="c"></div>
	</div>
<?php 
    }
    if ($TotalPage > 1) {
        ?>
<div class="pagination">
	<?php 
        Pagination("/t/" . $ID . "-", $Page, $TotalPage);
        ?>
<div class="c"></div>
</div>
<?php 
    }
    ?>
</div>
<!-- comment list end -->
<?php 
}
?>
<!-- editor start -->
<?php 
if ($Topic['IsLocked'] || !$Topic['IsLocked'] && !$CurUserInfo) {
    ?>
コード例 #3
0
ファイル: favorites.php プロジェクト: MrMoDoor/Carbon-Forum
    ?>
</a>
					</span>
					<span class="item-date float-right">
						<?php 
    echo $Lang['Collected_In'] . FormatTime($Topic['DateCreated']);
    ?>
					</span>
				</div>
				<div class="c"></div>
			</div>
							
		<?php 
}
?>
		<div class="pagination">
			<?php 
Pagination('/favorites/page/', $Page, $TotalPage);
?>
			<div class="c"></div>
		</div>
	</div>
</div>
<!-- main-content end -->
<!-- main-sider start -->
<div class="main-sider">
	<?php 
include $TemplatePath . 'sider.php';
?>
</div>
<!-- main-sider end -->
コード例 #4
0
ファイル: tag.php プロジェクト: godfly/Carbon-Forum
" target="_blank"><?php 
        echo $Topic['Replies'];
        ?>
</a>
			</div>
		<?php 
    }
    ?>
			<div class="c"></div>
		</div>
		<?php 
}
?>
		<div class="pagination">
			<?php 
Pagination('/tag/' . $TagInfo['Name'] . '/page/', $Page, $TotalPage);
?>
			<div class="c"></div>
		</div>
	</div>
</div>
<!-- main-content end -->
<!-- main-sider start -->
<div class="main-sider">
	<div class="sider-box">
		<div class="sider-box-title"><?php 
echo $Lang['Tag'];
?>
:<?php 
echo $TagName;
?>
コード例 #5
0
ファイル: ovov.class.php プロジェクト: qinquanxing/huaxia
 function pagelists($ziduan)
 {
     global $Db, $Base, $db_prefix, $web_wshtml;
     $page_sql = "select * from `" . $db_prefix . "doc` where `if_del`=0";
     if (!empty($ziduan)) {
         $page_sql .= " and `" . $ziduan . "`=1";
     }
     $page = $_GET['page'];
     if (empty($page)) {
         $page = 1;
     }
     $total = $Db->RowsAll($page_sql);
     $pageno = intval($_REQUEST['page']);
     if ($pageno == 0 || $pageno < 0) {
         $pageno = 1;
     }
     $per = 10;
     //每页记录数
     $page_num = ceil($total / $per);
     $pagelist = Pagination($total, $per, $page);
     $page_sql .= " order by `id` LIMIT " . ($page - 1) * $per . "," . $per . "";
     $presult = $Db->FetchAll($page_sql);
     return $presult;
 }
コード例 #6
0
ファイル: bizes.php プロジェクト: n0tt/gameserver
?>
">#Descrição</a></th>
			<th><a href="index.php?action=bizes&order=3&page=<?php 
echo $page;
?>
">#Venda</a></th>
		</tr>
	</thead>
<?php 
foreach ($db->query($sql) as $row) {
    echo '<tr>
			<td>' . $row["id"] . '</td>
            <td><a href="index.php?action=users;id=' . $row["donoid"] . '">' . $row["dono"] . '</a></td>
			<td>' . $row["level"] . '</td>
			<td>' . $row["descricao"] . '</td>
			<td>';
    if ($row["vendida"] == 1) {
        echo "<span class='label label-danger'>Comprada</span>";
    } else {
        echo "<span class='label label-success'>Há venda</span>";
    }
    echo '</td>
            </tr>';
}
?>
</table>
<div class="center-block text-center">
<?php 
Pagination(3, "index.php?action=bizes&order=" . $order);
?>
</div>
コード例 #7
0
function arPagination($content, $page)
{
    if ($page == "" || $page == 0) {
        $page = 1;
    }
    $pagenum = $page - 1;
    $contentarr = explode("[Next_Page]", $content);
    //按照[arpage]对文章内容进行分割
    $arrnum = count($contentarr);
    //返回数组的总数
    $aaa = Pagination($arrnum, "1", $page);
    //$menu.="<span style=\"float:right\">$aaa</span>";               //输出分页
    $menu .= "{$contentarr[$pagenum]}";
    //输出当前页
    $menu .= "<br/><br/><center>{$aaa}</center>";
    //输出分页
    return $menu;
}
コード例 #8
0
ファイル: user.php プロジェクト: qinquanxing/huaxia
     $usersql = "select * from `" . $db_prefix . "users` a left join `" . $db_prefix . "department` b on `a`.`user_right`=`b`.`de_id` left join `" . $db_prefix . "quanxian` c on `a`.`user_quanxian`=`c`.`qx_id` where `a`.`user_ifdel`=0 and ( `a`.`user_name` like '%" . $username . "%' or `a`.`user_ture_name` like '%" . $username . "%') order by user_id desc";
 }
 //echo $usersql;die;
 $page = $_GET['page'];
 if (empty($page)) {
     $page = 1;
 }
 $total = $Db->RowsAll($usersql);
 $pageno = intval($_REQUEST['page']);
 if ($pageno == 0 || $pageno < 0) {
     $pageno = 1;
 }
 $per = 10;
 //每页记录数
 $page_num = ceil($total / $per);
 $pagelist = Pagination($total, $per, $page);
 if ($Db->RowsAll($usersql) == 0) {
     $Base->ErrorMsg('对不起,没有找到您要找的用户……', 'user.php');
     exit;
 }
 $usersql = $usersql . " LIMIT " . ($page - 1) * $per . "," . $per . "";
 $user_source = $Db->ThisQuery($usersql);
 while ($user_listxx3 = $Db->Fetch($user_source)) {
     $lastsj = intval(time() - 1 * 60);
     //1分钟访问为在线人数
     $onlineok = $Db->RowsAll("select `user_id`  from `" . $db_prefix . "users` where `user_id`=" . $user_listxx3['user_id'] . " and `user_lastsj`>=" . $lastsj . "");
     $newuser[] = array('user_id' => $user_listxx3['user_id'], 'user_name' => $user_listxx3['user_name'], 'user_ture_name' => $user_listxx3['user_ture_name'], 'user_sex' => $user_listxx3['user_sex'], 'user_position' => $View->Printchannelname($user_listxx3['user_position']), 'user_workexperience' => $user_listxx3['user_workexperience'], 'de_name' => $user_listxx3['de_name'], 'qx_name' => $user_listxx3['qx_name'], 'user_cview' => $user_listxx3['user_cview'], 'onlineok' => $onlineok);
 }
 $quanxian = $Db->FetchALL("select * from`" . $db_prefix . "quanxian` where `qx_ifdel`=0");
 $smarty->assign("quanxian", $quanxian);
 $smarty->assign("user_sqlname", $username);
コード例 #9
0
ファイル: myLib.php プロジェクト: qinquanxing/huaxia
function printArticleList($sql, $per)
{
    global $Db, $web_wshtml, $db_prefix, $smarty;
    // 	$sql='SELECT `article_id`,`article_title`,`add_time`,`article_keyword`,`digest`,`jump_url_is_on`,`jump_url`,`index_flash` FROM `'.$db_prefix.'article` WHERE `is_locked`=0 and `article_sid`='.$sid.' ORDER BY `article_id` DESC,`is_sequence` DESC';
    $total = $Db->RowsAll($sql);
    $page = $_GET['page'] ? intval($_GET['page']) : 1;
    $pageno = intval($page);
    if ($pageno == 0 || $pageno < 0) {
        $pageno = 1;
    }
    $page_num = ceil($total / $per);
    $smarty->assign('page_num', $page_num);
    if ($total > $per) {
        if ($web_wshtml == 'open') {
            $pagelist = Pagination_html($total, $per, $page);
        } else {
            $pagelist = Pagination($total, $per, $page, $sid);
        }
        $smarty->assign('pagelist', $pagelist);
        $smarty->assign("total", $total);
        $smarty->assign("page_now", $page);
    }
    $sql = $sql . " LIMIT " . ($page - 1) * $per . "," . $per . "";
    $res = $Db->FetchAll($sql);
    if ($res) {
        foreach ($res as $key => $val) {
            // 			$res[$key]['url']=$web_wshtml=='open'?'show_'.$res[$key]['article_id']:'show.php?id='.$res[$key]['article_id'];
            $res[$key]['add_time'] = date('Y-m-d', $res[$key]['add_time']);
            // 			if($res[$key]['jump_url_is_on']){
            // 				$res[$key]['url']=$res[$key]['jump_url'];
            // 			}
        }
    }
    return $res;
}
コード例 #10
0
$mot = "";
//varialbe pour la recherche
$affichage = isset($_GET['page']) ? $_GET['page'] * $articles_par_pages : 0;
//si un get existe pour recuperer le numero de la page on affecte sinon on va a la page 0origine
if (isset($_GET['mot'])) {
    $mot = $_GET['mot'];
    //affectation du get de recherche
    $select_all_post = "SELECT id, titre, texte, DATE_FORMAT(date, '%d/%m/%Y') \n    as date_fr FROM articles WHERE publie = 1 AND (titre LIKE '%{$mot}%' OR texte LIKE '%{$mot}%') ORDER BY id DESC LIMIT {$affichage},{$articles_par_pages}";
    //requete pour la recherche
} else {
    $select_all_post = "SELECT id, titre, texte, DATE_FORMAT(date, '%d/%m/%Y') as date_fr FROM articles WHERE publie = 1 ORDER BY id DESC LIMIT {$affichage},{$articles_par_pages}";
    // affiche toute la table article avec condition sur publie == 1
}
$requesta = mysql_query($select_all_post);
// on place dans une variable l'executionde la req
$nb_pages = Pagination($articles_par_pages, $mot);
if (isset($_GET['mot'])) {
    //nombre d'articles correspondant a la recherche
    if (!empty($mot)) {
        $_SESSION['msg_ok'] = $articles_par_pages * $nb_pages . " Articles Correspondent à votre recherche.";
    }
}
include_once 'include/header.inc.php';
// == include mais empeche plusieurs include
$smarty->assign('nb_pages', $nb_pages);
//recuperatio ndes artoicles
if (!mysql_num_rows($requesta) == 0) {
    for ($i = 0; $result_request = mysql_fetch_array($requesta); $i++) {
        $elem[$i] = $result_request;
    }
    $smarty->assign('elements', $elem);
コード例 #11
0
ファイル: houses.php プロジェクト: n0tt/gameserver
?>
">#Descrição</a></th>
			<th><a href="index.php?action=houses&order=3&page=<?php 
echo $page;
?>
">#Venda</a></th>
		</tr>
	</thead>
<?php 
foreach ($db->query($sql) as $row) {
    echo '<tr>
			<td>' . $row["id"] . '</td>
            <td><a href="index.php?action=users;id=' . $row["donoid"] . '">' . $row["dono"] . '</a></td>
			<td>' . $row["level"] . '</td>
			<td>' . $row["descricao"] . '</td>
			<td>';
    if ($row["vendida"] == 1) {
        echo "<span class='label label-danger'>Comprada</span>";
    } else {
        echo "<span class='label label-success'>Há venda</span>";
    }
    echo '</td>
            </tr>';
}
?>
</table>
<div class="center-block text-center">
<?php 
Pagination(2, "index.php?action=houses&order=" . $order);
?>
</div>
コード例 #12
0
ファイル: npcfactions.php プロジェクト: EQMacEmu/allaclone
    $start = 0;
    //if no page var is given, set start to 0
}
$total_pages = GetFieldByQuery("num", "SELECT COUNT(*) as num FROM {$tbl_name}");
// Pagination //
$Title = "Bestiary by Factions";
include $includes_dir . 'headers.php';
include $includes_dir . 'functions.php';
echo '<br><center><table width="50%" border ="1" style="background-color: ; filter:alpha(opacity=80); -moz-opacity:0.8; opacity: 0.8;"><td align="left">';
echo "<p class=menuh>Factions:<p>";
$query = "SELECT id,name from {$tbfactionlist} order by name ASC";
// Limits for pagination
$query .= " LIMIT {$start}, {$MaxResultsPerPage}";
$result = mysql_query($query) or message_die('item.php', 'MYSQL_QUERY', $query, mysql_error());
$RowClass = "lr";
while ($row = mysql_fetch_array($result)) {
    echo '<tr class="' . $RowClass . '"><td>';
    echo "<li><a href=faction.php?id=" . $row["id"] . ">" . $row["name"] . "</a>";
    echo '</td></tr>';
    if ($RowClass == "lr") {
        $RowClass = "dr";
    } else {
        $RowClass = "lr";
    }
}
echo '</table>';
print "<table><tr><td align='center'>";
// Print pagination
print Pagination($targetpage, $page, $total_pages, $MaxResultsPerPage, $AdjacentPages);
print "</td></tr></table>";
include $includes_dir . "footers.php";
コード例 #13
0
ファイル: players.php プロジェクト: n0tt/gameserver
?>
">#Mortes</a></th>
			<th><a href="index.php?action=players&order=4&page=<?php 
echo $page;
?>
">#Dinheiro</a></th>
			<th><a href="index.php?action=players&order=5&page=<?php 
echo $page;
?>
">#Tempo Online</a></th>
		</tr>
	</thead>
<?php 
foreach ($db->query($sql) as $row) {
    echo '<tr>
			<td>' . $row["userid"] . '</td>
            <td><a href="index.php?action=users;id=' . $row["userid"] . '">' . $row["nome"] . '</a></td>
			<td>' . $row["level"] . '</td>
			<td>' . $row["mortos"] . '</td>
			<td>' . $row["mortes"] . '</td>
			<td>' . $row['carteira'] . '</td>
            <td>' . date('H:i:s', $row['tempoingame']) . '</td>
            </tr>';
}
?>
</table>
<div class="center-block text-center">
<?php 
Pagination(1, "index.php?action=players&order=" . $order);
?>
</div>
コード例 #14
0
function arPagination($content, $page)
{
    global $web_wshtml;
    if ($page == "" || $page == 0) {
        $page = 1;
    }
    $pagenum = $page - 1;
    $contentarr = explode("[Next_Page]", $content);
    //按照[arpage]对文章内容进行分割
    $arrnum = count($contentarr);
    //返回数组的总数
    $aaa = $web_wshtml == 'open' ? Pagination_nhtml($arrnum, '1', $page) : Pagination($arrnum, '1', $page);
    //$menu.="<span style=\"float:right\">$aaa</span>";               //输出分页
    $menus .= "{$contentarr[$pagenum]}";
    //输出当前页
    $menus .= "<br/><br/><center><div class='page'>{$aaa}</div></center>";
    //输出分页
    return $menus;
}
コード例 #15
0
ファイル: mysql.class.php プロジェクト: qinquanxing/huaxia
 function printList($sql, $per)
 {
     global $Db, $web_wshtml, $db_prefix, $smarty;
     $total = $Db->RowsAll($sql);
     $pageno = isset($_GET['page']) ? intval($_GET['page']) : 0;
     if ($pageno == 0 || $pageno < 0) {
         $pageno = 1;
     }
     $page_num = ceil($total / $per);
     $smarty->assign('page_num', $page_num);
     $pagelist = Pagination($total, $per, $pageno);
     $smarty->assign('pagelist', $pagelist);
     $sql = $sql . " LIMIT " . ($pageno - 1) * $per . "," . $per . "";
     $smarty->assign("total", $total);
     $smarty->assign("page_now", $pageno);
     $res = $Db->FetchAll($sql);
     $num = 0;
     if ($res) {
         foreach ($res as $key => $val) {
             $res[$key]['num'] = $pageno > 1 ? $pageno - 1 . $num++ + 1 : ++$num;
         }
         return $res;
     }
 }
コード例 #16
0
ファイル: view.class.php プロジェクト: qinquanxing/huaxia
 function Stliebiao($ziduan = array(), $type, $type_value = '', $ifdel = '', $tab = '', $data = array(), $mold = '')
 {
     global $Db, $db_prefix, $total, $pagelist, $deliebiao;
     foreach ($ziduan as $ziduanvalue) {
         $ziduanarray[] = "`" . $ziduanvalue . "`";
     }
     $ziduanstr = implode(",", $ziduanarray);
     $fields = '';
     $insertvalue = '';
     foreach ($data as $key => $value) {
         if (!empty($value)) {
             $fields .= " and `" . $key . "`='" . $value . "'";
         } else {
             $fields .= '';
         }
         $fields = substr($fields, 0);
     }
     if (!empty($ziduanstr)) {
         $ziduanstr .= ",";
     }
     $page = trim($_GET['page']);
     $sql_new = "select  `id`   from   `" . $db_prefix . "{$tab}`   where   `{$ifdel}`=0   and   `{$type}`=" . $type_value . "" . $fields . "  ";
     if (!empty($mold)) {
         $sql_new .= "  and  `type`=" . intval($mold) . "";
     }
     $total = $Db->RowsAll($sql_new);
     $pageno = intval($_REQUEST['page']);
     if ($pageno == 0 || $pageno < 0) {
         $pageno = 1;
     }
     $per = 5;
     //每页记录数
     $pagelist = Pagination($total, $per, $pageno);
     //     咨询日期   店号   区域       姓名           工作时间 c_rate 两率查询 c_retdate 回访日期/下店日期 c_visiman 回访人
     $sqlview = "select  " . $ziduanstr . "`id`,`c_uid`   from `" . $db_prefix . "{$tab}`  where   `{$ifdel}`=0   and   `{$type}`=" . $type_value . "" . $fields . "  ";
     if (!empty($mold)) {
         $sqlview .= "  and  `type`=" . intval($mold) . "";
     }
     $sqlview .= "  limit  " . ($pageno - 1) * $per . "," . $per . " ";
     $deliebiao = $Db->FetchAll($sqlview);
     foreach ($deliebiao as $key => $value) {
         $uid = $Db->Fetch($Db->ThisQuery("select  `user_name`,`user_right`   from `" . $db_prefix . "users`  where  `user_id`= " . intval($value['c_uid']) . ""));
         $user_right = $Db->Fetch($Db->ThisQuery("select  `de_name`   from `" . $db_prefix . "department`  where  `de_id`= " . intval($uid['user_right']) . ""));
         $deliebiao[$key]['user_right'] = $user_right['de_name'];
         $deliebiao[$key]['u_name'] = $uid['user_name'];
         $deliebiao[$key]['c_addtime'] = date("Y-m-d  h:m:s", $value['c_addtime']);
     }
 }