Source for file tpl_contribute.php
Documentation is available at tpl_contribute.php
* @author Simon Georget <simon@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
echo '<h1>'. _t('comment','contribute_title'). '</h1>'. END_LINE;
echo '<div class="sub-title">'. END_LINE;
include_once('../class/system/class.form.php');
if(isset ($_POST['name'])) {
$subject= $_POST['subject'];
$msg= sprintf(_t('contact','str_error'), _t('contact', 'body'));
$msg= sprintf(_t('contact','str_error'), _t('contact', 'subject'));
$msg= sprintf(_t('contact','email_error'), $email);
$msg= sprintf(_t('contact','str_error'), _t('contact', 'email'));
$msg= sprintf(_t('contact','str_error'), _t('contact', 'name'));
$msg = _t('contact', 'message_sent');
$email_subject = formatText($subject, '2HTML') . ' - '. SITE_NAME;
include_once(themePath('../mail/template.php'));
echo '<h1>'. _t('contact','contact_us'). '</h1>'. END_LINE;
if(isset ($passed)) echo '<div class="'. $class. '">'. $msg. '</div>'. END_LINE;
if(!isset ($passed) || $passed == false) {
$form->startForm('index.php', '#contactform');
$form->textInput('name', _t('contact', 'name'). ' : ', 'shorttextfield', 'labelised', 'title', 100, 30, false, $name, false);
$form->textInput('email', _t('contact', 'email'). ' : ', 'shorttextfield', 'labelised', 'title', 150, 30, false, $email, false);
$form->textInput('subject', _t('contact', 'subject'). ' : ', 'shorttextfield', 'labelised', 'title', 150, 30, false, $subject, false);
$form->textareaInput('body',ucfirst(_t('contact', 'body')) . ' : ',false,'labelised', false, $body, 60, 10);
$form->submitButton(false, _t('btn', 'valid'), true, 'submitbut');
$form->hiddenInput('rub', $_REQUEST['rub']);
if(!$output = $form->getForm()) { die("error: " . $form->error); }
|