Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        module
5
 * @package         Form
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
9
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12
 * @requirements    PHP 5.2.2 and higher
13
 * @version         $Id: view_submission.php 1457 2011-06-25 17:18:50Z Luisehahne $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/form/view_submission.php $
15
 * @lastmodified    $Date: 2011-06-25 19:18:50 +0200 (Sat, 25 Jun 2011) $
16
 * @description     
17
 */
18

    
19
require('../../config.php');
20

    
21
// Include WB admin wrapper script
22
require(WB_PATH.'/modules/admin.php');
23
/*
24
// Get id
25
$submission_id = $admin->checkIDKEY('submission_id', false, 'GET');
26
if (!$submission_id) {
27
 $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
28
}
29
*/
30
// Get submission details
31
$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
32
$submission = $query_content->fetchRow();
33

    
34
// Get the user details of whoever did this submission
35
$query_user = "SELECT username,display_name FROM ".TABLE_PREFIX."users WHERE user_id = '".$submission['submitted_by']."'";
36
$get_user = $database->query($query_user);
37
if($get_user->numRows() != 0) {
38
	$user = $get_user->fetchRow();
39
} else {
40
	$user['display_name'] = 'Unknown';
41
	$user['username'] = 'unknown';
42
}
43

    
44
?>
45
<table cellpadding="0" cellspacing="0" border="0" width="100%">
46
<tr>
47
	<td><?php echo $TEXT['SUBMISSION_ID']; ?>:</td>
48
	<td><?php echo $submission['submission_id']; ?></td>
49
</tr>
50
<tr>
51
	<td><?php echo $TEXT['SUBMITTED']; ?>:</td>
52
	<td><?php echo gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td>
53
</td>
54
<tr>
55
	<td><?php echo $TEXT['USER']; ?>:</td>
56
	<td><?php echo $user['display_name'].' ('.$user['username'].')'; ?></td>
57
</tr>
58
<tr>
59
	<td colspan="2">
60
		<hr />
61
	</td>
62
</tr>
63
<tr>
64
	<td colspan="2">
65
		<?php echo nl2br($submission['body']); ?>
66
	</td>
67
</tr>
68
</table>
69

    
70
<br />
71

    
72
<input type="button" value="<?php echo $TEXT['CLOSE']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 150px; margin-top: 5px;" />
73
<input type="button" value="<?php echo $TEXT['DELETE']; ?>" onclick="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 $admin->getIDKEY($submission_id); ?>');" style="width: 150px; margin-top: 5px;" />
74
<?php
75

    
76
// Print admin footer
77
$admin->print_footer();
78

    
79
?>
(21-21/21)