Exemplo n.º 1
0
 function updateconfig()
 {
     $sitetitle = $this->input->post('sitetitle');
     optionSet('site_title', $sitetitle, 0, "text");
     $sitedesc = $this->input->post('sitedescription');
     optionSet('site_description', $sitedesc, 0, "text");
     $komen = valCheckbox($this->input->post('komen'));
     optionSet('site_comment', $komen, 0, "option");
     $komenmoderator = valCheckbox($this->input->post('komenmoderator'));
     optionSet('site_comment_moderator', $komenmoderator, 0, "option");
     $fpPost = $this->input->post('frontpagepost');
     $state = "";
     if ($fpPost) {
         $state = "post";
     } else {
         $state = "page";
         $pagefront = $this->input->post('pagefont');
         optionSet('site_frontpage_page', $pagefront, 0, "text");
     }
     optionSet('site_frontpage', $state, 0, "text");
     $searchengine = valCheckbox($this->input->post('searchengine'));
     optionSet('site_searchengine', $searchengine, 0, "option");
     $bruceforce = valCheckbox($this->input->post('bruceforce'));
     optionSet('service_login_bruceforce', $bruceforce, 1, "text");
     $bruceforcelimit = $this->input->post('bruceforcelimit');
     optionSet('service_login_bruceforce_limit', $bruceforcelimit, 1, "text");
     $bruceforcedirect = $this->input->post('bruceforcedirect');
     optionSet('service_login_bruceforce_direct', $bruceforcedirect, 1, "text");
     $this->savecaptcha();
     redirect(base_url(roleURIUser() . 'config/konfigurasi'), 'refresh');
 }
Exemplo n.º 2
0
 function editapply()
 {
     $this->m_security->filterPost('postid', 'required');
     $this->m_security->filterPost('title', 'required');
     $this->m_security->filterPost('konten', 'required');
     $this->m_security->filterPost('tipepost', 'required');
     $this->m_security->filterPost('statpublish', 'required');
     $this->m_security->filterPost('tanggal', 'required');
     if ($this->m_security->startPost() == TRUE) {
         $postid = $this->input->post('postid');
         $judul = $this->input->post('title');
         $konten = $this->input->post('konten');
         $tipe = $this->input->post('tipepost');
         $status = $this->input->post('statpublish');
         $tags = json_decode($this->input->post('tagsdata'), TRUE);
         $tanggal = $this->input->post('tanggal');
         $datetime = $tanggal . " " . date("H:i:s");
         $keyword = $this->input->post('addkeyword');
         $tampilan = $this->input->post('tampilan');
         $komen = valCheckbox($this->input->post('komen'));
         $proses = FALSE;
         $this->load->model('post_model', 'pm');
         if ($tipe == "post") {
             $kategori = $this->input->post('kat');
             $featureimage = $this->input->post('featureimage');
             $proses = $this->pm->editPost($postid, $judul, $datetime, $konten, $status, $kategori, $tags, $keyword, $komen, $tampilan, $featureimage);
         } elseif ($tipe == "page") {
             $proses = $this->pm->editPage($postid, $judul, $datetime, $konten, $status, $tags, $keyword, $komen, $tampilan);
         }
         if ($proses['status'] == TRUE) {
             $this->session->set_flashdata('info', '<div class="alert alert-info">Berhasil mengubah halaman</div>');
             redirect(base_url(roleURIUser() . 'content/pages/edit') . '?id=' . $postid, 'refresh');
         } else {
             redirect(base_url(roleURIUser() . 'content/pages/add'), 'refresh');
         }
     } else {
         redirect(base_url(roleURIUser() . 'content/pages/add'), 'refresh');
     }
 }