Revision 1584
Added by Dietmar over 12 years ago
modify.php | ||
---|---|---|
29 | 29 |
ini_set('arg_separator.output', '&'); |
30 | 30 |
} |
31 | 31 |
|
32 |
// load module language file |
|
33 |
$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php'; |
|
34 |
require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang ); |
|
35 |
|
|
32 | 36 |
include_once(WB_PATH.'/framework/functions.php'); |
33 | 37 |
|
34 | 38 |
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' ) ? '#'.SEC_ANCHOR.$section['section_id'] : '' ); |
... | ... | |
43 | 47 |
} |
44 | 48 |
|
45 | 49 |
?> |
46 |
<table summary="" cellpadding="0" cellspacing="0" border="0" width="916"> |
|
50 |
<table summary="" width="100%" cellpadding="0" cellspacing="0" border="0" width="916">
|
|
47 | 51 |
<tr> |
48 | 52 |
<td align="left" width="33%"> |
49 | 53 |
<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%;" /> |
... | ... | |
68 | 72 |
$num_fields = $query_fields->numRows(); |
69 | 73 |
$row = 'a'; |
70 | 74 |
?> |
71 |
<table summary="" cellpadding="2" cellspacing="0" border="0"> |
|
75 |
<table summary="" width="100%" cellpadding="2" cellspacing="0" border="0">
|
|
72 | 76 |
<thead> |
73 | 77 |
<tr style="background-color: #dddddd; font-weight: bold;"> |
74 | 78 |
<th width="20" style="padding-left: 5px;"> </th> |
... | ... | |
194 | 198 |
$sql .= 'WHERE `section_id` = '.(int)$section_id.' '; |
195 | 199 |
$sql .= 'ORDER BY `submitted_when` ASC '; |
196 | 200 |
*/ |
197 |
$sql = 'SELECT s.*, u.`display_name` '; |
|
201 |
$sql = 'SELECT s.*, u.`display_name`, u.`email` ';
|
|
198 | 202 |
$sql .= 'FROM `'.TABLE_PREFIX.'mod_form_submissions` s '; |
199 | 203 |
$sql .= 'LEFT OUTER JOIN `'.TABLE_PREFIX.'users` u '; |
200 | 204 |
$sql .= 'ON u.`user_id` = s.`submitted_by` '; |
... | ... | |
204 | 208 |
if($query_submissions = $database->query($sql)) { |
205 | 209 |
?> |
206 | 210 |
<!-- submissions --> |
207 |
<table summary="" cellpadding="2" cellspacing="0" border="0" class="" id="frm-ScrollTable" > |
|
211 |
<table summary="" width="100%" cellpadding="2" cellspacing="0" border="0" class="" id="frm-ScrollTable" >
|
|
208 | 212 |
<thead> |
209 | 213 |
<tr style="background-color: #dddddd; font-weight: bold;"> |
210 | 214 |
<th width="23" style="text-align: center;"> </th> |
211 | 215 |
<th width="33" style="text-align: right;"> ID </th> |
212 | 216 |
<th width="250" style="padding-left: 10px;"><?php echo $TEXT['SUBMITTED'] ?></th> |
213 | 217 |
<th width="240" style="padding-left: 10px;"><?php echo $TEXT['USER']; ?></th> |
214 |
<th width="250"> </th>
|
|
218 |
<th width="250"><?php echo $TEXT['EMAIL'].' '.$MOD_FORM['FROM'] ?></th>
|
|
215 | 219 |
<th width="20"> </th> |
216 | 220 |
<th width="20"> </th> |
217 | 221 |
<th width="20"> </th> |
... | ... | |
224 | 228 |
// List submissions |
225 | 229 |
$row = 'a'; |
226 | 230 |
while($submission = $query_submissions->fetchRow(MYSQL_ASSOC)) { |
227 |
$submission['display_name'] = (($submission['display_name']!=null) ? $submission['display_name'] : $TEXT['UNKNOWN']); |
|
231 |
$submission['display_name'] = (($submission['display_name']!=null) ? $submission['display_name'] : ''); |
|
232 |
$sBody = $submission['body']; |
|
233 |
$regex = "/[a-z0-9\-_]?[a-z0-9.\-_]+[a-z0-9\-_]?@[a-z0-9.-]+\.[a-z]{2,}/iU"; |
|
234 |
preg_match ($regex, $sBody, $output); |
|
235 |
$submission['email'] = $output['0']; |
|
228 | 236 |
?> |
229 | 237 |
<tr class="row_<?php echo $row; ?>"> |
230 | 238 |
<td width="20" style="padding-left: 5px;text-align: center;"> |
... | ... | |
235 | 243 |
<td width="30" style="padding-right: 5px;text-align: right;"><?php echo $submission['submission_id']; ?></td> |
236 | 244 |
<td width="250" style="padding-left: 10px;"><?php echo gmdate(DATE_FORMAT.', '.TIME_FORMAT, $submission['submitted_when']+TIMEZONE ); ?></td> |
237 | 245 |
<td width="250" style="padding-left: 10px;"><?php echo $submission['display_name']; ?></td> |
238 |
<td width="240"> </td>
|
|
246 |
<td width="240"><?php echo $submission['email']; ?></td>
|
|
239 | 247 |
<td width="20" style="text-align: center;"> </td> |
240 | 248 |
<td width="20"> </td> |
241 | 249 |
<td width="20" style="text-align: center;"> |
... | ... | |
269 | 277 |
<th width="33" style="text-align: right;"> ID </th> |
270 | 278 |
<th width="250" style="padding-left: 10px;"><?php echo $TEXT['SUBMITTED'] ?></th> |
271 | 279 |
<th width="250" style="padding-left: 10px;"><?php echo $TEXT['USER']; ?></th> |
272 |
<th width="250"> </th>
|
|
280 |
<th width="250"><?php echo $TEXT['EMAIL'].' '.$MOD_FORM['FROM'] ?></th>
|
|
273 | 281 |
<th width="20"> </th> |
274 | 282 |
<th width="20"> </th> |
275 | 283 |
<th width="20"> </th> |
... | ... | |
282 | 290 |
echo $database->get_error().'<br />'; |
283 | 291 |
echo $sql; |
284 | 292 |
} |
285 |
?> |
|
286 |
<script type="text/javascript"> |
|
287 |
var t = new ScrollableTable(document.getElementById('frm-ScrollTable'), 30, 916); |
|
288 |
</script> |
Also available in: Unified diff
! form module, shows email-adress from body tag
- remove scrollable table in overview form module