예제 #1
0
    $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;
//获取数据库数据数组 getInfoList($where='',$order='',$intStartID = 0,$intListNum = 0,$field = '*',$arrData = array(),$blCount = true,$blComplex = false)
$arrInfoList = $objWebInit->getInfoList($strWhere, '  ORDER BY recommendflag 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']);
예제 #2
0
<?php

/**
 * 最新 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	video
 */
if (is_object($objWebInit)) {
    if (!isset($objvideo)) {
        include_once __WEB_ROOT . "/video/class/video.class.php";
        include_once __WEB_ROOT . "/video/config/var.inc.php";
        $objvideo = new video();
        $objvideo->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objvideo->db = $objWebInit->db;
        } else {
            $objvideo->db();
        }
    }
    $arrNewest = array();
    $arrNewest = $objvideo->getInfoList("where pass=1", " ORDER BY clicktimes DESC,submit_date DESC", 0, 5, true);
    unset($arrNewest['COUNT_ROWS']);
    //print_r($arrNewest);
    // 输出到模板
    $arrMOutput["smarty_assign"]['arrNewest'] = $arrNewest;
}
예제 #3
0
$objWebInit->db();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['submitpass']) || $_POST['submitpass'] != $_SESSION['submitpasskey']) {
        exit;
    }
    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']);
    }
    //判断文章信息
    $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);
    }
    if ($_FILES['Filedata']['name'] != "") {
        $_POST['photo'] = $objWebInit->uploadInfoImage($_FILES['Filedata'], '', $_POST['FileListPicSize'], $_POST['csize0']);
    }
    //新图上传
    set_time_limit(0);
    foreach ($_FILES as $key => $val) {
        if (strrpos($key, 'Filedata') === false) {
            continue;
        }
        $num = substr($key, strlen('Filedata'));
        if (!empty($_FILES['Filedata' . $num]['name'])) {
            $arrTemp = array();
예제 #4
0
if (is_object($objWebInit)) {
    if (!isset($objvideo)) {
        include_once __WEB_ROOT . "/video/class/video.class.php";
        include_once __WEB_ROOT . "/video/config/var.inc.php";
        $objvideo = new video();
        $objvideo->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objvideo->db = $objWebInit->db;
        } else {
            $objvideo->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 = $objvideo->getInfoList($strWhere . " and pass=1 and id!=" . $arrInfo['id'], " ORDER BY clicktimes DESC,submit_date DESC", 0, 5, true);
    unset($arrRelative['COUNT_ROWS']);
    //print_r($arrRelative);
    // 输出到模板
    $arrMOutput["smarty_assign"]['arrRelative'] = $arrRelative;
}
예제 #5
0
        }
        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) {
예제 #6
0
<?php

/**
 * 最新行业视频文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	video
 */
if (is_object($objWebInit)) {
    if (!isset($objvideo)) {
        include_once dirname(__FILE__) . "/../class/video.class.php";
        include_once dirname(__FILE__) . "/../config/var.inc.php";
        $objvideo = new video();
        $objvideo->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objvideo->db = $objWebInit->db;
        } else {
            $objvideo->db();
        }
    }
    $arrTopvideo = array();
    $arrTopvideo['datas'] = $objvideo->getInfoList("where pass=1", "  ORDER BY topflag DESC,recommendflag DESC,clicktimes DESC", 0, 10);
    unset($arrTopvideo['datas']['COUNT_ROWS']);
    // 输出到模板
    $arrTopvideo['FileCallPath'] = $arrGPic['FileCallPath'];
    $arrMOutput["smarty_assign"]['arrTopvideo'] = $arrTopvideo;
}
예제 #7
0
require_once 'config/config.inc.php';
require_once "class/video.class.php";
$objWebInit = new video();
//数据库连接参数
$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);
}
//行业视频特有栏目:推荐视频
$arrInfoListRecommend = $objWebInit->getInfoList(' Where pass=1', ' ORDER BY recommendflag DESC,submit_date DESC', 0, 1);
$arrRecommend = $arrInfoListRecommend[0];
//推荐视频
//print_r($arrRecommend);
if (is_array($arrRecommend['video'])) {
    $arrRecommend['video_link'] = $arrRecommend['video'][0]['video'];
}
//print_r($arrRecommend);
//行业视频特有栏目:热点视频
$arrInfoListHot = $objWebInit->getInfoList(' Where pass=1', ' ORDER BY clicktimes DESC,recommendflag DESC,submit_date DESC', 0, 5, true, '', false);
unset($arrInfoListHot['COUNT']);
//print_r($arrInfoListHot);
// 输出到模板
$arrMOutput["smarty_assign"]['FileCallPath'] = $arrGPic['FileCallPath'];
$arrMOutput["smarty_assign"]['arrMType'] = $arrMType;
$arrMOutput["smarty_assign"]['arrInfoListHot'] = $arrInfoListHot;