Statistiques
| Branche: | Révision :

root / src / strains.php @ master

Historique | Voir | Annoter | Télécharger (11,94 ko)

1
<?php
2
session_start ();
3
require("headers.php");
4

    
5

    
6

    
7
if ($session->mode == "super") {
8
  print("<p><a href='publish_it.php'>Publish genotypes.</a></p>");
9
}
10

    
11

    
12
// if (array_key_exists("action", $_REQUEST)) {
13
//   if ($_REQUEST["action"] == "SEARCH_IN_GENOTYPE") {
14
//     $keys = split(" ", $_REQUEST["geno"]); 
15
//     print_r($keys );
16
// 
17
//     $tmp_filter = "ynl095c:PBY-306-ynl095C";
18
//     $likes = "";
19
//     foreach ($keys as $k) {
20
//       if ($k != "") {
21
//         $likes .= "`locus1` LIKE '%$k%' OR `locus2` LIKE '%$k%' OR `locus3` LIKE '%$k%' OR `locus4` LIKE '%$k%' OR `locus5` LIKE '%$k%' OR `ADE2` LIKE '%$k%' OR `HIS3` LIKE '%$k%' OR `LEU2` LIKE '%$k%' OR `LYS2` LIKE '%$k%' OR `MET15` LIKE '%$k%' OR `TRP1` LIKE '%$k%' OR `URA3` LIKE '%$k%' OR `HO_` LIKE '%$k%' OR `Cytoplasmic_Character` LIKE '%$k%' OR `extrachromosomal_plasmid` LIKE '%$k%'";
22
//       }
23
//     }
24
//     $opts["filters"] = $likes . " " ;
25
//   }
26
// }
27
// 
28
// if (!array_key_exists("PME_sys_operation", $_REQUEST)) {
29
//   if (array_key_exists("geno", $_REQUEST)) {
30
//     $geno = $_REQUEST["geno"]; 
31
//   } else {
32
//     $geno = "";
33
//   }
34
//   echo "<form action='' method='post'>";
35
//   //echo "<fieldset style='border:1px plain black; width: 300px;'>";
36
//   //echo "<legend>Search in genotype</legend>";
37
//   echo "Search in genotype: <input type='hidden' name='action' value='SEARCH_IN_GENOTYPE'/>";
38
//   echo "<input type='text' name='geno' value='$geno'/>";
39
//   echo "<input type='button' name='send' value='Search' onclick='return this.form.submit();'/>";
40
// //  echo "</fieldset>";
41
//   echo "</form>";
42
// }
43

    
44
/*
45
 * IMPORTANT NOTE: This generated file contains only a subset of huge amount
46
 * of options that can be used with phpMyEdit. To get information about all
47
 * features offered by phpMyEdit, check official documentation. It is available
48
 * online and also for download on phpMyEdit project management page:
49
 *
50
 * http://platon.sk/projects/main_page.php?project_id=5
51
 *
52
 * This file was generated by:
53
 *
54
 *                    phpMyEdit version: unknown
55
 *       phpMyEdit.class.php core class: 1.204
56
 *            phpMyEditSetup.php script: 1.50
57
 *              generating setup script: 1.50
58
 */
59

    
60

    
61
/*************************/
62
//
63
// Pass phpMyEdit options
64
//
65
/*************************/
66

    
67
$opts['dbh'] = $connexion;
68
$opts['tb'] = $tb;
69

    
70
// Name of field which is the unique key
71
$opts['key'] = 'ID';
72

    
73
// Type of key field (int/real/string/date etc.)
74
$opts['key_type'] = 'int';
75

    
76
// Sorting field(s)
77
$opts['sort_field'] = array('ID');
78

    
79
// Number of records to display on the screen
80
// Value of -1 lists all records in a table
81
$opts['inc'] = 15;
82

    
83
// Options you wish to give the users
84
// A - add,  C - change, P - copy, V - view, D - delete,
85
// F - filter, I - initial sort suppressed
86
$opts['options'] = $privopt;
87

    
88
// Number of lines to display on multiple selection filters
89
$opts['multiple'] = '4';
90

    
91
// Navigation style: B - buttons (default), T - text links, G - graphic links
92
// Buttons position: U - up, D - down (default)
93
$opts['navigation'] = 'UDBG';
94

    
95
// Display special page elements
96
$opts['display'] = array(
97
        'form'  => true,
98
        'query' => true,
99
        'sort'  => true,
100
        'time'  => true,
101
        'tabs'  => true
102
);
103

    
104
// Set default prefixes for variables
105
$opts['js']['prefix']               = 'PME_js_';
106
$opts['dhtml']['prefix']            = 'PME_dhtml_';
107
$opts['cgi']['prefix']['operation'] = 'PME_op_';
108
$opts['cgi']['prefix']['sys']       = 'PME_sys_';
109
$opts['cgi']['prefix']['data']      = 'PME_data_';
110

    
111
/* Get the user's default language and use it if possible or you can
112
   specify particular one you want to use. Refer to official documentation
113
   for list of available languages. */
