本文整理汇总了PHP中admin::displayItems方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::displayItems方法的具体用法?PHP admin::displayItems怎么用?PHP admin::displayItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::displayItems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Ps_Pagination
<?php
include '../include/header.php';
if (isset($_POST['search'])) {
$sql = user::searchAll();
$objPagination = new Ps_Pagination($conn, $sql, 5, 5);
$exsql = $objPagination->paginate();
$total_item = mysql_num_rows($exsql);
} else {
echo $sql = admin::displayItems();
$objPagination = new Ps_Pagination($conn, $sql, 5, 5);
echo $exsql = $objPagination->paginate();
$total_item = mysql_num_rows($exsql);
}
if (isset($_REQUEST['del_id'])) {
$item_id = $_REQUEST['del_id'];
$result = admin::deleteItem($item_id);
$_SESSION['succ_msg'] = "Item Deleted successfully";
header("location:" . $URL_SITE . "admin/itemManagement.php");
}
if (isset($_SESSION['MSG'])) {
echo $_SESSION['MSG'];
unset($_SESSION['MSG']);
}
?>
<h2>item listing</h2><br/>
<a href="addItem.php" >ADD Item</a>
<?php
if ($total_item > 0) {
?>
示例2: elseif
}
if (isset($_POST['word'])) {
$word = $_POST['word'];
$str .= 'word=$word';
}
if (isset($_POST['search'])) {
if (empty($_POST['zip']) && empty($_POST['word']) && ($_POST['word'] == "What do you need?" || $_POST['zip'] == "Zip code")) {
$sql = admin::displayItems(@$_SESSION['SORTING']);
} else {
$sql = user::searchAll(@$_SESSION['SORTING']);
}
} elseif (isset($_SESSION['search']['word']) || isset($_SESSION['search']['zip'])) {
$sql = user::searchAll(@$_SESSION['SORTING']);
//$file=$URL_SITE."front/searchListing.php";
} else {
$sql = admin::displayItems(@$_SESSION['SORTING']);
}
$objPagination = new Ps_Pagination($conn, $sql, 10, 5);
$exsql = $objPagination->paginate();
$total_item = @mysql_num_rows(@$exsql);
$location = get_current_location($ip);
?>
<div class="containersearch">
<!--containertop-->
<div class="searchslide">
<img src="<?php
echo $URL_SITE;
?>
images/img_1.png"/>