root / src / footers.php @ master
Historique | Voir | Annoter | Télécharger (4,75 ko)
1 |
<?php
|
---|---|
2 |
if ($tb != "home" & $tb != "rack" & $tb != "add_box" & $tb != "publish_it") { |
3 |
// TRIGGER
|
4 |
$opts['triggers']['select']['pre'][] = 'last_trigger.MVC.php'; |
5 |
$opts['triggers']['update']['pre'][] = 'last_trigger.MVC.php'; |
6 |
|
7 |
array_unshift($opts['triggers']['select']['pre'], 'raw_dir.MVC.php'); |
8 |
array_unshift($opts['triggers']['update']['pre'], 'raw_dir.MVC.php'); |
9 |
|
10 |
// Now important call to phpMyEdit
|
11 |
require_once 'phpMyEdit.class.php'; |
12 |
$pme_instance = new phpMyEdit($opts); |
13 |
|
14 |
print("<p><a href=backup.php?TABLE=$tb>Export to .csv format.</a></p>"); |
15 |
print("<p>Backup <a href='backup.php?FULL_BACK=1'>the entire system</a> or <a href='backup.php'>only the database</a> NOW!</p>"); |
16 |
|
17 |
|
18 |
if (!array_key_exists("PME_sys_operation", $_REQUEST)) { |
19 |
$tmp_array = $pme_instance->fds; |
20 |
if ($tb == "strains") { |
21 |
array_unshift($tmp_array, "Genotype"); |
22 |
} |
23 |
$json_cols = json_encode($tmp_array); |
24 |
$adv_search = <<<EOD |
25 |
<div id="adv_search" class="centered_form">
|
26 |
<form action="">
|
27 |
<fieldset>
|
28 |
<legend>Advanced Search</legend>
|
29 |
<table id="adv_search_table">
|
30 |
</table>
|
31 |
<input type="hidden" name="action" value="ADV_SEARCH"/>
|
32 |
<input type="submit" value="Search"/>
|
33 |
</fieldset>
|
34 |
</form>
|
35 |
</div>
|
36 |
|
37 |
<script type="text/javascript">
|
38 |
nb_filter = 0;
|
39 |
function filter() {
|
40 |
var self = this;
|
41 |
cols = $json_cols;
|
42 |
conds = ["LIKE", "=", "<", "<=", ">=", ">", "!="];
|
43 |
ops = ["AND", "OR"];
|
44 |
table = document.getElementById("adv_search_table");
|
45 |
this.tmp_tr = document.createElement("tr");
|
46 |
table.appendChild(this.tmp_tr);
|
47 |
tmp_td = document.createElement("td");
|
48 |
if (nb_filter != 0) {
|
49 |
tmp_select = document.createElement("select")
|
50 |
tmp_select.setAttribute('name', 'op' + '_' + nb_filter)
|
51 |
ops.forEach(function(op) {
|
52 |
tmp_option = document.createElement("option");
|
53 |
tmp_option.appendChild(document.createTextNode(op));
|
54 |
tmp_select.appendChild(tmp_option);
|
55 |
});
|
56 |
tmp_td.appendChild(tmp_select);
|
57 |
}
|
58 |
this.tmp_tr.appendChild(tmp_td)
|
59 |
tmp_select = document.createElement("select")
|
60 |
tmp_select.setAttribute('name', 'col' + '_' + nb_filter)
|
61 |
cols.forEach(function(col) {
|
62 |
tmp_option = document.createElement("option");
|
63 |
tmp_option.appendChild(document.createTextNode(col));
|
64 |
tmp_select.appendChild(tmp_option);
|
65 |
});
|
66 |
tmp_td = document.createElement("td");
|
67 |
tmp_td.appendChild(tmp_select);
|
68 |
this.tmp_tr.appendChild(tmp_td)
|
69 |
tmp_select = document.createElement("select")
|
70 |
tmp_select.setAttribute('name', 'cond' + '_' + nb_filter)
|
71 |
conds.forEach(function(cond) {
|
72 |
tmp_option = document.createElement("option");
|
73 |
tmp_option.appendChild(document.createTextNode(cond));
|
74 |
tmp_select.appendChild(tmp_option);
|
75 |
});
|
76 |
tmp_td = document.createElement("td");
|
77 |
tmp_td.appendChild(tmp_select);
|
78 |
this.tmp_tr.appendChild(tmp_td)
|
79 |
tmp_input = document.createElement("input")
|
80 |
tmp_input.setAttribute('name', 'input' + '_' + nb_filter)
|
81 |
tmp_td = document.createElement("td");
|
82 |
tmp_td.appendChild(tmp_input);
|
83 |
this.tmp_tr.appendChild(tmp_td);
|
84 |
tmp_td = document.createElement("td");
|
85 |
tmp_td.innerHTML = "<input type='button' onclick='new filter();return false;' value='+'/>"
|
86 |
if (nb_filter != 0) {
|
87 |
tmp_input = document.createElement("input");
|
88 |
tmp_input.setAttribute('value', '-');
|
89 |
tmp_input.setAttribute('type', 'button');
|
90 |
tmp_input.setAttribute('value', '-');
|
91 |
tmp_input.onclick = function(){self.tmp_tr.parentNode.removeChild(self.tmp_tr); return false;};
|
92 |
tmp_td.appendChild(tmp_input);
|
93 |
}
|
94 |
this.tmp_tr.appendChild(tmp_td);
|
95 |
nb_filter++;
|
96 |
}
|
97 |
new filter();
|
98 |
</script>
|
99 |
EOD;
|
100 |
|
101 |
$to_be_pre_list_content .= $adv_search; |
102 |
} |
103 |
} |
104 |
|
105 |
echo <<<EOD |
106 |
<div id="to_be_pre_list">
|
107 |
$to_be_pre_list_content
|
108 |
</div>
|
109 |
EOD;
|
110 |
?>
|
111 |
|
112 |
</div>
|
113 |
</div>
|
114 |
|
115 |
<div id="post_list"></div> |
116 |
|
117 |
<script type="text/javascript"> |
118 |
q = document.getElementById("to_be_post_list");
|
119 |
if (q != null) {
|
120 |
o = document.getElementById("post_list");
|
121 |
o.appendChild(q.parentNode.removeChild(q));
|
122 |
}
|
123 |
q = document.getElementById("to_be_pre_list");
|
124 |
if (q != null) {
|
125 |
o = document.getElementById("pre_list");
|
126 |
o.appendChild(q.parentNode.removeChild(q));
|
127 |
}
|
128 |
</script>
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
<center><a href="https://forge.cbp.ens-lyon.fr/redmine/projects/mylabstocks">mylabstocks</a> -- since 2007 -- <a href="http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html">CeCILL V2.1</a> -- A software from <a href="http://www.ens-lyon.fr/LBMC/gisv/index.php/en/">the lab of Gael Yvert</a></center> |
134 |
|
135 |
|
136 |
|
137 |
</div>
|
138 |
</body>
|
139 |
</html>
|