当前位置: 首页>>代码示例>>PHP>>正文


PHP clsTinyButStrong::LoadTemplate方法代码示例

本文整理汇总了PHP中clsTinyButStrong::LoadTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP clsTinyButStrong::LoadTemplate方法的具体用法?PHP clsTinyButStrong::LoadTemplate怎么用?PHP clsTinyButStrong::LoadTemplate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clsTinyButStrong的用法示例。


在下文中一共展示了clsTinyButStrong::LoadTemplate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionTemplate2

 public function actionTemplate2()
 {
     Yii::import('ext.heart.opentbs.EHeartOpenTBS', true);
     EHeartOpenTBS::init();
     // Initalize the TBS instance
     $TBS = new clsTinyButStrong();
     // new instance of TBS
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     // load the OpenTBS plugin
     $templatePath = Yii::getPathOfAlias('ext.heart.opentbs');
     $template = $templatePath . DIRECTORY_SEPARATOR . 'template.docx';
     $TBS->LoadTemplate($template);
     $modelPath = Yii::getPathOfAlias('application.models');
     $files = scandir($modelPath);
     $row = 2;
     $data = array();
     foreach ($files as $file) {
         if (is_file($modelPath . '/' . $file) && CFileHelper::getExtension($file) === 'php' && !in_array($file, array('ContactForm.php', 'LoginForm.php', 'Admin.php', 'User.php'))) {
             $file_arr = explode(".", $file);
             $filename = $file_arr[0];
             $data[$row - 2]['no'] = $row - 1;
             $data[$row - 2]['field1'] = $filename;
             $data[$row - 2]['field2'] = 'test/' . $filename;
             $row++;
         }
     }
     $data2[0]['title'] = "Template Generator";
     $data2[0]['field1'] = 'Model';
     $data2[0]['field2'] = 'Controller';
     $TBS->NoErr = true;
     $TBS->MergeBlock('data', 'array', $data);
     $TBS->MergeBlock('data2', 'array', $data2);
     $TBS->Show(OPENTBS_DOWNLOAD, 'template.docx');
 }
开发者ID:azizbekvahidov,项目名称:foods,代码行数:34,代码来源:CrudGenerator.php

示例2: module_admin_footer

function module_admin_footer($main = "", $n = "")
{
    global $blocks, $main, $module_css, $module_menu;
    include_once XOOPS_ROOT_PATH . '/common/tbs/tbs_class_php5.php';
    $TBS = new clsTinyButStrong();
    $TBS->LoadTemplate(XOOPS_ROOT_PATH . "/common/themes/" . WEB_THEME . "/index.html", False);
    $TBS->Show();
}
开发者ID:prolin99,项目名称:mobile_view,代码行数:8,代码来源:tool_php.php

示例3: getTemplateMerge

 function getTemplateMerge($templateFileName, $vars = null)
 {
     $tbs = new clsTinyButStrong();
     $tbs->LoadTemplate($this->getTemplateDir() . $templateFileName);
     foreach ($vars as $name => $value) {
         if (is_array($value)) {
             $tbs->MergeBlock($name, $value);
         } else {
             $tbs->MergeField($name, $value);
         }
     }
     $tbs->Show(TBS_NOTHING);
     echo $tbs->Source;
 }
开发者ID:clickdimension,项目名称:tinybutstrong,代码行数:14,代码来源:BenchmarkHtmlReporter.php

示例4: excel

 function excel()
 {
     $BulanIndo = array("Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember");
     $POST = array();
     $data['query'] = $this->admin_users_model->get_list();
     $userlist = $data['query'];
     for ($i = 0; $i < sizeof($userlist); $i++) {
         if ($userlist[$i]['birthdate'] != null) {
             $tgl_tmp = explode("/", $userlist[$i]['birthdate']);
             $userlist[$i]['birthdate'] = (int) $tgl_tmp[0] . " " . $BulanIndo[(int) $tgl_tmp[1] - 1] . " " . $tgl_tmp[2];
         }
         $userlist[$i]['last_login'] = "" . date("d-m-Y h:i:s", $userlist[$i]['last_login']);
         $userlist[$i]['last_active'] = "" . date("d-m-Y h:i:s", $userlist[$i]['last_active']);
     }
     $TBS = new clsTinyButStrong();
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     $TBS->ResetVarRef(false);
     $TBS->VarRef =& $data;
     $template = dirname(__FILE__) . '/../../public/files/excel/list_user.xlsx';
     $TBS->LoadTemplate($template);
     $TBS->MergeBlock('a,b', $userlist);
     $output_file_name = 'list_user.xlsx';
     $TBS->Show(OPENTBS_DOWNLOAD, $output_file_name);
 }
