MentDB  Mentalese Database Engine
Strong AI, Weak AI, Interoperability and Software Development
Download MentDB Weak
    Home  >  App 'Deposit'
I present you the application 'Deposit'. It is someone I know who deposits her creations at several shops, and who wanted to be able to follow the sales. A very small application, but effective.

Download 'Deposit v_1.0.0' MQL source code (GPL v3) >>> MentDB v_2.1.9 compatible

Install:
  • Install MentDB Weak vX.X.X
  • Start a MQL Editor
  • Unzip the file 'deposit_X.X.X.mql.zip'
  • Copy the MQL source code from the file 'deposit_X.X.X.mql'
  • Paste the MQL source code into the MQL Editor
  • Execute the MQL source code
  • Your application is ready!
  • Go to https://localhost:9999
  • Click on 'deposit'
  • Login 'system', password 'pwd'
  • Enjoy!

Demo: W98 - The deposit

Screenshot:
MQL Source code
######################################################;
# Project: Deposit                                    ;
# License: GPL v_3 (under the licence of MentDB Weak) ;
# Website: https://www.mentdb.org/deposit.html        ;
# Twitter: https://twitter.com/mentalese_db           ;
# Facebook: https://www.facebook.com/mentdb           ;
# LinkedIn: https://www.linkedin.com/company/innov-ai ;
# Author: Jimmitry Payet                              ;
# Mail: contact@mentdb.org                            ;
# Locality: Reunion Island (French)                   ;
######################################################;

