/**
  * @author : Gede Lumbung
  * @web : http://gedelumbung.com
  * @keterangan : Model untuk manajemen user login
  **/
 public function cekUserLogin($data)
 {
     $cek['email'] = mysql_real_escape_string($data['email']);
     $cek['password'] = $data['password'];
     $cek['stts'] = 1;
     $q_cek_login = $this->db->get_where('dlmbg_member', $cek);
     if ($q_cek_login->num_rows() > 0) {
         foreach ($q_cek_login->result() as $qad) {
             $sess_data['logged_in'] = 'yesGetMeLoginBaby';
             $sess_data['nama'] = $qad->nama;
             $sess_data['id_member'] = $qad->id_member;
             $sess_data['email'] = $qad->email;
             $sess_data['alamat'] = $qad->alamat;
             $sess_data['no_telpon'] = $qad->no_telpon;
             $sess_data['no_hp'] = $qad->no_hp;
             $sess_data['jk'] = $qad->jk;
             $sess_data['tgl_bergabung'] = generate_tanggal($qad->tgl_bergabung);
             $sess_data['gambar'] = $qad->gambar;
             $this->session->set_userdata($sess_data);
         }
         redirect("user/dashboard");
     } else {
         $this->session->set_flashdata("result", "Gagal Login. Email dan Password Tidak Cocok....");
         redirect("web/sign_in");
     }
 }
Пример #2
0
 public function generate_menu_kader_cabang($limit, $offset)
 {
     $hasil = "";
     $where['stts'] = 1;
     $w = $this->db->query("select a.nama, a.wan_wati, a.tanggal, a.syahadah, a.id_cabang, b.nama_cabang, a.stts from isa_kader a left join isa_cabang b\n\t\ton a.id_cabang=b.id_cabang order by a.nama ASC\n\t\tLIMIT " . $offset . "," . $limit . "");
     foreach ($w->result() as $h) {
         $hasil .= "<div class='col-md-4'><div class='card radius shadowDepth1'><div class='card__image border-tlr-radius'><img src='" . base_url() . "asset/images/kader/thumb/" . $h->syahadah . "' alt='image' class='border-tlr-radius img-responsive'></div><div class='card__content card__padding'><div class='card__share'><a id='share' class='share-toggle share-icon' href='#'></a></div>\n<div class='card__meta'><time>" . generate_tanggal(gmdate('d/m/Y', $h->tanggal)) . "</time></div><article class='card__article'><h3>" . $h->nama . "</h3><p>PC IMM.{$h->nama_cabang}.</p></article>\n</div><div class='card__action'></div></div></div>";
     }
     return $hasil;
 }
