示例#1
0
 public function send_email_html($to, $subject, $html_content)
 {
     $this->SPApiProxy = new SendpulseApi('0ed2c31302827e4aa2350c5046a8a965', 'e3088fce634d31defb76663e233eb307', 'file');
     $email = array('html' => $html_content, 'text' => '', 'subject' => $subject, 'from' => array('name' => MainSiteConfig::get_item('email_from_name'), 'email' => MainSiteConfig::get_item('noreply_email')), 'to' => array(array('name' => '', 'email' => $to)));
     ob_start();
     $this->SPApiProxy->smtpSendMail($email);
     $res = ob_get_clean();
 }
示例#2
0
 public function get_header($title = '', $css = '', $data = [])
 {
     $this->data['css'] = array_unique(explode(',', $css));
     $this->data['title'] = $title ? $title : MainSiteConfig::get_item('site_title');
     if (!empty($data)) {
         $this->data = array_merge($this->data, $data);
     }
     return $this->CI->load->view('/theme/header', $this->data, TRUE);
 }
示例#3
0
 public function add_user($data)
 {
     $active_code = md5(MainSiteConfig::get_item('encryption_key') . $data['email'] . mktime());
     $this->db->insert('account', array('id' => '', 'create_date' => date('Y-m-d H:i:s'), 'email' => strtolower($data['email']), 'password' => md5(MainSiteConfig::get_item('encryption_key') . $data['password']), 'is_active' => 0, 'is_blocked' => 0, 'active_code' => $active_code));
     $user_account = $this->db->get_where('account', array('email' => $data['email']))->row();
     if ($user_account->id) {
         $this->db->insert('profile', array('id' => '', 'user_id' => $user_account->id, 'first_name' => $data['first_name'], 'second_name' => $data['second_name'], 'birthday' => date('Y-m-d H:i:s', strtotime($data['birthday'])), 'sex' => $data['sex'], 'account_type' => $data['account']));
         return array('status' => 'success', 'error' => 'Регистрация завершена!', 'active_code' => $active_code, 'email' => $user_account->email);
     } else {
         return array('status' => 'error', 'error' => 'Регистрация не завершена. Попробуйте позже!');
     }
 }
示例#4
0
 public function login($email, $password)
 {
     $email = strtolower($email);
     $res = $this->CI->db->get_where('account', array('email' => $email, 'password' => md5(MainSiteConfig::get_item('encryption_key') . $password)))->row();
     if ($res->id) {
         if ($res->is_active) {
             $user_info = $this->CI->db->get_where('profile', array('user_id' => $res->id))->row();
             $user_info->email = $res->email;
             $user_info->create_date = $res->create_date;
             $this->user_login($user_info);
             return array('status' => 'success');
         } else {
             return array('status' => 'error', 'error' => 'Аккаунт не активирован. Если вам не пришло письмо с активацией вашего профиля, воспользуйтесь системой восстановления пароля.');
         }
     } else {
         return array('status' => 'error', 'error' => 'Пользователя с такими данными не существует.');
     }
 }
        
        <div class="clearfix"></div>

        
    </div>
    <div class="grid_4">
        <div class=" panel dark_blue_panel">
            <div class="panel_title text_align_center">
                <?php 
echo $user_info->first_name . ' ' . $user_info->second_name;
?>
            </div>
            <div class="panel_content">
                <div class="rigth_panel_avatar">
                    <img src="<?php 
echo $user_info->big_photo ? $user_info->big_photo : MainSiteConfig::get_item('not_avatar_big')[$user_info->sex];
?>
">
                    <a href="<?php 
echo base_url('/profile/edit_avatar');
?>
">Редактировать аватар</a>
                    <a href="<?php 
echo base_url('/profile/profi');
?>
" class="profi">Купить <strong>PROFI</strong></a>
                    <a href="<?php 
echo base_url('/mailbox');
?>
"><i class="fa fa-send"></i> Отправить сообщение</a>
                </div>
