HEX
Server: Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 mod_fcgid/2.3.9 PHP/5.4.16
System: Linux dvm.vladweb.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: region-gk.ru (1016)
PHP: 7.3.33
Disabled: NONE
Upload Files
File: /home/temp/yarusvl.ru/adminx/core/SettingsNotifyAdmin.php
<?php

require_once('api/Mgc.php');

class SettingsNotifyAdmin extends Mgc {

    /*Настройки уведомлений*/
    public function fetch() {
        if($this->request->method('POST')) {
            $this->settings->order_email = $this->request->post('order_email');
            $this->settings->comment_email = $this->request->post('comment_email');
            $this->settings->notify_from_email = $this->request->post('notify_from_email');
            $this->settings->update('notify_from_name', $this->request->post('notify_from_name'));
            $this->settings->email_lang = $this->request->post('email_lang');
            $this->settings->auto_approved = $this->request->post('auto_approved');
            /*reviews*/
                  $this->settings->review_email = $this->request->post('review_email');
                  /*/reviews*/

            $this->settings->use_smtp = $this->request->post('use_smtp');
            $this->settings->smtp_server = $this->request->post('smtp_server');
            $this->settings->smtp_port = $this->request->post('smtp_port');
            $this->settings->smtp_user = $this->request->post('smtp_user');
            $this->settings->smtp_pass = $this->request->post('smtp_pass');
            $this->design->assign('message_success', 'saved');
        }

        $btr_languages = array();
        foreach ($this->languages->lang_list() as $label=>$l) {
            if (file_exists($this->config->xbackend."/lang/".$label.".php")) {
                $btr_languages[$l->name] = $l->label;
            }
        }

        $this->design->assign('btr_languages', $btr_languages);
        return $this->design->fetch('settings_notify.tpl');
    }

}