1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/noalyss_ynh.git synced 2024-09-03 19:46:20 +02:00
noalyss_ynh/sources/include/extension_get.inc.php
2015-09-27 00:54:25 +02:00

45 lines
1.2 KiB
PHP

<?php
//This file is part of NOALYSS and is under GPL
//see licence.txt
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
require_once NOALYSS_INCLUDE.'/class_database.php';
require_once NOALYSS_INCLUDE.'/class_dossier.php';
require_once NOALYSS_INCLUDE.'/ac_common.php';
require_once NOALYSS_INCLUDE.'/constant.php';
require_once NOALYSS_INCLUDE.'/function_javascript.php';
require_once NOALYSS_INCLUDE.'/class_extension.php';
require_once NOALYSS_INCLUDE.'/class_html_input.php';
require_once NOALYSS_INCLUDE.'/class_iselect.php';
require_once NOALYSS_INCLUDE.'/constant.security.php';
require_once NOALYSS_INCLUDE.'/class_user.php';
/**
* included from do.php + extension_choice.inc.php
*/
// find file and check security
global $cn,$g_user;
$ext=new Extension($cn);
if ($ext->search($_REQUEST['plugin_code']) == -1)
{
echo_warning("plugin non trouvé");
return;
}
if ($ext->can_request($g_user->login)==-1)
{
alert("Plugin non authorisé");
return;
}
if ( ! file_exists(NOALYSS_PLUGIN.'/'.trim($ext->me_file)))
{
alert(j(_("Ce fichier n'existe pas ")));
return;
}
echo '<div class="content">';
require_once NOALYSS_PLUGIN.DIRECTORY_SEPARATOR.trim($ext->me_file);
?>