script create exe "app.100.template.deposit.page.help.onload" false 1 
  (param
  	(var "[OBJ_OVERWRITE]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Show the help page" 
{

	include "app.100.obj.kpi.exe" "[container_id]" "kpi";
	include "app.100.obj.sparkline.exe" "[container_id]" "sparkline_bar" "[type]" "bar";
	include "app.100.obj.sparkline.exe" "[container_id]" "sparkline_line" "[type]" "line";
	include "app.100.obj.sparkline.exe" "[container_id]" "sparkline_box" "[type]" "box";
	include "app.100.obj.sparkline.exe" "[container_id]" "sparkline_tristate" "[type]" "tristate";
	include "app.100.obj.sparkline.exe" "[container_id]" "sparkline_discrete" "[type]" "discrete";
	include "app.100.obj.sparkline.exe" "[container_id]" "sparkline_bullet" "[type]" "bullet";
	include "app.100.obj.sparkline.exe" "[container_id]" "sparkline_pie" "[type]" "pie";
	include "app.100.obj.progress_bar.exe" "[container_id]" "progress_bar";
	include "app.100.obj.chartjs.bar_vertical.exe" "[container_id]" "bar_vertical";
	include "app.100.obj.chartjs.bar_horizontal.exe" "[container_id]" "bar_horizontal";
	include "app.100.obj.chartjs.bar_vertical_stacked.exe" "[container_id]" "bar_vertical_stacked";
	include "app.100.obj.chartjs.bar_horizontal_stacked.exe" "[container_id]" "bar_horizontal_stacked";
	include "app.100.obj.chartjs.doughnut.exe" "[container_id]" "doughnut";
	include "app.100.obj.chartjs.pie.exe" "[container_id]" "pie";
	include "app.100.obj.chartjs.polar.exe" "[container_id]" "polar";
	include "app.100.obj.chartjs.radar.exe" "[container_id]" "radar";
	include "app.100.obj.chartjs.line_basic.exe" "[container_id]" "line_basic";
	include "app.100.obj.chartjs.line_basic_fill.exe" "[container_id]" "line_basic_fill";
	include "app.100.obj.chartjs.line_stepped_before.exe" "[container_id]" "line_stepped_before";
	include "app.100.obj.chartjs.line_stepped_after.exe" "[container_id]" "line_stepped_after";
	include "app.100.obj.chartjs.line_courbe.exe" "[container_id]" "line_courbe";
	include "app.100.obj.chartjs.line_courbe_fill.exe" "[container_id]" "line_courbe_fill";
	include "app.100.obj.chartjs.line_point.exe" "[container_id]" "line_point";
	include "app.100.obj.chartjs.time_basic.exe" "[container_id]" "time_basic";
	include "app.100.obj.chartjs.time_courbe.exe" "[container_id]" "time_courbe";
	include "app.100.obj.chartjs.time_courbe_fill.exe" "[container_id]" "time_courbe_fill";
	include "app.100.obj.chartjs.time_basic_fill.exe" "[container_id]" "time_basic_fill";
	include "app.100.obj.gauge_meter.exe" "[container_id]" "gauge";

;} "The 'help' page";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.insert_reopen_form" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Reopen an insert form ..." 
{

	json load "data" (string decode_b64 [OBJ_OVERWRITE_B64]);

	-> "[object]" "";
	include "app.100.obj.form.begin.exe" "[form_id]" "deposit_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_title_re")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# num -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "num" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_num") "[description]" "" "[maxlength]" ""
				"[min]" "1" "[max]" "999" "[step]" "1" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/num")
			;
		
		# product_name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "product_name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_product_name") "[description]" "" "[maxlength]" "1024" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/product_name")
			;
		
		# prix -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "prix" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_prix") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/prix")
			;
		
		# location -------- TO DELETE ...;
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "location" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_location") "[description]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[inValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[optionValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[value]" (json select "data" "/client_data/location")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "deposit_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.deposit.actions.demo.MENTDB.deposit.insert.exe"
		"[data_eval]" "$('#deposit_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

script create exe "app.100.template.deposit.html.body_top" false 1 
  (param
  ;) 
  "Body top" 
{

	-> "[page]" "";

	concat_var "[page]" "<!doctype html>
		<html lang=\"fr\" style='height:100%'>
		<head>
		  <meta charset=\"utf-8\">
		  <title>" (json select "app" "/title") "</title>
		  <link href=\"font_awesome/css/font-awesome.min.css\" rel=\"stylesheet\">
		  <link href=\"css/menu-vertical.css\" rel=\"stylesheet\">
		  <script src=\"js/menu-vertical.js\"></script>
		  <link href=\"dist/css/bootstrap.css\" rel=\"stylesheet\">
		  <link href=\"css/tempusdominus-bootstrap-4.min.css\" rel=\"stylesheet\">
		  <script src=\"js/jquery.min.js\"></script>
		  <script src=\"js/moment-with-locales.js\"></script>
		  <script src=\"js/tempusdominus-bootstrap-4.min.js\"></script>
		  <script src=\"js/utils.js\"></script>
		  <script src=\"js/Chart.bundle.js\"></script>
		  <script src=\"dist/js/bootstrap.min.js\"></script>
		  <script src=\"js/jquery.sparkline.min.js\"></script>
		  <script src=\"js/raphael-2.1.4.min.js\"></script>
		  <script src=\"js/justgage.js\"></script>
		  <script src=\"js/progressbar.min.js\"></script>
		  <script src=\"js/ckeditor.js\"></script>
		  <script src=\"js/mentdb.js\"></script>
		  <link rel=\"icon\" type=\"image/png\" href=\"images/" (json select "app" "/bar_icon") "\" />
		  <style>
.jqstooltip{
    box-sizing: content-box;
}

.GaugeMeter{
	Position:        Relative;
	Text-Align:      Center;
	Overflow:        Hidden;
	Cursor:          Default;
}

.GaugeMeter SPAN,
    .GaugeMeter B{
    	Margin:          0 23%;
    	Width:           50%;
    	Position:        Absolute;
    	Text-align:      Center;
    	Display:         Inline-Block;
    	Color:           RGBa(0,0,0,.8);
    	Font-Weight:     100;
    	Font-Family:     \"Open Sans\", Arial;
    	Overflow:        Hidden;
    	White-Space:     NoWrap;
    	Text-Overflow:   Ellipsis;
}
.GaugeMeter[data-style=\"Semi\"] B{
	Margin:          0 10%;
	Width:           80%;
}

.GaugeMeter S,
    .GaugeMeter U{
    	Text-Decoration: None;
    	Font-Size:       .49em;
    	Opacity:         .5;
}

.GaugeMeter B{
	Color:           Black;
	Font-Weight:     300;
	Opacity:         .8;
}

.progress > svg {
	width: 100%;
	height: 100%;
	display: block;
}
			
		  </style>
		</head>
		<body id=\"body\" style='height:100%;margin:0px;color:#333;font-family: " (json select "app" "/font_family") ";font-size: 12px;'>
			<div id='mentdb_alert_container'></div><div id='mentdb_modal_container'></div>";

	include (concat "app." [app_version] ".template." [app_template] ".html.bar_top.exe");
	concat_var "[page]" "<div style='display:table;width:100%;height:100%;padding-top: 65px;'>";
	concat_var "[page]" "  <div style='display:table-row'>";
	if (json select "app" /menu_default_show) {
	
		concat_var "[page]" "    <div style='display:table-cell;width:70px;border-right: 1px solid rgba(0,0,0,.11);vertical-align: top;'>";
		include (concat "app." [app_version] ".template." [app_template] ".html.menu_left.exe");
		concat_var "[page]" "    </div>";
	
	};
	
	concat_var "[page]" "    <div style='display:table-cell;background-color:#f1f2f3;padding: 8px;'>";

;} "html";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.insert_open_form" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Open an insert form ..." 
{

	-> "[object]" "";
	include "app.100.obj.form.begin.exe" "[form_id]" "deposit_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_title")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# num -------- TO DELETE ...;
			
			sql connect "session_data" {cm get "MENTDB";};
			-> "[max_num]" (sql value "session_data" (concat "select max(num) from deposit where send='N'"));
			sql disconnect "session_data";

			if (is null or empty [max_num]) {
				-> "[max_num]" 0;
			};
		
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "num" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_num") "[description]" "" "[maxlength]" ""
				"[min]" "1" "[max]" "999" "[step]" "1" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (+ [max_num] 1)
			;
		
		# product_name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "product_name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_product_name") "[description]" "" "[maxlength]" "1024" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# prix -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "prix" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_prix") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" 0
			;
		
		# location -------- TO DELETE ...;
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "location" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_field_location") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[optionValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[value]" ""
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "deposit_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.deposit.actions.demo.MENTDB.deposit.insert.exe"
		"[data_eval]" "$('#deposit_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

script create conf "app.100.template.deposit" false 1 
  (param
  ;) 
  "Configuration" 
{

	json load "configuration" "{}";

	#All;
	json iobject "configuration" / title "Deposit" STR;
	json iobject "configuration" / bar_icon "bar_icon.png" STR;
	json iobject "configuration" / font_family "Roboto,Helvetica Neue,Helvetica,Arial,sans-serif;" STR;
	json iobject "configuration" / copyright_years (concat "2012 - " (date year (date sysdate))) STR;
	json iobject "configuration" / copyright_link "<a href='https://www.mentdb.org' style='color:#fff' target='_blank'><b>MentDB</b></a>" STR;
	
	#login;
	json iobject "configuration" / login_logo "deposit.png" STR;
	json iobject "configuration" / login_placeholder_user "User" STR;
	json iobject "configuration" / login_placeholder_password "Password" STR;
	json iobject "configuration" / login_submit_title "Login" STR;
	json iobject "configuration" / login_error_msg "Bad user or password." STR;

	#default page;
	json iobject "configuration" / default_page "home" STR;

	#top;
	json iobject "configuration" / top_background_color "#313131" STR;
	json iobject "configuration" / top_color "#fff" STR;
	json iobject "configuration" / top_logo "deposit.png" STR;
	json iobject "configuration" / top_logo_width "50px" STR;
	json iobject "configuration" / top_logo_top "-2px" STR;
	json iobject "configuration" / top_logo_left "10px" STR;
	json iobject "configuration" / top_title "Deposit" STR;

	#menu;
	json iobject "configuration" / menu_background_color "#fff" STR;
	json iobject "configuration" / menu_default_show true STR;
	json iobject "configuration" / menu "[]" ARRAY;
	
	app menu "/menu" "home" "Home" "fa-home" "index.jsp?app_page=home" post "home" "menu_home" "*-";

	json doc "configuration";

} "";

script create app "app.100.template.deposit" false 1 
  (param
  ;) 
  "Start point for the template" 
{

	#Main actions;
	if (not (is null or empty [app_action])) {

		#Disconnect the user;
		if (equal [app_action] "logout";) {

			json iobject "app" / connected "0" STR;
			json iobject "app" / disconnected "1" STR;
		
		};

		#Menu toggle;
		if (equal [app_action] "menu_toggle") {

			if (json select "app" /menu_default_show) {
				log trace test1;
				json iobject "app" / menu_default_show false STR;
			
			} {
				log trace test2;
				json iobject "app" / menu_default_show true STR;
			
			};
		
		};
	
	};

	#Change the page;
	if (not (is null or empty [app_page])) {

		json iobject "app" / "current_page" [app_page] STR;
	
	};
	
	-> "[app_page]" (json select "app" /current_page);
	-> "[app_user]" (json select "app" /user);

	#Check if the user is connected;
	if (json select "app" /connected) {

		include (concat "app." [app_version] ".template." [app_template] ".page." [app_page] ".exe");
	
	} {
		
		#try to connect if the user is send;
		if (is not null (json select "app" "/param/x-user")) {

			try {
				
				sql connect "session1" {cm get (json select "app" "/database")};
				
				if (equal (sql value "session1" (concat "select `password` from `users` where `login`=" (sql encode (json select "app" "/param/x-user")))) 
					(string md5 (json select "app" "/param/x-password"))) {

					json iobject "app" / groups (sql col_distinct "session1" (concat "select distinct tag 
						from user_group inner join group_tag on user_group.group_id=group_tag.group_id
						where login=" (sql encode (json select "app" "/param/x-user")));) OBJ;
					
					json iobject "app" / connected "1" STR;
					json iobject "app" / "user" (json select "app" "/param/x-user") STR;
					json iobject "app" / "current_page" (json select "app" "/default_page") STR;
					-> "[app_page]" (json select "app" /current_page);
					
					include (concat "app." [app_version] ".template." [app_template] ".page." [app_page] ".exe");
					
				} {
					
					include (concat "app." [app_version] ".template." [app_template] ".page.login.exe") "[err]" (json select "app" "/login_error_msg");
					
				};
				
				sql disconnect "session1";
		
			} {
				
				include (concat "app." [app_version] ".template." [app_template] ".page.login.exe") "[err]" [err];
				try {sql disconnect "session1";} {} "[sub_err]";
				
			} "[err]";

			[page];
		
		} {

			include (concat "app." [app_version] ".template." [app_template] ".page.login.exe") "[err]" "";
		
		};
	
	};

} "html";

script create exe "app.100.template.deposit.html.menu_left" false 1 
  (param
  ;) 
  "Menu left" 
{
	
	concat_var "[page]" "<div style='width: 100%;width:100%;height:100%;
		background-color: " (json select "app" "/menu_background_color") ";'>

		" (app menu show) "
	
	</div>";

;} "html";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.delete" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Delete elements ..." 
{

	json load "client_data" (string decode_b64 [OBJ_OVERWRITE_B64]);

	try {

		#Connection ...;
		sql connect "session1" {cm get "MENTDB"};
	
		json parse_array "client_data" "/client_data" "[o]" {
		
			json load "data" [o];
	
			-> "[result]" (sql dml "session1" (concat 
				"DELETE FROM `deposit` 
				WHERE `id`= " (sql encode (json select "data" "/client_data/id")) " 
				;"
			));
		
		};
		
		#Disconnection ...;
		sql disconnect "session1";
		
		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_SUCCESS"
			"[strong]" "OK !"
			"[msg]" (concat "
			" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "delete_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"page\":\"1\"}")
		;

	} {

		#Close the connection;
		try {sql disconnect "session1"} {} "[sub_err]";

		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_DANGER"
			"[strong]" "ERR :"
			"[msg]" [err]
		;

	} "[err]";
	
} "Return OK or KO";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.insert" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Insert a new element ..." 
{

	try {
		
		#Connection ...;
		sql connect "session1" {cm get "MENTDB"};

		json load "data" (string decode_b64 [OBJ_OVERWRITE_B64]);
		
		-> "[result]" (sql dml "session1" (concat 
			"INSERT INTO `deposit` (
			`num`, 
			`product_name`, 
			`prix`, 
			`location`
			) VALUES (
			" (sql encode (json select "data" "/client_data/num")) ", 
			" (sql encode (json select "data" "/client_data/product_name")) ", 
			" (sql encode (json select "data" "/client_data/prix")) ", 
			" (sql encode (json select "data" "/client_data/location")) "
			);"
		));
		
		#Disconnection ...;
		sql disconnect "session1";
		
		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_SUCCESS"
			"[strong]" "OK !"
			"[msg]" (concat "
			" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "insert_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		;
		
	} {

		#Close the connection;
		try {sql disconnect "session1"} {} "[sub_err]";

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.insert_reopen_form.exe"
			"[OBJ_OVERWRITE_B64]" [OBJ_OVERWRITE_B64]
		;

		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_DANGER"
			"[strong]" "ERR :"
			"[msg]" [err]
		;
		
	} "[err]";
	
} "Return OK or KO";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.onload" false 1 
  (param
  	(var "[OBJ_OVERWRITE]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Execute this script on load ..." 
{

	include "app.100.obj.sajax.server.exe"
		"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe"
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"container_id\":\"MENTDB_deposit\", \"page\":\"1\", \"nb_by_page\":\"16\", \"nb_lr_pagination\":\"4\", \"order_by\":\"\"}")
	;
	
} "Reload all blocs";

script create exe "app.100.template.deposit.page.user" false 1 
  (param
  ;) 
  "Show the user page" 
{

	include (concat "app." [app_version] ".template." [app_template] ".html.body_top.exe");

	#____________________________________________________________;
	
	#Your code here;
	
	
	include "app.100.obj.sajax.skeleton.onload.exe"
		"[scriptname]" (concat "app." [app_version] ".template." [app_template] ".page.user.onload.exe")
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
	;
	
	#____________________________________________________________;
	
	include (concat "app." [app_version] ".template." [app_template] ".html.body_bottom.exe");

;} "The 'user' page";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.skeleton" false 1 
  (param
  ;) 
  "SCRUD skeleton ..." 
{

	if (app is_granted_a "MENTDB.deposit.list.show") {

		include "app.100.obj.sajax.skeleton.container.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
				include "app.100.obj.sajax.skeleton.col.exe" "[id]" "MENTDB_deposit" "[name]" "" "[class]" "col-12 col-xs-12 col-sm-12 col-md-12 col-lg-12" "[style]" "padding-left:0px;padding-right:0px";
				
				include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
	
		include "app.100.obj.sajax.skeleton.onload.exe"
			"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.onload.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		;

	};
	
} "Return the page";

script create exe "app.100.template.deposit.page.user.onload" false 1 
  (param
  	(var "[OBJ_OVERWRITE]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Show the user page" 
{

	

;} "The 'user' page";

script create exe "app.100.template.deposit.page.home.onload" false 1 
  (param
  	(var "[OBJ_OVERWRITE]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Show the home page" 
{

	

;} "The 'home' page";

script create exe "app.100.template.deposit.page.home" false 1 
  (param
  ;) 
  "Show the home page" 
{

	include (concat "app." [app_version] ".template." [app_template] ".html.body_top.exe");

	#____________________________________________________________;

	#Your container code here;
	include "app.100.template.deposit.actions.demo.MENTDB.deposit.skeleton.exe";
	
	include "app.100.obj.sajax.skeleton.onload.exe"
		"[scriptname]" (concat "app." [app_version] ".template." [app_template] ".page.home.onload.exe")
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
	;
	
	#____________________________________________________________;
	
	include (concat "app." [app_version] ".template." [app_template] ".html.body_bottom.exe");

;} "The 'home' page";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.search_open_form" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Open a search form ..." 
{

	-> "[object]" "";
	include "app.100.obj.form.begin.exe" "[form_id]" "deposit_search_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_title") 
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";

	-> "[filter_sql]" (json select "app" (concat "/objects/MENTDB_deposit_list/filter_sql"));
	if (not (is null or empty [filter_sql])) {
		json load "filter_sql" [filter_sql];
	} {
		json load "filter_sql" "{}";
	};
			
		# id -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/id")) {
				json iobject "filter_sql" / "id" "" STR;
			};
			
			
		
		# dtcreate -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/dtcreate")) {
				json iobject "filter_sql" / "dtcreate" "" STR;
			};
			
			
		
		# num -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/num")) {
				json iobject "filter_sql" / "num" "" STR;
			};
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "num" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_field_num") "[description]" "" "[maxlength]" ""
				"[min]" 1 "[max]" 999 "[step]" 1 "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "filter_sql" "/num")
			;
		
		# product_name -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/product_name")) {
				json iobject "filter_sql" / "product_name" "" STR;
			};
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "product_name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_field_product_name") "[description]" "" "[maxlength]" "1024" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "filter_sql" "/product_name")
			;
		
		# prix -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/prix")) {
				json iobject "filter_sql" / "prix" "" STR;
			};
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "prix" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_field_prix") "[description]" "" "[maxlength]" ""
				"[min]" 0 "[max]" 100 "[step]" 1 "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "filter_sql" "/prix")
			;
		
		# sale -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/sale")) {
				json iobject "filter_sql" / "sale" "" STR;
			};
			
			include "app.100.obj.form.control.radio_inline.exe" "[control_id]" "sale" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_field_sale") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" "[\"\", \"Y\", \"N\"]"
				"[optionValues]" "[\"\", \"Y\", \"N\"]"
				"[value]" (json select "filter_sql" "/sale")
			;
		
		# send -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/send")) {
				json iobject "filter_sql" / "send" "" STR;
			};
			
			include "app.100.obj.form.control.radio_inline.exe" "[control_id]" "send" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_field_send") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" "[\"\", \"Y\", \"N\"]"
				"[optionValues]" "[\"\", \"Y\", \"N\"]"
				"[value]" (json select "filter_sql" "/send")
			;
		
		# location -------- TO DELETE ...;

			if (is null (json select "filter_sql" "/location")) {
				json iobject "filter_sql" / "location" "" STR;
			};
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "location" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_field_location") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "filter_sql" "/location")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "deposit_search_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.deposit.actions.demo.MENTDB.deposit.search.exe"
		"[data_eval]" "$('#deposit_search_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_close_button")
		"[submitTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_search_search_button")
		"[submitType]" "primary";
	
} "Return the form";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.update_open_form" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Open an update form ..." 
{

	json load "data" (string decode_b64 [OBJ_OVERWRITE_B64]);

	try {
		
		#Connect to the database;
		sql connect "session1" {cm get "MENTDB";};
		json load "row" (sql row "session1" (concat "select 
			`id`, 
			`dtcreate`, 
			`num`, 
			`product_name`, 
			`prix`, 
			`sale`, 
			`send`, 
			`location` from `deposit` where `id`= " (sql encode (json select "data" "/client_data/id")) " "));
	
		#Disconnection ...;
		sql disconnect "session1";

	} {

		#Close the connection;
		try {sql disconnect "session1"} {} "[sub_err]";

		exception (1) ([err]);
		
	} "[err]";

	-> "[object]" "";
	include "app.100.obj.form.begin.exe" "[form_id]" "deposit_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_title")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# id -------- TO DELETE ...;
			
			include "app.100.obj.form.control.hidden.exe"
				"[control_id]" "id"
				"[value]"(json select "row" "/id")
			;
		
		# num -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "num" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_num") "[description]" "" "[maxlength]" ""
				"[min]" "1" "[max]" "999" "[step]" "1" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/num")
			;
		
		# product_name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "product_name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_product_name") "[description]" "" "[maxlength]" "1024" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/product_name")
			;
		
		# prix -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "prix" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_prix") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/prix")
			;
		
		# sale -------- TO DELETE ...;
			
			include "app.100.obj.form.control.radio_inline.exe" "[control_id]" "sale" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_sale") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" "[\"Y\", \"N\"]"
				"[optionValues]" "[\"Y\", \"N\"]"
				"[value]" (json select "row" "/sale")
			;
		
		# location -------- TO DELETE ...;
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "location" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_location") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[optionValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[value]" (json select "row" "/location")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "deposit_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.deposit.actions.demo.MENTDB.deposit.update.exe"
		"[data_eval]" "$('#deposit_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.update" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Update an element ..." 
{

	try {
		
		#Connection ...;
		sql connect "session1" {cm get "MENTDB"};

		json load "data" (string decode_b64 [OBJ_OVERWRITE_B64]);
		
		-> "[result]" (sql dml "session1" (concat 
			"UPDATE `deposit` SET 
			`num`=" (sql encode (json select "data" "/client_data/num")) ", 
			`product_name`=" (sql encode (json select "data" "/client_data/product_name")) ", 
			`prix`=" (sql encode (json select "data" "/client_data/prix")) ", 
			`sale`=" (sql encode (json select "data" "/client_data/sale")) ", 
			`location`=" (sql encode (json select "data" "/client_data/location")) "
			WHERE `id`= " (sql encode (json select "data" "/client_data/id")) " 
			;"
		));
		
		#Disconnection ...;
		sql disconnect "session1";
		
		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_SUCCESS"
			"[strong]" "OK !"
			"[msg]" (concat "
			" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "update_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		;
		
	} {

		#Close the connection;
		try {sql disconnect "session1"} {} "[sub_err]";

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.update_reopen_form.exe"
			"[OBJ_OVERWRITE_B64]" [OBJ_OVERWRITE_B64]
		;

		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_DANGER"
			"[strong]" "ERR :"
			"[msg]" [err]
		;
		
	} "[err]";
	
} "Return OK or KO";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.delete_confirm" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Open a confirm dialog box for delete ..." 
{

	json load "data" (string decode_b64 [OBJ_OVERWRITE_B64]);

	-> "[object]" "";
	include "app.100.obj.form.begin.exe" "[form_id]" "deposit_delete_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (concat 
					(include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_delete_title_1") (json count "data" "/client_data") 
					(include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_delete_title_2"))
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-md"
				"[html]" "style='font-size:14px'";
			
		include "app.100.obj.form.end.exe" "[form_id]" "deposit_delete_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" [OBJ_OVERWRITE_B64]
		"[container_id]" ""
		"[mql_script]" "app.100.template.deposit.actions.demo.MENTDB.deposit.delete.exe"
		"[data_eval]" ""
		"[closeTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_delete_cancel_button")
		"[submitTitle]" (if (> (json count "data" "/client_data") 0) {include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_delete_delete_button"} {""})
		"[submitType]" "danger";
	
} "Return the form";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.list" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Get data from a database into a list ..." 
{
	
	#Load the current object id and his configuration;
	-> "[OBJECT_ID]" "MENTDB_deposit_list";
	include "app.100.scrud.overwrite_config.exe"
		"[OBJ_PARAM_LIST]" "container_id,page,nb_by_page,nb_lr_pagination,order_by,filter_sql"
	;
	
	if (equal [nb_by_page] "*") {-> "[nb_by_page]" 999999999};
	if (is empty [order_by]) {
		-> "[asc_desc]" "ASC|";
		-> "[cur_asc_desc]" "";
		-> "[cur_order_by]" "";
	} {
		-> "[cur_asc_desc]" (atom get [order_by] 1 "|");
		-> "[cur_order_by]" (atom get [order_by] 2 "|");
		if (string starts_with [order_by] "ASC|") {
			-> "[asc_desc]" "DESC|";
		} {
			-> "[asc_desc]" "";
		};
	};

	#Initialization;
	-> "[object]" "<div style='border: 1px solid rgba(0,0,0,.12);-webkit-border-radius: 3px;
		-moz-border-radius: 3px;border-radius: 3px;
		margin-top: 2px;margin-bottom: 2px;padding:5px;background-color:#fff;color:#313131'>";
	
	#Connect to the database;
	sql connect "session1" {cm get "MENTDB";};

	if (app is_granted_a "MENTDB.deposit.list.delete") {concat_var "[object]" "<span style='float:right'><button type='button' class='btn btn-danger btn-sm' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.delete_confirm.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{}")) "[getElementById]" "" "[data]" "get_all_checked('deposit_keys_checkbox')") "><span class='fa fa-remove fa-sm' aria-hidden='true'></span></button></span>";};
	if (app is_granted_a "MENTDB.deposit.list.insert") {concat_var "[object]" "<span style='float:right'><button type='button' style='margin-right:6px' class='btn btn-success btn-sm' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.insert_open_form.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{}")) "[getElementById]" "" "[data]" "") "><span class='fa fa-plus fa-sm' aria-hidden='true'></span></button></span>";};
	if (app is_granted_a "MENTDB.deposit.list.search") {concat_var "[object]" "<span style='float:right'><button type='button' style='margin-right:6px' class='btn btn-dark btn-sm' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.search_open_form.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{}")) "[getElementById]" "" "[data]" "") "><span class='fa fa-search fa-sm' aria-hidden='true'></span></button></span>";};


	concat_var "[object]" "
	<span style='font-size:16px'><b>  " (string first_letter_upper (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_title")) "</b></span>   Tot: " (sql value "session1" (concat "select sum(prix) from deposit")) ", " (string first_letter_upper (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_sale")) ": " (sql value "session1" (concat "select sum(prix) from deposit where sale='Y'")) ", " (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "sold") ": " (sql value "session1" (concat "select sum(prix) from deposit where sale='N'")) "
	
	<div style='height:10px;'></div>
	
	<table class='table table-striped table-hover table-bordered' style='margin-bottom: 0px;'>
  <thead>
    <tr>";

	try {

		#concat the row title counter;
		concat_var "[object]" "
      <th style='width:44px;padding: 0px 0px 0px 12px;'><div class='form-check form-check-inline form-control-lg' style='margin-right: 0px;padding-right: 0px;margin-left: 3px;'><input style='margin-right: 0px;' class='form-check-input' type='checkbox' id='deposit_main_checkbox' onchange='check_all(\"deposit_keys_checkbox\", this);'></div></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "id") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "id")}} {(concat "ASC|" "id")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_id") (if (equal [cur_order_by] "id") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "dtcreate") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "dtcreate")}} {(concat "ASC|" "dtcreate")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_dtcreate") (if (equal [cur_order_by] "dtcreate") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "num") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "num")}} {(concat "ASC|" "num")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_num") (if (equal [cur_order_by] "num") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "product_name") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "product_name")}} {(concat "ASC|" "product_name")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_product_name") (if (equal [cur_order_by] "product_name") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "prix") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "prix")}} {(concat "ASC|" "prix")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_prix") (if (equal [cur_order_by] "prix") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "sale") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "sale")}} {(concat "ASC|" "sale")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_sale") (if (equal [cur_order_by] "sale") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "send") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "send")}} {(concat "ASC|" "send")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_send") (if (equal [cur_order_by] "send") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='padding: 0px;'><a style='border:0px' class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "location") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "location")}} {(concat "ASC|" "location")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_field_location") (if (equal [cur_order_by] "location") {(if (is empty [asc_desc]) {"<i class='fa fa-sort-down  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"} {if (not equal "ASC|" [asc_desc]) {"<i class='fa fa-sort-up  float-right' aria-hidden='true' style='margin-top: 3px;'></i>"}})}) "</a></th>
      <th scope='col' style='width:20px;padding: 0px;'></th>
	</tr>
  </thead>
  <tbody>";
		
		-> "[sql_filter]" "";
		-> "[sql_filter_keys]" "";
		if (not (is null or empty [filter_sql])) {
			json load "filter_sql" [filter_sql];
			json parse_obj "filter_sql" "/" "[key]" "[val]" {

				if (not (string starts_with [key] "type:")) {
					switch (json select "filter_sql" (concat "/type:" [key]))
						("EQUAL") {concat_var "[sql_filter]" " and `" [key] "`=" (sql encode [val]);}
						("LIKE_L") {concat_var "[sql_filter]" " and `" [key] "` like '%" (string sublrchar (sql encode [val]) 1) "'";}
						("LIKE_R") {concat_var "[sql_filter]" " and `" [key] "` like '" (string sublrchar (sql encode [val]) 1) "%'";}
						("LIKE_LR") {concat_var "[sql_filter]" " and `" [key] "` like '%" (string sublrchar (sql encode [val]) 1) "%'";}
						{concat_var "[sql_filter]" " and `" [key] "`=" (sql encode [val]);}
					;
					concat_var "[sql_filter_keys]" "<span class='badge badge-light'>" [key] "</span> ";
				};
			
			};
	
			if (> (json count "filter_sql" "/") 0) {
				-> "[sql_filter]" (concat " WHERE " (string substring [sql_filter] 5));
				-> "[sql_filter_keys]" (concat "<h5 style='margin-top: 1px;margin-bottom:0px'><button type='button' style='margin-left: 10px;' class='btn btn-outline-dark btn-sm' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"filter_sql\":{}}")) "[getElementById]" "" "[data]" "") "><span class='fa fa-remove fa-xs' aria-hidden='true'></span> " (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "list_filter") "(s)</button></h5>");
			};
		};

		-> "[iline]" (+ 1 (- (* [page] [nb_by_page]) [nb_by_page]));
		-> "[nb_elements]" (sql value "session1" (concat "select count(*) from `deposit` " [sql_filter] ";"));
		-> "[nb_page]" (math ceil (/ [nb_elements] [nb_by_page]));
		if (is empty [cur_order_by]) {
			-> "[sql_order_by]" (concat "order by `sale`, num");
		} {
			-> "[sql_order_by]" (concat "order by `" [cur_order_by] "` " [cur_asc_desc]);
		};

		-> "[app_is_granted_update]" (app is_granted_a "MENTDB.deposit.list.update");
		
		sql parse "session1" "T" (concat "select 
			`id`, 
			`dtcreate`, 
			`num`, 
			`product_name`, 
			`prix`, 
			`sale`, 
			`send`, 
			`location` from `deposit` " [sql_filter] " " [sql_order_by] " limit " (- (* [page] [nb_by_page]) [nb_by_page]) ", " [nb_by_page] ";") {
			
			json load "primary_key" "{}";
			json iobject "primary_key" / "client_data" "{}" OBJ;
			json iobject "primary_key" "/client_data" "id" [T_id] STR;
			
      		
			concat_var "[object]" "
      <tr><th style='width:44px;padding: 0px 2px 0px 12px;'><div class='form-check form-check-inline form-control-lg' style='margin-right: 0px;padding-right: 0px;margin-left: 3px;'><input style='margin-right: 0px;' class='form-check-input' type='checkbox' name='deposit_keys_checkbox' value='" (string encode_b64 (json doc "primary_key")) "'></div></th>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_id] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_dtcreate] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_num] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_product_name] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_prix] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_sale] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_send] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_location] "<" "<") "</td>";

			if ([app_is_granted_update]) {
				concat_var "[object]" "<td style='padding: 0px 2px 0px 2px;'><button type='button' class='btn btn-warning btn-sm' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.update_open_form.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (json doc "primary_key")) "[getElementById]" "" "[data]" "") "><span class='fa fa-pencil fa-sm' aria-hidden='true'></span></button></td>";
			} {
				concat_var "[object]" "<td style='padding: 0px 2px 0px 2px;'></td>";
			};
			concat_var "[object]" "</tr>";

      		++ "[iline]";
		
		};
    
		concat_var "[object]" "
	</tbody>
