當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。