<div class="film_cover"> <?php $card_cover = UserCardsModel::model()->where("`id`='{$user->card_main_id}'")->findRow(); ?> <img src="<?php echo $card_cover->cardImage; ?> " /> </div> <div class="badge_list"> <ul class="gifts"><?php foreach ($gifts as $gist) { ?> <?php $imagegift = UserGiftsModel::model()->where("`id`=" . $gist->idPresent)->limit("10")->findRow(); ?> <li> <div class="img_block" style="background-color: transparent;"><img src="<?php if (!empty($imagegift->gift_image)) { if (file_exists($_SERVER['DOCUMENT_ROOT'] . $imagegift->gift_image)) { echo $imagegift->gift_image; } else { echo '/assets/new/images/grey.jpg'; } } else { echo '/assets/new/images/grey.jpg'; } ?> " width="67" height="97"/></div> <div class="arrow_box_bage_box">
public function actionPresentsGiftsDelete($id) { UserGiftsModel::model()->where("`id`='" . (int) $id . "'")->delete(); $this->redirect("/admin/presents"); }