Пример #3
0
 public function home()
 {
     if ($this->session->userdata('logged_in') != "" and $this->session->userdata('status') == "admin") {
         $data = array();
         foreach ($this->db->get('tutorial')->result_array() as $row) {
             $data[] = (int) generate_tanggal($row['date']);
         }
         $this->load->view('backend/_header');
         $this->load->view('backend/_menu');
         $this->load->view('backend/_main', array('data' => $data));
         $this->load->view('backend/_footer');
     } else {
         redirect(base_url());
     }
 }
 /**
  * @author : Gede Lumbung
  * @web : http://gedelumbung.com
  **/
 public function generate_index_pesan_musyda($limit, $offset, $filter = array())
 {
     $hasil = "";
     $query_add = "";
     if (!empty($filter)) {
         if ($filter['nama'] == "") {
             $query_add = "";
         } else {
             $where['nama'] = $filter['nama'];
             $query_add = "where a.nama like '%" . $where['nama'] . "%'";
         }
     }
     $tot_hal = $this->db->get("dlmbg_super_pesan_musyda");
     $config['base_url'] = base_url() . 'superadmin/pesan_musyda/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['next_link'] = 'Next';
     $config['prev_link'] = 'Prev';
     $this->pagination->initialize($config);
     $w = $this->db->order_by("stts", "ASC")->get("dlmbg_super_pesan_musyda", $limit, $offset);
     $hasil .= "<table class='table table-striped table-condensed'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>No.</th>\n\t\t\t\t\t<th>Nama</th>\n\t\t\t\t\t<th>Kontak</th>\n\t\t\t\t\t<th>Pesan</th>\n\t\t\t\t\t<th>Tanggal</th>\n\t\t\t\t\t<th>Status</th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>";
     $i = $offset + 1;
     foreach ($w->result() as $h) {
         $st = "<span class='label label-important'>Moderation</span>";
         if ($h->stts == 1) {
             $st = "<span class='label label-success'>Approve</span>";
         }
         $hasil .= "<tr>\n\t\t\t\t\t<td>" . $i . "</td>\n\t\t\t\t\t<td>" . $h->nama . "</td>\n\t\t\t\t\t<td>" . $h->kontak . "</td>\n\t\t\t\t\t<td>" . strip_tags($h->pesan) . "</td>\n\t\t\t\t\t<td>" . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . " WIB</td>\n\t\t\t\t\t<td>" . $st . "</td>\n\t\t\t\t\t<td>";
         $hasil .= "";
         if ($h->stts == 1) {
             $hasil .= "<a href='" . base_url() . "superadmin/pesan_musyda/approve/" . $h->id_super_pesan_musyda . "/0' class='btn btn-small'><i class='icon-remove'></i></a>";
         } else {
             $hasil .= "<a href='" . base_url() . "superadmin/pesan_musyda/approve/" . $h->id_super_pesan_musyda . "/1' class='btn btn-small'><i class='icon-ok'></i></a>";
         }
         $hasil .= "<a href='" . base_url() . "superadmin/pesan_musyda/hapus/" . $h->id_super_pesan_musyda . "' onClick=\"return confirm('Anda yakin?');\" class='btn btn-small'><i class='icon-trash'></i></a></td>\n\t\t\t\t\t</tr>";
         $i++;
     }
     $hasil .= '</table>';
     $hasil .= '<div class="cleaner_h20"></div>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }
 /**
  * @author : Gede Lumbung
  * @web : http://gedelumbung.com
  **/
 public function generate_index_formatur_cabang($limit, $offset, $filter = array())
 {
     $hasil = "";
     $query_add = "";
     if (!empty($filter)) {
         if ($filter['nama'] == "") {
             $query_add = "";
         } else {
             $where['nama'] = $filter['nama'];
             $query_add = "where a.nama like '%" . $where['nama'] . "%'";
         }
     }
     $tot_hal = $this->db->query("select a.nama, a.tanggal, a.gambar, a.wan_wati, a.tgl_lahir, a.no_hp, a.asal_komisariat, a.tempat_dad,\na.tahun_dad, a.tempat_dam, a.tahun_dam, b.nama_cabang, a.id_cabang_formatur, a.stts from dlmbg_cabang_formatur a left join dlmbg_cabang_profil b\n\t\ton a.id_cabang_profil=b.id_cabang_profil " . $query_add . "");
     $config['base_url'] = base_url() . 'panlih/formatur_cabang/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['next_link'] = 'Next';
     $config['prev_link'] = 'Prev';
     $this->pagination->initialize($config);
     $w = $this->db->query("select a.nama, a.tanggal, a.gambar, a.id_cabang_formatur, a.wan_wati, a.tgl_lahir, a.no_hp, a.asal_komisariat, a.tempat_dad,\na.tahun_dad, a.tempat_dam, a.tahun_dam, b.nama_cabang, a.stts from dlmbg_cabang_formatur a left join dlmbg_cabang_profil b\n\t\ton a.id_cabang_profil=b.id_cabang_profil " . $query_add . " order by a.stts ASC \n\t\tLIMIT " . $offset . "," . $limit . "");
     $hasil .= "\n       <table class='table table-striped table-condensed'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>No.</th>\n\t\t\t\t\t<th style='width: 120px'>Nama</th>\n\t\t\t\t\t<th>Immawan/ti</th>\n\t\t\t\t\t<th>Tgl Lahir</th>\n\t\t\t\t\t<th>No. Hp</th>\n\t\t\t\t\t<th>Asal Komisariat</th>\n\t\t\t\t\t<th style='width: 125px'>Asal Cabang</th>\n\t\t\t\t\t<th>Waktu Daftar</th>\n\t\t\t\t\t<th width='110'>Berkas</th>\n\t\t\t\t\t<th>Status</th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>";
     $i = $offset + 1;
     foreach ($w->result() as $h) {
         $st = "<span class='label label-important'>Berkas Diterima</span>";
         if ($h->stts == 1) {
             $st = "<span class='label label-success'>Calon Formatur</span>";
         }
         $hasil .= "\n\n            <tr>\n\t\t\t\t\t<td>" . $i . "</td>\n\t\t\t\t\t<td>" . $h->nama . "</td>\n\t\t\t\t\t<td>" . $h->wan_wati . "</td>\n\t\t\t\t\t<td>" . $h->tgl_lahir . "</td>\n\t\t\t\t\t<td>" . $h->no_hp . "</td>\n\t\t\t\t\t<td>" . $h->asal_komisariat . "</td>\n\t\t\t\t\t<td>" . $h->nama_cabang . "</td>\n\t\t\t\t\t<td>" . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . " WIB</td>\n\t\t\t\t\t<td><a href='" . base_url() . "asset/images/formatur-cabang/thumb/" . $h->gambar . "' class='btn btn-medium btn-primary'>DOWNLOAD BERKAS</a></td>\n\t\t\t\t\t<td>" . $st . "</td>\n\t\t\t\t\t<td>";
         $hasil .= "";
         if ($h->stts == 1) {
             $hasil .= "<a href='" . base_url() . "panlih/formatur_cabang/approve/" . $h->id_cabang_formatur . "/0' class='btn btn-small'><i class='icon-remove'></i></a>";
         } else {
             $hasil .= "<a href='" . base_url() . "panlih/formatur_cabang/approve/" . $h->id_cabang_formatur . "/1' class='btn btn-small'><i class='icon-ok'></i></a>";
         }
         $hasil .= "<a href='" . base_url() . "panlih/formatur_cabang/hapus/" . $h->id_cabang_formatur . "/" . $h->gambar . "' onClick=\"return confirm('Anda yakin?');\" class='btn btn-small'><i class='icon-trash'></i></a></td>\n\t\t\t\t\t</tr>";
         $i++;
     }
     $hasil .= '</table>';
     $hasil .= '<div class="cleaner_h20"></div>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }
 public function generate_index_kader($limit, $offset, $filter = array())
 {
     $hasil = "";
     $query_add = "";
     if (!empty($filter)) {
         if ($filter['id_cabang'] == "") {
             $query_add = "";
         } else {
             $where['id_cabang'] = $filter['id_cabang'];
             $query_add = "where a.id_cabang like '%" . $where['id_cabang'] . "%'";
         }
     }
     $tot_hal = $this->db->query("select a.nama, a.wan_wati, a.alamat, a.komisariat, a.email, a.no_hape, a.tanggal, a.syahadah, a.facebook, a.email, b.nama_cabang, a.id_kader, a.stts from isa_kader a left join isa_cabang b\n\t\ton a.id_cabang=b.id_cabang " . $query_add . "");
     $config['base_url'] = base_url() . 'admin_dpd/kader/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['next_link'] = 'Next';
     $config['prev_link'] = 'Prev';
     $this->pagination->initialize($config);
     $w = $this->db->query("select a.nama, a.wan_wati, a.alamat, a.komisariat, a.email, a.no_hape, a.tanggal, a.syahadah, a.facebook, a.email, a.id_kader, b.nama_cabang, a.stts from isa_kader a left join isa_cabang b\n\t\ton a.id_cabang=b.id_cabang " . $query_add . " order by a.stts ASC LIMIT " . $offset . "," . $limit . "");
     $hasil .= "<table class='table table-striped table-condensed'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>No.</th>\n\t\t\t\t\t<th>Nama</th>\n\t\t\t\t\t<th>Tanggal Daftar</th>\n\t\t\t\t\t<th>Asal Pimpinan Cabang</th>\n\t\t\t\t\t<th>Status</th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>";
     $i = $offset + 1;
     foreach ($w->result() as $h) {
         $st = "<span class='label label-danger'>Moderasi</span>";
         if ($h->stts == 1) {
             $st = "<span class='label label-success'>Diterima</span>";
         }
         $hasil .= "<tr>\n\t\t\t\t\t<td>" . $i . "</td>\n\t\t\t\t\t<td><a href='" . base_url() . "web/to_pro'>" . $h->nama . "</a></td>\n\t\t\t\t\t<td>" . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . " WIB</td>\n\t\t\t\t\t<td>" . $h->nama_cabang . "</td>\n\t\t\t\t\t<td>" . $st . "</td>\n\t\t\t\t\t<td>";
         $hasil .= "";
         if ($h->stts == 1) {
             $hasil .= "<a href='" . base_url() . "admin_dpd/kader/approve/" . $h->id_kader . "/0' class='btn btn-default btn-small'><i class='fa fa-times'></i></a>";
         } else {
             $hasil .= "<a href='" . base_url() . "admin_dpd/kader/approve/" . $h->id_kader . "/1' class='btn btn-default btn-small'><i class='fa fa-check'></i></a>";
         }
         $hasil .= "<a href='" . base_url() . "admin_dpd/kader/hapus/" . $h->id_kader . "/" . $h->syahadah . "' onClick=\"return confirm('Anda yakin?');\" class='btn btn-default btn-small'><i class='fa fa-trash-o'></i></a></td>\n\t\t\t\t\t</tr>";
         $i++;
     }
     $hasil .= '</table>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }
 public function generate_index_berita_panitia($limit, $offset, $filter = array())
 {
     $hasil = "";
     $query_add = "";
     if (!empty($filter)) {
         if ($filter['judul'] == "") {
             $query_add = "";
         } else {
             $where['judul'] = $filter['judul'];
             $query_add = "and a.judul like '%" . $where['judul'] . "%'";
         }
     }
     $tot_hal = $this->db->query("select a.judul, a.id_multi_berita, a.gambar, a.tanggal, b.bidang, a.stts, a.headline from dlmbg_multi_berita a left join dlmbg_super_bidang b on a.id_bidang=b.id_super_bidang where a.id_bidang='" . $this->session->userdata("id_bidang") . "' " . $query_add . "");
     $config['base_url'] = base_url() . 'operator/formatur_cabang/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['next_link'] = 'Next';
     $config['prev_link'] = 'Prev';
     $this->pagination->initialize($config);
     $w = $this->db->query("select a.judul, a.gambar, a.tanggal, b.bidang, a.stts, a.id_multi_berita, a.headline from dlmbg_multi_berita a left join dlmbg_super_bidang b on a.id_bidang=b.id_super_bidang where a.id_bidang='" . $this->session->userdata("id_bidang") . "' " . $query_add . " order by a.judul ASC \n\t\tLIMIT " . $offset . "," . $limit . "");
     $hasil .= "<table width='100%' style='border-collapse:collapse;' cellpadding='8' cellspacing='0' border='1' width='100%'>\n\t\t\t\t\t<tr bgcolor='#F2F2F2' align='center'>\n\t\t\t\t\t<td>No.</td>\n\t\t\t\t\t<td>Judul</td>\n\t\t\t\t\t<td>Tanggal</td>\n\t\t\t\t\t<td>Bidang</td>\n\t\t\t\t\t<td>Headline</td>\n\t\t\t\t\t<td>Status</td>\n\t\t\t\t\t<td bgcolor='#000' colspan='2'><a href='" . base_url() . "admin_panitia/berita_panitia/tambah'>Tambah</a></td>\n\t\t\t\t\t</tr>";
     $i = $offset + 1;
     foreach ($w->result() as $h) {
         $st = "Moderation";
         $color = "#EBF8A4";
         $headline = "No";
         if ($h->stts == 1) {
             $st = "Approve";
             $color = "";
         }
         if ($h->headline == "y") {
             $headline = "Yes";
         }
         $hasil .= "<tr bgcolor='" . $color . "'>\n\t\t\t\t\t<td>" . $i . "</td>\n\t\t\t\t\t<td>" . $h->judul . "</td>\n\t\t\t\t\t<td>" . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . " WIB</td>\n\t\t\t\t\t<td>" . $h->bidang . "</td>\n\t\t\t\t\t<td>" . $headline . "</td>\n\t\t\t\t\t<td>" . $st . "</td>\n\t\t\t\t\t<td bgcolor='000'><a href='" . base_url() . "admin_panitia/berita_panitia/edit/" . $h->id_multi_berita . "'>Edit</a></td>\n\t\t\t\t\t<td bgcolor='000'><a href='" . base_url() . "admin_panitia/berita_panitia/hapus/" . $h->id_multi_berita . "/" . $h->gambar . "' \n\t\t\t\t\tonClick=\"return confirm('Anda yakin?');\">Hapus</a></td>\n\t\t\t\t\t</tr>";
         $i++;
     }
     $hasil .= '</table>';
     $hasil .= '<div class="cleaner_h20"></div>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }
        ?>
</td>
								<td><?php 
        echo $t->name;
        ?>
</td>
								<td><?php 
        echo $t->title;
        ?>
</td>
								<td><?php 
        echo strip_tags(substr($t->text, 0, 100));
        ?>
...</td>
								<td><?php 
        echo generate_tanggal($t->date);
        ?>
</td>
								<td><?php 
        echo $t->publish;
        ?>
</td>
								<td><?php 
        echo $t->idlogin;
        ?>
</td>
								<td> <?php 
        echo $t->counter;
        ?>
</td>
								<td class='td-actions'>
<div id="main" class="clearfix">
    <div id="content" class="col">
<div id="grid">
<?php 
foreach ($nick as $value) {
    $date = generate_tanggal($value->date);
    $isi = hashtag(strip_tags(substr($value->text, 0, 200)));
    $pecah = explode(".", $value->image);
    $alt = $pecah[0];
    ?>
	<div id="post-<?php 
    echo $value->idtutorial;
    ?>
" class="col-md-6">
		<div class="article-grid">
			<a class="article-img" href="<?php 
    echo base_url();
    ?>
show/detail/<?php 
    echo $value->slug;
    ?>
"><img width="1200" height="500" src="<?php 
    echo base_url();
    ?>
assets/uploads/<?php 
    echo $value->image;
    ?>
" class="img-responsive wp-post-image" alt="<?php 
    echo $alt;
    ?>
"/></a>
 public function generate_index_berita($limit, $offset, $filter = array())
 {
     $hasil = "";
     $query_add = "";
     if (!empty($filter)) {
         if ($filter['judul'] == "") {
             $query_add = "";
         } else {
             $where['judul'] = $filter['judul'];
             $query_add = "where a.judul like '%" . $where['judul'] . "%'";
         }
     }
     $tot_hal = $this->db->query("select a.judul, a.id_multi_berita, a.gambar, a.tanggal, b.bidang, a.stts, a.headline from \r\n\t\tdlmbg_multi_berita a left join dlmbg_super_bidang b on a.id_bidang=b.id_super_bidang " . $query_add . " order by a.stts ASC");
     $config['base_url'] = base_url() . 'superadmin/berita/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['next_link'] = 'Next';
     $config['prev_link'] = 'Prev';
     $this->pagination->initialize($config);
     $w = $this->db->query("select a.judul, a.tipe_user, a.id_multi_berita, a.gambar, a.tanggal, b.bidang, a.stts, a.headline from \r\n\t\tdlmbg_multi_berita a left join dlmbg_super_bidang b on a.id_bidang=b.id_super_bidang " . $query_add . " order by a.stts ASC\r\n\t\t LIMIT " . $offset . "," . $limit . "");
     $hasil .= "<table class='table table-striped table-condensed'>\r\n\t\t\t\t\t<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t<th>No.</th>\r\n\t\t\t\t\t<th>Judul</th>\r\n\t\t\t\t\t<th>Tanggal</th>\r\n\t\t\t\t\t<th>Bidang</th>\r\n\t\t\t\t\t<th width='80'>Tipe User</th>\r\n\t\t\t\t\t<th>Headline</th>\r\n\t\t\t\t\t<th>Status</th>\r\n\t\t\t\t\t<th width='110'><a href='" . base_url() . "superadmin/berita/tambah' class='btn btn'><i class='icon-plus'></i> Tambah</a></th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t</thead>";
     $i = $offset + 1;
     foreach ($w->result() as $h) {
         $st = "<span class='label label-important'>Moderation</span>";
         if ($h->stts == 1) {
             $st = "<span class='label label-success'>Approve</span>";
         }
         $hasil .= "<tr>\r\n\t\t\t\t\t<td>" . $i . "</td>\r\n\t\t\t\t\t<td>" . $h->judul . "</td>\r\n\t\t\t\t\t<td>" . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . " WIB</td>\r\n\t\t\t\t\t<td>" . $h->bidang . "</td>\r\n\t\t\t\t\t<td>" . $h->tipe_user . "</td>\r\n\t\t\t\t\t<td>" . $h->headline . "</td>\r\n\t\t\t\t\t<td>" . $st . "</td>\r\n\t\t\t\t\t<td>";
         $hasil .= "";
         if ($h->stts == 1) {
             $hasil .= "<a href='" . base_url() . "superadmin/berita/approve/" . $h->id_multi_berita . "/0' class='btn btn-small'><i class='icon-remove'></i></a>";
         } else {
             $hasil .= "<a href='" . base_url() . "superadmin/berita/approve/" . $h->id_multi_berita . "/1' class='btn btn-small'><i class='icon-ok'></i></a>";
         }
         $hasil .= "<a href='" . base_url() . "superadmin/berita/edit/" . $h->id_multi_berita . "' class='btn btn-small'><i class='icon-edit'></i></a>";
         $hasil .= "<a href='" . base_url() . "superadmin/berita/hapus/" . $h->id_multi_berita . "/" . $h->gambar . "' onClick=\"return confirm('Anda yakin?');\" class='btn btn-small'><i class='icon-trash'></i></a></td>\r\n\t\t\t\t\t</tr>";
         $i++;
     }
     $hasil .= '</table>';
     $hasil .= '<div class="cleaner_h20"></div>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }
Пример #11
0
 public function simpan_pesanan()
 {
     $total_harga = 0;
     $key = $this->input->post('kode_sales');
     $query = $this->model_customer->getdata($key);
     // belum selesai (ambil email admin)
     // $email_admin			= $this->model_user->getdata_email('admin');
     //menggabungkan layanan dan biaya kirim
     //dan dipecah
     $layananDanBiaya = $this->input->post('layanan');
     $pecah = explode(',', $layananDanBiaya);
     $data['kode_sales'] = $this->input->post('kode_sales');
     $data['nm_penerima'] = $this->input->post('nm_penerima');
     $data['no_telp'] = $this->input->post('no_telp');
     $data['alamat'] = $this->input->post('alamat');
     $data['kode_pos'] = $this->input->post('kode_pos');
     $data['status'] = $this->input->post('status');
     $data['id_admin'] = $this->input->post('id_admin');
     $data['id_provinsi'] = $this->input->post('provinsi');
     $data['id_kota'] = $this->input->post('kota');
     $data['id_kecamatan'] = $this->input->post('kecamatan');
     $data['catatan'] = $this->input->post('catatan');
     $data['kurir'] = $this->input->post('courier');
     $data['kota'] = $this->input->post('destination');
     $data['layanan'] = $pecah[0];
     $data['biaya_kirim'] = $pecah[1];
     $data['nama_toko'] = $query->id_customer;
     $data['tgl_beli'] = time() + 3600 * 7;
     $data['id_pesanan'] = rand(0, 10000);
     foreach ($this->cart->contents() as $items) {
         //Data Produk
         $data['nm_produk'] = $items['name'];
         $data['harga'] = $items['price'];
         $data['qty'] = $items['qty'];
         $total_harga = $total_harga + $items['subtotal'];
         $data['total'] = $items['subtotal'];
         $this->model_order->simpan_pesanan($data, $data['nm_produk'], $data['qty']);
     }
     //BELUM SELESAI MOHON DISELESAIKAN (kurang menampilkan produk keseluruhan)
     //ambil id_admin dan ambil email marketing
     $id_admin = $this->model_customer->getdata($key);
     $email = $this->model_order->getdata_email($id_admin->id_admin);
     //kirim email pesanan ke admin dan marketing
     $ci = get_instance();
     $ci->load->library('email');
     $config['protocol'] = "smtp";
     $config['smtp_host'] = "ssl://smtp.gmail.com";
     $config['smtp_port'] = "465";
     $config['smtp_user'] = "******";
     $config['smtp_pass'] = "******";
     $config['charset'] = "utf-8";
     $config['mailtype'] = "html";
     $config['newline'] = "\r\n";
     $ci->email->initialize($config);
     //BELUM SELESAI
     $this->email->clear();
     $this->email->from($config['smtp_user'], 'Top Tracker Store');
     $this->email->to($email->email);
     $this->email->subject('Pesanan Baru');
     $this->email->message("<h2>Pesanan Baru</h2>\n   \t\t\t\t\t\t<br><br>Nama Toko&nbsp:&nbsp;" . strtoupper($query->nama_toko) . "<br>Tanggal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;" . generate_tanggal(gmdate('d/m/Y-H:i', $data['tgl_beli'])));
     if ($this->email->send() == FALSE) {
         show_error($this->email->print_debugger());
     }
     $this->cart->destroy();
     redirect(site_url('/blog/home'));
 }
    public function generate_detail_pesan($id_param, $limit, $offset)
    {
        $hasil = "";
        $page = $offset;
        if (!$page) {
            $offset = 0;
        } else {
            $offset = $page;
        }
        $where['id_member'] = $id_param;
        $tot_hal = $this->db->query("select * from dlmbg_pesan where id_sampul='" . $id_param . "'");
        $config['base_url'] = base_url() . 'user/inbox/detail_pesan/' . $id_param . '/';
        $config['total_rows'] = $tot_hal->num_rows();
        $config['per_page'] = $limit;
        $config['uri_segment'] = 5;
        $config['first_link'] = 'First';
        $config['last_link'] = 'Last';
        $config['next_link'] = 'Next';
        $config['prev_link'] = 'Prev';
        $this->pagination->initialize($config);
        $w = $this->db->query("SELECT b.id_member,a.id_sampul,b.email,a.isi,a.id_penerima,a.id_pengirim,a.waktu,b.nama,b.gambar from dlmbg_pesan as a left join (select nama,email,x.id_member,gambar from dlmbg_member as x) as b on a.id_pengirim=b.id_member where id_sampul='" . $id_param . "' order by waktu DESC LIMIT " . $offset . "," . $limit . "");
        $w_get = $w->row();
        $id_penerima = $w_get->id_penerima;
        if ($w_get->id_penerima == $this->session->userdata("id_member")) {
            $id_penerima = $w_get->id_pengirim;
        }
        $hasil .= '<div id="form_balas" style="display:none;">
							' . form_open("user/inbox/kirim") . '
							<table  width="700" bgcolor="#ECF5CF" cellspacing="0" border="0" cellpadding="10">
							<tr>
							<td>
							<textarea id="keterangan" cols="10" name="isi"></textarea>
							</td>
							</tr>
							<tr>
								<td>
								<input type="submit" value="KIRIM PESAN" class="btn btn-primary" />
								<input type="hidden" name="id_sampul" value="' . $id_param . '" />
								<input type="hidden" name="id_penerima" value="' . $id_penerima . '" />
								</td>
							</tr>
							</table>
							' . form_close() . '
						</div>';
        foreach ($w->result() as $h) {
            $gbr = "no-image.png";
            if ($h->gambar != "") {
                $gbr = $h->gambar;
            }
            $hasil .= '<table width="100%" border="0" cellspacing="0" cellpadding="10" bgcolor="#ECF5CF">
				<tr valign="top">
				  <td class="LeftBg">
				  <div class="border-photo-profil2" style="float:left; margin-right:10px;">
				  <div class="hide-photo-profil-medium2"><img src="' . base_url() . 'asset/images/member/thumb/' . $gbr . '" width="60" /></div></td>
				  <td width="640">
				   <strong><a href="' . base_url() . 'web/member/get/' . $h->id_pengirim . '">' . $h->nama . '</a></strong> | <span class="date-txt2">' . generate_tanggal($h->waktu) . '</span>
				 ' . $h->isi . '
				  <div class="cleaner_h0"></div>
				  </td>
				</tr>
				<tr>
      		</table>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ECF5CF">
				<td>
            		<div class="line-grey"></div>
				</td>
				</tr>
			</table>';
        }
        $hasil .= '<div class="cleaner_h20"></div>';
        $hasil .= $this->pagination->create_links();
        return $hasil;
    }
Пример #13
0
 public function generate_index_produk_dinas($id_param, $limit, $offset)
 {
     $hasil = "";
     $where['stts'] = 1;
     $where['id_bidang'] = $id_param;
     $page = $offset;
     if (!$page) {
         $offset = 0;
     } else {
         $offset = $page;
     }
     $tot_hal = $this->db->get_where("dlmbg_multi_produk", $where);
     $config['base_url'] = base_url() . 'web/produk_dinas/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 5;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['next_link'] = 'Next';
     $config['prev_link'] = 'Prev';
     $this->pagination->initialize($config);
     $w = $this->db->order_by('id_multi_produk', 'desc')->get_where("dlmbg_multi_produk", $where, $limit, $offset);
     foreach ($w->result() as $h) {
         $hasil .= "<li><h4>" . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . " WIB</h4>\r\n\t\t\t<a href='" . base_url() . "web/produk_dinas/detail/" . $h->id_multi_produk . "/" . $h->tipe_user . "/" . url_title(strtolower($h->judul)) . "'' title='" . $h->judul . "'>" . $h->judul . "</a></li>";
     }
     $hasil .= '<div class="cleaner_h20"></div>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }
    public function generate_indexs_member($limit, $offset)
    {
        $hasil = "";
        $page = $offset;
        if (!$page) {
            $offset = 0;
        } else {
            $offset = $page;
        }
        $tot_hal = $this->db->get("dlmbg_member");
        $config['base_url'] = base_url() . 'web/member/index/';
        $config['total_rows'] = $tot_hal->num_rows();
        $config['per_page'] = $limit;
        $config['uri_segment'] = 4;
        $config['first_link'] = 'First';
        $config['last_link'] = 'Last';
        $config['next_link'] = 'Next';
        $config['prev_link'] = 'Prev';
        $this->pagination->initialize($config);
        $w = $this->db->get("dlmbg_member", $limit, $offset);
        $i = 0;
        foreach ($w->result() as $h) {
            $gbr = "no-image.png";
            if ($h->gambar != "") {
                $gbr = $h->gambar;
            }
            $hasil .= '<div class="main_content">
						<div class="container-fluid">
							<div class="row-fluid product_listing">
							<h3 class="title"><i class="icon-user"></i> ' . $h->nama . ' - ' . $h->email . '</h3>
							  <div class="span2">
							  <a href="' . base_url() . 'web/member/get/' . $h->id_member . '/' . url_title($h->nama, '-', TRUE) . '">
							  <img src="' . base_url() . 'asset/images/member/thumb/' . $gbr . '"  class="img" width="70">
							  </a>
							  </div>
							  <div class="span8">
								  <table>
									<tr>
										<td width="100">Alamat</td><td>:</td><td>' . $h->alamat . '</td>
									</tr>
									<tr>
										<td>No.Telpon / HP</td><td>:</td><td>' . $h->no_telpon . ' / ' . $h->no_hp . '</td>
									</tr>
									<tr>
										<td>Jenis Kelamin</td><td>:</td><td>' . $h->jk . '</td>
									</tr>
									<tr>
										<td>Bergabung</td><td>:</td><td>' . generate_tanggal($h->tgl_bergabung) . '</td>
									</tr>
								  </table>
							  </div>
							</div>
						</div>
					</div>';
            $i++;
            if ($i > 3) {
                $i = 0;
            }
        }
        $hasil .= '<div class="cleaner_h20"></div>';
        $hasil .= $this->pagination->create_links();
        return $hasil;
    }
 public function generate_index_daftar_kader($limit, $offset, $filter = array())
 {
     $hasil = "";
     $query_add = "";
     if (!empty($filter)) {
         if ($filter['nama'] == "") {
             $query_add = "";
         } else {
             $where['nama'] = $filter['nama'];
             $query_add = "and a.nama like '%" . $where['nama'] . "%'";
         }
     }
     $tot_hal = $this->db->query("select a.nama, a.perti, a.tgl_lahir, a.wan_wati, a.alamat, a.komisariat, a.email, a.no_hape, a.tanggal, a.syahadah, a.facebook, a.email, b.nama_cabang, a.id_kader, a.stts from isa_kader a left join isa_cabang b\n\t\ton a.id_cabang=b.id_cabang where a.id_cabang='" . $this->session->userdata("id_cabang") . "' " . $query_add . "");
     $config['base_url'] = base_url() . 'admin_cabang/artikel_sekolah/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $config['full_tag_open'] = '<ul class="pagination">';
     $config['full_tag_close'] = '</ul>';
     $config['first_link'] = false;
     $config['last_link'] = false;
     $config['first_tag_open'] = '<li>';
     $config['first_tag_close'] = '</li>';
     $config['prev_link'] = '&laquo';
     $config['prev_tag_open'] = '<li class="prev">';
     $config['prev_tag_close'] = '</li>';
     $config['next_link'] = '&raquo';
     $config['next_tag_open'] = '<li>';
     $config['next_tag_close'] = '</li>';
     $config['last_tag_open'] = '<li>';
     $config['last_tag_close'] = '</li>';
     $config['cur_tag_open'] = '<li class="active"><a href="#">';
     $config['cur_tag_close'] = '</a></li>';
     $config['num_tag_open'] = '<li>';
     $config['num_tag_close'] = '</li>';
     $this->pagination->initialize($config);
     $w = $this->db->query("select a.nama, a.perti, a.tgl_lahir, a.wan_wati, a.alamat, a.komisariat, a.email, a.no_hape, a.tanggal, a.syahadah, a.facebook, a.email, b.nama_cabang, a.id_kader, a.stts from isa_kader a left join isa_cabang b\n\t\ton a.id_cabang=b.id_cabang where a.id_cabang='" . $this->session->userdata("id_cabang") . "' " . $query_add . " order by a.nama ASC\n\t\tLIMIT " . $offset . "," . $limit . "");
     $hasil .= "<table class='table table-hover'>\n\t\t\t\t\t<tr class='info'>\n\t\t\t\t\t<td>No.</td>\n\t\t\t\t\t<td>Nama</td>\n\t\t\t\t\t<td>Gender</td>\n\t\t\t\t\t<td>Asal Komisariat</td>\n\t\t\t\t\t<td>Perguruan Tinggi</td>\n\t\t\t\t\t<td>Asal Cabang</td>\n\t\t\t\t\t<td>Tanggal Daftar</td>\n\t\t\t\t\t<td>Status</td>\n\t\t\t\t\t<td class='info' colspan='2'><a href='" . base_url() . "admin_cabang/daftar_kader/tambah'><i class='fa fa-plus'></i> Tambah</a></td>\n\t\t\t\t\t</tr>";
     $i = $offset + 1;
     foreach ($w->result() as $h) {
         $st = "Menunggu Moderasi";
         $color = "#e6e6e6";
         if ($h->stts == 1) {
             $st = "Diterima DPD";
             $color = "";
         }
         $hasil .= "<tr bgcolor='" . $color . "'>\n\t\t\t\t\t<td>" . $i . "</td>\n\t\t\t\t\t<td><a href='" . base_url() . "web/to_pro' title='Lihat Detail Kader'>" . $h->nama . "</a></td>\n\t\t\t\t\t<td>" . $h->wan_wati . "</td>\n\t\t\t\t\t<td>" . $h->komisariat . "</td>\n\t\t\t\t\t<td>" . $h->perti . "</td>\n\t\t\t\t\t<td>" . $h->nama_cabang . "</td>\n\t\t\t\t\t<td>" . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . " WIB</td>\n\t\t\t\t\t<td>" . $st . "</td>\n\t\t\t\t\t<td class='danger'><a href='" . base_url() . "admin_cabang/daftar_kader/edit/" . $h->id_kader . "'><i class='fa fa-pencil'></i> Edit</a></td>\n\t\t\t\t\t<td class='danger'><a href='" . base_url() . "admin_cabang/daftar_kader/hapus/" . $h->id_kader . "/" . $h->syahadah . "'\n\t\t\t\t\tonClick=\"return confirm('Anda yakin?');\"><i class='fa fa-times'></i> Hapus</a></td>\n\t\t\t\t\t</tr>";
         $i++;
     }
     $hasil .= '</table>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }
Пример #16
0
?>
</dc:language>
		<dc:creator><?php 
echo $creator_email;
?>
</dc:creator>
				
		<dc:rights>Copyright <?php 
echo gmdate("Y", time());
?>
</dc:rights>
		<admin:generatorAgent rdf:resource="http://www.yudi-purwanto.com/" />

		<?php 
foreach ($posts as $row) {
    $date = generate_tanggal($row->date);
    ?>
			<item>
				<title><?php 
    echo $row->title;
    ?>
</title>
				<link><?php 
    echo site_url("show/detail/" . $row->slug);
    ?>
</link>
				<pubDate><?php 
    echo $date;
    ?>
</pubDate>
				<description>
Пример #17
0
    public function generate_index_formatur_per_cabang($id_param, $limit, $offset)
    {
        $hasil = "";
        $where['stts'] = 1;
        $where['id_cabang_profil'] = $id_param;
        $page = $offset;
        if (!$page) {
            $offset = 0;
        } else {
            $offset = $page;
        }
        $tot_hal = $this->db->get_where("dlmbg_cabang_formatur", $where);
        $config['base_url'] = base_url() . 'web/formatur_cabang/cabang/' . $where['id_cabang_profil'] . '';
        $config['total_rows'] = $tot_hal->num_rows();
        $config['per_page'] = $limit;
        $config['uri_segment'] = 5;
        $config['first_link'] = 'First';
        $config['last_link'] = 'Last';
        $config['next_link'] = 'Next';
        $config['prev_link'] = 'Prev';
        $this->pagination->initialize($config);
        $w = $this->db->order_by('id_cabang_formatur', 'desc')->get_where("dlmbg_cabang_formatur", $where, $limit, $offset);
        foreach ($w->result() as $h) {
            $hasil .= '<div id="news-list">
			<img src="' . base_url() . 'asset/images/formatur-cabang/thumb/' . $h->gambar . '" />
			<h4>' . generate_tanggal(gmdate('d/m/Y-H:i:s', $h->tanggal)) . ' WIB</h4><h1><a href="' . base_url() . 'web/formatur_cabang/detail/' . $h->id_cabang_formatur . '/' . url_title(strtolower($h->judul)) . '">' . $h->judul . '</a></h1>
			' . substr($h->isi, 0, 200) . '.... <a href="' . base_url() . 'web/formatur_cabang/detail/' . $h->id_cabang_formatur . '/' . url_title(strtolower($h->judul)) . '"><b>(Baca Selengkapnya)</b></a>
			</div>';
        }
        $hasil .= '<div class="cleaner_h20"></div>';
        $hasil .= $this->pagination->create_links();
        return $hasil;
    }
Пример #18
0
echo br(1) . $order->row()->nm_penerima . br(2);
?>

			   <b>Alamat Penerima</b> 
			   <?php 
echo br(1) . $order->row()->alamat . br(1) . $order->row()->kota . br(2);
?>

			   <b>Telephone</b>
			   <?php 
echo br(1) . $order->row()->no_telp . br(2);
?>

			   <b>Tanggal</b>
			   <?php 
echo br(1) . generate_tanggal(gmdate('d/m/Y-H:i', $order->row()->tgl_beli)) . br(3);
?>

			   <p class="text-center text-uppercase"><font color="#727272">Jasa Pengiriman</font><hr></p>
			   <b>Kurir</b>
			   <p class="text-uppercase"><?php 
echo $order->row()->kurir . br(1);
?>
</p>
				<b>Layanan</b>
				<p><?php 
echo $order->row()->layanan . br(2);
?>
</p>

			   <?php 
Пример #19
0
                        <p> <i class="fa fa-map-marker"></i> <?php 
echo $alamat;
?>
</p>
                        <p><i class="fa fa-users"></i> <?php 
echo $komisariat;
?>
</p>
                        <p><i class="fa fa-calendar"></i> <?php 
echo $tgl_lahir;
?>
</p>
                    </div>
                    <div class="col-md-6">
                        <p><i class="fa fa-clock-o"></i> <?php 
echo generate_tanggal(gmdate('d/m/Y-H:i:s', $tanggal));
?>
</p>
                        <p><i class="fa fa-mobile-phone"></i> <?php 
echo $no_hape;
?>
</p>
                        <p><i class="fa fa-envelope-o"></i> <a href="mailto:<?php 
echo $email;
?>
?subject=Terdaftar%20Database%20Kader%20IMM%20Jateng&body=Alamat%20email%20ini%20terdaftar%20dalam%20Sistem%20Informasi%20kader%20IMM%20Jateng%20dengan%20nama%20<?php 
echo $wan_wati;
?>
%20<?php 
echo $nama;
?>
Пример #20
0
<div id="main">
  <h3 id="_control"></h3>
        <div class="tab-control padding20" data-role="tab-control">
    <div class="cleaner_h10"></div>
<?php 
if (count($ebook->result_array()) > 0) {
    foreach ($ebook->result_array() as $kt) {
        echo "<div class='download'><img src='" . base_url() . "assets/images/download.png' alt='Yudi Purwanto' border='0' class='image2'>\n<table>\n<tr><td width='135'>File</td><td width='10'> : </td><td>" . $kt['title'] . "</td></tr>\n<tr><td>Date</td><td> : </td><td>" . generate_tanggal($kt['date']) . "</td></tr>\n<tr><td>Download</td><td> : </td><td>" . $kt['counter'] . " Kali</td></tr>\n<tr><td>Posting by</td><td> : </td><td>Yudi Purwanto</td></tr>\n<tr><td></td><td></td><td><a href='" . base_url() . "ebooks/get/" . $kt['idebook'] . "'><span class='submitButton2'>Download File</span></a></td></tr>\n</table>\n</div>";
    }
} else {
    echo "Sorry, File Not Found.";
}
?>
<div class="pagination"><ul><?php 
echo $paginator;
?>
</ul></div>
<div class="cleaner_h20"></div>
</div></div>
 
Пример #21
0
    if ($no % 2) {
        $color = 'warning';
    } else {
        $color = 'success';
    }
    ?>
                <tr class="<?php 
    echo $color;
    ?>
">
                  <td><?php 
    echo $no++;
    ?>
</td>
                  <td><?php 
    echo generate_tanggal(gmdate('d/m/Y-H:i', $row->tgl_beli));
    ?>
</td>
                  <td><?php 
    echo $row->resi;
    ?>
</td>
                  <td>
                    <a href="<?php 
    echo site_url('/user/detail_order/' . $row->id_pesanan);
    ?>
" data-toggle="modal" class="btn btn-mini btn-info"><i class="glyphicon glyphicon-zoom-in"></i></a>
                  </td>
                </tr>
                <?php 
}
 public function generate_indexs_artikel($limit, $offset)
 {
     $w = $this->db->order_by("id_artikel", "DESC")->get("dlmbg_artikel", $limit, $offset);
     $hasil = "";
     $tot_hal = $this->db->get("dlmbg_artikel");
     $config['base_url'] = base_url() . 'superadmin/artikel/index/';
     $config['total_rows'] = $tot_hal->num_rows();
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['next_link'] = 'Next';
     $config['prev_link'] = 'Prev';
     $this->pagination->initialize($config);
     $hasil .= "<table class='table table-striped table-condensed'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>No.</th>\n\t\t\t\t\t<th>Judul</th>\n\t\t\t\t\t<th>Tanggal</th>\n\t\t\t\t\t<th>Dibaca</th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>";
     $no = $offset + 1;
     foreach ($w->result() as $h) {
         $hasil .= "<tr>";
         $hasil .= "<td>" . $no . "</td>";
         $hasil .= "<td>" . $h->judul . "</td>";
         $hasil .= "<td>" . generate_tanggal($h->tanggal) . "</td>";
         $hasil .= "<td>" . $h->counter . "</td>";
         $hasil .= "<td><a href='" . base_url() . "superadmin/artikel/edit/" . $h->id_artikel . "' class='btn'>Edit</a><a href='" . base_url() . "superadmin/artikel/hapus/" . $h->id_artikel . "' class='btn' onClick=\"return confirm('Are you sure?');\">Hapus</a></td>";
         $hasil .= "</tr>";
         $no++;
     }
     $hasil .= "</table>";
     $hasil .= '<div class="cleaner_h20"></div>';
     $hasil .= $this->pagination->create_links();
     return $hasil;
 }