function carouselInsert() { $car = new Carousel(); $img = isset($_GET['img']) ? addslashes($_GET['img']) : 0; if ($img) { $car->photo_filename = $img; $car->save(); } $arrCar = $car->getWhere("photo_filename !='' ORDER BY photo_zIndex DESC "); //pr($arrCar); $gw = new GalleryWeb(); foreach ($arrCar as $num => $pic) { ?> <div class="carousel_thumb thumbnail col-md-2"> <div style="position:absolute;width: 10px; height: 10px;"> <input <?php if ($pic->photo_active) { echo 'checked="true"'; } ?> type="checkbox" onclick="carousel_activate(<?php echo $pic->photo_id; ?> );"> </div> <?php if ($pic->photo_active && $num > 0) { ?> <div onclick="carousel_moveUp(<?php echo $pic->photo_id; ?> );" style="cursor: pointer;position:absolute;width: 10px; height: 10px; margin-top: 30px; font-weight: bold;"> < </div> <?php } ?> <img class="img-responsive" src="<?php echo _SPPATH; echo $gw->uploadURLThumb; echo $pic->photo_filename; ?> "> <div class="carousel_menu"> <button type="button" onclick="if(confirm('<?php echo Lang::t("Are You Sure?"); ?> '))carousel_delete(<?php echo $pic->photo_id; ?> );" class="btn btn-default"><?php echo Lang::t('delete'); ?> </button> </div> </div> <?php } }