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

Source for file _ajax_filelist.php

Documentation is available at _ajax_filelist.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage workshop
  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. $id=$_GET['id'];
  12. $url=$_GET['rooturl'];
  13. $folder=$_GET['folder'];
  14.  
  15. include_once('../config/define.php');
  16.  
  17. // is it shared file(s) or not ?
  18. if(strpos($folder'shared'=== false{
  19.     $is_shared false;
  20. else {
  21.     $is_shared true;
  22. }
  23.  
  24. if(isset($_GET['upfiles'])) {
  25.   $a=explode('|'$_GET['upfiles']);
  26.   $files array();
  27.   foreach($a as $file{
  28.     $filename_parts pathinfo($file);
  29.     $filename cleanString($filename_parts['filename']).'.'.$filename_parts['extension'];
  30.     array_push($files$filename);
  31.   }
  32. }
  33.  
  34. //////////// Check Droits utilisateur ////////////
  35. if (!$l21auth->isWorkgroupUser($id$sql_object)) ReloadIndex('public');
  36. ////////////
  37.  
  38.  
  39.  
  40.  
  41. include_once('../languages/' U_L '/lang_workshop.' CHARSET '.php');
  42. include_once('../languages/' U_L '/lang_common.' CHARSET '.php');
  43.  
  44.  // necessary includes for ajax calls
  45.   if(MOD_COMMENT == 1{
  46.   include_once('../languages/' U_L '/lang_comment.' CHARSET '.php');
  47.   include_once(override('../comment/'.SQL.'.inc.php'));
  48. }
  49. include_once(override('../workshop/display.php'));
  50.  
  51. DisplayFiles($id$url);
  52.  
  53. // notify users by mail
  54. notifyUsersMsg(array('action' => 'file_alert','user' => $_SESSION['userlogin','owner' => $_SESSION['userlogin']'files' => $files'id' => $id'is_shared'=> $is_shared));
  55. ?>

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