Beispiel #1
0
 public static function GetPagesByGroup($group)
 {
     $translate = Translate::Instance();
     $tbl = new fpp_page_Model();
     $orm = $tbl->db2cls();
     $return = null;
     $result = $orm->fetch_where(array('group_page' => $group), 'importance_page', 'DESC');
     $tr_title_page = Basic::TransVar("title_page");
     $tr_content_page = Basic::TransVar("content_page");
     foreach ($result as $row) {
         $return .= '<li class="supcat">' . html::anchor($translate->getOriginal("page") . '/' . $row->id_page . '/' . Basic::urlizar($row->{$tr_title_page}), $row->{$tr_title_page}) . '</li>';
     }
     return $return;
 }
 public function __t($word)
 {
     return Translate::Instance()->getOriginal($word);
 }
 public static function MasterCategory()
 {
     $cat = new fpp_category_Model();
     $t = Translate::Instance();
     $clave = array_search(self::$groupcat, $cat->group_category_byName);
     // $clave = 2;
     if (!($clave === false)) {
         self::$groupcatname = $clave;
         return html::anchor($t->getOriginal("category") . "/{$clave}", "Ver Todos");
     }
     return null;
 }
 public static function WidgetLogin()
 {
     $view = null;
     if ((int) @$_SESSION['conf']['client']['id'] == 0) {
         $view = View::factory("extras/client/login")->render();
     } else {
         $t = Translate::Instance();
         $cliente = new fpp_client_Model();
         $cliente = $cliente->db2cls((int) @$_SESSION['conf']['client']['id']);
         $view = View::factory("extras/client/logged")->set('mail', $cliente->mail_client)->set('name', $cliente->fname_client . ' ' . $cliente->lname_client)->set('logout', html::anchor($t->GetOriginal("client") . '/' . $t->GetOriginal("logout"), 'Salir de mi cuenta'))->render();
     }
     return $view;
 }