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


PHP Website::getDateForamt方法代码示例

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


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

示例1: contentajax

 public function contentajax($alias = '')
 {
     $alias = urldecode($alias);
     $data['current_alias'] = $alias;
     $row = $this->Pagetype_model->get_by_alias($alias);
     $last_msg_id = $_GET['last_msg_id'];
     $pagetype_id = $row->id;
     $page_rows = $this->Page_model->get_by_pagetype_id_less_than($pagetype_id, $last_msg_id, 10);
     $html = '';
     $counter_loop = $last_msg_id + 1;
     $page_id = 0;
     if (isset($page_rows)) {
         foreach ($page_rows as $page_row) {
             $page_id = $page_row->id;
             $page_alias = $page_row->alias;
             $page_writer_alias = $page_row->writer_alias;
             if ($this->lang->lang() == 'ar') {
                 $title = $page_row->title_ar;
                 $page_brief = $page_row->brief_ar;
                 $page_writer_name = $page_row->writer_name_ar;
             } else {
                 $title = $page_row->title;
                 $page_brief = $page_row->brief;
                 $page_writer_name = $page_row->writer_name;
             }
             $banner_file_selected = $page_row->banner_file_selected;
             $full_link_url = base_url() . $this->lang->lang() . '/page/content/' . $page_alias;
             $page_writer_full_link_url = base_url() . $this->lang->lang() . '/writer/content/' . $page_writer_alias;
             if ($counter_loop == 1) {
                 $page_rows_li_style = "class='first'";
             } else {
                 if ($counter_loop == 20) {
                     $page_rows_li_style = "class='last zebra'";
                 } else {
                     if ($counter_loop % 2 == 0) {
                         $page_rows_li_style = "class='zebra'";
                     } else {
                         $page_rows_li_style = '';
                     }
                 }
             }
             $this->load->controller('Website');
             $website_object = new Website();
             $hijri_date = $website_object->getHijri($page_row->last_modify_date);
             $miladi_date = $website_object->getDateForamt($page_row->last_modify_date);
             $html .= "<li {$page_rows_li_style}>\n                  <div class='first last'>\n                    <div class='first'>\n                      <div class='first'><a class='first last' href='{$full_link_url}'><img src='" . base_url() . $banner_file_selected . "' alt='{$title}' width='130px' height='100px'/></a></div>\n                      <div class='last'>\n                        <h2 class='first last'><a class='first last' href='{$full_link_url}'>{$title}</a></h2>\n                        <div><span class='first'>" . lang('writer') . ":</span> <a href='{$page_writer_full_link_url}'>{$page_writer_name}</a></div>\n                        <div class='articleTime'>{$hijri_date} - {$miladi_date}</div>\n\n                        <p class='last'>{$page_brief} ..</p>\n                      </div>\n                    </div>\n                    <div class='readMoreContainer'><a href='{$full_link_url}'>" . $this->lang->line('more') . "</a></div>\n                  </div>\n                </li>";
             $counter_loop++;
         }
         $html .= "<div id='{$page_id}'  class='message_box' ></div>";
     }
     echo $html;
 }
开发者ID:goudaelalfy,项目名称:nahda,代码行数:52,代码来源:pagetype.php

示例2: foreach

