Beispiel #1
0
 private function createAdmin($user, $pass, $name, $email, $phone)
 {
     $dRole = array('role_id' => '1', 'role_name' => 'Administrator', 'role_key' => 'mimin', 'role_module' => 'backend/mimin/dashboard');
     $this->CI->m_database->addRow('userrole', $dRole);
     $dbpass = $this->CI->m_security->createPassword($pass);
     $dUser = array('user_id' => '3', 'username' => $user, 'password' => $dbpass, 'nama' => $name, 'user_email' => $email, 'hp' => $phone, 'status' => 'active');
     $this->CI->m_database->addRow('userlogin', $dUser);
     $IDuser = $this->CI->m_database->lastInsertID();
     $dTaxo = array('user_id' => $IDuser, 'taxo_key' => 'role_user', 'taxo_val' => '1');
     $this->CI->m_database->addRow('usertaxonomy', $dTaxo);
     optionSet('company_email', $email);
     optionSet('company_name', $name);
     optionSet('company_phone', $phone);
     optionSet('company_fax', '');
     optionSet('app_name', 'Minang Igniter');
     optionSet('app_basename', 'MinangCI');
     optionSet('app_version', '1.0');
     optionSet('email_register_subject', 'Registrasi Email');
     optionSet('email_register_message', 'Terima Kasih telah mendaftar pada website kami. Berikut login detail anda');
     optionSet('email_recovery_subject', 'Permintaan Reset Password');
     optionSet('email_recovery_message', 'Anda telah meminta untuk me-reset password anda. Silahkan klik tautan di bawah ini');
     optionSet('service_login_captcha', '1');
     optionSet('service_login_bruceforce', '0');
     optionSet('captcha_savepath', '');
     optionSet('captcha_type', 'simple');
     optionSet('captcha_data', '');
     optionSet('cookie_app', 'minangci');
     optionSet('encrypt_app', md5('minangci'));
     optionSet('app_register', '0');
     optionSet('theme_backend', 'gentella');
     optionSet('theme_front', '');
     optionSet('site_offline', '0');
 }
Beispiel #2
0
 private function savecaptcha()
 {
     $jdata = $this->input->post('json');
     $json = '';
     foreach ($jdata as $key => $val) {
         $json .= '"' . $key . '":"' . $val . '",';
     }
     $hjson = substr($json, 0, -1);
     $datajson = "{" . $hjson . "}";
     $service = $this->input->post('service');
     $tipe = $this->input->post('tipe');
     $savepath = $this->input->post('savepath');
     $optService = '';
     if ($service == "on") {
         $optService = "1";
     } else {
         $optService = "0";
     }
     optionSet('captcha_enable', $optService);
     if ($optService == "1") {
         optionSet('captcha_savepath', $savepath);
         optionSet('captcha_type', $tipe);
         optionSet('captcha_data', $datajson);
     } else {
         optionSet('captcha_savepath', "");
         optionSet('captcha_type', "");
         optionSet('captcha_data', "");
     }
 }
Beispiel #3
0
 function insertFirst()
 {
     optionSet('google', '', 1, 'text');
     optionSet('bing', '', 1, 'text');
     optionSet('alexa', '', 1, 'text');
     optionSet('ogfacebook', '1', 1, 'text');
 }
Beispiel #4
0
 function savecaptcha()
 {
     $jdata = $_POST['json'];
     $json = '';
     foreach ($jdata as $key => $val) {
         $json .= '"' . $key . '":"' . $val . '",';
     }
     $hjson = substr($json, 0, -1);
     $datajson = "{" . $hjson . "}";
     $service = $this->input->post('service');
     $tipe = $this->input->post('tipe');
     $savepath = $this->input->post('savepath');
     $optService = '';
     if ($service == "on") {
         $optService = "1";
     } else {
         $optService = "0";
     }
     optionSet('captcha_enable', $optService);
     if ($optService == "1") {
         optionSet('captcha_savepath', $savepath);
         optionSet('captcha_type', $tipe);
         optionSet('captcha_data', $datajson);
     } else {
         optionSet('captcha_savepath', "");
         optionSet('captcha_type', "");
         optionSet('captcha_data', "");
     }
     redirect(base_url(roleUser() . '/captcha'), 'refresh');
 }
Beispiel #5
0
 function updateapply()
 {
     $logo = $this->input->post('logo');
     $favicon = $this->input->post('favicon');
     optionSet('site_logo', $logo, 0, "text");
     optionSet('site_favicon', $favicon, 0, "text");
     redirect(base_url(roleURIUser() . 'style/logo'), 'refresh');
 }
Beispiel #6
0
 private function setSession()
 {
     $dbrole = optionGet('session_role');
     $dbuser = optionGet('session_user');
     if (empty($dbrole)) {
         optionSet('session_role', 'minang_role_session');
         $this->ses_role = 'minang_role_session';
     } else {
         $this->ses_role = $dbrole;
     }
     if (empty($dbuser)) {
         optionSet('session_user', 'minang_user_session');
         $this->ses_user = '******';
     } else {
         $this->ses_user = $dbuser;
     }
 }
Beispiel #7
0
 function updateconfig()
 {
     $common = $this->input->post('common');
     optionSet('site_permalink', $common, 1, "text");
     $catbase = $this->input->post('catbase');
     optionSet('permalink_category', $catbase, 1, "text");
     $tagbase = $this->input->post('tagbase');
     optionSet('permalink_tags', $tagbase, 1, "text");
     $format = '';
     $module = '';
     if ($common == "dayname") {
         $format = "(:num)/(:num)/(:num)/(:any)";
         $module = "\$1/\$2/\$3/\$4";
     } elseif ($common == "monthname") {
         $format = "(:num)/(:num)/(:any)";
         $module = "\$1/\$2/\$3";
     } elseif ($common == "title") {
         $format = "(:any)";
         $module = "\$1";
     } else {
         $format = "";
     }
     $s = array('route_name' => 'post');
     $d = array();
     if ($this->m_database->isBOF('route', $s) == TRUE) {
         if (!empty($format)) {
             $d = array('route_name' => 'post', 'route_key' => $format, 'route_val' => 'frontend/homepage/index/' . $module);
             $this->m_database->addRow('route', $d);
         } else {
             $this->m_database->deleteRow('route', $s);
         }
     } else {
         if (!empty($format)) {
             $d = array('route_key' => $format, 'route_val' => 'frontend/homepage/index/' . $module);
             $this->m_database->editRow('route', $d, $s);
         } else {
             $this->m_database->deleteRow('route', $s);
         }
     }
     $this->catPermalink($catbase);
     $this->tagPermalink($tagbase);
     redirect(base_url(roleURIUser() . 'config/permalink'), 'refresh');
 }
Beispiel #8
0
 function active()
 {
     $v = $this->input->get('v');
     optionSet('theme_front', $v, '1', 'text');
     redirect(base_url(roleURIUser() . 'style/templates'), 'refresh');
 }