95e23bec9dd14d76f43bf4b1c0e7716f05935dfb
[plewww.git] / planetlab / includes / plc_tables.php
1 <?php
2   /* table_id */
3 function plc_table_header ($table_id,$size_init,$size_def) {
4   $tablesize_text_id = $table_id . "_tablesize";
5   $search_text_id = $table_id . "_search";
6   $search_reset_id = $table_id . "_search_reset";
7   $search_and_id = $table_id . "_search_and";
8   print <<< EOF
9 <table class='table_dialogs'> <tr>
10 <td class='table_flushleft'>
11 <form class='table_size'>
12    <input class='table_size_input' type='text' id="$tablesize_text_id" value=$size_init 
13       onkeyup='plc_table_setsize("$table_id","$tablesize_text_id", $size_init);' 
14       size=3 maxlength=3 /> 
15   <label class='table_size_label'> items/page </label>   
16   <img class='table_reset' src="/planetlab/icons/clear.png" 
17       onmousedown='plc_table_size_reset("$table_id","$tablesize_text_id",$size_def);'>
18 </form>
19 </td>
20
21 <td class='table_flushright'> 
22 <form class='table_search'>
23    <label class='table_search_label'> Search </label> 
24    <input class='table_search_input' type='text' id='$search_text_id'
25       onkeyup='plc_table_filter("$table_id","$search_text_id","$search_and_id");'
26       size=40 maxlength=256 />
27    <label>and</label>
28    <input id='$search_and_id' class='table_search_and' 
29       type='checkbox' checked='checked' 
30       onchange='plc_table_filter("$table_id","$search_text_id","$search_and_id");' />
31    <img class='table_reset' src="/planetlab/icons/clear.png" 
32       onmousedown='plc_table_filter_reset("$table_id","$search_text_id","$search_and_id");'>
33 </form>
34 </td>
35 </tr></table>
36 EOF;
37 }
38 ?>
39