public function updataKf() { @header("Content-Type:text/html; charset=utf-8"); $admin = $this->is_login(); //检查登录 $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $LinksObj = M("links_info"); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['type'] = '客服'; $data['links'] = $POST['links']; $data['Title'] = $POST['Title']; $data['S_Image'] = $POST['S_Image']; $data['enduptime'] = date("Y-m-d H:i:s"); $num = $LinksObj->where('id=' . $id . '')->save($data); if ($num > 0) { $this->success("数据已修改", "index.php?m=kf"); } else { $this->error("数据未修改"); } } //未提交 $links = $LinksObj->find($id); $this->assign("links", $links); $this->assign("type", '修改'); $this->display("Tpl/Kf/addKf.html"); }
public function updataUser() { @header("Content-Type:text/html; charset=utf-8"); $admin = $this->is_login(); //检查登录 $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $UserObj = M("user_info"); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); //$data['UserName']=$POST['UserName']; $data['RealName'] = $POST['RealName']; if (!empty($POST['PassWord'])) { $data['PassWord'] = md5($POST['PassWord']); } $data['isVerify'] = $POST['isVerify']; $data['enduptime'] = date("Y-m-d H:i:s"); $num = $UserObj->where('id=' . $id . '')->save($data); if ($num > 0) { $this->success("数据已修改"); } else { $this->error("数据未修改"); } } //未提交 $arr = $UserObj->find($id); $this->assign("arr", $arr); $this->assign("type", '修改'); $this->display("Tpl/User/addUser.html"); }
public function index() { header("Content-Type:text/html; charset=utf-8"); $admin = parent::is_login(); $WebObj = M("setting_info"); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['Web_Name'] = $POST['Web_Name']; $data['Title'] = $POST['Title']; $data['SeoTitle'] = $POST['SeoTitle']; $data['Description'] = $POST['Description']; $data['Locked'] = $POST['Locked']; $data['Locked_is'] = $POST['Locked_is']; $data['cache'] = $POST['cache']; $data['Telphone'] = $POST['Telphone']; $data['Mobilephone'] = $POST['Mobilephone']; $data['PostCode'] = $POST['PostCode']; $data['beian'] = $POST['beian']; $data['Email'] = $POST['Email']; $data['QICQ'] = $POST['QICQ']; $data['Video'] = $POST['Video']; $data['Addess'] = $POST['Addess']; $data['oaurl'] = $_POST['oaurl']; $data['links1'] = $POST['links1']; $data['links2'] = $POST['links2']; $data['banquan'] = $POST['banquan']; $data['phone2'] = $POST['phone2']; $data['phone3'] = $POST['phone3']; $data['enduptime'] = date("Y-m-d H:i:s"); $num = $WebObj->where('id=1')->save($data); $runtime_path = '../Runtime/'; $this->dir_delete('../Html/'); $this->dir_delete($runtime_path . 'Cache/'); if (is_file($runtime_path . '~app.php')) { @unlink($runtime_path . '~app.php'); } if (is_file($runtime_path . '~runtime.php')) { @unlink($runtime_path . '~runtime.php'); } if (is_file($runtime_path . '~allinone.php')) { @unlink($runtime_path . '~allinone.php'); } F('webconfig', $data, $runtime_path . '/Data/'); if ($num > 0) { $this->success("参数已更新"); } else { $this->error("参数未更新"); } } //if (S('info')) { //$info = S('info'); //}else{ $info = $WebObj->find(1); //S('info', $info); //} $this->assign("info", $info); $this->display(); }
public function Replay() { @header("Content-Type:text/html; charset=utf-8"); $admin = $this->is_login(); //检查登录 $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $BookObj = M("guest_info"); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['Reply_Content'] = $POST['Reply_Content']; $data['Reply_Time'] = date("Y-m-d H:i:s"); $num = $BookObj->where('id=' . $id . '')->save($data); if ($num > 0) { $this->success("回复已更新"); } else { $this->error("回复未更新"); } } $arr = $BookObj->find($id); $this->assign("arr", $arr); $this->display(); }
public function updataSj() { @header("Content-Type:text/html; charset=utf-8"); $admin = $this->is_login(); //检查登录 $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $MemberObj = M("sj_info"); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['isVerify'] = $POST['isVerify']; if (!empty($POST['PassWord'])) { $data['PassWord'] = md5($POST['PassWord']); } $data['company_name'] = $POST['company_name']; $data['company_type'] = $POST['company_type']; $data['company_address'] = $POST['company_address']; $data['company_zijin'] = $POST['company_zijin']; $data['company_time'] = $POST['company_time']; $data['item_type'] = $POST['item_type']; $data['item_name'] = $POST['item_name']; $data['cxzs'] = $POST['cxzs']; $data['item_jibie'] = $POST['item_jibie']; $data['bzfw'] = $POST['bzfw']; $data['company_phone'] = $POST['company_phone']; $data['item_about'] = $POST['item_about']; $data['item_tedian'] = $POST['item_tedian']; $data['item_view'] = $POST['item_view']; $data['focusimg'] = $POST['focusimg']; $data['video'] = $POST['video']; $num = $MemberObj->where('id=' . $id . '')->save($data); if ($num > 0) { $this->success("数据已修改"); } else { $this->error("数据未修改"); } } //未提交 $arr = $MemberObj->find($id); $this->assign("arr", $arr); $this->assign("type", '修改'); $this->display("Tpl/sj/addsj.html"); }
public function updata() { @header("Content-Type:text/html; charset=utf-8"); $admin = $this->is_login(); //检查登录 $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $LinksObj = M("brand_info"); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['other'] = $POST['other']; $data['Title'] = $POST['Title']; $data['seokw'] = $POST['seokw']; $data['seoms'] = $POST['seoms']; $data['jsdm'] = $POST['jsdm']; $data['addtime'] = date("Y-m-d H:i:s"); $num = $LinksObj->where('id=' . $id . '')->save($data); if ($num > 0) { $imglist = explode("|", $_POST['s']); foreach ($imglist as $k => $v) { $dataimg['bid'] = $id; $dataimg['imgage'] = $v; $dataimg['addtime'] = date("Y-m-d H:i:s"); $numimg = M("brand_image")->add($dataimg); } $this->success("数据已修改"); } else { $this->error("数据未修改"); } } //未提交 $links = $LinksObj->find($id); //获取图片列表 $imglist = M("brand_image")->where("`bid`='{$links['id']}'")->select(); $this->assign("imglist", $imglist); $this->assign("links", $links); $this->assign("type", '修改'); $this->display("Tpl/brand/addbrand.html"); }
public function updataJob() { @header("Content-Type:text/html; charset=utf-8"); $admin = $this->is_login(); //检查登录 $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $JobObj = M("rc_info"); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['rc_name'] = $POST['rc_name']; $data['num'] = $POST['num']; $data['sex'] = $POST['sex']; $data['addess'] = $POST['addess']; $data['xhfw'] = $POST['xhfw']; $data['year'] = $POST['year']; $data['gzxz'] = $POST['gzxz']; $data['xlyq'] = $POST['xlyq']; $data['age'] = $POST['age']; $data['times'] = $POST['times']; $data['entime'] = $POST['entime']; $data['beizhu'] = $POST['beizhu']; $data['enduptime'] = date("Y-m-d H:i:s"); $num = $JobObj->where('id=' . $id . '')->save($data); if ($num > 0) { $this->success("数据已修改"); } else { $this->error("数据未修改"); } } //未提交 $Job = $JobObj->find($id); $this->assign("arr", $Job); $this->assign("type", '修改'); $this->display("Tpl/Job/addJob.html"); }
public function updataNewsType() { @header("Content-Type:text/html; charset=utf-8"); $admin = parent::is_login(); $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $TypeObj = M('news_type'); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['is_meau'] = $POST['is_meau']; $data['TypeName'] = $POST['TypeName']; $data['PathTree'] = $PathTree; $oldPathTree = $POST['oldPathTree']; $parentPathTree = $POST['parentPathTree']; $is_meau = $_POST['is_meau']; if ($parentPathTree == "/") { $PathTree = "/" . $POST['TypeName']; } else { $PathTree = $parentPathTree . "/" . $POST['TypeName']; } // 修改所有改类别得到pathtree $likelist = $TypeObj->where("`PathTree` like '{$oldPathTree}/%'")->select(); $len = strlen($oldPathTree); foreach ($likelist as $k => $v) { $right = substr($v['PathTree'], $len); $path = $PathTree . $right; $data1['PathTree'] = $path; $num = $TypeObj->where('id=' . $v['id'] . '')->save($data1); } // exit; $data['PathTree'] = $PathTree; $data['SortNumber'] = $POST['SortNumber']; $data['parentID_top'] = $this->getptop($id); $data['temp'] = $POST['temp']; if ($data['temp'] == '') { $data['temp'] = 'about'; } $data['contemp'] = $POST['contemp']; if ($data['contemp'] == '') { $data['contemp'] = 'about'; } $data['PageSize'] = $POST['PageSize']; $data['sTypeName'] = $POST['sTypeName']; $data['Video'] = $POST['Video']; $data['con1'] = $POST['con1']; $data['con2'] = $POST['con2']; $data['con3'] = $POST['con3']; $data['img1'] = $POST['img1']; $data['newsid'] = $POST['newsid']; $data['img2'] = $POST['img2']; $data['img3'] = $POST['img3']; $data['img4'] = $POST['img4']; $data['img5'] = $POST['img5']; $data['seotitle'] = $POST['seotitle']; if (empty($data['seo_title'])) { // $data['seo_title']=$data['sTypeName']; } $data['seokeywords'] = $POST['seokeywords']; $data['seodescription'] = $POST['seodescription']; if (empty($data['PageSize'])) { $data['PageSize'] = "默认"; } $data['endtime'] = date("Y-m-d H:i:s"); $num = $TypeObj->where('id=' . $id . '')->save($data); if ($num > 0) { $this->success("数据已修改", "index.php?m=News&a=newstype"); } else { $this->error("数据未修改"); } } $arr = $TypeObj->find($id); if (!$arr) { exit('系统无法找到指定数据'); } $this->assign("arr", $arr); $this->assign("type", "修改"); // 父类路径 $parentPathTree = "/"; $nickname = $TypeObj->where('id=' . $arr['parentID'] . '')->getField('PathTree'); if (!empty($nickname)) { $parentPathTree = $nickname; } $this->assign("parentPathTree", $parentPathTree); $this->assign("TypeID", $arr['parentID']); $this->assign("AllNewsType", $this->AllNewsType()); // 所有图文类别 $this->display('Tpl/News/addNewsType.html'); }
public function updataNewsType() { @header("Content-Type:text/html; charset=utf-8"); $admin = parent::is_login(); $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法"); } $TypeObj = M('news_type'); if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $data['is_meau'] = $POST['is_meau']; $data['TypeName'] = $POST['TypeName']; $data['PathTree'] = $PathTree; $oldPathTree = $POST['oldPathTree']; $parentPathTree = $POST['parentPathTree']; $is_meau = $_POST['is_meau']; if ($parentPathTree == "/") { $PathTree = "/" . $POST['TypeName']; } else { $PathTree = $parentPathTree . "/" . $POST['TypeName']; } //修改所有改类别得到pathtree //$sql="select `id`,`PathTree` from `tb_news_type` where "; $likelist = $TypeObj->where("`PathTree` like '{$oldPathTree}/%'")->select(); $len = strlen($oldPathTree); foreach ($likelist as $k => $v) { $right = substr($v['PathTree'], $len); $path = $PathTree . $right; //$sql="update `tb_news_type` set `PathTree`='$path' where `id`='$arr[id]'"; $data1['PathTree'] = $path; $num = $TypeObj->where('id=' . $v['id'] . '')->save($data1); //echo "/"; //echo $TypeObj->getLastSql(); //exit; } //exit; $data['PathTree'] = $PathTree; $data['SortNumber'] = $POST['SortNumber']; $data['parentID_top'] = '0'; $data['temp'] = $POST['temp']; if ($data['temp'] == '') { $data['temp'] = 'article.html'; } $data['PageSize'] = $POST['PageSize']; if (empty($data['PageSize'])) { $data['PageSize'] = "默认"; } $data['endtime'] = date("Y-m-d H:i:s"); $num = $TypeObj->where('id=' . $id . '')->save($data); if ($num > 0) { $this->success("数据已修改"); //parent::getnews("添加成功","index.php?m=page&a=pagetype"); } else { $this->error("数据未修改"); } } $arr = $TypeObj->find($id); if (!$arr) { exit('系统无法找到指定数据'); } $this->assign("arr", $arr); $this->assign("type", "修改"); //父类路径 $parentPathTree = "/"; $nickname = $TypeObj->where('id=' . $arr['parentID'] . '')->getField('PathTree'); if (!empty($nickname)) { $parentPathTree = $nickname; } $this->assign("parentPathTree", $parentPathTree); $this->assign("TypeID", $arr['parentID']); $this->assign("AllNewsType", $this->AllNewsType()); //所有图文类别 $this->display('Tpl/News/addNewsType.html'); }
public function updatatype() { @header("Content-Type:text/html; charset=utf-8"); $admin = parent::is_login(); $id = $_GET['id']; if (!is_numeric($id)) { $this->error("参数非法", "index.php?m=page&a=pagetype"); } $AddType = M("page_type"); //创建数据库连接 if ($_POST) { include_once "Common/CommClass.php"; CommClass::DenyOtherSubmit(); $POST = CommClass::Addslashes($_POST); $AddType->TypeName = $POST['TypeName']; $AddType->endtime = date("Y-m-d H:i:s"); $num = $AddType->where('id=' . $id . '')->save(); if ($num > 0) { parent::success("数据已修改", $this->thisurl()); } else { //parent::getnews(""); $this->error("数据未修改!", $this->thisurl()); } } $arr = $AddType->find($id); if (!$arr) { parent::error("系统无法找到指定数据"); } $this->assign("arr", $arr); $this->assign("type", "修改"); $this->display("Tpl/page/addtype.html"); }