www.gusucode.com > 深度梦想整站系统(asp) 1.14.02源码程序 > admin/photo/photo_Add.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% projectRootPath = "../../" '相对当前应用程序根的位置 %> <!-- #include file="../web.config.asp"--> <!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 name="robots" content="noindex,nofollow" /> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>管理</title> <link href="../themes/<%=theme_Path%>/main.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function checkForm(){ if(document.form1.fTitle.value==""){ alert("图片标题不能为空!!"); document.form1.fTitle.focus(); return false; } if(document.form1.fclass_ID.value==""){ alert("图片分类必须选择!!"); document.form1.fclass_ID.focus(); return false; } document.form1.button.value="提交中,请稍候..."; document.form1.button.disabled=true; return true; } </script> </head> <body id="bodyBg1"> <br /> <a href="photo_Manage.asp">图片管理</a> | <a href="photo_Add.asp">添加图片</a> <hr class="Nav-hr" /> <br /> <dl class="manageContent"> <dt>图片管理</dt> <dd> <br /> <% if(Request.Form("fTitle")<>"")then fclass_ID=Request.Form("fclass_ID") fTitle=Request.Form("fTitle") ftip=Request.Form("ftip") fAuthor=Request.Form("fAuthor") fCopyFrom=Request.Form("fCopyFrom") fContent=Request.Form("fContent") fkeyWord=Request.Form("fkeyWord") fHits=Request.Form("fHits") fdayHits=Request.Form("fdayHits") fweekHits=Request.Form("fweekHits") fmonthHits=Request.Form("fmonthHits") fCreateTime=Request.Form("fCreateTime") fUpdateTime=Request.Form("fUpdateTime") fisHot=Request.Form("fisHot") fisOnTop=Request.Form("fisOnTop") fisElite=Request.Form("fisElite") fisView=Request.Form("fisView") fisIncludePic=Request.Form("fisIncludePic") fuploadFiles=Request.Form("fuploadFiles") fDefaultPicUrl=Request.Form("fDefaultPicUrl") PhotoUrl=Request.Form("PhotoUrl") sql="insert into deep_Photo(fTitle,fclass_ID,ftip,fAuthor,fCopyFrom,fContent,fkeyWord,fHits,fdayHits,fweekHits,fmonthHits,fCreateTime,fUpdateTime,fisHot,fisOnTop,fisElite,fisView,fisIncludePic,fuploadFiles,fDefaultPicUrl,PhotoUrl)values('"&fTitle&"',"&fclass_ID&",'"&ftip&"','"&fAuthor&"','"&fCopyFrom&"','"&fContent&"','"&fkeyWord&"',"&fHits&","&fdayHits&","&fweekHits&","&fmonthHits&",'"&fCreateTime&"','"&fUpdateTime&"',"&fisHot&","&fisOnTop&","&fisElite&","&fisView&","&fisIncludePic&",'"&fuploadFiles&"','"&fDefaultPicUrl&"','"&PhotoUrl&"')" 'response.Write(sql) conn.execute(sql) Response.Write("["&fTitle&"]添加成功!!") end if %> <form id="form1" name="form1" method="post" action="" onSubmit="return checkForm()"> <table width="99%" class="tableBoderForm"> <tr> <td>所属栏目:</td> <td><select name="fclass_ID" id="fclass_ID"> <option value=""> 选择分类 </option> <% SqlArticleClass="Select * from deep_PhotoClass where fparentID=0 order by fOrderID" Set rsArticleClass=conn.execute(SqlArticleClass) if rsArticleClass.Eof and rsArticleClass.Bof then Response.Write("<option>请先添加栏目!</option>") else while (not rsArticleClass.eof) %> <option value="<%=rsArticleClass("fclass_ID")%>"><%=rsArticleClass("fClassName")%></option> <% call getSubList(rsArticleClass("fclass_ID"),0,0,"select fclass_ID,fparentID,fclassName from deep_PhotoClass") rsArticleClass.MoveNext wend end if rsArticleClass.close Set rsArticleClass =Nothing %> </select></td> </tr> <tr> <td>图片标题:</td> <td><input name="fTitle" type="text" id="fTitle" size="60" /></td> </tr> <tr> <td>摘要</td> <td><textarea name="ftip" cols="60" id="ftip"></textarea></td> </tr> <tr> <td>作者:</td> <td><input type="text" name="fAuthor" id="fAuthor" /> <=【<span onClick="document.form1.fAuthor.value='佚名'" style="cursor:pointer;color:#070;">佚名</span>】 【<span onClick="document.form1.fAuthor.value='未知'" style="cursor:pointer;color:#070;">未知</span>】 【<span onClick="document.form1.fAuthor.value='<%=session("adminName")%>'" style="cursor:pointer;color:#070;"><%=session("adminName")%></span>】 </td> </tr> <tr> <td>来源:</td> <td><input name="fCopyFrom" type="text" id="fCopyFrom" size="50" /> <=【<span onClick="document.form1.fCopyFrom.value='本站原创'" style="cursor:pointer;color:#070;">本站原创</span>】 </td> </tr> <tr> <td>图片内容:</td> <td><script type="text/javascript"> // 当上传图片等文件时,往下拉框中填入图片路径,可根据实际需要更改此函数 function doChange(objText, objDrop){ if (!objDrop) return; var str = objText.value; var arr = str.split("|"); var nIndex = objDrop.selectedIndex; objDrop.length=1; for (var i=0; i<arr.length; i++){ objDrop.options[objDrop.length] = new Option(arr[i], arr[i]); } objDrop.selectedIndex = nIndex; } </script><textarea name="fContent" id="fContent" style="display:none;"></textarea> <iframe id="eWebEditor1" src="../include/eWebEditor/eWebEditor.asp?id=fContent&style=deep_light_photo&savepathfilename=fuploadFiles" frameborder="0" scrolling="no" width="650" height="400"></iframe> <input type="hidden" name="fuploadFiles" id="fuploadFiles" onchange="doChange(this,document.form1.fDefaultPicUrl)"/><% ' ewebeditor.asp文件调用的参数: ' id:下面表单项textarea的名称,在此表单中是Content,注意大小写 ' style:编辑器的样式名称,可在eWebEditor的后台设置 ' originalfilename:用于获取源文件名(上传前的原文件名), ' savefilename:用于获取保存文件名(上传后的文件名), 在此表单中是fuploadFiles ' savepathfilename:用于获取保存带路径文件名(上传后的文件名), %> </td> </tr> <tr> <td>关键字:</td> <td><input name="fkeyWord" type="text" id="fkeyWord" size="60" /><br /> <span style="color:#00F;font-family:'宋体';">用来查找关联信息,可输入多个关键字,中间用“<span style="color:#F00; font-weight:bolder;">,</span>”英文逗号分隔。不能出现""'*?,.()等字符。</span></td> </tr> <tr> <td>点击数:</td> <td> 今日:<input name="fdayHits" type="text" id="fdayHits" value="0" size="5" /> 本周:<input name="fweekHits" type="text" id="fweekHits" value="0" size="5" /> 本月:<input name="fmonthHits" type="text" id="fmonthHits" value="0" size="5" /> 总计:<input name="fHits" type="text" id="fHits" value="0" size="5" /> </td> </tr> <tr> <td>生成时间:</td> <td><input name="fCreateTime" type="text" id="fCreateTime" value="<%=now()%>" size="30" /> 时间格式为“年-月-日 时:分:秒”,如:2004-11-18 12:32:47 </td> </tr> <tr> <td>更新时间:</td> <td><input name="fUpdateTime" type="text" id="fUpdateTime" value="<%=now()%>" size="30" /></td> </tr> <tr> <td>热点图片:</td> <td><input type="radio" name="fisHot" id="radio" value="1" /> 是 <input name="fisHot" type="radio" id="radio2" value="0" checked="checked" /> 否</td> </tr> <tr> <td>固顶:</td> <td><input type="radio" name="fisOnTop" id="radio3" value="1" />是 <input name="fisOnTop" type="radio" id="radio4" value="0" checked="checked" />否</td> </tr> <tr> <td>精华图片:</td> <td><input type="radio" name="fisElite" id="radio5" value="1" />是 <input name="fisElite" type="radio" id="radio6" value="0" checked="checked" />否</td> </tr> <tr> <td>是否审核:</td> <td><input name="fisView" type="radio" id="radio7" value="1" checked="checked" />是 <input name="fisView" type="radio" id="radio8" value="0" />否</td> </tr> <tr> <td>包含图片:</td> <td><input name="fisIncludePic" type="radio" id="radio9" value="1" />是 <input name="fisIncludePic" type="radio" id="radio10" value="0" checked="checked" />否</td> </tr> <tr> <td>标题图片:</td> <td><select name="fDefaultPicUrl" size='1'><option value=''> 点击选择jpg图片 </option></select> <br /> 当编辑区有插入图片时,将自动填充此下拉框,标题图片必须是jpg格式 </td> </tr> <tr> <td>图片地址</td> <td><input name="PhotoUrl" type="text" id="PhotoUrl" size="60" /></td> </tr> <tr> <td> </td> <td><iframe ID="UploadFiles" frameborder="0" scrolling="no" width="600" height="25" src="../include/upload_form.asp?SavePath=../../photo/uploadFile/photo/&parentBackValue=form1.PhotoUrl&MaxSize=500&FileType=gif/jpg/png/bmp&saveName=0"></iframe></td> </tr> <tr> <td> </td> <td><input type="submit" name="button" id="button" value="提交" /> <input type="reset" name="button2" id="button2" value="重置" /></td> </tr> </table> </form> <br /> <br /> </dd> </dl> <br /> </body> </html> <% call closeConnDB() %>