本文整理汇总了PHP中displayDate函数的典型用法代码示例。如果您正苦于以下问题:PHP displayDate函数的具体用法?PHP displayDate怎么用?PHP displayDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了displayDate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayLastDayTime
function displayLastDayTime($year = '', $month = '', $until_today = 0)
{
$the_date = displayLastDay($year, $month, $until_today);
$return_date = displayDate($the_date, 0, 1);
return $return_date . " 23:59:59";
}
示例2: add
<?php
$inumber1 = 10;
$inumber2 = 5;
function add($number1, $number2)
{
echo $number1 + $number2;
}
add($inumber1, $inumber2);
function displayDate($day, $date, $year)
{
echo '<br>' . $day . ' ' . $date . ' ' . $year;
}
displayDate('Monday', 31, 2011);
示例3: invite_friend
function invite_friend()
{
//SESSION LOGGED DATA
$logged_main_group_id = $this->session->userdata('user_group_id');
//CONFIG ITEM
$group_id_user = $this->config->item('group_id_user');
if ($logged_main_group_id == $group_id_user) {
//LOGGED CORRECT
$data['message'] = $this->session->flashdata('message');
//POST SUBMIT
if ($this->input->post()) {
//LOGGED
$logged_user_id = $this->session->userdata('user_id');
$where_read_user = array('id' => $logged_user_id);
$query_read_user = $this->albert_model->read_user($where_read_user);
$logged_user_email = $query_read_user->row()->email;
//INPUT POST
$input_email = $this->input->post('email');
//VALIDATION
$this->form_validation->set_rules('email', 'E-mail Address', 'required|valid_email');
if ($this->form_validation->run() == true) {
//VALIDATION SUCCESS
$current_month = date("n");
$current_year = date("Y");
//READ USER_INVITE_FRIEND
$where_user_invite_friend = array('user_id' => $logged_user_id, 'friend_email' => $input_email);
$query_user_invite_friend = $this->albert_model->read_user_invite_friend($where_user_invite_friend);
$num_rows_user_invite_friend = $query_user_invite_friend->num_rows();
if ($num_rows_user_invite_friend > 0) {
//DUPLICATED DATA
$this->session->set_flashdata('message', "You had already invited '{$input_email}'");
} else {
//QUERY CANDIE BALANCE
$where_candie_balance = array('user_id' => $logged_user_id, 'month_id' => $current_month, 'year' => $current_year);
$query_candie_balance = $this->albert_model->read_candie_balance($where_candie_balance);
$num_rows_candie_balance = $query_candie_balance->num_rows();
if ($this->invite_friend_send_email($input_email, $logged_user_email)) {
if ($num_rows_candie_balance > 0) {
//UPDATE CANDIE BALANCE
$where_candie_balance_invite_friend_count_increment = array('user_id' => $logged_user_id, 'month_id' => $current_month, 'year' => $current_year);
$this->albert_model->update_candie_balance_invite_friend_count_increment($where_candie_balance_invite_friend_count_increment);
if ($this->db->affected_rows() == 0) {
//INSERT FAIL
$this->session->set_flashdata('message', 'Update fail for candie');
}
} else {
$data_candie_balance = array('user_id' => $logged_user_id, 'month_id' => $current_month, 'year' => $current_year, 'month_last_date' => displayDate(displayLastDay($current_year, $current_month), 0, 1));
$this->albert_model->insert_candie_balance($data_candie_balance);
if ($this->db->affected_rows() == 0) {
//INSERT FAIL
$this->session->set_flashdata('message', 'Insert fail for candie');
}
$query_candie_balance = $this->albert_model->read_candie_balance($where_candie_balance);
}
//INSERT USER_INVITE_FRIEND
$data_user_invite_friend = array('user_id' => $logged_user_id, 'friend_email' => $input_email);
$this->albert_model->insert_user_invite_friend($data_user_invite_friend);
if ($this->db->affected_rows() == 0) {
//INSERT FAIL
$this->session->set_flashdata('message', 'Insert fail for invite friend');
}
//INSERT SUCCESS
$this->session->set_flashdata('message', 'Invitation email sent');
//GIVE USER CANDIE FOR THE FIRST 5 INVITATION MONTHLY
$invitation_send_current_month = $query_candie_balance->row_array();
$user_max_invitation_get_candie_per_month = $this->m_custom->web_setting_get('user_max_invitation_get_candie_per_month');
if ($invitation_send_current_month['invite_friend_count'] <= $user_max_invitation_get_candie_per_month) {
$this->m_user->candie_history_insert(6, $invitation_send_current_month['balance_id'], 'candie_balance', 1);
}
}
}
redirect('user/invite_friend', 'refresh');
} else {
//VALIDATION FAIL
$this->session->set_flashdata('message', validation_errors());
redirect('user/invite_friend', 'refresh');
}
}
} else {
//LOGGED INCORRECT
redirect('/', 'refresh');
}
$data['page_path_name'] = 'user/invite_friend';
$this->load->view('template/index', $data);
}
示例4: merchant_balance_update
public function merchant_balance_update($merchant_id, $month_id = NULL, $year = NULL)
{
$search_date = date_for_db_search($month_id, $year);
if (empty($month_id)) {
$month_id = get_part_of_date('month');
}
if (empty($year)) {
$year = get_part_of_date('year');
}
$history_condition = "trans_time like '%" . $search_date . "%'";
$history_search_data = array('merchant_id' => $merchant_id);
$this->db->where($history_condition);
$history_query = $this->db->get_where('transaction_history', $history_search_data);
$history_result = $history_query->result_array();
if ($history_query->num_rows() != 0) {
$monthly_balance = 0;
foreach ($history_result as $history_row) {
$monthly_balance = $monthly_balance + $history_row['amount_plus'] - $history_row['amount_minus'];
}
$balance_search_data = array('merchant_id' => $merchant_id, 'month_id' => $month_id, 'year' => $year);
$balance_query = $this->db->get_where('merchant_balance', $balance_search_data);
if ($balance_query->num_rows() == 0) {
$insert_data = array('merchant_id' => $merchant_id, 'balance' => $monthly_balance, 'month_id' => $month_id, 'year' => $year, 'month_last_date' => displayDate(displayLastDay($year, $month_id), 0, 1));
$this->db->insert('merchant_balance', $insert_data);
} else {
$balance_result = $balance_query->row_array();
$update_data = array('balance' => $monthly_balance);
$this->db->where('balance_id', $balance_result['balance_id']);
$this->db->update('merchant_balance', $update_data);
}
}
}
示例5: showNewsId
function showNewsId($news, $db)
{
foreach ($news as $i => $row) {
if ($i > 0) {
//if repeating news (because of tags)
echo " <a href=\"./?tag=" . $row['tagname'] . "\">#" . $row['tagname'] . "</a>";
} else {
echo "<div class=\"noticia\" id=" . $row['id'] . ">";
if (loggedIn()) {
//favorites
if (hasFavorite($row['id'], $db)) {
echo "<div class=\"del_favorite\" id=\"" . $row['id'] . "\"><img width=\"30px\" src=\"common/star_filled.png\">";
} else {
echo "<div class=\"add_favorite\" id=\"" . $row['id'] . "\"><img width=\"30px\" src=\"common/star_empty.png\">";
}
echo "</div>";
}
echo "<h3>" . stripslashes($row['title']) . "</h3>\n\t\t\t\t<img src=\"http://lorempixel.com/300/200/\" alt=\"300x200\">\t\t\t\t\n\t\t\t\t<div class=\"newsbody\">" . nl2br(stripslashes($row['text'])) . "</div>\n\t\t\t\t<div class=\"newsdetails\">\n\t\t\t\t<br />";
if (!empty($row['url'])) {
//display URL if news is imported
echo "<b>URL original:</b> <a target=\"_blank\" href=\"" . stripslashes($row['url']) . "\">" . $row['url'] . "</a><br>";
}
echo "<b>Submetida por:</b> " . getUserProfileLink($row['posted_by'], $db) . "<br>";
if (!empty($row['imported_by'])) {
echo "<b>Importada por:</b> " . getUserProfileLink($row['imported_by'], $db) . "<br>";
}
echo displayDate($row['date']);
if ($row['tagname'] != "") {
echo "</div><div class=\"newstags\"><a href=\"./?tag=" . stripslashes($row['tagname']) . "\">#" . stripslashes($row['tagname']) . "</a>";
}
//first tag (close news details and start tags div)
}
if (++$i == sizeof($news)) {
//if next row is the end
echo "</div>";
echo "<div class=comment" . $row['id'] . "><h2>Comentários:</h2><div id=comments_server></div>";
echo "</div>";
if (isset($_SESSION['user_id'])) {
echo "<div id=new_comment><textarea id=textarea_new_comment rows=4 placeholder=\"Novo Comentário...\"/></textarea><br><input id=send_comment type=button value=\"Enviar Comentário\"></div>";
}
if (loggedIn() && (editor() || admin())) {
echo "<ul>";
echo "<li><a href=./>Ver Todas</a></li>";
if (loggedIn() && (admin() || editor() && ($_SESSION['username'] == $row['posted_by'] || $_SESSION['username'] == $row['imported_by']))) {
echo "<li><a href=\"editar_noticia.php?id=" . $row['id'] . "\">Editar</a></li><li><a href=\"apagar_noticia.php?id=" . $row['id'] . "\">Apagar</a></li>";
}
echo "<li style=\"border:0;\"></li>";
//display full height <ul>
echo "</ul>";
}
echo "</div>";
}
}
}
示例6: display_row_monitor
public function display_row_monitor($want_count = 0)
{
if ($this->ion_auth->logged_in()) {
$login_id = $this->ion_auth->user()->row()->id;
$login_type = $this->session->userdata('user_group_id');
$condition = "(mon_is_public = true or (mon_is_public = false and mon_for_id = " . $login_id . "))";
$this->db->where($condition);
$mon_query = $this->db->get_where('monitoring', array('mon_for_type' => $login_type, 'mon_status' => 0));
if ($want_count == 1) {
return $mon_query->num_rows();
}
$mon_result = $mon_query->result_array();
$result = array();
foreach ($mon_result as $row) {
$mon_hide_type = $row['mon_hide_type'];
$hide_item_desc = "";
$hide_item_type = "";
$post_image = "";
switch ($mon_hide_type) {
case 'com':
$refer_row = $this->m_custom->activity_get_one_row($row['mon_table_id']);
$hide_item_type = "Comment";
$hide_item_desc = '<table style="border:none"><col width="120"><col width="5"><col >' . '<tr><td>Content</td><td>:</td><td>' . nl2br($refer_row['comment']) . '</td></tr>' . '<tr><td>Comment At</td><td>:</td><td>' . $this->m_custom->generate_act_refer_type_link($refer_row['act_refer_id'], $refer_row['act_refer_type']) . '</td></tr>' . '<tr><td>Comment By</td><td>:</td><td>' . $this->m_custom->generate_user_link($refer_row['act_by_id']) . ' (' . $this->m_custom->display_users_groups($refer_row['act_by_type'], 'description') . ')' . '</td></tr>' . '<tr><td>Time</td><td>:</td><td>' . displayDate($refer_row['act_time'], 1) . '</td></tr>' . '</table>';
break;
case 'mua':
$refer_row = $this->m_custom->get_one_table_record('merchant_user_album', 'merchant_user_album_id', $row['mon_table_id'], 1);
$hide_item_type = "Picture Upload For Merchant";
$hide_item_desc = '<table style="border:none"><col width="120"><col width="5"><col >' . '<tr><td>Title</td><td>:</td><td>' . $refer_row['title'] . '</td></tr>' . '<tr><td>Description</td><td>:</td><td>' . nl2br($refer_row['description']) . '</td></tr>' . '<tr><td>Upload By</td><td>:</td><td>' . $this->m_custom->generate_user_link($refer_row['user_id']) . '</td></tr>' . '<tr><td>Post Date</td><td>:</td><td>' . displayDate($refer_row['create_date'], 1) . '</td></tr>' . '<tr><td>Removed Reason</td><td>:</td><td>' . $refer_row['hide_remark'] . '</td></tr>' . '</table>';
$post_image = $this->m_custom->generate_image_link($refer_row['image'], $mon_hide_type);
break;
case 'adv':
$refer_row = $this->m_custom->getOneAdvertise($row['mon_table_id'], 1, 1);
$hide_item_type = "Merchant Picture";
$hide_item_desc = '<table style="border:none"><col width="120"><col width="5"><col >' . '<tr><td>Title</td><td>:</td><td>' . $refer_row['title'] . '</td></tr>' . '<tr><td>Description</td><td>:</td><td>' . nl2br($refer_row['description']) . '</td></tr>' . '<tr><td>Post Date</td><td>:</td><td>' . displayDate($refer_row['create_date'], 1) . '</td></tr>' . '</table>';
$post_image = $this->m_custom->generate_image_link($refer_row['image'], $mon_hide_type);
break;
}
if ($refer_row != FALSE) {
$extra_info = array('hide_time_text' => displayDate($row['hide_time'], 1), 'hide_item_type' => $hide_item_type, 'hide_item_desc' => $hide_item_desc, 'post_image' => $post_image, 'hide_by_text' => $this->m_custom->display_users($row['hide_by'], 0, 1), 'hide_by_type_text' => $this->m_custom->display_users_groups($row['hide_by_type'], 'description'));
$result[] = $row + $extra_info + $refer_row;
}
}
return $result;
}
}
示例7: getRefStatusShare
function getRefStatusShare($ref_id, $u_id)
{
global $db;
$sql = "SELECT * FROM user_status WHERE us_id=:ref_id AND u_id=:u_id LIMIT 1";
$stmt = $db->prepare($sql);
$stmt->bindParam(':ref_id', $ref_id, PDO::PARAM_INT);
$stmt->bindParam(':u_id', $u_id, PDO::PARAM_INT);
$stmt->execute();
$obj = $stmt->fetchObject();
$displayDate = displayDate($obj->us_date, 2);
$obj->displayDate = $displayDate;
return $obj;
}
示例8: keppo_voucher_redeem_change
function keppo_voucher_redeem_change($edit_id)
{
if (!$this->m_admin->check_is_any_admin(71)) {
redirect('/', 'refresh');
}
$message_info = '';
$login_id = $this->login_id;
$login_type = $this->login_type;
$main_table = 'user_redemption';
$main_table_id_column = 'redeem_id';
$result = $this->m_custom->get_one_table_record($main_table, $main_table_id_column, $edit_id, 1);
$status_id_active = $this->config->item('voucher_active');
$status_id_used = $this->config->item('voucher_used');
if (empty($result)) {
redirect('/', 'refresh');
}
if (isset($_POST) && !empty($_POST)) {
$can_redirect_to = 0;
$id = $this->input->post('id');
$top_up_serial_code = $this->input->post('top_up_serial_code');
$top_up_already = $this->input->post('top_up_already') == NULL ? $status_id_active : $status_id_used;
$top_up_date = validateDate($this->input->post('top_up_date'));
$top_up_time = $this->input->post('top_up_time') == NULL ? NULL : $this->input->post('top_up_time');
$this->form_validation->set_rules('top_up_serial_code', 'Serial Code');
$this->form_validation->set_rules('top_up_date', 'Top Up Date');
$this->form_validation->set_rules('top_up_time', 'Top Up Time');
if ($this->input->post('button_action') == "save") {
if ($this->form_validation->run() === TRUE) {
$data = array('top_up_serial_code' => $top_up_serial_code, 'top_up_date' => $top_up_date, 'top_up_time' => $top_up_time);
if ($this->m_custom->simple_update($main_table, $data, $main_table_id_column, $id)) {
if ($top_up_already == $status_id_used) {
$this->m_admin->promotion_admin_redemption_done($id);
} else {
if ($top_up_already == $status_id_active) {
$this->m_admin->promotion_admin_redemption_done($id, 0, 1);
}
}
$message_info = add_message_info($message_info, 'Record success update.');
$can_redirect_to = 2;
} else {
$message_info = add_message_info($message_info, $this->ion_auth->errors());
$can_redirect_to = 1;
}
}
}
if ($this->input->post('button_action') == "back") {
$can_redirect_to = 2;
}
direct_go:
if ($message_info != NULL) {
$this->session->set_flashdata('message', $message_info);
}
if ($can_redirect_to == 1) {
redirect(uri_string(), 'refresh');
} elseif ($can_redirect_to == 2) {
redirect('admin/keppo_voucher_redemption_page', 'refresh');
}
}
// set the flash data error message if there is one
$this->data['message'] = validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message'));
$this->data['result'] = $result;
$this->data['title'] = "User Redemption Edit";
$this->data['can_edit'] = 1;
$this->data['top_up_serial_code'] = array('name' => 'top_up_serial_code', 'id' => 'top_up_serial_code', 'type' => 'text', 'value' => $result['top_up_serial_code']);
$top_up_already_value = $result['status_id'];
$this->data['top_up_already_value'] = $top_up_already_value;
$this->data['top_up_already'] = array('name' => 'top_up_already', 'id' => 'top_up_already', 'checked' => $top_up_already_value == $status_id_used ? TRUE : FALSE, 'value' => $result['status_id']);
$this->data['top_up_date'] = array('name' => 'top_up_date', 'id' => 'top_up_date', 'readonly' => 'true', 'value' => empty($result) ? '' : displayDate($result['top_up_date']));
$this->data['top_up_time'] = array('name' => 'top_up_time', 'id' => 'top_up_time', 'value' => empty($result) ? '' : $result['top_up_time']);
$this->data['page_path_name'] = 'admin/keppo_voucher_redeem_change';
$this->load->view('template/index', $this->data);
}
示例9: callThumbListFrontEndByID
}else{
echo '<img class="img-slide-show" data-type="image" style="max-width:754px;max-height: 562px" src="' . callThumbListFrontEndByID($rowPic['PIC_ID'], $rowPic['CAT_ID'], true) . '">'."\n\t";
$thumbRender .= '<img style="max-height: 186px;height: 186px;" src="' . callThumbListFrontEndByID($rowPic['PIC_ID'], $rowPic['CAT_ID'], true) . '">'."\n\t";
}
echo '</div>'."\n\t";
$thumbRender .= '</div>'."\n\t";
}
?>
</div>
<a class="btn-arrow-slide pev"></a>
<a class="btn-arrow-slide next"></a>
<div class="box-title-main">
<div class="box-date-tumb">
<p class="date">
<?=displayDate($eventRow['EVENT_START_DATE']) ?>
</p>
<p class="month">
<?=displayShortMonth($eventRow['EVENT_START_DATE']) ?>
</p>
</div>
<div class="box-text">
<p class="text-title">
<?=$eventRow['CONTENT_DESC'] ?>
</p>
<p class="text-des">
<?=$eventRow['MUSEUM_NAME'] ?>
</p>
</div>
</div>
</div>
示例10: foreach
<tr style="text-align:center">
<th>Merchant Name</th>
<th>Amount (RM)</th>
<th>Transaction Bank</th>
<th>Transaction Date</th>
<th>Transaction No</th>
<th>Remark</th>
<th>Top Up Record By Admin</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
foreach ($the_result as $row) {
$merchant_name = $this->m_custom->display_users($row['merchant_id']);
$topup_trans_date = displayDate($row['topup_trans_date']);
$admin_name = $this->m_custom->display_users($row['admin_id']);
$url_edit = base_url() . "admin/merchant_topup_edit/" . $row['merchant_id'] . "/" . $row['topup_id'];
if ($low_balance_only == 1) {
$url_edit = base_url() . "admin/merchant_topup_edit/" . $row['merchant_id'] . "/" . $row['topup_id'] . "/1";
}
echo '<tr>';
echo "<td>" . $merchant_name . "</td>";
echo "<td style='text-align:right'>" . $row['topup_amount'] . "</td>";
echo "<td>" . $row['topup_bank'] . "</td>";
echo "<td>" . $topup_trans_date . "</td>";
echo "<td>" . $row['topup_trans_no'] . "</td>";
echo "<td>" . $row['topup_remark'] . "</td>";
echo "<td>" . $admin_name . "</td>";
echo "<td>";
echo "<a href='" . $url_edit . "' ><img src='" . base_url() . "/image/btn-edit.png' title='Edit' alt='Edit' class='normal-btn-image'></a>";
示例11: foreach
<thead>
<tr style="text-align:center">
<th>Title</th>
<th>Image</th>
<th>Start Date</th>
<th>End Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
foreach ($the_result as $row) {
$noti_url = base_url() . 'all/advertise/' . $row['advertise_id'];
$image_url = base_url() . $this->config->item('album_merchant') . $row['image'];
$start_time = displayDate($row['start_time']);
$end_time = displayDate($row['end_time']);
$url_special_action = base_url() . "merchant/hotdeal_expired";
echo '<tr>';
echo "<td><a href='{$noti_url}' target='_blank'>" . $row['title'] . "</a></td>";
echo "<td>";
if (!empty($row['image'])) {
echo "<img style='max-height:200px;max-width:200px' src='" . $image_url . "'>";
}
echo "</td>";
echo "<td>" . $start_time . "</td>";
echo "<td>" . $end_time . "</td>";
echo "<td>";
$have_role = $this->m_custom->check_role_su_can_uploadhotdeal();
if ($have_role == 1) {
echo form_open($url_special_action);
echo form_hidden('id', $row['advertise_id']);
示例12: voucher
function voucher($advertise_id = NULL, $redeem_id = NULL)
{
if ($advertise_id == NULL || $redeem_id == NULL) {
redirect('/', 'refresh');
}
if ($this->ion_auth->logged_in()) {
$login_id = $this->ion_auth->user()->row()->id;
$login_data = $this->m_custom->get_one_table_record('users', 'id', $login_id, 1);
} else {
redirect('/', 'refresh');
}
$the_row = $this->m_custom->getOneAdvertise($advertise_id, 0, 0, 0, 1);
if ($the_row) {
$advertise_type = $the_row['advertise_type'];
if ($advertise_type != "pro" && $advertise_type != "adm" || !$this->m_user->user_redemption_check($login_id, $redeem_id) && !$this->m_merchant->merchant_redemption_check($login_id, $advertise_id)) {
redirect('/', 'refresh');
}
$merchant_row = $this->m_merchant->getMerchant($the_row['merchant_id']);
$this->data['merchant_dashboard_url'] = base_url() . "all/merchant-dashboard/" . $merchant_row['slug'] . '//' . $the_row['merchant_id'];
$redeem_row = $this->m_custom->getOneUserRedemption($redeem_id);
// if (check_correct_login_type($this->group_id_user))
// {
// $this->data['user_id'] = $login_id;
// $this->data['user_name'] = $this->m_custom->display_users($login_id);
// $this->data['user_dob'] = displayDate($login_data['us_birthday']);
// $this->data['user_email'] = $login_data['email'];
// $this->data['current_candie'] = $this->m_user->candie_check_balance($login_id);
// }
$this->data['advertise_type'] = $advertise_type;
$this->data['advertise_id'] = $advertise_id;
$this->data['merchant_name'] = $merchant_row['company'];
$this->data['title'] = $the_row['title'];
$this->data['description'] = $the_row['description'];
$this->data['extra_term'] = $the_row['extra_term'];
if ($advertise_type == "adm") {
$this->data['image_url'] = base_url($this->album_admin . $the_row['image']);
} else {
$this->data['image_url'] = base_url($this->album_merchant . $the_row['image']);
}
$this->data['sub_category'] = $this->m_custom->display_category($the_row['sub_category_id']);
$this->data['start_date'] = displayDate($the_row['start_time']);
$this->data['end_date'] = displayDate($the_row['end_time']);
$this->data['message'] = $this->session->flashdata('message');
$this->data['voucher'] = $redeem_row['voucher'];
$this->data['voucher_not_need'] = $the_row['voucher_not_need'];
$this->data['voucher_worth'] = $the_row['voucher_worth'];
$this->data['voucher_barcode'] = base_url("barcode/generate/" . $redeem_row['voucher']);
$this->data['voucher_candie'] = $the_row['voucher_candie'];
$this->data['expire_date'] = displayDate($the_row['voucher_expire_date']);
$this->data['candie_term'] = $this->m_custom->many_get_childlist_detail('candie_term', $advertise_id, 'dynamic_option');
$this->data['candie_branch'] = $this->m_custom->many_get_childlist_detail('candie_branch', $advertise_id, 'merchant_branch');
$this->data['page_path_name'] = 'all/voucher';
$template_used = 'template/index_background_blank';
$this->load->library('user_agent');
if ($this->agent->is_browser('Safari')) {
$template_used = 'template/body';
}
$this->load->view($template_used, $this->data);
} else {
redirect('/', 'refresh');
}
}
示例13: Amount
</div>
<div id="float-fix"></div>
<br/>
<div id='payment-charge-table'>
<table border='1px' cellspacing='0px' cellpadding='0px' id="myTable" class="display">
<thead>
<tr style="text-align:center">
<th>Bonus Candie Amount (RM)</th>
<th>Bonus Reason</th>
<th>Give by Admin/Worker</th>
<th>Give Time</th>
</tr>
</thead>
<tbody>
<?php
foreach ($the_result as $row) {
$admin_name = $this->m_custom->display_users($row['admin_id']);
$trans_time = displayDate($row['trans_time'], 1);
echo '<tr>';
echo "<td style='text-align:right'>" . $row['amount_change'] . "</td>";
echo "<td>" . $row['trans_remark'] . "</td>";
echo "<td>" . $admin_name . "</td>";
echo "<td>" . $trans_time . "</td>";
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
示例14: displayDate
echo $redeem_row['voucher'];
?>
</a>
</div>
</td>
<td>
<div class="table-text-overflow-ellipsis">
<?php
echo $redeem_row['top_up_serial_code'];
?>
</div>
</td>
<td>
<div class="table-text-overflow-ellipsis">
<?php
echo displayDate($redeem_row['top_up_date']);
?>
</div>
</td>
<td>
<div class="table-text-overflow-ellipsis">
<?php
echo displayTime($redeem_row['top_up_time']);
?>
</div>
</td>
<?php
if ($show_used == 0) {
$confirm_message = "Confirm that you want to change " . $user_name . " voucher " . $redeem_row['voucher'] . " status?";
?>
<td>
示例15: foreach
<th>Rating</th>
<th>Redeemed</th>
<th>User Upload</th>
<th>Remove Already</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<?php
foreach ($the_result as $row) {
$redeem_row = $row['redeem_count'] === NULL ? NULL : $row['redeem_count'] . " (" . money($row['redeem_amount']) . ")";
//$userupload_row = $row['userupload_count'] === NULL ? NULL : $row['userupload_count'] . " (" . money($row['userupload_amount']) . ")";
$userupload_row = $row['userupload_count'] === NULL ? NULL : $row['userupload_count'];
$remove_row = $row['hide_flag'] == 1 ? 'Removed' : '';
echo '<tr>';
echo "<td>" . displayDate($row['create_date'], 1) . "</td>";
echo "<td>" . $row['title_url'] . "</td>";
echo "<td>" . $row['type_text'] . "</td>";
//echo "<td>" . $row['view_count'] . " (" . money($row['view_amount']) . ")</td>";
//echo "<td>" . $row['like_count'] . " (" . money($row['like_amount']) . ")</td>";
//echo "<td>" . $row['rating_count'] . " (" . money($row['rating_amount']) . ")</td>";
echo "<td>" . $row['view_count'] . "</td>";
echo "<td>" . $row['like_count'] . "</td>";
echo "<td>" . $row['rating_count'] . "</td>";
echo "<td>" . $redeem_row . "</td>";
echo "<td>" . $userupload_row . "</td>";
echo "<td>" . $remove_row . "</td>";
echo "<td>" . money($row['total_amount']) . "</td>";
echo '</tr>';
}
?>