开发者ID:viktoredz,项目名称:1nf0k35-2016,代码行数:24,代码来源:admin_user.php

示例5: clsTinyButStrong

 function permintaan_detail_export($id = 0)
 {
     $TBS = new clsTinyButStrong();
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     $this->authentication->verify('inventory', 'show');
     if ($_POST) {
         $fil = $this->input->post('filterscount');
         $ord = $this->input->post('sortdatafield');
         for ($i = 0; $i < $fil; $i++) {
             $field = $this->input->post('filterdatafield' . $i);
             $value = $this->input->post('filtervalue' . $i);
             if ($field == 'harga') {
                 $this->db->where('inv_inventaris_habispakai_permintaan_item.harga', $value);
             } elseif ($field != 'year') {
                 $this->db->like($field, $value);
             }
         }
         if (!empty($ord)) {
             $this->db->order_by($ord, $this->input->post('sortorder'));
         }
     }
     $this->db->where('inv_inventaris_habispakai_permintaan_item.id_inv_hasbispakai_permintaan', $id);
     $rows_all_activity = $this->bhp_permintaan_model->getItem();
     if ($_POST) {
         $fil = $this->input->post('filterscount');
         $ord = $this->input->post('sortdatafield');
         for ($i = 0; $i < $fil; $i++) {
             $field = $this->input->post('filterdatafield' . $i);
             $value = $this->input->post('filtervalue' . $i);
             if ($field == 'harga') {
                 $this->db->where('inv_inventaris_habispakai_permintaan_item.harga', $value);
             } elseif ($field != 'year') {
                 $this->db->like($field, $value);
             }
         }
         if (!empty($ord)) {
             $this->db->order_by($ord, $this->input->post('sortorder'));
         }
     }
     $this->db->where('inv_inventaris_habispakai_permintaan_item.id_inv_hasbispakai_permintaan', $id);
     $activity = $this->bhp_permintaan_model->getItem();
     $data_tabel = array();
     $kodepuskesmas = $this->session->userdata('puskesmas');
     if (substr($kodepuskesmas, -2) == "01") {
         $unlock = 1;
     } else {
         $unlock = 0;
     }
     $no = 1;
     foreach ($activity as $act) {
         $data_tabel[] = array('no' => $no++, 'id_inv_hasbispakai_permintaan' => $act->id_inv_hasbispakai_permintaan, 'id_mst_inv_barang_habispakai' => $act->id_mst_inv_barang_habispakai, 'uraian' => $act->uraian, 'jml' => $act->jml, 'harga' => number_format($act->harga, 2), 'subtotal' => number_format($act->jml * $act->harga, 2), 'tgl_permintaan' => $act->tgl_permintaan, 'status_permintaan' => $act->status_permintaan, 'pilihan_satuan' => $act->pilihan_satuan, 'merek_tipe' => $act->merek_tipe);
     }
     $kode_sess = $this->session->userdata('puskesmas');
     $kd_prov = $this->inv_barang_model->get_nama('value', 'cl_province', 'code', substr($kode_sess, 0, 2));
     $kd_kab = $this->inv_barang_model->get_nama('value', 'cl_district', 'code', substr($kode_sess, 0, 4));
     $kd_kec = 'KEC. ' . $this->inv_barang_model->get_nama('nama', 'cl_kec', 'code', substr($kode_sess, 0, 7));
     $namapus = $this->inv_barang_model->get_nama('value', 'cl_phc', 'code', 'P' . $kode_sess);
     $tahun = date("Y");
     $datautama = $this->bhp_permintaan_model->get_data_row($id);
     $tgl_permintaan = date("d-m-Y", strtotime($datautama['tgl_permintaan']));
     $kategori_barang = $this->inv_barang_model->get_nama('uraian', 'mst_inv_barang_habispakai_jenis', 'id_mst_inv_barang_habispakai_jenis', $datautama['id_mst_inv_barang_habispakai_jenis']);
     $status = $datautama['status_permintaan'];
     $jumlah_unit = $datautama['jumlah_unit'];
     $nilai_unit = number_format($datautama['nilai_pembelian'], 2);
     $data_puskesmas[] = array('nama_puskesmas' => $namapus, 'kd_prov' => $kd_prov, 'kd_kab' => $kd_kab, 'tahun' => $tahun, 'kategori_barang' => $kategori_barang, 'tgl_permintaan' => $tgl_permintaan, 'status' => $status, 'jumlah_unit' => $jumlah_unit, 'nilai_unit' => $nilai_unit);
     $dir = getcwd() . '/';
     if ($datautama['id_mst_inv_barang_habispakai_jenis'] == '8') {
         $template = $dir . 'public/files/template/inventory/bhp_permintaan_detail_obat.xlsx';
     } else {
         $template = $dir . 'public/files/template/inventory/bhp_permintaan_detail.xlsx';
     }
     $TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);
     // Merge data in the first sheet
     $TBS->MergeBlock('a', $data_tabel);
     $TBS->MergeBlock('b', $data_puskesmas);
     $code = uniqid();
     if ($datautama['id_mst_inv_barang_habispakai_jenis'] == '8') {
         $output_file_name = 'public/files/hasil/hasil_export_bhppermintaandetailobat_' . $code . '.xlsx';
     } else {
         $output_file_name = 'public/files/hasil/hasil_export_bhppermintaandetail_' . $code . '.xlsx';
     }
     $output = $dir . $output_file_name;
     $TBS->Show(OPENTBS_FILE, $output);
     // Also merges all [onshow] automatic fields.
     echo base_url() . $output_file_name;
 }
