</div>    
  </form>
  
  </div>
		</div>
	  </div>
	</div>
	
	
<?php 
if (empty($sidErr) && empty($websiteErr) && empty($mpErr) && !empty($sid) && !empty($website) && !empty($mp) && empty($widgetErr) && !empty($widget2) && !empty($pubid) && empty($pubidErr) && $submit === "update") {
    $piwik = 2;
    $cache = true;
    $abtest = false;
    $allowedParameters = array();
    $crud = new crud();
    $crud->update($pubid, $name, $website, $piwik, $cache, $allowedParameters, $abtest, $mp, $widget2);
} else {
    if (empty($sidErr) && !empty($sid) && !empty($pubid) && empty($pubidErr) && $submit === "delete") {
        $crud = new crud();
        $crud->delete($sid, $pubid);
    }
}
?>



</body>
</html>
l
 public function user_hapus()
 {
     if (akses::aksesLogin() == TRUE or akses::aksesUser() == TRUE) {
         $id = $this->encrypt->decode_url($_GET['id']);
         crud::delete('tbl_user', 'username', $id);
         $this->session->set_flashdata('pengaturan', '<div class="alert alert-success">Username : <b>' . $id . '</b>, berhasil dihapus !!</div>');
         redirect('page=pengaturan&act=user_list');
     } else {
         $this->session->set_flashdata('login', '<div class="alert alert-danger">Maaf, anda session habis. Silahkan login ulang.</div>');
         redirect(site_url());
     }
 }
 public function menu_hapus()
 {
     //        if (akses::aksesLogin() == TRUE OR akses::aksesUser() == TRUE) {
     $id = $this->encrypt->decode_url($_GET['id']);
     crud::delete('tbl_menu', 'id_menu', $id);
     redirect('page=menu&act=menu_list');
     //        } else {
     //            $this->session->set_flashdata('login', '<div class="alert alert-danger">Maaf, anda session habis. Silahkan login ulang.</div>');
     //            redirect(site_url());
     //        }
 }
 public function deleteOpcao()
 {
     parent::setTabela('sebraeprev_enquete_opcoes');
     $resultado = parent::delete("id_enquete = '{$this->id_enquete}'");
     return $resultado;
 }
Beispiel #5
0
* berikut adalah cara untuk melakukan execute pada function2nya
======== insert ==========
$data = array( 'nim' => "061250259", 
             'nm_mhs' => "Syafi'i", 
              'alamat' => "jalan ulujami Raya Gg.pancoran", 
             'tanggal' => "2011-03-09"
             );

echo $db->insert($tabel, $data);
* 
========update==========
* $updateField = array('nm_mhs' => "fitriyana1",
                'alamat' => "fadly");

$where = "nim = '061250256'";

echo $db->update("mahasiswa", $updateField, $where);
* 
* 
========select===========

$field = "*";
$where = "nim = '061250256'";
$db->select($tabel, $field, $where);
$hasil = $db->getResult();

echo $hasil;
*/
$where = array("nim" => "061250256");
echo $db->delete($tabel, $where);