Task #1225 - Amélioration Install mono

#1225 : détecte automatiquement s'il faut installer le script mono.sql ou non, 
amélioration de l'interface, correction du search_path postgresql
This commit is contained in:
Dany De Bontridder 2015-11-11 16:03:12 +01:00
parent 6fbfc8edda
commit 01f570429e
6 changed files with 158 additions and 161 deletions

View file

@ -75,7 +75,12 @@ session_start();
</p>
<?php
error_reporting(2147483647);
ini_set("display_errors",1);
ini_set("display_startup_errors",1);
ini_set("html_errors",1);
ini_set('log_errors',1);
ini_set('log_errors_max_len',0);
/*
* This file is part of NOALYSS.
@ -137,12 +142,17 @@ content[205]="<?php echo _("Port pour postgresql")?>";
content[206]="<?php echo _("En version mono dossier, le nom de la base de données doit être mentionné")?>";
content[207]="<?php echo _("Vous devez choisir si NOALYSS est installé sur l'un de vos servers ou sur un server mutualisé qui ne donne qu'une seule base de données")?>";
content[208]="<?php echo _("Serveur postgresql")?>";
content[209]="<?php echo _("Choisir Vide si vous restaurez un modèle")?>";
</script>
<DIV id="bulle" class="infobulle"></DIV>
<?php
define ('MONO_TEMPLATE_EMPTY',4);
define ('MONO_TEMPLATE_FRANCE',2);
define ('MONO_TEMPLATE_BELGIUM',3);
define ('MONO_TEMPLATE_UPGRADE',1);
$failed="<span style=\"font-size:18px;color:red\">&#x2716;</span>";
$succeed="<span style=\"font-size:18px;color:green\">&#x2713;</span>";
@ -218,7 +228,7 @@ $locale=HtmlInput::default_value_request("clocale", "1");
$ctmp=HtmlInput::default_value_request("ctmp", "/tmp");
$cpath=HtmlInput::default_value_request("cpath", "/usr/bin");
$db_name=HtmlInput::default_value_request("cdbname", "");
$cmodelemono=HtmlInput::default_value_request('cmodelemono',MONO_TEMPLATE_UPGRADE);
//-------------------------------------------------------------------------
// warn only if we can not write in include
//-------------------------------------------------------------------------
@ -590,24 +600,19 @@ $cn=new Database();
echo "<h1>"._('Mise à jour du systeme')."</h1>";
echo "<h2 >"._("Mise à jour dossier")."</h2>";
/**
* Update or install MONO
*/
if (defined("MULTI") && MULTI == 0)
{
$db = new Database();
if ($db->exist_table("version") == false)
if ($db->exist_table("repo_version") == false)
{
echo '<p class="warning">' . $failed ;
printf (_('La base de donnée %s est vide,
veuillez vous y connecter et executer noalyss/contrib/mono-dossier/mono.sql
avec phpPgAdmin ou pgAdmin3 ou en commande en ligne
puis faites un seul de ces choix : '),dbname);
echo '<ul>';
echo '<li>'._("soit noalyss/contrib/mono-dossier/mono-france.sql pour la comptabilité française").'</li>';
echo '<li>'._("soit noalyss/contrib/mono-dossier/mono-belge.sql pour la comptabilité belge").'</li>';
echo '<li>'._("soit y restaurer un backup ou un modèle")."</li>
</ul>
</p>";
exit();
if ( ! DEBUG) { ob_start(); }
$db->execute_script(NOALYSS_INCLUDE.'/sql/mono/mono.sql');
if ( ! DEBUG) ob_end_clean();
}
echo "<h3>Patching " . dbname . '</h3>';
$db->apply_patch(dbname);
echo "<p class=\"info\">"._("Tout est install&eacute;"). $succeed;

View file

@ -23,30 +23,30 @@
/*!\file
* \brief user setting
*/
<?php
date_default_timezone_set ('Europe/Brussels');
$_ENV['TMP']='/tmp';
# Complete path to pg_restore
define("PG_PATH","/usr/bin");
define("PG_RESTORE","/usr/bin/pg_restore ");
define("PG_DUMP","/usr/bin/pg_dump ");
define ("PSQL","/usr/bin/psql");
define ("noalyss_user","dany");
define ("noalyss_user","noalyss_sql");
define ("noalyss_password","dany");
define ("noalyss_psql_port","5432");
define ("noalyss_psql_host","127.0.0.1");
define ("noalyss_psql_host","localhost");
define ("LOCALE",1);
define ("domaine","");
define ("MULTI",1);
define ("dbname","");
// Uncomment to DEBUG
// Uncomment to DEBUG
// define ("DEBUG",TRUE);
// Uncomment to log your input
// Uncomment to log your input
// define ("LOGINPUT",TRUE);
// Do not change below !!!
// These variable are computed but could be changed in
// very special configuration
// Do not change below !!!
// These variable are computed but could be changed in
// very special configuration
// define ("NOALYSS_HOME","");
// define ("NOALYSS_PLUGIN","");
// define ("NOALYSS_INCLUDE","");
@ -58,6 +58,5 @@ define ("dbname","");
// published
// define ("SITE_UPDATE","");
// define ("SITE_UPDATE_PLUGIN","");
// Uncomment to disable cache header
// define ("ENABLE_CACHE","NO");
?>
// To allow to access the Info system
// define ("SYSINFO_DISPLAY",true);

View file

@ -110,7 +110,7 @@ class Database
$this->db=$a;
$this->is_open=TRUE;
if ($this->exist_schema('comptaproc'))
pg_exec($this->db, 'set search_path to public,comptaproc;');
pg_exec($this->db, 'set search_path to public,comptaproc,pg_catalog;');
pg_exec($this->db, 'set DateStyle to ISO, MDY;');
ob_end_clean();
}

View file

@ -66,9 +66,10 @@ function config_file_form($p_array=null)
$cport=5432;
$cdomain='';
$clocale=1;
$multi=1;
$cdbname="database_noalyss";
$multi="N";
$cdbname="";
$chost="localhost";
$cmodelemono=MONO_TEMPLATE_UPGRADE;
}
else extract ($p_array);
@ -95,9 +96,21 @@ function config_file_form($p_array=null)
*/
$smulti=new ICheckBox('multi');
$smulti->javascript=' onchange="show_dbname(this)" ';
$smulti->value='Y';
$smulti->value = 'Y';
if ( $multi == 'Y') {
$smulti->selected=true;
}
$icdbname=new IText('cdbname');
$icdbname->value=$cdbname;
$icmodelemono=new ISelect('cmodelemono');
$icmodelemono->value=array(
array('label'=>'***'._('Mise à jour').'***',"value"=>MONO_TEMPLATE_UPGRADE),
array('label'=>'Basique comptabilité France',"value"=>MONO_TEMPLATE_FRANCE),
array('label'=>'Basique comptabilité Belgique',"value"=>MONO_TEMPLATE_BELGIUM),
array('label'=>'***'._('Vide').'***',"value"=>MONO_TEMPLATE_EMPTY)
);
$icmodelemono->selected=$cmodelemono;
require NOALYSS_TEMPLATE.'/template_config_form.php';
}
/**
@ -193,7 +206,6 @@ function display_file_config($p_array,$from_setup=1,$p_os=1)
print ( '// define ("SITE_UPDATE_PLUGIN","");'."\r\n");
print ( '// To allow to access the Info system'."\r\n");
print ( '// define ("SYSINFO_DISPLAY",true);'."\r\n");
print ('?>');
}
/*!\brief create the config file
*/

