本帖最后由 autoit 于 2010-01-18 22:35 编辑
版主不处理垃圾ID, 所以不在分享了。。。此有问题不在任何回复。谢谢理解。 bye.
2010-1-14日更新php代码:- require_once( "./include/common.inc.php" );
- 替换为:
- define('BINDDOMAIN', 'logging');
- require_once( "./include/common.inc.php" );
复制代码 这个是避免论坛关闭状态下不能打开的问题.
注意:此修正未更新下面附件!!!
2009-12-12日更新下面一句代码:- showmessage("已成功向本站管理员发出信息,我们会尽快回覆,谢谢!",dreferer());
复制代码 如果你下的早,请自己更新这个. 1.建立contact.htm,上传到templates/default/,里面代码为:- {template header}
- <!--{if empty($infloat)}-->
- <div id="nav"><a href="$indexname">$bbname</a> $navigation</div>
- <div id="wrap" class="wrap s_clear">
- <div class="main"><div class="content nofloat">
- <!--{/if}-->
- <div class="fcontent" id="main_messaqge">
- <div id="layer_reg" class="postbox s_clear">
- <h3 class="float_ctrl">
- <em id="returnmessage4">联系我们</em>
- <span>
- <!--{if !empty($infloat)}--><a href="javascript:;" class="float_close" onclick="hideWindow('contact')" title="{lang close}">{lang close}</a><!--{/if}-->
- </span>
- </h3>
- 请准确填写你的Email已便我们回覆。<br>
- 如你需提问的问题只是一些论坛使用问题,请在论坛上发问。<br><br>
- <form action="contact.php" method=post onSubmit="return validate(this)">
- <label><em>昵称:</em> <!--{if $discuz_uid}--> $discuz_userss<!--{else}--> <input type="text" id="username" name="username" size="25" maxlength="15" value="" tabindex="1" class="txt" /><!--{/if}--></label><br>
- <label><em>邮箱:</em> <!--{if $discuz_uid}-->$email<!--{else}--><input type="text" name="email" size="25" id="email" tabindex="2" class="txt" /><!--{/if}--></label><br>
- <!-- <label><em>你的IP地址:</em> $onlineip</label> -->
- <label><em>标题:</em> <input type="text" id="sub" name="sub" tabindex="3" class="txt" size="40"></label><br>
- <label><em>内容:</em> <textarea name="detail" rows="8" cols="60" tabindex="4"></textarea></label><br><br>
- <input type="hidden" name="send" value="sendmail"><input type="submit" value="确定发送" name="smail" tabindex="5">
- </form>
- </div>
- </div>
- <!--{if empty($infloat)}-->
- </div></div>
- </div>
- <!--{/if}-->
- {template footer}
复制代码 2.建立contact.php,上传到论坛跟目录,里面代码为:- <?php
- define('BINDDOMAIN', 'logging');
- require_once( "./include/common.inc.php" );
- $submix = 2;
- $submax = 20;
- $detailmix = 10;
- $detailmax = 1000;
- $name = $discuz_uid ? $discuz_user: $username;
- $timestamp = time();
- $date=date('Y年m月d日 H:i:s',$timestamp);
- $text="發出時間:$date \n";
- $text.="用戶名稱: $name \n";
- $text.="用戶IP: $onlineip \n";
- $text.="回覆電郵: $email \n";
- $text.="相關內容: $detail \n";
- $subject="xmegret.cn - $sub";
- if($send=="sendmail") {
- if(!strstr($email, '@') || $email != addslashes($email) || $email != htmlspecialchars($email)) {
- showmessage('抱歉,Email 格式错误,请返回修改。');
- }
- if(strlen($sub) < $submix || strlen($sub) > $submax ) {
- showmessage('对不起,标题必须 '.$submix.' - '.$submax.' 之间,请返回修改。');
- } elseif(strlen($detail) < $detailmix || strlen($detail) > $detailmax ) {
- showmessage('对不起,内容必须 '.$detailmix.' - '.$detailmax.' 之间,请返回修改。');
- }
- sendmail($adminemail,$subject,$text);
- showmessage("已成功向本站管理员发出信息,我们会尽快回覆,谢谢!",dreferer());
- }
- include template('contact');
- ?>
复制代码 3.templates/default/footer.htm里的 - <a href="mailto:$adminemail">
复制代码 替换为- <a href="contact.php" hidefocus="true" onclick="showWindow('contact', this.href);return false;">
复制代码 然后更新缓存。 |