Improve interface fix some bugs & still unstable
This commit is contained in:
parent
3ff1d409f4
commit
3223235900
13 changed files with 100 additions and 58 deletions
|
|
@ -31,13 +31,15 @@ if ($g_UserProperty['use_admin'] != 1) {
|
|||
return;
|
||||
}
|
||||
include ("top_menu_compta.php");
|
||||
|
||||
echo '<H2 class="info"> Administration Globale</H2>';
|
||||
if ( ! isset ($g_dossier) ) $g_dossier=0;
|
||||
ShowMenuAdminGlobalRight($g_dossier);
|
||||
ShowMenuAdminGlobal();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<DIV class="redcontent">
|
||||
<DIV >
|
||||
<?
|
||||
if ( isset ($_GET["action"]) ) {
|
||||
if ( $_GET["action"]=="user_mgt" ) {
|
||||
|
|
@ -153,11 +155,8 @@ if ( $count == 0 ) {
|
|||
} else {
|
||||
$template='<SELECT NAME=FMOD_ID>';
|
||||
for ($i=0;$i<$count;$i++) {
|
||||
$mod=pg_fetch_array($Res,0);
|
||||
$mod=pg_fetch_array($Res,$i);
|
||||
$template.='<OPTION VALUE="'.$mod['mod_id'].'"> '.$mod['mod_name']." - ".$mod['mod_desc'];
|
||||
/* printf("<span> %s %s </span>",
|
||||
$mod['mod_name'],$mod['mod_desc']);*/
|
||||
|
||||
}// for
|
||||
$template.="</SELECT>";
|
||||
}// if count = 0
|
||||
|
|
@ -196,28 +195,30 @@ if ( $count == 0 ) {
|
|||
"'".$mod_desc."')");
|
||||
|
||||
// get the mod_id
|
||||
$l_id=GetModeleId($cn,$mod_name);
|
||||
$l_id=GetSequence($cn,'s_modid');
|
||||
if ( $l_id != 0 ) {
|
||||
$Sql=sprintf("CREATE DATABASE MOD%d encoding='ISO8859-1' TEMPLATE DOSSIER%s",$l_id,$_POST["FMOD_DBID"]);
|
||||
ExecSql($cn,$Sql);
|
||||
}
|
||||
}// if $mod_name != null
|
||||
$mod=sprintf("mod%d",$l_id);
|
||||
$cn_mod=dbconnect($mod);
|
||||
// Clean some tables
|
||||
$Res=ExecSql($cn,"truncate table jrn");
|
||||
$Res=ExecSql($cn,"truncate table jrnx");
|
||||
$Res=ExecSql($cn,"truncate table centralized");
|
||||
$Res=ExecSql($cn,"truncate table stock_goods");
|
||||
$Res=ExecSql($cn_mod,"truncate table jrn");
|
||||
$Res=ExecSql($cn_mod,"truncate table jrnx");
|
||||
$Res=ExecSql($cn_mod,"truncate table centralized");
|
||||
$Res=ExecSql($cn_mod,"truncate table stock_goods");
|
||||
|
||||
// Reset Sequence
|
||||
$Res=ExecSql($cn,"drop sequence s_jrn");
|
||||
$Res=ExecSql($cn,"drop sequence s_jrn_op");
|
||||
$Res=ExecSql($cn,"drop sequence s_centralized");
|
||||
$Res=ExecSql($cn,"drop sequence s_stock_goods");
|
||||
$Res=ExecSql($cn_mod,"drop sequence s_jrn");
|
||||
$Res=ExecSql($cn_mod,"drop sequence s_jrn_op");
|
||||
$Res=ExecSql($cn_mod,"drop sequence s_centralized");
|
||||
$Res=ExecSql($cn_mod,"drop sequence s_stock_goods");
|
||||
|
||||
$Res=ExecSql($cn,"create sequence s_jrn");
|
||||
$Res=ExecSql($cn,"create sequence s_jrn_op");
|
||||
$Res=ExecSql($cn,"create sequence s_centralized");
|
||||
$Res=ExecSql($cn,"create sequence s_stock_goods");
|
||||
$Res=ExecSql($cn_mod,"create sequence s_jrn");
|
||||
$Res=ExecSql($cn_mod,"create sequence s_jrn_op");
|
||||
$Res=ExecSql($cn_mod,"create sequence s_centralized");
|
||||
$Res=ExecSql($cn_mod,"create sequence s_stock_goods");
|
||||
}
|
||||
// Show all available templates
|
||||
|
||||
|
|
@ -229,8 +230,8 @@ if ( $count == 0 ) {
|
|||
} else {
|
||||
|
||||
for ($i=0;$i<$count;$i++) {
|
||||
$mod=pg_fetch_array($Res,0);
|
||||
printf("<span> %s %s </span>",
|
||||
$mod=pg_fetch_array($Res,$i);
|
||||
printf('<span style="display:block;"> %s %s </span>',
|
||||
$mod['mod_name'],$mod['mod_desc']);
|
||||
|
||||
}// for
|
||||
|
|
|
|||
|
|
@ -31,6 +31,18 @@ include ("check_priv.php");
|
|||
include_once ("top_menu_compta.php");
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
|
||||
$p_array=array(array("user_jrn.php?JRN_TYPE=VEN" ,"Entrée"),
|
||||
array("user_jrn.php?JRN_TYPE=ACH","Dépense"),
|
||||
array("user_jrn.php?JRN_TYPE=FIN","Financier"),
|
||||
array("user_jrn.php?JRN_TYPE=OD","Op. Diverses"),
|
||||
array("impress.php","Impression"),
|
||||
array("","Recherche")
|
||||
);
|
||||
$result=ShowItem($p_array,'H',"cell","mtitle","impress.php");
|
||||
echo "<DIV class=\"u_subtmenu\">";
|
||||
echo $result;
|
||||
echo "</DIV>";
|
||||
|
||||
// $_GET['direct'] if we want to print from
|
||||
// the advanced menu in the user interface
|
||||
if ( isset ($_GET['direct'])) {
|
||||
|
|
@ -45,7 +57,7 @@ if ( isset ($_GET['direct'])) {
|
|||
}
|
||||
|
||||
include_once("impress_inc.php");
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,IMP);
|
||||
if ($r == 0 ){
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ CheckUser();
|
|||
include_once("check_priv.php");
|
||||
include_once ("top_menu_compta.php");
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
|
||||
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,SECU);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ CheckUser();
|
|||
|
||||
include_once ("top_menu_compta.php");
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
|
||||
include_once("check_priv.php");
|
||||
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ include_once ("check_priv.php");
|
|||
|
||||
include_once ("top_menu_compta.php");
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,GJRN);
|
||||
if ($r == 0 ){
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ if ( $r_UID == false ) {
|
|||
return;
|
||||
}
|
||||
echo_debug(__FILE__,__LINE__,"UID IS VALID");
|
||||
echo '<H2 style="color:blue;text-align:center"> Administration Globale</H2>';
|
||||
echo '<H2 class="info"> Administration Globale</H2>';
|
||||
ShowMenuAdminGlobal();
|
||||
ShowMenuAdminGlobalRight('<A class="mtitle" HREF="admin_repo.php">Retour</A>');
|
||||
echo '<DIV CLASS="redcontent">';
|
||||
|
||||
echo '<DIV>';
|
||||
echo '<H1 class="title"> User Management</H1>';
|
||||
// User is valid and you're an admin
|
||||
|
||||
|
|
|
|||
|
|
@ -6,14 +6,30 @@ BODY {
|
|||
BODY.defaut {
|
||||
background-color:white;
|
||||
}
|
||||
div.info {
|
||||
background:#879ed4;
|
||||
color:white;
|
||||
font-size:16pt;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
h2.info {
|
||||
background:#879ed4;
|
||||
color:white;
|
||||
font-size:20px;
|
||||
font-size:16pt;
|
||||
text-align:center;
|
||||
}
|
||||
h3.info {
|
||||
background:#879ed4;
|
||||
color:white;
|
||||
font-size:10pt;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
h2.info2 {
|
||||
color:blue;
|
||||
font-size:20px;
|
||||
color:blue;
|
||||
font-size:20px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -39,7 +55,7 @@ div.tmenu {
|
|||
top:10px;
|
||||
left:120px;
|
||||
width:800px;
|
||||
|
||||
text-align:center;
|
||||
}
|
||||
div.u_tmenu {
|
||||
|
||||
|
|
@ -58,7 +74,7 @@ div.u_subtmenu {
|
|||
|
||||
div.lmenu {
|
||||
position: absolute;
|
||||
top:80px;
|
||||
top:130px;
|
||||
left:30px;
|
||||
width:100px;
|
||||
font-size:10px;
|
||||
|
|
@ -86,10 +102,11 @@ div.debit{
|
|||
}
|
||||
div.redcontent{
|
||||
position: absolute;
|
||||
top:50px;
|
||||
top:130px;
|
||||
left:250px;
|
||||
width:600px;
|
||||
font-size:12px;
|
||||
overflow:auto;
|
||||
}
|
||||
div.u_redcontent{
|
||||
position: absolute;
|
||||
|
|
@ -101,7 +118,7 @@ div.u_redcontent{
|
|||
|
||||
div.ccontent{
|
||||
position: absolute;
|
||||
top:50px;
|
||||
top:110px;
|
||||
left:130px;
|
||||
width:670px;
|
||||
font-size:9pt;
|
||||
|
|
@ -115,7 +132,7 @@ div.rmenu {
|
|||
|
||||
table.mtitle {
|
||||
border:0;
|
||||
align:center
|
||||
text-align:center
|
||||
}
|
||||
td.mshort {
|
||||
text-align:center;
|
||||
|
|
@ -139,7 +156,7 @@ td.mltitle {
|
|||
}
|
||||
td.mtitle {
|
||||
text-align:center;
|
||||
/* width:75px; */
|
||||
width:75px;
|
||||
font-size:10px;
|
||||
border: 1px solid;
|
||||
background-color:#DDE6FF;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if ( $g_UserProperty['use_admin'] == 0 ) {
|
|||
include_once ("user_menu.php");
|
||||
include_once ("top_menu_compta.php");
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
//ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
|
||||
html_page_stop();
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ if ( isset ($_GET['show'])) {
|
|||
array("user_jrn.php?JRN_TYPE=ACH","Dépense"),
|
||||
array("user_jrn.php?JRN_TYPE=FIN","Financier"),
|
||||
array("user_jrn.php?JRN_TYPE=OD","Op. Diverses"),
|
||||
array("","Impression"),
|
||||
array("impress.php","Impression"),
|
||||
array("","Recherche")
|
||||
);
|
||||
$result=ShowItem($p_array,'H',"cell","mtitle");
|
||||
|
|
@ -86,7 +86,7 @@ if ( isset ($_GET['JRN_TYPE'] ) ) {
|
|||
array("user_jrn.php?JRN_TYPE=ACH","Dépense"),
|
||||
array("user_jrn.php?JRN_TYPE=FIN","Financier"),
|
||||
array("user_jrn.php?JRN_TYPE=OD","Op. Diverses"),
|
||||
array("","Impression"),
|
||||
array("impress.php","Impression"),
|
||||
array("","Recherche")
|
||||
);
|
||||
$result=ShowItem($p_array,'H',"cell","mtitle","user_jrn.php?JRN_TYPE=".$jrn_type);
|
||||
|
|
@ -109,7 +109,7 @@ if ( isset ($_GET['JRN_TYPE'] ) ) {
|
|||
array("user_jrn.php?JRN_TYPE=ACH","Dépense"),
|
||||
array("user_jrn.php?JRN_TYPE=FIN","Financier"),
|
||||
array("user_jrn.php?JRN_TYPE=OD","Op. Diverses"),
|
||||
array("","Impression"),
|
||||
array("impress.php","Impression"),
|
||||
array("","Recherche")
|
||||
);
|
||||
$result=ShowItem($p_array,'H',"cell","mtitle","user_jrn.php?JRN_TYPE=".$jrn_type);
|
||||
|
|
@ -125,7 +125,7 @@ if ( $g_jrn != -1 ) {
|
|||
array("user_jrn.php?JRN_TYPE=ACH","Dépense"),
|
||||
array("user_jrn.php?JRN_TYPE=FIN","Financier"),
|
||||
array("user_jrn.php?JRN_TYPE=OD","Op. Diverses"),
|
||||
array("","Impression"),
|
||||
array("impress.php","Impression"),
|
||||
array("","Recherche")
|
||||
);
|
||||
$result=ShowItem($p_array,'H',"cell","mtitle","user_jrn.php?JRN_TYPE=".$jrn_type);
|
||||
|
|
|
|||
|
|
@ -23,18 +23,22 @@ include_once("postgres.php");
|
|||
CheckUser();
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
include_once("user_menu.php");
|
||||
u_ShowMenu($g_UserProperty['use_admin']);
|
||||
//u_ShowMenu($g_UserProperty['use_admin']);
|
||||
|
||||
|
||||
$priv=($g_UserProperty['use_admin']==1)?"Administrator":"User";
|
||||
|
||||
echo '<H2 class="info"> Welcome '.$g_UserProperty['use_first_name'].' '.
|
||||
$g_UserProperty['use_name'].'<br>, your are an '. $priv.' Please Select your folder</H2>';
|
||||
echo '<div class="info"> Welcome '.$g_UserProperty['use_first_name'].' '.
|
||||
$g_UserProperty['use_name'].',<h3 class="info"> your are an '. $priv.' <br>Please Select your folder</h3></div>';
|
||||
// Show default menu (preference,...)
|
||||
|
||||
// If admin show everything otherwise only the available dossier
|
||||
$res=u_ShowDossier($g_user,$g_UserProperty['use_admin']);
|
||||
echo $res;
|
||||
?>
|
||||
<P>
|
||||
|
||||
</P>
|
||||
<?
|
||||
html_page_stop();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ CheckUser();
|
|||
|
||||
include_once ("top_menu_compta.php");
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
|
||||
if ( $g_UserProperty['use_admin']== 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,SECU);
|
||||
if ($r == 0 ){
|
||||
|
|
@ -50,8 +50,6 @@ $User=ExecSql($cn,"select use_id,use_first_name,use_name,use_login from ac_user
|
|||
$MaxUser=pg_NumRows($User);
|
||||
|
||||
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty['use_admin']);
|
||||
|
||||
echo '<DIV CLASS="ccontent">';
|
||||
echo '<H2 class="info"> Sécurité </H2>';
|
||||
echo '<TABLE CELLSPACING="20" ALIGN="CENTER">';
|
||||
|
|
|
|||
|
|
@ -519,8 +519,10 @@ function ShowMenuAdminGlobal()
|
|||
$item[0]=array("admin_repo.php?action=user_mgt","Utilisateurs");
|
||||
$item[1]=array("admin_repo.php?action=dossier_mgt","Dossiers");
|
||||
$item[2]=array("admin_repo.php?action=modele_mgt","Modèles");
|
||||
$menu=ShowItem($item);
|
||||
echo '<DIV class="lmenu">';
|
||||
$item[3]=array("login.php","Accueil");
|
||||
$item[4]=array("logout.php","Logout");
|
||||
$menu=ShowItem($item,'H');
|
||||
echo '<DIV >';
|
||||
echo $menu;
|
||||
echo '</DIV>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,12 +52,21 @@ function u_ShowDossier($p_user,$p_admin)
|
|||
$result.="</TD><TD class=\"$tr\">";
|
||||
$result.=$desc;
|
||||
$result.="</TD><TD class=\"mtitle\">";
|
||||
$result.="<A class=\"mtitle\" HREF=\"user_compta.php?dos=$id\">Encoder</A>";
|
||||
$result.="</TD></TR>";
|
||||
$result.="<A class=\"mtitle\" HREF=\"user_compta.php?dos=$id\">Comptabilité</A>";
|
||||
$result.="</TD>";
|
||||
if ( $p_admin == 1 ) {
|
||||
$result.="</TD><TD class=\"mtitle\">";
|
||||
$result.="<A class=\"mtitle\" HREF=\"admin_repo.php\">Administration</A>";
|
||||
$result.="</TD>";
|
||||
}
|
||||
$result.="</TR>";
|
||||
}
|
||||
$result.="<TD></TD><TR><TD class=\"mtitle\">";
|
||||
$result.='<A HREF="logout.php" CLASS="mtitle">Sortir</a>';
|
||||
$result.="</TD></TR>";
|
||||
return $result;
|
||||
}
|
||||
/* function u_ShowDossier
|
||||
/* function GetAvailableFolder
|
||||
* Purpose : Get all the available folders
|
||||
* for the users
|
||||
* parm :
|
||||
|
|
@ -157,9 +166,8 @@ function u_ShowMenuCompta($p_dossier)
|
|||
array("fiche.php?p_dossier=$p_dossier","Fiche"),
|
||||
array("user_advanced.php","Avancé"),
|
||||
array("dossier_prefs.php","Paramètre"),
|
||||
array("admin_repo.php","Admin"),
|
||||
array('login.php','Accueil'),
|
||||
array('user_pref.php','Preference'),
|
||||
array('user_pref.php','Preference'),
|
||||
array('login.php','Accueil'),
|
||||
array('logout.php','logout')
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue