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