Restructure file , remove html/admin , backup ...
This commit is contained in:
parent
b57df7c0e8
commit
896f3624c7
169 changed files with 48 additions and 54 deletions
|
|
@ -104,7 +104,7 @@ session_start();
|
|||
if ( ! isset($_GET['lang'])){
|
||||
?>
|
||||
<form method="GET">
|
||||
Enter your language : <select name="lang">
|
||||
Language : <select name="lang">
|
||||
<OPTION value="fr_FR.utf8">Français</option>
|
||||
<OPTION value="en_US.utf8">English</option>
|
||||
<OPTION value="none">Not Used</option>
|
||||
|
|
@ -206,7 +206,7 @@ function create_htaccess()
|
|||
|
||||
/* The config file is created here */
|
||||
if (isset($_POST['save_config'])) {
|
||||
require_once '../../include/config_file.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/config_file.php';
|
||||
$url=config_file_create($_POST,1,$os);
|
||||
echo '
|
||||
<form method="post" action="?lang='.$_GET['lang'].'" >'.
|
||||
|
|
@ -227,7 +227,8 @@ if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DI
|
|||
if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) {
|
||||
echo '<h1 class="info">'._('Entrez les informations nécessaires à noalyss').'</h1>';
|
||||
echo '<form method="post">';
|
||||
require_once('../../include/config_file.php');
|
||||
require_once NOALYSS_INCLUDE.'/lib/config_file.php';
|
||||
|
||||
echo config_file_form();
|
||||
echo '<div style="position:float;float:left;"></div>';
|
||||
echo '<p style="text-align:center">',
|
||||
|
|
@ -633,5 +634,5 @@ for ($e=0;$e < $MaxDossier;$e++) {
|
|||
?>
|
||||
</p>
|
||||
<p style="text-align: center">
|
||||
<A style="" class="button" HREF="../index.php"><?php echo _('Connectez-vous à NOALYSS')?></A>
|
||||
<A style="" class="button" HREF="index.php"><?php echo _('Connectez-vous à NOALYSS')?></A>
|
||||
</p>
|
||||
|
|
@ -152,7 +152,7 @@ $result.="<table border=\"0\">";
|
|||
$result.='<TR>';
|
||||
if ( $User->Admin() == 1 )
|
||||
{
|
||||
$result.="<TD class=\"tool\" ><A class=\"cell\" HREF=\"admin_repo.php\"> Administration </A></TD>";
|
||||
$result.="<TD class=\"tool\" ><A class=\"cell\" HREF=\"setup.php\">"._("Administration")." </A></TD>";
|
||||
}
|
||||
$result.='<TD class="tool">';
|
||||
$result.='<a onclick="set_preference(0)" title="Préférence" href="javascript:void(0)" class="cell">'._('Préférence').'</a>';
|
||||
|
|
|
|||
|
|
@ -21,15 +21,15 @@
|
|||
* \brief Administration of the repository : creation of user, folder, security,
|
||||
* templates... Accessible only by the administrator
|
||||
*/
|
||||
if ( ! defined ('ALLOWED')) { die ('Non autorisé');}
|
||||
if ( ! defined ('ALLOWED')) { die (_('Non autorisé'));}
|
||||
|
||||
include_once NOALYSS_INCLUDE."/class/class_user.php";
|
||||
require_once NOALYSS_INCLUDE."/lib/user_common.php";
|
||||
include_once NOALYSS_INCLUDE."/lib/ac_common.php";
|
||||
require_once NOALYSS_INCLUDE.'/lib/class_database.php';
|
||||
require_once NOALYSS_INCLUDE."/lib/user_menu.php";
|
||||
|
||||
$rep=new Database();
|
||||
include_once ("class/class_user.php");
|
||||
$User=new User($rep);
|
||||
$User->Check();
|
||||
|
||||
|
|
@ -37,11 +37,14 @@ html_page_start($User->theme);
|
|||
|
||||
if ($User->admin != 1)
|
||||
{
|
||||
echo "<h2 class=\"warning\">";
|
||||
echo _("Vous n'êtes pas administateur");
|
||||
echo "</h2>";
|
||||
html_page_stop();
|
||||
return;
|
||||
}
|
||||
load_all_script();
|
||||
echo '<H2 class="info"> '._('Administration Globale').'</H2>';
|
||||
echo '<H2 class="info"> '._('Administration').'</H2>';
|
||||
echo '<div class="topmenu">';
|
||||
|
||||
echo MenuAdmin()."</div>";
|
||||
|
|
@ -60,7 +63,7 @@ if ( isset ($_REQUEST["action"]) )
|
|||
//----------------------------------------------------------------------
|
||||
// User management
|
||||
//----------------------------------------------------------------------
|
||||
require_once("user.inc.php");
|
||||
require_once NOALYSS_INCLUDE."/user.inc.php";
|
||||
}
|
||||
// action=user_mgt
|
||||
if ( $_REQUEST["action"]=="dossier_mgt")
|
||||
|
|
@ -68,25 +71,29 @@ if ( isset ($_REQUEST["action"]) )
|
|||
//-----------------------------------------------------------------------
|
||||
// action = dossier_mgt
|
||||
//-----------------------------------------------------------------------
|
||||
require_once("dossier.inc.php");
|
||||
require_once NOALYSS_INCLUDE."/dossier.inc.php";
|
||||
}
|
||||
if ( $_REQUEST["action"] == "modele_mgt" )
|
||||
{
|
||||
//-----------------------------------------------------------------------
|
||||
// Template Management
|
||||
//-----------------------------------------------------------------------
|
||||
require_once("modele.inc.php");
|
||||
require_once NOALYSS_INCLUDE."/modele.inc.php";
|
||||
} // action is set
|
||||
if ( $_REQUEST['action'] == 'restore')
|
||||
{
|
||||
// Backup and restaure folders
|
||||
require_once("restore.inc.php");
|
||||
require_once NOALYSS_INCLUDE."/restore.inc.php";
|
||||
}
|
||||
if ($_REQUEST['action'] == 'audit_log')
|
||||
{
|
||||
{
|
||||
/* List the connexion successuf and failed */
|
||||
require_once('audit_log.php');
|
||||
}
|
||||
require_once NOALYSS_INCLUDE."/audit_log.php";
|
||||
}
|
||||
if ( $_REQUEST['action'] == 'backup') {
|
||||
/* take backup */
|
||||
require_once NOALYSS_INCLUDE."/backup.inc.php";
|
||||
}
|
||||
}// action = modele_mgt
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -16,32 +16,18 @@
|
|||
* along with NOALYSS; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/*!\file
|
||||
* \brief Make and restore backup
|
||||
*/
|
||||
if ( !defined("ALLOWED")) { die (_("Non autorisé")); }
|
||||
|
||||
// Copyright Author Dany De Bontridder danydb@aevalys.eu
|
||||
require_once '../include/constant.php';
|
||||
require_once("constant.php");
|
||||
require_once('lib/class_database.php');
|
||||
require_once ("class/class_user.php");
|
||||
require_once ('lib/ac_common.php');
|
||||
|
||||
$rep=new Database();
|
||||
$User=new User($rep);
|
||||
$User->Check();
|
||||
|
||||
|
||||
if ($User->admin != 1)
|
||||
{
|
||||
echo "<script>alert('"._("Vous n\'êtes pas administrateur")."') </script>";
|
||||
return;
|
||||
}
|
||||
$dossier_number=HtmlInput::default_value_request("d", 0);
|
||||
if ($dossier_number == 0
|
||||
|| isNumber($dossier_number) ==0 ) {
|
||||
die ('Invalid folder number');
|
||||
}
|
||||
/*!\file
|
||||
* \brief Make and restore backup
|
||||
*/
|
||||
|
||||
if ( isset ($_REQUEST['sa']) )
|
||||
{
|
||||
if ( defined ('PG_PATH') )
|
||||
|
|
@ -50,7 +36,7 @@ if ( isset ($_REQUEST['sa']) )
|
|||
|
||||
if ( ! isset($_REQUEST['t']))
|
||||
{
|
||||
echo "Erreur : paramètre manquant ";
|
||||
echo _("Erreur : paramètre manquant ");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ if ( $sa == 'list' )
|
|||
echo td(HtmlInput::anchor(_('Modifier'),'?action=dossier_mgt&sa=mod&d='
|
||||
.$Dossier['dos_id']," onclick=\"folder_modify('".$Dossier['dos_id']."')\""));
|
||||
|
||||
echo td(HtmlInput::anchor(_('Backup'),'backup.php?action=backup&sa=b&t=d&d='
|
||||
echo td(HtmlInput::anchor(_('Backup'),'?action=backup&sa=b&t=d&d='
|
||||
.$Dossier['dos_id']));
|
||||
} else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -107,11 +107,11 @@ function MenuAdmin()
|
|||
}
|
||||
if (!defined("MULTI")||(defined("MULTI")&&MULTI==1))
|
||||
{
|
||||
$item=array (array("admin_repo.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0),
|
||||
array("admin_repo.php?action=dossier_mgt",_("Dossiers"),_('Gestion des dossiers'),1),
|
||||
array("admin_repo.php?action=modele_mgt",_("Modèles"),_('Gestion des modèles'),2),
|
||||
array("admin_repo.php?action=restore",_("Restaure"),_("Restaure une base de données"),3),
|
||||
array("admin_repo.php?action=audit_log",_("Audit"),_("Utilisateurs qui se sont connectés"),4),
|
||||
$item=array (array("admin-noalyss.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0),
|
||||
array("admin-noalyss.php?action=dossier_mgt",_("Dossiers"),_('Gestion des dossiers'),1),
|
||||
array("admin-noalyss.php?action=modele_mgt",_("Modèles"),_('Gestion des modèles'),2),
|
||||
array("admin-noalyss.php?action=restore",_("Restaure"),_("Restaure une base de données"),3),
|
||||
array("admin-noalyss.php?action=audit_log",_("Audit"),_("Utilisateurs qui se sont connectés"),4),
|
||||
array("login.php",_("Accueil"))
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ if ($sa == 'list')
|
|||
'</td>' .
|
||||
'<td>' . HtmlInput::anchor(_('Modifie'), '?action=modele_mgt&sa=mod&m=' . $mod['mod_id']," onclick = \"modele_modify('{$mod['mod_id']}') \"") . '</td>' .
|
||||
'</td>' .
|
||||
'<td>' . HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=m&d='
|
||||
'<td>' . HtmlInput::anchor(_('Backup'), '?action=backup&sa=b&t=m&d='
|
||||
. $mod['mod_id']) . '</td>' .
|
||||
'</TR>', $mod['mod_id'], $mod['mod_name'], $mod['mod_desc']);
|
||||
}// for
|
||||
|
|
|
|||
|
|
@ -77,22 +77,22 @@ if ( isset ($_REQUEST['sa'] ))
|
|||
$id=$cn->get_next_seq('dossier_id');
|
||||
|
||||
if ( strlen(trim($_REQUEST['database'])) == 0 )
|
||||
{
|
||||
{
|
||||
$lname=$id." Restauration :".sql_string($_FILES['file']['name']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$lname=$id." ".$_REQUEST['database'];
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen(trim($_REQUEST['desc']))==0)
|
||||
{
|
||||
$ldesc=$lname;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ldesc=sql_string($_REQUEST['desc']);
|
||||
}
|
||||
if (strlen(trim($_REQUEST['desc']))==0)
|
||||
{
|
||||
$ldesc=$lname;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ldesc=sql_string($_REQUEST['desc']);
|
||||
}
|
||||
|
||||
$sql="insert into ac_dossier (dos_id,dos_name,dos_description) values ($1,$2,$3)";
|
||||
$cn->start();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue