当前位置: 首页>>代码示例>>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;未经允许,请勿转载。