示例#6
0
|
|				'ssl_key'    - Path to the private key file
|				'ssl_cert'   - Path to the public key certificate file
|				'ssl_ca'     - Path to the certificate authority file
|				'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
|				'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
|				'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
|	['compress'] Whether or not to use client compression (MySQL only)
|	['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|							- good for ensuring strict SQL while developing
|	['ssl_options']	Used to set various SSL options that can be used when making SSL connections.
|	['failover'] array - A array with 0 or more data for connections if the main should fail.
|	['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| 				NOTE: Disabling this will also effectively disable both
| 				$this->db->last_query() and profiling of DB queries.
| 				When you run a query, with this setting set to TRUE (default),
| 				CodeIgniter will store the SQL statement for debugging purposes.
| 				However, this may cause high memory usage, especially if you run
| 				a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active.  By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array('dsn' => '', 'hostname' => MainSiteConfig::get_item('db_host'), 'username' => MainSiteConfig::get_item('db_user'), 'password' => MainSiteConfig::get_item('db_password'), 'database' => MainSiteConfig::get_item('db_name'), 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => ENVIRONMENT !== 'production', 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE);
示例#7
0
                                    Большая фотография
                                </p>
                                <p>
                                    <img src="<?php 
echo $user_info->big_photo ? $user_info->big_photo : MainSiteConfig::get_item('not_avatar_big')[$user_info->sex];
?>
" id="tmp_avatar_big">
                                </p>
                            </div>
                            <div style="display: inline-block; width: 50%; text-align: center; vertical-align: middle;">
                                <p>
                                    Маленькая фотография
                                </p>
                                <p>
                                    <img style="vertical-align: middle; display: inline-block;" src="<?php 
echo $user_info->small_photo ? $user_info->small_photo : MainSiteConfig::get_item('not_avatar_small')[$user_info->sex];
?>
" id="tmp_avatar_small">
                                </p>
                            </div>
                        </div>
                    </p>
                    <div class="clearfix"></div>
                    <p class="text_align_center">
                        <button class="btn btn_blue" id="save_new_avatar"><i class=" fa fa-save"></i> Сохранить новую фотографию</button>
                    </p>
                </div>
            </div>
            <div class="clearfix"></div>
            
            
示例#8
0
|	How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
|	Whether to destroy session data associated with the old session ID
|	when auto-regenerating the session ID. When set to FALSE, the data
|	will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = MainSiteConfig::get_item('site_set_session_path');
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix'   = Set a cookie name prefix if you need to avoid collisions
| 'cookie_domain'   = Set to .your-domain.com for site-wide cookies
| 'cookie_path'     = Typically will be a forward slash
| 'cookie_secure'   = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| Note: These settings (with the exception of 'cookie_prefix' and
示例#9
0
 public function try_forgot_2()
 {
     if ($this->userlib->is_logined()) {
         redirect('/profile');
     } else {
         if ($this->input->post('password') && $this->input->post('repassword') && $this->input->post('password') == $this->input->post('repassword')) {
             $email = $this->themelib->getSessionValue('forgot_email');
             if ($email) {
                 $this->db->update('account', array('is_active' => 1, 'active_code' => '', 'password' => md5(MainSiteConfig::get_item('encryption_key') . $this->input->post('password'))), array('email' => $email));
                 $this->session->set_userdata('success', 'Пароль успешно изменен! Авторизуйтесь с помощью нового пароля.');
                 redirect('/account/login');
             } else {
                 $this->session->set_userdata('error', 'Пароль изменить невозможно!');
                 redirect('/account/login');
             }
         } else {
             $this->session->set_userdata('error', 'Пароли не совпадают.');
             redirect('/account/login');
         }
     }
 }
示例#10
0
 public function balance_payment()
 {
     if ($this->input->post('OutSum') && is_numeric($this->input->post('OutSum'))) {
         $this->data['header'] = $this->themelib->get_header('Подтверждение пополнения баланса', 'profile/signin,profile/index', $this->data);
         $this->data['footer'] = $this->themelib->get_footer();
         $this->data['error'] = $this->themelib->getSessionValue('error');
         $this->data['success'] = $this->themelib->getSessionValue('success');
         $mrh_login = $this->data['mrh_login'] = MainSiteConfig::get_robokassa_item('merchant_id');
         $mrh_pass1 = $this->data['mrh_pass1'] = MainSiteConfig::get_robokassa_item('test_password_1');
         $inv_id = $this->data['inv_id'] = $this->data['user_info']->user_id;
         $out_summ = $this->data['out_summ'] = $this->input->post('OutSum');
         $shp_item = $this->data['shp_item'] = $this->data['user_info']->user_id . "_" . mktime();
         $this->data['culture'] = "ru";
         $this->data['encoding'] = "utf-8";
         $this->data['email'] = $this->data['user_info']->email;
         $this->data['inv_desc'] = "Пополнение баланса в сервисе " . MainSiteConfig::get_item('site_title');
         $this->data['crc'] = md5("{$mrh_login}:{$out_summ}:{$inv_id}:{$mrh_pass1}:Shp_item={$shp_item}");
         $this->load->view('/profile/balance_payment', $this->data);
     } else {
         $this->session->set_userdata('error', 'Заполните сумму пополнения верно.');
         redirect('/profile/balance_add');
     }
 }