</table>

";

	concat_var "[object]" "<nav aria-label='Page navigation' style='display:inline-block'>
  <ul class='pagination' style='margin-bottom:0px'>
    <li class='page-item'>
      <a class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"page\":\"" 1 "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Previous'>
        <span aria-hidden='true'>«</span>
        <span class='sr-only'>Previous</span>
      </a>
    </li>";

	for (-> "[i_page]" (- [page] [nb_lr_pagination])) (< [i_page] [page]) (++ "[i_page]") {

		if (> [i_page] 0) {
			if (== [page] [i_page]) {
				concat_var "[object]" "<li class='page-item active'>
		      <span class='page-link'>
		        " [i_page] "
		        <span class='sr-only'>(current)</span>
		      </span>
		    </li>";
			} {
				concat_var "[object]" "<li class='page-item'><a class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"page\":\"" [i_page] "\"}")) "[getElementById]" "" "[data]" "") ">" [i_page] "</a></li>";
			};
		};

	};

	for (-> "[i_page]" [page]) (<= [i_page] (+ [page] [nb_lr_pagination])) (++ "[i_page]") {

		if (<= [i_page] [nb_page]) {
			if (== [page] [i_page]) {
				concat_var "[object]" "<li class='page-item active'>
		      <span class='page-link'>
		        " [i_page] "
		        <span class='sr-only'>(current)</span>
		      </span>
		    </li>";
			} {
				concat_var "[object]" "<li class='page-item'><a class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"page\":\"" [i_page] "\"}")) "[getElementById]" "" "[data]" "") ">" [i_page] "</a></li>";
			};
		};

	};
    
    concat_var "[object]" "<li class='page-item'>
      <a class='page-link' href='javascript:;' onClick=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"page\":\"" [nb_page] "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>
        <span aria-hidden='true'>»</span>
        <span class='sr-only'>Next</span>
      </a>
    </li>
  </ul>
