Revision 1069
Added by Matthias over 15 years ago
modify.php | ||
---|---|---|
31 | 31 |
// Must include code to stop this file being access directly |
32 | 32 |
if(!defined('WB_PATH')) { exit("Cannot access this file directly"); } |
33 | 33 |
|
34 |
//overwrite php.ini on Apache servers for valid SESSION ID Separator |
|
35 |
if(function_exists('ini_set')) { |
|
36 |
ini_set('arg_separator.output', '&'); |
|
37 |
} |
|
38 |
|
|
34 | 39 |
//Delete all form fields with no title |
35 | 40 |
$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE page_id = '$page_id' and section_id = '$section_id' and title=''"); |
36 | 41 |
|
... | ... | |
38 | 43 |
<table cellpadding="0" cellspacing="0" border="0" width="100%"> |
39 | 44 |
<tr> |
40 | 45 |
<td align="left" width="33%"> |
41 |
<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['FIELD']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/add_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>';" style="width: 100%;" /> |
|
46 |
<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['FIELD']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/add_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
|
|
42 | 47 |
</td> |
43 | 48 |
<td align="right" width="33%"> |
44 |
<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/modify_settings.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>';" style="width: 100%;" /> |
|
49 |
<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
|
|
45 | 50 |
</td> |
46 | 51 |
</tr> |
47 | 52 |
</table> |
... | ... | |
61 | 66 |
<?php |
62 | 67 |
while($field = $query_fields->fetchRow()) { |
63 | 68 |
?> |
64 |
<tr class="row_<?php echo $row; ?>" height="20">
|
|
69 |
<tr class="row_<?php echo $row; ?>"> |
|
65 | 70 |
<td width="20" style="padding-left: 5px;"> |
66 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
|
|
71 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
|
|
67 | 72 |
<img src="<?php echo THEME_URL; ?>/images/modify_16.png" border="0" alt="^" /> |
68 | 73 |
</a> |
69 | 74 |
</td> |
70 | 75 |
<td> |
71 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>">
|
|
76 |
<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>">
|
|
72 | 77 |
<?php echo $field['title']; ?> |
73 | 78 |
</a> |
74 | 79 |
</td> |
... | ... | |
109 | 114 |
</td> |
110 | 115 |
<td width="20"> |
111 | 116 |
<?php if($field['position'] != 1) { ?> |
112 |
<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
|
|
117 |
<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
|
|
113 | 118 |
<img src="<?php echo THEME_URL; ?>/images/up_16.png" border="0" alt="^" /> |
114 | 119 |
</a> |
115 | 120 |
<?php } ?> |
116 | 121 |
</td> |
117 | 122 |
<td width="20"> |
118 | 123 |
<?php if($field['position'] != $num_fields) { ?> |
119 |
<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
|
|
124 |
<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
|
|
120 | 125 |
<img src="<?php echo THEME_URL; ?>/images/down_16.png" border="0" alt="v" /> |
121 | 126 |
</a> |
122 | 127 |
<?php } ?> |
123 | 128 |
</td> |
124 | 129 |
<td width="20"> |
125 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_field.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
130 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
126 | 131 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" border="0" alt="X" /> |
127 | 132 |
</a> |
128 | 133 |
</td> |
... | ... | |
160 | 165 |
$row = 'a'; |
161 | 166 |
while($submission = $query_submissions->fetchRow()) { |
162 | 167 |
?> |
163 |
<tr class="row_<?php echo $row; ?>" height="20">
|
|
168 |
<tr class="row_<?php echo $row; ?>"> |
|
164 | 169 |
<td width="20" style="padding-left: 5px;"> |
165 |
<a href="<?php echo WB_URL; ?>/modules/form/view_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>" title="<?php echo $TEXT['OPEN']; ?>"> |
|
170 |
<a href="<?php echo WB_URL; ?>/modules/form/view_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>" title="<?php echo $TEXT['OPEN']; ?>">
|
|
166 | 171 |
<img src="<?php echo THEME_URL; ?>/images/folder_16.png" alt="<?php echo $TEXT['OPEN']; ?>" border="0" /> |
167 | 172 |
</a> |
168 | 173 |
</td> |
169 | 174 |
<td width="237"><?php echo $TEXT['SUBMISSION_ID'].': '.$submission['submission_id']; ?></td> |
170 | 175 |
<td><?php echo $TEXT['SUBMITTED'].': '.gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td> |
171 | 176 |
<td width="20"> |
172 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>§ion_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>"> |
|
177 |
<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
173 | 178 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" border="0" alt="X" /> |
174 | 179 |
</a> |
175 | 180 |
</td> |
... | ... | |
190 | 195 |
} |
191 | 196 |
|
192 | 197 |
?> |
193 |
|
|
194 |
<br /> |
Also available in: Unified diff
Fixed some validiation bugs in core and different modules (Thanks to luisehahne)