<?php 
if (isset($seminar_rows)) {
    $seminar_rows_counter = 1;
    foreach ($seminar_rows as $seminar_row) {
        $seminar_alias = $seminar_row->alias;
        if ($this->lang->lang() == 'ar') {
            $title = $seminar_row->title_ar;
            $seminar_brief = $seminar_row->brief_ar;
        } else {
            $title = $seminar_row->title;
            $seminar_brief = $seminar_row->brief;
        }
        $banner_file_selected = $seminar_row->banner_file_selected;
        $full_link_url = base_url() . $this->lang->lang() . '/seminar/content/' . $seminar_alias;
        $hijri_date = $website_object->getHijri($seminar_row->last_modify_date);
        $miladi_date = $website_object->getDateForamt($seminar_row->last_modify_date);
        $hijri_date = $website_object->getHijri($seminar_row->last_modify_date);
        $miladi_date = $website_object->getDateForamt($seminar_row->last_modify_date);
        if ($seminar_rows_counter == 1) {
            $seminar_rows_li_style = "class='first'";
        } else {
            if ($seminar_rows_counter == 20) {
                $seminar_rows_li_style = "class='last zebra'";
            } else {
                if ($seminar_rows_counter % 2 == 0) {
                    $seminar_rows_li_style = "class='zebra'";
                } else {
                    $seminar_rows_li_style = '';
                }
            }
        }
开发者ID:goudaelalfy,项目名称:nahda,代码行数:31,代码来源:index.php

示例3: foreach

 if (isset($writer_rows)) {
     $writer_rows_counter = 1;
     foreach ($writer_rows as $writer_row) {
         $writer_id = $writer_row->id;
         $writer_alias = $writer_row->alias;
         if ($this->lang->lang() == 'ar') {
             $name = $writer_row->name_ar;
             $writer_brief = $writer_row->brief_ar;
         } else {
             $name = $writer_row->name;
             $writer_brief = $writer_row->brief;
         }
         $banner_file_selected = $writer_row->banner_file_selected;
         $full_link_url = base_url() . $this->lang->lang() . '/writer/content/' . $writer_alias;
         $hijri_date = $website_object->getHijri($writer_row->last_modify_date);
         $miladi_date = $website_object->getDateForamt($writer_row->last_modify_date);
         if ($writer_rows_counter == 1) {
             $writer_rows_li_style = "class='first'";
         } else {
             if ($writer_rows_counter == 20) {
                 $writer_rows_li_style = "class='last zebra'";
             } else {
                 if ($writer_rows_counter % 2 == 0) {
                     $writer_rows_li_style = "class='zebra'";
                 } else {
                     $writer_rows_li_style = '';
                 }
             }
         }
         echo "<li {$writer_rows_li_style}>\n        \n                  <div class='first last'>\n                    <div class='first'>\n                      <div class='first'><a class='first last' href='{$full_link_url}'><img class='first last' src='" . base_url() . $banner_file_selected . "' alt='{$name}' width='130px' height='100px'/></a></div>\n                      <div class='last'>\n                        <h2 class='first'><a class='last' href='{$full_link_url}'>{$name}</a></h2>\n                        <p class='last'>{$writer_brief} ..</p>\n                      </div>\n                    </div>\n                    <div class='readMoreContainer last'><a class='first last' href='{$full_link_url}'>" . $this->lang->line('more') . "</a></div>\n                  </div>\n                </li>";
     }
开发者ID:goudaelalfy,项目名称:nahda,代码行数:31,代码来源:all.php

示例4: dvHomePortalsMenusLinksHtml

 public function dvHomePortalsMenusLinksHtml($link_alias)
 {
     $link_alias = urldecode($link_alias);
     $this->load->controller('Website');
     $website_object = new Website();
     //$link_alias=$_POST['alias'];
     $home_portals_row = $this->Pagecat_model->get_by_alias($link_alias);
     if (count($home_portals_row) > 0) {
         $pagecat_id = $home_portals_row->id;
         $page_rows = $this->Page_model->get_by_pagecat($pagecat_id, 4);
         $page_row_counter = 1;
         foreach ($page_rows as $page_row) {
             $page_alias = $page_row->alias;
             $page_writer_alias = $page_row->writer_alias;
             if ($this->lang->lang() == 'ar') {
                 $title = $page_row->title_ar;
                 $page_brief = $page_row->brief_ar;
                 $page_writer_name = $page_row->writer_name_ar;
             } else {
                 $title = $page_row->title;
                 $page_brief = $page_row->brief;
                 $page_writer_name = $page_row->writer_name;
             }
             $banner_file_selected = base_url() . $page_row->banner_file_selected;
             $full_link_url = base_url() . $this->lang->lang() . '/page/content/' . $page_alias;
             $page_writer_full_link_url = base_url() . $this->lang->lang() . '/writer/content/' . $page_writer_alias;
             $hijri_date = $website_object->getHijri($page_row->last_modify_date);
             $miladi_date = $website_object->getDateForamt($page_row->last_modify_date);
             if ($page_row_counter == 1) {
                 $page_row_li_style = "class='first'";
             } else {
                 if ($page_row_counter == 2) {
                     $page_row_li_style = "class='zebra'";
                 } else {
                     if ($page_row_counter == 4) {
                         $page_row_li_style = "class='last zebra'";
                     } else {
                         $page_row_li_style = "";
                     }
                 }
             }
             $page_row_counter++;
             echo "\n         \t<li {$page_row_li_style}>\n                <div class='first last'>\n                  <div class='first'>\n                    <div class='first'><a class='first last' href='{$full_link_url}'><img class='first last' src='{$banner_file_selected}' alt='{$title}' /></a></div>\n                    <div class='last'>\n                      <h2 class='first'><a class='first last' href='{$full_link_url}'>{$title}</a></h2>\n                        <div class='articleTime'>{$hijri_date} - {$miladi_date}</div>\n\n                        <div><span class='first'>" . lang('writer') . ":</span> <a href='{$page_writer_full_link_url}'>{$page_writer_name}</a></div>\n                      <p class='last'>{$page_brief} ..</p>\n                    </div>\n                  </div>\n                  <div class='readMoreContainer' class='last'><a class='first last' href='{$full_link_url}'>" . lang('more') . "</a></div>\n                </div>\n            </li>\n\t\t   ";
         }
     }
     exit;
 }
开发者ID:goudaelalfy,项目名称:nahda,代码行数:47,代码来源:home.php

示例5: lang

 $page_alias = $page_row->alias;
 $page_writer_alias = $page_row->writer_alias;
 if ($this->lang->lang() == 'ar') {
     $title = $page_row->title_ar;
     $page_brief = $page_row->brief_ar;
     $page_writer_name = $page_row->writer_name_ar;
 } else {
     $title = $page_row->title;
     $page_brief = $page_row->brief;
     $page_writer_name = $page_row->writer_name;
 }
 $banner_file_selected = base_url() . $page_row->banner_file_selected;
 $full_link_url = base_url() . $this->lang->lang() . '/page/content/' . $page_alias;
 $page_writer_full_link_url = base_url() . $this->lang->lang() . '/writer/content/' . $page_writer_alias;
 $hijri_date = $website_object->getHijri($page_row->last_modify_date);
 $miladi_date = $website_object->getDateForamt($page_row->last_modify_date);
 if ($page_row_counter == 1) {
     $page_row_li_style = "class='first'";
 } else {
     if ($page_row_counter == 2) {
         $page_row_li_style = "class='zebra'";
     } else {
         if ($page_row_counter == 4) {
             $page_row_li_style = "class='last zebra'";
         } else {
             $page_row_li_style = "";
         }
     }
 }
 $page_row_counter++;
 echo "\n         \t<li {$page_row_li_style}>\n                <div class='first last'>\n                  <div class='first'>\n                    <div class='first'><a class='first last' href='{$full_link_url}'><img class='first last' src='{$banner_file_selected}' alt='{$title}' /></a></div>\n                    <div class='last'>\n                      <h2 class='first'><a class='first last' href='{$full_link_url}'>{$title}</a></h2>\n                        <div class='articleTime'>{$hijri_date} - {$miladi_date}</div>\n\n                        <div><span class='first'>" . lang('writer') . ":</span> <a href='{$page_writer_full_link_url}'>{$page_writer_name}</a></div>\n                      <p class='last'>{$page_brief} ..</p>\n                    </div>\n                  </div>\n                  <div class='readMoreContainer' class='last'><a class='first last' href='{$full_link_url}'>" . lang('more') . "</a></div>\n                </div>\n            </li>\n\t\t   ";
开发者ID:goudaelalfy,项目名称:nahda,代码行数:31,代码来源:home__.php


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