westdc-zf1/application/default/controllers/AboutController.php

72 lines
1.9 KiB
PHP
Raw Normal View History

2009-03-06 03:20:46 +00:00
<?php
class AboutController extends Zend_Controller_Action
{
function indexAction()
{
}
function preDispatch()
{
$this->view->config = Zend_Registry::get('config');
$this->messenger=$this->_helper->getHelper('FlashMessenger');
$this->view->messages = $this->messenger->getMessages();
}
function contactAction()
{
$form=new ContactForm();
$this->view->form=$form;
$this->view->addHelperPath('helper','Zend_View_Helper_');
if ($this->_request->isPost()) {
//发送邮件
$formData=$this->_request->getPost();
include_once("bcspamblock.php");
if (bcspamblock_verify() && $form->isValid($formData)) {
$mail=new Zend_Mail('utf-8');
$mail->setFrom($formData['email'],$formData['username']);
$mail->setBodyText($formData['body']);
$mail->setSubject($formData['subject']);
$mail->addTo($this->view->config->supportemail);
$mail->send();
$this->messenger->addMessage('发送成功!');
$this->_redirect('/about/contact');
}
} else {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$user=$auth->getIdentity();
$formData['username']=($user->realname)?$user->realname:$user->username;
$formData['email']=$user->email;
$form->populate($formData);
}
}
}
function termsAction()
{
}
function backgroundAction()
{
}
2012-03-27 13:02:49 +00:00
function legalAction()
{
}
2012-03-27 14:11:22 +00:00
function supportusAction()
{
}
function copyrightAction()
{
}
function linkAction()
{
}
function honorAction()
{
}
function sponsorsAction()
{
}
2012-06-12 12:53:05 +00:00
function publicationAction()
{
$siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk
$sql="select * from mdref mr left join reference r on mr.refid=r.id where ";
}
2009-03-06 03:20:46 +00:00
}