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

Source for file _ajax_view.php

Documentation is available at _ajax_view.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage comment
  5.  * @author Simon Georget <simon@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. include_once('../config/define.php');
  12. include_once('../languages/' U_L '/lang_common.' CHARSET '.php');
  13. include_once('../languages/' U_L '/lang_comment.' CHARSET '.php');
  14. include_once(override('../comment/display.php'));
  15.  
  16. $a['module'$_GET['module'];
  17. $a['module_id'$_GET['id'];
  18. $a['rub'$_GET['rub'];
  19. if ($a['module'== 'files'{
  20.   $path explode('/'$a['module_id'])// retrieve workgroup id
  21.   $wgid $path[1];
  22.   $a['id']=$wgid// we set the id
  23. }
  24. isset($_GET['order_by']$a['order_by'$_GET['order_by''DESC';
  25.  
  26.  
  27. //////////// Check user rights on workgroups ////////////
  28. if ($a['module'== 'files'{
  29.   if(!isset($_SESSION['authenticated'])) die('<p class="error">'._t('divers''noauth').'</p>');
  30.   if($wgid != 'shared' && !$l21auth->isWorkgroupUser($wgid$sql_object)) die('<p class="error">'._t('divers''noauth').'</p>');
  31. }
  32. ////////////
  33.  
  34. echo '<h2>'basename($a['module_id'].'</h2>';
  35. echo '<h3>' ._t('comment''section').'</h3>';
  36. echo '<div id="comments-view">';
  37. displayComments($afalsefalse);
  38. echo '</div>';
  39. if($a['module']=='files'{
  40.   echo     '<script type="text/javascript" src="../lib/js/comment_submit.js"></script>
  41.         <script type="text/javascript">
  42.                   jQuery(function() {
  43.                       jQuery("#cbody").after("<input type=\"hidden\" id=\"file_id\" name=\"file_id\" value=\"'.$a['module_id'].'\" \/>");
  44.                   });
  45.          </script>';
  46. }
  47. ?>

Documentation generated on Thu, 20 Mar 2014 16:49:46 +0100 by phpDocumentor 1.4.1