Example #1
0
     $positioner = array_slice($positioner, count($positioner) - 10, 10);
 }
 $smarty->assign("positioner", $positioner);
 $smarty->assign("nr", $nr);
 $smarty->assign("multiply", $multiplier);
 $smarty->assign("topplistan", $topplistan);
 //false if no custom added
 $foretagCustomBild = CustomForetagsbild::getImgUrlIfValidFile($foretag->getId());
 $smarty->assign("foretagCustomBild", $foretagCustomBild);
 $bildblock = FotoalbumBild::loadForetagsBildblock($foretag, $antal = 20);
 $smarty->assign("bildblock", $bildblock);
 //
 // Global toplists.
 //
 $tf = array();
 $tfObjects = Foretag::listAll();
 $tf = array();
 foreach ($tfObjects as $tForetag) {
     if (!empty($tForetag) && strtotime($tForetag->getSlutDatum()) >= $slutDatum_ts) {
         $stegindex = $tForetag->getStegIndex();
         if ($stegindex != 0) {
             $foretag_ids[] = $tForetag->getId();
             $tNamn = $tForetag->getNamn();
             $tNamn = utf8_decode($tNamn);
             $tNamn = wordwrap($tNamn, 15, "<br/>", true);
             $tNamn = utf8_encode($tNamn);
             $tf[] = array("stegindex" => $stegindex, "namn" => $tNamn, "id" => $tForetag->getId());
         }
         unset($tForetag);
     }
 }
Example #2
0
<?php

include $_SERVER["DOCUMENT_ROOT"] . "/php/init.php";
$smarty = new MMSmarty();
$smarty->assign("pagetitle", "Lista företag");
$foretagList = Foretag::listAll();
$smarty->assign("foretagList", $foretagList);
$smarty->display('listforetag.tpl');