本文整理汇总了PHP中indonesian_date函数的典型用法代码示例。如果您正苦于以下问题:PHP indonesian_date函数的具体用法?PHP indonesian_date怎么用?PHP indonesian_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了indonesian_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: category
/**
* Lists the posts in a specific category.
*
* @param string $slug The slug of the category.
*/
public function category($slug = '')
{
$slug or redirect('news');
// Get category data
$category = $this->news_categories_m->get_by('slug', $slug) or show_404();
// Get the news posts
$params = array('stream' => 'news', 'namespace' => 'news', 'limit' => Settings::get('records_per_page'), 'where' => "`status` = 'live' AND `category_id` = '{$category->id}'", 'paginate' => 'yes', 'pag_segment' => 4);
$posts = $this->streams->entries->get_entries($params);
// Process posts
foreach ($posts['entries'] as &$post) {
$post['date'] = indonesian_date(date('Y-m-d H:i:s', $post['created_on']));
if (file_exists(UPLOAD_PATH . 'news/' . $post['image']) && is_file(UPLOAD_PATH . 'news/' . $post['image'])) {
$image = UPLOAD_PATH . 'news/' . $post['image'];
} else {
$image = UPLOAD_PATH . 'no_image.jpg';
}
//$post['thumb_100x100'] = $this->image_m->resize($image, 100, 100, 'crop');
$post['thumb'] = $this->image_m->resize($image, 200, 145, 'crop');
$this->_process_post($post);
}
// Set meta description based on post titles
$meta = $this->_posts_metadata($posts['entries']);
// Build the page
$this->template->title($this->module_details['name'], $category->title)->set_metadata('description', $category->title . '. ' . $meta['description'])->set_metadata('keywords', $category->title)->set_breadcrumb(lang('news:news_title'), 'news')->set_breadcrumb($category->title)->set('pagination', $posts['pagination'])->set_stream($this->stream->stream_slug, $this->stream->stream_namespace)->set('posts', $posts['entries'])->set('category', (array) $category)->set_layout('detail.html')->build('posts');
}
示例2: view
public function view($id = 0)
{
if (!$id) {
redirect('gallery');
}
$id = $this->core->decode($id);
$post = $this->gallery_m->get_by_id($id);
$post->date = indonesian_date($post->created_on);
$post->video = base_url(UPLOAD_PATH . 'gallery/' . $post->file);
$this->template->title($this->module_details['name'])->set('post', array($post))->build('view', array('page' => array('title' => 'Gallery')));
}
示例3: view
public function view($id = 0)
{
if (!$id) {
redirect('videos');
}
$id = $this->core->decode($id);
$post = $this->videos_m->get_by_id($id);
$post->date = indonesian_date($post->created_on);
//$post->video = base_url(UPLOAD_PATH.'videos/'.$post->file);
$json_output = @file_get_contents("http://gdata.youtube.com/feeds/api/videos/{$post->video_id}?v=2&alt=json");
$json = json_decode($json_output, TRUE);
$post->title = $json['entry']['title']['$t'];
$post->description = $json['entry']['media$group']['media$description']['$t'];
$this->template->title($this->module_details['name'])->set('post', array($post))->build('view', array('page' => array('title' => 'Video')));
}
示例4: show
public function show($id = 0, $extra = '')
{
if (!$id) {
redirect('kasus');
}
$id = $this->core->decode($id);
$post = new stdClass();
$post = $this->kasus_m->get_by_id($id);
if ($post) {
$post->date = indonesian_date($post->created_on);
if (file_exists(UPLOAD_PATH . 'kasus/' . $post->image) && is_file(UPLOAD_PATH . 'kasus/' . $post->image)) {
$image = UPLOAD_PATH . 'kasus/' . $post->image;
} else {
$image = UPLOAD_PATH . 'no_image.jpg';
}
$this->load->model('files/image_m');
$post->thumb_detail = $this->image_m->resize($image, 200, 150, 'crop');
}
$this->template->title($this->module_details['name'])->set('post', array($post))->build('show', array('page' => array('title' => 'kasus')));
}
示例5: index
/**
* Index
*
* List out the alert posts.
*
* URIs such as `alert/page/x` also route here.
*/
public function index()
{
// Get our comment count whil we're at it.
$this->row_m->sql['select'][] = "(SELECT COUNT(id) FROM " . $this->db->protect_identifiers('comments', true) . " WHERE module='alert'\n\t\t\t\tAND is_active='1' AND entry_key='alert:post' AND entry_plural='alert:posts'\n\t\t\t\tAND entry_id=" . $this->db->protect_identifiers('alert.id', true) . ") as `comment_count`";
// Get the latest alert posts
$params = array('stream' => 'alert', 'namespace' => 'alert', 'limit' => Settings::get('records_per_page'), 'where' => "`status` = 'live'", 'paginate' => 'yes', 'pag_base' => site_url('alert/page'), 'pag_segment' => 3);
$posts = $this->streams->entries->get_entries($params);
// Process posts
foreach ($posts['entries'] as &$post) {
$post['date'] = indonesian_date(date('Y-m-d H:i:s', $post['created_on']));
if (file_exists(UPLOAD_PATH . 'alert/' . $post['image']) && is_file(UPLOAD_PATH . 'alert/' . $post['image'])) {
$image = UPLOAD_PATH . 'alert/' . $post['image'];
} else {
$image = UPLOAD_PATH . 'no_image.jpg';
}
$post['thumb_100x100'] = $this->image_m->resize($image, 100, 100, 'crop');
$this->_process_post($post);
}
// Set meta description based on post titles
$meta = $this->_posts_metadata($posts['entries']);
$data = array('pagination' => $posts['pagination'], 'posts' => $posts['entries']);
$this->template->title($this->module_details['name'])->set_breadcrumb(lang('alert:alert_title'))->set_metadata('og:title', $this->module_details['name'], 'og')->set_metadata('og:type', 'alert', 'og')->set_metadata('og:url', current_url(), 'og')->set_metadata('og:description', $meta['description'], 'og')->set_metadata('description', $meta['description'])->set_metadata('keywords', $meta['keywords'])->set_stream($this->stream->stream_slug, $this->stream->stream_namespace)->set('posts', $posts['entries'])->set('pagination', $posts['pagination'])->build('posts', array('page' => array('title' => lang('alert:alert_title'))));
}
示例6: foreach
<?php
foreach ($post as $p) {
?>
<div style="background:#ddd; margin:0 0 10px 0; padding: 10px; border-radius:10px;">
<h4><a href="<?php
echo site_url('/news/' . date('Y/m/d', strtotime($p['created'])) . '/' . $p['slug']);
?>
"><?php
echo $p['title'];
?>
</a></h4>
<span class="date"><?php
echo indonesian_date($p['created']);
?>
</span>
<p style="margin:0 0 20px 0; width:auto;"><?php
echo $p['intro'];
?>
<br /><br />
<a href="<?php
echo site_url('/news/' . date('Y/m/d', strtotime($p['created'])) . '/' . $p['slug']);
?>
" class="btn btn-small btn-info" style="color:#fff;">Baca selengkapnya</a>
</p>
<div style="clear:both;"></div>
</div>
<?php
}
示例7: indonesian_date
$(".navbar-brand img").css('height', '50px');
});
</script>
<div style="margin-top: 100px; margin-bottom: 100px;">
<div class="col-md-8 col-md-offset-2">
<h1><?php
echo $entry->cal_name;
?>
</h1>
<p>
Mulai : <?php
echo indonesian_date($entry->cal_begin);
?>
<br>
Sampai : <?php
echo indonesian_date($entry->cal_end);
?>
</p>
<p><?php
echo tot($entry->cal_descr);
?>
</p>
<p><?php
echo $mytype->cal_type_name;
?>
</p>
<div style="text-align: center; padding-top: 30px;">
<button class="btn btn-default" style="width: 70%;">Daftar</button>
</div>
</div>
<div class="clearfix"></div>
示例8: p
function p()
{
$id = isset($_GET['id']) ? addslashes($_GET['id']) : 0;
if ($id) {
$page = new Page();
$page->getByID($id);
if (!isset($page->post_title) || $page->post_title == '') {
die('Not Found');
}
//add channel feb 2015
$a = NewsChannel::myChannels();
if ($page->page_channel_id > 0) {
if (!in_array($page->page_channel_id, $a)) {
echo 'Not Authorize To View';
return "";
}
}
$pc = new PageContainer();
if ($page->post_gallery_id > 0) {
$pc->getByID($page->post_gallery_id);
}
$page->setSEO();
$gw = new GalleryWeb();
?>
<style>
.pl_file_item {
padding : 10px;
clear : both;
text-decoration : underline;
color : #0072b1;
cursor : pointer;
margin : 5px;
background-color : #efefef;
}
.if_text {
height : 30px;
line-height : 30px;
float : left;
margin-left : 10px;
}
.fotoIF {
width : 30px;
height : 30px;
overflow : hidden;
float : left;
}
.fotoIF img {
width : 30px;
}
.h3pv {
font-size : 18px;
border-bottom : 1px dashed #333;
padding-bottom : 10px;
margin-bottom : 0px;
}
</style>
<h1 style="padding-bottom: 0; margin-bottom: 0; margin-bottom: 10px;"><?php
echo stripslashes($page->post_title);
?>
</h1>
<div class="breadcrumbs">Pages
<?php
if ($page->post_gallery_id > 0) {
?>
/
<a href="<?php
echo _SPPATH;
?>
pagecontainer?mode=<?php
echo $pc->container_id;
?>
"><?php
echo $pc->container_name;
?>
</a><?php
}
?>
</div>
<small style="font-size: 12px;"><?php
echo indonesian_date($page->post_modified);
?>
</small>
<?php
if ($page->post_image != "") {
?>
<div class="bigimage"
style="padding-bottom: 10px;">
<img style="width: 100%; padding-top: 20px;"
src="<?php
echo _SPPATH . $gw->uploadURL . $page->post_image;
?>
">
</div>
<?php
//.........这里部分代码省略.........
示例9: indonesian_date_custom
function indonesian_date_custom($date)
{
return 'Pukul : ' . indonesian_date($date, 'H:i') . '<br>' . indonesian_date($date, 'l, j F Y', '');
}
示例10: indonesian_date
">
<h2 class="post-title">
<?php
echo $p->topic_title;
?>
</h2>
<h3 class="post-subtitle">
<?php
if ($text != "") {
echo $text . "...";
}
?>
</h3>
</a>
<p class="post-meta">Posted on <?php
echo indonesian_date($p->topic_date);
?>
</p>
<?php
if ($p->topic_image != "") {
?>
</div><div class="clearfix"></div>
<?php
}
?>
</div>
<hr>
<?php
}
示例11: res
function res()
{
// echo IMBAuth::createOAuth();
// echo "<br>";
// echo $_GET['token'];
IMBAuth::checkOAuth();
$id = addslashes($_GET['id']);
// echo $id;
if ($id == "" || $id < 1) {
die("No ID");
}
$ps = new PushNotCamp();
$ps->getByID($id);
// pr($ps);
$pss = new GCMResult();
$arrs = $pss->getWhere("camp_id = '{$id}' ORDER BY gcm_date DESC");
?>
<html>
<head>
<link href="<?php
echo _SPPATH;
?>
themes/adminlte/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="<?php
echo _SPPATH;
?>
themes/adminlte/css/jqueryui.css">
<script src="<?php
echo _SPPATH;
?>
themes/adminlte/js/jquery-1.11.1.min.js"></script>
<script src="<?php
echo _SPPATH;
?>
js/jqueryui.js"></script>
<script src="<?php
echo _SPPATH;
?>
themes/adminlte/js/bootstrap.min.js" type="text/javascript"></script>
</head>
<body>
<div id="wait" style="display: none; position: absolute; width: 100%; line-height: 30px; text-align: center; font-weight: bold;">
<span style="background-color: red; color:white; padding: 10px; margin-top: 20px;">Loading....</span></div>
<div class="container">
<h1><?php
echo $ps->camp_name;
?>
</h1>
<table class="table table-bordered">
<thead>
<tr>
<th>No.</th>
<th>Date</th>
<th>Is Test?</th>
<th>Success</th>
<th>Failure</th>
<th>Summary</th>
<th>Results</th>
</tr>
<?php
$cnt = 0;
foreach ($arrs as $cc) {
$cnt++;
?>
<tr>
<td>
<?php
echo $cnt;
?>
</td>
<td>
<?php
echo indonesian_date($cc->gcm_date);
?>
</td>
<td>
<?php
if ($cc->gcm_test) {
echo "Yes";
} else {
echo "No";
}
?>
</td>
<td>
<?php
echo $cc->success;
?>
</td>
<td>
<?php
echo $cc->failure;
?>
</td>
<td>
<?php
echo round($cc->success / ($cc->failure + $cc->success) * 100, 3);
echo " %";
?>
//.........这里部分代码省略.........
示例12: waktu
<script type="text/javascript">
// 1 detik = 1000
window.setTimeout("waktu()",1000);
function waktu() {
var tanggal = new Date();
setTimeout("waktu()",1000);
document.getElementById("output").innerHTML = tanggal.getHours()+":"+tanggal.getMinutes()+":"+tanggal.getSeconds();
}
</script>
<body onload="waktu()">
<?php
$hariIni = date('Y-m-d');
$bulanIni = date('m');
echo "<center><h3> Hari, Tanggal : " . indonesian_date() . " <span id='output'></span> WIB </h3>";
?>
<!-- time content -->
<br>
</>
<h3 style="color:red"><u>Insert your Identity : </u></h3>
<table width="800" border="0" align = "center">
<tr>
<td colspan="3" bgcolor = "yellow"></td>
</tr>
<tr>
<td width="200"></td>
<td>
示例13: indonesian_date
{{ post }}
<div class="page-header">
<h1>{{ title }}</h1>
<time class="date-post"><?php
echo indonesian_date(date('Y-m-d H:i:s', strtotime($post[0]['created_on'])));
?>
</time>
<img src="{{ thumb_detail }}" />
</div>
<div class="content-description">
<p>{{ short_desc }}</p>
</div>
<div class="content-body">
{{ long_desc }}
</div>
{{ /post }}
示例14: getLatestComments
public function getLatestComments($pid = -1, $type = "page")
{
if (isset($_GET['pid'])) {
$pid = isset($_GET['pid']) ? addslashes($_GET['pid']) : die("no pid");
$type = isset($_GET['type']) ? addslashes($_GET['type']) : "page";
}
$pc = new PageComment();
$acc = new Account();
$q = "SELECT * FROM {$pc->table_name},{$acc->table_name} WHERE admin_id = comment_author AND comment_page_id = '{$pid}' AND comment_type = '{$type}' ORDER BY comment_date DESC LIMIT 0,10";
global $db;
$arr = $db->query($q, 2);
//pr($arr);
foreach ($arr as $c) {
$src = Account::getMyFotoAcc($c->admin_foto);
?>
<div class="comment-item col-md-12" style="border-bottom: 1px solid #dedede; margin-bottom: 10px;">
<div class="col-md-2 col-xs-3">
<div style="padding:20px; padding-top: 0px;">
<?php
Account::makeMyFoto100percent($src);
?>
</div>
</div>
<div class="col-md-10 col-xs-9">
<div class="admin-name" style="font-style: italic;"><?php
echo $c->admin_nama_depan;
?>
</div>
<div class="admin-date" style="font-style: italic; font-size: 11px;"><?php
echo indonesian_date($c->comment_date);
?>
</div>
<div class="commentext" style="padding:10px; padding-left: 0px;">
<?php
echo stripslashes($c->comment_text);
?>
</div>
</div>
<div class="clearfix"></div>
</div>
<?php
}
}
示例15: my
public function my()
{
$cartModel = new CartModel();
$id = Account::getMyID();
if (Role::hasRole('admin')) {
if ($_GET['id'] != "") {
$id = addslashes($_GET['id']);
}
}
if ($id < 1) {
die('Err');
}
//paymentstatus != deleted
$arr = $cartModel->getWhere("userid = '{$id}' AND payment_status != 4 ORDER BY po_date DESC");
// pr($arr);
?>
<h1 class="beli" style="padding-bottom: 30px;">Order History</h1>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Tanggal</th>
<th>Value</th>
<th>Action</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<?php
foreach ($arr as $cartModel) {
?>
<tr>
<td><?php
echo indonesian_date($cartModel->po_date);
?>
</td>
<td style="text-align: right;">Rp.<?php
echo rupiah($cartModel->total_cost);
?>
</td>
<td>
<a target="blank" href="<?php
echo _SPPATH;
?>
cartorder/details?po=<?php
echo $cartModel->po_id;
?>
">lihat details</a><br>
<a target="blank" href="<?php
echo _SPPATH;
?>
ordersuccesspage?po=<?php
echo $cartModel->po_id;
?>
">cara pembayaran</a>
</td>
<td><?php
echo $this->arrStatus[$cartModel->payment_status];
?>
</td>
<td>
<?php
if ($cartModel->payment_status == 0) {
?>
<button onclick="if(confirm('Delete PO Anda ?'))document.location='<?php
echo _SPPATH;
?>
CartOrder/deleteOrder?po=<?php
echo $cartModel->po_id;
?>
';">Delete Order</button>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</table>
</div>
<?php
}