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


PHP SiteHelper::getDateOnFormat方法代码示例

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


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

示例1: getList

    public function getList()
    {
        if (!Yii::app()->user->isGuest) {
            $list = Notifications::findByAttributes(array("user_id" => Yii::app()->user->id, "is_new" => 1));
            $cout = "";
            if (sizeof($list) > 0) {
                $cout .= '<div id="notificationsBlock">';
                foreach ($list as $item) {
                    $cout .= '<div class="NBItem">
                                <div class="NHeader">' . $item->subject . '<div class="floatRight"><a href="#" class="NHide" id="' . $item->id . '">скрыть</a>&nbsp;&nbsp;&nbsp;<a href="#" class="NBdesc">подробнее</a></div></div>
                                <div class="displayNone">
                                    Дата: <font>' . SiteHelper::getDateOnFormat($item->date, "d.m.Y") . '</font><br/>
                                    <div class="textAlignLeft">
                                        ' . $item->message . '
                                    </div>
                                </div>
                            </div>';
                }
                $cout .= '</div>
                         <script type="text/javascript">
                            $( document).ready( function()
                            {
                                $(".NHide").click( function()
                                {
                                    $.ajax({
                                            type: "GET",
                                            url: "' . SiteHelper::createUrl("/user/default/notificationHide/id") . '/"+this.id,
                                            success: function(msg){
                                                if( msg > 0 )
                                                {
                                                    $( $( "#"+msg )[0].parentNode.parentNode.parentNode ).remove();
                                                    if( $( "#notificationsBlock .NBItem" ).length == 0 )$( "#notificationsBlock" ).hide(400);
                                                }
                                            }
                                        });                                        
                                    return false;
                                })

                                $(".NBhide").click( function()
                                {
                                    $.ajax( "' . SiteHelper::createUrl("/user/notifications/show/id") . '/"+this.id );
                                    return false;
                                })

                                $(".NBdesc").click( function()
                                {
                                    var obj = $( this.parentNode.parentNode.parentNode ).find(".displayNone");
                                    if( obj.css("display") == \'none\' )
                                    {
                                        obj.show(500, "", function ()
                                        {
                                            $( this ).find(".textAlignLeft").show(300);
                                            $( this ).addClass("greyBack");
                                            $( this.parentNode ).find(".NBdesc").text( "кратко" );
                                        });
                                    }
                                    else
                                    {

                                        obj.find(".textAlignLeft").hide(300, \'\', function ()
                                        {
                                            $( this.parentNode ).removeClass("greyBack");
                                            $( this.parentNode ).hide(500);
                                            $( this.parentNode.parentNode).find(".NBdesc").text( "подробнее" );
                                        });
                                    }

                                    return false;
                                })
                            })
                        </script>';
            }
            return $cout;
        }
        return "";
    }
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:76,代码来源:initNotifications.php

示例2: time

    ?>
"><?php 
    echo $item->name;
    ?>
</a>
            <br/><font class="smallGrey"><?php 
    echo $dateFinish >= time() ? $item->status_id->name : Yii::t("user", "не активно");
    ?>
</font>
        </td>
        <td><?php 
    echo $item->type_id->name;
    ?>
</td>
        <td><?php 
    echo SiteHelper::getDateOnFormat($dateFinish, "d.m.Y");
    ?>
</td>
        <td>
            <a href="#" class="aAction"></a>
            <div class="itemAction textAlignCenter">
                <div>
                    <?php 
    if ($item->active == 1) {
        ?>
                        <a href="#" class="publishLink" onclick="return ajaxAction( this, '<?php 
        echo SiteHelper::createUrl("/user/firms/setPublish", array("id" => $item->id, "catalog" => "CatalogHotels"));
        ?>
', '' );"><?php 
        echo Yii::t("user", "Снять с публикации");
        ?>
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:31,代码来源:index.php

示例3: array

        }
    }
    ?>
        <td class="fieldID"><?php 
    echo $item->id;
    ?>
</td>
        <td><a href="<?php 
    echo SiteHelper::createUrl("/console/comments/edit", array("id" => $item->id));
    ?>
