Exemplo n.º 1
0
 function __construct($content, $title)
 {
     parent::__construct();
     define(GOOGLE_CODE_TRACKER_NOT_ACTIF, true);
     $this->render = new Table();
     $this->render->setWidth("100%");
     // Header
     if (defined('SITE_META_OPENGRAPH_IMAGE') && SITE_META_OPENGRAPH_IMAGE != "") {
         $logo = new Picture(SITE_META_OPENGRAPH_IMAGE);
     } else {
         $logo = new Picture("img/logo_128x400_" . $_SESSION['lang'] . ".png", 128, 400);
     }
     $logo->setTitle(__(SITE_NAME));
     $logo_link = new Link($this->getPage()->getBaseLanguageURL(), Link::TARGET_NONE, $logo);
     $img_obj = new Object($logo_link);
     $img_obj->add("<br/><br/>");
     $this->render->addRow($img_obj);
     $this->render->addRow();
     // Error message
     $small_img = new Picture("wsp/img/warning_16.png", 16, 16, 0, "absmiddle");
     $title_header = new Object($small_img, $title);
     $error_box = new Box($title_header, true, Box::STYLE_MAIN, Box::STYLE_MAIN, '', 'error_box', 700);
     $error_box->setContent($content);
     $this->render->addRow($error_box);
 }
Exemplo n.º 2
0
 function __construct()
 {
     // Header
     $logo = new Picture("img/logo_128x400_" . $_SESSION['lang'] . ".png", 128, 400);
     $logo->setTitle(__(SITE_NAME));
     $logo_link = new Link(BASE_URL . $_SESSION['lang'] . "/", Link::TARGET_NONE, $logo);
     $img_obj = new Object($logo_link);
     $img_obj->add("<br/><br/>");
     $this->render = $img_obj;
 }
Exemplo n.º 3
0
 public function testPut()
 {
     $picture = new Picture();
     $picture->setId(1);
     $picture->setTitle('announcement_1_1');
     $picture->setPath('/announcement/original/');
     $picture->setAlternative('Un texte alternatif modifié');
     $picture->setIdAnnouncement(10);
     $picture->setExtension('gif');
     $pictureMapper = new PictureMapper();
     $pictureMapper->setId(1);
     $pictureMapper->updatePicture($picture);
     $this->assertEquals($picture, $pictureMapper->selectPicture());
 }