国内流行的内容管理系统(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.

175 lines
5.1KB

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