Source for file _ajax_view.php
Documentation is available at _ajax_view.php
* @package linea21.modules
* @author Simon Georget <simon@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
include_once('../lib/functions_auth.php');
include_once('../config/define.php');
include_once('../lib/lib_common.php');
include_once('../languages/' . U_L . '/lang_common.' . CHARSET . '.php');
include_once('../languages/' . U_L . '/lang_comment.' . CHARSET . '.php');
include_once(themePath('../comment/display.php'));
$a['module'] = $_GET['module'];
$a['module_id'] = $_GET['id'];
$a['rub'] = $_GET['rub'];
if ($a['module'] == 'files') {
$path = explode('/', $a['module_id']); // retrieve workgroup id
$a['id']= $wgid; // we set the id
isset ($_GET['order_by']) ? $a['order_by'] = $_GET['order_by'] : 'DESC';
////////////////////////////////////////
include_once('../class/system/class.'. SQL. '.php');
$GLOBALS['sql_object'] = new $sql_entity;
$GLOBALS['sql_object'] -> DBInitialise();
$GLOBALS['sql_object'] -> DBConnexion();
//////////// Check user rights on workgroups ////////////
if ($a['module'] == 'files') {
if(!isset ($_COOKIE['linea21']['login'])) die('<p class="error">'. _t('divers', 'noauth'). '</p>');
if($wgid != 'shared' && !isWorkgroupUser($wgid)) die('<p class="error">'. _t('divers', 'noauth'). '</p>');
echo '<h2>'. basename($a['module_id']) . '</h2>';
echo '<h3>' . _t('comment', 'section'). '</h3>';
echo '<div id="comments-view">';
if($a['module']== 'files') {
echo '<script type="text/javascript" src="../lib/js/comment_submit.js"></script>
<script type="text/javascript">
jQuery("#cbody").after("<input type=\"hidden\" id=\"file_id\" name=\"file_id\" value=\"'. $a['module_id']. '\" \/>");
|