Statistiques
| Branche: | Révision :

root / src / notebooks.php @ a9b72d88

Historique | Voir | Annoter | Télécharger (5,7 ko)

1 1a2be799 Florent Chuffart
<?php
2 1a2be799 Florent Chuffart
session_start ();
3 1a2be799 Florent Chuffart
require("headers.php");
4 1a2be799 Florent Chuffart
5 1a2be799 Florent Chuffart
/*
6 1a2be799 Florent Chuffart
 * IMPORTANT NOTE: This generated file contains only a subset of huge amount
7 1a2be799 Florent Chuffart
 * of options that can be used with phpMyEdit. To get information about all
8 1a2be799 Florent Chuffart
 * features offered by phpMyEdit, check official documentation. It is available
9 1a2be799 Florent Chuffart
 * online and also for download on phpMyEdit project management page:
10 1a2be799 Florent Chuffart
 *
11 1a2be799 Florent Chuffart
 * http://platon.sk/projects/main_page.php?project_id=5
12 1a2be799 Florent Chuffart
 *
13 1a2be799 Florent Chuffart
 * This file was generated by:
14 1a2be799 Florent Chuffart
 *
15 1a2be799 Florent Chuffart
 *                    phpMyEdit version: unknown
16 1a2be799 Florent Chuffart
 *       phpMyEdit.class.php core class: 1.204
17 1a2be799 Florent Chuffart
 *            phpMyEditSetup.php script: 1.50
18 1a2be799 Florent Chuffart
 *              generating setup script: 1.50
19 1a2be799 Florent Chuffart
 */
20 1a2be799 Florent Chuffart
21 1a2be799 Florent Chuffart
/*************************/
22 1a2be799 Florent Chuffart
//
23 1a2be799 Florent Chuffart
// Pass phpMyEdit options
24 1a2be799 Florent Chuffart
//
25 1a2be799 Florent Chuffart
/*************************/
26 1a2be799 Florent Chuffart
27 1a2be799 Florent Chuffart
$opts['dbh'] = $connexion;
28 1a2be799 Florent Chuffart
$opts['tb'] = $tb;
29 1a2be799 Florent Chuffart
30 1a2be799 Florent Chuffart
// Name of field which is the unique key
31 1a2be799 Florent Chuffart
$opts['key'] = 'ID';
32 1a2be799 Florent Chuffart
33 1a2be799 Florent Chuffart
// Type of key field (int/real/string/date etc.)
34 1a2be799 Florent Chuffart
$opts['key_type'] = 'int';
35 1a2be799 Florent Chuffart
36 1a2be799 Florent Chuffart
// Sorting field(s)
37 1a2be799 Florent Chuffart
$opts['sort_field'] = array('ID');
38 1a2be799 Florent Chuffart
39 1a2be799 Florent Chuffart
// Number of records to display on the screen
40 1a2be799 Florent Chuffart
// Value of -1 lists all records in a table
41 1a2be799 Florent Chuffart
$opts['inc'] = -1;
42 1a2be799 Florent Chuffart
43 1a2be799 Florent Chuffart
// Options you wish to give the users
44 1a2be799 Florent Chuffart
// A - add,  C - change, P - copy, V - view, D - delete,
45 1a2be799 Florent Chuffart
// F - filter, I - initial sort suppressed
46 1a2be799 Florent Chuffart
$opts['options'] = $privopt;
47 1a2be799 Florent Chuffart
48 1a2be799 Florent Chuffart
// Number of lines to display on multiple selection filters
49 1a2be799 Florent Chuffart
$opts['multiple'] = '4';
50 1a2be799 Florent Chuffart
51 1a2be799 Florent Chuffart
// Navigation style: B - buttons (default), T - text links, G - graphic links
52 1a2be799 Florent Chuffart
// Buttons position: U - up, D - down (default)
53 1a2be799 Florent Chuffart
$opts['navigation'] = 'UDBG';
54 1a2be799 Florent Chuffart
55 1a2be799 Florent Chuffart
// Display special page elements
56 1a2be799 Florent Chuffart
$opts['display'] = array(
57 1a2be799 Florent Chuffart
        'form'  => true,
58 1a2be799 Florent Chuffart
        'query' => true,
59 1a2be799 Florent Chuffart
        'sort'  => true,
60 1a2be799 Florent Chuffart
        'time'  => true,
61 1a2be799 Florent Chuffart
        'tabs'  => true
62 1a2be799 Florent Chuffart
);
63 1a2be799 Florent Chuffart
64 1a2be799 Florent Chuffart
// Set default prefixes for variables
65 1a2be799 Florent Chuffart
$opts['js']['prefix']               = 'PME_js_';
66 1a2be799 Florent Chuffart
$opts['dhtml']['prefix']            = 'PME_dhtml_';
67 1a2be799 Florent Chuffart
$opts['cgi']['prefix']['operation'] = 'PME_op_';
68 1a2be799 Florent Chuffart
$opts['cgi']['prefix']['sys']       = 'PME_sys_';
69 1a2be799 Florent Chuffart
$opts['cgi']['prefix']['data']      = 'PME_data_';
70 1a2be799 Florent Chuffart
71 1a2be799 Florent Chuffart
/* Get the user's default language and use it if possible or you can
72 1a2be799 Florent Chuffart
   specify particular one you want to use. Refer to official documentation
73 1a2be799 Florent Chuffart
   for list of available languages. */
