diff --git a/www/protected/controllers/SiteController.php b/www/protected/controllers/SiteController.php index de30cfb..9689bfa 100644 --- a/www/protected/controllers/SiteController.php +++ b/www/protected/controllers/SiteController.php @@ -22,25 +22,6 @@ class SiteController extends Controller ); } - /** - * Declares class-based actions. - */ - public function actions() - { - return array( - // captcha action renders the CAPTCHA image displayed on the contact page - 'captcha'=>array( - 'class'=>'CCaptchaAction', - 'backColor'=>0xFFFFFF, - ), - // page action renders "static" pages stored under 'protected/views/site/pages' - // They can be accessed via: index.php?r=site/page&view=FileName - 'page'=>array( - 'class'=>'CViewAction', - ), - ); - } - /** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. @@ -66,32 +47,6 @@ class SiteController extends Controller } } - /** - * Displays the contact page - */ - public function actionContact() - { - $model=new ContactForm; - if(isset($_POST['ContactForm'])) - { - $model->attributes=$_POST['ContactForm']; - if($model->validate()) - { - $name='=?UTF-8?B?'.base64_encode($model->name).'?='; - $subject='=?UTF-8?B?'.base64_encode($model->subject).'?='; - $headers="From: $name <{$model->email}>\r\n". - "Reply-To: {$model->email}\r\n". - "MIME-Version: 1.0\r\n". - "Content-type: text/plain; charset=UTF-8"; - - mail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers); - Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.'); - $this->refresh(); - } - } - $this->render('contact',array('model'=>$model)); - } - /** * Displays the login page */ diff --git a/www/protected/models/ContactForm.php b/www/protected/models/ContactForm.php deleted file mode 100644 index 86541cb..0000000 --- a/www/protected/models/ContactForm.php +++ /dev/null @@ -1,42 +0,0 @@ -!CCaptcha::checkRequirements()), - ); - } - - /** - * Declares customized attribute labels. - * If not declared here, an attribute would have a label that is - * the same as its name with the first letter in upper case. - */ - public function attributeLabels() - { - return array( - 'verifyCode'=>'Verification Code', - ); - } -} \ No newline at end of file