开发者ID:viktoredz,项目名称:1nf0k35-2016-94rut,代码行数:86,代码来源:bhp_permintaan.php

示例6: clsTinyButStrong

<?php

// Use this PHP File As your Development
// ****************  Default include  ****************
// include All file
include_once '../all.php';
// New template engine object
$TBS = new clsTinyButStrong();
// Load Your HTML file
$TBS->LoadTemplate('index.html');
// <----- Place this script HTML
// ****************************************************
// **************  Write Your Code Here  **************
$title = 'Rojak Engine Examples';
$message = 'Examples';
// Scan All files in current directory
$links = scandir('./');
// Check each link for filter . .. index.php user and all .html
foreach ($links as $key => $link) {
    if (substr($link, -5) == '.html' || $link == '.' || $link == '..' || $link == 'index.php' || $link == 'user') {
        // Remove that array
        unset($links[$key]);
    }
}
// Merge array to HTML
$TBS->MergeBlock('blk1', $links);
// ****************************************************
// Show result
$TBS->Show();
开发者ID:xkid,项目名称:Rojak-Engine,代码行数:29,代码来源:index.php

示例7: dirname

 function excel_upload()
 {
     $this->authentication->verify('srikandi', 'show');
     $data = $this->srikandi_model->json_judul();
     $rows = $data[0]['Rows'];
     $data['title'] = "Informasi dan Kajian";
     $path = dirname(__FILE__) . '/../../public/doc_xls_';
     $TBS = new clsTinyButStrong();
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     $TBS->ResetVarRef(false);
     $TBS->VarRef =& $data;
     $template = $path . 'templates/srikandi.xlsx';
     $TBS->LoadTemplate($template);
     $TBS->MergeBlock('data', $rows);
     $output_file_name = $path . 'export/report_srikandi.xlsx';
     $TBS->Show(OPENTBS_FILE, $output_file_name);
     echo $output_file_name;
 }
开发者ID:viktoredz,项目名称:bpom-spkp,代码行数:18,代码来源:srikandi_kategori.php