74 1a2be799 Florent Chuffart
$opts['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'] . '-UTF8';
75 1a2be799 Florent Chuffart
76 1a2be799 Florent Chuffart
/* Table-level filter capability. If set, it is included in the WHERE clause
77 1a2be799 Florent Chuffart
   of any generated SELECT statement in SQL query. This gives you ability to
78 1a2be799 Florent Chuffart
   work only with subset of data from table.
79 1a2be799 Florent Chuffart

80 1a2be799 Florent Chuffart
$opts['filters'] = "column1 like '%11%' AND column2<17";
81 1a2be799 Florent Chuffart
$opts['filters'] = "section_id = 9";
82 1a2be799 Florent Chuffart
$opts['filters'] = "PMEtable0.sessions_count > 200";
83 1a2be799 Florent Chuffart
*/
84 1a2be799 Florent Chuffart
85 1a2be799 Florent Chuffart
/* Field definitions
86 1a2be799 Florent Chuffart
   
87 1a2be799 Florent Chuffart
Fields will be displayed left to right on the screen in the order in which they
88 1a2be799 Florent Chuffart
appear in generated list. Here are some most used field options documented.
89 1a2be799 Florent Chuffart

90 1a2be799 Florent Chuffart
['name'] is the title used for column headings, etc.;
91 1a2be799 Florent Chuffart
['maxlen'] maximum length to display add/edit/search input boxes
92 1a2be799 Florent Chuffart
['trimlen'] maximum length of string content to display in row listing
93 1a2be799 Florent Chuffart
['width'] is an optional display width specification for the column
94 1a2be799 Florent Chuffart
          e.g.  ['width'] = '100px';
95 1a2be799 Florent Chuffart
['mask'] a string that is used by sprintf() to format field output
96 1a2be799 Florent Chuffart
['sort'] true or false; means the users may sort the display on this column
97 1a2be799 Florent Chuffart
['strip_tags'] true or false; whether to strip tags from content
98 1a2be799 Florent Chuffart
['nowrap'] true or false; whether this field should get a NOWRAP
99 1a2be799 Florent Chuffart
['select'] T - text, N - numeric, D - drop-down, M - multiple selection
100 1a2be799 Florent Chuffart
['options'] optional parameter to control whether a field is displayed
101 1a2be799 Florent Chuffart
  L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
102 1a2be799 Florent Chuffart
            Another flags are:
103 1a2be799 Florent Chuffart
            R - indicates that a field is read only
104 1a2be799 Florent Chuffart
            W - indicates that a field is a password field
105 1a2be799 Florent Chuffart
            H - indicates that a field is to be hidden and marked as hidden
106 1a2be799 Florent Chuffart
['URL'] is used to make a field 'clickable' in the display
107 1a2be799 Florent Chuffart
        e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
108 1a2be799 Florent Chuffart
['URLtarget']  HTML target link specification (for example: _blank)
109 1a2be799 Florent Chuffart
['textarea']['rows'] and/or ['textarea']['cols']
110 1a2be799 Florent Chuffart
  specifies a textarea is to be used to give multi-line input
111 1a2be799 Florent Chuffart
  e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
112 1a2be799 Florent Chuffart
['values'] restricts user input to the specified constants,
113 1a2be799 Florent Chuffart
           e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
114 1a2be799 Florent Chuffart
['values']['table'] and ['values']['column'] restricts user input
115 1a2be799 Florent Chuffart
  to the values found in the specified column of another table
116 1a2be799 Florent Chuffart
['values']['description'] = 'desc_column'
117 1a2be799 Florent Chuffart
  The optional ['values']['description'] field allows the value(s) displayed
118 1a2be799 Florent Chuffart
  to the user to be different to those in the ['values']['column'] field.
119 1a2be799 Florent Chuffart
  This is useful for giving more meaning to column values. Multiple
120 1a2be799 Florent Chuffart
  descriptions fields are also possible. Check documentation for this.
121 1a2be799 Florent Chuffart
*/
122 1a2be799 Florent Chuffart
123 1a2be799 Florent Chuffart
$opts['fdd']['ID'] = array(
124 1a2be799 Florent Chuffart
  'name'     => 'ID(*)',
125 1a2be799 Florent Chuffart
  'select'   => 'N',
126 1a2be799 Florent Chuffart
  //'options'  => 'LAVCPDR', // auto increment
127 1a2be799 Florent Chuffart
  'maxlen'   => 10,
128 1a2be799 Florent Chuffart
  'default'  => '0',
129 1a2be799 Florent Chuffart
  'sort'     => true
130 1a2be799 Florent Chuffart
);
131 1a2be799 Florent Chuffart
$opts['fdd']['Author'] = array(
132 1a2be799 Florent Chuffart
  'name'     => 'Author(*)',
133 1a2be799 Florent Chuffart
  'select'   => 'D',
134 1a2be799 Florent Chuffart
  'maxlen'   => 25,
135 1a2be799 Florent Chuffart
  'sort'     => true,
136 1a2be799 Florent Chuffart
  'values'   => array(
137 1a2be799 Florent Chuffart
          'table'  => 'lab_members',
138 1a2be799 Florent Chuffart
        'column' => 'id')
139 1a2be799 Florent Chuffart
);
140 1a2be799 Florent Chuffart
$opts['fdd']['Serial_Number'] = array(
141 1a2be799 Florent Chuffart
  'name'     => 'Serial Number(*)',
142 1a2be799 Florent Chuffart
  'select'   => 'T',
143 1a2be799 Florent Chuffart
  //'options'  => 'LAVCPDR', // auto increment
144 1a2be799 Florent Chuffart
  'maxlen'   => 10,
145 1a2be799 Florent Chuffart
  'sqlw'     => 'IF($val_qas = "", NULL, $val_qas)', //to use real NULL instead of empty blanks
146 1a2be799 Florent Chuffart
  'default'  => '',
147 1a2be799 Florent Chuffart
  'sort'     => true
148 1a2be799 Florent Chuffart
);
149 1a2be799 Florent Chuffart
$opts['fdd']['Begin_Date'] = array(
150 1a2be799 Florent Chuffart
  'name'     => 'Begin Date',
151 1a2be799 Florent Chuffart
  'options'  => 'LFAVCPD',
152 1a2be799 Florent Chuffart
  'select'   => 'N',
153 1a2be799 Florent Chuffart
  'maxlen'   => 10,
154 1a2be799 Florent Chuffart
  'sort'     => true,
155 1a2be799 Florent Chuffart
  'default'  => date("Y-m-d", strtotime("now"))
156 1a2be799 Florent Chuffart
);
157 1a2be799 Florent Chuffart
$opts['fdd']['End_Date'] = array(
158 1a2be799 Florent Chuffart
  'name'     => 'End Date',
159 1a2be799 Florent Chuffart
  'options'  => 'LFAVCPD',
160 1a2be799 Florent Chuffart
  'select'   => 'N',
161 1a2be799 Florent Chuffart
  'maxlen'   => 10,
162 1a2be799 Florent Chuffart
  'sort'     => true,
163 1a2be799 Florent Chuffart
  'default'  => ''
164 1a2be799 Florent Chuffart
);
165 1a2be799 Florent Chuffart
166 1a2be799 Florent Chuffart
167 1a2be799 Florent Chuffart
// TRIGGER
168 1a2be799 Florent Chuffart
// Before displaying the view page
169 1a2be799 Florent Chuffart
170 1a2be799 Florent Chuffart
171 d072e29c Florent Chuffart
require("footers.php");
172 d072e29c Florent Chuffart
?>