</nav>   " (+ 1 (- (* [page] [nb_by_page]) [nb_by_page])) " - " (if (> (* [page] [nb_by_page]) [nb_elements]) {[nb_elements]} {* [page] [nb_by_page]}) " / " [nb_elements] "
  <div style='float: right;display: inline-block;'><select id='app.100.template.deposit.actions.demo.MENTDB.deposit.list.key.nb_by_page' style='height: 33px;color: #007bff;' class='form-control' onChange=" (include "app.100.obj.sajax.client.exe" "[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"order_by\":\"\", \"page\":\"1\"}") "[getElementById]" "nb_by_page=app.100.template.deposit.actions.demo.MENTDB.deposit.list.key.nb_by_page" "[data]" "") ">
      <option " (if (== [nb_by_page] 1) {"selected"}) ">1</option>
      <option " (if (== [nb_by_page] 2) {"selected"}) ">2</option>
      <option " (if (== [nb_by_page] 3) {"selected"}) ">3</option>
      <option " (if (== [nb_by_page] 4) {"selected"}) ">4</option>
      <option " (if (== [nb_by_page] 5) {"selected"}) ">5</option>
      <option " (if (== [nb_by_page] 10) {"selected"}) ">10</option>
      <option " (if (== [nb_by_page] 12) {"selected"}) ">12</option>
      <option " (if (== [nb_by_page] 14) {"selected"}) ">14</option>
      <option " (if (== [nb_by_page] 16) {"selected"}) ">16</option>
      <option " (if (== [nb_by_page] 18) {"selected"}) ">18</option>
      <option " (if (== [nb_by_page] 20) {"selected"}) ">20</option>
      <option " (if (== [nb_by_page] 25) {"selected"}) ">25</option>
      <option " (if (== [nb_by_page] 50) {"selected"}) ">50</option>
      <option " (if (== [nb_by_page] 100) {"selected"}) ">100</option>
      <option " (if (== [nb_by_page] 250) {"selected"}) ">250</option>
      <option " (if (== [nb_by_page] 500) {"selected"}) ">500</option>
      <option " (if (== [nb_by_page] 1000) {"selected"}) ">1000</option>
      <option " (if (== [nb_by_page] 2500) {"selected"}) ">2500</option>
      <option " (if (== [nb_by_page] 5000) {"selected"}) ">5000</option>
      <option " (if (== [nb_by_page] 999999999) {"selected"}) ">*</option>
    </select></div><div style='float: right;display: inline-block;line-height: 32px;margin-right: 20px;'>" [sql_filter_keys] "</div>