示例8: clsTinyButStrong

 function pengadaan_detail_export()
 {
     $this->authentication->verify('inventory', 'show');
     $id = $this->input->post('kode');
     $TBS = new clsTinyButStrong();
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     if ($_POST) {
         $fil = $this->input->post('filterscount');
         $ord = $this->input->post('sortdatafield');
         for ($i = 0; $i < $fil; $i++) {
             $field = $this->input->post('filterdatafield' . $i);
             $value = $this->input->post('filtervalue' . $i);
             if ($field == 'tgl_update') {
                 $value = date("Y-m-d", strtotime($value));
                 $this->db->where($field, $value);
             } elseif ($field != 'year') {
                 $this->db->like($field, $value);
             }
         }
         if (!empty($ord)) {
             $this->db->order_by($ord, $this->input->post('sortorder'));
         }
     }
     $this->db->where('id_inv_hasbispakai_pembelian', $id);
     $rows_all_activity = $this->bhp_pengadaan_model->getItem();
     if ($_POST) {
         $fil = $this->input->post('filterscount');
         $ord = $this->input->post('sortdatafield');
         for ($i = 0; $i < $fil; $i++) {
             $field = $this->input->post('filterdatafield' . $i);
             $value = $this->input->post('filtervalue' . $i);
             if ($field == 'tgl_update') {
                 $value = date("Y-m-d", strtotime($value));
                 $this->db->where($field, $value);
             } elseif ($field != 'year') {
                 $this->db->like($field, $value);
             }
         }
         if (!empty($ord)) {
             $this->db->order_by($ord, $this->input->post('sortorder'));
         }
     }
     if ($this->session->userdata('puskesmas') != '') {
         $this->db->where('inv_inventaris_habispakai_pembelian_item.code_cl_phc', 'P' . $this->session->userdata('puskesmas'));
     }
     $this->db->where('inv_inventaris_habispakai_pembelian_item.id_inv_hasbispakai_pembelian', $id);
     $activity = $this->bhp_pengadaan_model->getItem();
     $no = 1;
     $datadetail = array();
     foreach ($activity as $act) {
         $datadetail[] = array('no' => $no++, 'id_inv_hasbispakai_pembelian' => $act->id_inv_hasbispakai_pembelian, 'id_mst_inv_barang_habispakai' => $act->id_mst_inv_barang_habispakai, 'uraian' => $act->uraian, 'jml' => $act->jml, 'batch' => $act->batch, 'harga' => number_format($act->harga, 2), 'subtotal' => number_format($act->jml * $act->harga, 2), 'tgl_update' => date("d-m-Y", strtotime($act->tgl_update)), 'edit' => 1, 'delete' => 1);
     }
     $data_puskesmas = $this->bhp_pengadaan_model->get_data_row($id);
     $nama_puskesmas = $this->bhp_pengadaan_model->get_data_nama($data_puskesmas['code_cl_phc']);
     $onshow['puskesmas'] = $nama_puskesmas['value'];
     $onshow['tgl_permohonan'] = date("d-m-Y", strtotime($data_puskesmas['tgl_permohonan']));
     $onshow['tgl_kwitansi'] = date("d-m-Y", strtotime($data_puskesmas['tgl_kwitansi']));
     $onshow['nomor_kwitansi'] = $data_puskesmas['nomor_kwitansi'];
     $onshow['nomor_kontrak'] = $data_puskesmas['nomor_kontrak'];
     $onshow['keterangan'] = $data_puskesmas['keterangan'];
     $onshow['jumlah_unit'] = $data_puskesmas['jumlah_unit'];
     $onshow['nilai_pembelian'] = number_format($data_puskesmas['nilai_pembelian'], 2);
     $onshow['tahun'] = date("Y");
     $onshow['pilihan_status_pembelian'] = $this->bhp_pengadaan_model->getPilihan("status_pembelian", $data_puskesmas['pilihan_status_pembelian']);
     $kode_sess = $this->session->userdata('puskesmas');
     $onshow['kd_prov'] = $this->inv_barang_model->get_nama('value', 'cl_province', 'code', substr($kode_sess, 0, 2));
     $onshow['kd_kab'] = $this->inv_barang_model->get_nama('value', 'cl_district', 'code', substr($kode_sess, 0, 4));
     $TBS->ResetVarRef(false);
     $TBS->VarRef =& $onshow;
     $dir = getcwd() . '/';
     if ($data_puskesmas['id_mst_inv_barang_habispakai_jenis'] == '8') {
         $template = $dir . 'public/files/template/inventory/bhp_pengadaanpermohonan_obat.xlsx';
     } else {
         $template = $dir . 'public/files/template/inventory/bhp_pengadaanpermohonan.xlsx';
     }
     $TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);
     $TBS->MergeBlock('a', $datadetail);
     $code = date('Y-m-d-H-i-s');
     $output_file_name = 'public/files/hasil/hasil_detail_export_' . $code . '.xlsx';
     $output = $dir . $output_file_name;
     $TBS->Show(OPENTBS_FILE, $output);
     // Also merges all [onshow] automatic fields.
     echo base_url() . $output_file_name;
 }
开发者ID:viktoredz,项目名称:1nf0k35-2016-94rut,代码行数:84,代码来源:bhp_pengadaan.php

