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


PHP Shopp::date_format_order方法代码示例

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


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

示例1: save_meta_box

function save_meta_box($Promotion)
{
    ?>

<div id="misc-publishing-actions">
	<div class="misc-pub-section misc-pub-section-last">

	<label for="discount-status"><input type="hidden" name="status" value="disabled" /><input type="checkbox" name="status" id="discount-status" value="enabled"<?php 
    echo $Promotion->status == "enabled" ? ' checked="checked"' : '';
    ?>
 /> &nbsp;<?php 
    _e('Enabled', 'Shopp');
    ?>
</label>
	</div>

	<div class="misc-pub-section misc-pub-section-last">

	<div id="start-position" class="calendar-wrap"><?php 
    $dateorder = Shopp::date_format_order(true);
    $previous = false;
    foreach ($dateorder as $type => $format) {
        if ($previous == "s" && $type[0] == "s") {
            continue;
        }
        if ("month" == $type) {
            ?>
<input type="text" name="starts[month]" id="starts-month" title="<?php 
            _e('Month', 'Shopp');
            ?>
" size="3" maxlength="2" value="<?php 
            echo $Promotion->starts > 1 ? date("n", $Promotion->starts) : '';
            ?>
" class="selectall" /><?php 
        } elseif ("day" == $type) {
            ?>
<input type="text" name="starts[date]" id="starts-date" title="<?php 
            _e('Day', 'Shopp');
            ?>
" size="3" maxlength="2" value="<?php 
            echo $Promotion->starts > 1 ? date("j", $Promotion->starts) : '';
            ?>
" class="selectall" /><?php 
        } elseif ("year" == $type) {
            ?>
<input type="text" name="starts[year]" id="starts-year" title="<?php 
            _e('Year', 'Shopp');
            ?>
" size="5" maxlength="4" value="<?php 
            echo $Promotion->starts > 1 ? date("Y", $Promotion->starts) : '';
            ?>
" class="selectall" /><?php 
        } elseif ($type[0] == "s") {
            echo "/";
        }
        $previous = $type[0];
    }
    ?>
</div>
	<p><?php 
    _e('Start promotion on this date.', 'Shopp');
    ?>
</p>

	<div id="end-position" class="calendar-wrap"><?php 
    $previous = false;
    foreach ($dateorder as $type => $format) {
        if ($previous == "s" && $type[0] == "s") {
            continue;
        }
        if ("month" == $type) {
            ?>
<input type="text" name="ends[month]" id="ends-month" title="<?php 
            _e('Month', 'Shopp');
            ?>
" size="3" maxlength="2" value="<?php 
            echo $Promotion->ends > 1 ? date("n", $Promotion->ends) : '';
            ?>
" class="selectall" /><?php 
        } elseif ("day" == $type) {
            ?>
<input type="text" name="ends[date]" id="ends-date" title="<?php 
            _e('Day', 'Shopp');
            ?>
" size="3" maxlength="2" value="<?php 
            echo $Promotion->ends > 1 ? date("j", $Promotion->ends) : '';
            ?>
" class="selectall" /><?php 
        } elseif ("year" == $type) {
            ?>
<input type="text" name="ends[year]" id="ends-year" title="<?php 
            _e('Year', 'Shopp');
            ?>
" size="5" maxlength="4" value="<?php 
            echo $Promotion->ends > 1 ? date("Y", $Promotion->ends) : '';
            ?>
" class="selectall" /><?php 
        } elseif ($type[0] == "s") {
            echo "/";
        }
//.........这里部分代码省略.........
开发者ID:forthrobot,项目名称:inuvik,代码行数:101,代码来源:ui.php

示例2: date_format_order

/**
 * @deprecated Use Shopp::date_format_order()
 **/
function date_format_order($fields = false)
{
    return Shopp::date_format_order($fields);
}
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:7,代码来源:Core.php

示例3: _e

}
?>
</label> <span id="schedule-toggling"><button type="button" name="schedule-toggle" id="schedule-toggle" class="button-secondary"><?php 
if ($Product->publish > 1) {
    _e('Edit', 'Shopp');
} else {
    _e('Schedule', 'Shopp');
}
?>
</button></span>

		<div id="scheduling">
			<div id="schedule-calendar" class="calendar-wrap">
				<?php 
$previous = false;
$dateorder = Shopp::date_format_order(true);
foreach ($dateorder as $type => $format) {
    if ($previous == "s" && $type[0] == "s") {
        continue;
    }
    if ("month" == $type) {
        ?>
<input type="text" name="publish[month]" id="publish-month" title="<?php 
        _e('Month', 'Shopp');
        ?>
" size="2" maxlength="2" value="<?php 
        echo $Product->publish > 1 ? date("n", $Product->publish) : '';
        ?>
" class="publishdate selectall" /><?php 
    } elseif ("day" == $type) {
        ?>
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:save.php


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