Ejemplo n.º 1
0
            header("Location: vclub_ad.php");
            exit;
        }
    }
}
if (!empty($_GET['edit']) && !empty($id)) {
    $current_ad = $ad->getById($id);
}
$ads = $ad->getAllWithStatForMonth();
if (!empty($_GET['id'])) {
    $denied_categories = $ad->getDeniedVclubCategoriesForAd((int) $_GET['id']);
} else {
    $denied_categories = array();
}
$video_category = new VideoCategory();
$video_categories = $video_category->getAll();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">

body {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}
td {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    text-decoration: none;
    color: #000000;
Ejemplo n.º 2
0
 public function edit_video_ads()
 {
     if ($no_auth = $this->checkAuth()) {
         return $no_auth;
     }
     if ($this->method == 'POST' && !empty($this->postData['form']['id'])) {
         $id = $this->postData['form']['id'];
     } else {
         if ($this->method == 'GET' && !empty($this->data['id'])) {
             $id = $this->data['id'];
         } else {
             return $this->app->redirect('add-video-ads');
         }
     }
     $this->ads = new \VclubAdvertising();
     $this->ad = $this->ads->getById($id);
     $this->ad['denied_categories'] = $this->ads->getDeniedVclubCategoriesForAd($id);
     $video_category = new \VideoCategory();
     $this->video_categories = $video_category->getAll();
     $this->getVideoCatForAds();
     $form = $this->buildAdsForm($this->ad);
     if ($this->saveVideoAdsData($form)) {
         return $this->app->redirect('video-advertise');
     }
     $this->app['form'] = $form->createView();
     $this->app['adsEdit'] = TRUE;
     $this->app['adsTitle'] = $this->ad['title'];
     $this->app['breadcrumbs']->addItem($this->setLocalization('Advertising'), $this->app['controller_alias'] . '/video-advertise');
     $this->app['breadcrumbs']->addItem($this->setLocalization('Edit commercial'));
     return $this->app['twig']->render('VideoClub_add_video_ads.twig');
 }
 public function get(RESTApiRequest $request)
 {
     $categories = new \VideoCategory();
     $categories->setLocale($request->getLanguage());
     return $this->filter($categories->getAll(true));
 }