~quam-plures-core/quam-plures/mass_file_upload

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
/**
 * This is a demo template displaying a form to contact the admin user of the site
 *
 * This template is designed to be used aside of your blog, in case you have a website containing other sections than your blog.
 * This lets you use Quam Plures as a contact form handler outside of your blog per se.
 *
 * Quam Plures - {@link http://quamplures.net/}
 * Released under GNU GPL License - {@link http://quamplures.net/license.html}
 * @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
 * @copyright (c)2003-2009 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @package templates
 */

// The User ID of the administrator:
$recipient_id = 1;

// Tie this to no blog in particular. (Do not include a link to any blog in the emails you will receive).
$blog = 0;

// This is the page where we want to go after sending an email. (This page should be able to display $Messages)
// If empty, we will default to return to the same page, but you could put any URL here.
$redirect_to = '';

/**
 * Check this: we are requiring _main.inc.php INSTEAD of _blog_main.inc.php because we are not
 * trying to initialize any particular blog
 */
require_once dirname(__FILE__).'/qp_config/_config.php';

require_once $inc_path.'_main.inc.php';

load_funcs( 'templates/_template.funcs.php' );

// Are we returning to this page?
param( 'return', 'integer', 0 );

add_js_for_toolbar(); // registers javascripts for the navbar
header_content_type( 'text/html' ); // sets charset
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>">
<head>
<?php
// spark the plugin manager
$Plugins->trigger_event( 'TemplateBeginHtmlHead' );
?>
<title><?php echo T_('Contact Form Demo'); ?></title>
<link rel="stylesheet" href="qp_rsc/css/standalone.css" type="text/css" />
<?php
include_headlines(); // output collected <head> lines
?>
</head>

<body>
<?php
// spark the plugin manager
$Plugins->trigger_event( 'TemplateBeginHtmlBody' );

// --- --- --- --- --- --- --- --- --- --- ---
// --- TOOLBAR INCLUDED HERE ---
template_include( '_toolbar.inc.php' );

echo "\n";
if( is_logged_in() )
{
	echo '<div id="template_wrapper" class="template_wrapper_loggedin">';
}
else
{
	echo '<div id="template_wrapper" class="template_wrapper_anonymous">';
}
echo "\n";
?>

<div class="pageHeader">
<?php
// display the Public Blog List widget
template_widget( array(
	'widget' => 'bloglist',
	'block_start' => '<div class="bloglist">',
	'block_end' => '</div>',
	'block_display_title' => false,
	'list_start' => '',
	'list_end' => '',
	'item_start' => '',
	'item_end' => '',
	'item_selected_start' => '',
	'item_selected_end' => '',
	'link_selected_class' => 'buttons',
	'link_default_class' => 'buttons',
) );
?>
<div class="pageTitle">
<h1 id="pageTitle"><?php echo T_('Contact Form Demo') ?></h1>
</div>

</div>

<div class="pageSubTitle"><?php echo T_('This demo displays a form to contact the site admin.') ?></div>

<div class="main">
<?php
// messages generated from actions
messages( array() );

// ----------------------------- MESSAGE FORM ----------------------------
if( empty( $return ) )
{ // We are *not* coming back after sending a message:
	if( empty( $redirect_to ) )
	{ // We haven't asked for a specific return URL, so we'll come back to here with a param.
		$redirect_to = url_add_param( $ReqURI, 'return=1', '&' );
	}
	// The form, per se:
	require $templates_path.'_msgform.disp.php';
}
else
{ // We are coming back after sending a message:
	echo '<p>'.T_('Thank you for your message. I will reply as soon as possible.').'</p>';
	// This is useful for testing but does not really make sense on production:
	echo '<p><a href="'.regenerate_url().'">'.T_('Send another message?').'</a></p>';
}
?>
</div>

<div class="footer">
This is a demo page for <a href="<?php echo $app_homepage; ?>"><?php echo $app_name; ?></a>.
</div>

</div>
</body>
</html>
<?php $Hit->log(); // log the hit on this page ?>