Пример #1
0
 function index()
 {
     $rep = $this->getResponse('html');
     $tpl = new jTpl();
     $form = jForms::create('search');
     $tpl->assign('formulaire', $form);
     $vidsServ = new OnDiskVideosService();
     $tpl->assign('video', $vidsServ->randomVideo());
     $picasaSrv = new jPicasa();
     $paintings = array();
     foreach ($picasaSrv->lastImages() as $img) {
         $paintings[$img->name] = new Painting($img);
     }
     $tpl->assign('images', $paintings);
     $rep->body->assign('MAIN', $tpl->fetch('photogallery_index'));
     return $rep;
 }
Пример #2
0
 function newPaintingsLetter()
 {
     $rep = $this->getResponse('html');
     $picasServ = new jPicasa();
     $imageTpl = new jTpl();
     foreach ($picasServ->lastImages(3) as $img) {
         $paintings[] = new Painting($img);
     }
     $imageTpl->assign('images', $paintings);
     $text = $imageTpl->fetch('imagesNewsLetter');
     $tpl = new jTpl();
     $form = jForms::create('NewsLetter~news');
     $form->setData('text', $text);
     $tpl->assign('form', $form);
     $rep->body->assign('MAIN', $tpl->fetch('new'));
     return $rep;
 }