</div>";

		sql disconnect "session1";

		include "app.100.obj.sajax.refresh.exe"
			"[target]" [container_id]
			"[innerHtml]" [object]
		;

	} {

		#Save the error;
		log trace [err]; 
		
		#Close all objects;
		try {sql disconnect "session1";} {} "[e]";

		exception (1) (concat "ERR/APP/LIST: " [err]);

	} "[err]";
	
} "Return the list";

script create exe "app.100.template.deposit.html.bar_top" false 1 
  (param
  ;) 
  "Bar top" 
{

	concat_var "[page]" "<div style='box-shadow: 0px 0px 8px " (json select "app" "/top_background_color") ";z-index: 999;position: fixed;width:100%;height:65px;line-height:63px;
		background-color: " (json select "app" "/top_background_color") ";
		color: " (json select "app" "/top_color") ";
		font-size: 22px;'>
		<img src='images/refresh.gif' style='display:none'>
	     <a href='index.jsp'><img id='top_refresh_icon' src='images/" (json select "app" "/top_logo") "' 
			style='vertical-align:middle;
		     width:" (json select "app" "/top_logo_width") ";
			margin-top:" (json select "app" "/top_logo_top") ";
			margin-left:" (json select "app" "/top_logo_left") ";'></a>   " (json select "app" "/top_title") "

		<div style='float:right'>
			<span class='hidden-xs' style='font-size:18px'>" (json select "app" "/user") "</span>  
			<a style='margin-right: 20px;color:#fff' href='index.jsp?app_action=menu_toggle'><i class='fa fa-bars' style='vertical-align: middle;'></i></a>
			<a style='margin-right: 20px;color:#fff' href='index.jsp?app_action=logout'><i class='fa fa-power-off' style='vertical-align: middle;'></i></a>
		</div>
	
	</div>";

;} "html";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.search" false 1 
  (param
  	(var "[OBJ_OVERWRITE_B64]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Insert a new element ..." 
{

	try {
		
		json load "data" (string decode_b64 [OBJ_OVERWRITE_B64]);

		json load "filter_sql" "{\"filter_sql\":{}}";

		

		if (not (is null or empty (json select "data" "/client_data/num"))) {
			json iobject "filter_sql" "/filter_sql" "num" (json select "data" "/client_data/num") STR;
			json iobject "filter_sql" "/filter_sql" "type:num" "EQUAL" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

		if (not (is null or empty (json select "data" "/client_data/product_name"))) {
			json iobject "filter_sql" "/filter_sql" "product_name" (json select "data" "/client_data/product_name") STR;
			json iobject "filter_sql" "/filter_sql" "type:product_name" "LIKE_LR" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

		if (not (is null or empty (json select "data" "/client_data/prix"))) {
			json iobject "filter_sql" "/filter_sql" "prix" (json select "data" "/client_data/prix") STR;
			json iobject "filter_sql" "/filter_sql" "type:prix" "EQUAL" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

		if (not (is null or empty (json select "data" "/client_data/sale"))) {
			json iobject "filter_sql" "/filter_sql" "sale" (json select "data" "/client_data/sale") STR;
			json iobject "filter_sql" "/filter_sql" "type:sale" "EQUAL" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

		if (not (is null or empty (json select "data" "/client_data/send"))) {
			json iobject "filter_sql" "/filter_sql" "send" (json select "data" "/client_data/send") STR;
			json iobject "filter_sql" "/filter_sql" "type:send" "EQUAL" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

		if (not (is null or empty (json select "data" "/client_data/location"))) {
			json iobject "filter_sql" "/filter_sql" "location" (json select "data" "/client_data/location") STR;
			json iobject "filter_sql" "/filter_sql" "type:location" "LIKE_LR" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};
		
		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.deposit.actions.demo.MENTDB.deposit.list.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 (json doc "filter_sql"))
		;
		
	} {

		#Close the connection;
		try {sql disconnect "session1"} {} "[sub_err]";

		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_DANGER"
			"[strong]" "ERR :"
			"[msg]" [err]
		;
		
	} "[err]";
	
} "Return OK or KO";

script create exe "app.100.template.deposit.page.login" false 1 
  (param
  	(var "[err]" {true} "The error message" is_null:true is_empty:true "Bad password.")
  ;) 
  "Show the login page" 
{

	-> "[page]" "";

	concat_var "[page]" "<!doctype html>
		<html lang=\"fr\">
		<head>
		  <meta charset=\"utf-8\">
		  <title>" (json select "app" "/title") "</title>
		  <link  href=\"css/style.css\" rel=\"stylesheet\">
		  <link href=\"dist/css/bootstrap.css\" rel=\"stylesheet\">
		  <link rel=\"icon\" type=\"image/png\" href=\"images/" (json select "app" "/bar_icon") "\" />
		</head>
		<body id=\"body\" style='margin:0px;color:#333;font-family: " (json select "app" "/font_family") ";font-size: 12px;'>
		<div id=\"login\">
		  <div id='divSignInCenter'>
		      <div id='divSignIn' style='border: 5px #4e4e4e solid;background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7d7d7d), color-stop(100%, #1b1b1b)), #1b1b1b;
			      background: -webkit-linear-gradient(#7d7d7d, #1b1b1b), #3F3F3F;
			      background: -moz-linear-gradient(#7d7d7d, #1b1b1b), #3F3F3F;
			      background: -o-linear-gradient(#7d7d7d, #1b1b1b), #3F3F3F;
			      background: linear-gradient(#7d7d7d, #1b1b1b), #3F3F3F;box-shadow: 2px 0px 15px 1px #888888;'>
		          <div id='divSignInImg' style='padding-top: 35px;'><a href='index.jsp'><img src='images/" (json select "app" "/login_logo") "' height='70px' alt=''></a></div>
		          <div style='padding:5px;font-size: 16px;color:#fff;border-bottom: 1px #696969 solid;'><b>" (json select "app" "/title") "<br> </b></div>
		          <div id='connectError' style=\"color:#F00;min-height:25px\">" [err] "</div>
		          <form action='index.jsp' method='post'>
		              <input class='style-1' type='text' placeholder='" (json select "app" "/login_placeholder_user") "' name='x-user' id='x-user' autofocus><br>
		              <input class='style-1' type='password' placeholder='" (json select "app" "/login_placeholder_password") "' name='x-password' id='x-password'>
		              <input type=\"submit\" class='btn btn-light' style='padding: 5px 30px 5px 30px;margin-top: 10px;width: 200px;height: 35px;' value=\"" (json select "app" "/login_submit_title") "\">
		              <div style='height:25px'></div>
		          </form>
		      </div>
		      <div style='margin-top: 10px;color:#FFF'>© " (json select "app" "/copyright_years") " - " (json select "app" "/copyright_link") "</div>
		  </div>
		</div>
		</body>
		</html>";

	[page];

;} "The 'login' page";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.lang" false 1 
  (param
  	(var "[key_lang]" {true} "" is_null:false is_empty:true "")
  ;) 
  "Get a label from the language" 
{

	if (not (json exist "task_manager_lang")) {

		json load "task_manager_lang" "{
			\"sold\": {
				\"en\": \"Sold\",
				\"fr\": \"Vendu\"
			},
			\"current\": {
				\"en\": \"Current\",
				\"fr\": \"En cours\"
			},
			\"insert_ok\": {
				\"en\": \"Element added with successfull.\",
				\"fr\": \"Elément(s) ajouté(s) avec succès.\"
			},
			\"update_ok\": {
				\"en\": \"Element updated with successfull.\",
				\"fr\": \"Elément(s) modifié(s) avec succès.\"
			},
			\"delete_ok\": {
				\"en\": \"Element deleted with successfull.\",
				\"fr\": \"Elément(s) suprimé(s) avec succès.\"
			},
			\"list_title\": {
				\"en\": \"deposit\",
				\"fr\": \"Dépot-vente\"
			},
			\"list_filter\": {
				\"en\": \"Filter\",
				\"fr\": \"Filtre\"
			},
			\"list_field_id\": {
				\"en\": \"id\",
				\"fr\": \"id\"
			},
			\"list_field_dtcreate\": {
				\"en\": \"dtcreate\",
				\"fr\": \"dtcreation\"
			},
			\"list_field_num\": {
				\"en\": \"num\",
				\"fr\": \"no\"
			},
			\"list_field_product_name\": {
				\"en\": \"product name\",
				\"fr\": \"nom du produit\"
			},
			\"list_field_prix\": {
				\"en\": \"price\",
				\"fr\": \"prix\"
			},
			\"list_field_sale\": {
				\"en\": \"sale\",
				\"fr\": \"vendu\"
			},
			\"list_field_send\": {
				\"en\": \"send\",
				\"fr\": \"envoyé\"
			},
			\"list_field_location\": {
				\"en\": \"location\",
				\"fr\": \"lieu\"
			},
			\"form_search_title\": {
				\"en\": \"Search an element\",
				\"fr\": \"Recherche d'un élément\"
			},
			\"form_search_close_button\": {
				\"en\": \"Close\",
				\"fr\": \"Fermer\"
			},
			\"form_search_search_button\": {
				\"en\": \"Search\",
				\"fr\": \"Rechercher\"
			},
			\"form_search_field_id\": {
				\"en\": \"id\",
				\"fr\": \"id\"
			},
			\"form_search_field_dtcreate\": {
				\"en\": \"dtcreate\",
				\"fr\": \"dtcreation\"
			},
			\"form_search_field_num\": {
				\"en\": \"num\",
				\"fr\": \"no\"
			},
			\"form_search_field_product_name\": {
				\"en\": \"product name\",
				\"fr\": \"nom du produit\"
			},
			\"form_search_field_prix\": {
				\"en\": \"price\",
				\"fr\": \"prix\"
			},
			\"form_search_field_sale\": {
				\"en\": \"sale\",
				\"fr\": \"vendu\"
			},
			\"form_search_field_send\": {
				\"en\": \"send\",
				\"fr\": \"envoyé\"
			},
			\"form_search_field_location\": {
				\"en\": \"location\",
				\"fr\": \"lieu\"
			},
			\"form_insert_title\": {
				\"en\": \"Insert an element\",
				\"fr\": \"Ajout d'un élément\"
			},
			\"form_insert_title_re\": {
				\"en\": \"Insert an element (Correction)\",
				\"fr\": \"Ajout d'un élément (Correction)\"
			},
			\"form_insert_close_button\": {
				\"en\": \"Close\",
				\"fr\": \"Fermer\"
			},
			\"form_insert_insert_button\": {
				\"en\": \"Add\",
				\"fr\": \"Ajouter\"
			},
			\"form_insert_field_id\": {
				\"en\": \"id\",
				\"fr\": \"id\"
			},
			\"form_insert_field_dtcreate\": {
				\"en\": \"dtcreate\",
				\"fr\": \"dtcreation\"
			},
			\"form_insert_field_num\": {
				\"en\": \"num\",
				\"fr\": \"no\"
			},
			\"form_insert_field_product_name\": {
				\"en\": \"product name\",
				\"fr\": \"nom du produit\"
			},
			\"form_insert_field_prix\": {
				\"en\": \"price\",
				\"fr\": \"prix\"
			},
			\"form_insert_field_sale\": {
				\"en\": \"sale\",
				\"fr\": \"vendu\"
			},
			\"form_insert_field_send\": {
				\"en\": \"send\",
				\"fr\": \"envoyé\"
			},
			\"form_insert_field_location\": {
				\"en\": \"location\",
				\"fr\": \"lieu\"
			},
			\"form_update_title\": {
				\"en\": \"Update an element\",
				\"fr\": \"Modification d'un élément\"
			},
			\"form_update_title_re\": {
				\"en\": \"Update an element (Correction)\",
				\"fr\": \"Modification d'un élément (Correction)\"
			},
			\"form_update_close_button\": {
				\"en\": \"Close\",
				\"fr\": \"Fermer\"
			},
			\"form_update_update_button\": {
				\"en\": \"Update\",
				\"fr\": \"Modifier\"
			},
			\"form_update_field_id\": {
				\"en\": \"id\",
				\"fr\": \"id\"
			},
			\"form_update_field_dtcreate\": {
				\"en\": \"dtcreate\",
				\"fr\": \"dtcreation\"
			},
			\"form_update_field_num\": {
				\"en\": \"num\",
				\"fr\": \"no\"
			},
			\"form_update_field_product_name\": {
				\"en\": \"product name\",
				\"fr\": \"nom du produit\"
			},
			\"form_update_field_prix\": {
				\"en\": \"price\",
				\"fr\": \"prix\"
			},
			\"form_update_field_sale\": {
				\"en\": \"sale\",
				\"fr\": \"vendu\"
			},
			\"form_update_field_send\": {
				\"en\": \"send\",
				\"fr\": \"envoyé\"
			},
			\"form_update_field_location\": {
				\"en\": \"location\",
				\"fr\": \"lieu\"
			},
			\"form_delete_title_1\": {
				\"en\": \"Delete of \",
				\"fr\": \"Suppression de \"
			},
			\"form_delete_title_2\": {
				\"en\": \" element(s)\",
				\"fr\": \" élément(s)\"
			},
			\"form_delete_cancel_button\": {
				\"en\": \"Cancel\",
				\"fr\": \"Annuler\"
			},
			\"form_delete_delete_button\": {
				\"en\": \"Delete\",
				\"fr\": \"Supprimer\"
			},
		}";

	};

	json select "task_manager_lang" (concat "/" [key_lang] "/" (parameter get value "DEPOSIT_LANG"));
	
} "Return the translation";

