* display the debug info directly.

* add tips.
 * add title and position.
This commit is contained in:
wangchunsheng
2013-05-05 02:24:36 +00:00
parent 63ae1adcfa
commit ab4520283d
2 changed files with 22 additions and 5 deletions

View File

@@ -144,11 +144,18 @@ class mail extends control
if($_POST)
{
$this->mail->send($this->post->to, $this->lang->mail->subject, $this->lang->mail->content,"", true);
if($this->mail->isError()) die(js::error($this->mail->getError()));
if($this->mail->isError())
{
$this->view->error = $this->mail->getError();
die($this->display());
}
die(js::alert($this->lang->mail->successSended));
}
$this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->orderBy('account')->fetchPairs();
$this->view->title = $this->lang->mail->test;
$this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
$this->view->position[] = $this->lang->mail->test;
$this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->orderBy('account')->fetchPairs();
$this->display();
}
}

View File

@@ -9,11 +9,20 @@
* @version $Id$
* @link http://www.zentao.net
*/
include '../../common/view/header.html.php';
if(isset($error))
{
include '../../common/view/header.lite.html.php';
die("<br />" . str_replace('\n', "<br />", join('', $error)));
}
?>
<form method='post' target='hiddenwin'>
<?php include '../../common/view/header.html.php';?>
<form method='post' target='resultWin'>
<table class='table-4' align='center'>
<caption><?php echo $lang->mail->test; ?></caption>
<caption>
<div class='f-left'> <?php echo $lang->mail->test;?></div>
<div class='f-right'><?php echo $lang->mail->sendmailTips;?></div>
</caption>
<tr>
<td class='a-center'>
<?php
@@ -25,4 +34,5 @@ include '../../common/view/header.html.php';
</tr>
</table>
</form>
<table class='table-4 bd-none' align='center'><tr><td><iframe id='resultWin'></iframe></td></tr></table>
<?php include '../../common/view/footer.html.php';?>