EditCjNews.php
5.78 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?php
define('EmpireCMSAdmin','1');
require("../class/connect.php");
require("../class/db_sql.php");
require("../class/functions.php");
require("../data/dbcache/class.php");
$link=db_connect();
$empire=new mysqlquery();
//驗證用戶
$lur=is_login();
$logininid=$lur['userid'];
$loginin=$lur['username'];
$loginrnd=$lur['rnd'];
$loginlevel=$lur['groupid'];
$loginadminstyleid=$lur['adminstyleid'];
//ehash
$ecms_hashur=hReturnEcmsHashStrAll();
$classid=(int)$_GET['classid'];
$id=(int)$_GET['id'];
$enews=ehtmlspecialchars($_GET['enews']);
//驗證權限
CheckLevel($logininid,$loginin,$classid,"cj");
if($_GET['from'])
{
$listclasslink="ListPageInfoClass.php";
}
else
{
$listclasslink="ListInfoClass.php";
}
//節點名稱
$cr=$empire->fetch1("select classname,newsclassid,classid,tbname from {$dbtbpre}enewsinfoclass where classid='$classid'");
if(!$cr[classid])
{
printerror("ErrorUrl","history.go(-1)");
}
$r=$empire->fetch1("select * from {$dbtbpre}ecms_infotmp_".$cr[tbname]." where id='$id'");
if(empty($r[id]))
{
printerror("ErrorUrl","history.go(-1)");
}
//模型
$modid=(int)$class_r[$cr[newsclassid]][modid];
$enter=$emod_r[$modid]['enter'];
//會員組
$sql1=$empire->query("select * from {$dbtbpre}enewsmembergroup order by level");
while($l_r=$empire->fetch($sql1))
{
$ygroup.="<option value=".$l_r[groupid].">".$l_r[groupname]."</option>";
}
//----------------特殊模型----------------
//下載地址前綴
if(strstr($enter,',downpath,')||strstr($enter,',onlinepath,'))
{
$downurlqz="";
$newdownqz="";
$downsql=$empire->query("select urlname,url,urlid from {$dbtbpre}enewsdownurlqz order by urlid");
while($downr=$empire->fetch($downsql))
{
$downurlqz.="<option value='".$downr[url]."'>".$downr[urlname]."</option>";
$newdownqz.="<option value='".$downr[urlid]."'>".$downr[urlname]."</option>";
}
}
//html編輯器
if($emod_r[$modid]['editorf']&&$emod_r[$modid]['editorf']!=',')
{
include('ecmseditor/infoeditor/fckeditor.php');
}
//欄目名稱
$newsclassid=$cr[newsclassid];
$newsclassname=$class_r[$newsclassid][classname];
$newsbclassname=$class_r[$class_r[$newsclassid][bclassid]][classname];
$newsclass="<font color=red>".$newsbclassname." > ".$newsclassname."</font>";
//表單文件
$cjfile="../data/html/editcj".$modid.".php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>修改採集信息</title>
<link href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
<?=$htmlareacode?>
<script>
function doSpChangeFile(name,url,filesize,filetype,idvar){
document.getElementById(idvar).value=url;
if(document.add.filetype!=null)
{
if(document.add.filetype.value=='')
{
document.add.filetype.value=filetype;
}
}
if(document.add.filesize!=null)
{
if(document.add.filesize.value=='')
{
document.add.filesize.value=filesize;
}
}
}
function SpOpenChFile(type,field){
window.open('ecmseditor/FileMain.php?<?=$ecms_hashur['ehref']?>&classid=<?=$classid?>&filepass=<?=$filepass?>&type='+type+'&sinfo=1&tranfrom=2&field='+field,'','width=700,height=550,scrollbars=yes');
}
function bs(){
var f=document.add;
if(f.title.value.length==0){alert("標題還沒寫");f.title.focus();return false;}
}
function foreColor(){
if(!Error()) return;
var arr = showModalDialog("../data/html/selcolor.html", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
if (arr != null) document.add.titlecolor.value=arr;
else document.add.titlecolor.focus();
}
function FieldChangeColor(obj){
if(!Error()) return;
var arr = showModalDialog("../data/html/selcolor.html", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
if (arr != null) obj.value=arr;
else obj.focus();
}
</script>
<script src="ecmseditor/fieldfile/setday.js"></script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td>位置:採集 > <a href="<?=$listclasslink?><?=$ecms_hashur['whehref']?>">管理節點</a> > <a href="CheckCj.php?classid=<?=$classid?>&from=<?=ehtmlspecialchars($_GET['from'])?><?=$ecms_hashur['ehref']?>">審核採集</a>
> 節點名稱:
<?=$cr[classname]?>
> 修改採集信息</td>
</tr>
<tr>
<td>入庫欄目:
<?=$newsclass?>
</td>
</tr>
</table>
<form name="add" method="post" enctype="multipart/form-data" action=ecmscj.php>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<?=$ecms_hashur['form']?>
<tr class="header">
<td width="17%" height="25">修改採集信息</td>
<td width="83%" height="25"><input type=hidden name=from value="<?=ehtmlspecialchars($_GET['from'])?>">
<input name="id" type="hidden" value="<?=$id?>">
<input name="classid" type="hidden" value="<?=$classid?>">
<input name="editnum" type="hidden" value="<?=$editnum?>">
<input name="enews" type="hidden" value="<?=$enews?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">採集地址:</td>
<td height="25"><a href="<?=$r[oldurl]?>" target="_blank">
<?=$r[oldurl]?>
</a></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">採集時間:</td>
<td height="25">
<?=$r[tmptime]?>
</td>
</tr>
<?php
@include($cjfile);
?>
<tr bgcolor="#FFFFFF">
<td height="25"> </td>
<td height="25"><input type="submit" name="Submit" value="修改"> <input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>
<?php
db_close();
$empire=null;
?>