PageRenderTime 56ms CodeModel.GetById 10ms app.highlight 41ms RepoModel.GetById 1ms app.codeStats 0ms

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