Esempio n. 1
0
 public function __construct()
 {
     $model = SettingsModel::model()->where("`id`='1'")->findRow();
     $this->smtpServer = $model->smtp;
     $this->port = $model->port;
     $this->username = $model->username;
     $this->password = $model->password;
     $this->from = $model->username;
 }
Esempio n. 2
0
 public function actionSettings()
 {
     $model = SettingsModel::model()->where("`id`='1'")->findRow();
     if (isset($_POST['Settings'])) {
         $model->setAttrs($_POST['Settings']);
         $model->save();
     }
     $this->view("admin/settings", array("model" => $model), false);
 }