load->helper(array('array', 'form')); ini_set('display_errors', 0); if (version_compare(PHP_VERSION, '5.3', '>=')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); } else { error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); } } /** * 인스톨 페이지입니다 */ public function index() { if (config_item('install_ip') !== 'all' AND ( config_item('install_ip') === '' OR config_item('install_ip') !== $this->input->ip_address())) { $header = array(); $header['install_step'] = 0; $this->load->view('install/header', $header); $this->load->view('install/step0'); $this->load->view('install/footer'); return; } if ($this->_check_installed()) { alert('이미 데이터베이스에 config 테이블이 존재하여 설치를 진행하지 않습니다'); } redirect('install/step1'); } public function step1() { if (config_item('install_ip') !== 'all' AND ( config_item('install_ip') === '' OR config_item('install_ip') !== $this->input->ip_address())) { $header = array(); $header['install_step'] = 0; $this->load->view('install/header', $header); $this->load->view('install/step0'); $this->load->view('install/footer'); return; } if ($this->_check_installed()) { alert('이미 데이터베이스에 config 테이블이 존재하여 설치를 진행하지 않습니다'); } $header = array(); $header['install_step'] = 1; $this->load->view('install/header', $header); $this->load->view('install/step1'); $this->load->view('install/footer'); } public function step2() { if (config_item('install_ip') !== 'all' AND ( config_item('install_ip') === '' OR config_item('install_ip') !== $this->input->ip_address())) { $header = array(); $header['install_step'] = 0; $this->load->view('install/header', $header); $this->load->view('install/step0'); $this->load->view('install/footer'); return; } if ($this->_check_installed()) { alert('이미 데이터베이스에 config 테이블이 존재하여 설치를 진행하지 않습니다'); } if ( ! $this->input->post('agree')) { alert('약관에 동의하신 후에 설치가 가능합니다', site_url('install')); return; } $view = array(); $header = array(); $message = ''; $install_avaiable = true; $view['title1'] = 'PHP VERSION'; $phpversion = phpversion(); if (version_compare($phpversion, '5.3.0') >= 0) { $view['content1'] = '' . $phpversion . ''; } else { $view['content1'] = '' . $phpversion . ''; $install_avaiable = false; $message .= 'PHP Version 을 5.3.0 이상으로 업그레이드 한 후에 설치가 가능합니다
'; } $view['desc1'] = 'PHP version 5.3.0 or newer is recommended.'; $view['title2'] = 'GD Support'; if (extension_loaded('gd') && function_exists('gd_info')) { $view['content2'] = '지원'; } else { $view['content2'] = '미지원'; $install_avaiable = false; $message .= 'GD Library 를 설치한 후에 Install 이 가능합니다
'; } $view['title3'] = 'XML Support'; $xml_support = extension_loaded('xml'); if ($xml_support) { $view['content3'] = '지원'; } else { $view['content3'] = '미지원'; $install_avaiable = false; $message .= 'XML Library 를 설치한 후에 Install 이 가능합니다
'; } $view['title4'] = 'iconv Support'; $iconv = function_exists('iconv'); if ($iconv) { $view['content4'] = '지원'; } else { $view['content4'] = '미지원'; $install_avaiable = false; $message .= 'Iconv Library 를 설치한 후에 Install 이 가능합니다
'; } $view['title5'] = 'CURL Support'; $curl = function_exists('curl_version'); if ($curl) { $view['content5'] = '지원'; } else { $view['content5'] = '미지원'; $install_avaiable = false; $message .= 'CURL Extension 을 설치한 후에 Install 이 가능합니다
'; } $view['title6'] = 'uploads directory'; $uploads_dir = config_item('uploads_dir'); if (is_dir($uploads_dir) === false) { $install_avaiable = false; $view['content6'] = '루트 디렉토리에 ' . config_item('uploads_dir') . ' 라는 디렉토리가 존재하지 않습니다'; $message .= '루트 디렉토리에서 ' . config_item('uploads_dir') . ' 라는 디렉토리를 생성하시고 그 퍼미션을 707 로 변경해주세요
'; } elseif ( ! (is_readable($uploads_dir) && is_writeable($uploads_dir))) { $install_avaiable = false; $view['content6'] = '' . config_item('uploads_dir') . ' 디렉토리의 퍼미션이 올바르지 않습니다'; $message .= config_item('uploads_dir') . ' 라는 디렉토리의 퍼미션을 707 로 변경해주세요
'; } else { $view['content6'] = ' 정상'; } $view['title7'] = 'cache directory'; $cache_dir = APPPATH . 'cache'; if (is_dir($cache_dir) === false) { $install_avaiable = false; $view['content7'] = 'application 디렉토리에 cache 라는 디렉토리가 존재하지 않습니다'; $message .= 'application/cache 를 생성해주시고 그 퍼미션을 707 로 변경해주세요
'; } elseif ( ! (is_readable($cache_dir) && is_writeable($cache_dir))) { $install_avaiable = false; $view['content7'] = 'application/cache 디렉토리의 퍼미션이 올바르지 않습니다'; $message .= 'application/cache 디렉토리의 퍼미션을 707 로 변경해주세요
'; } else { $view['content7'] = ' 정상'; } $view['title8'] = 'logs directory'; $log_dir = APPPATH . 'logs'; if (is_dir($log_dir) === false) { $install_avaiable = false; $view['content8'] = 'application 디렉토리에 logs 라는 디렉토리가 존재하지 않습니다'; $message .= 'application/logs 를 생성해주시고 그 퍼미션을 707 로 변경해주세요
'; } elseif ( ! (is_readable($log_dir) && is_writeable($log_dir))) { $install_avaiable = false; $view['content8'] = 'application/logs 디렉토리의 퍼미션이 올바르지 않습니다'; $message .= 'application/logs 디렉토리의 퍼미션을 707 로 변경해주세요
'; } else { $view['content8'] = ' 정상'; } $view['title9'] = 'migration_enabled'; $this->config->load('migration'); if (config_item('migration_enabled') === false) { $install_avaiable = false; $view['content9'] = 'config[\'migration_enabled\'] 가 활성화되어있지 않습니다'; $message .= 'application/config/migration.php 안에 config[\'migration_enabled\'] 의 값을 true 로 변경해주세요
'; } else { $view['content9'] = ' 정상'; } $view['install_avaiable'] = $install_avaiable; $view['message'] = $message; $header['install_step'] = 2; $this->load->view('install/header', $header); $this->load->view('install/step2', $view); $this->load->view('install/footer'); } public function step3() { if (config_item('install_ip') !== 'all' AND ( config_item('install_ip') === '' OR config_item('install_ip') !== $this->input->ip_address())) { $header = array(); $header['install_step'] = 0; $this->load->view('install/header', $header); $this->load->view('install/step0'); $this->load->view('install/footer'); return; } if ($this->_check_installed()) { alert('이미 데이터베이스에 config 테이블이 존재하여 설치를 진행하지 않습니다'); } if ( ! $this->input->post('agree')) { alert('약관에 동의하신 후에 설치가 가능합니다', site_url('install')); return; } $view = array(); $header = array(); $message = ''; $install_avaiable = true; $view['title1'] = 'encryption_key'; if (config_item('encryption_key')) { $view['content1'] = '설정완료'; } else { $install_avaiable = false; $view['content1'] = '비어있음'; $message .= 'application/config/config.php 의 $config[\'encryption_key\'] 에 내용을 입력해주세요, 현재 그 값이 비어있습니다. 한번 입력하신 값은 변경하지 말아주세요. 패스워드 암호화에 사용됩니다
'; } $view['title2'] = 'base_url'; if (config_item('base_url')) { $view['content2'] = '설정완료'; } else { $install_avaiable = false; $view['content2'] = '비어있음'; $message .= 'application/config/config.php 의 $config[\'base_url\'] 에 현재 사이트 주소를 입력해주세요, 현재 그 값이 비어있습니다
'; } $view['install_avaiable'] = $install_avaiable; $view['message'] = $message; $header['install_step'] = 3; $this->load->view('install/header', $header); $this->load->view('install/step3', $view); $this->load->view('install/footer'); } public function step4() { if (config_item('install_ip') !== 'all' AND ( config_item('install_ip') === '' OR config_item('install_ip') !== $this->input->ip_address())) { $header = array(); $header['install_step'] = 0; $this->load->view('install/header', $header); $this->load->view('install/step0'); $this->load->view('install/footer'); return; } if ($this->_check_installed()) { alert('이미 데이터베이스에 config 테이블이 존재하여 설치를 진행하지 않습니다'); } if ( ! $this->input->post('agree')) { alert('약관에 동의하신 후에 설치가 가능합니다', site_url('install')); return; } $view = array(); $header = array(); $message = ''; include(APPPATH . 'config/database.php'); $install_avaiable = true; $dbinfo = $db['default']; $view['title2'] = 'username'; if ( ! empty($dbinfo['username'])) { $view['content2'] = '설정완료'; } else { $install_avaiable = false; $view['content2'] = '비어있음'; $message .= 'application/config/database.php 의 $db[\'default\'][\'username\'] 에 데이터베이스 정보를 입력해주세요
'; } $view['title3'] = 'password'; if ( ! empty($dbinfo['password'])) { $view['content3'] = '설정완료'; } else { $install_avaiable = false; $view['content3'] = '비어있음'; $message .= 'application/config/database.php 의 $db[\'default\'][\'password\'] 에 데이터베이스 정보를 입력해주세요
'; } $view['title4'] = 'database'; if ( ! empty($dbinfo['database'])) { $view['content4'] = '설정완료'; } else { $install_avaiable = false; $view['content4'] = '비어있음'; $message .= 'application/config/database.php 의 $db[\'default\'][\'database\'] 에 데이터베이스 정보를 입력해주세요
'; } $view['title5'] = 'db connect'; $view['content5'] = ''; if ($install_avaiable) { $database = $this->load->database($dbinfo, true); $connected = $database->initialize(); if ($connected) { $view['content5'] = '데이터베이스 접속 성공'; } else { $install_avaiable = false; $view['content5'] = '데이터베이스 접속 실패'; $message .= 'application/config/database.php 의 데이터베이스 정보가 올바르게 입력되었는지 확인해주세요
'; } } $view['install_avaiable'] = $install_avaiable; $view['message'] = $message; $header['install_step'] = 4; $this->load->view('install/header', $header); $this->load->view('install/step4', $view); $this->load->view('install/footer'); } public function step5() { if (config_item('install_ip') !== 'all' AND ( config_item('install_ip') === '' OR config_item('install_ip') !== $this->input->ip_address())) { $header = array(); $header['install_step'] = 0; $this->load->view('install/header', $header); $this->load->view('install/step0'); $this->load->view('install/footer'); return; } if ($this->_check_installed()) { alert('이미 데이터베이스에 config 테이블이 존재하여 설치를 진행하지 않습니다'); } if ( ! $this->input->post('agree')) { alert('약관에 동의하신 후에 설치가 가능합니다', site_url('install')); return; } $view = array(); $header = array(); $config = array(); $config['user_password'] = array( 'field' => 'user_password', 'label' => '패스워드', 'rules' => 'trim|required|min_length[4]', ); $config['user_password_re'] = array( 'field' => 'user_password_re', 'label' => '패스워드 확인', 'rules' => 'trim|required|min_length[4]|matches[user_password]', ); $config['user_username'] = array( 'field' => 'user_username', 'label' => '회원명', 'rules' => 'trim|required|min_length[2]|max_length[20]', ); $config['user_email'] = array( 'field' => 'user_email', 'label' => '이메일', 'rules' => 'trim|required|valid_email|max_length[50]', ); $form_validation = ''; if ($this->input->post('user_email')) { $this->load->library('form_validation'); $this->form_validation->set_rules($config); $form_validation = $this->form_validation->run(); } $this->load->database(); if ($form_validation) { if ($this->_create_tables() === false) { alert('설치에 실패하였습니다', site_url('install')); return; } if ($this->_migration_tables() === false) { alert('설치에 실패하였습니다', site_url('install')); return; } $this->_insert_init_data(); redirect(); } else { $header['install_step'] = 5; $this->load->view('install/header', $header); $this->load->view('install/step5', $view); $this->load->view('install/footer'); } } public function _check_installed() { include(APPPATH . 'config/database.php'); $dbinfo = $db['default']; if (empty($dbinfo['username'])) { return false; } if (empty($dbinfo['password'])) { return false; } if (empty($dbinfo['database'])) { return false; } $database = $this->load->database($dbinfo, true); if (empty($database->conn_id)) { return false; } $connected = $database->initialize(); if ($connected) { $this->load->database(); if ($this->db->table_exists('config')) { return true; } } return false; } public function _create_tables() { $this->load->database(); $this->load->dbforge(); // config table $this->dbforge->add_field(array( 'cfg_key' => array( 'type' => 'VARCHAR', 'constraint' => '100', 'default' => '', ), 'cfg_value' => array( 'type' => 'TEXT', 'null' => true, ), )); if ($this->dbforge->create_table('config', true) === false) { return false; } $this->db->query('ALTER TABLE ' . $this->db->dbprefix . 'config ADD UNIQUE KEY `cfg_key` (`cfg_key`)'); // editor_image table $this->dbforge->add_field(array( 'eim_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ), 'user_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'eim_originname' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'eim_filename' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'eim_filesize' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'eim_width' => array( 'type' => 'MEDIUMINT', 'constraint' => 6, 'unsigned' => true, 'default' => '0', ), 'eim_height' => array( 'type' => 'MEDIUMINT', 'constraint' => 6, 'unsigned' => true, 'default' => '0', ), 'eim_type' => array( 'type' => 'VARCHAR', 'constraint' => '10', 'default' => '', ), 'eim_datetime' => array( 'type' => 'DATETIME', 'null' => true, ), 'eim_ip' => array( 'type' => 'VARCHAR', 'constraint' => '50', 'default' => '', ), )); $this->dbforge->add_key('eim_id', true); $this->dbforge->add_key('user_id'); if ($this->dbforge->create_table('editor_image', true) === false) { return false; } // session table $this->dbforge->add_field(array( 'id' => array( 'type' => 'VARCHAR', 'constraint' => '40', 'default' => '', ), 'ip_address' => array( 'type' => 'VARCHAR', 'constraint' => '45', 'default' => '', ), 'timestamp' => array( 'type' => 'INT', 'constraint' => 10, 'default' => '0', ), 'data' => array( 'type' => 'BLOB', ), )); $this->dbforge->add_key('id', true); $this->dbforge->add_key('timestamp'); if ($this->dbforge->create_table('session', true) === false) { return false; } // social table $this->dbforge->add_field(array( 'soc_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ), 'soc_type' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'soc_account_id' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'soc_key' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'soc_value' => array( 'type' => 'TEXT', 'null' => true, ), )); $this->dbforge->add_key('soc_id', true); $this->dbforge->add_key('soc_account_id'); if ($this->dbforge->create_table('social', true) === false) { return false; } // social_meta table $this->dbforge->add_field(array( 'user_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'smt_key' => array( 'type' => 'VARCHAR', 'constraint' => '100', 'default' => '', ), 'smt_value' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), )); $this->dbforge->add_key(array('smt_value')); if ($this->dbforge->create_table('social_meta', true) === false) { return false; } $this->db->query('ALTER TABLE ' . $this->db->dbprefix . 'social_meta ADD UNIQUE KEY `user_id_smt_key` (`user_id`, `smt_key`)'); // upload_file table $this->dbforge->add_field(array( 'ufi_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ), 'origin_table' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'origin_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'user_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'ufi_originname' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'ufi_filename' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'ufi_download' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'ufi_filesize' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'ufi_width' => array( 'type' => 'MEDIUMINT', 'constraint' => 6, 'unsigned' => true, 'default' => '0', ), 'ufi_height' => array( 'type' => 'MEDIUMINT', 'constraint' => 6, 'unsigned' => true, 'default' => '0', ), 'ufi_type' => array( 'type' => 'VARCHAR', 'constraint' => '10', 'default' => '', ), 'ufi_is_image' => array( 'type' => 'TINYINT', 'constraint' => 3, 'unsigned' => true, 'default' => '0', ), 'ufi_datetime' => array( 'type' => 'DATETIME', 'null' => true, ), 'ufi_ip' => array( 'type' => 'VARCHAR', 'constraint' => '50', 'default' => '', ), )); $this->dbforge->add_key('ufi_id', true); if ($this->dbforge->create_table('upload_file', true) === false) { return false; } // user table $this->dbforge->add_field(array( 'user_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ), 'app_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => 0, ), 'user_email' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_password' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_username' => array( 'type' => 'VARCHAR', 'constraint' => '100', 'default' => '', ), 'user_homepage' => array( 'type' => 'TEXT', 'null' => true, ), 'user_phone' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_birthday' => array( 'type' => 'CHAR', 'constraint' => '10', 'default' => '', ), 'user_sex' => array( 'type' => 'TINYINT', 'constraint' => 4, 'unsigned' => true, 'default' => '0', ), 'user_zipcode' => array( 'type' => 'VARCHAR', 'constraint' => '7', 'default' => '', ), 'user_address1' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_address2' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_address3' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_address4' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_receive_email' => array( 'type' => 'TINYINT', 'constraint' => 4, 'unsigned' => true, 'default' => '0', ), 'user_denied' => array( 'type' => 'TINYINT', 'constraint' => 4, 'unsigned' => true, 'default' => '0', ), 'user_email_cert' => array( 'type' => 'TINYINT', 'constraint' => 4, 'unsigned' => true, 'default' => '0', ), 'user_register_datetime' => array( 'type' => 'DATETIME', 'null' => true, ), 'user_register_ip' => array( 'type' => 'VARCHAR', 'constraint' => '50', 'default' => '', ), 'user_lastlogin_datetime' => array( 'type' => 'DATETIME', 'null' => true, ), 'user_lastlogin_ip' => array( 'type' => 'VARCHAR', 'constraint' => '50', 'default' => '', ), 'user_is_admin' => array( 'type' => 'TINYINT', 'constraint' => 4, 'unsigned' => true, 'default' => '0', ), 'user_adminmemo' => array( 'type' => 'TEXT', 'null' => true, ), 'user_icon' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_photo' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'default' => '', ), 'user_token' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'null' => true, ), 'user_fcm_token' => array( 'type' => 'VARCHAR', 'constraint' => '255', 'null' => true, ), )); $this->dbforge->add_key('user_id', true); $this->dbforge->add_key('app_id'); $this->dbforge->add_key('user_email'); $this->dbforge->add_key('user_lastlogin_datetime'); $this->dbforge->add_key('user_register_datetime'); if ($this->dbforge->create_table('user', true) === false) { return false; } // user_auth_email table $this->dbforge->add_field(array( 'uae_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ), 'user_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'uae_key' => array( 'type' => 'VARCHAR', 'constraint' => '100', 'default' => '', ), 'uae_type' => array( 'type' => 'TINYINT', 'constraint' => 4, 'unsigned' => true, 'default' => '0', ), 'uae_generate_datetime' => array( 'type' => 'DATETIME', 'null' => true, ), 'uae_use_datetime' => array( 'type' => 'DATETIME', 'null' => true, ), 'uae_expired' => array( 'type' => 'TINYINT', 'constraint' => 4, 'unsigned' => true, 'default' => '0', ), )); $this->dbforge->add_key('uae_id', true); $this->dbforge->add_key(array('uae_key', 'user_id')); if ($this->dbforge->create_table('user_auth_email', true) === false) { return false; } // user_meta table $this->dbforge->add_field(array( 'user_id' => array( 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'default' => '0', ), 'umt_key' => array( 'type' => 'VARCHAR', 'constraint' => '100', 'default' => '', ), 'umt_value' => array( 'type' => 'TEXT', 'null' => true, ), )); if ($this->dbforge->create_table('user_meta', true) === false) { return false; } $this->db->query('ALTER TABLE ' . $this->db->dbprefix . 'user_meta ADD UNIQUE KEY `user_id_umt_key` (`user_id`, `umt_key`)'); return true; } public function _migration_tables() { $this->load->library('migration'); $this->config->load('migration'); $row = $this->db->get('migrations')->row(); $latest_version = config_item('migration_version'); if ($latest_version && ! $this->migration->version($latest_version)) { return false; } return true; } public function _insert_init_data() { $this->load->library(array('user_agent', 'session')); $this->load->model(array( 'User_model', 'User_meta_model', 'Config_model', )); if ( ! function_exists('password_hash')) { $this->load->helper('password'); } $this->load->driver('cache', config_item('cache_method')); $configdata = array( 'site_title' => '홈페이지', 'admin_logo' => 'Admin', 'webmaster_name' => '관리자', 'webmaster_email' => 'noreply@domain.com', 'spam_word' => '18아,18놈,18새끼,18년,18뇬,18노,18것,18넘,개년,개놈,개뇬,개새,개색끼,개세끼,개세이,개쉐이,개쉑,개쉽,개시키,개자식,개좆,게색기,게색끼,광뇬,뇬,눈깔,뉘미럴,니귀미,니기미,니미,도촬,되질래,뒈져라,뒈진다,디져라,디진다,디질래,병쉰,병신,뻐큐,뻑큐,뽁큐,삐리넷,새꺄,쉬발,쉬밸,쉬팔,쉽알,스패킹,스팽,시벌,시부랄,시부럴,시부리,시불,시브랄,시팍,시팔,시펄,실밸,십8,십쌔,십창,싶알,쌉년,썅놈,쌔끼,쌩쑈,썅,써벌,썩을년,쎄꺄,쎄엑,쓰바,쓰발,쓰벌,쓰팔,씨8,씨댕,씨바,씨발,씨뱅,씨봉알,씨부랄,씨부럴,씨부렁,씨부리,씨불,씨브랄,씨빠,씨빨,씨뽀랄,씨팍,씨팔,씨펄,씹,아가리,아갈이,엄창,접년,잡놈,재랄,저주글,조까,조빠,조쟁이,조지냐,조진다,조질래,존나,존니,좀물,좁년,좃,좆,좇,쥐랄,쥐롤,쥬디,지랄,지럴,지롤,지미랄,쫍빱,凸,퍽큐,뻑큐,빠큐,ㅅㅂㄹㅁ', 'white_iframe' => 'www.youtube.com www.youtube-nocookie.com maps.google.co.kr maps.google.com flvs.daum.net player.vimeo.com sbsplayer.sbs.co.kr serviceapi.rmcnmv.naver.com serviceapi.nmv.naver.com www.mgoon.com videofarm.daum.net player.sbs.co.kr sbsplayer.sbs.co.kr www.tagstory.com play.tagstory.com flvr.pandora.tv', 'site_blacklist_title' => '사이트가 공사중에 있습니다', 'site_blacklist_content' => '

안녕하세요

블편을 드려 죄송합니다. 지금 이 사이트는 접근이 금지되어있습니다

감사합니다

', 'use_popup_auto_url' => '1', 'use_login_account' => 'both', 'password_length' => '4', 'use_user_photo' => '1', 'user_photo_width' => '80', 'user_photo_height' => '80', 'use_user_icon' => '1', 'user_icon_width' => '20', 'user_icon_height' => '20', 'denied_username_list' => 'admin,administrator,관리자,운영자,어드민,주인장,webmaster,웹마스터,sysop,시삽,시샵,manager,매니저,메니저,root,루트,su,guest,방문객', 'change_password_date' => '180', 'max_login_try_count' => '5', 'max_login_try_limit_second' => '30', 'send_email_register_admin_title' => '[회원가입알림] {회원명}님이 회원가입하셨습니다', 'send_email_register_admin_content' => '
{홈페이지명}안녕하세요 관리자님,

안녕하세요,

{회원명} 님이 회원가입 하셨습니다.

회원명 : {회원명}

이메일 : {회원이메일}

가입한 곳 IP : {회원아이피}

감사합니다.

', 'send_email_register_user_title' => '[{홈페이지명}] {회원명}님의 회원가입을 축하드립니다', 'send_email_register_user_content' => '
{홈페이지명}안녕하세요 {회원명}님,
회원가입을 축하드립니다.

안녕하세요 {회원명} 회원님,

회원가입을 축하드립니다.

{홈페이지명} 회원으로 가입해주셔서 감사합니다.

더욱 편리한 서비스를 제공하기 위해 항상 최선을 다하겠습니다.

 

감사합니다.

', 'send_email_register_user_verifytitle' => '[{홈페이지명}] {회원명}님의 회원가입을 축하드립니다', 'send_email_register_user_verifycontent' => '
{홈페이지명}안녕하세요 {회원명}님,
회원가입을 축하드립니다.

안녕하세요 {회원명} 회원님,

회원가입을 축하드립니다.

{홈페이지명} 회원으로 가입해주셔서 감사합니다.

더욱 편리한 서비스를 제공하기 위해 항상 최선을 다하겠습니다.

 

아래 링크를 클릭하시면 회원가입이 완료됩니다.

메일인증 받기

 

감사합니다.

', 'send_email_changepw_admin_title' => '{회원명}님이 패스워드를 변경하셨습니다', 'send_email_changepw_admin_content' => '
{홈페이지명}안녕하세요 관리자님,

안녕하세요,

{회원명} 님이 패스워드를 변경하셨습니다.

회원아이디 : {회원아이디}

회원명 : {회원명}

이메일 : {회원이메일}

변경한 곳 IP : {회원아이피}

감사합니다.

', 'send_email_changepw_user_title' => '[{홈페이지명}] 패스워드가 변경되었습니다', 'send_email_changepw_user_content' => '
{홈페이지명}안녕하세요 {회원명}님,
회원님의 패스워드가 변경되었습니다.

안녕하세요 {회원명} 회원님,

회원님의 패스워드가 변경되었습니다.

변경한 곳 IP : {회원아이피}

더욱 편리한 서비스를 제공하기 위해 항상 최선을 다하겠습니다.

 

감사합니다.

', 'send_email_userleave_admin_title' => '{회원명}님이 회원탈퇴하셨습니다', 'send_email_userleave_admin_content' => '
{홈페이지명}안녕하세요 관리자님,

안녕하세요,

{회원명} 님이 회원탈퇴하셨습니다.

회원아이디 : {회원아이디}

회원명 : {회원명}

이메일 : {회원이메일}

탈퇴한 곳 IP : {회원아이피}

감사합니다.

', 'send_email_userleave_user_title' => '[{홈페이지명}] 회원탈퇴가 완료되었습니다', 'send_email_userleave_user_content' => '
{홈페이지명}안녕하세요 {회원명}님,
회원님의 탈퇴가 처리되었습니다.

안녕하세요 {회원명} 회원님,

그 동안 {홈페이지명} 이용을 해주셔서 감사드립니다

요청하신대로 회원님의 탈퇴가 정상적으로 처리되었습니다.

더욱 편리한 서비스를 제공하기 위해 항상 최선을 다하겠습니다.

 

감사합니다.

', 'send_email_changeemail_user_title' => '[{홈페이지명}] 회원님의 이메일정보가 변경되었습니다', 'send_email_changeemail_user_content' => '
{홈페이지명}안녕하세요 {회원명}님,
회원님의 이메일 주소가 변경되어 알려드립니다.

안녕하세요,

회원님의 이메일 주소가 변경되었으므로 다시 인증을 받아주시기 바랍니다.

 

아래 링크를 클릭하시면 주소변경 인증이 완료됩니다.

메일인증 받기

 

감사합니다.

', 'send_email_findaccount_user_title' => '{회원명}님의 아이디와 패스워드를 보내드립니다', 'send_email_findaccount_user_content' => '
{홈페이지명}안녕하세요 {회원명}님,
회원님의 아이디와 패스워드를 보내드립니다.

안녕하세요,

 

회원님의 아이디는 {회원아이디} 입니다.

아래 링크를 클릭하시면 회원님의 패스워드 변경이 가능합니다.

패스워드 변경하기

 

감사합니다.

', 'send_email_resendverify_user_title' => '{회원명}님의 인증메일이 재발송되었습니다', 'send_email_resendverify_user_content' => '
{홈페이지명}안녕하세요 {회원명}님,
회원님의 인증메일을 다시 보내드립니다..

안녕하세요,

 

아래 링크를 클릭하시면 이메일 인증이 완료됩니다.

메일인증 받기

 

감사합니다.

', ); $registerform = array( 'user_email' => array( 'field_name' => 'user_email', 'func' => 'basic', 'display_name' => '이메일주소', 'field_type' => 'email', 'use' => '1', 'open' => '', 'required' => '1', ), 'user_password' => array( 'field_name' => 'user_password', 'func' => 'basic', 'display_name' => '비밀번호', 'field_type' => 'password', 'use' => '1', 'open' => '', 'required' => '1', ), 'user_username' => array( 'field_name' => 'user_username', 'func' => 'basic', 'display_name' => '이름', 'field_type' => 'text', 'use' => '1', 'open' => '1', 'required' => '1', ), 'user_homepage' => array( 'field_name' => 'user_homepage', 'func' => 'basic', 'display_name' => '홈페이지', 'field_type' => 'url', 'use' => '', 'open' => '1', 'required' => '', ), 'user_phone' => array( 'field_name' => 'user_phone', 'func' => 'basic', 'display_name' => '전화번호', 'field_type' => 'phone', 'use' => '', 'open' => '', 'required' => '', ), 'user_birthday' => array( 'field_name' => 'user_birthday', 'func' => 'basic', 'display_name' => '생년월일', 'field_type' => 'date', 'use' => '', 'open' => '', 'required' => '', ), 'user_sex' => array( 'field_name' => 'user_sex', 'func' => 'basic', 'display_name' => '성별', 'field_type' => 'radio', 'use' => '', 'open' => '', 'required' => '', ), 'user_address' => array( 'field_name' => 'user_address', 'func' => 'basic', 'display_name' => '주소', 'field_type' => 'address', 'use' => '', 'open' => '', 'required' => '', ), ); $configdata['registerform'] = json_encode($registerform); $this->cache->delete('config-model-get'); $this->cache->clean(); $this->Config_model->save($configdata); $hash = password_hash($this->input->post('user_password'), PASSWORD_BCRYPT); $insertdata = array( 'user_email' => $this->input->post('user_email'), 'user_password' => $hash, 'user_username' => $this->input->post('user_username'), 'user_receive_email' => 1, 'user_email_cert' => 1, 'user_register_datetime' => cdate('Y-m-d H:i:s'), 'user_register_ip' => $this->input->ip_address(), 'user_lastlogin_datetime' => cdate('Y-m-d H:i:s'), 'user_lastlogin_ip' => $this->input->ip_address(), 'user_is_admin' => 1, ); $user_id = $this->User_model->insert($insertdata); $usermeta = array( 'meta_change_pw_datetime' => cdate('Y-m-d H:i:s'), 'meta_email_cert_datetime' => cdate('Y-m-d H:i:s'), 'meta_username_datetime' => cdate('Y-m-d H:i:s'), ); $this->User_meta_model->save($user_id, $usermeta); $this->load->library(array('user_agent', 'session')); $this->load->model(array( 'Config_model' )); if ( ! function_exists('password_hash')) { $this->load->helper('password'); } $this->load->driver('cache', config_item('cache_method')); $this->session->set_userdata( 'user_id', $user_id ); } }