View file

@ -4,29 +4,29 @@
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
--
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: -
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
SET search_path = public, pg_catalog;
SET search_path = public, pg_catalog,comptaproc;
--
-- Name: limit_user(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION limit_user() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
NEW.ac_user := substring(NEW.ac_user from 1 for 80);
return NEW;
end; $$;
end;
$$
LANGUAGE plpgsql;
SET default_tablespace = '';
@ -34,7 +34,7 @@ SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: ac_dossier; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: ac_dossier; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE ac_dossier (
@ -46,7 +46,7 @@ CREATE TABLE ac_dossier (
--
-- Name: ac_users; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: ac_users; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE ac_users (
@ -62,7 +62,7 @@ CREATE TABLE ac_users (
--
-- Name: audit_connect; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: audit_connect; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE audit_connect (
@ -84,8 +84,8 @@ CREATE TABLE audit_connect (
CREATE SEQUENCE audit_connect_ac_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
NO MAXVALUE
CACHE 1;
@ -96,13 +96,6 @@ CREATE SEQUENCE audit_connect_ac_id_seq
ALTER SEQUENCE audit_connect_ac_id_seq OWNED BY audit_connect.ac_id;
--
-- Name: audit_connect_ac_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('audit_connect_ac_id_seq', 287, true);
--
-- Name: dossier_id; Type: SEQUENCE; Schema: public; Owner: -
--
@ -110,20 +103,13 @@ SELECT pg_catalog.setval('audit_connect_ac_id_seq', 287, true);
CREATE SEQUENCE dossier_id
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: dossier_id; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('dossier_id', 29, true);
--
-- Name: jnt_use_dos; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: jnt_use_dos; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE jnt_use_dos (
@ -134,7 +120,7 @@ CREATE TABLE jnt_use_dos (
--
-- Name: modeledef; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: modeledef; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE modeledef (
@ -145,7 +131,7 @@ CREATE TABLE modeledef (
--
-- Name: priv_user; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: priv_user; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE priv_user (
@ -155,6 +141,15 @@ CREATE TABLE priv_user (
);
--
-- Name: repo_version; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE repo_version (
val integer NOT NULL
);
--
-- Name: s_modid; Type: SEQUENCE; Schema: public; Owner: -
--
@ -162,18 +157,11 @@ CREATE TABLE priv_user (
CREATE SEQUENCE s_modid
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: s_modid; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('s_modid', 8, true);
--
-- Name: seq_jnt_use_dos; Type: SEQUENCE; Schema: public; Owner: -
--
@ -181,18 +169,11 @@ SELECT pg_catalog.setval('s_modid', 8, true);
CREATE SEQUENCE seq_jnt_use_dos
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: seq_jnt_use_dos; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('seq_jnt_use_dos', 33, true);
--
-- Name: seq_priv_user; Type: SEQUENCE; Schema: public; Owner: -
--
@ -200,20 +181,13 @@ SELECT pg_catalog.setval('seq_jnt_use_dos', 33, true);
CREATE SEQUENCE seq_priv_user
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: seq_priv_user; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('seq_priv_user', 16, true);
--
-- Name: theme; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: theme; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE theme (
@ -224,7 +198,7 @@ CREATE TABLE theme (
--
-- Name: user_global_pref; Type: TABLE; Schema: public; Owner: -; Tablespace:
-- Name: user_global_pref; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE user_global_pref (
@ -269,27 +243,11 @@ COMMENT ON COLUMN user_global_pref.parameter_value IS 'the value of parameter ';
CREATE SEQUENCE users_id
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: users_id; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('users_id', 5, true);
--
-- Name: version; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE repo_version (
val integer NOT NULL
);
--
-- Name: ac_id; Type: DEFAULT; Schema: public; Owner: -
--
@ -301,18 +259,14 @@ ALTER TABLE ONLY audit_connect ALTER COLUMN ac_id SET DEFAULT nextval('audit_con
-- Data for Name: ac_dossier; Type: TABLE DATA; Schema: public; Owner: -
--
COPY ac_dossier (dos_id, dos_name, dos_description, dos_jnt_user) FROM stdin;
25 Dossier Dossier par défaut 0
\.
INSERT INTO ac_dossier VALUES (25, 'Dossier', 'Dossier par défaut', 0);
--
-- Data for Name: ac_users; Type: TABLE DATA; Schema: public; Owner: -
--
COPY ac_users (use_id, use_first_name, use_name, use_login, use_active, use_pass, use_admin) FROM stdin;
1 \N \N phpcompta 1 b1cc88e1907cde80cb2595fa793b3da9 1
\.
INSERT INTO ac_users VALUES (1, NULL, NULL, 'phpcompta', 1, 'b1cc88e1907cde80cb2595fa793b3da9', 1);
--
@ -321,68 +275,98 @@ COPY ac_users (use_id, use_first_name, use_name, use_login, use_active, use_pass
--
-- Name: audit_connect_ac_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('audit_connect_ac_id_seq', 287, true);
--
-- Name: dossier_id; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('dossier_id', 29, true);
--
-- Data for Name: jnt_use_dos; Type: TABLE DATA; Schema: public; Owner: -
--
COPY jnt_use_dos (jnt_id, use_id, dos_id) FROM stdin;
29 1 25
\.
INSERT INTO jnt_use_dos VALUES (29, 1, 25);
--
-- Data for Name: modeledef; Type: TABLE DATA; Schema: public; Owner: -
--
COPY modeledef (mod_id, mod_name, mod_desc) FROM stdin;
1 (BE) Basique Comptabilité Belge, à adapter
2 (FR) Basique Comptabilité Française, à adapter
\.
INSERT INTO modeledef VALUES (1, '(BE) Basique', 'Comptabilité Belge, à adapter');
INSERT INTO modeledef VALUES (2, '(FR) Basique', 'Comptabilité Française, à adapter');
--
-- Data for Name: priv_user; Type: TABLE DATA; Schema: public; Owner: -
--
COPY priv_user (priv_id, priv_jnt, priv_priv) FROM stdin;
\.
--
-- Data for Name: repo_version; Type: TABLE DATA; Schema: public; Owner: -
--
INSERT INTO repo_version VALUES (15);
--
-- Name: s_modid; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('s_modid', 8, true);
--
-- Name: seq_jnt_use_dos; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('seq_jnt_use_dos', 33, true);
--
-- Name: seq_priv_user; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('seq_priv_user', 16, true);
--
-- Data for Name: theme; Type: TABLE DATA; Schema: public; Owner: -
--
COPY theme (the_name, the_filestyle, the_filebutton) FROM stdin;
classic style.css \N
Light style-light.css \N
Colored style-color.css \N
EPad style-epad.css \N
\.
INSERT INTO theme VALUES ('Light', 'style-light.css', NULL);
INSERT INTO theme VALUES ('Mandarine', 'style-mandarine.css', NULL);
INSERT INTO theme VALUES ('Mobile', 'style-mobile.css', NULL);
INSERT INTO theme VALUES ('Classique', 'style-classic.css', NULL);
--
-- Data for Name: user_global_pref; Type: TABLE DATA; Schema: public; Owner: -
--
COPY user_global_pref (user_id, parameter_type, parameter_value) FROM stdin;
phpcompta TOPMENU TEXT
phpcompta PAGESIZE 50
phpcompta THEME classic
phpcompta LANG fr_FR.utf8
\.
INSERT INTO user_global_pref VALUES ('phpcompta', 'TOPMENU', 'TEXT');
INSERT INTO user_global_pref VALUES ('phpcompta', 'PAGESIZE', '50');
INSERT INTO user_global_pref VALUES ('phpcompta', 'LANG', 'fr_FR.utf8');
INSERT INTO user_global_pref VALUES ('phpcompta', 'THEME', 'Classique');
--
-- Data for Name: version; Type: TABLE DATA; Schema: public; Owner: -
-- Name: users_id; Type: SEQUENCE SET; Schema: public; Owner: -
--
COPY repo_version (val) FROM stdin;
14
\.
SELECT pg_catalog.setval('users_id', 5, true);
--
-- Name: ac_dossier_dos_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: ac_dossier_dos_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY ac_dossier
@ -390,7 +374,7 @@ ALTER TABLE ONLY ac_dossier
--
-- Name: ac_dossier_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: ac_dossier_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY ac_dossier
@ -398,7 +382,7 @@ ALTER TABLE ONLY ac_dossier
--
-- Name: ac_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: ac_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY ac_users
@ -406,7 +390,7 @@ ALTER TABLE ONLY ac_users
--
-- Name: ac_users_use_login_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: ac_users_use_login_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY ac_users
@ -414,7 +398,7 @@ ALTER TABLE ONLY ac_users
--
-- Name: audit_connect_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: audit_connect_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY audit_connect
@ -422,7 +406,7 @@ ALTER TABLE ONLY audit_connect
--
-- Name: jnt_use_dos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: jnt_use_dos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY jnt_use_dos
@ -430,7 +414,7 @@ ALTER TABLE ONLY jnt_use_dos
--
-- Name: modeledef_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: modeledef_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY modeledef
@ -438,7 +422,7 @@ ALTER TABLE ONLY modeledef
--
-- Name: pk_user_global_pref; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: pk_user_global_pref; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY user_global_pref
@ -446,7 +430,7 @@ ALTER TABLE ONLY user_global_pref
--
-- Name: priv_user_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: priv_user_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY priv_user
@ -454,29 +438,29 @@ ALTER TABLE ONLY priv_user
--
-- Name: version_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
-- Name: repo_version_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY version
ADD CONSTRAINT version_pkey PRIMARY KEY (val);
ALTER TABLE ONLY repo_version
ADD CONSTRAINT repo_version_pkey PRIMARY KEY (val);
--
-- Name: audit_connect_ac_user; Type: INDEX; Schema: public; Owner: -; Tablespace:
-- Name: audit_connect_ac_user; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX audit_connect_ac_user ON audit_connect USING btree (ac_user);
--
-- Name: fk_jnt_dos_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
-- Name: fk_jnt_dos_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX fk_jnt_dos_id ON jnt_use_dos USING btree (dos_id);
--
-- Name: fk_jnt_use_dos; Type: INDEX; Schema: public; Owner: -; Tablespace:
-- Name: fk_jnt_use_dos; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX fk_jnt_use_dos ON jnt_use_dos USING btree (use_id);
@ -486,10 +470,7 @@ CREATE INDEX fk_jnt_use_dos ON jnt_use_dos USING btree (use_id);
-- Name: limit_user_trg; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER limit_user_trg
BEFORE INSERT OR UPDATE ON audit_connect
FOR EACH ROW
EXECUTE PROCEDURE limit_user();
CREATE TRIGGER limit_user_trg BEFORE INSERT OR UPDATE ON audit_connect FOR EACH ROW EXECUTE PROCEDURE limit_user();
--
@ -528,11 +509,3 @@ ALTER TABLE ONLY priv_user
-- PostgreSQL database dump complete
--
begin;
update theme set the_name='Mandarine' ,the_filestyle='style-mandarine.css' where the_name='Colored';
update theme set the_name='Mobile' ,the_filestyle='style-mobile.css' where the_name='EPad';
update theme set the_name = 'Classique' where the_name='classic';
update user_global_pref set parameter_value='Classique' where parameter_type='THEME';
update theme set the_filestyle='style-classic.css' where the_filestyle='style.css';
update repo_version set val=15;
commit;

View file

@ -95,4 +95,12 @@ function show_dbname(obj) {
alert_box(e.getMessage);
}
}
<?php
// Show the div is MONO
if ( $smulti->selected == true) :
?>
show_dbname($('multi'));
<?php
endif;
?>
</script>