示例#1
0
文件: upload.php 项目: noikiy/cxe
<?php

define("ROOTPATH", "../");
include ROOTPATH . "includes/common.inc.php";
include "includes/news.inc.php";
SecureMember();
//上传图片校验权限
if (SecureFunc("124") == false) {
    alert("您的会员帐号没有上传图片的权限");
}
$dt = date("Ymd", time());
if (!is_dir(ROOTPATH . $_POST['attachPath'] . $dt)) {
    @mkdir(ROOTPATH . $_POST['attachPath'] . $dt, 0777);
}
//文件保存目录路径
$save_path = ROOTPATH . $_POST['attachPath'] . $dt . '/';
//文件保存目录URL
$save_url = $SiteUrl . $_POST['attachPath'] . $dt . '/';
//定义允许上传的文件扩展名
$ext_arr = array('gif', 'jpg', 'png', 'bmp');
//最大文件大小
$max_size = $GLOBALS["NEWSCONF"]["EditPicLimit"];
//更改目录权限
@mkdir($save_path, 0777);
//文件的全部路径
$file_path = $save_path . $_POST['fileName'];
//文件URL
$file_url = $save_url . $_POST['fileName'];
//有上传文件时
if (empty($_FILES) === false) {
    //原文件名
示例#2
0
文件: post.php 项目: noikiy/cxe
     echo "OK";
     exit;
     break;
     //下载修改
 //下载修改
 case "downmodify":
     $Meta = "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
     //权限
     SecureMember();
     $memberid = $_COOKIE["MEMBERID"];
     if (SecureFunc("162") == false) {
         echo $Meta . $strNoRights;
         exit;
     }
     //免审核权限
     if (SecureFunc("163") == true) {
         $iffb = 1;
     } else {
         $iffb = 0;
     }
     $id = $_POST["id"];
     $title = htmlspecialchars($_POST["title"]);
     $catid = htmlspecialchars($_POST["catid"]);
     $pcatid = htmlspecialchars($_POST["pcatid"]);
     $author = htmlspecialchars($_POST["author"]);
     $source = htmlspecialchars($_POST["source"]);
     $memo = htmlspecialchars($_POST["memo"]);
     $prop1 = htmlspecialchars($_POST["prop1"]);
     $prop2 = htmlspecialchars($_POST["prop2"]);
     $prop3 = htmlspecialchars($_POST["prop3"]);
     $prop4 = htmlspecialchars($_POST["prop4"]);