Ejemplo n.º 1
0
<?php

include '../global.php';
include '../common.func.php';
define('ROOTPATH', '../../');
if ($_POST) {
    $id = $_POST['id'];
    $pic = $_POST['oldpic'];
    $url = $_POST['url'];
    $intro = $_POST['intro'];
    $enurl = $_POST['enurl'];
    $enintro = $_POST['enintro'];
    $picFile = $_FILES['upfile'];
    if (empty($picFile['tmp_name']) === false) {
        delPic($pic);
        $pic = upPic($picFile, 'rec/');
    }
    $db->update('th_rec', 'pic=\'' . $pic . '\',url=\'' . $url . '\',intro=\'' . $intro . '\',enurl=\'' . $enurl . '\',enintro=\'' . $enintro . '\'', 'id=' . $id);
    header('location:index.php?suc=edit_suc');
}
?>
<!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>推介位Operate</title>
<link href="../css/manager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/pro.js"></script>
<link href="../../lightbox/style_4/style.css" rel="stylesheet" type="text/css" />
Ejemplo n.º 2
0
<?php

include 'action.php';
if ($getAction == 'add_news' && !empty($_POST)) {
    $title = $_POST['title'];
    $entitle = $_POST['entitle'];
    $picFile = $_FILES['pic'];
    if (empty($picFile['tmp_name']) === false) {
        $pic = upPic($picFile, 'video/');
    }
    $link = $_POST['link'];
    $dis = $_POST['dis'];
    $endis = $_POST['endis'];
    $ord = $_POST['ord'];
    $dis = empty($dis) ? 0 : $dis;
    $endis = empty($endis) ? 0 : $endis;
    $ord = empty($ord) ? 0 : $ord;
    $uptime = mktime();
    if ($db->insert('th_video_content', 'title,entitle,link,dis,endis,ord,pic,uptime', "'" . $title . "','" . $entitle . "','" . $link . "'," . $dis . "," . $endis . "," . $ord . ",'" . $pic . "'," . $uptime)) {
    }
    echo "<script>self.location='addnews.php?suc=add_suc';</script>";
}
?>
<!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>
<link href="../css/manager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>
Ejemplo n.º 3
0
<?php