114
$opts['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'] . '-UTF8';
115

    
116
/* Table-level filter capability. If set, it is included in the WHERE clause
117
   of any generated SELECT statement in SQL query. This gives you ability to
118
   work only with subset of data from table.
119

120
$opts['filters'] = "column1 like '%11%' AND column2<17";
121
$opts['filters'] = "section_id = 9";
122
$opts['filters'] = "PMEtable0.sessions_count > 200";
123
*/
124

    
125
/* Field definitions
126
   
127
Fields will be displayed left to right on the screen in the order in which they
128
appear in generated list. Here are some most used field options documented.
129

130
['name'] is the title used for column headings, etc.;
131
['maxlen'] maximum length to display add/edit/search input boxes
132
['trimlen'] maximum length of string content to display in row listing
133
['width'] is an optional display width specification for the column
134
          e.g.  ['width'] = '100px';
135
['mask'] a string that is used by sprintf() to format field output
136
['sort'] true or false; means the users may sort the display on this column
137
['strip_tags'] true or false; whether to strip tags from content
138
['nowrap'] true or false; whether this field should get a NOWRAP
139
['select'] T - text, N - numeric, D - drop-down, M - multiple selection
140
['options'] optional parameter to control whether a field is displayed
141
  L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
142
            Another flags are:
143
            R - indicates that a field is read only
144
            W - indicates that a field is a password field
145
            H - indicates that a field is to be hidden and marked as hidden
146
['URL'] is used to make a field 'clickable' in the display
147
        e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
148
['URLtarget']  HTML target link specification (for example: _blank)
149
['textarea']['rows'] and/or ['textarea']['cols']
150
  specifies a textarea is to be used to give multi-line input
151
  e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
152
['values'] restricts user input to the specified constants,
153
           e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
154
['values']['table'] and ['values']['column'] restricts user input
155
  to the values found in the specified column of another table
156
['values']['description'] = 'desc_column'
157
  The optional ['values']['description'] field allows the value(s) displayed
158
  to the user to be different to those in the ['values']['column'] field.
159
  This is useful for giving more meaning to column values. Multiple
160
  descriptions fields are also possible. Check documentation for this.
161
*/
162

    
163
$opts['fdd']['ID'] = array(
164
  'name'     => 'ID',
165
  'select'   => 'N',
166
  //'options'  => 'LAVCPDR', // auto increment
167
  'maxlen'   => 10,
168
  'default'  => '0',
169
  'sort'     => true
170
);
171
$opts['fdd']['Name_'] = array(
172
  'name'     => 'Name ',
173
  'select'   => 'T',
174
  'maxlen'   => 25,
175
  'sort'     => true
176
);
177
$opts['fdd']['Other_names'] = array(
178
  'name'     => 'Other names',
179
  'select'   => 'T',
180
  'maxlen'   => 25,
181
  'sort'     => true
182
);
183
$opts['fdd']['species'] = array(
184
  'name'     => 'species',
185
  'select'   => 'D',
186
  'maxlen'   => 50,
187
  'sort'     => true,
188
  'values'   => array(
189
          'table'  => 'st_species',
190
        'column' => 'species')
191
);
192
$opts['fdd']['Comments'] = array(
193
  'name'     => 'Comments',
194
  'select'   => 'T',
195
  'maxlen'   => 1000000000, //4294967295,
196
  'textarea' => array(
197
          'rows' => 5,
198
          'cols' => 50),
199
  'sort'     => true
200
);
201
$opts['fdd']['General_Background'] = array(
202
  'name'     => 'General Background',
203
  'select'   => 'D',
204
  'maxlen'   => 25,
205
  'sort'     => true,
206
  'values'   => array(
207
          'table'  => 'st_general_backgrounds',
208
        'column' => 'background')
209
);
210
$opts['fdd']['Mating_Type'] = array(
211
  'name'     => 'Mating Type',
212
  'select'   => 'D',
213
  'maxlen'   => 25,
214
  'sort'     => true,
215
  'values'   => array(
216
          'table'  => 'st_MAT',
217
        'column' => 'alleles')
218
);
219
$opts['fdd']['ADE2'] = array(
220
  'name'     => 'ADE2',
221
  'select'   => 'D',
222
  'maxlen'   => 25,
223
  'sort'     => true,
224
  'values'   => array(
225
          'table'  => 'st_ADE2',
226
        'column' => 'alleles')
227
);
228
$opts['fdd']['HIS3'] = array(
229
  'name'     => 'HIS3',
230
  'select'   => 'D',
231
  'maxlen'   => 25,
232
  'sort'     => true,
233
  'values'   => array(
234
          'table'  => 'st_HIS3',
235
        'column' => 'alleles')
236
);
237
$opts['fdd']['LEU2'] = array(
238
  'name'     => 'LEU2',
239
  'select'   => 'D',
240
  'maxlen'   => 50,
241
  'sort'     => true,
242
  'values'   => array(
243
          'table'  => 'st_LEU2',
244
        'column' => 'alleles')
245
);
246
$opts['fdd']['LYS2'] = array(
247
  'name'     => 'LYS2',
248
  'select'   => 'D',
249
  'maxlen'   => 25,
250
  'sort'     => true,
251
  'values'   => array(
252
          'table'  => 'st_LYS2',
253
        'column' => 'alleles')
254
);
255
$opts['fdd']['MET15'] = array(
256
  'name'     => 'MET15',
257
  'select'   => 'D',
258
  'maxlen'   => 25,
259
  'sort'     => true,
260
  'values'   => array(
261
          'table'  => 'st_MET15',
262
        'column' => 'alleles')
263
);
264
$opts['fdd']['TRP1'] = array(
265
  'name'     => 'TRP1',
266
  'select'   => 'D',
267
  'maxlen'   => 25,
268
  'sort'     => true,
269
  'values'   => array(
270
          'table'  => 'st_TRP1',
271
        'column' => 'alleles')
272
);
273
$opts['fdd']['URA3'] = array(
274
  'name'     => 'URA3',
275
  'select'   => 'D',
276
  'maxlen'   => 25,
277
  'sort'     => true,
278
  'values'   => array(
279
          'table'  => 'st_URA3',
280
        'column' => 'alleles')
281
);
282
$opts['fdd']['HO_'] = array(
283
  'name'     => 'HO ',
284
  'select'   => 'T',
285
  'maxlen'   => 50,
286
  'sort'     => true
287
);
288
$opts['fdd']['locus1'] = array(
289
  'name'     => 'Locus1',
290
  'select'   => 'T',
291
  'maxlen'   => 75,
292
  'sort'     => true
293
);
294
$opts['fdd']['locus2'] = array(
295
  'name'     => 'Locus2',
296
  'select'   => 'T',
297
  'maxlen'   => 50,
298
  'sort'     => true
299
);
300
$opts['fdd']['locus3'] = array(
301
  'name'     => 'Locus3',
302
  'select'   => 'T',
303
  'maxlen'   => 50,
304
  'sort'     => true
305
);
306
$opts['fdd']['locus4'] = array(
307
  'name'     => 'Locus4',
308
  'select'   => 'T',
309
  'maxlen'   => 25,
310
  'sort'     => true
311
);
312
$opts['fdd']['locus5'] = array(
313
  'name'     => 'Locus5',
314
  'select'   => 'T',
315
  'maxlen'   => 50,
316
  'sort'     => true
317
);
318
$opts['fdd']['Parental_strain'] = array(
319
  'name'     => 'Parental strain',
320
  'options'  => 'AVCPD',
321
  'select'   => 'T',
322
  'maxlen'   => 25,
323
  'sort'     => true
324
);
325
$opts['fdd']['Obtained_by'] = array(
326
  'name'     => 'Obtained by',
327
  'options'  => 'AVCPD',
328
  'select'   => 'T',
329
  'maxlen'   => 25,
330
  'sort'     => true
331
);
332
$opts['fdd']['Checkings'] = array(
333
  'name'     => 'Checkings',
334
  'options'  => 'AVCPD',
335
  'select'   => 'T',
336
  'maxlen'   => 225,
337
  'sort'     => true
338
);
339
$opts['fdd']['Cytoplasmic_Character'] = array(
340
  'name'     => 'Cytoplasmic Character',
341
  'select'   => 'T',
342
  'maxlen'   => 25,
343
  'sort'     => true
344
);
345
$opts['fdd']['extrachromosomal_plasmid'] = array(
346
  'name'     => 'Extrachromosomal plasmid',
347
  'select'   => 'T',
348
  'maxlen'   => 50,
349
  'sort'     => true
350
);
351
$opts['fdd']['Reference_'] = array(
352
  'name'     => 'Reference ',
353
  'options'  => 'AVCPD',
354
  'select'   => 'T',
355
  'maxlen'   => 125,
356
  'sort'     => true
357
);
358
$opts['fdd']['Last_modified'] = array(
359
  'name'     => 'Last modified',
360
  'options'  => 'AVCPD',
361
  'select'   => 'T',
362
  'maxlen'   => 10,
363
  'sort'     => true
364
);
365
$opts['fdd']['Author'] = array(
366
  'name'     => 'Author',
367
  'select'   => 'D',
368
  'maxlen'   => 10,
369
  'sort'     => true,
370
  'values'   => array(
371
          'table'  => 'lab_members',
372
        'column' => 'id')
373
);
374
$opts['fdd']['Date_'] = array(
375
  'name'     => 'Date',
376
  'options'  => 'LFAVCPD',
377
  'select'   => 'N',
378
  'maxlen'   => 10,
379
  'sort'     => true,
380
  'default'  => date("Y-m-d", strtotime("now"))
381
);
382
$opts['fdd']['storage_minus20freezers'] = array(
383
  'name'     => '-20 Freezer',
384
  'select'   => 'D',
385
  'maxlen'   => 25,
386
  'sort'     => true,
387
  'values'   => array(
388
          'table'  => 'storage_minus20freezers',
389
          'column' => 'name'),
390
  'default'  => 'Amp'
391
);
392
$opts['fdd']['storage_minus80freezers'] = array(
393
  'name'     => '-80 Freezer',
394
  'select'   => 'D',
395
  'maxlen'   => 25,
396
  'sort'     => true,
397
  'values'   => array(
398
          'table'  => 'storage_minus80freezers',
399
          'column' => 'name'),
400
  'default'  => 'Amp'
401
);
402
$opts['fdd']['storage_fridges'] = array(
403
  'name'     => 'Fridge',
404
  'select'   => 'D',
405
  'maxlen'   => 25,
406
  'sort'     => true,
407
  'values'   => array(
408
          'table'  => 'storage_fridges',
409
          'column' => 'name'),
410
  'default'  => 'Amp'
411
);
412
$opts['fdd']['storage_rooms'] = array(
413
  'name'     => 'Room',
414
  'select'   => 'D',
415
  'maxlen'   => 25,
416
  'sort'     => true,
417
  'values'   => array(
418
          'table'  => 'storage_rooms',
419
          'column' => 'name'),
420
  'default'  => 'Amp'
421
);
422

    
423
// TRIGGER
424
// Before displaying the view page
425
$opts['triggers']['select']['pre'][] = 'strains.TSP.php';
426

    
427

    
428
require("footers.php");
429
?>