tran.php
1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
require("../class/connect.php");
include("../class/db_sql.php");
$link=db_connect();
$empire=new mysqlquery();
//關閉
if($public_r['addnews_ok'])
{
printerror("NotOpenCQInfo","",9);
}
$userid=(int)$_GET['userid'];
$username=RepPostStr($_GET['username'],1);
$rnd=RepPostStr($_GET['rnd'],1);
$ecms=RepPostStr($_GET['ecms'],1);
$classid=(int)$_GET['classid'];
$infoid=(int)$_GET['infoid'];
$filepass=RepPostStr($_GET['filepass'],1);
$type=RepPostStr($_GET['type'],1);
if(!$classid||!$filepass)
{
printerror("ErrorUrl","",9);
}
$pr=$empire->fetch1("select qaddtran,qaddtransize,qaddtranimgtype,qaddtranfile,qaddtranfilesize,qaddtranfiletype from {$dbtbpre}enewspublic limit 1");
if($type==1)
{
if(!$pr['qaddtran'])
{
printerror("CloseQTranPic","",9);
}
$filetype=$pr['qaddtranimgtype'];
$filesize=$pr['qaddtransize'];
$word="上傳圖片";
}
elseif($type==2)
{
if(!$pr['qaddtranfile'])
{
printerror("CloseQTranFile","",9);
}
$filetype="|.swf|";
$filesize=$pr['qaddtranfilesize'];
$word="上傳FLASH";
}
else
{
if(!$pr['qaddtranfile'])
{
printerror("CloseQTranFile","",9);
}
$filetype=$pr['qaddtranfiletype'];
$filesize=$pr['qaddtranfilesize'];
$word="上傳附件";
}
$filetype=substr($filetype,1,strlen($filetype));
$filetype=substr($filetype,0,strlen($filetype)-1);
$filetype=str_replace("|",",",$filetype);
if($ecms)
{
$enews="MHtmlareaTranPic";
}
else
{
$enews="MTranFile";
}
//導入模板
require(ECMS_PATH.'e/template/DoInfo/tran.php');
db_close();
$empire=null;
?>