示例9: clsTinyButStrong

 function permohonan_detail_export()
 {
     $code_cl_phc = $this->input->post('code_cl_phc');
     $id = $this->input->post('kode');
     $TBS = new clsTinyButStrong();
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     //[data_tabel.no;block=tbs:row]	[data_tabel.tgl]	[data_tabel.ruangan]	[data_tabel.jumlah]	[data_tabel.keterangan]	[data_tabel.status]
     $this->authentication->verify('inventory', 'show');
     if ($_POST) {
         $fil = $this->input->post('filterscount');
         $ord = $this->input->post('sortdatafield');
         for ($i = 0; $i < $fil; $i++) {
             $field = $this->input->post('filterdatafield' . $i);
             $value = $this->input->post('filtervalue' . $i);
             if ($field == 'tanggal_permohonan') {
                 $value = date("Y-m-d", strtotime($value));
                 $this->db->where($field, $value);
             } elseif ($field != 'year') {
                 $this->db->like($field, $value);
             }
         }
         if (!empty($ord)) {
             $this->db->order_by($ord, $this->input->post('sortorder'));
         }
     }
     #$rows = $this->permohonanbarang_model->get_data($this->input->post('recordstartindex'), $this->input->post('pagesize'));
     $this->db->where('code_cl_phc', $code_cl_phc);
     $activity = $this->permohonanbarang_model->getItem('inv_permohonan_barang_item', array('id_inv_permohonan_barang' => $id))->result();
     $data = array();
     $no = 1;
     $data_tabel = array();
     foreach ($activity as $act) {
         $data_tabel[] = array('no' => $no++, 'nama_barang' => $act->nama_barang, 'jumlah' => $act->jumlah, 'keterangan' => $act->keterangan);
     }
     if (empty($this->input->post('nama_puskesmas')) or $this->input->post('nama_puskesmas') == 'Pilih Puskesmas') {
         $nama = 'Semua Data Puskesmas';
     } else {
         $nama = $this->input->post('nama_puskesmas');
     }
     $tanggal = $this->input->post('tanggal');
     $keterangan = $this->input->post('keterangan');
     $ruang = $this->input->post('ruang');
     $puskesmas = $nama;
     #$data_puskesmas[] = array('nama_puskesmas' => $nama, 'tanggal'=> $tanggal, 'keterangan'=>$keterangan, 'ruang'=>$ruang);
     $data_puskesmas['nama_puskesmas'] = $nama;
     $data_puskesmas['tanggal'] = $tanggal;
     $data_puskesmas['ruang'] = $ruang;
     $data_puskesmas['keterangan'] = $keterangan;
     $TBS->ResetVarRef(false);
     $TBS->VarRef =& $data_puskesmas;
     $template = dirname(__FILE__) . '\\..\\..\\..\\public\\files\\template\\inventory\\permohonan_barang_detail.xlsx';
     $TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);
     // Merge data in the first sheet
     $TBS->MergeBlock('a', $data_tabel);
     #$TBS->MergeBlock('b', $data_puskesmas);
     $code = date('Y-m-d-H-i-s');
     $output_file_name = dirname(__FILE__) . '\\..\\..\\..\\public\\files\\hasil\\hasil_detail_export_' . $code . '.xlsx';
     $TBS->Show(OPENTBS_FILE, $output_file_name);
     // Also merges all [onshow] automatic fields.
     echo base_url() . 'public/files/hasil/hasil_detail_export_' . $code . '.xlsx';
 }
开发者ID:viktoredz,项目名称:epuskesmas,代码行数:61,代码来源:permohonanbarang.php

示例10: array

$data = array();
$data[] = array('rank' => 'A', 'firstname' => 'Sandra', 'name' => 'Hill', 'number' => '1523d', 'score' => 200, 'email_1' => 'sh@tbs.com', 'email_2' => 'sandra@tbs.com', 'email_3' => 's.hill@tbs.com');
$data[] = array('rank' => 'A', 'firstname' => 'Roger', 'name' => 'Smith', 'number' => '1234f', 'score' => 800, 'email_1' => 'rs@tbs.com', 'email_2' => 'robert@tbs.com', 'email_3' => 'r.smith@tbs.com');
$data[] = array('rank' => 'B', 'firstname' => 'William', 'name' => 'Mac Dowell', 'number' => '5491y', 'score' => 130, 'email_1' => 'wmc@tbs.com', 'email_2' => 'william@tbs.com', 'email_3' => 'w.m.dowell@tbs.com');
// Other single data items
$x_num = 3152.456;
$x_pc = 0.2567;
$x_dt = mktime(13, 0, 0, 2, 15, 2010);
$x_bt = true;
$x_bf = false;
$x_delete = 1;
// -----------------
// Load the template
// -----------------
$template = '%template%';
$TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);
// Also merge some [onload] automatic fields (depends of the type of document).
// ----------------------
// Debug mode of the demo
// ----------------------
if (isset($_POST['debug']) && $_POST['debug'] == 'current') {
    $TBS->Plugin(OPENTBS_DEBUG_XML_CURRENT, true);
}
// Display the intented XML of the current sub-file, and exit.
if (isset($_POST['debug']) && $_POST['debug'] == 'info') {
    $TBS->Plugin(OPENTBS_DEBUG_INFO, true);
}
// Display information about the document, and exit.
if (isset($_POST['debug']) && $_POST['debug'] == 'show') {
    $TBS->Plugin(OPENTBS_DEBUG_XML_SHOW);
}
开发者ID:simaostephanie,项目名称:opentbs,代码行数:31,代码来源:_build_canevas.php