script create exe "app.100.template.deposit.html.body_bottom" false 1 
  (param
  ;) 
  "Body bottom" 
{

	concat_var "[page]" "    </div>";
	concat_var "[page]" "  </div>";
	concat_var "[page]" "</div>";
	
	include (concat "app." [app_version] ".obj.onload.exe");

	concat_var "[page]" "</body></html>";

	[page]

;} "html";

script create exe "app.100.template.deposit.actions.demo.MENTDB.deposit.update_reopen_form" false 1 
  (param
  	(var "[container_id]" {true} "" is_null:false is_empty:false "container1")
  ;) 
  "Reopen an update form ..." 
{

	json load "data" (string decode_b64 [OBJ_OVERWRITE_B64]);

	-> "[object]" "";
	include "app.100.obj.form.begin.exe" "[form_id]" "deposit_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_title_re")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# id -------- TO DELETE ...;
			
			include "app.100.obj.form.control.hidden.exe"
				"[control_id]" "id"
				"[value]" (json select "data" "/client_data/id")
			;
		
		# num -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "num" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_num") "[description]" "" "[maxlength]" ""
				"[min]" "1" "[max]" "999" "[step]" "1" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/num")
			;
		
		# product_name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "product_name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_product_name") "[description]" "" "[maxlength]" "1024" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/product_name")
			;
		
		# prix -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "prix" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_prix") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/prix")
			;
		
		# sale -------- TO DELETE ...;
			
			include "app.100.obj.form.control.radio_inline.exe" "[control_id]" "sale" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_sale") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" "[\"Y\", \"N\"]"
				"[optionValues]" "[\"Y\", \"N\"]"
				"[value]" (json select "data" "/client_data/sale")
			;
		
		# location -------- TO DELETE ...;
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "location" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_field_location") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[optionValues]" "[\"St-Denis\", \"St-Pierre\"]"
				"[value]" (json select "data" "/client_data/location")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "deposit_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.deposit.actions.demo.MENTDB.deposit.update.exe"
		"[data_eval]" "$('#deposit_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.deposit.actions.demo.MENTDB.deposit.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.deposit.actions.demo.test" false 1 
  (param
  ;) 
  "Test" 
{

	include "app.100.obj.sajax.alert.exe"
		"[type]" "ALERT_SUCCESS"
		"[strong]" "OK !"
		"[msg]" "Super
		..."
	;

;} "";

