Beispiel #1
0
/**
 * 最新产品文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	product
 */
if (is_object($objWebInit)) {
    if (!isset($objproduct)) {
        include_once dirname(__FILE__) . "/../class/product.class.php";
        include_once dirname(__FILE__) . "/../config/var.inc.php";
        $objproduct = new product();
        $objproduct->setDBG($arrGPdoDB);
        $objproduct->arrGPic = $arrGPic;
        if (is_object($objWebInit->db)) {
            $objproduct->db = $objWebInit->db;
        } else {
            $objproduct->db();
        }
    }
    $arrTopproductcomp = array();
    $arrTopproductcomp = $objproduct->getInfoList("where pass=1 and company_md5 !=''", " group by company_md5  ORDER BY topflag DESC,submit_date DESC", 0, 13);
    unset($arrTopproductcomp['COUNT_ROWS']);
    //print_r($arrTopproductcomp);
    // 输出到模板
    $arrMOutput["smarty_assign"]['arrTopproductcomp'] = $arrTopproductcomp;
    $arrMOutput["smarty_assign"]['FileCallPathPC'] = $objproduct->arrGPic['FileCallPath'];
}
Beispiel #2
0
/**
 * 最新产品文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	product
 */
if (is_object($objWebInit)) {
    if (!isset($objproduct)) {
        include_once dirname(__FILE__) . "/../class/product.class.php";
        include_once dirname(__FILE__) . "/../config/var.inc.php";
        $objproduct = new product();
        $objproduct->setDBG($arrGPdoDB);
        $objproduct->arrGPic = $arrGPic;
        //print_r($arrGPic);exit;
        if (is_object($objWebInit->db)) {
            $objproduct->db = $objWebInit->db;
        } else {
            $objproduct->db();
        }
    }
    $arrTopproduct = array();
    $arrTopproduct = $objproduct->getInfoList("where pass=1", "  ORDER BY topflag DESC,submit_date DESC", 0, 7);
    unset($arrTopproduct['COUNT_ROWS']);
    // 输出到模板
    //print_r($arrTopproduct);
    $arrMOutput["smarty_assign"]['arrTopproduct'] = $arrTopproduct;
    $arrMOutput["smarty_assign"]['FileCallPathP'] = $objproduct->arrGPic['FileCallPath'];
}
Beispiel #3
0
            $intState = intval($_GET['state']);
            $arrWhere[] = " state = '{$intState}' ";
            $arrLink[] = 'state=' . $intState;
        }
    } else {
        $objWebInit->doInfoAction($_GET['action'], $_POST['select']);
    }
}
$strWhere = implode(' AND ', $arrWhere);
if (!empty($strWhere)) {
    $strWhere = ' WHERE ' . $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'], true);
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) {
Beispiel #4
0
 * @package		ArthurXF | Jerry
 * @subpackage	product
 */
//配置文件调用
require_once 'config/config.inc.php';
require_once "class/product.class.php";
$objWebInit = new product();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//翻页参数
$objWebInit->arrGPage = $arrGPage;
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//如果分类配置文件未配置 获取数据库分类配置信息
if (!is_array($arrMType) || empty($arrMType)) {
    $arrMType = $objWebInit->getTypeList();
    $arrMType = $objWebInit->formatTypeList(0, $arrMType);
}
$arrInfoList = array();
//获取数据库数据数组 getInfoList($where='',$order='',$intStartID = 0,$intListNum = 0,$field = '*',$arrData = array(),$blCount = true,$blComplex = false)
$arrInfoList = $objWebInit->getInfoList("where pass=1", "  ORDER BY recommendflag DESC,clicktimes DESC,submit_date DESC", 0, 10, '*', '', false);
//print_r($arrInfoList);
// 调用产品分类
include 'block/type.php';
// 输出到模板
$arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList;
$arrMOutput["smarty_assign"]['FileCallPath'] = $objWebInit->arrGPic['FileCallPath'];
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'index.html';
$objWebInit->output($arrMOutput);
Beispiel #5
0
<?php

/**
 * 热门招聘文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	product
 */
if (is_object($objWebInit)) {
    if (!isset($objproduct)) {
        include_once __WEB_ROOT . "/product/class/product.class.php";
        include_once __WEB_ROOT . "/product/config/var.inc.php";
        $objproduct = new product();
        $objproduct->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objproduct->db = $objWebInit->db;
        } else {
            $objproduct->db();
        }
    }
    $arrTopproduct = array();
    $arrTopproduct = $objproduct->getInfoList("where pass=1", "  ORDER BY recommendflag DESC,clicktimes DESC,submit_date DESC", 0, 15, true);
    unset($arrTopproduct['COUNT_ROWS']);
    // print_r($arrTopproduct);
    // 输出到模板
    $arrMOutput["smarty_assign"]['arrTopproduct'] = $arrTopproduct;
}
Beispiel #6
0
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;
        }
Beispiel #7
0
        $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;
//商展信息独有模块:获取公司名称md5值
if (isset($_GET['com']) && !empty($_GET['com'])) {
    $strWhere = "where company_md5='" . $_GET['com'] . "'";
}
//echo $strWhere;
//获取数据库数据数组 getInfoList($where='',$order='',$intStartID = 0,$intListNum = 0,$field = '*',$arrData = array(),$blCount = true,$blComplex = false)
$arrInfoList = $objWebInit->getInfoList($strWhere, ' ORDER BY topflag DESC,submit_date DESC', ($intPage - 1) * $arrGPage['page_size'], $arrGPage['page_size']);
$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']);