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


PHP JDate::setDate方法代码示例

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


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

示例1: draw

    public function draw($events)
    {
        $this_day_events = 0;
        if (is_array($events)) {
            if (isset($events[$this->cell_year][$this->cell_month][$this->cell_day])) {
                $this_day_events = count($events[$this->cell_year][$this->cell_month][$this->cell_day]);
            }
        } else {
            $events = array();
        }
        ?>

<span class="pn_cal_cell_ev_counter"
<?php 
        if ($this_day_events <= 0) {
            ?>
 style="display: none;"
<?php 
        }
        ?>
><?php 
        echo $this_day_events;
        ?>
 </span>
<div data-year="<?php 
        echo $this->cell_year;
        ?>
"
	data-month="<?php 
        echo $this->cell_month;
        ?>
"
	data-day="<?php 
        echo $this->cell_day;
        ?>
"
	data-week-day-num="<?php 
        echo $this->get_week_day_num();
        ?>
"
	class="<?php 
        if ($this->in_current_month) {
            ?>
pn_this_month<?php 
        } else {
            ?>
other_month<?php 
        }
        ?>
 <?php 
        echo $this->rate_price == true ? "hasrate" : "";
        ?>
">
	<?php 
        echo $this->cell_day;
        ?>
	<?php 
        $dd = new JDate();
        $dd->setDate($this->cell_year, $this->cell_month, $this->cell_day);
        $date = $dd->format('Y-m-d');
        ?>
	<?php 
        if ($this->rate) {
            $view = 'transportrate';
            ?>
		
	<a target="_blank"
		href="<?php 
            echo JUri::base();
            ?>
index.php?option=com_bookpro&view=<?php 
            echo $view;
            ?>
&layout=edit&id=<?php 
            echo $this->rate->id;
            ?>
">
		<i class="icon-edit" style="color: white;"></i> </a>
		<input class="checkboxCell" type="checkbox"  value="<?php 
            echo $this->rate->id;
            ?>
" name="cid[]" id="cb<?php 
            echo $this->rate->id;
            ?>
">
		<?php 
            $icon_private = !empty($this->rate->private_state) ? 'publish' : 'unpublish';
            $icon_share = !empty($this->rate->share_state) ? 'publish' : 'unpublish';
            echo '<label>Private: <i class="icon-' . $icon_private . '"></i>';
            echo 'Shareride: <i class="icon-' . $icon_share . '"></i>';
            echo '</label>';
            ?>
		<?php 
        }
        ?>
		
</div>


		<?php 
//.........这里部分代码省略.........
开发者ID:hixbotay,项目名称:executivetransport,代码行数:101,代码来源:transportcalendar.php

示例2: draw

    public function draw($events)
    {
        $this_day_events = 0;
        if (is_array($events)) {
            if (isset($events[$this->cell_year][$this->cell_month][$this->cell_day])) {
                $this_day_events = count($events[$this->cell_year][$this->cell_month][$this->cell_day]);
            }
        } else {
            $events = array();
        }
        $transports = TransportHelper::getTransportList();
        ?>

<span class="pn_cal_cell_ev_counter"
<?php 
        if ($this_day_events <= 0) {
            ?>
 style="display: none;"
<?php 
        }
        ?>
><?php 
        echo $this_day_events;
        ?>
 </span>
<div data-year="<?php 
        echo $this->cell_year;
        ?>
"
	data-month="<?php 
        echo $this->cell_month;
        ?>
"
	data-day="<?php 
        echo $this->cell_day;
        ?>
"
	data-week-day-num="<?php 
        echo $this->get_week_day_num();
        ?>
"
	class="<?php 
        if ($this->in_current_month) {
            ?>
pn_this_month<?php 
        } else {
            ?>
other_month<?php 
        }
        ?>
">
	<?php 
        echo $this->cell_day;
        ?>
	<?php 
        $dd = new JDate();
        $dd->setDate($this->cell_year, $this->cell_month, $this->cell_day);
        $date = $dd->format('Y-m-d');
        $view = 'transportdayoff';
        ?>
	<?php 
        if ($this->rate) {
            $params = json_decode($this->rate->params);
            ?>
		
		<a target="_blank"
		href="<?php 
            echo JUri::base();
            ?>
index.php?option=com_bookpro&view=<?php 
            echo $view;
            ?>
&layout=edit&id=<?php 
            echo $this->rate->id;
            ?>
">
		<i class="icon-edit" style="color: white;"></i> </a>
		<input class="checkboxCell" type="checkbox"  value="<?php 
            echo $this->rate->id;
            ?>
" name="cid[]" id="cb<?php 
            echo $this->rate->id;
            ?>
">
		<?php 
            foreach ($params as $i => $rate) {
                ?>
			<small><?php 
                echo $transports[$i]->code;
                ?>
</small>
		<?php 
            }
            ?>
		<?php 
        } else {
            ?>
			<center>
				<a target="_blank" class="mgpopup"
					href="<?php 
//.........这里部分代码省略.........
开发者ID:hixbotay,项目名称:executivetransport,代码行数:101,代码来源:dayoffcalendar.php

示例3: draw

    public function draw($events)
    {
        $this_day_events = 0;
        if (is_array($events)) {
            if (isset($events[$this->cell_year][$this->cell_month][$this->cell_day])) {
                $this_day_events = count($events[$this->cell_year][$this->cell_month][$this->cell_day]);
            }
        } else {
            $events = array();
        }
        ?>

<span class="pn_cal_cell_ev_counter"
<?php 
        if ($this_day_events <= 0) {
            ?>
 style="display: none;"
<?php 
        }
        ?>
><?php 
        echo $this_day_events;
        ?>
 </span>
<div data-year="<?php 
        echo $this->cell_year;
        ?>
"
	data-month="<?php 
        echo $this->cell_month;
        ?>
"
	data-day="<?php 
        echo $this->cell_day;
        ?>
"
	data-week-day-num="<?php 
        echo $this->get_week_day_num();
        ?>
"
	class="<?php 
        if ($this->in_current_month) {
            ?>
pn_this_month<?php 
        } else {
            ?>
other_month<?php 
        }
        ?>
 <?php 
        echo $this->rate_price == true ? "hasrate" : "";
        ?>
">
	<?php 
        echo $this->cell_day;
        ?>
	<?php 
        $input = JFactory::getApplication();
        $tour_id = $input->get('tour_id', 0);
        $dd = new JDate();
        $dd->setDate($this->cell_year, $this->cell_month, $this->cell_day);
        $date = $dd->format('Y-m-d');
        ?>
	<?php 
        if ($this->rate_price) {
            $icon = $this->rate->state ? 'icon-publish' : 'icon-unpublish';
            ?>
	<a class="btn btn-small" target="_blank" href="<?php 
            echo JUri::base();
            ?>
index.php?option=com_bookpro&view=ratedetail&tour_id=<?php 
            echo $this->tour_id;
            ?>
&date=<?php 
            echo $date;
            ?>
">
		<i class="icon-edit"></i>
	</a>
	<input class="checkboxCell" type="checkbox"  value="<?php 
            echo $date;
            ?>
" name="dates[]" id="<?php 
            echo $date;
            ?>
">
	<label style="font-size:80%"><i class="<?php 
            echo $icon;
            ?>
"></i>Adult:<?php 
            echo $this->rate->adult;
            ?>
, Child:<?php 
            echo $this->rate->child;
            ?>
, Infant:<?php 
            echo $this->rate->infant;
            ?>
</label>
	<?php 
//.........这里部分代码省略.........
开发者ID:hixbotay,项目名称:executivetransport,代码行数:101,代码来源:calendar.php


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