国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
4.8KB

  1. <!--
  2. function checkSubmit()
  3. {
  4. if(document.form1.title.value=='') {
  5. alert("图集标题不能为空!");
  6. document.form1.title.focus();
  7. return false;
  8. }
  9. if(document.form1.typeid.value==0) {
  10. alert("隶属栏目必须选择!");
  11. return false;
  12. }
  13. if(document.form1.typeid.options[document.form1.typeid.selectedIndex].className!='option3')
  14. {
  15. alert("隶属栏目必须选择白色背景的项目!");
  16. return false;
  17. }
  18. document.form1.imagebody.value = $Obj('copyhtml').innerHTML;
  19. $Obj('postloader').style.display = 'block';
  20. }
  21. function CheckSelTable(nnum){
  22. var cbox = $Obj('isokcheck'+nnum);
  23. var seltb = $Obj('seltb'+nnum);
  24. if(!cbox.checked) seltb.style.display = 'none';
  25. else seltb.style.display = 'block';
  26. }
  27. var startNum = 1;
  28. function MakeUpload(mnum)
  29. {
  30. var endNum = 0;
  31. var upfield = document.getElementById("uploadfield");
  32. var pnumObj = document.getElementById("picnum");
  33. var fhtml = "";
  34. var dsel = " checked='checked' ";
  35. var dplay = "display:none";
  36. if(mnum==0) endNum = startNum + Number(pnumObj.value);
  37. else endNum = mnum;
  38. if(endNum>120) endNum = 120;
  39. //$Obj('handfield').style.display = 'block';
  40. for(startNum;startNum < endNum;startNum++)
  41. {
  42. if(startNum==1){
  43. dsel = " checked='checked' ";
  44. dplay = "block";
  45. }else
  46. {
  47. dsel = " ";
  48. dplay = "display:none";
  49. }
  50. fhtml = '';
  51. fhtml += "<table width='100%'><tr><td><input type='checkbox' name='isokcheck"+startNum+"' id='isokcheck"+startNum+"' value='1' class='np' "+dsel+" onClick='CheckSelTable("+startNum+")' />显示图片 "+startNum+" 的上传框</td></tr></table>";
  52. fhtml += "<table width='610' border=\"0\" id=\"seltb"+startNum+"\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"#E8F5D6\" style=\"margin-bottom:6px;margin-left:10px;"+dplay+"\"><tobdy>";
  53. fhtml += "<tr bgcolor=\"#F7F7F7\">\r\n";
  54. fhtml += "<td height=\"25\" colspan=\"2\"> <strong>图片"+startNum+":</strong></td>";
  55. fhtml += "</tr>";
  56. fhtml += "<tr bgcolor=\"#FFFFFF\"> ";
  57. fhtml += "<td width=\"510\" height=\"25\">  图片地址: ";
  58. fhtml += "<input type=\"text\" name='imgfile"+startNum+"' style=\"width:330px\" class=\"intxt\"/> <nobr>填写远程网址</nobr></td>";
  59. fhtml += "<td width=\"100\" rowspan=\"2\" align=\"center\"><div id='divpicview"+startNum+"' class='divpre'></div></td>";
  60. fhtml += "</tr>";
  61. fhtml += "<tr bgcolor=\"#FFFFFF\"> ";
  62. fhtml += "<td height=\"56\" valign=\"top\"> 图片简介: ";
  63. fhtml += "<textarea name='imgmsg"+startNum+"' style=\"height:46px;width:330px\"></textarea></td>";
  64. fhtml += "</tr></tobdy></table>\r\n";
  65. upfield.innerHTML += fhtml;
  66. }
  67. }
  68. function TestGet()
  69. {
  70. LoadTestDiv();
  71. }
  72. var vcc = 0;
  73. function LoadTestDiv()
  74. {
  75. var posLeft = 100; var posTop = 100;
  76. var newobj = $Obj('_myhtml');
  77. $Obj('imagebody').value = $Obj('copyhtml').innerHTML;
  78. var dfstr = '粘贴到这里...';
  79. if($Obj('imagebody').value.length <= dfstr.length)
  80. {
  81. alert('你还没有粘贴任何东西都编辑框哦!');
  82. return;
  83. }
  84. if(!newobj){
  85. newobj = document.createElement("DIV");
  86. newobj.id = '_myhtml';
  87. newobj.style.position='absolute';
  88. newobj.className = "dlg2";
  89. newobj.style.top = posTop;
  90. newobj.style.left = posLeft;
  91. document.body.appendChild(newobj);
  92. }
  93. else{
  94. newobj.style.display = "block";
  95. }
  96. var myajax = new DedeAjax(newobj,false,true,'-','-','...');
  97. var v = $Obj('imagebody').value;
  98. vcc++;
  99. //utf8
  100. myajax.AddKeyUtf8('myhtml',v);
  101. myajax.AddKeyUtf8('vcc',vcc);
  102. myajax.SendPost2('album_testhtml.php');
  103. //gbk
  104. //myajax.SendGet2("album_testhtml.php?vcc="+vcc+"&myhtml="+v);
  105. DedeXHTTP = null;
  106. }
  107. function checkMuList(psid,cmid)
  108. {
  109. if($Obj('pagestyle3').checked)
  110. {
  111. $Obj('spagelist').style.display = 'none';
  112. }
  113. else if($Obj('pagestyle1').checked)
  114. {
  115. $Obj('spagelist').style.display = 'block';
  116. }
  117. else
  118. {
  119. $Obj('spagelist').style.display = 'none';
  120. }
  121. }
  122. //图集,显示与隐藏zip文件选项
  123. function ShowZipField(formitem,zipid,upid)
  124. {
  125. if(formitem.checked){
  126. $Obj(zipid).style.display = 'block';
  127. $Obj(upid).style.display = 'none';
  128. //$Obj('handfield').style.display = 'none';
  129. $Obj('formhtml').checked = false;
  130. $Obj('copyhtml').innerHTML = '';
  131. }else
  132. {
  133. $Obj(zipid).style.display = 'none';
  134. //$Obj('handfield').style.display = 'block';
  135. }
  136. }
  137. //图集,显示与隐藏Html编辑框
  138. function ShowHtmlField(formitem,htmlid,upid)
  139. {
  140. if($Nav()!="IE"){
  141. alert("该方法不适用于非IE浏览器!");
  142. return ;
  143. }
  144. if(formitem.checked){
  145. $Obj(htmlid).style.display = 'block';
  146. //$Obj(upid).style.display = 'none';
  147. //$Obj('handfield').style.display = 'none';
  148. //$Obj('formzip').checked = false;
  149. }else
  150. {
  151. $Obj(htmlid).style.display = 'none';
  152. //$Obj('handfield').style.display = 'block';
  153. $Obj('copyhtml').innerHTML = '';
  154. }
  155. }
  156. -->