/source/gl/mb/right/add.html

http://prosporous.googlecode.com/ · HTML · 226 lines · 204 code · 22 blank · 0 comment · 0 complexity · ae55322d8851feb90952b7667252119f MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  5. <title>rightcfg</title>
  6. <script type="text/javascript" src="../js/jquery.js"></script>
  7. <link rel="stylesheet" type="text/css" href="/Plug-in/ext/resources/css/xtheme-slate.css" />
  8. <style type="text/css">
  9. table {border-collapse:collapse;}
  10. thead th {
  11. font:bold 13px/18px georgia;
  12. text-align:left;
  13. background:#EEEEEE;
  14. color:#333;
  15. padding:8px 16px 8px 8px;
  16. border-right:1px solid #fff;
  17. border-bottom:1px solid #fff;
  18. }
  19. thead th.null {background:#7777CD}
  20. tbody th {
  21. font:bold 12px/15px georgia;
  22. text-align:left;
  23. background:#D1DDEF;
  24. color:#333;
  25. padding:8px;
  26. border-bottom:1px solid #f3f0e4;
  27. border-right:1px solid #fff;
  28. }
  29. tbody td {
  30. font:normal 12px/15px georgia;
  31. color:#333;
  32. padding:8px;
  33. border-right:1px solid #f3f0e4;
  34. border-bottom:1px solid #f3f0e4;
  35. }
  36. /* ?3???? --cssrain.cn */
  37. tbody td.on {background:#69c;}
  38. thead th.on {background:#69c;}
  39. tbody th.on {background:#69c;}
  40. </style>
  41. <script type="text/javascript">
  42. /*
  43. For functions getElementsByClassName, addClassName, and removeClassName
  44. Copyright Robert Nyman, <a href="http://www.robertnyman.com" target="_blank">http://www.robertnyman.com</a>
  45. Free to use if this text is included
  46. */
  47. function addLoadEvent(func) {
  48. var oldonload = window.onload;
  49. if (typeof window.onload != 'function') {
  50. window.onload = func;
  51. } else {
  52. window.onload = function() {
  53. oldonload();
  54. func();
  55. }
  56. }
  57. }
  58. function getElementsByClassName(className, tag, elm){
  59. var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
  60. var tag = tag || "*";
  61. var elm = elm || document;
  62. var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag);
  63. var returnElements = [];
  64. var current;
  65. var length = elements.length;
  66. for(var i=0; i<length; i++){
  67. current = elements[i];
  68. if(testClass.test(current.className)){
  69. returnElements.push(current);
  70. }
  71. }
  72. return returnElements;
  73. }
  74. function addClassName(elm, className){
  75. var currentClass = elm.className;
  76. if(!new RegExp(("(^|\\s)" + className + "(\\s|$)"), "i").test(currentClass)){
  77. elm.className = currentClass + ((currentClass.length > 0)? " " : "") + className;
  78. }
  79. return elm.className;
  80. }
  81. function removeClassName(elm, className){
  82. var classToRemove = new RegExp(("(^|\\s)" + className + "(\\s|$)"), "i");
  83. elm.className = elm.className.replace(classToRemove, "").replace(/^\s+|\s+$/g, "");
  84. return elm.className;
  85. }
  86. function makeTheTableHeadsHighlight() {
  87. // get all the td's in the heart of the table...
  88. var table = document.getElementById('rockartists');
  89. var tbody = table.getElementsByTagName('tbody');
  90. var tbodytds = table.getElementsByTagName('td');
  91. // and loop through them...
  92. for (var i=0; i<tbodytds.length; i++) {
  93. // take note of their default class name
  94. tbodytds[i].oldClassName = tbodytds[i].className;
  95. // when someone moves their mouse over one of those cells...
  96. tbodytds[i].onmouseover = function() {
  97. // attach 'on' to the pointed cell
  98. addClassName(this,'on');
  99. // attach 'on' to the th in the thead with the same class name
  100. var topheading = getElementsByClassName(this.oldClassName,'th',table);
  101. addClassName(topheading[0],'on');
  102. // attach 'on' to the far left th in the same row as this cell
  103. var row = this.parentNode;
  104. var rowheading = row.getElementsByTagName('th')[0];
  105. addClassName(rowheading,'on');
  106. }
  107. // ok, now when someone moves their mouse away, undo everything we just did.
  108. tbodytds[i].onmouseout = function() {
  109. // remove 'on' from this cell
  110. removeClassName(this,'on');
  111. // remove 'on' from the th in the thead
  112. var topheading = getElementsByClassName(this.oldClassName,'th',table);
  113. removeClassName(topheading[0],'on');
  114. // remove 'on' to the far left th in the same row as this cell
  115. var row = this.parentNode;
  116. var rowheading = row.getElementsByTagName('th')[0];
  117. removeClassName(rowheading,'on');
  118. }
  119. }
  120. }
  121. addLoadEvent(makeTheTableHeadsHighlight);
  122. </script>
  123. </head>
  124. <body>
  125. <FORM action="./i.php" method="post" name="form1" id="form1">
  126. <table width="90%" align="center">
  127. <tr>
  128. <td width="80px">????</td>
  129. <td><input name="tt" type="text" value="<{$tp.tt}>"></td>
  130. </tr>
  131. <tr>
  132. <td>???</td>
  133. <td><input name="ct" type="text" style="width:360px" value="<{$tp.ct}>"></td>
  134. </tr>
  135. </table>
  136. <table id="rockartists" align="center" width="90%" >
  137. <thead>
  138. <tr>
  139. <th class="null"><font color="#FFFFFF">????</font></th>
  140. <th class="stones">????</th>
  141. <th class="u2">??????</th>
  142. <th class="crue">????</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <{$tr}>
  147. </tbody>
  148. </table>
  149. <table width="90%" align="center">
  150. <tr>
  151. <td align='center'><input type="submit" value="??"><input type="hidden" name="tid" value="<{$tid}>" /><input type="reset" value="??"> <input type="button" value="??" onclick="getall();"><input type="button" value="??" onclick="getnall();"><input type="button" value="??" onclick="getfall();"> <input type="hidden" name="id" value="<{$id}>" /></td>
  152. </tr>
  153. </table>
  154. </form>
  155. </body>
  156. <script>
  157. function getall()
  158. {
  159. for ( var i=0; i<document.form1.elements.length; i++ )
  160. {
  161. var e = document.form1.elements[i];
  162. if ( (e.type=='checkbox')&&(!e.disabled) )
  163. {
  164. document.form1.elements[i].checked=true;
  165. }
  166. }
  167. }
  168. function getnall()
  169. {
  170. for ( var i=0; i<document.form1.elements.length; i++ )
  171. {
  172. var e = document.form1.elements[i];
  173. if ( (e.type=='checkbox')&&(!e.disabled) )
  174. {
  175. document.form1.elements[i].checked=false;
  176. }
  177. }
  178. }
  179. function getfall()
  180. {
  181. for ( var i=0; i<document.form1.elements.length; i++ )
  182. {
  183. var e = document.form1.elements[i];
  184. if ( (e.type=='checkbox')&&(!e.disabled) )
  185. {
  186. document.form1.elements[i].checked?document.form1.elements[i].checked=false:document.form1.elements[i].checked=true;
  187. }
  188. }
  189. }
  190. function smallall(obj){
  191. if($("input[name='xr["+obj+"]']").attr("checked")){
  192. $("input[name='r["+obj+"]']").attr("checked","true");
  193. $("input[name='c["+obj+"]']").attr("checked","true");
  194. $("input[name='u["+obj+"]']").attr("checked","true");
  195. $("input[name='d["+obj+"]']").attr("checked","true");
  196. }else{
  197. $("input[name='r["+obj+"]']").removeAttr("checked");
  198. $("input[name='c["+obj+"]']").removeAttr("checked");
  199. $("input[name='u["+obj+"]']").removeAttr("checked");
  200. $("input[name='d["+obj+"]']").removeAttr("checked");
  201. }
  202. }
  203. </script>
  204. </html>