Exemplo n.º 1
0
<!-- attractions list -->
<div class="attraction-list" id="attraction-list01">
		<?php 
$oAttraction = new Attraction();
$attractions = $oAttraction->findAllFrom("Attraction", "1=1 order by sequence");
foreach ($attractions as $attraction) {
    $oAttractionImage = new AttractionImage();
    $attractgalleries = $oAttractionImage->findByAttractionId($attraction->id);
    $idx = 1;
    if ($oAttraction->countFrom('Attraction', "1=1") > 0) {
        foreach ($attractgalleries as $gallery) {
            if ($gallery->attractionid == $attraction->id) {
                ?>
			
					<div class="album-cover <?php 
                echo $attraction->name;
                ?>
">
						<div class="tooltips"><p>&nbsp;<?php 
                echo $gallery->distance;
                ?>
</p></div>
						<div>
							<img id="cover1" src="<?php 
                echo URL_PUBLIC;
                ?>
public/attraction/gallery/<?php 
                echo $gallery->filename;
                ?>
" border=0>
						</div>
Exemplo n.º 2
0
 public function save_order()
 {
     $attraction_array = $_POST['attraction_id'];
     $order_array = $_POST['order'];
     $attraction = new Attraction();
     foreach ($attraction_array as $key => $value) {
         $attraction_id = $value;
         $attraction_order = $order_array[$key];
         $attraction->update('Attraction', array('sequence' => $attraction_order), 'id=' . $attraction_id);
     }
     Flash::set('success', __('This attraction sequence has been saved.'));
     redirect(get_url('attraction'));
 }
Exemplo n.º 3
0
 public function setAttraction(Attraction $attraction)
 {
     $this->attraction = $attraction;
     $attraction->addInfo($this);
 }