103 lines
3.1 KiB
PHTML
103 lines
3.1 KiB
PHTML
<?php
|
|
$this->headTitle($this->config->title->site);
|
|
$this->headTitle($this->config->title->author);
|
|
$this->headTitle()->setSeparator(' - ');
|
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
|
$this->headLink()->appendStylesheet('/css/author.css');
|
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
$this->breadcrumb('<a href="/author">数据作者</a>');
|
|
$this->breadcrumb('<a href="/author/accept">我的数据</a>');
|
|
$this->breadcrumb('邮件通知');
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
?>
|
|
<!-- 左侧导航 -->
|
|
<div id='sidebar'>
|
|
<div id='leftnavi'>
|
|
<?= $this->partial('author/navi.phtml'); ?>
|
|
</div>
|
|
</div>
|
|
<!-- //左侧导航 -->
|
|
|
|
<!-- 页面内容 -->
|
|
<div id="wapper">
|
|
<?php
|
|
if(!empty($this->error))
|
|
{
|
|
echo $this->error;
|
|
}
|
|
?>
|
|
<?php
|
|
if(!empty($this->metadata))
|
|
{
|
|
?>
|
|
<h2><?= $this->metadata['title'] ?></h2>
|
|
<?php
|
|
}
|
|
if(!empty($this->mailinfo))
|
|
{
|
|
?>
|
|
共统计到可发送的电子邮件地址:<?= $this->mailinfo?>
|
|
<form id="mailform">
|
|
<p>
|
|
<label>邮件标题</label><br />
|
|
<input type="text" id="title" name="title" class="half" />
|
|
</p>
|
|
<p>
|
|
<label>邮件内容</label><br />
|
|
<textarea name="body" id="body" class="half large"></textarea>
|
|
</p>
|
|
<p>
|
|
<input type="hidden" name="uuid" value="<?= $this->metadata['uuid']?>" />
|
|
<button type="button" class="btn btn-green" id="send_btn" onclick="sendmail()">发送邮件</button>
|
|
</p>
|
|
<p>
|
|
<iframe id="process" style="border:none;width:500px;height:300px;font-size:12px;" src=""></iframe>
|
|
</p>
|
|
</form>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
<!-- //页面内容 -->
|
|
<script>
|
|
$('#wapper').width($('body').width()-300);
|
|
function sendmail(){
|
|
if($('#process').attr("src") != "")
|
|
{
|
|
Alert("您已经发送过邮件,如果页面没有反应请继续等待服务器响应");return false;
|
|
}
|
|
if($("#title").val() == "")
|
|
{
|
|
Alert("请填写邮件标题");return false;
|
|
}
|
|
if($("#body").val() == "")
|
|
{
|
|
Alert("请填写邮件内容");return false;
|
|
}
|
|
if($("#body").val().length <= 20 )
|
|
{
|
|
Alert("邮件内容过短,请重新填写");return false;
|
|
}
|
|
if(confirm("是否确定发送邮件")==false)
|
|
{
|
|
return false;
|
|
}
|
|
$('#process').attr("src","/author/sendmail/?ac=send&"+$('#mailform').serialize());
|
|
}
|
|
$('#send_btn').ajaxComplete(function() {
|
|
$('#send_btn').html('发送邮件');
|
|
});
|
|
$('#send_btn').ajaxSend(function() {
|
|
$('#send_btn').html('<img src="/images/ajax-load-small.gif" />正在处理...');
|
|
});
|
|
$("#send_btn").ajaxError(function() {
|
|
$('#send_btn').html('发送邮件');
|
|
Alert('处理中出现问题,请重试');
|
|
});
|
|
function Alert(html){
|
|
$.colorbox({'innerWidth':'50%','html':'<h4>'+html+'</h4>'});
|
|
}
|
|
function isObject(obj){if(typeof(obj)=='object'){return true;}else if(typeof(obj)!='object'){return false;}else{return false;}}
|
|
</script>
|