write.php
来自「仿榕树下文章系统春节版 1. 将makpass.php文件的root_pass修」· PHP 代码 · 共 258 行
PHP
258 行
<?
include ("admin_log.php");
?>
<html>
<head>
<META http-equiv='Content-Type' content='text/html; charset=gb2312'>
<LINK href="style.css" type=text/css rel=stylesheet>
<TITLE>添加新文章</TITLE>
<script>
function popup(t, w, h) {
window.open('extra/photo.php?img='+t+'&w='+w+'&h='+h+'&t='+t,'photo','width='+w+',height='+h); }
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
function openupload() {
MM_openBrWindow("uploadfile.php",'upload','location=no,status=yes,scrollbars=yes,resizable=yes,width=450,height=300');
}
function openupload2() {
MM_openBrWindow("uploadpic.php",'upload','location=no,status=yes,scrollbars=yes,resizable=yes,width=450,height=300');
}
function openpick() {
MM_openBrWindow("pickpic.php",'upload','location=no,status=yes,scrollbars=yes,resizable=yes,width=450,height=300');
}
function openpick2() {
MM_openBrWindow("pickfile.php",'upload','location=no,status=yes,scrollbars=yes,resizable=yes,width=450,height=300');
}
function replace(string,text,by) { // from www.irt.org, supposedly..
if (string.length==0 || text.length==0) return string;
var i = string.indexOf(text);
if (((!i) && (text != string.substring(0,text.length))) || (i== -1)) return string;
var newstr = string.substring(0,i) + by;
if (i+text.length < string.length) newstr += replace(string.substring(i+ text.length, string.length), text, by);
return newstr;
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
function replace(string,text,by) { // from www.irt.org, supposedly..
if (string.length==0 || text.length==0) return string;
var i = string.indexOf(text);
if (((!i) && (text != string.substring(0,text.length))) || (i== -1)) return string;
var newstr = string.substring(0,i) + by;
if (i+text.length < string.length) newstr += replace(string.substring(i+ text.length, string.length), text, by);
return newstr;
}
function c2e(text) {
text=replace(text,"\r","");
text=replace(text,"\n","<BR>\n");
text = replace(text,"<SCRIPT>","#SCRIPT#");
text = replace(text,"</SC"+"RIPT>","#/SCRIPT#");
text = replace(text,"<BR>\n<UL>","\n<UL>");
text = replace(text,"<UL><BR>","<UL>");
text = replace(text,"</UL><BR>","</UL>");
text = replace(text,"<BR>\n<OL>","\n<OL>");
text = replace(text,"<OL><BR>","<OL>");
text = replace(text,"</OL><BR>","</OL>");
text = replace(text,"<BR>\n<LI>", "\n<LI>");
return text;
}
function e2c(text) {
// first, kick out some absolute url's
myloc=document.URL;
myloc=replace(myloc, "pivot/log.php","");
text=replace(text, myloc, "");
text=replace(text, "pivot/log.php","");
text=replace(text,"<BR>","\n");
text=replace(text,"<P>","");
text=replace(text,"</P>","\n");
text=replace(text,"STRONG>","B>");
text=replace(text,"EM>","I>");
text=replace(text,"/UL>\r\n","/UL>");
text=replace(text,"/OL>\r\n","/UL>");
text=replace(text,"#SCRIPT#","<SCRIPT>");
text=replace(text,"#/SCRIPT#","</SC"+"RIPT>");
return text;
}
function copycontenttoedit(){
text=c2e(document.all.f_introduction.value)+" ";
document.frames['edit'].setHTML(text);
}
function copyedittocontent(){
text=e2c(document.frames['edit'].getHTML());
document.all.f_introduction.value=text;
}
//-->
</script>
</head><body BGCOLOR='EFEFEF' onload='copycontenttoedit();'>
<table width=100% cellpadding=6 cellspacing=0 border=0>
<tr>
<td colspan=3 bgcolor=#8FB373><font color=#FFFFFF> <b> 添加新文章</b></font> </td>
</tr>
</table>
<form method='post' action='add.php' class='nopadding' name='form1'>
<table style="border-collapse: collapse" bordercolor="#111111" bgcolor=#efefef border=1 cellspacing=0 cellpadding=3 width=600><col width=66><col width=544>
<tr>
<td align=right>标题:</td>
<td ><input type='text' name='title' size='50' value='' class='input' style='height:22px;'>*必须填写</td>
</tr>
<tr>
<td align=right>标签:</td>
<td >
<input type="radio" value="0" name="label" checked>无标签
<input type="radio" value="1" name="label">图文
<input type="radio" value="3" name="label"><font color=red>COOL!</font>
<input type="radio" value="4" name="label"><b>标题加粗</b>
<input type="radio" value="5" name="label"><font color=red>标题加红</font>
</td>
</tr>
<tr>
<td align=right bgcolor="#f7f7f7">作者:</td>
<td bgcolor="#f7f7f7">
<input type=text name=author size=20 value=""></td>
</tr>
<tr>
<td align=right>来源:</td>
<td><input type=text name=fromsite size=20 value=""></td>
</tr>
<tr>
<td align=right>图片:<div class="hidden"><input type='hidden' name='f_introduction' cols='80' rows='3' class='input' value=''></div>
<input type='hidden' name='f_width' size='10' value='' class='input'><input type='hidden' name='f_height' size='10' value='' class='input'></td>
<td><input type='text' name='f_image' size='50' value='' class='input'><input type='button' name='upload' value='选择图片' class='button' onclick='openpick();'>
(<a href="javascript:openupload2();" title="If the normal upload doesn't work, you might try this one.">上传图片</a>)</td>
</tr>
<tr>
<td align=right>文件:</td>
<td><input type='text' name='download' size='50' value='' class='input'><input type='button' name='upload2' value='选择文件' class='button' onclick='openpick2();'></td>
</tr>
<td align=right>正文:</td>
<td>
图片说明: <span class="dim">选中图片后,点击正文编辑里的插入图片按钮,将其放到正确的位置。</dim><br>
<iframe id="edit" src="editor_sm.html" width="100%" height=320 marginwidth=0 marginheight=0 frameborder=0 style="border: 0px #fff solid;"></iframe>
</td>
</tr>
<tr>
<td align=right>日期:</td>
<td>
<?
$date = date("Y.m.d",time());
echo $date;
?>
</td>
</tr>
<tr>
<td align=right bgcolor="#f7f7f7">分类:</td>
<td bgcolor="#f7f7f7">
<select size=1 name=sortid>
<option value="all">-=选择二级分类=-</option>
<?
$file_sort=file("../data/"."xq.php");
$file_count=count($file_sort)-1;
for ($i=0;$i<=$file_count;$i++) {
$file_name=explode("|",$file_sort[$i]);
if ($file_name[0]=="type"){
echo "<option value=".$file_name[1].">".$file_name[2]."</option>";
}
}
?>
</select>
</td>
</tr>
<tr>
<td align=right bgcolor="#f7f7f7">专题:</td>
<td bgcolor="#f7f7f7">
<select size=1 name=speid>
<option value="all">-=选择专题=-</option>
<?
$file_sort=file("../data/"."xq.cgi");
$file_count=count($file_sort)-1;
for ($i=0;$i<=$file_count;$i++) {
$file_name=explode("|",$file_sort[$i]);
echo "<option value=".$file_name[1].">".$file_name[2]."</option>";
}
?>
</select>*若不想加入任何专题,请不要选择。
</td>
</tr>
<tr>
<td align=right>关键字:</td>
<td><input type=text name=key size=20 value="">*用来自动匹配相关文章。</td>
</tr>
<tr>
<td align=right>提交人:</td>
<td><input type=text name=fromwho size=20 value="<?echo $admin?>">*提交这篇文章的人。</td>
</tr>
<tr>
<td align=right>评论:</td>
<td>允许<input type="radio" name="message" value="1" CHECKED>禁止<input type="radio" name="message" value="0">
</td>
</tr>
<tr>
<td align=right>状态:</td>
<td>击活<input type="radio" name="statu" value="1" checked>屏蔽<input type="radio" name="statu" value="0">
</td>
</tr>
<tr>
<td align=right>推荐:</td>
<td> 是<input type="radio" name="tuijian" value="1" > 否<input type="radio" name="tuijian" value="0" checked>
</td>
</tr>
<tr>
<td align=right>模式:</td>
<td>文章<input type="radio" name="mode" value="0" >新闻<input type="radio" name="mode" value="1" checked>
</td>
</tr>
<tr>
<td colspan=2 align=center>
<input type='submit' name='submit' value='发表文章' class='button' onclick="copyedittocontent();">
<input type=reset value=" 重新填写 ">
</td>
</tr>
</table>
</form>
<br><hr>
<table width=100% cellpadding=6 cellspacing=0 border=0>
<tr>
<td bgcolor=#8FB373 colspan=3><font color=#FFFFFF> </font><font color=#FFFFFF><b>程式美化:魔力闪客~~Ten
发布网站:奇迹数码</b></font></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?