linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file tpl_yellowpages.php

Documentation is available at tpl_yellowpages.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage public
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. include_once(themePath('../yellowpages/display.php'));
  12. $GLOBALS['filters'][U_L]['theme']['active'1// filter activation
  13.  
  14. SetHTMLTitle(_t('yp','section'));
  15.  
  16. // récupération des variables GET et POST
  17. if (isset($_REQUEST['id']&& !isset($_REQUEST['filter'])) {
  18.   $yp_id=$_REQUEST['id'];
  19. }
  20. else $yp_id=-1;
  21.  
  22. if (isset($_REQUEST['filter'])) {
  23.      if ($_REQUEST['filter']=="alpha"{
  24.        $filter_id=$_REQUEST['id'];
  25.        $filter="alpha";
  26.      }
  27.      if ($_REQUEST['filter']==$GLOBALS['filters'][U_L]['theme']['linkvalue']{
  28.  
  29.        $filter_id=$_REQUEST['id'];
  30.        $filter=$GLOBALS['filters'][U_L]['theme']['linkvalue'];
  31.      }
  32. }
  33. else {
  34.   $filter_id=-1;
  35.   $filter=-1;
  36. }
  37. if (isset($_REQUEST['debut'])) $debut=$_REQUEST['debut'];
  38. else $debut=0;
  39.  
  40.  
  41. // Handle navigation
  42. if (ActiveItemKey($GLOBALS['activeitem'])== 'directory-detail' || $filter!=-|| ActiveItemKey($GLOBALS['activeitem'])== 'directory-add'{
  43.     $link_archivearray('rub'=> $GLOBALS['links'][U_L]['directory']['linkvalue']);
  44.     echo '<div class="switchnav">';
  45.     echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_currentlist').'">'._t('divers','goto_currentlist').'</a>'.END_LINE;
  46.     echo '</div>';
  47. }
  48.  
  49. if (ActiveItemKey($GLOBALS['activeitem'])=='directory' || ActiveItemKey($GLOBALS['activeitem'])== 'directory-detail'{
  50.   
  51.   
  52.   /**
  53.    * affichage de l'annuaire
  54.    **/
  55.  
  56.   //DisplayUrlAddYellowpages();
  57.   //DisplayAlphaBeta($filter,$filter_id);
  58.   echo '<br style="clear:both" />';
  59.   echo '<h1>'._t('yp','list').'</h1>'.END_LINE;
  60.   echo '<div class="sub-title">'._t('yp','h1_public_comment').'</div>';
  61.   echo DisplayUrlAddYellowpages().'<div style="clear:both"></div>';
  62.   if ($yp_id==-1{
  63.     DisplayListYellowPages($debutSELECT_LIMIT$filter$filter_id);
  64.     setBreadcrumb(array(ucfirst(_t('yp''section')) => false));
  65.  
  66.   }
  67.   /**
  68.    * affichage d'une organisation
  69.    **/
  70.  
  71.   else {
  72.     // set HTML Title
  73.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getOneYpName($yp_id));
  74.     SetHTMLTitle(formatText($result[0]['yellowp_name']'2HTML'));
  75.     setBreadcrumb(array(ucfirst(_t('yp''section')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['directory']['linkvalue']))));
  76.     setBreadcrumb(array(formatText($result[0]['yellowp_name']'2HTML'=> false));
  77.  
  78.     echo DisplayOneYellowPages($yp_id);
  79.   }
  80. }
  81. /**
  82.  * affichage du formulaire d'ajout
  83.  **/
  84.  
  85. else {
  86.   setBreadcrumb(array(ucfirst(_t('yp''section')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['directory']['linkvalue']))));
  87.   setBreadcrumb(array(_t('yp','add_public'=> false));
  88.   echo '<br style="clear:both" />';
  89.   echo '<h1>'._t('yp','add_public').'</h1>'.END_LINE;
  90. }
  91.  
  92. ?>

Documentation generated on Thu, 03 May 2012 15:08:00 +0200 by phpDocumentor 1.4.1