示例11: clsTinyButStrong

 function permohonan_export_kibf()
 {
     $TBS = new clsTinyButStrong();
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     //[data_tabel.no;block=tbs:row]	[data_tabel.tgl]	[data_tabel.ruangan]	[data_tabel.jumlah]	[data_tabel.keterangan]	[data_tabel.status]
     $this->authentication->verify('inventory', 'show');
     if ($_POST) {
         $fil = $this->input->post('filterscount');
         $ord = $this->input->post('sortdatafield');
         for ($i = 0; $i < $fil; $i++) {
             $field = $this->input->post('filterdatafield' . $i);
             $value = $this->input->post('filtervalue' . $i);
             if ($field == 'tanggal_mulai') {
                 $value = date("Y-m-d", strtotime($value));
                 $this->db->where($field, $value);
             } elseif ($field != 'year') {
                 $this->db->like($field, $value);
             }
         }
         if (!empty($ord)) {
             $this->db->order_by($ord, $this->input->post('sortorder'));
         }
     }
     if ($this->session->userdata('filterruangan') != '') {
         $filter = $this->session->userdata('filterruangan');
         $this->db->where("id_ruangan", $filter);
     }
     if ($this->input->post('puskes') != '') {
         $this->db->where("id_cl_phc", $this->input->post('puskes'));
     } else {
         $this->db->where("id_cl_phc", $this->session->userdata('filter_cl_phc'));
     }
     $rows_all = $this->inv_barang_model->get_data_golongan_F();
     if ($_POST) {
         $fil = $this->input->post('filterscount');
         $ord = $this->input->post('sortdatafield');
         for ($i = 0; $i < $fil; $i++) {
             $field = $this->input->post('filterdatafield' . $i);
             $value = $this->input->post('filtervalue' . $i);
             if ($field == 'tanggal_mulai') {
                 $value = date("Y-m-d", strtotime($value));
                 $this->db->where($field, $value);
             } elseif ($field != 'year') {
                 $this->db->like($field, $value);
             }
         }
         if (!empty($ord)) {
             $this->db->order_by($ord, $this->input->post('sortorder'));
         }
     }
     if ($this->session->userdata('filterruangan') != '') {
         $filter = $this->session->userdata('filterruangan');
         $this->db->where("id_ruangan", $filter);
     }
     if ($this->input->post('puskes') != '') {
         $this->db->where("id_cl_phc", $this->input->post('puskes'));
     } else {
         $this->db->where("id_cl_phc", $this->session->userdata('filter_cl_phc'));
     }
     $rows = $this->inv_barang_model->get_data_golongan_F();
     $no = 1;
     $data_tabel = array();
     foreach ($rows as $act) {
         $data_tabel[] = array('no' => $no++, 'id_inventaris_barang' => $act->id_inventaris_barang, 'id_mst_inv_barang' => $act->id_mst_inv_barang, 'uraian' => $act->uraian, 'tanah' => $act->tanah, 'beton' => $act->beton, 'tingkat' => $act->tingkat, 'id_pengadaan' => $act->id_pengadaan, 'id_cl_phc' => $act->id_cl_phc, 'register' => $act->register, 'harga' => number_format($act->harga, 2), 'keterangan_pengadaan' => $act->keterangan_pengadaan, 'asal_usul' => $act->asal_usul, 'jumlah' => $act->jumlah, 'barang_kembar_proc' => $act->barang_kembar_proc, 'bangunan' => $act->bangunan, 'pilihan_konstruksi_bertingkat' => $act->pilihan_konstruksi_bertingkat, 'pilihan_konstruksi_beton' => $act->pilihan_konstruksi_beton, 'luas' => $act->luas, 'lokasi' => $act->lokasi, 'dokumen_tanggal' => $act->dokumen_tanggal, 'dokumen_nomor' => $act->dokumen_nomor, 'tanggal_mulai' => $act->tanggal_mulai, 'pilihan_status_tanah' => $act->pilihan_status_tanah, 'edit' => 1, 'delete' => 1);
     }
     $puskes = $this->input->post('puskes');
     $ruang = $this->input->post('ruang');
     $tanggal_export = $this->input->post('filter_tanggal');
     if (empty($puskes) or $puskes == 'Pilih Puskesmas') {
         $kode = 'P ' . $this->session->userdata('puskesmas');
         $kd_prov = $this->inv_barang_model->get_nama('value', 'cl_province', 'code', substr($kode, 2, 2));
         $kd_kab = $this->inv_barang_model->get_nama('value', 'cl_district', 'code', substr($kode, 2, 4));
         $kd_kec = 'KEC. ' . $this->inv_barang_model->get_nama('nama', 'cl_kec', 'code', substr($kode, 2, 7));
         $kd_upb = 'KEC. ' . $this->inv_barang_model->get_nama('nama', 'cl_kec', 'code', substr($kode, 2, 7));
     } else {
         $kode_sess = $this->session->userdata('puskesmas');
         $kd_prov = $this->inv_barang_model->get_nama('value', 'cl_province', 'code', substr($kode_sess, 0, 2));
         $kd_kab = $this->inv_barang_model->get_nama('value', 'cl_district', 'code', substr($kode_sess, 0, 4));
         $kd_kec = 'KEC. ' . $this->inv_barang_model->get_nama('nama', 'cl_kec', 'code', substr($kode_sess, 0, 7));
         $kd_upb = $this->input->post('namepuskes');
         $kode = $this->input->post('puskes');
     }
     if (empty($ruang) or $ruang == 'Pilih Ruangan') {
         $namaruang = 'Semua Data Ruangan';
     } else {
         $namaruang = $this->input->post('ruang');
     }
     if (empty($tanggal_export) or $tanggal_export == '') {
         $tanggal_export = date('d-m-Y');
     } else {
         $tanggals = explode("-", $this->input->post('filter_tanggal'));
         $tanggal_export = $tanggals[2] . '-' . $tanggals[1] . '-' . $tanggals[0];
     }
     $data_puskesmas[] = array('kode' => $kode, 'namaruang' => $namaruang, 'kd_prov' => $kd_prov, 'kd_kab' => $kd_kab, 'kd_kec' => $kd_kec, 'kd_upb' => $kd_upb, 'tanggal_export' => $tanggal_export);
     $dir = getcwd() . '/';
     $template = $dir . 'public/files/template/inventory/kibf.xlsx';
     $TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);
     // Merge data in the first sheet
     $TBS->MergeBlock('a', $data_tabel);
     $TBS->MergeBlock('b', $data_puskesmas);
//.........这里部分代码省略.........
开发者ID:viktoredz,项目名称:1nf0k35-2016,代码行数:101,代码来源:export.php

示例12: clsTinyButStrong

<?php

if (isset($this)) {
    // We are under the TBS Subtemplate Mode => variables are local by default and the TBS object is referenced by variable $this.
    $TBS =& $this;
} else {
    // This sub-script can also be run under the normal mode => its corresponding template will be displayed like a main template.
    include_once 'tbs_class.php';
    $TBS = new clsTinyButStrong();
}
global $err_log;
// Don't forget that variables are local by default in the Subtemplate Mode.
if (isset($_POST['btn_ok'])) {
    // Imagine we check the login/password...
    $err_log = 1;
} else {
    $err_log = 0;
}
$TBS->LoadTemplate('tbs_us_examples_subtpl_login.htm');
$TBS->Show();
// When calling this method in Subtemplate Mode, the main script won't end, and this merged subtemplated will be inserted into the main template.
开发者ID:clickdimension,项目名称:tinybutstrong,代码行数:21,代码来源:tbs_us_examples_subtpl_login.php

示例13: clsTinyButStrong

 function export_detail()
 {
     $this->authentication->verify('inventory', 'show');
     $TBS = new clsTinyButStrong();
     $TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
     $filter_group = $this->session->userdata('filter_group');
     $no = 1;
     $data_tabel = array();
     if (!empty($filter_group) and $filter_group == '1') {
         $rows = $this->inv_ruangan_model->get_data_detail_group();
         $data = array();
         foreach ($rows as $act) {
             $act['no'] = $no++;
             $act['harga'] = number_format($act['harga']);
             $act['kode_barang'] = substr(chunk_split($act['id_mst_inv_barang'], 2, '.'), 0, 14);
             $act['keterangan'] = "";
             $data_tabel[] = $act;
         }
     } else {
         $rows = $this->inv_ruangan_model->get_data_detail();
         $data = array();
         foreach ($rows as $act) {
             $act['no'] = $no++;
             $act['kode_barang'] = substr(chunk_split($act['id_mst_inv_barang'], 2, '.'), 0, 14);
             $act['harga'] = number_format($act['harga']);
             $data_tabel[] = $act;
         }
     }
     $code_cl_phc = $this->input->post('filter_code_cl_phc');
     $ruang = $this->input->post('filter_id_ruang');
     $tanggal = $this->input->post('filter_tanggal');
     if (empty($code_cl_phc) or $code_cl_phc == 'Pilih Puskesmas') {
         $kode = "P" . $this->session->userdata('puskesmas');
         $nama = "Data Seluruh Puskesmas";
     } else {
         $kode = $this->input->post('filter_code_cl_phc');
         $puskesmas = $this->inv_barang_model->get_nama('value', 'cl_phc', 'code', $kode);
         $nama = $puskesmas;
     }
     if (empty($ruang) or $ruang == 'Pilih Ruangan') {
         $namaruang = 'Data Seluruh Ruangan';
     } else {
         $this->db->where('id_mst_inv_ruangan', $ruang);
         $this->db->where('code_cl_phc', $kode);
         $ruang = $this->db->get('mst_inv_ruangan')->row();
         $namaruang = !empty($ruang) ? $ruang->nama_ruangan : "-";
     }
     $propinsi = $this->inv_barang_model->get_nama('value', 'cl_province', 'code', substr($kode, 1, 2));
     $kabkota = $this->inv_barang_model->get_nama('value', 'cl_district', 'code', substr($kode, 1, 4));
     $kecamatan = $this->inv_barang_model->get_nama('nama', 'cl_kec', 'code', substr($kode, 1, 7));
     $tanggals = explode("-", $tanggal);
     $tanggal_export = $tanggals[2] . '-' . $tanggals[1] . '-' . $tanggals[0];
     $data_puskesmas['puskesmas'] = $nama;
     $data_puskesmas['tanggal'] = $tanggal_export;
     $data_puskesmas['ruangan'] = $namaruang;
     $data_puskesmas['kecamatan'] = $kecamatan;
     $data_puskesmas['kabkota'] = $kabkota;
     $data_puskesmas['propinsi'] = $propinsi;
     $TBS->ResetVarRef(false);
     $TBS->VarRef =& $data_puskesmas;
     $dir = getcwd() . '/';
     $template = $dir . 'public/files/template/inventory/kir.xlsx';
     $TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);
     $TBS->MergeBlock('a', $data_tabel);
     $code = date('Y-m-d-H-i-s');
     $output_file_name = 'public/files/hasil/hasil_kir_' . $code . '.xlsx';
     $output = $dir . $output_file_name;
     $TBS->Show(OPENTBS_FILE, $output);
     // Also merges all [onshow] automatic fields.
     echo base_url() . $output_file_name;
 }
