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

Source for file display.php

Documentation is available at display.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage workshoprep
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  'Workshoprep' (as Workshop Report) module is used by 'Workshop' modules
  10.  */
  11.  
  12. include_once(themePath('../workshoprep/'.SQL.'.inc.php'));
  13.  
  14.  
  15. if(!function_exists('DisplayOneWorkshopRep')) {
  16.  
  17.   function DisplayOneWorkshopRep($work_id{
  18.     $data=$GLOBALS['sql_object'-> DBSelect(SQL_getoneCompleteWorkshopRep($work_id));
  19.     $content '';
  20.     if(count($data)!=1exit;
  21.     else
  22.     {
  23.       $link_workshoparray('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue'],'id'=>$data[0]['workrep_workshop_id']'name' =>$data[0]['workshop_denomination']);
  24.       $link_selfarray('rub'=> $GLOBALS['links'][U_L]['report']['linkvalue'],'id' => $work_id);
  25.        
  26.       $workrep_title=formatText($data[0]['workrep_title']'2HTML');
  27.       $workrep_resume=formatText($data[0]['workrep_resume']'2HTML');
  28.       $workshop_denomination=formatText($data[0]['workshop_denomination']'2HTML');
  29.        
  30.       $workrep_posted_on=formatText($data[0]['workrep_published_date_display']'2HTML');
  31.       $workrep_modify_on=formatText($data[0]['workrep_last_modify_display']'2HTML');
  32.       $workrep_statut=$data[0]['workrep_statut'];
  33.        
  34.       if(commentEnabled('report')) {
  35.         postCommentAction(array('module'=> 'report''module_id'=> $work_id));
  36.         $content .= '<div id="anchor-comments">'.END_LINE;
  37.         $content .= getCommentsAnchor(array('module'=> 'report''module_id'=> $work_id));
  38.         if($workrep_statut == 'P'$content .= getPostCommentAnchor(array('module'=> 'report''module_id'=> $work_id));
  39.         $content .= '</div>'.END_LINE;
  40.       }
  41.       $content.='<h1>'.$workrep_title.'</h1>'.END_LINE;
  42.       $content.='<p class="published_by">'.END_LINE;
  43.       $content.=_t('statut','published_on').' '.$workrep_posted_on.' - ';
  44.       $content.=_t('workshoprep','workshop_product').' : <a href="'.HrefMaker($link_workshop).'" title="'.formatText($GLOBALS['links'][U_L]['workgroup']['desc']' ('.$workshop_denomination'2ATT').')">'.$workshop_denomination.'</a>';
  45.       if($workrep_statut=='PA')  {
  46.         $content.=' ('._t('statut','archived_on').' '.$workrep_modify_on.')';
  47.       }
  48.       $content .= formatted_permalink($link_self' - ');
  49.       $content.='</p>'.END_LINE;
  50.       $content.='<div class="chapo">'.$workrep_resume.'</div>';
  51.       $content.='<hr />';
  52.        
  53.     }
  54.     echo $content;
  55.   }
  56. }
  57.  
  58. if(!function_exists('DisplayWorkshopRepParts')) {
  59.  
  60.   function DisplayWorkshopRepParts($work_id{
  61.     $data=$GLOBALS['sql_object'-> DBSelect(SQL_getWorkshopParts($work_id));
  62.  
  63.     $content ='<div class="parts">'.END_LINE;
  64.     $content.='<h2>'._t('workshoprep','name2').'</h2>'.END_LINE;
  65.     if($data!=0)
  66.     {
  67.       $content.='<ol>'.END_LINE;
  68.       for($i=0$i<count($data)$i++{
  69.         $link_partsarray('rub'=> $GLOBALS['links'][U_L]['report-part']['linkvalue'],'id'=> $data[$i]['workrepcon_id'],'parentid'=>$work_id'name' =>$data[$i]['workrepcon_title']);
  70.         $workrepcon_title=formatText($data[$i]['workrepcon_title']'2HTML');
  71.         $content.='<li>'.END_LINE;
  72.         //$content.='<span class="num">'.($i+1).' - </span>'.END_LINE;
  73.         $content.='<a href="'HrefMaker($link_parts).'">';
  74.         $content.=$workrepcon_title;
  75.         $content.='</a>';
  76.         $content.='</li>'.END_LINE;
  77.       }
  78.       $content.='</ol>'.END_LINE;
  79.     }
  80.     else
  81.     {
  82.       $content.='<p class="info">'._t('workshoprep','no_part').'</p>';
  83.     }
  84.     $content.='</div>'.END_LINE;
  85.     //$content.='<hr />';
  86.  
  87.     echo $content;
  88.   }
  89. }
  90.  
  91. if(!function_exists('DisplayWorkshopRepLinks')) {
  92.  
  93.   function DisplayWorkshopRepLinks($work_id{
  94.  
  95.     $data=SQL_GetResources($work_id'W''LINK'$GLOBALS['sql_object']);
  96.     $content ='<div class="links">'.END_LINE;
  97.     $content.='<h2>'._t('workshoprep','link_res').'</h2>'.END_LINE;
  98.     if($data!=0)
  99.     {
  100.       $content.='<ul>'.END_LINE;
  101.       for($i=0$i<count($data)$i++{
  102.         $linkres_mask=formatText($data[$i]['linkres_mask']'2HTML');
  103.         $linkres_text=$data[$i]['linkres_text'];
  104.         $content.='<li>'.END_LINE;
  105.         $content.='<a href="'$linkres_text.'" class="out">';
  106.         $content.=$linkres_mask;
  107.         $content.='</a>';
  108.         $content.='</li>'.END_LINE;
  109.       }
  110.       $content.='</ul>'.END_LINE;
  111.  
  112.     }
  113.     else
  114.     {
  115.       $content.='<p class="info">'._t('workshoprep','no_link').'</p>';
  116.     }
  117.     $content.='</div>'.END_LINE;
  118.     //$content.='<hr />';
  119.  
  120.     echo $content;
  121.   }
  122. }
  123.  
  124. if(!function_exists('DisplayWorkshopRepBiblio')) {
  125.  
  126.   function DisplayWorkshopRepBiblio($work_id{
  127.  
  128.     $data=SQL_GetResources($work_id'W''BIBLIO'$GLOBALS['sql_object']);
  129.     $content ='<div class="biblio">'.END_LINE;
  130.     $content.='<h2>'._t('workshoprep','biblio_res').'</h2>'.END_LINE;
  131.     if($data!=0)
  132.     {
  133.       $content.='<ul>'.END_LINE;
  134.       for($i=0$i<count($data)$i++{
  135.         $bibliores_author=formatText($data[$i]['bibliores_author']'2HTML');
  136.         $bibliores_title=formatText($data[$i]['bibliores_title']'2HTML');
  137.         $bibliores_sub_title=empty($data[$i]['bibliores_sub_title']'' ', '.formatText($data[$i]['bibliores_sub_title']'2HTML');
  138.         $bibliores_editor=empty($data[$i]['bibliores_editor']'' ' - '.formatText($data[$i]['bibliores_editor']'2HTML');
  139.         $bibliores_date=empty($data[$i]['bibliores_date']'' ', '.formatText($data[$i]['bibliores_date']'2HTML');
  140.          
  141.         $content.='<li>'.END_LINE;
  142.         $content.=$bibliores_author.' - <span class="biblio_title">'.$bibliores_title;
  143.         $content.=$bibliores_sub_title.'</span>'$bibliores_editor$bibliores_date;
  144.         $content.='</li>'.END_LINE;
  145.       }
  146.       $content.='</ul>'.END_LINE;
  147.  
  148.     }
  149.     else
  150.     {
  151.       $content.='<p class="info">'._t('workshoprep','no_biblio').'</p>';
  152.     }
  153.     $content.='</div>'.END_LINE;
  154.     //$content.='<hr />';
  155.  
  156.     echo $content;
  157.   }
  158. }
  159. ?>

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