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

Source for file tpl_workshop.php

Documentation is available at tpl_workshop.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('../workshop/display.php'));
  12.  
  13. SetHTMLTitle(_t('workshop','section'));
  14.  
  15. $GLOBALS['filters'][U_L]['theme']['active'1// filter activation
  16. $GLOBALS['filters'][U_L]['level']['active'1// filter activation
  17.  
  18.  
  19. /* Post Values instances */
  20. //filter theme & scale
  21. $filter= isset($_REQUEST['filter']$_REQUEST['filter''';
  22. //value of pagination
  23. $debut= isset($_REQUEST['debut']$_REQUEST['debut'0;
  24. //id for workgroup
  25. $workshop_id= isset($_REQUEST['id']$_REQUEST['id''';
  26. //body for topic
  27. $body= isset($_REQUEST['body']$_REQUEST['body''';
  28. //title for topic
  29. $title= isset($_REQUEST['title']$_REQUEST['title''';
  30. // case for test integrity for update a post or add a topic
  31. $confirm= isset($_REQUEST['confirm']$_REQUEST['confirm''';
  32.  
  33.  
  34. if(ActiveItemKey($GLOBALS['activeitem']== 'topic' || ActiveItemKey($GLOBALS['activeitem']== 'post-add'{
  35.   $topic_id=$_REQUEST['id'];
  36.   $workshop_id=$_REQUEST['parentid'];
  37. }
  38.  
  39. if (ActiveItemKey($GLOBALS['activeitem']== 'post-update'{
  40.   $topic_id=$_REQUEST['parentparentid'];
  41.   $workshop_id=$_REQUEST['parentid'];
  42.   $post_id=$_REQUEST['id'];
  43. }
  44.  
  45. $is_authenticated=isWorkgroupUser($workshop_id);
  46.  
  47.  
  48. //display list workgroup
  49. if (!isset($_REQUEST['id']|| isset($_REQUEST['filter']))
  50. {
  51.   setBreadcrumb(array(ucfirst(_t('workshop''section')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue']))));
  52.   echo "<h1>"._t('workshop','h1_public')."</h1>";
  53.   echo "<div class=\"sub-title\">"._t('workshop','h1_public_comment')."</div>";
  54.   DisplayListWorkshop($workshop_id$filter);
  55. }
  56. else
  57. {
  58.   //display one workgroup
  59.   $result=$GLOBALS['sql_object']->DBSelect(SQL_getWorkshopDenomination($workshop_id));
  60.   $workshop_name formatText($result[0]['workshop_denomination']'2HTML');
  61.   SetHTMLTitle($workshop_name);
  62.   setBreadcrumb(array(ucfirst(_t('workshop''name')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue']))));
  63.   setBreadcrumb(array($workshop_name => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['workgroup']['linkvalue']'id'=>$_REQUEST['id']))));
  64.   DisplayOneWorkshop($workshop_id"title");
  65.   ?>
  66. <!-- workgroup data -->
  67. <div id="workshop"><?php DisplayOneWorkshop($workshop_id);?> <?php if (!$is_authenticatedDisplayUrlInscription($workshop_id$is_authenticated)?>
  68. </div>
  69. <!-- end workgroup data -->
  70.  
  71. <div class="internal-nav">
  72. <ul>
  73.     <li><?php  DisplayUrlCalendar($workshop_id$workshop_name)?></li>
  74.     <?php if ($is_authenticated{?>
  75.     <li><?php DisplayUrlTopicList($workshop_id$workshop_name );?></li>
  76.     <li><?php DisplayUrlFiles($workshop_id$workshop_name)?></li>
  77.     <?php ?>
  78.     <li><?php  DisplayUrlListerapport($workshop_id$workshop_name)?></li>
  79.     <?php if ($is_authenticated){?>
  80.     <li><?php DisplayUrlListeutilisateur($workshop_id$workshop_name)?></li>
  81.     <?php }?>
  82. </ul>
  83. </div>
  84.  
  85. <div class="internal-content <?php echo ActiveItemKey($GLOBALS['activeitem'])?>"><?php
  86. switchActiveItemKey($GLOBALS['activeitem']) )
  87. {
  88.   case "topic-list":
  89.     if($is_authenticated){
  90.       echo "<h2>"._t('workshop','com')."</h2>";
  91.       DisplayListTopic($workshop_id$debut);
  92.       setBreadcrumb(array(_t('workshop','com_public'=> false));
  93.     }
  94.     break;
  95.  
  96.   case "topic":
  97.     if($is_authenticated){
  98.       echo "<h2>"._t('workshop','com')."</h2>";
  99.       DisplayTopic($workshop_id$topic_id$debut);
  100.       setBreadcrumb(array(_t('workshop','com_public'=> false));
  101.     }
  102.     break;
  103.  
  104.   case "files":
  105.     if($is_authenticated){
  106.       echo '<h2>'._t('workshop','shared_files').'</h2>'.END_LINE;
  107.       uploadForm($workshop_id);
  108.       echo '<div id="allfiles">'.END_LINE;
  109.       DisplayFiles($workshop_idSITE_ROOT_URL);
  110.       echo '</div>'.END_LINE;
  111.       setBreadcrumb(array(_t('workshop','shared_files'=> false));
  112.     }
  113.     break;
  114.  
  115.   case "topic-add":
  116.     if($is_authenticated){
  117.       setBreadcrumb(array(ucfirst(_t('workshop''add_com')) => false));
  118.       echo "<h2>"._t('workshop','com')."</h2>";
  119.       AddTopic($workshop_id$debut$body$title$confirm);
  120.     }
  121.     break;
  122.  
  123.   case "post-add":
  124.     if($is_authenticated){
  125.       echo "<h2>"._t('workshop','com')."</h2>";
  126.       AddPost($workshop_id$topic_id$debut$body$title);
  127.     }
  128.     break;
  129.  
  130.   case "post-update":
  131.     if($is_authenticated){
  132.       echo "<h2>"._t('workshop','com')."</h2>";
  133.       UpdatePost($workshop_id$topic_id$debut$body$title$post_id$confirm);
  134.     }
  135.     break;
  136.  
  137.   case "user-all":
  138.     echo "<h2>"._t('workshop','participant')."</h2>";
  139.     DisplayUserWorkshop($workshop_id);
  140.     setBreadcrumb(array(_t('workshop','participant'=> false));
  141.     break;
  142.  
  143.   case "report-all":
  144.     echo '<div id="reports">'.END_LINE;
  145.     echo "<h2>"._t('workshop','report')."</h2>";
  146.     DisplayListReport($workshop_id'P');
  147.     echo '</div>'.END_LINE;
  148.     echo '<div id="reports-archived">'.END_LINE;
  149.     echo "<h2>"._t('workshop','archived_report')."</h2>";
  150.     DisplayListReport($workshop_id'PA');
  151.     echo '</div>'.END_LINE;
  152.     setBreadcrumb(array(_t('workshop','barre_report'=> false));
  153.     break;
  154.  
  155.   default:
  156.     echo "<h2>"._t('workshop','calendar')."</h2>";
  157.     DisplayCalendar($workshop_id);
  158.     setBreadcrumb(array(_t('workshop','cal_all'=> false));
  159.     break;
  160. ?>
  161. </div>
  162. <br style="clear: both" />
  163. <?php
  164. }
  165. ?>

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