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 
    }
Ejemplo n.º 2
0
    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 
            echo JUri::base();
            ?>
index.php?option=com_bookpro&view=<?php 
            echo $view;
            ?>
&layout=edit&date=<?php 
            echo $dd->format('Y-m-d');
            ?>
">
					<i class="icon-plus-2"></i>
				</a>
			</center>
		<?php 
        }
        ?>
		
</div>


		<?php 
        $transports = null;
    }
Ejemplo n.º 3
0
    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 
        }
        ?>
	
</div>


<?php 
    }