📄 contactform-simple.php
字号:
<?php/* Copyright Intermesh 2004 Author: Merijn Schering <mschering@intermesh.nl> Version: 1.0 Release date: 08 May 2004 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */require_once('../../../Group-Office.php');require_once($GO_LANGUAGE->get_language_file('cms'));$datepicker = new date_picker();$GO_HEADER['head'] = $datepicker->get_header();$cms_module = $GO_MODULES->get_module('cms');if(isset($_REQUEST['site_id']) && $cms_module){ require_once($cms_module['class_path'].'cms.class.inc'); require_once($cms_module['class_path'].'cms_site.class.inc'); $cms_site = new cms_site($_REQUEST['site_id']);}if(isset($cms_site) && $cms_site){ echo $cms_site->generate_header(); $email_to = $cms_site->site['webmaster'];}else{ $email_to = $GO_CONFIG->webmaster_email; require_once($GO_THEME->theme_path."header.inc");}if ($_SERVER['REQUEST_METHOD'] == 'POST'){ $name_from = smart_stripslashes(trim($_POST['name_from'])); $email_from = smart_stripslashes(trim($_POST['email_from'])); $subject = smart_stripslashes(trim($_POST['subject'])); $mail_body = smart_stripslashes(trim($_POST['mail_body'])); if ($name_from == '' || $email_from == '' || $subject == '' || $mail_body == '') { $feedback = '<p class="Error">'.$error_missing_field.'</p>'; }elseif(!validate_email($email_from)) { $feedback = '<p class="Error">'.$error_email.'</p>'; }else { if(!sendmail($email_to, $email_from, $name_from, $subject, $mail_body)) { $feedback = '<p class="Error">'.$cms_sendmail_error.'</p>'; }else { echo $cms_sendmail_success; require_once($GO_THEME->theme_path."footer.inc"); exit(); } }}?><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" name="register"><input type="hidden" name="site_id" value="<?php echo $_REQUEST['site_id']; ?>" /><?php if (isset($feedback)) echo $feedback; ?><table border="0"><tr><td align="right" nowrap><?php echo $strName; ?>:</td><td><input type="text" name="name_from" size="40" style="width: 400px;" value="<?php if(isset($_POST['name_from'])) echo $_POST['name_from']; ?>" maxlength="50"></td></tr><tr><td align="right" nowrap valign="top"><?php echo $strEmail; ?>:</td><td class="small"><input type="text" name="email_from" style="width: 400px;" value="<?php if(isset($_POST['email_from'])) echo $_POST['email_from']; ?>" maxlength="75"><br /></td></tr><tr><td align="right" nowrap valign="top"><?php echo $cms_subject; ?>:</td><td class="small"><input type="text" name="subject" style="width: 400px;" value="<?php if(isset($_POST['subject'])) echo $_POST['subject']; ?>" maxlength="75"><br /></td></tr><tr><td align="right" nowrap valign="top"><?php echo $cms_message; ?>:</td><td><textarea name="mail_body" style="width: 400px;height: 220px;"><?php if(isset($_POST['mail_body'])) echo $_POST['mail_body']; ?></textarea></td></tr><tr><td colspan="2" align="center"><input type="submit" value="<?php echo $cmdOk; ?>" style="width:100px"; /> <input type="reset" value="<?php echo $cmdReset; ?>" style="width:100px"; /></td></tr></table><?phpif(isset($cms_site) && $cms_site){ $cms_site->generate_footer();}else{ require_once($GO_THEME->theme_path."footer.inc");} ?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -