本文整理汇总了PHP中URL::Base方法的典型用法代码示例。如果您正苦于以下问题:PHP URL::Base方法的具体用法?PHP URL::Base怎么用?PHP URL::Base使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URL
的用法示例。
在下文中一共展示了URL::Base方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _actionIndex
function _actionIndex()
{
if ($this->post['act'] == 'komentar') {
$return = $this->SaveKomantar();
if ($return) {
$this->SetFlash('suc_msg', "Terima kasih atas kritik dan saran Anda.");
URL::Redirect('home');
} else {
$this->SetFlash('row_komentar', $this->post);
$this->SetFlash('err_msg', "Data gagal disimpan");
URL::Redirect('#kritiksaran');
}
}
$this->model = new JadwalEventModel();
$events = $this->model->GetJadwalJson();
$this->data['add_plugin'] .= "<script>\n\t\t\$(document).ready(function () {\n\n\t\tvar all_events = {$events};\n\n\t\tvar cal0 = \$('.calendar1');\n\t\tvar cal1 = \$('.calendar2');\n\n\t\tcal0.fullCalendar({\n\t\t header: {\n\t\t left: 'prev,next today',\n\t\t center: '',\n\t\t right: 'title'\n\t\t },\n\t\t events: all_events,\n\t\t viewRender: function (view, element) {\n\t\t cur = view.intervalStart;\n\t\t d = moment(cur).add('months', 1);\n\t\t cal1.fullCalendar('gotoDate', d);\n\t\t }\n\t\t});\n\n\t\tcal1.fullCalendar({\n\t\t header: {\n\t\t left: '',\n\t\t center: '',\n\t\t right: 'title'\n\t\t },\n\t\t defaultDate: moment(new Date()).add('months', 1),\n\t\t events: all_events\n\t\t});\n\t\t});</script>";
$this->data['add_plugin'] .= '<script src="' . URL::Base() . 'assets/js/calendar/moment.min.js"></script>';
$this->data['add_plugin'] .= '<script src="' . URL::Base() . 'assets/js/calendar/fullcalendar.min.js"></script>';
$this->data['add_plugin'] .= '<link href="' . URL::Base() . 'assets/js/calendar/fullcalendar.min.css" rel="stylesheet">';
$this->model = new JadwalDokterModel();
$events = $this->model->GetJadwalJson();
$this->data['add_plugin'] .= '<script>$(function(){$(".calendar").fullCalendar({events:' . $events . '});});</script>';
if ($this->session->Get($this->ctrl . 'row_komentar')) {
$this->data['row_komentar'] = $this->session->GetFlash($this->ctrl . 'row_komentar');
}
$this->view("home");
}
示例2: before
public function before()
{
parent::before();
$this->template->title = "eSports Bucks - Tournament Organization Tool";
$this->template->errors = array();
$this->template->media_base = URL::Base() . 'media/';
$this->user = Auth::instance()->get_user();
include 'media/functions/esb.php';
}
示例3: _actionIndex
function _actionIndex($page = 1)
{
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$this->data['total_rows'] = $this->data['list']['total'];
$param_paging = array('base_url' => URL::Base("materi/index"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit, 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li><span class="pagination__page--current">', 'cur_tag_close' => '</span></li>', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>', 'anchor_class' => 'pagination__page');
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例4: _actionIndex
function _actionIndex($page = 1)
{
$this->data['header'] = array(array('name' => 'nama', 'label' => 'Nama', 'width' => "auto"), array('name' => 'isi', 'label' => 'Isi', 'width' => "auto"), array('name' => 'is_approve', 'label' => 'Tampil', 'width' => "100px", 'type' => 'list', 'value' => array('' => '-pilih-', '0' => 'Tidak', '1' => 'Iya')));
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("panelbackend/testimoni/index"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit);
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例5: _actionIndex
function _actionIndex($page = 1)
{
$this->data['header'] = array(array('name' => 'id_member', 'label' => 'Nama', 'width' => "auto"), array('name' => 'tgl_pinjam', 'label' => 'Tgl. Pinjam', 'type' => 'date'), array('name' => 'tgl_kembali', 'label' => 'Tgl. Kembali', 'type' => 'date'), array('name' => 'jaminan', 'label' => 'Jaminan', 'width' => "auto"), array('name' => 'kode_jaminan', 'label' => 'Kode Jaminan', 'width' => "auto"));
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("panelbackend/pinjam/index"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit);
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例6: _actionIndex
function _actionIndex($page = 1)
{
$this->data['header'] = array(array('name' => 'id_member', 'label' => 'ID Member', 'width' => "auto"), array('name' => 'nama', 'label' => 'Nama', 'width' => "auto"), array('name' => 'tgl_lahir', 'label' => 'Tgl Lahir', 'width' => "auto"), array('name' => 'anggota_sejak', 'label' => 'Anggota Sejak', 'width' => "auto"), array('name' => 'tgl_registrasi', 'label' => 'Tgl Registrasi', 'width' => "auto"), array('name' => 'berlaku_sampai', 'label' => 'Berlaku Sampai', 'width' => "auto"), array('name' => 'jenis_kelamin', 'label' => 'Jenis Kelamin', 'width' => "auto"), array('name' => 'alamat', 'label' => 'Alamat', 'width' => "auto"), array('name' => 'kode_pos', 'label' => 'Kode Pos', 'width' => "auto"), array('name' => 'alamat_surat', 'label' => 'Alamat Surat', 'width' => "auto"), array('name' => 'no_hp', 'label' => 'Hp', 'width' => "auto"), array('name' => 'no_identitas', 'label' => 'No. ID', 'width' => "auto"), array('name' => 'catatan', 'label' => 'Catatan', 'width' => "auto"), array('name' => 'email', 'label' => 'Email', 'width' => "auto"), array('name' => 'password', 'label' => 'Password', 'width' => "auto"));
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("panelbackend/member/index"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit);
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例7: _actionIndex
function _actionIndex($page = 1)
{
$this->data['header'] = array(array('name' => 'nama', 'label' => 'Nama', 'width' => "auto"), array('name' => 'telp', 'label' => 'Telp.', 'width' => "auto"), array('name' => 'alamat', 'label' => 'Alamat', 'width' => "auto"));
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("panelbackend/petugas/index"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit);
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例8: _actionIndex
function _actionIndex($page = 1)
{
$this->data['header'] = array(array('name' => 'nama', 'label' => 'Nama', 'width' => "auto"), array('name' => 'id_lokasi', 'label' => 'Lokasi', 'width' => "auto", 'type' => 'list', 'value' => $this->data['lokasiarr']), array('name' => 'jumlah', 'label' => 'Jumlah', 'width' => "auto"));
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("panelbackend/buku/index"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit);
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例9: _actionIndex
function _actionIndex($halaman, $page = 1)
{
$this->_setHalaman($halaman);
$this->data['header'] = array(array('name' => 'nama', 'label' => 'Judul', 'width' => "auto"), array('name' => 'isi', 'label' => 'Isi', 'width' => "auto"));
$this->_setFilter(" halaman = '{$halaman}' ");
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("panelbackend/page/index/{$halaman}"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit);
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例10: _actionIndex
function _actionIndex($halaman, $page = 1)
{
$this->_setHalaman($halaman);
$filter = " halaman = '{$halaman}' ";
$this->_setFilter($filter);
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("page/index/{$halaman}"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit, 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="selected"><span>', 'cur_tag_close' => '</span></li>', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>');
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例11: _actionIndex
function _actionIndex($page = 1, $jadwal_kategori_id = 0)
{
$this->data['header'] = array(array('name' => 'jadwal_kategori_id', 'label' => 'Spesialis', 'width' => "300px", 'type' => 'list', 'value' => $this->data['listkategori']), array('name' => 'nama', 'label' => 'Nama', 'width' => "auto"));
if ($jadwal_kategori_id) {
$this->post['act'] = 'list_search';
$this->post['list_search'] = array('jadwal_kategori_id' => $jadwal_kategori_id);
}
$this->data['list'] = $this->_getList($page);
$this->data['page'] = $page;
$param_paging = array('base_url' => URL::Base("jadwal/index"), 'cur_page' => $page, 'total_rows' => $this->data['list']['total'], 'per_page' => $this->limit, 'first_tag_open' => '<li>', 'first_tag_close' => '</li>', 'last_tag_open' => '<li>', 'last_tag_close' => '</li>', 'cur_tag_open' => '<li class="selected"><span>', 'cur_tag_close' => '</span></li>', 'next_tag_open' => '<li>', 'next_tag_close' => '</li>', 'prev_tag_open' => '<li>', 'prev_tag_close' => '</li>', 'num_tag_open' => '<li>', 'num_tag_close' => '</li>');
$paging = new Pagination($param_paging);
$this->data['paging'] = $paging->create_links();
$this->data['limit'] = $this->limit;
$this->data['limit_arr'] = $this->limit_arr;
$this->View($this->viewlist);
}
示例12: post_register
public function post_register()
{
$rules = array('regName' => 'required|match:/[a-z]+/', 'regLastName' => 'required|match:/[a-z]+/', 'regMail' => 'required|unique:users,email', 'regMail2' => 'required', 'regPassword' => 'required|max:18|min:3', 'regPassword2' => 'same:regPassword', 'regDate' => 'before:01/01/1998', 'regCell' => 'required');
$vld = Validator::make(Input::all(), $rules);
if ($vld->fails()) {
$getCity = City::all();
$get1stTowns = Town::where('city_id', '=', 1)->get();
return View::make('user.register')->with('city', $getCity)->with('towns', $get1stTowns);
}
$data = Input::all();
//Gender Validation
if ($data['regGender'] === 'Woman') {
$data['regGender'] = 0;
} elseif ($data['regGender'] === 'Man') {
$data['regGender'] = 1;
} else {
$data['regGender'] = -1;
}
//Date Validation
$MySQLDate = date('Y-m-d', strtotime(str_replace('/', '-', $data['regDate'])));
try {
// create the user
$user = Sentry::user()->register(array('email' => $data['regMail'], 'password' => $data['regPassword'], 'metadata' => array('first_name' => $data['regName'], 'last_name' => $data['regLastName'], 'birth_date' => $MySQLDate, 'city' => $data['regCity'], 'town' => $data['regTown'], 'phone' => $data['regPhone'], 'cell_phone' => $data['regCell'], 'sex' => $data['regGender'])));
if ($user) {
// the user was created
$_user = Sentry::user($user['id']);
$link = URL::Base() . '/user/activate/' . $user['hash'];
$name = $_user->metadata['first_name'] . ' ' . $_user->metadata['last_name'];
$to = $_user['email'];
sendActivation($to, $name, $link);
} else {
return Response::error('500');
}
} catch (Sentry\SentryException $e) {
return View::make('user.register')->with('error', $e->getMessage());
}
return View::make('user.register-complete');
}
示例13: SetAccessRole
protected function SetAccessRole($action = "")
{
// ceck referer from host or not
if (static::$referer == true and str_replace('/', '', str_replace('backend', '', str_replace('index.php', '', $_SERVER['HTTP_REFERER']))) != str_replace('/', '', str_replace('backend', '', str_replace('index.php', '', URL::Base())))) {
$this->Error404();
exit;
}
// set private area
if (static::$private) {
// ceck login
if (!$_SESSION[SESSION_APP]['login']) {
URL::Redirect('panelbackend/login', 'client');
}
if (static::$role) {
// ceck access from database model authorization
$rolechache = $this->auth->GetAccessRole($this->router->uri, $this->router->methode);
if (!$rolechache) {
$this->Error403();
exit;
}
}
}
}
示例14: Plugin
protected function Plugin()
{
if (!count($this->plugin_arr)) {
return;
}
#chosen
$plugin['chosen'] .= '<script src="' . URL::Base() . 'assets/js/chosen.jquery.js"></script>';
$plugin['chosen'] .= "<script>\$(function() {\n \$('.chosen-select').chosen({width:'100%'});\n \$('.chosen-select-deselect').chosen({ allow_single_deselect: true });\n });</script>";
$plugin['chosen'] .= '<link rel="stylesheet" href="' . URL::Base() . 'assets/css/bootstrap-chosen.css" />';
#date picker
$plugin['datepicker'] .= '<script src="' . URL::Base() . 'assets/js/datepicker/js/moment.min.js"></script>';
$plugin['datepicker'] .= '<script src="' . URL::Base() . 'assets/js/datepicker/js/bootstrap-datetimepicker.js"></script>';
$plugin['datepicker'] .= '<script>$(function(){$(".datepicker").datetimepicker({format: "YYYY-MM-DD",useCurrent:false});});</script>';
$plugin['datepicker'] .= '<script>$(function(){$(".datetimepicker").datetimepicker({format: "YYYY-MM-DD HH:mm:ss",useCurrent:false});});</script>';
$plugin['datepicker'] .= '<link rel="stylesheet" href="' . URL::Base() . 'assets/js/datepicker/css/bootstrap-datetimepicker.min.css" />';
#date picker
//$plugin['autocomplate'] = '<script src="'.URL::Base().'assets/js/typeahead.bundle.js"></script>';
$plugin['autocomplete'] = '<script src="' . URL::Base() . 'assets/js/bootstrap3-typeahead.min.js"></script>';
$plugin_arr = array_unique(array_values($this->plugin_arr));
foreach ($plugin_arr as $k => $v) {
$this->data['add_plugin'] .= $plugin[$v] . "\n";
}
}
示例15: foreach
<thead>
<?php
echo UI::showHeader($header, $filter_arr, $list_sort, $list_order);
?>
</thead>
<tbody>
<?php
$i = ($page - 1) * $limit;
foreach ($list['rows'] as $rows) {
$i++;
echo "<tr>";
echo "<td>{$i}</td>";
foreach ($header as $rows1) {
$val = $rows[$rows1['name']];
if ($rows1['name'] == 'id_member') {
echo "<td><a href='" . ($url = URL::Base($page_ctrl . "/detail/{$rows[$pk]}")) . "'>{$val}</a></td>";
} else {
switch ($rows1['type']) {
case 'list':
echo "<td>" . $rows1["value"][$val] . "</td>";
break;
case 'date':
echo "<td>" . Eng2Ind($val) . "</td>";
break;
default:
echo "<td>{$val}</td>";
break;
}
}
}
echo "<td style='text-align:right'>\r\n \t" . UI::getButton('edit', $rows[$pk], 'class="btn btn-xs btn-warning"') . "\r\n\t\t" . UI::getButton('delete', $rows[$pk], 'class="btn btn-xs btn-danger"') . "\r\n \t</td>";