當前位置: 首頁>>代碼示例>>PHP>>正文


PHP admin::displayItems方法代碼示例

本文整理匯總了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) {
    ?>
開發者ID:raju99,項目名稱:sparkswap,代碼行數:31,代碼來源:search.php

示例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"/>
開發者ID:raju99,項目名稱:sparkswap,代碼行數:31,代碼來源:searchListing.php


注:本文中的admin::displayItems方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。