include 'action.php';
if ($getAction == 'add_news' && !empty($_POST)) {
    $cid = $_POST['cid'];
    $title = $_POST['title'];
    $entitle = $_POST['entitle'];
    $picFile = $_FILES['pic'];
    if (empty($picFile['tmp_name']) === false) {
        $pic = upPic($picFile, 'news/');
    }
    $author = $_POST['author'];
    $enauthor = $_POST['enauthor'];
    $content = $_POST['content'];
    $encontent = $_POST['encontent'];
    $dis = $_POST['dis'];
    $endis = $_POST['endis'];
    $ord = $_POST['ord'];
    $dis = empty($dis) ? 0 : $dis;
    $endis = empty($endis) ? 0 : $endis;
    $ord = empty($ord) ? 0 : $ord;
    $uptime = mktime();
    if ($db->insert('th_llc_content', 'cid,title,entitle,author,enauthor,content,encontent,dis,endis,ord,pic,uptime', $cid . ",'" . $title . "','" . $entitle . "','" . $author . "','" . $enauthor . "','" . $content . "','" . $encontent . "'," . $dis . "," . $endis . "," . $ord . ",'" . $pic . "'," . $uptime)) {
    }
    echo "<script>self.location='addnews.php?suc=add_suc';</script>";
}
?>
<!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" />
Ejemplo n.º 4
0
 $bpic = $_POST['oldbpic'];
 if (!$spic) {
     $spic = 0;
 }
 if (!$bpic) {
     $bpic = 0;
 }
 $spicFile = $_FILES['spic'];
 $bpicFile = $_FILES['bpic'];
 if (empty($spicFile['tmp_name']) === false) {
     delPic($spic);
     $spic = upPic($spicFile, 'proclass/');
 }
 if (empty($bpicFile['tmp_name']) === false) {
     delPic($bpic);
     $bpic = upPic($bpicFile, 'proclass/');
 }
 if ($fpath == '0') {
     $ford = 0;
     $path = 0;
     $fid = 0;
 } else {
     $fpath = explode(':', $fpath);
     $ford = $fpath[2];
     $fid = $fpath[0];
     $path = $fpath[1] . '-' . $ford;
 }
 if ($ford != $oford) {
     //$path=str_replace($ofid,$fid,$opath);
     if ($oord == $ord) {
         $db->update('th_pro_class', 'fid=' . $ford . ',name=\'' . $name . '\',enname=\'' . $enname . '\',spic=' . $spic . ',bpic=' . $bpic . ',path=\'' . $path . '\',url=\'' . $uid . '\',intro=\'' . $intro . '\',enintro=\'' . $enintro . '\',vname=\'' . $vname . '\',envname=\'' . $envname . '\',vlink=\'' . $vlink . '\',envlink=\'' . $envlink . '\',dis=' . $dis, 'id=' . $id);
Ejemplo n.º 5
0
if ($id) {
    $sql = "select cid,id,title,entitle,author,enauthor,pic,content,encontent,dis,endis,ord from `th_menu_content` where id=" . $id;
    $query = $db->query($sql);
    $row = $db->fetch_array($query);
}
if ($getAction == 'update_news' && !empty($_POST['id'])) {
    $cid = $_POST['cid'];
    $id = $_POST['id'];
    $title = $_POST['title'];
    $entitle = $_POST['entitle'];
    $author = $_POST['author'];
    $enauthor = $_POST['enauthor'];
    $picFile = $_FILES['pic'];
    if (empty($picFile['tmp_name']) === false) {
        delPic($_POST['oldpic']);
        $pic = upPic($picFile, 'menu/');
    } else {
        $pic = $_POST['oldpic'];
    }
    $content = $_POST['content'];
    $encontent = $_POST['encontent'];
    $dis = $_POST['dis'];
    $endis = $_POST['endis'];
    $ord = $_POST['ord'];
    $dis = empty($dis) ? 0 : $dis;
    $endis = empty($endis) ? 0 : $endis;
    $ord = empty($ord) ? 0 : $ord;
    $updatetime = mktime();
    if ($db->update('th_menu_content', 'cid=' . $cid . ',title=\'' . $title . '\',entitle=\'' . $entitle . '\',author=\'' . $author . '\',enauthor=\'' . $enauthor . '\',content=\'' . $content . '\',encontent=\'' . $encontent . '\',dis=' . $dis . ',endis=' . $endis . ',ord=' . $ord . ',pic=\'' . $pic . '\'', 'id=' . $id)) {
    }
    echo '<script>self.location="editnews.php?id=' . $id . '&suc=update_suc";</script>';
Ejemplo n.º 6
0
    $dis = $row['dis'];
    $endis = $row['endis'];
    $ord = $row['ord'];
}
if ($getAction == "update_about" && !empty($_POST['id'])) {
    $id = $_POST['id'];
    $title = $_POST['title'];
    $url = $_POST['url'];
    $entitle = $_POST['entitle'];
    $pic = $_POST['oldpic'];
    $picFile = $_FILES['pic'];
    if (empty($picFile['tmp_name']) === false) {
        if ($pic) {
            delPic($pic);
        }
        $pic = upPic($picFile, 'banner/');
    }
    $dis = $_POST['dis'];
    $endis = $_POST['endis'];
    $ord = $_POST['ord'];
    $dis = empty($dis) ? 0 : $dis;
    $endis = empty($endis) ? 0 : $endis;
    $ord = empty($ord) ? 0 : $ord;
    $uptime = mktime();
    if ($db->update('th_download_content', 'title=\'' . $title . '\',entitle=\'' . $entitle . '\',url=\'' . $url . '\',pic=\'' . $pic . '\',dis=' . $dis . ',endis=' . $endis . ',ord=' . $ord . ',uptime=' . $uptime, 'id=' . $id)) {
    }
    header('location:editabout.php?id=' . $id . '&suc=update_suc');
}
?>
<!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">
Ejemplo n.º 7
0
if ($getAction == 'add' && !empty($_POST)) {
    $title = $_POST['title'];
    $url = $_POST['url'];
    $entitle = $_POST['entitle'];
    $dis = $_POST['dis'];
    $endis = $_POST['endis'];
    $ord = $_POST['ord'];
    $dis = empty($dis) ? 0 : $dis;
    $endis = empty($endis) ? 0 : $endis;
    $ord = empty($ord) ? 0 : $ord;
    $picFile = $_FILES['pic'];
    if (empty($picFile['tmp_name']) === false) {
        if ($pic) {
            delPic($pic);
        }
        $pic = upPic($picFile, 'download/');
    }
    $uptime = mktime();
    if ($db->insert('th_download_content', 'title,entitle,ord,url,pic,dis,endis,uptime', "'" . $title . "','" . $entitle . "'," . $ord . ",'" . $url . "','" . $pic . "'," . $dis . "," . $endis . "," . $uptime)) {
    }
    header('location:index.php?suc=add_suc');
}
?>
<!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>
<link href="../css/manager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../js/common.js"></script>