Exemplo n.º 1
0
    $rs = array();
    $rs['title'] = $_POST['title'];
    //$rs['cid']=$_POST['cid'];
    $rs['keywords'] = $_POST['keywords'];
    $rs['description'] = $_POST['description'];
    //$rs['outlink']=$_POST['outlink'];
    $rs['content'] = $_POST['p_info'];
    if ($_FILES['imagefile']['name']) {
        //图片上传
        $up = new upimg_class("../uploads/about/gszl", null);
        $rs_up = $up->upload('imagefile');
        if (!$rs_up) {
            admin_msg($_SERVER['HTTP_REFERER'], '图片上传错误:' . $up->error);
        }
        $pathImg = $up->imgName;
        $rs["bigimage"] = replacePath($pathImg);
        if (is_file(ADMIN . $_POST['bigimageold'])) {
            //删除原图片
            @unlink(ADMIN . $_POST['bigimageold']);
        }
    }
    $id = $_POST['id'];
    $result = $db->Execute('SELECT * FROM mycms_article_list WHERE id=' . $id . '');
    $updateSql = $db->GetUpdateSQL($result, $rs);
    $db->Execute($updateSql);
    $url = $_POST['url'];
    admin_msg($url, '文章编辑成功!');
} elseif ($_GET['action'] == 'del') {
    //=========================================================删除文章
    $id = $_GET['id'];
    if (!empty($id)) {
Exemplo n.º 2
0
 $cname = $_POST['cname'];
 if (!empty($cname)) {
     $up = new upimg_class("../uploads/icons/menu", null);
     $result = $up->upload('icon');
     if (!$result) {
         admin_msg($_SERVER['HTTP_REFERER'], '图片上传错误:' . $up->error);
     }
     $smallImage = $up->imgName;
     $rs = array();
     $rs['cname'] = $_POST['cname'];
     $rs['sort'] = $_POST['sort'];
     $rs['type'] = "__scheme";
     if (isset($_POST['ccontent'])) {
         $rs['ccontent'] = $_POST['ccontent'];
     }
     $rs['icon'] = replacePath($smallImage);
     if (isset($_POST['keywords'])) {
         $rs['keywords'] = $_POST['keywords'];
     }
     if (isset($_POST['is_show'])) {
         $rs['is_show'] = $_POST['is_show'];
     }
     if (isset($_POST['is_showtime'])) {
         $rs['is_showtime'] = $_POST['is_showtime'];
     }
     $result = $db->Execute('SELECT * FROM mycms_article_class WHERE cid=-1');
     $insertSql = $db->GetInsertSQL($result, $rs);
     $db->Execute($insertSql);
     admin_msg('scheme.php?action=class', '分类添加完成!');
 } else {
     admin_msg('scheme.php?action=class', '请填写分类!');
Exemplo n.º 3
0
 if ($_FILES['icon']['name']) {
     $up = new upimg_class("../uploads/images/service", null);
     $result = $up->upload('icon');
     if (!$result) {
         admin_msg('products.php?action=add&cid=' . $_POST["cid"], '列表小图上传错误:' . $up->error);
     }
     $rs["icon"] = replacePath($up->imgName);
 }
 if ($_FILES['imagefile']['name']) {
     //图片上传
     $up = new upimg_class("../uploads/images/service", null);
     $result = $up->upload('imagefile');
     if (!$result) {
         admin_msg('service.php?action=add&cid=' . $_POST["cid"], 'banner大图上传错误:' . $up->error);
     }
     $rs["bigimage"] = replacePath($up->imgName);
 }
 $rs['title'] = $_POST['title'];
 //$rs['cid']=$_POST['cid'];
 //$rs['tj']=$_POST['tj']!='1'?0:1;
 //if(isset($_POST['new'])){
 //$rs['new']=$_POST['new']!='1'?0:1;
 //}
 //$rs['keywords']=$_POST['keywords'];
 $rs['description'] = $_POST['description'];
 //$rs['outlink']=$_POST['outlink'];
 //$rs['filename']=$_POST['filename'];
 //$rs['author']=$_POST['author'];
 $rs['content'] = $_POST['p_info'];
 $id = $_POST['id'];
 $result = $db->Execute('SELECT * FROM mycms_article_list WHERE id=' . $id . '');
Exemplo n.º 4
0
         admin_msg('download.php?action=edit&id=' . $id . '', '文件上传错误:' . $up->error);
     }
     $filename = $up->fileName;
     //删除原始文件
     if (is_file('../' . $_POST['filename'] . '')) {
         @unlink('../' . $_POST['filename'] . '');
     }
 }
 $icon = $_POST["iconold"];
 if ($_FILES['icon1']['name']) {
     $up = new upimg_class("../uploads/images/service", "../uploads/images/service");
     $result = $up->upload('icon1');
     if (!$result) {
         admin_msg('download.php?action=add&cid=' . $_POST["cid"], '图片上传错误:' . $up->error);
     }
     $icon = replacePath($up->thumbName);
     //删除原始文件
     if (is_file('../' . $_POST['iconold'] . '')) {
         @unlink('../' . $_POST['iconold'] . '');
     }
 }
 $result = $db->Execute('SELECT * FROM mycms_download_list WHERE id=' . $id . '');
 $rs = array();
 $rs['name'] = $_POST['name'];
 //$rs['cid']=$_POST['cid'];
 //$rs['keywords']=$_POST['keywords'];
 $rs["icon"] = $icon;
 $rs['description'] = $_POST['description'];
 $rs['filename'] = $filename;
 $rs['content'] = $_POST['p_info'];
 $updateSql = $db->GetUpdateSQL($result, $rs);
Exemplo n.º 5
0
    $result = $db->Execute('SELECT * FROM mycms_products_list WHERE id=' . $id . '');
    $rs = array();
    $rs['name'] = $_POST['name'];
    $rs['model'] = $_POST['model'];
    $rs['cid'] = $_POST['cid'];
    if (isset($_REQUEST["tj"])) {
        $rs['tj'] = $_POST['tj'] != '1' ? 0 : 1;
    } else {
        $rs['tj'] = 0;
    }
    //$rs['new']=$_POST['new']!='1'?0:1;
    //$rs['hot']=$_POST['hot']!='1'?0:1;
    $rs['keywords'] = $_POST['keywords'];
    $rs['description'] = $_POST['description'];
    $rs['smallimage'] = replacePath($smallImage);
    $rs['bigimage'] = replacePath($bigImage);
    //$rs['filename']=$_POST['filename'];
    //$rs['author']=$_POST['author'];
    $rs['content'] = $_POST['p_info'];
    $rs['features'] = stripslashes(htmlspecialchars_decode($_POST['features']));
    $rs['technical'] = stripslashes(htmlspecialchars_decode($_POST['technical']));
    $rs['sort'] = $_POST['sort'];
    $updateSql = $db->GetUpdateSQL($result, $rs);
    $db->Execute($updateSql);
    admin_msg($url, '产品编辑成功!');
} elseif ($_GET['action'] == 'del') {
    //=========================================================删除产品
    $id = $_GET['id'];
    if (!empty($id)) {
        $result = $db->GetRow("SELECT * FROM mycms_products_list WHERE id={$id}");
        if ($result) {