script create exe "app.100.template.deposit.page.help" false 1 
  (param
  ;) 
  "Show the help page" 
{

	include (concat "app." [app_version] ".template." [app_template] ".html.body_top.exe");

	#____________________________________________________________;

	include "app.100.obj.sajax.skeleton.container.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "kpi" "[name]" "" "[class]" "col-6 col-xs-6 col-sm-6 col-md-6 col-lg-6" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "progress_bar" "[name]" "" "[class]" "col-6 col-xs-6 col-sm-6 col-md-6 col-lg-6" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "sparkline_line" "[name]" "" "[class]" "col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "sparkline_bar" "[name]" "" "[class]" "col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "sparkline_box" "[name]" "" "[class]" "col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "sparkline_tristate" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "sparkline_discrete" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "sparkline_bullet" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "sparkline_pie" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "bar_vertical" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "bar_horizontal" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "bar_vertical_stacked" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "bar_horizontal_stacked" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "doughnut" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "pie" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "polar" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "radar" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "line_basic" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "line_basic_fill" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "line_stepped_before" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "line_stepped_after" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "time_basic" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "time_basic_fill" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "time_courbe" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "time_courbe_fill" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.row.exe" "[id]" "" "[name]" "" "[class]" "" "[style]" "";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "line_courbe" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "line_courbe_fill" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "line_point" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
			include "app.100.obj.sajax.skeleton.col.exe" "[id]" "gauge" "[name]" "" "[class]" "col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3" "[style]" ""; include "app.100.obj.sajax.skeleton.div.end.exe";
		include "app.100.obj.sajax.skeleton.div.end.exe";
	include "app.100.obj.sajax.skeleton.div.end.exe";



	include "app.100.obj.sajax.skeleton.onload.exe"
		"[scriptname]" (concat "app." [app_version] ".template." [app_template] ".page.help.onload.exe")
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
	;
	
	#____________________________________________________________;
	
	include (concat "app." [app_version] ".template." [app_template] ".html.body_bottom.exe");

;} "The 'help' page";

