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

Source for file tpl_publication.php

Documentation is available at tpl_publication.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.  
  12. <?php
  13. //////////////////////////////////////////
  14. /////affichage partie dossier
  15. //////////////////////////////////////////
  16.  
  17. if(ActiveItemKey($GLOBALS['activeitem']== 'publication' || ActiveItemKey($GLOBALS['activeitem']== 'publication-archives'{
  18.  
  19.   SetHTMLTitle(_t('publication','section'))// set HTML title
  20.   setBreadcrumb(array(ucfirst(formatText(_t('publication''section')'2HTML')) => false));
  21.  
  22.  
  23.   if(ActiveItemKey($GLOBALS['activeitem']== 'publication'{
  24.     $GLOBALS['filters'][U_L]['theme']['active'1// filter activation
  25.     $GLOBALS['filters'][U_L]['level']['active'1// filter activation
  26.     $GLOBALS['filters'][U_L]['scale']['active'1// filter activation
  27.   }
  28.   include_once(themePath('../publication/display.php'));
  29.   /** préparation des variables
  30.    *     $statut
  31.    *     $debut default 0
  32.    *     $id -> default -1
  33.    *     $filter default -1
  34.    **/
  35.  
  36.   if(ActiveItemKey($GLOBALS['activeitem'])=='publication'$statut='public';
  37.   if(ActiveItemKey($GLOBALS['activeitem'])=='publication-archives'$statut='archives_p';
  38.   if(isset($_REQUEST['id'])) $id=$_REQUEST['id']else $id=-1;
  39.   if(isset($_REQUEST['debut'])) $debut=$_REQUEST['debut']else $debut=0;
  40.   if(isset($_REQUEST['filter'])) {
  41.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['scale']['linkvalue']$filter='SCALE';
  42.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['theme']['linkvalue']$filter='THEME';
  43.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['level']['linkvalue']$filter='LEVEL';
  44.   else $filter=-1;
  45.  
  46.  
  47.   /** Affichage du lien de consultation d'archives ( si nécessaire
  48.    */
  49.   if(ActiveItemKey($GLOBALS['activeitem']!= 'publication-archives')  {
  50.  
  51.     $link_archivearray('rub'=> $GLOBALS['links'][U_L]['publication-archives']['linkvalue']);
  52.     echo '<div class="switchnav">';
  53.     echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_archives').'">'._t('divers','goto_archives').'</a>'.END_LINE;
  54.     echo '</div>';
  55.   }
  56.  
  57.   /** Affichage du lien de consultation de la liste courante ( si nécessaire
  58.    */
  59.   if(ActiveItemKey($GLOBALS['activeitem']== 'publication-archives')  {
  60.  
  61.     $link_archivearray('rub'=> $GLOBALS['links'][U_L]['publication']['linkvalue']);
  62.     echo '<div class="switchnav">';
  63.     echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_currentlist').'">'._t('divers','goto_currentlist').'</a>'.END_LINE;
  64.     echo '</div>';
  65.   }
  66.  
  67.   /** Affichage du Listing Des Dossiers et Dossiers archivés
  68.    */
  69.   if((isset($_REQUEST['id']&& isset($_REQUEST['filter'])) || (!isset($_REQUEST['id']&& !isset($_REQUEST['filter'])))
  70.   {
  71.     DisplayListPublication($statut$filter$id$debut);
  72.   }
  73.  
  74.  
  75.   /** Détail d'un dossier
  76.    */
  77.   if(isset($_REQUEST['id']&& !isset($_REQUEST['filter'])) {
  78.     // set HTML Title
  79.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getPublicationTitle($id));
  80.     SetHTMLTitle(formatText($result[0]['publi_title']'2HTML'));
  81.     setBreadcrumb(array(ucfirst(formatText(_t('publication''section')'2HTML')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['publication']['linkvalue']))formatText($result[0]['publi_title']'2HTML'=> false));
  82.     
  83.     $publi_statut=DisplayOnePublication($id);
  84.     echo '<div id="ressources">'.END_LINE;
  85.     echo '</div>'.END_LINE;
  86.     if(commentEnabled('publication')) {
  87.       echo '<h3>'._t('comment''section').'</h3>'.END_LINE;
  88.       echo '<div id="comments">'.END_LINE;
  89.       displayComments(array('module'=> 'publication''module_id'=> $id'order_by' => 'ASC')falsetrue);
  90.       if($publi_statut == 'P'displayCommentForm(array('module'=> 'publication''module_id'=> $id));
  91.       echo '</div>'.END_LINE;
  92.     }
  93.   }
  94. }
  95.  
  96. //////////////////////////////////////////
  97. /////affichage rapport de groupe de travail
  98. //////////////////////////////////////////
  99.  
  100. if(ActiveItemKey($GLOBALS['activeitem']== 'report'{
  101.   include_once(themePath('../workshoprep/display.php'));
  102.  
  103.   SetHTMLTitle(_t('workshoprep','section'))// set HTML title
  104.   setBreadcrumb(array(ucfirst(formatText(_t('workshop''name')'2HTML')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue']))));
  105.   /** préparation des variables
  106.    *     $id -> default -1
  107.    **/
  108.  
  109.   if(isset($_REQUEST['id'])) $id=$_REQUEST['id']else $id=-1;
  110.  
  111.   /** Détail d'un rapport
  112.    */
  113.   if(isset($_REQUEST['id'])) {
  114.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getoneCompleteWorkshopRep($id));
  115.     $status $result[0]['workrep_statut'];
  116.     SetHTMLTitle(formatText($result[0]['workrep_title']' ('.$result[0]['workshop_denomination'].')''2HTML'));
  117.     setBreadcrumb(array(formatText($result[0]['workshop_denomination']'2HTML'=> HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue']'id' => $result[0]['workrep_workshop_id']'name' => formatText($result[0]['workshop_denomination']'2HTML')))));
  118.  
  119.     DisplayOneWorkshopRep($id);
  120.     echo '<div id="ressources">'.END_LINE;
  121.     echo '</div>'.END_LINE;
  122.     if(commentEnabled('report')) {
  123.       echo '<h3>'._t('comment''section').'</h3>'.END_LINE;
  124.       echo '<div id="comments">'.END_LINE;
  125.       displayComments(array('module'=> 'report''module_id'=> $id'order_by' => 'ASC')falsetrue);
  126.       if($status == 'P'displayCommentForm(array('module'=> 'report''module_id'=> $id));
  127.       echo '</div>'.END_LINE;
  128.     }
  129.   }
  130.  
  131. }
  132.  
  133.  
  134. //////////////////////////////////////////
  135. /////    affichage Parties par parties
  136. /////    Rapports de groupe de travail et Dossiers
  137. //////////////////////////////////////////
  138.  
  139. if(ActiveItemKey($GLOBALS['activeitem']=='report-part' || ActiveItemKey($GLOBALS['activeitem']== 'publication-part'{
  140.   include_once(themePath('../contents/display.php'));
  141.  
  142.   /** préparation des variables
  143.    *     $id -> default -1
  144.    *   $parentid -> default -1
  145.    **/
  146.  
  147.  
  148.   if(isset($_REQUEST['id'])) $id=$_REQUEST['id']else $id=-1;
  149.   if(isset($_REQUEST['parentid'])) $parentid=$_REQUEST['parentid']else $parentid=-1;
  150.  
  151.   /** Détail d'une partie
  152.    */
  153.   if(ActiveItemKey($GLOBALS['activeitem']=='report-part')
  154.   {
  155.     include_once(themePath('../workshoprep/display.php'));
  156.  
  157.     SetHTMLTitle(_t('workshoprep','section'))// set HTML title
  158.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getoneCompleteWorkshopRep($parentid));
  159.     $status $result[0]['workrep_statut'];
  160.     SetHTMLTitle(formatText($result[0]['workrep_title']' ('.$result[0]['workshop_denomination'].')''2HTML'));
  161.     setBreadcrumb(array(ucfirst(formatText(_t('workshop''name')'2HTML')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue']))));
  162.     setBreadcrumb(array(formatText($result[0]['workshop_denomination']'2HTML'=> HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue']'id' => $result[0]['workrep_workshop_id']'name' => formatText($result[0]['workshop_denomination']'2HTML')))));
  163.     setBreadcrumb(array(formatText($result[0]['workrep_title']'2HTML'=> false));
  164.  
  165.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getOneWorkshopParts($id));
  166.  
  167.     SetHTMLTitle(formatText($result[0]['workrepcon_title']'2HTML'));
  168.     
  169.     DisplayWorkshopNameAndGroup($parentid);
  170.  
  171.     DisplayWorkshopRepLinkinPart($id$parentid'TEXT');
  172.     if(commentEnabled('report')) {
  173.       postCommentAction(array('module'=> 'report''module_id'=> $parentid));
  174.       echo '<div id="anchor-comments">'.END_LINE;
  175.       echo getCommentsAnchor(array('module'=> 'report''module_id'=> $parentid));
  176.       if($status == 'P'echo getPostCommentAnchor(array('module'=> 'report''module_id'=> $parentid));
  177.       echo '</div>'.END_LINE;
  178.     }
  179.     echo '<div class="nextprev">'.END_LINE;
  180.     DisplayLinkParts($id$parentid'PREVIOUS''W');
  181.     DisplayLinkParts($id$parentid'NEXT''W');
  182.     echo '</div>'.END_LINE;
  183.     echo '<div id="ressources">'.END_LINE;
  184.     DisplayWorkshopRepLinks($parentid);
  185.     DisplayWorkshopRepBiblio($parentid);
  186.     echo '</div>'.END_LINE;
  187.     if(commentEnabled('report')) {
  188.       echo '<h3>'._t('comment''section').'</h3>'.END_LINE;
  189.       echo '<div id="comments">'.END_LINE;
  190.       displayComments(array('module'=> 'report''module_id'=> $parentid'order_by' => 'ASC')falsetrue);
  191.       if($status == 'P'displayCommentForm(array('module'=> 'report''module_id'=> $parentid));
  192.       echo '</div>'.END_LINE;
  193.     }
  194.   }
  195.   if(ActiveItemKey($GLOBALS['activeitem']== 'publication-part')
  196.   {
  197.     include_once(themePath('../publication/display.php'));
  198.  
  199.     SetHTMLTitle(_t('publication','section'))// set HTML title
  200.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getPublicationTitle($parentid));
  201.     $status $result[0]['publi_statut'];
  202.     SetHTMLTitle(formatText($result[0]['publi_title']'2HTML'));
  203.     setBreadcrumb(array(ucfirst(formatText(_t('publication''section')'2HTML')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['publication']['linkvalue']))formatText($result[0]['publi_title']'2HTML'=> HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['publication']['linkvalue']'id' => $parentid'name' => formatText($result[0]['publi_title']'2HTML')))));
  204.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getOnePublicationParts($id));
  205.     SetHTMLTitle(formatText($result[0]['publicon_title']'2HTML'));
  206.  
  207.     DisplayPublicationTitle($parentid);
  208.     if(commentEnabled('publication')) {
  209.       postCommentAction(array('module'=> 'publication''module_id'=> $parentid));
  210.       echo '<div id="anchor-comments">'.END_LINE;
  211.       echo getCommentsAnchor(array('module'=> 'publication''module_id'=> $parentid));
  212.       if($status == 'P'echo getPostCommentAnchor(array('module'=> 'publication''module_id'=> $parentid));
  213.       echo '</div>'.END_LINE;
  214.     }
  215.     DisplayPublicationLinkinPart($id$parentid'TEXT');
  216.     echo '<div class="nextprev">'.END_LINE;
  217.     DisplayLinkParts($id$parentid'PREVIOUS''P');
  218.     DisplayLinkParts($id$parentid'NEXT''P');
  219.     echo '</div>'.END_LINE;
  220.     echo '<div id="ressources">'.END_LINE;
  221.     DisplayPublicationLinks($parentid);
  222.     DisplayPublicationMulti($parentid);
  223.     DisplayPublicationBiblio($parentid);
  224.     echo '</div>'.END_LINE;
  225.     if(commentEnabled('publication')) {
  226.       echo '<h3>'._t('comment''section').'</h3>'.END_LINE;
  227.       echo '<div id="comments">'.END_LINE;
  228.       displayComments(array('module'=> 'publication''module_id'=> $parentid'order_by' => 'ASC')falsetrue);
  229.       if($status == 'P'displayCommentForm(array('module'=> 'publication''module_id'=> $parentid));
  230.       echo '</div>'.END_LINE;
  231.     }
  232.   }
  233.  
  234.  
  235. }
  236.  
  237.  
  238. //////////////////////////////////////////
  239. /////affichage partie news
  240. //////////////////////////////////////////
  241.  
  242. if(ActiveItemAlias($GLOBALS['activeitem'])=='news'{
  243.  
  244.   SetHTMLTitle(_t('news','section'))// set HTML title
  245.   setBreadcrumb(array(ucfirst(formatText(_t('news''section')'2HTML')) => false));
  246.  
  247.   if(ActiveItemKey($GLOBALS['activeitem'])=='news'{
  248.     $GLOBALS['filters'][U_L]['theme']['active'1// filter activation
  249.     $GLOBALS['filters'][U_L]['level']['active'1// filter activation
  250.     $GLOBALS['filters'][U_L]['scale']['active'1// filter activation
  251.   }
  252.   include_once(themePath('../news/display.php'));
  253.   /** préparation des variables
  254.    *     $statut
  255.    *     $debut default 0
  256.    *     $id -> default -1
  257.    *     $filter default -1
  258.    **/
  259.  
  260.   if(ActiveItemKey($GLOBALS['activeitem'])=='news'$statut='public';
  261.   if(ActiveItemKey($GLOBALS['activeitem'])=='news-archives'$statut='archives_p';
  262.   if(isset($_REQUEST['id'])) $id=$_REQUEST['id']else $id=-1;
  263.   if(isset($_REQUEST['debut'])) $debut=$_REQUEST['debut']else $debut=0;
  264.   if(isset($_REQUEST['filter'])) {
  265.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['scale']['linkvalue']$filter='SCALE';
  266.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['theme']['linkvalue']$filter='THEME';
  267.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['level']['linkvalue']$filter='LEVEL';
  268.   else $filter=-1;
  269.  
  270.   /** Affichage du lien de consultation d'archives ( si nécessaire
  271.    */
  272.  
  273.   if(ActiveItemKey($GLOBALS['activeitem']!= 'news-archives')  {
  274.  
  275.     $link_archivearray('rub'=> $GLOBALS['links'][U_L]['news-archives']['linkvalue']);
  276.  
  277.     echo '<div class="switchnav">';
  278.     echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_archives').'">'._t('divers','goto_archives').'</a>'.END_LINE;
  279.     echo '</div>';
  280.  
  281.   }
  282.  
  283.  
  284.   /** Affichage du lien de consultation liste principale ( si nécessaire
  285.    */
  286.   if(ActiveItemKey($GLOBALS['activeitem']== 'news-archives')  {
  287.  
  288.     $link_archivearray('rub'=> $GLOBALS['links'][U_L]['news']['linkvalue']);
  289.  
  290.     echo '<div class="switchnav">';
  291.     echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_currentlist').'">'._t('divers','goto_currentlist').'</a>'.END_LINE;
  292.     echo '</div>';
  293.  
  294.   }
  295.  
  296.   /** Affichage du Listing Actualité + Archives
  297.    */
  298.  
  299.   if((isset($_REQUEST['id']&& isset($_REQUEST['filter'])) || (!isset($_REQUEST['id']&& !isset($_REQUEST['filter'])))
  300.   {
  301.     DisplayListNews($statut$filter$id$debut);
  302.   }
  303.  
  304.  
  305.   /** Détail d'une actualité
  306.    */
  307.   if(isset($_REQUEST['id']&& !isset($_REQUEST['filter'])) {
  308.  
  309.     // set HTML Title
  310.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getNewsTitle($id));
  311.     SetHTMLTitle(formatText($result[0]['news_title']'2HTML'));
  312.     setBreadcrumb(array(ucfirst(formatText(_t('news''section')'2HTML')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['news']['linkvalue']))formatText($result[0]['news_title']'2HTML'=> false));
  313.     
  314.     $news_statut=DisplayOneNews($id);
  315.     echo '<hr />'.END_LINE;
  316.     echo '<div class="nextprev">'.END_LINE;
  317.     DisplayLinkNews($id'PREVIOUS'$news_statut);
  318.     DisplayLinkNews($id'NEXT'$news_statut);
  319.     echo '</div>'.END_LINE;
  320.     if(commentEnabled('news')) {
  321.       echo '<h3>'._t('comment''section').'</h3>'.END_LINE;
  322.       echo '<div id="comments">'.END_LINE;
  323.       displayComments(array('module'=> ActiveItemKey($GLOBALS['activeitem'])'module_id'=> $id'order_by' => 'ASC')falsetrue);
  324.       if($news_statut == 'public'displayCommentForm(array('module'=> ActiveItemKey($GLOBALS['activeitem'])'module_id'=> $id));
  325.       echo '</div>'.END_LINE;
  326.     }
  327.   }
  328.  
  329.  
  330. }
  331.  
  332. //////////////////////////////////////////
  333. /////affichage partie projet
  334. //////////////////////////////////////////
  335.  
  336. if(ActiveItemAlias($GLOBALS['activeitem'])=='project'{
  337.  
  338.   include_once(themePath('../project/display.php'));
  339.   SetHTMLTitle(_t('project','section'))// set HTML title
  340.   setBreadcrumb(array(ucfirst(formatText(_t('project''section')'2HTML')) => false));
  341.   
  342.  
  343.   $GLOBALS['filters'][U_L]['priority']['active'1// filter activation
  344.   /** préparation des variables
  345.   *     $statut
  346.   *     $debut default 0
  347.   *     $id -> default -1
  348.   *     $filter default -1
  349.   **/
  350.  
  351.   if(ActiveItemKey($GLOBALS['activeitem'])=='project'$statut='public';
  352.   if(ActiveItemKey($GLOBALS['activeitem'])=='project-archives'$statut='archives_p';
  353.   if(isset($_REQUEST['id'])) $id=$_REQUEST['id']else $id=-1;
  354.   if(isset($_REQUEST['debut'])) $debut=$_REQUEST['debut']else $debut=0;
  355.   if(isset($_REQUEST['filter'])) {
  356.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['scale']['linkvalue']$filter='SCALE';
  357.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['priority']['linkvalue']$filter='PRIORITY';
  358.     if($_REQUEST['filter']==$GLOBALS['filters'][U_L]['theme']['linkvalue']$filter='THEME';
  359.  
  360.   else $filter=-1;
  361.  
  362.   /** Affichage du lien de consultation d'archives ( si nécessaire
  363.    */
  364.  
  365.   if(ActiveItemKey($GLOBALS['activeitem']!= 'project-archives')  {
  366.  
  367.           $link_archivearray('rub'=> $GLOBALS['links'][U_L]['project-archives']['linkvalue']);
  368.  
  369.           echo '<div class="switchnav">';
  370.           echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_archives').'">'._t('divers','goto_archives').'</a>'.END_LINE;
  371.           echo '</div>';
  372.  
  373.   }
  374.   
  375.   /** Affichage du lien de consultation liste principale ( si nécessaire
  376.    */
  377.   if(ActiveItemKey($GLOBALS['activeitem']== 'project-archives')  {
  378.  
  379.     $link_archivearray('rub'=> $GLOBALS['links'][U_L]['project']['linkvalue']);
  380.  
  381.     echo '<div class="switchnav">';
  382.     echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_currentlist').'">'._t('divers','goto_currentlist').'</a>'.END_LINE;
  383.     echo '</div>';
  384.  
  385.   }
  386.  
  387.  
  388.   /** Affichage du lien de consultation liste principale ( si nécessaire
  389.    */
  390.   //    if(ActiveItemKey($GLOBALS['activeitem']) == 'project-archives')  {
  391.   //
  392.   //        $link_archive= array('rub'=> $GLOBALS['links'][U_L]['news']['linkvalue']);
  393.   //
  394.   //        echo '<div class="switchnav">';
  395.   //        echo '<a class="button" href="'.HrefMaker($link_archive).'" title="'._t('divers','goto_currentlist').'">'._t('divers','goto_currentlist').'</a>'.END_LINE;
  396.   //        echo '</div>';
  397.   //
  398.   //    }
  399.  
  400.   /** Affichage du Listing Projets + Archives
  401.    */
  402.   
  403.   if((isset($_REQUEST['id']&& isset($_REQUEST['filter'])) || (!isset($_REQUEST['id']&& !isset($_REQUEST['filter'])))
  404.   {
  405.     DisplayListProject($statut$filter$id$debut);
  406.   }
  407.  
  408.  
  409.   /** Détail d'un projet
  410.    */
  411.   if(isset($_REQUEST['id']&& !isset($_REQUEST['filter'])) {
  412.  
  413.     // set HTML Title
  414.     $result=$GLOBALS['sql_object']->DBSelect(SQL_getProjectName($id));
  415.     SetHTMLTitle(formatText($result[0]['project_name']'2HTML'));
  416.     setBreadcrumb(array(ucfirst(formatText(_t('project''section')'2HTML')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['project']['linkvalue']))formatText($result[0]['project_name']'2HTML'=> false));
  417.  
  418.     $project_status=DisplayOneProject($id);
  419.     if(commentEnabled('project')) {
  420.       echo '<h3>'._t('comment''section').'</h3>'.END_LINE;
  421.       echo '<div id="comments">'.END_LINE;
  422.       displayComments(array('module'=> 'project''module_id'=> $id'order_by' => 'ASC')falsetrue);
  423.       if($project_status == 'public'displayCommentForm(array('module'=> ActiveItemKey($GLOBALS['activeitem'])'module_id'=> $id));
  424.       echo '</div>'.END_LINE;
  425.     }
  426.   }
  427.  
  428. }
  429. ?>

Documentation generated on Thu, 03 May 2012 15:07:57 +0200 by phpDocumentor 1.4.1