"><?php 
    echo $item->name;
    ?>
</a></td>
        <td><?php 
    echo SiteHelper::getDateOnFormat($item->date, "d.m.Y H:i");
    ?>
</td>
        <td><?php 
    echo $catalogItemModel->name;
    ?>
</td>
        <td><?php 
    echo $status;
    ?>
</td>
        <td class="fieldActions">
            <a href="<?php 
    echo SiteHelper::createUrl("/console/comments/edit", array("id" => $item->id));
    ?>
">Редактировать</a>
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:31,代码来源:index.php

示例4: array

    echo SiteHelper::createUrl("/user/firmComments/description", array("id" => $service->id, "fid" => $item->id));
    ?>
" title="<?php 
    echo Yii::t("page", "Описание акции/скидки");
    ?>
"><?php 
    echo $service->name;
    ?>
</a><br/>
                <?php 
    echo SiteHelper::getSubTextOnWorld($service->description, 550);
    ?>
                <br/><br/>
            </td>
            <td class="textAlignCenter"><?php 
    echo SiteHelper::getDateOnFormat($service->date, "d.m.Y H:i");
    ?>
</td>
            <td class="textAlignCenter"><?php 
    echo $service->is_new == 1 ? "<div class=\"readNew\">новое<br/></div>" : "";
    ?>
<div class="publishStatus"><?php 
    echo $service->active == 1 ? Yii::t("user", "опубликовано") : Yii::t("user", "не Опубликовано");
    ?>
</div></td>
            <td class="textAlignCenter">
                <a href="#" class="aAction"></a>
                <div class="itemAction textAlignCenter">
                    <a href="<?php 
    echo SiteHelper::createUrl("/user/firmComments/description", array("id" => $service->id, "fid" => $item->id));
    ?>
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:31,代码来源:pcomments_page.php

示例5: array

            if ($comm->user_id) {
                ?>
                                <?php 
                echo $comm->user_id->name;
                ?>
<br/>
                                <?php 
                echo $comm->user_id->email;
                ?>
                            <?php 
            }
            ?>
                        </td>
                        <td>
                            <?php 
            echo SiteHelper::getDateOnFormat($comm->date, "d.m.Y");
            ?>
                        </td>
                        <td class="textAlignCenter"><?php 
            echo $comm->is_valid == 0 ? Yii::t("page", "нет") : Yii::t("page", "да");
            ?>
</td>
                        <td>
                            <a href="<?php 
            echo SiteHelper::createUrl("/user/" . Yii::app()->controller->getId() . "/description", array("id" => $item->id, "comm_id" => $comm->id, "action" => "delComment"));
            ?>
"><?php 
            echo Yii::t("user", "Удалить");
            ?>
</a>&nbsp;
                            <a href="<?php 
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:31,代码来源:description.php

示例6: foreach

        <th class="TLFAction"><?php 
echo Yii::t("page", "статус");
?>
</th>
        <th></th>
    </tr>
<?php 
foreach ($trees as $tree) {
    ?>
    <tr>
        <td><?php 
    echo $tree->id;
    ?>
</td>
        <td><?php 
    echo $tree->date ? SiteHelper::getDateOnFormat("", "d.m.Y", $tree->date) : "-";
    ?>
</td>
        <td>
            <?php 
    echo $tree->garden_id->country->name . "<br/><a href=\"" . SiteHelper::createUrl("/gardens/places", array("id" => $tree->garden_id->id)) . "\" target=\"_blank\" title=\"описания сада\">" . $tree->garden_id->name;
    ?>
</a><br/>
            <?php 
    echo "<a href=\"" . SiteHelper::createUrl("/gardens/place", array("id" => $tree->place_id->id)) . "\" target=\"_blank\" title=\"описания участка\">" . $tree->place_id->name;
    ?>
,
            <?php 
    echo "<a href=\"" . SiteHelper::createUrl("/gardens/tree", array("id" => $tree->tree_type->id)) . "\" target=\"_blank\" title=\"описания дерева\">" . $tree->tree_type->name;
    ?>
</a>
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:31,代码来源:index.php


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