<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Pengaturan extends CI_Controller {
	public function __construct() {
		parent::__construct();
		cek_login();
        akses('owner');
	}

	public function umum() {
		$conf = [
			'title' => 'Pengaturan Umum'
		];
		
		$this -> layout -> load('layout', 'pengaturan/umum', $conf);
	}

	public function tambahan() {
		$conf = [
			'title' => 'Pengaturan Tambahan'
		];
		
		$this -> layout -> load('layout', 'pengaturan/tambahan', $conf);
	}

	public function update() {
		$conf = [
			'title' => 'Pengaturan Update'
		];
		
		$this -> layout -> load('layout', 'pengaturan/update', $conf);
	}
	
	public function resetdb1() {
		$tb  = $this -> db -> list_tables();
		$arr = ['tb_admin', 'tb_toko', 'tb_app'];
		$new = array_diff($tb, $arr);

		foreach($new as $v) {
			$this -> db -> truncate($v);
		}

		print_r($new);
	}

}

// Controller Pelanggan
// Kode ini dibuat dan dikembangkan oleh codelingker