<?php /** * 最新手机管理文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage phonelist */ if (is_object($objWebInit)) { if (!isset($objphonelist)) { include_once __WEB_ROOT . "/phonelist/class/phonelist.class.php"; include_once __WEB_ROOT . "/phonelist/config/var.inc.php"; $objphonelist = new phonelist(); $objphonelist->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objphonelist->db = $objWebInit->db; } else { $objphonelist->db(); } } $arrphonelistList = array(); $arrphonelistList = $objphonelist->getInfoList("where pass=1", " ORDER BY recommendflag DESC,submit_date DESC,clicktimes DESC", 0, 6, '*', null, false); //print_r($arrphonelistList); // 输出到模板 $arrMOutput["smarty_assign"]['arrphonelistList'] = $arrphonelistList; }
} 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) {
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); } } if ($_FILES['Filedata']['name'] != "") { $strOldFile = $arrGPic['FileSavePath'] . 's/' . $_POST['savefilename']; if (is_file($strOldFile)) { // 缩略图删除 unlink($strOldFile); } $strOldFile = $arrGPic['FileSavePath'] . 'b/' . $_POST['savefilename']; if (is_file($strOldFile)) { // 原文件删除 unlink($strOldFile); }
<?php /** * 手机管理文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage phonelist */ if (is_object($objWebInit)) { if (!isset($objphonelist)) { include_once __WEB_ROOT . "/phonelist/class/phonelist.class.php"; include_once __WEB_ROOT . "/phonelist/config/var.inc.php"; $objphonelist = new phonelist(); $objphonelist->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objphonelist->db = $objWebInit->db; } else { $objphonelist->db(); } } $arrTopphonelist = array(); $arrTopphonelist = $objphonelist->getInfoList("where pass=1", " ORDER BY recommendflag DESC,clicktimes DESC,submit_date DESC", 0, 15, true); unset($arrTopphonelist['COUNT_ROWS']); // print_r($arrTopphonelist); // 输出到模板 $arrMOutput["smarty_assign"]['arrTopphonelist'] = $arrTopphonelist; }
$objWebInit = new phonelist(); $objWebInit->db(); //访问权限检查 if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w')) { check::AlertExit('对不起,您没有写权限', -1); } if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST['type_id']) || empty($_POST['title'])) { check::AlertExit("错误:有必填选项没填!", -1); } if (!check::CheckMobilePhone($_POST['title'])) { check::AlertExit("错误:手机格式不对!", -1); } //if($_POST['title'] != '') $_POST['title_md5'] = md5($_POST['title']); //判断是否发布重复信息 $arrTemp = $objWebInit->getInfoList("where title='{$_POST['title']}'", "", 0, 1); if ($arrTemp['COUNT_ROWS'] != 0) { check::AlertExit("错误:相同的信息请不要重复发布!", -1); } $objWebInit->saveInfo($_POST, 0, false); //$objWebInit->updateCache($objWebInit->lastInsertIdG(),$_POST['type_id'],$arrMOutput); check::WindowLocation('index.php', 'page=' . $_GET['page']); } if (!is_array($arrMType) || empty($arrMType)) { $arrMType = $objWebInit->getTypeList(); $arrMType = $objWebInit->formatTypeList(0, $arrMType); } // 输出到模板 $arrMOutput["template_file"] = "admin.html"; $arrMOutput["smarty_assign"]['arrMType'] = $arrMType; $arrMOutput["smarty_assign"]['arrTypeB'] = $arrMTypeB;
$arrWhere[] = "tag LIKE '%{$v}%'"; } } } $arrLink[] = 'keywords=' . urlencode($strKeywords); } else { check::AlertExit("错误:关键词必须填写!", -1); } if (empty($_GET['page'])) { $intPage = 1; } else { $intPage = intval($_GET['page']); } $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']); $intRows = $arrInfoList['COUNT_ROWS']; unset($arrInfoList['COUNT_ROWS']); //翻页跳转link $strPage = $objWebInit->makeInfoListPage($intRows, $strLink, $link_type = $arrGWeb['URL_static']); // 输出到模板 $arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList; $arrMOutput["smarty_assign"]['strPage'] = $strPage; $arrMOutput["smarty_assign"]['page'] = $intPage; $arrMOutput["smarty_assign"]['arrMType'] = $arrMType; $arrMOutput["smarty_assign"]['strSearchTitle'] = $strKeywords . "搜索结果"; $arrMOutput['smarty_assign']['Title'] = $strKeywords . '搜索结果 - ' . $arrGWeb['name']; $arrMOutput['smarty_assign']['Description'] = $strKeywords . '搜索结果 - ' . $arrGWeb['name']; $arrMOutput['smarty_assign']['Keywords'] = $strKeywords . '搜索结果 - ' . $arrGWeb['name']; $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'list.html'; $objWebInit->output($arrMOutput);
// 构造搜索条件和翻页参数 if (!empty($_POST['title'])) { $arrWhere[] = "title LIKE '%" . $_POST['title'] . "%' "; } if (!empty($_POST['pass']) && ($_POST['pass'] == '1' || $_POST['pass'] == '0')) { $arrWhere[] = "pass='******'pass'] . "'"; } $strWhere = implode(' AND ', $arrWhere); if (!empty($strWhere)) { $strWhere = ' WHERE ' . $strWhere; } if (!isset($_POST['page']) || $_POST['page'] == '') { $_POST['page'] = 1; } $strOrder = ''; $arrInfoList = $objWebInit->getInfoList($strWhere, $strOrder, ($_POST['page'] - 1) * $_POST['type_id'], $_POST['type_id'], 'title', false); unset($arrInfoList['COUNT_ROWS']); $arrSMS = array(); if ($arrInfoList) { foreach ($arrInfoList as $v) { if (!empty($v['title'])) { $arrSMS[] = $v['title']; } } $arrSMS = array_unique($arrSMS); $strSMS = implode("\r\n", $arrSMS); } $arrMOutput["smarty_assign"]['strSMSCount'] = count($arrSMS); $arrMOutput["smarty_assign"]['strSMS'] = $strSMS; $arrMOutput["smarty_assign"]['strSMSPage'] = ++$_POST['page']; // echo '<pre>';print_r($arrSMS);