开发者ID:viktoredz,项目名称:1nf0k35-2016-94rut-d1n45,代码行数:71,代码来源:inv_ruangan.php

示例14: clsTinyButStrong

<?php

include_once 'tbs_class.php';
$TBS = new clsTinyButStrong();
include_once 'tbs_plugin_cache.php';
// Load the Cache System library
$TBS->PlugIn(TBS_INSTALL, TBS_CACHE, dirname(__FILE__));
// Install the plug-in
// Call the Cache System which is deciding wheter to continue and store the result into a cache file, or to display a cached page.
if ($TBS->PlugIn(TBS_CACHE, 'testcache', 10)) {
} else {
    $TBS->LoadTemplate('tbs_us_examples_cache.htm');
    $TBS->Show();
}
开发者ID:reggi49,项目名称:plansys,代码行数:14,代码来源:tbs_us_examples_cache.php

示例15: isset

<?php

include_once 'tbs_class.php';
//Connexion to the database
/* Use the example below.
$cnx_id = sqlite_open('mydatabase.dat');
*/
$sql_ok = isset($cnx_id) && is_resource($cnx_id) ? 1 : 0;
if ($sql_ok == 0) {
    $cnx_id = 'clear';
}
// makes the block to be cleared instead of merged with an SQL query.
$TBS = new clsTinyButStrong();
$TBS->LoadTemplate('tbs_us_examples_datamysql.htm');
$TBS->MergeBlock('blk1', $cnx_id, 'SELECT * FROM t_tbs_exemples');
$TBS->Show();
开发者ID:sterichards,项目名称:lib_tbs,代码行数:16,代码来源:tbs_us_examples_datasqlite.php


注:本文中的clsTinyButStrong::LoadTemplate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。