Esempio n. 1
0
/**
 * 最新文字链接文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	links
 */
if (is_object($objWebInit)) {
    if (!isset($objlinks)) {
        include_once __WEB_ROOT . '/links/class/links.class.php';
        include_once __WEB_ROOT . '/links/config/var.inc.php';
        $objlinks = new links();
        $objlinks->setDBG($arrGPdoDB);
        $objlinks->arrGPic = $arrGPic;
        if (is_object($objWebInit->db)) {
            $objlinks->db = $objWebInit->db;
        } else {
            $objlinks->db();
        }
    }
    $arrLinkList = array();
    $arrLinkList = $objlinks->getInfoList(" where pass=1 AND flag=1", "  ORDER BY submit_date DESC", 0, 12, '*', '', false);
    print_r($arrLinkList);
    exit;
    // 输出到模板
    $arrMOutput["smarty_assign"]['arrLinkList'] = $arrLinkList;
    $arrMOutput["smarty_assign"]['linkImg'] = $objlinks->arrGPic['FileCallPath'];
}
Esempio n. 2
0
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	links
 */
require_once '../config/config.inc.php';
require_once "../class/links.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new links();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if ($_FILES['Filedata']['name'] != "") {
        $_POST['UploadFile'] = $objWebInit->uploadInfoImage($_FILES['Filedata']);
    }
    //取得图片链接的文件类型
    if (!empty($_POST['UploadFile'])) {
        if ($_POST['UploadFile'] != '') {
            $_POST['FileExt'] = strrchr($_POST['UploadFile'], ".");
        } else {
            $_POST['FileExt'] = strrchr($_POST['weblogo'], ".");
        }