<?php
/**
 * @package linea21.modules
 * @subpackage workshop
 * @author Simon Georget <simon@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
session_start();

$id=$_GET['id'];
$url=$_GET['rooturl'];
$folder=$_GET['folder'];

include_once('../config/define.php');


if(isset($_GET['upfiles'])) {
  $a=explode('|', $_GET['upfiles']);
  $files = array();
  foreach($a as $file) {
    $filename_parts = pathinfo($file);
    $filename = cleanString($filename_parts['filename']).'.'.$filename_parts['extension'];
    array_push($files, $filename);
  }
}

//////////// Check Droits utilisateur ////////////
if (!$l21auth->isWorkgroupUser($id, $sql_object)) ReloadIndex('public');
////////////




include_once('../languages/' . U_L . '/lang_workshop.' . CHARSET . '.php');
include_once('../languages/' . U_L . '/lang_common.' . CHARSET . '.php');

 // necessary includes for ajax calls
  if(MOD_COMMENT == 1) {
  include_once('../languages/' . U_L . '/lang_comment.' . CHARSET . '.php');
  include_once(override('../comment/'.SQL.'.inc.php'));
}
include_once(override('../workshop/display.php'));

DisplayFiles($id, $url);

// notify users by mail
notifyUsersMsg(array('action' => 'file_alert','user' => $_SESSION['userlogin'] ,'owner' => $_SESSION['userlogin'], 'files' => $files, 'id' => $id));
?>