public function Save() { if ($this->_POST) { $ID = _intval($this->_POST['ID'], true); $Data['Title'] = trim($this->_POST['Title']); $Data['Url'] = trim($this->_POST['Url']); $Data['Describe'] = trim($this->_POST['Describe']); $Data['DisplayOrder'] = _intval($this->_POST['DisplayOrder'], true); $Data['Property'] = _intval($this->_POST['Property'], true) ? 1 : 0; $Data['Status'] = _intval($this->_POST['Status'], true) ? 1 : 0; $Data['CategoryID'] = _intval($this->_POST['CategoryID'], true); if (!$ID) { $Data['Created'] = date('Y-m-d H:i:s', $this->timestamp); $Data['CreatedUserID'] = $this->UserID; } else { $Data['Modified'] = date('Y-m-d H:i:s', $this->timestamp); $Data['ModifiedUserID'] = $this->UserID; } $DB = new DB(); if ($ID) { if ($DB->UpdateArray('tbl_links', $Data, array('ID' => $ID))) { $this->__Message('修改友情链接成功!', UrlRewriteSimple('Links', 'Index', true), '继续操作'); } else { $this->__Message('修改友情链接失败,请再一次尝试!'); } } else { if ($DB->insertArray('tbl_links', $Data)) { $this->__Message('添加友情链接成功!', UrlRewriteSimple('Links', 'Index', true), '继续操作'); } else { $this->__Message('添加友情链接失败,请再一次尝试!'); } } } }
public function FrameMenu() { if (!$this->UserDetail) { echo "<script>top.location.reload();</script>"; exit; } if (!$this->IsRoot) { $this->Roles = $this->Users->GetRoles($this->UserDetail['UserGroupID']); } $this->ParentModuleID = _intval($this->_GET['ParentModuleID'], true); }
public function Update() { if ($this->_POST) { $VariablesModule = new VariablesModule(); $VariableName = trim($this->_POST['VariableName']); $VariableDescribe = trim($this->_POST['VariableDescribe']); $VariableValue = trim($this->_POST['VariableValue']); $VariableType = _intval($this->_POST['VariableType']); if (strlen($VariableName) <= 0 || strlen($VariableValue) <= 0) { $this->__Message('全局参数的命名和取值不得为空!'); } if ($VariablesModule->Create($VariableName, $VariableValue, $VariableDescribe, $VariableType)) { $this->__Message('保存参数成功!', UrlRewriteSimple('GlobalCfgs', 'Lists'), '继续操作'); } else { $this->__Message('保存参数失败!'); } } }
public function Lists() { $Liuliang = new LiuliangModule(); $Page = _intval($this->_GET['Page'], true); $this->ip = $ip = trim($this->_GET['ip']); if (!$Page) { $Page = 1; } $Limit = 50; $Offset = ($Page - 1) * $Limit; $this->Data = $Data = $Liuliang->Lists($Offset, $Limit, $ip); if ($Page > 1) { $this->BackPage = $Page - 1; } if (count($Data) == $Limit) { $this->NextPage = $Page + 1; } $this->Page = $Page; }
public function Delete() { $ModuleID = _intval($this->_GET['ModuleID'], true); $Modules = new ModulesModule(); if ($Modules->Delete($ModuleID) > 0) { return $this->__ArrJsonMessage(__SUCC__, '删除视图模块成功!'); } else { return $this->__ArrJsonMessage(__ERROR__, '删除视图模块失败!'); } }
public function Setting() { $ArticleIDs = $this->_GET['ArticleID']; $Page = _intval($this->_GET['Page']); $CategoryID = _intval($this->_GET['CategoryID'], true); $Category = new ArticlesCategoryModule(); $CategoryDetail = $Category->Get($CategoryID); if (!$CategoryDetail) { $this->__Message('您没有选择的分类不存在!'); } if (is_array($ArticleIDs)) { $articles = new ArticlesModule(); foreach ($ArticleIDs as $ArticleID) { $articles->UpdateCategoryID($ArticleID, $CategoryID, $CategoryDetail['CategoryIDS']); } $this->__Message('已完成分类设置操作!', UrlRewriteSimple('Articles', 'Lists', true) . '&Page=' . $Page, '继续操作'); } else { $this->__Message('您没有选择准备分类设置的记录!'); } }
public function GbaoPenManage() { $CustomersProjectID = _intval($this->_GET['ID']); if ($CustomersProjectID == 0) { JsMessage('操作错误,请再一次尝试!'); } /* 获取客户G宝盆信息 */ $CustProModule = new CustProModule(); $CustProInfo = $CustProModule->GetOneInfoByKeyID($CustomersProjectID); /* 组成G宝盆发送字符串并POST到G宝盆平台模拟登陆 */ $TuUrl = GBAOPEN_DOMAIN . 'superadmin/agency_web_manage.php'; $Md5Key = FENGXIN_MD5KEY; $ToString .= 'cus_name=' . $CustProInfo['G_name']; $ToString = md5($ToString . '&Md5Key=' . $Md5Key); $form_str = '<form action="' . $TuUrl . '" method="post" name="E_FORM" id="payorder_form">'; $form_str .= '<input type="hidden" name="cus_name" value="' . $CustProInfo['G_name'] . '">'; $form_str .= '<input type="hidden" name="Msg" value="' . $ToString . '">'; $form_str .= '</form>'; echo $form_str; echo "<script>document.getElementById('payorder_form').submit();</script>"; }
public function Manage() { $CustomersProjectID = _intval($this->_GET['ID']); if ($CustomersProjectID == 0) { JsMessage('操作错误,请再一次尝试!'); } /* 获取客户风信信息 */ $CustProModule = new CustProModule(); $CustProInfo = $CustProModule->GetOneInfoByKeyID($CustomersProjectID); /* 组成风信发送字符串并POST到风信平台模拟登陆 */ $TuUrl = FENGXIN_DOMAIN . 'index.php?g=Api&m=Wxusers&a=simulation_login'; $Md5Key = FENGXIN_MD5KEY; $ToString = 'FengXinUserName='******'FengXinUserName']; $Msg = md5($ToString . '&Md5Key=' . $Md5Key); $form_str = '<form action="' . $TuUrl . '" method="post" name="E_FORM" id="payorder_form">'; $form_str .= '<input type="hidden" name="FengXinUserName" value="' . $CustProInfo['FengXinUserName'] . '">'; $form_str .= '<input type="hidden" name="Msg" value="' . $Msg . '">'; $form_str .= '</form>'; echo $form_str; // exit; echo "<script>document.getElementById('payorder_form').submit();</script>"; exit; //$Return = request_by_other ( $TuUrl, $ToString ); //$ReturnArray = GetReturnInfo($Return); }
public function GetDoubleStModelRead() { if ($this->_GET) { $Number = _intval($this->_GET['Number']); //每页显示数量 if ($Number == 0) { $Number = 1; } $Where = ' where TuiJian>1'; $Model = new ModelModule(); //$Offset = ($Page - 1) * $Number; $ModelList = $Model->GetPackagesLists($Where, 0, $Number); $ModelListNun = $Model->GetPackagesListsNum($Where); $String = ''; foreach ($ModelList as $Value) { $ModelPC = $Model->GetOneInfoByKeyID('\'' . $Value['PCNum'] . '\'', 'NO'); $ModelPhone = $Model->GetOneInfoByKeyID('\'' . $Value['PhoneNum'] . '\'', 'NO'); $ModelPC['Pic'] = DAILI_DOMAIN . 'uploads/img_url/' . $ModelPC['Pic']; $ModelPhone['Pic'] = DAILI_DOMAIN . 'uploads/img_url/' . $ModelPhone['Pic']; if (!$Value['Url_status']) { $Value['PCUrl'] = ''; $Value['EWM'] = ''; } else { $Value['EWM'] = 'http://s.jiathis.com/qrcode.php?url=' . $Value['PhoneUrl']; } $String .= ' <model> <id>' . $Value['ID'] . '</id> <title>' . $Value['PackagesName'] . '</title> <price>' . $Value['Price'] . '</price> <youhui>' . $Value['Youhui'] . '</youhui> <website>' . $Value['PCUrl'] . '</website> <pcpicture>' . $ModelPC['Pic'] . '</pcpicture> <mobilepicture>' . $ModelPhone['Pic'] . '</mobilepicture> <ewm>' . $Value['EWM'] . '</ewm> <time>' . $Value['AddTime'] . '</time> </model> '; } $String = '<?xml version="1.0" encoding="utf-8"?> <models> ' . $String . ' <page> <total>' . $ModelListNun['Num'] . '</total> </page> </models>'; echo $String; exit; } else { echo '参数错误'; exit; } }
public function Register() { include __ExpressPHP_Path__ . '/class/class.Browser.php'; $this->Parameters = $this->__LoadParameters('users'); if ($this->_POST) { $UserName = strtolower(trim($this->_POST['UserName'])); if (strlen($UserName) < 3 || strlen($UserName) > 20) { JsMessage('非法登陆名,登陆名必须是4~20个字符组成!'); } $Password = $this->_POST['Password'] == $this->_POST['CfmPassword'] && strlen($this->_POST['Password']) >= 6 ? $this->_POST['Password'] : false; if (!$Password || preg_match("/^([0-9]+)\$/", $Password)) { JsMessage('非法密码, 密码不接受空格,且长度不得少于6个字符! 并不接受纯数字的密码!'); } $Email = trim($_POST['Email']); if (!$Email || !_IsEmail($Email)) { JsMessage('非法邮件, 请填写完整的邮件地址!'); } new Browser($RegIP, $OS, $Software, $Version); unset($OS, $Software, $Version); $Data['NickName'] = trim($this->_POST['NickName']); if (strlen($Data['NickName']) > 32) { JsMessage('非法昵称, 长度不得超过32个字符(约20个汉字或全角字符)!'); } $Data['Sign'] = trim($this->_POST['Sign']); if (strlen($Data['Sign']) > 64) { JsMessage('非法个性签名, 长度不得超过64个字符(约40个汉字或全角字符)!'); } $Data['Gender'] = _intval($this->_POST['Gender'], true) == 1 ? 1 : 2; $Data['StateID'] = _intval($this->_POST['StateID'], true); $Data['CityID'] = _intval($this->_POST['CityID'], true); $Data['TownID'] = _intval($this->_POST['TownID'], true); $Data['Question'] = trim($this->_POST['Question']); $Data['Answer'] = md5($Data['Question'] . $this->_POST['Answer'] . $UserName); $Data['RealName'] = trim($this->_POST['RealName']); if (strlen($Data['RealName']) > 32) { JsMessage('非法联系人, 长度不得超过32个字符(约20个汉字或全角字符)!'); } $Data['Address'] = trim($this->_POST['Address']); if (strlen($Data['Address']) > 120) { JsMessage('非法联系地址, 长度不得超过120个字符(约80个汉字或全角字符)!'); } $Data['Postcode'] = trim($this->_POST['Postcode']); if (strlen($Data['Postcode']) > 32) { JsMessage('非法邮政编码, 长度不得超过32个字符!'); } $Data['MobileTelephone'] = trim($this->_POST['MobileTelephone']); if (strlen($Data['MobileTelephone']) > 32) { JsMessage('非法手机号码, 长度不得超过32个字符!'); } $Data['Telephone'] = trim($this->_POST['Telephone']); if (strlen($Data['Telephone']) > 32) { JsMessage('非法电话号码, 长度不得超过32个字符!'); } $Data['Fax'] = trim($this->_POST['Fax']); if (strlen($Data['Fax']) > 32) { JsMessage('非法传真号码, 长度不得超过32个字符!'); } $Data['IM'] = json_encode($this->_POST['IM']); $NewUserID = $this->Users->NewUser($UserName, $Password, $Email, 0, $RegIP); if ($NewUserID > 0) { if ($this->Users->UpdateDetail($NewUserID, $Data) <= 0) { $this->Users->Delete($NewUserID); } if ($this->_POST['SuccToLogin']) { $this->Users->Session('UserID', $NewUserID); } JsMessage('恭喜您,您已经成功注册了账户!', '/'); } else { switch ($NewUserID) { case -1: JsMessage('您填写的登陆名已经被其它人注册了! 建议您使用其它登陆名!'); break; case -2: JsMessage('很抱歉, 您填写的邮件地址已经注册过了!'); break; case -3: JsMessage('由于系统设置原因, 暂时不能完成您的注册!'); break; case -4: JsMessage('很抱歉, 系统暂时不接受账户注册!'); break; case -5: JsMessage('很抱歉, 系统不接受您的注册申请!'); break; default: JsMessage('注册失败, 请检查您的注册信息!'); } } } }
public function Delete() { $KeyID = $this->_GET['KeyID']; $Page = _intval($this->_GET['Page']); $ProjectModule = new ProjectModule(); if ($ProjectModule->DeleteProjectByKeyID($KeyID)) { $this->__Message('已完成删除操作!', UrlRewriteSimple('Project', 'Lists', true) . '&Page=' . $Page, '继续操作'); } else { $this->__Message('删除失败,请再一次尝试!'); } }
public function Info() { $this->OrderID = _intval($this->_GET['OrderID']); $this->Page = _intval($this->_GET['Page']); $OrderModule = new OrderModule(); $OrderInfo = $OrderModule->GetOneInfoByKeyID($this->OrderID); $AgentModule = new AgentModule(); $AgentInfo = $AgentModule->GetOneInfoByKeyID($OrderInfo['AgentID']); $OrderInfo['AgentUserName'] = $AgentInfo['UserName']; $ProjectModule = new ProjectModule(); $ProjectInfo = $ProjectModule->GetOneInfoByKeyID($OrderInfo['ProjectID']); $OrderInfo['ProjectName'] = $ProjectInfo['ProjectName']; $OrderDescriptionModule = new OrderDescriptionModule(); $OrderDescriptionInfo = $OrderDescriptionModule->GetOneInfoByKeyID($OrderInfo['DescriptionID']); $OrderInfo['Description'] = $OrderDescriptionInfo['Description']; if ($OrderInfo['Type'] == 1) { $OrderInfo['TypeName'] = '入账'; } else { $OrderInfo['TypeName'] = '消费'; } $this->OrderInfo = $OrderInfo; }
<?php include './ExpressPHP.Init.php'; if ($_GET['Action'] == 'GetLocation') { include './modules/class.AreasModule.php'; $ParentID = _intval($_GET['ParentID']); $TargetID = $_GET['TargetID']; $SelectID = $_GET['SelectID']; $DB = new DB(); $Result = $DB->Select('SELECT AreaID,AreaName FROM tbl_location WHERE ParentAreaID=' . $ParentID . ' ORDER BY AreaID ASC'); if ($Result) { echo JsonMessage('succ', '成功取得区域', $Result, array('TargetID' => $TargetID, 'SelectID' => $SelectID)); } else { echo JsonMessage('succ', '成功取得区域', null); } } if ($_GET['Action'] == 'CheckUserName') { $UserName = trim($_GET['UserName']); if (!class_exists('UsersModule')) { include './modules/class.UsersModule.php'; } $Users = new UsersModule(); if (!preg_match("/^([^ ]{3,20})\$/", $UserName)) { echo JsonMessage('error', '非法登陆名,请重新填写您的登陆名!', null); exit; } if ($Users->CheckUserName($UserName)) { echo JsonMessage('error', htmlencode($UserName) . '已经被其它人使用!', null); exit; } else { unset($Users);
public function DeleteCustomer() { $LogsFunction = new LogsFunction(); $CustomersID = $this->_GET['ID']; $CustomersModule = new CustomersModule(); $CustomersInfo = $CustomersModule->GetOneInfoByKeyID($CustomersID); if ($CustomersInfo['AgentID'] != $_SESSION['AgentID']) { $LogsFunction->logsinfile('103', 3, $CustomersID); JsMessage('删除失败,请确定您已经登录!'); } $Page = _intval($this->_GET['Page']); $CustProModule = new CustProModule(); $CustProModule->DeleteInfoByCustomersID($CustomersID); if ($CustomersModule->DeleteInfoByKeyID($CustomersID)) { $LogsFunction->logsinfile('103', 1, $CustomersID); JsMessage('已完成删除操作!', UrlRewriteSimple('Agent', 'Customer', true) . '&Page=' . $Page, '继续操作'); } else { $LogsFunction->logsinfile('103', 0, $CustomersID); JsMessage('删除失败,请再一次尝试!'); } }
public function GetProjectProperty() { $ProjectID = _intval($this->_GET['ProjectID']); $PropertyModule = new PropertyModule(); $String = ''; //产品下属性列表 $MysqlWhere = ' where ProjectID=' . $ProjectID . ' and ProjectPropertyParentID=0'; $Data = $PropertyModule->GetProjectPropertyLists($MysqlWhere, 0, 100); foreach ($Data as $Key => $Value) { $String .= '<p>' . $Value['ProjectPropertyName']; $String .= '<select name="ProjectPropertyID[]" id="ProjectPropertyID' . $Value['ProjectPropertyID'] . '">'; $MysqlWhereTwo = ' where ProjectPropertyParentID=' . $Value['ProjectPropertyID']; $Data[$Key]['Two'] = $PropertyModule->GetProjectPropertyLists($MysqlWhereTwo, 0, 100); foreach ($Data[$Key]['Two'] as $KeyTwo => $ValueTwo) { $String .= '<option value="' . $ValueTwo['ProjectPropertyID'] . '" > ' . $ValueTwo['ProjectPropertyName'] . ' </option>'; } $String .= '</select>'; $String .= '</p>'; } echo $String; exit; }
if (@copy($picture['tmp_name'], DocumentRoot . $newfile)) { $PicturesModule->Create($newfile, null, null, $UserID, 0); $ResultMessage = '图像文件已上传成功!'; } else { $ResultMessage = '很抱歉,复制文件失败, 请尝试重新上传!'; } } else { $ResultMessage = '很抱歉,只允许接受jpg/png/gif/jpeg格式文件上传!'; } } else { $ResultMessage = '很抱歉, 文件上传失败, 请尝试重新上传!'; } } // uploaded end. $PageSize = 20; $Page = _intval($_GET['Page'], true); $Page = max(1, $Page); $Data = $PicturesModule->Lists($UserID, $Page, $PageSize); } } else { $ExitMessage = '很抱歉,您没有权限浏览该页面或进行该操作!'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>图像管理器</title> <script type="text/javascript" src="/Javascripts/jquery.min.js"></script> <script type="text/javascript"> var CurrentPath = '';
public function UpdateShop() { if ($this->_GET) { $CustomersProjectID = _intval($this->_GET['CustomersProjectID']); if ($CustomersProjectID == 0) { JsMessage('参数错误!'); } $this->__LoadModules('/modules/class.CustProModule.php'); $CustProModule = new CustProModule(); $CustomersProjectInfo = $CustProModule->GetOneInfoByKeyID($CustomersProjectID); if ($CustomersProjectInfo['MoreTime'] == '') { $EndTime = $CustomersProjectInfo['EndTime']; } elseif ($CustomersProjectInfo['EndTime'] > $CustomersProjectInfo['MoreTime']) { $EndTime = $CustomersProjectInfo['EndTime']; } elseif ($CustomersProjectInfo['EndTime'] < $CustomersProjectInfo['MoreTime']) { $EndTime = $CustomersProjectInfo['MoreTime']; } $PostString = ''; $PostString .= 'CustomersProjectID=' . $CustomersProjectInfo['CustomersProjectID'] . '&'; $PostString .= 'StartTime=' . $CustomersProjectInfo['StartTime'] . '&'; $PostString .= 'EndTime=' . $EndTime . '&'; $PostString .= 'Tpye=2&'; $PostString .= 'OpenLinks=' . $CustomersProjectInfo['OpenLinks'] . '&'; $PostString .= 'md5sign=' . md5(substr($PostString, 0, -1) . $this->SecretKey); $Return = PostInfo($CustomersProjectInfo['OpenLinks'], $PostString); if (_intval($Return['ResultCode']) == 0) { JsMessage('操作失败,请重新操作', $_SERVER['HTTP_REFERER']); } JsMessage($Return['ErrorMessages'], $_SERVER['HTTP_REFERER']); } }
public function GbaoPenManage() { $CustomersProjectID = _intval($this->_GET['ID']); if ($CustomersProjectID == 0) { JsMessage('操作错误,请再一次尝试!'); } /* 获取客户G宝盆信息 */ $CustProModule = new CustProModule(); $CustProInfo = $CustProModule->GetOneInfoByKeyID($CustomersProjectID); /* 组成G宝盆发送字符串并POST到G宝盆平台模拟登陆 */ $TuUrl = GBAOPEN_DOMAIN . 'api/loginuser'; //随机文件名开始生成 $randomLock = getstr(); $password = md5($randomLock); $password = md5($password); //生成握手密钥 $text = getstr(); //生成dll文件 $myfile = @fopen($password . '.dll', "w+"); if (!$myfile) { return 0; } fwrite($myfile, $text); fclose($myfile); $timemap = $randomLock; $taget = md5($text . $password); $ToString .= 'cus_name=' . $CustProInfo['G_name']; $form_str = '<form action="' . $TuUrl . '" method="post" name="E_FORM" id="payorder_form">'; $form_str .= '<input type="hidden" name="name" value="' . $CustProInfo['G_name'] . '">'; $form_str .= '<input type="hidden" name="timemap" value="' . $timemap . '">'; $form_str .= '<input type="hidden" name="taget" value="' . $taget . '">'; $form_str .= '</form>'; echo $form_str; echo "<script>document.getElementById('payorder_form').submit();</script>"; }
public function Delete() { $ProjectID = _intval($this->_GET['ProjectID']); $ProjectPropertyID = _intval($this->_GET['ProjectPropertyID']); $PropertyModule = new PropertyModule(); if ($PropertyModule->DeleteProjectPropertyByKeyID($ProjectPropertyID)) { $this->__Message('已完成删除操作!', UrlRewriteSimple('Property', 'Lists', true) . '&ProjectID=' . $ProjectID, '继续操作'); } else { $this->__Message('删除失败,请再一次尝试!'); } }
public function AddAccount() { if ($this->_POST) { //提交添加 $Post['ProjectID'] = _intval($this->_POST['ProjectID']); $Post['AgentID'] = _intval($this->_POST['AgentID']); $Remarks = trim($this->_POST['Remarks']); $JinE = trim($this->_POST['JinE']); $Page = _intval($this->_POST['Page']); if ($JinE < 1 || $Post['ProjectID'] == 0 || $Post['AgentID'] == 0) { $this->__Message('信息填写错误!'); } $AgentAccountModule = new AgentAccountModule(); $AgentAccountInfo = $AgentAccountModule->GetOneInfoByArrayKeys($Post); if (empty($AgentAccountInfo)) { //添加数据表 $Post['Remarks'] = $Remarks; $Post['Total'] = $JinE; $Post['Balance'] = $JinE; $IsOk = $AgentAccountModule->InsertArray($Post); } else { //更新数据表 $UpdateInfo['Remarks'] = $Remarks; $UpdateInfo['Total'] = $AgentAccountInfo['Total'] + $JinE; $UpdateInfo['Balance'] = $AgentAccountInfo['Balance'] + $JinE; $IsOk = $AgentAccountModule->UpdateArrayByArrayKeys($UpdateInfo, $Post); } if ($IsOk) { $AddOrderIsOk = $this->AddOrder($Post['AgentID'], $Post['ProjectID'], $JinE + $AgentAccountInfo['Balance'], $JinE); if ($AddOrderIsOk == 0) { $this->__Message('入账成功,记录操作失败!', UrlRewriteSimple($this->MyModule, 'Lists', true) . '&Page=' . $Page, '继续操作'); } $this->__Message('入账成功!', UrlRewriteSimple($this->MyModule, 'Lists', true) . '&Page=' . $Page, '继续操作'); } else { $this->__Message('入账失败,请再一次尝试!'); } } else { $AgentID = trim($this->_GET['AgentID']); $AgentModule = new AgentModule(); $this->AgentInfo = $AgentModule->GetOneInfoByKeyID($AgentID); //print_r($this->AgentInfo);exit; include 'Include/LevelArray.php'; $ProjectModule = new ProjectModule(); $this->ProjectLists = $ProjectModule->GetProjectLists(); } }
public function Delete() { $CustomersID = $this->_GET['CustomersID']; $Page = _intval($this->_GET['Page']); $CustProModule = new CustProModule(); $CustProModule->DeleteInfoByCustomersID($CustomersID); $CustomersModule = new CustomersModule(); if ($CustomersModule->DeleteInfoByKeyID($CustomersID)) { $this->__Message('已完成删除操作!', UrlRewriteSimple('Customers', 'Lists', true) . '&Page=' . $Page, '继续操作'); } else { $this->__Message('删除失败,请再一次尝试!'); } }
public function Delete() { $AgentPriceID = $this->_GET['AgentPriceID']; $Page = _intval($this->_GET['Page']); $AgentPriceModule = new AgentPriceModule(); if ($AgentPriceModule->DeleteInfoByKeyID($AgentPriceID)) { $this->__Message('已完成删除操作!', UrlRewriteSimple($this->MyModule, 'Lists', true) . '&Page=' . $Page, '继续操作'); } else { $this->__Message('删除失败,请再一次尝试!'); } }
public function Delete() { $CategoryID = _intval($this->_GET['CategoryID'], true); if (!$CategoryID) { return $this->__ArrJsonMessage(__ERROR__, '很抱歉,您未指定的外链目录!'); } $Category = new LinksCategoryModule(); $Detail = $Category->Get($CategoryID); if (!$Detail) { return $this->__ArrJsonMessage(__ERROR__, '很抱歉,您指定的外链目录不存在!'); } if ($Category->GetSubs($CategoryID)) { return $this->__ArrJsonMessage(__ERROR__, '很抱歉,您指定的外链目录下还有子分类,不允许删除!'); } if ($Category->Delete($CategoryID)) { return $this->__ArrJsonMessage(__SUCC__, '删除外链目录“' . $Detail['CategoryName'] . '”成功!'); } else { return $this->__ArrJsonMessage(__SUCC__, '删除外链目录“' . $Detail['CategoryName'] . '”失败! 请重试!'); } }
public function Areas() { $p = $this->__LoadParameters('globals'); if (is_array($p)) { foreach ($p as $key => $value) { $this->{$key} = $value; } } unset($p); if ($this->_POST) { $GroupID = _intval($this->_POST['GroupID'], true); $DB = new DB(); if ($this->_POST['OP'] == 'SetIsCity') { $Sql = 'UPDATE location set Property=1 WHERE AreaID=%d'; } elseif ($this->_POST['OP'] == 'SetIsState') { $Sql = 'UPDATE location set Property=0 WHERE AreaID=%d'; } elseif ($this->_POST['OP'] == 'SetIsTown') { $Sql = 'UPDATE location set Property=2 WHERE AreaID=%d'; } elseif ($this->_POST['OP'] == 'SetIsTop') { $Sql = 'UPDATE location set IsTop=1 WHERE AreaID=%d'; } elseif ($this->_POST['OP'] == 'SetUnIsTop') { $Sql = 'UPDATE location set IsTop=0 WHERE AreaID=%d'; } if (is_array($this->_POST['AreaID'])) { foreach ($this->_POST['AreaID'] as $AreaID) { if ($this->_POST['OP'] == 'SetGroup') { UpdateAreaGroupID($AreaID, $GroupID); } else { $DB->Update(sprintf($Sql, $AreaID)); } } } $ParentAreaID = _intval($this->_POST['ParentAreaID'], true); $this->__Message('操作已完成!', UrlRewriteSimple('AreasManager', 'Areas') . '&ParentAreaID=' . $ParentAreaID, '继续操作'); } $this->ParentAreaID = _intval($this->_GET['ParentAreaID']); if ($this->_GET['AreaID']) { $AreaDetail = GetAreaDetail($this->_GET['AreaID']); if ($AreaDetail) { $this->AreaDetail = $AreaDetail; } } }