script create exe "app.100.template.deposit.init" false 1 
  (param
  	(var "[lang]" {type is_enum [lang] "en,fr"} "The app language" is_null:false is_empty:false "en")
  ;) 
  "Initialise the deposit app" 
{

	#The default language;
	parameter add "DEPOSIT_LANG" [lang] 0;

	#Create the SQL database;
	sql connect "session1" {cm get "MENTDB";};
	sql dml "session1" (concat "CREATE TABLE IF NOT EXISTS `deposit` (
		  `id` bigint(20) NOT NULL AUTO_INCREMENT,
		  `dtcreate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
		  `num` int(11) NOT NULL,
		  `product_name` varchar(1024) NOT NULL,
		  `prix` float NOT NULL,
		  `sale` char(1) NOT NULL DEFAULT 'N',
		  `send` char(1) NOT NULL DEFAULT 'N',
		  `location` varchar(256) NOT NULL,
		  PRIMARY KEY (`id`)
		) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
	");
	sql disconnect "session1";

	file b64_write "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAALEwAACxMBAJqcGAAAFahJREFUeJztnXl01Nd1x7/3/WbRgjbQgsSqXYDEZozxBhhjg4SN7SQm
JI3txD5x0vS0zXHa5LTOqYNT6tjFPU3OafNHm71NalLn2E4sxZEb7BhkjFmFJNAuFiGQEEIaodnf
7R8CLKGZ+f1m5je/3wjm8xcz7/7e76J3571779sINyEV9S2zvH5/OYHLiakc4GIpKVMIzIDkNBCn
gUSalEgDwIB0CMIomBwQ5ADDAcJlAJ2AbJWgVjuJ1pbNlZfM/r/pDZmtQLQU1R/MEF77WiK+D8x3
SEa5EGJWLN4l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GxQrMp6vX7519A9Od+1aXn/Fa93PRgRxaUJ
AvJrT3L6/XqM+TcSk9mZvq2rxtpHT3xaSv7nWNR/K8Hgne37K7efuq8wJmvoYz4xX1LX+DhL+okQ
SI31u24u5IgEnow0w6cVQ1ZmlNQ2LQbxrwhYasT7pj2MQwr7Px9Jbj9cDJmg76ipbAHbVzPjX4x4
37RFSgbwPeso3WVE4wMmnBJdUtu4joD/AJG2G6JvESTkCUWKL4ezmEMPDF+i01Gz9H2nY3QZM/+T
lIj8wJ2bBukGsIM4eYXRjQ+YfE580R+aSxWvfxcEbTVTD/Pg/yUhv9m2ablpGdS4WJ5bVnvsfibx
jzDhEmszYPBe8vPzaps2jCAuDAAAwEyldcerJeMFIWi12erEBJYNDLGjo7qyPtR2LSOJHwO4BjOV
/r7xHkj6m5tiaJCSWYg3mLCrc3NVwC3aZhJ/BjCBsneOFkopnmHJTwsh8s3WJ0zOAviR1y9+0vPQ
1JM54oW4NoBrrNuzx9LrzN5AJLcB4lMAAl/uazJSykES4nXBcnfbaOt7Nx7IFI9MCwOYyOLdTTZf
Ku6Rwl9NkqohaImZ+jDQSEAdM9dl5HoaJh7COB2YdgZwI4XvNuZZPLiLQXcz4XYBVCFGPYSU8pIA
GkF0QJLYp3gtDW1XT92erkx7A5gCM5XUNc4BxGICLwRRoZS8AKAcIXgWJGdLQckA2wHYBcAS8ADk
FsxjIBoE00UAAwycIqZuCNktFGtL6wMVffHivevF/wPkVBA/sigKSgAAAABJRU5ErkJggg==" 
	"web/https/deposit/images/deposit.png";
	
} "Return nothing";

app create "https" "deposit" "deposit" "100";

execute "app.100.template.deposit.init.exe"
	"[lang]" "en"
;
                
    Home  >  App 'Deposit'
MentDB © 2019 - Legal Notice