本文整理匯總了PHP中company::getInfoList方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::getInfoList方法的具體用法?PHP company::getInfoList怎麽用?PHP company::getInfoList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類company
的用法示例。
在下文中一共展示了company::getInfoList方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: explode
if ($arrInfo['user_id'] != $_SESSION['user_id']) {
check::AlertExit("錯誤:此信息不是您發布的,您無權修改!", -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
check::AlertExit("錯誤:有必填選項沒填!", -1);
}
$arrTemp = explode('|', $_POST['type_id']);
$_POST['type_id'] = $arrTemp[0];
$_POST['type_roue_id'] = $arrTemp[1];
if ($_POST['title'] != '') {
$_POST['title_md5'] = md5($_POST['title']);
}
//判斷文章信息
if ($_POST['title_md5'] != $arrInfo['title_md5']) {
$arrTemp = $objWebInit->getInfoList("where title_md5='{$_POST['title_md5']}' and user_id = '{$_SESSION['user_id']}' and type_id='{$_POST['type_id']}'", "", 0, 1);
if ($arrTemp['COUNT_ROWS'] != 0) {
check::AlertExit("錯誤:相同的信息請不要重複發布!需要刷新排列的話,請使用列表下方“提前”選項!", -1);
}
}
//還原圖片數組
$_POST['photo'] = array();
if (!empty($_POST['savephoto'])) {
foreach ($_POST['savephoto'] as $key => $val) {
$arrTemp = array();
$arrTemp['photo'] = $val;
if (!empty($_POST['photo_narrate' . $key])) {
$arrTemp['photo_narrate'] = $_POST['photo_narrate' . $key];
}
$_POST['photo'][$key] = $arrTemp;
}
示例2: intval
}
if (!empty($_GET['type_id'])) {
$intTypeID = intval($_GET['type_id']);
$arrWhere[] = "type_id='" . $intTypeID . "' or type_roue_id like '%:{$intTypeID}:%'";
$arrLink[] = 'type_id=' . $intTypeID;
}
} else {
$objWebInit->doInfoAction($_GET['action'], $_POST['select']);
}
}
$strWhere = implode(' AND ', $arrWhere);
$strWhere = " WHERE user_id='{$_SESSION['user_id']}'" . $strWhere;
if (!isset($_GET['page']) || $_GET['page'] == '') {
$_GET['page'] = $arrGPage['page'];
}
$arrData = $objWebInit->getInfoList($strWhere, ' ORDER BY submit_date DESC', ($_GET['page'] - 1) * $arrGPage['page_size'], $arrGPage['page_size']);
if ($arrData == "") {
$arrData = null;
}
//翻頁跳轉link
$strLink = '';
if (!empty($arrLink)) {
$strLink = implode('&', $arrLink);
}
$strPage = $objWebInit->makeInfoListPage($arrData['COUNT_ROWS'], $strLink);
unset($arrData['COUNT_ROWS']);
// 取類別標題
if (is_array($arrMType) && !empty($arrMType)) {
foreach ($arrData as $k => $data) {
foreach ($arrMType as $k1 => $type) {
if ($data['type_id'] == $k1) {
示例3: intval
$arrWhere[] = "pass='1'";
if (!empty($_GET['type_id'])) {
$intTypeID = intval($_GET['type_id']);
$arrWhere[] = "type_id='" . $intTypeID . "'";
$arrLink[] = 'type_id=' . $intTypeID;
if (is_array($arrMType) && !empty($arrMType)) {
$arrMOutput["smarty_assign"]['strTypeTitle'] = $arrMType[$intTypeID];
} else {
$arrTypeInfo = $objWebInit->getTypeInfo($intTypeID);
$strTypeTitle = $arrTypeInfo['type_title'];
$arrMOutput["smarty_assign"]['strTypeTitle'] = $strTypeTitle;
}
}
$strWhere = implode(' AND ', $arrWhere);
$strWhere = 'where ' . $strWhere;
$arrInfoList = $objWebInit->getInfoList($strWhere, ' ORDER BY topflag DESC,submit_date DESC', ($intPage - 1) * $arrGPage['page_size'], $arrGPage['page_size'], true);
$intRows = $arrInfoList['COUNT_ROWS'];
unset($arrInfoList['COUNT_ROWS']);
//靜態url處理
$strLink = '';
if ($arrGWeb['URL_static']) {
if (!empty($arrLink)) {
$strLink = str_replace('=', '-', implode('-', $arrLink));
}
} else {
if (!empty($arrLink)) {
$strLink = implode('&', $arrLink);
}
}
//翻頁跳轉link
$strPage = $objWebInit->makeInfoListPage($intRows, $strLink, $link_type = $arrGWeb['URL_static']);
示例4: company
<?php
/**
* 最新新聞 列表文件
*
* @author Arthur(ArthurXF@gmail.com)
* @copyright (c) 2006 by bizeway.com
* @version $Id$
* @package ArthurXF
* @subpackage company
*/
if (is_object($objWebInit)) {
if (!isset($objcompany)) {
include_once __WEB_ROOT . "/company/class/company.class.php";
include_once __WEB_ROOT . "/company/config/var.inc.php";
$objcompany = new company();
$objcompany->setDBG($arrGPdoDB);
if (is_object($objWebInit->db)) {
$objcompany->db = $objWebInit->db;
} else {
$objcompany->db();
}
}
$arrNewest = array();
$arrNewest = $objcompany->getInfoList("where pass=1", " ORDER BY clicktimes DESC,submit_date DESC,recommendflag DESC,clicktimes DESC", 0, 5, true);
unset($arrNewest['COUNT_ROWS']);
//print_r($arrNewest);
// 輸出到模板
$arrMOutput["smarty_assign"]['arrNewest'] = $arrNewest;
}
示例5: company
if (is_object($objWebInit)) {
if (!isset($objcompany)) {
include_once __WEB_ROOT . "/company/class/company.class.php";
include_once __WEB_ROOT . "/company/config/var.inc.php";
$objcompany = new company();
$objcompany->setDBG($arrGPdoDB);
if (is_object($objWebInit->db)) {
$objcompany->db = $objWebInit->db;
} else {
$objcompany->db();
}
}
if (isset($arrInfo['tag']) && !empty($arrInfo['tag'])) {
$arrTag = explode(',', $arrInfo['tag']);
$where = array();
foreach ($arrTag as $strTag) {
$where[] = "'%" . $strTag . "%'";
}
//echo $arrInfo['id'];
//print_r($where);
$strWhere = implode(" || ", $where);
$strWhere = 'where (tag like ' . $strWhere . ')';
}
//echo $strWhere;
$arrRelative = array();
$arrRelative = $objcompany->getInfoList($strWhere . " and pass=1 and id!=" . $arrInfo['id'], " ORDER BY clicktimes DESC,submit_date DESC,recommendflag DESC,clicktimes DESC", 0, 5, true);
unset($arrRelative['COUNT_ROWS']);
//print_r($arrRelative);
// 輸出到模板
$arrMOutput["smarty_assign"]['arrRelative'] = $arrRelative;
}
示例6: company
<?php
/**
* 最新企業黃頁文件
*
* @author Arthur(ArthurXF@gmail.com)
* @copyright (c) 2006 by bizeway.com
* @version $Id$
* @package ArthurXF
* @subpackage company
*/
if (is_object($objWebInit)) {
if (!isset($objcompany)) {
include_once __WEB_ROOT . "/company/class/company.class.php";
include_once __WEB_ROOT . "/company/config/var.inc.php";
$objcompany = new company();
$objcompany->setDBG($arrGPdoDB);
if (is_object($objWebInit->db)) {
$objcompany->db = $objWebInit->db;
} else {
$objcompany->db();
}
}
$arrTopcompany = array();
$arrTemp = $objcompany->getInfoList("where pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
unset($arrTemp['COUNT_ROWS']);
$arrTopcompany['datas'] = $arrTemp;
//print_r($arrTopcompany);
// 輸出到模板
$arrMOutput["smarty_assign"]['arrTopcompany'] = $arrTopcompany;
}
示例7: company
*/
require_once 'config/config.inc.php';
require_once "class/company.class.php";
$objWebInit = new company();
//數據庫連接參數
$objWebInit->setDBG($arrGPdoDB);
//smarty參數
$objWebInit->arrGSmarty = $arrGSmarty;
//翻頁參數
$objWebInit->arrGPage = $arrGPage;
$objWebInit->db();
if (!is_array($arrMType) || empty($arrMType)) {
$arrMType = $objWebInit->getTypeList();
$arrMType = $objWebInit->formatTypeList(0, $arrMType);
}
foreach ($arrMType as $k => $v) {
$arrTopcompany[$k] = array();
if (is_array($v)) {
$arrTopcompany[$k]['type_title'] = $v['type_title'];
$arrTopcompany[$k]['type_id'] = $v['type_id'];
} else {
$arrTopcompany[$k]['type_title'] = $v;
$arrTopcompany[$k]['type_id'] = $k;
}
$arrTopcompany[$k]['datas'] = $objWebInit->getInfoList("where pass=1 and type_id=" . $arrTopcompany[$k]['type_id'], " ORDER BY recommendflag DESC,clicktimes DESC,submit_date DESC", 0, 12, true, '', false);
}
// 輸出到模板
$arrMOutput["smarty_assign"]['arrTopcompany'] = $arrTopcompany;
$arrMOutput["smarty_assign"]['arrMType'] = $arrMType;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'index.html';
$objWebInit->output($arrMOutput);