MentDB  Mentalese Database Engine
Strong AI, Weak AI, Interoperability and Software Development
Download MentDB Weak
    Home  >  App 'Book Manager'
I present you the application 'Book Manager'. Manage your authors, editors and books.

Download 'Book Manager 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 'bookmanager_X.X.X.mql.zip'
  • Copy the MQL source code from the file 'bookmanager_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 'bookmanager'
  • Login 'system', password 'pwd'
  • Enjoy!

Demo: W102 - The book manager

Screenshot:
MQL Source code
######################################################;
# Project: Book Manager                               ;
# License: GPL v_3 (under the licence of MentDB Weak) ;
# Website: https://www.mentdb.org/bookmanager.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.bookmanager.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.page.editor.onload" false 1 
  (param
  	(var "[OBJ_OVERWRITE]" {true} "" is_null:false is_empty:true "{}")
  ;) 
  "Show the editor page" 
{

	

;} "The 'editor' page";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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]" "bm_books_search_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.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_bm_books_list/filter_sql"));
	if (not (is null or empty [filter_sql])) {
		json load "filter_sql" [filter_sql];
	} {
		json load "filter_sql" "{}";
	};
			
		# id_author -------- TO DELETE ...;

			sql connect "session_data" {cm get "MENTDB";};

			json load "session_data_value" "[]";
			json load "session_data_title" "[]";
			json iarray "session_data_value" / "" STR;
			json iarray "session_data_title" / "" STR;

			sql parse "session_data" "T" (concat "select id, lastname, firstname from bm_authors order by lastname, firstname") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_lastname] " " [T_firstname]) STR;
			
			};

			if (is null (json select "filter_sql" "/id_author")) {
				json iobject "filter_sql" / "id_author" "" STR;
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_author" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_search_field_id_author") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "filter_sql" "/id_author")
			;
		
		# id_editor -------- TO DELETE ...;
			
			json load "session_data_value" "[]";
			json load "session_data_title" "[]";
			json iarray "session_data_value" / "" STR;
			json iarray "session_data_title" / "" STR;

			sql parse "session_data" "T" (concat "select id, `name` from bm_editors order by `name`") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_name]) STR;
			
			};

			if (is null (json select "filter_sql" "/id_editor")) {
				json iobject "filter_sql" / "id_editor" "" STR;
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_editor" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_search_field_id_editor") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "filter_sql" "/id_editor")
			;

			sql disconnect "session_data";
		
		# isbn -------- TO DELETE ...;

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

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

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

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

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

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_editors.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 `bm_editors` 
				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.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "delete_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_authors.lang" false 1 
  (param
  	(var "[key_lang]" {true} "" is_null:false is_empty:true "")
  ;) 
  "Get a label from the language" 
{

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

		json load "MENTDB_bm_authors_lang" "{
			\"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\": \"Author list\",
				\"fr\": \"Liste des auteurs\"
			},
			\"list_filter\": {
				\"en\": \"Filter\",
				\"fr\": \"Filtre\"
			},
			\"list_field_id\": {
				\"en\": \"id\",
				\"fr\": \"id\"
			},
			\"list_field_firstname\": {
				\"en\": \"firstname\",
				\"fr\": \"prénom\"
			},
			\"list_field_lastname\": {
				\"en\": \"lastname\",
				\"fr\": \"nom de famille\"
			},
			\"list_field_dtbirth\": {
				\"en\": \"birth date\",
				\"fr\": \"date naissance\"
			},
			\"list_field_birth_country\": {
				\"en\": \"birth country\",
				\"fr\": \"pays de naissance\"
			},
			\"list_field_birth_city\": {
				\"en\": \"birth city\",
				\"fr\": \"ville de naissance\"
			},
			\"list_field_bio\": {
				\"en\": \"bio\",
				\"fr\": \"biographie\"
			},
			\"list_field_dtdeath\": {
				\"en\": \"death date\",
				\"fr\": \"date de décès\"
			},
			\"list_field_death_country\": {
				\"en\": \"death country\",
				\"fr\": \"pays de décès\"
			},
			\"list_field_death_city\": {
				\"en\": \"death city\",
				\"fr\": \"ville de décès\"
			},
			\"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_firstname\": {
				\"en\": \"firstname\",
				\"fr\": \"prénom\"
			},
			\"form_search_field_lastname\": {
				\"en\": \"lastname\",
				\"fr\": \"nom de famille\"
			},
			\"form_search_field_dtbirth\": {
				\"en\": \"birth date\",
				\"fr\": \"date naissance\"
			},
			\"form_search_field_birth_country\": {
				\"en\": \"birth country\",
				\"fr\": \"pays de naissance\"
			},
			\"form_search_field_birth_city\": {
				\"en\": \"birth city\",
				\"fr\": \"ville de naissance\"
			},
			\"form_search_field_bio\": {
				\"en\": \"bio\",
				\"fr\": \"biographie\"
			},
			\"form_search_field_dtdeath\": {
				\"en\": \"death date\",
				\"fr\": \"date de décès\"
			},
			\"form_search_field_death_country\": {
				\"en\": \"death country\",
				\"fr\": \"pays de décès\"
			},
			\"form_search_field_death_city\": {
				\"en\": \"death city\",
				\"fr\": \"ville de décès\"
			},
			\"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_firstname\": {
				\"en\": \"firstname\",
				\"fr\": \"prénom\"
			},
			\"form_insert_field_lastname\": {
				\"en\": \"lastname\",
				\"fr\": \"nom de famille\"
			},
			\"form_insert_field_dtbirth\": {
				\"en\": \"birth date\",
				\"fr\": \"date de naissance\"
			},
			\"form_insert_field_birth_country\": {
				\"en\": \"birth country\",
				\"fr\": \"pays de naissance\"
			},
			\"form_insert_field_birth_city\": {
				\"en\": \"birth city\",
				\"fr\": \"ville de naissance\"
			},
			\"form_insert_field_bio\": {
				\"en\": \"bio\",
				\"fr\": \"biographie\"
			},
			\"form_insert_field_dtdeath\": {
				\"en\": \"death date\",
				\"fr\": \"date de décès\"
			},
			\"form_insert_field_death_country\": {
				\"en\": \"death country\",
				\"fr\": \"pays de décès\"
			},
			\"form_insert_field_death_city\": {
				\"en\": \"death city\",
				\"fr\": \"ville de décès\"
			},
			\"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_firstname\": {
				\"en\": \"firstname\",
				\"fr\": \"prénom\"
			},
			\"form_update_field_lastname\": {
				\"en\": \"lastname\",
				\"fr\": \"nom de famille\"
			},
			\"form_update_field_dtbirth\": {
				\"en\": \"birth date\",
				\"fr\": \"date de naissance\"
			},
			\"form_update_field_birth_country\": {
				\"en\": \"birth country\",
				\"fr\": \"pays de naissance\"
			},
			\"form_update_field_birth_city\": {
				\"en\": \"birth city\",
				\"fr\": \"ville de naissance\"
			},
			\"form_update_field_bio\": {
				\"en\": \"bio\",
				\"fr\": \"biographie\"
			},
			\"form_update_field_dtdeath\": {
				\"en\": \"death date\",
				\"fr\": \"date de décès\"
			},
			\"form_update_field_death_country\": {
				\"en\": \"death country\",
				\"fr\": \"pays de décès\"
			},
			\"form_update_field_death_city\": {
				\"en\": \"death city\",
				\"fr\": \"ville de décès\"
			},
			\"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 "MENTDB_bm_authors_lang" (concat "/" [key_lang] "/" (parameter get value "BOOKMANAGER_LANG"));
	
} "Return the translation";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_authors.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`, 
			`firstname`, 
			`lastname`, 
			`dtbirth`, 
			`birth_country`, 
			`birth_city`, 
			`bio`, 
			`dtdeath`, 
			`death_country`, 
			`death_city` from `bm_authors` 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]" "bm_authors_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.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")
			;
		
		# firstname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "firstname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_firstname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/firstname")
			;
		
		# lastname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "lastname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_lastname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/lastname")
			;
		
		# dtbirth -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtbirth" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_dtbirth") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/dtbirth")
			;
		
		# birth_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_birth_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/birth_country")
			;
		
		# birth_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_birth_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/birth_city")
			;
		
		# bio -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "bio" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_bio") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/bio")
			;
		
		# dtdeath -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtdeath" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_dtdeath") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/dtdeath")
			;
		
		# death_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_death_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/death_country")
			;
		
		# death_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_death_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/death_city")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_authors_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.update.exe"
		"[data_eval]" "$('#bm_authors_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_authors.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 `bm_authors` SET 
			`firstname`=" (sql encode (json select "data" "/client_data/firstname")) ", 
			`lastname`=" (sql encode (json select "data" "/client_data/lastname")) ", 
			`dtbirth`=" (if (is null or empty (json select "data" "/client_data/dtbirth")) {concat "null"} {sql encode (json select "data" "/client_data/dtbirth")}) ", 
			`birth_country`=" (sql encode (json select "data" "/client_data/birth_country")) ", 
			`birth_city`=" (sql encode (json select "data" "/client_data/birth_city")) ", 
			`bio`=" (sql encode (json select "data" "/client_data/bio")) ", 
			`dtdeath`=" (if (is null or empty (json select "data" "/client_data/dtdeath")) {concat "null"} {sql encode (json select "data" "/client_data/dtdeath")}) ", 
			`death_country`=" (sql encode (json select "data" "/client_data/death_country")) ", 
			`death_city`=" (sql encode (json select "data" "/client_data/death_city")) "
			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.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "update_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_books.lang" false 1 
  (param
  	(var "[key_lang]" {true} "" is_null:false is_empty:true "")
  ;) 
  "Get a label from the language" 
{

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

		json load "MENTDB_bm_books_lang" "{
			\"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\": \"Book list\",
				\"fr\": \"Liste des livres\"
			},
			\"list_filter\": {
				\"en\": \"Filter\",
				\"fr\": \"Filtre\"
			},
			\"list_field_id\": {
				\"en\": \"id\",
				\"fr\": \"id\"
			},
			\"list_field_id_author\": {
				\"en\": \"author\",
				\"fr\": \"auteur\"
			},
			\"list_field_id_editor\": {
				\"en\": \"editor\",
				\"fr\": \"éditeur\"
			},
			\"list_field_isbn\": {
				\"en\": \"isbn\",
				\"fr\": \"isbn\"
			},
			\"list_field_title\": {
				\"en\": \"title\",
				\"fr\": \"titre\"
			},
			\"list_field_description\": {
				\"en\": \"description\",
				\"fr\": \"description\"
			},
			\"list_field_dtcreation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"list_field_nb_page\": {
				\"en\": \"nb page\",
				\"fr\": \"nb page\"
			},
			\"list_field_langue\": {
				\"en\": \"language\",
				\"fr\": \"langue\"
			},
			\"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_id_author\": {
				\"en\": \"author\",
				\"fr\": \"auteur\"
			},
			\"form_search_field_id_editor\": {
				\"en\": \"editor\",
				\"fr\": \"éditeur\"
			},
			\"form_search_field_isbn\": {
				\"en\": \"isbn\",
				\"fr\": \"isbn\"
			},
			\"form_search_field_title\": {
				\"en\": \"title\",
				\"fr\": \"titre\"
			},
			\"form_search_field_description\": {
				\"en\": \"description\",
				\"fr\": \"description\"
			},
			\"form_search_field_dtcreation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"form_search_field_nb_page\": {
				\"en\": \"nb page\",
				\"fr\": \"nb page\"
			},
			\"form_search_field_langue\": {
				\"en\": \"language\",
				\"fr\": \"langue\"
			},
			\"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_id_author\": {
				\"en\": \"author\",
				\"fr\": \"auteur\"
			},
			\"form_insert_field_id_editor\": {
				\"en\": \"editor\",
				\"fr\": \"éditeur\"
			},
			\"form_insert_field_isbn\": {
				\"en\": \"isbn\",
				\"fr\": \"isbn\"
			},
			\"form_insert_field_title\": {
				\"en\": \"title\",
				\"fr\": \"titre\"
			},
			\"form_insert_field_description\": {
				\"en\": \"description\",
				\"fr\": \"description\"
			},
			\"form_insert_field_dtcreation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"form_insert_field_nb_page\": {
				\"en\": \"nb page\",
				\"fr\": \"nb page\"
			},
			\"form_insert_field_langue\": {
				\"en\": \"language\",
				\"fr\": \"langue\"
			},
			\"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_id_author\": {
				\"en\": \"author\",
				\"fr\": \"auteur\"
			},
			\"form_update_field_id_editor\": {
				\"en\": \"editor\",
				\"fr\": \"éditeur\"
			},
			\"form_update_field_isbn\": {
				\"en\": \"isbn\",
				\"fr\": \"isbn\"
			},
			\"form_update_field_title\": {
				\"en\": \"title\",
				\"fr\": \"titre\"
			},
			\"form_update_field_description\": {
				\"en\": \"description\",
				\"fr\": \"description\"
			},
			\"form_update_field_dtcreation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"form_update_field_nb_page\": {
				\"en\": \"nb page\",
				\"fr\": \"nb page\"
			},
			\"form_update_field_langue\": {
				\"en\": \"language\",
				\"fr\": \"langue\"
			},
			\"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 "MENTDB_bm_books_lang" (concat "/" [key_lang] "/" (parameter get value "BOOKMANAGER_LANG"));
	
} "Return the translation";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_editors.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 `bm_editors` (
			`name`, 
			`adress`, 
			`zip`, 
			`country`, 
			`dt_creation`
			) VALUES (
			" (sql encode (json select "data" "/client_data/name")) ", 
			" (sql encode (json select "data" "/client_data/adress")) ", 
			" (sql encode (json select "data" "/client_data/zip")) ", 
			" (sql encode (json select "data" "/client_data/country")) ", 
			" (if (is null or empty (json select "data" "/client_data/dt_creation")) {concat "null"} {sql encode (json select "data" "/client_data/dt_creation")}) "
			);"
		));
		
		#Disconnection ...;
		sql disconnect "session1";
		
		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_SUCCESS"
			"[strong]" "OK !"
			"[msg]" (concat "
			" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "insert_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_authors.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_bm_authors_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'>";

	if (app is_granted_a "MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.delete_confirm.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{}")) "[getElementById]" "" "[data]" "get_all_checked('bm_authors_keys_checkbox')") "><span class='fa fa-remove fa-sm' aria-hidden='true'></span></button></span>";};
	if (app is_granted_a "MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "list_title")) "</b></span>
	
	<div style='height:10px;'></div>
	
	<table class='table table-striped table-hover table-bordered' style='margin-bottom: 0px;'>
  <thead>
    <tr>";
	
	#Connect to the database;
	sql connect "session1" {cm get "MENTDB";};

	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='bm_authors_main_checkbox' onchange='check_all(\"bm_authors_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.bookmanager.actions.MENTDB.bm_authors.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "lastname") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "lastname")}} {(concat "ASC|" "lastname")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "list_field_lastname") (if (equal [cur_order_by] "lastname") {(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.bookmanager.actions.MENTDB.bm_authors.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "firstname") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "firstname")}} {(concat "ASC|" "firstname")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "list_field_firstname") (if (equal [cur_order_by] "firstname") {(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.bookmanager.actions.MENTDB.bm_authors.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "dtbirth") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "dtbirth")}} {(concat "ASC|" "dtbirth")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "list_field_dtbirth") (if (equal [cur_order_by] "dtbirth") {(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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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 `bm_authors` " [sql_filter] ";"));
		-> "[nb_page]" (math ceil (/ [nb_elements] [nb_by_page]));
		if (is empty [cur_order_by]) {
			-> "[sql_order_by]" "order by `lastname`, `firstname`";
		} {
			-> "[sql_order_by]" (concat "order by `" [cur_order_by] "` " [cur_asc_desc]);
		};

		-> "[app_is_granted_update]" (app is_granted_a "MENTDB.bm_authors.list.update");
		
		sql parse "session1" "T" (concat "select 
			`id`, 
			`firstname`, 
			`lastname`, 
			`dtbirth`, 
			`birth_country`, 
			`birth_city`, 
			`bio`, 
			`dtdeath`, 
			`death_country`, 
			`death_city` from `bm_authors` " [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='bm_authors_keys_checkbox' value='" (string encode_b64 (json doc "primary_key")) "'></div></th>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_lastname] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_firstname] "<" "<") "</td>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_dtbirth] "<" "<") "</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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"order_by\":\"\", \"page\":\"1\"}") "[getElementById]" "nb_by_page=app.100.template.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.list.exe"
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"container_id\":\"MENTDB_bm_authors\", \"page\":\"1\", \"nb_by_page\":\"16\", \"nb_lr_pagination\":\"4\", \"order_by\":\"\"}")
	;
	
} "Reload all blocs";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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`, 
			`id_author`, 
			`id_editor`, 
			`isbn`, 
			`title`, 
			`description`, 
			`dtcreation`, 
			`nb_page`, 
			`langue` from `bm_books` 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]" "bm_books_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.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")
			;
		
		# id_author -------- TO DELETE ...;

			sql connect "session_data" {cm get "MENTDB";};

			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, lastname, firstname from bm_authors order by lastname, firstname") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_lastname] " " [T_firstname]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_author" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_id_author") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "row" "/id_author")
			;
		
		# id_editor -------- TO DELETE ...;
			
			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, `name` from bm_editors order by `name`") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_name]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_editor" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_id_editor") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "row" "/id_editor")
			;

			sql disconnect "session_data";
		
		# isbn -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "isbn" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_isbn") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/isbn")
			;
		
		# title -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "title" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_title") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/title")
			;
		
		# description -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "description" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_description") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/description")
			;
		
		# dtcreation -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtcreation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_dtcreation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/dtcreation")
			;
		
		# nb_page -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "nb_page" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_nb_page") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/nb_page")
			;
		
		# langue -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "langue" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_langue") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/langue")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_books_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_books.update.exe"
		"[data_eval]" "$('#bm_books_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.bookmanager.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.bookmanager.actions.MENTDB.bm_books.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 `bm_books` SET 
			`id_author`=" (sql encode (json select "data" "/client_data/id_author")) ", 
			`id_editor`=" (sql encode (json select "data" "/client_data/id_editor")) ", 
			`isbn`=" (sql encode (json select "data" "/client_data/isbn")) ", 
			`title`=" (sql encode (json select "data" "/client_data/title")) ", 
			`description`=" (sql encode (json select "data" "/client_data/description")) ", 
			`dtcreation`=" (if (is null or empty (json select "data" "/client_data/dtcreation")) {concat "null"} {sql encode (json select "data" "/client_data/dtcreation")}) ", 
			`nb_page`=" (sql encode (json select "data" "/client_data/nb_page")) ", 
			`langue`=" (sql encode (json select "data" "/client_data/langue")) "
			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.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "update_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_editors.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]" "bm_editors_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.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")
			;
		
		# name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_name") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/name")
			;
		
		# adress -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "adress" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_adress") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/adress")
			;
		
		# zip -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "zip" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_zip") "[description]" "" "[maxlength]" "45" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/zip")
			;
		
		# country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/country")
			;
		
		# dt_creation -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dt_creation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_dt_creation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dt_creation")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_editors_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.update.exe"
		"[data_eval]" "$('#bm_editors_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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]" "bm_books_delete_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (concat 
					(include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_delete_title_1") (json count "data" "/client_data") 
					(include "app.100.template.bookmanager.actions.MENTDB.bm_books.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]" "bm_books_delete_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" [OBJ_OVERWRITE_B64]
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_books.delete.exe"
		"[data_eval]" ""
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_delete_cancel_button")
		"[submitTitle]" (if (> (json count "data" "/client_data") 0) {include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_delete_delete_button"} {""})
		"[submitType]" "danger";
	
} "Return the form";

script create exe "app.100.template.bookmanager.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.bookmanager.page.editor" false 1 
  (param
  ;) 
  "Show the editor page" 
{

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

	#____________________________________________________________;

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

;} "The 'editor' page";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_editors.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]" "bm_editors_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_title")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_name") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# adress -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "adress" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_adress") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# zip -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "zip" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_zip") "[description]" "" "[maxlength]" "45" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# dt_creation -------- TO DELETE ...;
		
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dt_creation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_dt_creation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_editors_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.insert.exe"
		"[data_eval]" "$('#bm_editors_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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_bm_books_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'>";

	if (app is_granted_a "MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.delete_confirm.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{}")) "[getElementById]" "" "[data]" "get_all_checked('bm_books_keys_checkbox')") "><span class='fa fa-remove fa-sm' aria-hidden='true'></span></button></span>";};
	if (app is_granted_a "MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "list_title")) "</b></span>
	
	<div style='height:10px;'></div>
	
	<table class='table table-striped table-hover table-bordered' style='margin-bottom: 0px;'>
  <thead>
    <tr>";
	
	#Connect to the database;
	sql connect "session1" {cm get "MENTDB";};

	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='bm_books_main_checkbox' onchange='check_all(\"bm_books_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.bookmanager.actions.MENTDB.bm_books.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "title") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "title")}} {(concat "ASC|" "title")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "list_field_title") (if (equal [cur_order_by] "title") {(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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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 `bm_books` " [sql_filter] ";"));
		-> "[nb_page]" (math ceil (/ [nb_elements] [nb_by_page]));
		if (is empty [cur_order_by]) {
			-> "[sql_order_by]" "order by `title`";
		} {
			-> "[sql_order_by]" (concat "order by `" [cur_order_by] "` " [cur_asc_desc]);
		};

		-> "[app_is_granted_update]" (app is_granted_a "MENTDB.bm_books.list.update");
		
		sql parse "session1" "T" (concat "select 
			`id`, 
			`id_author`, 
			`id_editor`, 
			`isbn`, 
			`title`, 
			`description`, 
			`dtcreation`, 
			`nb_page`, 
			`langue` from `bm_books` " [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='bm_books_keys_checkbox' value='" (string encode_b64 (json doc "primary_key")) "'></div></th>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_title] "<" "<") "</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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"order_by\":\"\", \"page\":\"1\"}") "[getElementById]" "nb_by_page=app.100.template.bookmanager.actions.MENTDB.bm_books.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.bookmanager.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.bookmanager.actions.MENTDB.bm_books.skeleton" false 1 
  (param
  ;) 
  "SCRUD skeleton ..." 
{

	if (app is_granted_a "MENTDB.bm_books.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_bm_books" "[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.bookmanager.actions.MENTDB.bm_books.onload.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		;

	};
	
} "Return the page";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.list.exe"
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"container_id\":\"MENTDB_bm_books\", \"page\":\"1\", \"nb_by_page\":\"16\", \"nb_lr_pagination\":\"4\", \"order_by\":\"\"}")
	;
	
} "Reload all blocs";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_authors.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]" "bm_authors_delete_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (concat 
					(include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_delete_title_1") (json count "data" "/client_data") 
					(include "app.100.template.bookmanager.actions.MENTDB.bm_authors.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]" "bm_authors_delete_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" [OBJ_OVERWRITE_B64]
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.delete.exe"
		"[data_eval]" ""
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_delete_cancel_button")
		"[submitTitle]" (if (> (json count "data" "/client_data") 0) {include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_delete_delete_button"} {""})
		"[submitType]" "danger";
	
} "Return the form";

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

	if (app is_granted_a "MENTDB.bm_authors.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_bm_authors" "[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.bookmanager.actions.MENTDB.bm_authors.onload.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		;

	};
	
} "Return the page";

script create exe "app.100.template.bookmanager.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='background-repeat: no-repeat;
		    background-attachment: fixed;
		    background-position: center;
		    background-size: 100% 100%;
		    background-image: url(images/bg.jpg);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.bookmanager.page.author" false 1 
  (param
  ;) 
  "Show the author page" 
{

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

	#____________________________________________________________;

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

;} "The 'author' page";

script create exe "app.100.template.bookmanager.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.bookmanager.actions.MENTDB.bm_editors.lang" false 1 
  (param
  	(var "[key_lang]" {true} "" is_null:false is_empty:true "")
  ;) 
  "Get a label from the language" 
{

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

		json load "MENTDB_bm_editors_lang" "{
			\"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\": \"Editor list\",
				\"fr\": \"Liste des éditeurs\"
			},
			\"list_filter\": {
				\"en\": \"Filter\",
				\"fr\": \"Filtre\"
			},
			\"list_field_id\": {
				\"en\": \"id\",
				\"fr\": \"id\"
			},
			\"list_field_name\": {
				\"en\": \"name\",
				\"fr\": \"nom\"
			},
			\"list_field_adress\": {
				\"en\": \"adress\",
				\"fr\": \"adresse\"
			},
			\"list_field_zip\": {
				\"en\": \"zip\",
				\"fr\": \"code postal\"
			},
			\"list_field_country\": {
				\"en\": \"country\",
				\"fr\": \"pays\"
			},
			\"list_field_dt_creation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"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_name\": {
				\"en\": \"name\",
				\"fr\": \"nom\"
			},
			\"form_search_field_adress\": {
				\"en\": \"adress\",
				\"fr\": \"adresse\"
			},
			\"form_search_field_zip\": {
				\"en\": \"zip\",
				\"fr\": \"code postal\"
			},
			\"form_search_field_country\": {
				\"en\": \"country\",
				\"fr\": \"pays\"
			},
			\"form_search_field_dt_creation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"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_name\": {
				\"en\": \"name\",
				\"fr\": \"nom\"
			},
			\"form_insert_field_adress\": {
				\"en\": \"adress\",
				\"fr\": \"adresse\"
			},
			\"form_insert_field_zip\": {
				\"en\": \"zip\",
				\"fr\": \"code postal\"
			},
			\"form_insert_field_country\": {
				\"en\": \"country\",
				\"fr\": \"pays\"
			},
			\"form_insert_field_dt_creation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"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_name\": {
				\"en\": \"name\",
				\"fr\": \"nom\"
			},
			\"form_update_field_adress\": {
				\"en\": \"adress\",
				\"fr\": \"adresse\"
			},
			\"form_update_field_zip\": {
				\"en\": \"zip\",
				\"fr\": \"code postal\"
			},
			\"form_update_field_country\": {
				\"en\": \"country\",
				\"fr\": \"pays\"
			},
			\"form_update_field_dt_creation\": {
				\"en\": \"creation date\",
				\"fr\": \"date de création\"
			},
			\"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 "MENTDB_bm_editors_lang" (concat "/" [key_lang] "/" (parameter get value "BOOKMANAGER_LANG"));
	
} "Return the translation";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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 `bm_books` (
			`id_author`, 
			`id_editor`, 
			`isbn`, 
			`title`, 
			`description`, 
			`dtcreation`, 
			`nb_page`, 
			`langue`
			) VALUES (
			" (sql encode (json select "data" "/client_data/id_author")) ", 
			" (sql encode (json select "data" "/client_data/id_editor")) ", 
			" (sql encode (json select "data" "/client_data/isbn")) ", 
			" (sql encode (json select "data" "/client_data/title")) ", 
			" (sql encode (json select "data" "/client_data/description")) ", 
			" (if (is null or empty (json select "data" "/client_data/dtcreation")) {concat "null"} {sql encode (json select "data" "/client_data/dtcreation")}) ", 
			" (sql encode (json select "data" "/client_data/nb_page")) ", 
			" (sql encode (json select "data" "/client_data/langue")) "
			);"
		));
		
		#Disconnection ...;
		sql disconnect "session1";
		
		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_SUCCESS"
			"[strong]" "OK !"
			"[msg]" (concat "
			" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "insert_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_editors.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 `bm_editors` SET 
			`name`=" (sql encode (json select "data" "/client_data/name")) ", 
			`adress`=" (sql encode (json select "data" "/client_data/adress")) ", 
			`zip`=" (sql encode (json select "data" "/client_data/zip")) ", 
			`country`=" (sql encode (json select "data" "/client_data/country")) ", 
			`dt_creation`=" (if (is null or empty (json select "data" "/client_data/dt_creation")) {concat "null"} {sql encode (json select "data" "/client_data/dt_creation")}) "
			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.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "update_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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 app "app.100.template.bookmanager" 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.bookmanager.actions.MENTDB.bm_editors.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/name"))) {
			json iobject "filter_sql" "/filter_sql" "name" (json select "data" "/client_data/name") STR;
			json iobject "filter_sql" "/filter_sql" "type:name" "LIKE_LR" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

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

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

		if (not (is null or empty (json select "data" "/client_data/country"))) {
			json iobject "filter_sql" "/filter_sql" "country" (json select "data" "/client_data/country") STR;
			json iobject "filter_sql" "/filter_sql" "type:country" "LIKE_LR" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};
		
		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_authors.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]" "bm_authors_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_title")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# firstname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "firstname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_firstname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# lastname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "lastname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_lastname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# dtbirth -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtbirth" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_dtbirth") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# birth_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_birth_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# birth_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_birth_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# bio -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "bio" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_bio") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# dtdeath -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtdeath" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_dtdeath") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# death_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_death_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# death_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_death_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_authors_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.insert.exe"
		"[data_eval]" "$('#bm_authors_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_authors.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]" "bm_authors_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.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")
			;
		
		# firstname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "firstname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_firstname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/firstname")
			;
		
		# lastname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "lastname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_lastname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/lastname")
			;
		
		# dtbirth -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtbirth" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_dtbirth") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dtbirth")
			;
		
		# birth_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_birth_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/birth_country")
			;
		
		# birth_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_birth_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/birth_city")
			;
		
		# bio -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "bio" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_bio") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/bio")
			;
		
		# dtdeath -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtdeath" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_dtdeath") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dtdeath")
			;
		
		# death_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_death_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/death_country")
			;
		
		# death_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_field_death_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/death_city")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_authors_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.update.exe"
		"[data_eval]" "$('#bm_authors_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_editors.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]" "bm_editors_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_title_re")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_name") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/name")
			;
		
		# adress -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "adress" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_adress") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/adress")
			;
		
		# zip -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "zip" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_zip") "[description]" "" "[maxlength]" "45" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/zip")
			;
		
		# country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/country")
			;
		
		# dt_creation -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dt_creation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_field_dt_creation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dt_creation")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_editors_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.insert.exe"
		"[data_eval]" "$('#bm_editors_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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]" "bm_books_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.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")
			;
		
		# id_author -------- TO DELETE ...;

			sql connect "session_data" {cm get "MENTDB";};

			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, lastname, firstname from bm_authors order by lastname, firstname") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_lastname] " " [T_firstname]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_author" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_id_author") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "data" "/client_data/id_author")
			;
		
		# id_editor -------- TO DELETE ...;
			
			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, `name` from bm_editors order by `name`") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_name]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_editor" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_id_editor") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "data" "/client_data/id_editor")
			;

			sql disconnect "session_data";
		
		# isbn -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "isbn" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_isbn") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/isbn")
			;
		
		# title -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "title" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_title") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/title")
			;
		
		# description -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "description" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_description") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/description")
			;
		
		# dtcreation -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtcreation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_dtcreation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dtcreation")
			;
		
		# nb_page -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "nb_page" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_nb_page") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/nb_page")
			;
		
		# langue -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "langue" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_field_langue") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/langue")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_books_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_books.update.exe"
		"[data_eval]" "$('#bm_books_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_editors.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]" "bm_editors_search_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.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_bm_editors_list/filter_sql"));
	if (not (is null or empty [filter_sql])) {
		json load "filter_sql" [filter_sql];
	} {
		json load "filter_sql" "{}";
	};
			
		# name -------- TO DELETE ...;

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

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

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

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

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

	json load "configuration" "{}";

	#All;
	json iobject "configuration" / title (if (equal (parameter get value "BOOKMANAGER_LANG") "fr") {"Gestion des livres"} {"Bookmanager"}) STR;
	json iobject "configuration" / bar_icon "bookmanager_bar.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 "bookmanager.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 "bookmanager.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 (if (equal (parameter get value "BOOKMANAGER_LANG") "fr") {"Gestion des livres"} {"Bookmanager"}) 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-book" "index.jsp?app_page=home" post "home" "menu_home" "*-";
	app menu "/menu" "author" "Author" "fa-user" "index.jsp?app_page=author" post "author" "menu_author" "*+";
	app menu "/menu" "editor" "Editor" "fa-tag" "index.jsp?app_page=editor" post "editor" "menu_editor" "*+";

	json doc "configuration";

} "";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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]" "bm_books_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_title")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# id_author -------- TO DELETE ...;

			sql connect "session_data" {cm get "MENTDB";};

			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, lastname, firstname from bm_authors order by lastname, firstname") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_lastname] " " [T_firstname]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_author" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_id_author") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" ""
			;
		
		# id_editor -------- TO DELETE ...;
			
			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, `name` from bm_editors order by `name`") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_name]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_editor" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_id_editor") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" ""
			;

			sql disconnect "session_data";
		
		# isbn -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "isbn" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_isbn") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# title -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "title" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_title") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# description -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "description" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_description") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# dtcreation -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtcreation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_dtcreation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		# nb_page -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "nb_page" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_nb_page") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" 0
			;
		
		# langue -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "langue" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_langue") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" ""
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_books_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_books.insert.exe"
		"[data_eval]" "$('#bm_books_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

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

	

;} "The 'author' page";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.list.exe"
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"container_id\":\"MENTDB_bm_editors\", \"page\":\"1\", \"nb_by_page\":\"16\", \"nb_lr_pagination\":\"16\", \"order_by\":\"\"}")
	;
	
} "Reload all blocs";

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

	if (app is_granted_a "MENTDB.bm_editors.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_bm_editors" "[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.bookmanager.actions.MENTDB.bm_editors.onload.exe"
			"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		;

	};
	
} "Return the page";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_authors.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 `bm_authors` (
			`firstname`, 
			`lastname`, 
			`dtbirth`, 
			`birth_country`, 
			`birth_city`, 
			`bio`, 
			`dtdeath`, 
			`death_country`, 
			`death_city`
			) VALUES (
			" (sql encode (json select "data" "/client_data/firstname")) ", 
			" (sql encode (json select "data" "/client_data/lastname")) ", 
			" (if (is null or empty (json select "data" "/client_data/dtbirth")) {concat "null"} {sql encode (json select "data" "/client_data/dtbirth")}) ", 
			" (sql encode (json select "data" "/client_data/birth_country")) ", 
			" (sql encode (json select "data" "/client_data/birth_city")) ", 
			" (sql encode (json select "data" "/client_data/bio")) ", 
			" (if (is null or empty (json select "data" "/client_data/dtdeath")) {concat "null"} {sql encode (json select "data" "/client_data/dtdeath")}) ", 
			" (sql encode (json select "data" "/client_data/death_country")) ", 
			" (sql encode (json select "data" "/client_data/death_city")) "
			);"
		));
		
		#Disconnection ...;
		sql disconnect "session1";
		
		include "app.100.obj.sajax.alert.exe"
			"[type]" "ALERT_SUCCESS"
			"[strong]" "OK !"
			"[msg]" (concat "
			" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "insert_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_editors.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`, 
			`name`, 
			`adress`, 
			`zip`, 
			`country`, 
			`dt_creation` from `bm_editors` 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]" "bm_editors_update_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.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")
			;
		
		# name -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "name" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_name") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/name")
			;
		
		# adress -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "adress" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_adress") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/adress")
			;
		
		# zip -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "zip" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_zip") "[description]" "" "[maxlength]" "45" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/zip")
			;
		
		# country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/country")
			;
		
		# dt_creation -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dt_creation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_field_dt_creation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "row" "/dt_creation")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_editors_update_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.update.exe"
		"[data_eval]" "$('#bm_editors_update_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_update_update_button")
		"[submitType]" "warning";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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]" "bm_books_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_title_re")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# id_author -------- TO DELETE ...;

			sql connect "session_data" {cm get "MENTDB";};

			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, lastname, firstname from bm_authors order by lastname, firstname") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_lastname] " " [T_firstname]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_author" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_id_author") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "data" "/client_data/id_author")
			;
		
		# id_editor -------- TO DELETE ...;
			
			json load "session_data_value" "[]";
			json load "session_data_title" "[]";

			sql parse "session_data" "T" (concat "select id, `name` from bm_editors order by `name`") {
			
				json iarray "session_data_value" / [T_id] STR;
				json iarray "session_data_title" / (concat [T_name]) STR;
			
			};
			
			include "app.100.obj.form.control.select_mono.exe" "[control_id]" "id_editor" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_id_editor") "[description]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[inValues]" (json doc "session_data_value")
				"[optionValues]" (json doc "session_data_title")
				"[value]" (json select "data" "/client_data/id_editor")
			;

			sql disconnect "session_data";
		
		# isbn -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "isbn" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_isbn") "[description]" "" "[maxlength]" "256" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/isbn")
			;
		
		# title -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "title" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_title") "[description]" "" "[maxlength]" "512" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/title")
			;
		
		# description -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "description" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_description") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/description")
			;
		
		# dtcreation -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtcreation" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_dtcreation") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dtcreation")
			;
		
		# nb_page -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.number.exe" "[control_id]" "nb_page" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_nb_page") "[description]" "" "[maxlength]" ""
				"[min]" "" "[max]" "" "[step]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/nb_page")
			;
		
		# langue -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "langue" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_field_langue") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/langue")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_books_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_books.insert.exe"
		"[data_eval]" "$('#bm_books_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_authors.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]" "bm_authors_search_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.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_bm_authors_list/filter_sql"));
	if (not (is null or empty [filter_sql])) {
		json load "filter_sql" [filter_sql];
	} {
		json load "filter_sql" "{}";
	};
			
		# firstname -------- TO DELETE ...;

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

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

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

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

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

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

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

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_authors.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 `bm_authors` 
				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.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "delete_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_authors.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/firstname"))) {
			json iobject "filter_sql" "/filter_sql" "firstname" (json select "data" "/client_data/firstname") STR;
			json iobject "filter_sql" "/filter_sql" "type:firstname" "LIKE_LR" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

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

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

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

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

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

		if (not (is null or empty (json select "data" "/client_data/death_city"))) {
			json iobject "filter_sql" "/filter_sql" "death_city" (json select "data" "/client_data/death_city") STR;
			json iobject "filter_sql" "/filter_sql" "type:death_city" "LIKE_LR" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};
		
		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.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.bookmanager.actions.MENTDB.bm_editors.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]" "bm_editors_delete_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (concat 
					(include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_delete_title_1") (json count "data" "/client_data") 
					(include "app.100.template.bookmanager.actions.MENTDB.bm_editors.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]" "bm_editors_delete_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" [OBJ_OVERWRITE_B64]
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_editors.delete.exe"
		"[data_eval]" ""
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_delete_cancel_button")
		"[submitTitle]" (if (> (json count "data" "/client_data") 0) {include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "form_delete_delete_button"} {""})
		"[submitType]" "danger";
	
} "Return the form";

script create exe "app.100.template.bookmanager.actions.MENTDB.bm_books.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 `bm_books` 
				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.bookmanager.actions.MENTDB.bm_books.lang.exe" "[key_lang]" "delete_ok"))
		;

		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_books.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/id_author"))) {
			json iobject "filter_sql" "/filter_sql" "id_author" (json select "data" "/client_data/id_author") STR;
			json iobject "filter_sql" "/filter_sql" "type:id_author" "EQUAL" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};

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

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

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

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

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

		if (not (is null or empty (json select "data" "/client_data/langue"))) {
			json iobject "filter_sql" "/filter_sql" "langue" (json select "data" "/client_data/langue") STR;
			json iobject "filter_sql" "/filter_sql" "type:langue" "LIKE_LR" STR; #EQUAL|LIKE_L|LIKE_LR|LIKE_R;
		};
		
		include "app.100.obj.sajax.server.exe"
			"[scriptname]" "app.100.template.bookmanager.actions.MENTDB.bm_books.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.bookmanager.actions.MENTDB.bm_authors.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]" "bm_authors_insert_form_id" "[modal]" true
				"[action]" "index.jsp"
				"[enctype]" false
				"[title]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_title_re")
				"[subTitle]" ""
				"[method]" "post"
				"[widthIfModal]" "modal-lg"
				"[html]" "style='font-size:14px'";
			
		# firstname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "firstname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_firstname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/firstname")
			;
		
		# lastname -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "lastname" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_lastname") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" true "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/lastname")
			;
		
		# dtbirth -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtbirth" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_dtbirth") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dtbirth")
			;
		
		# birth_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_birth_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/birth_country")
			;
		
		# birth_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "birth_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_birth_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/birth_city")
			;
		
		# bio -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textarea.exe" "[control_id]" "bio" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_bio") "[description]" "" "[maxlength]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/bio")
			;
		
		# dtdeath -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.datetime_en.exe" "[control_id]" "dtdeath" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_dtdeath") "[description]" "" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/dtdeath")
			;
		
		# death_country -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_country" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_death_country") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/death_country")
			;
		
		# death_city -------- TO DELETE ...;
			
			include "app.100.obj.form.control.textbox.text.exe" "[control_id]" "death_city" "[class]" "col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"
				"[label]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_field_death_city") "[description]" "" "[maxlength]" "120" "[placeholder]" ""
				"[readonly]" false "[required]" false "[disabled]" false "[html]" ""
				"[value]" (json select "data" "/client_data/death_city")
			;
		
		include "app.100.obj.form.end.exe" "[form_id]" "bm_authors_insert_form_id" "[modal]" true
		"[OBJ_OVERWRITE_B64]" (string encode_b64 "{}")
		"[container_id]" ""
		"[mql_script]" "app.100.template.bookmanager.actions.MENTDB.bm_authors.insert.exe"
		"[data_eval]" "$('#bm_authors_insert_form_id').serializeObject()"
		"[closeTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_close_button")
		"[submitTitle]" (include "app.100.template.bookmanager.actions.MENTDB.bm_authors.lang.exe" "[key_lang]" "form_insert_insert_button")
		"[submitType]" "primary";
	
} "Return the form";

script create exe "app.100.template.bookmanager.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.bookmanager.actions.MENTDB.bm_editors.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_bm_editors_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'>";

	if (app is_granted_a "MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.delete_confirm.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{}")) "[getElementById]" "" "[data]" "get_all_checked('bm_editors_keys_checkbox')") "><span class='fa fa-remove fa-sm' aria-hidden='true'></span></button></span>";};
	if (app is_granted_a "MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "list_title")) "</b></span>
	
	<div style='height:10px;'></div>
	
	<table class='table table-striped table-hover table-bordered' style='margin-bottom: 0px;'>
  <thead>
    <tr>";
	
	#Connect to the database;
	sql connect "session1" {cm get "MENTDB";};

	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='bm_editors_main_checkbox' onchange='check_all(\"bm_editors_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.bookmanager.actions.MENTDB.bm_editors.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 (concat "{\"order_by\":\"" (if (equal [cur_order_by] "name") {if (is empty [asc_desc]) {""} {(concat [asc_desc] "name")}} {(concat "ASC|" "name")}) "\"}")) "[getElementById]" "" "[data]" "") " aria-label='Next'>" (include "app.100.template.bookmanager.actions.MENTDB.bm_editors.lang.exe" "[key_lang]" "list_field_name") (if (equal [cur_order_by] "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='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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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 `bm_editors` " [sql_filter] ";"));
		-> "[nb_page]" (math ceil (/ [nb_elements] [nb_by_page]));
		if (is empty [cur_order_by]) {
			-> "[sql_order_by]" "order by `name`";
		} {
			-> "[sql_order_by]" (concat "order by `" [cur_order_by] "` " [cur_asc_desc]);
		};

		-> "[app_is_granted_update]" (app is_granted_a "MENTDB.bm_editors.list.update");
		
		sql parse "session1" "T" (concat "select 
			`id`, 
			`name`, 
			`adress`, 
			`zip`, 
			`country`, 
			`dt_creation` from `bm_editors` " [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='bm_editors_keys_checkbox' value='" (string encode_b64 (json doc "primary_key")) "'></div></th>
      <td style='padding: 6px 2px 0px 2px;'>" (string replace [T_name] "<" "<") "</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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.actions.MENTDB.bm_editors.list.exe" "[OBJ_OVERWRITE_B64]" (string encode_b64 "{\"order_by\":\"\", \"page\":\"1\"}") "[getElementById]" "nb_by_page=app.100.template.bookmanager.actions.MENTDB.bm_editors.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.bookmanager.init" false 1 
  (param
  	(var "[lang]" {type is_enum [lang] "en,fr"} "The app language" is_null:false is_empty:false "en")
  ;) 
  "Initialise the bookmanager app" 
{

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

	#Create the SQL database;
	sql connect "session1" {cm get "MENTDB";};
	sql dml "session1" (concat "CREATE TABLE IF NOT EXISTS `bm_authors` (
		  `id` bigint(20) NOT NULL AUTO_INCREMENT,
		  `firstname` varchar(120) NOT NULL,
		  `lastname` varchar(120) NOT NULL,
		  `dtbirth` datetime DEFAULT NULL,
		  `birth_country` varchar(120) NOT NULL,
		  `birth_city` varchar(120) NOT NULL,
		  `bio` longtext NOT NULL,
		  `dtdeath` datetime DEFAULT NULL,
		  `death_country` varchar(120) NOT NULL,
		  `death_city` varchar(120) NOT NULL,
		  PRIMARY KEY (`id`)
		) ENGINE=InnoDB DEFAULT CHARSET=latin1;
	");
	sql dml "session1" (concat "CREATE TABLE IF NOT EXISTS `bm_editors` (
		  `id` bigint(20) NOT NULL AUTO_INCREMENT,
		  `name` varchar(256) NOT NULL,
		  `adress` varchar(512) NOT NULL,
		  `zip` varchar(45) NOT NULL,
		  `country` varchar(120) NOT NULL,
		  `dt_creation` datetime DEFAULT NULL,
		  PRIMARY KEY (`id`)
		) ENGINE=InnoDB DEFAULT CHARSET=latin1;
	");
	sql dml "session1" (concat "CREATE TABLE IF NOT EXISTS `bm_books` (
		  `id` bigint(20) NOT NULL AUTO_INCREMENT,
		  `id_author` bigint(20) NOT NULL,
		  `id_editor` bigint(20) NOT NULL,
		  `isbn` varchar(256) NOT NULL,
		  `title` varchar(512) NOT NULL,
		  `description` longtext NOT NULL,
		  `dtcreation` datetime DEFAULT NULL,
		  `nb_page` int(11) NOT NULL DEFAULT '0',
		  `langue` varchar(120) NOT NULL,
		  PRIMARY KEY (`id`),
		  KEY `fk_bm_authors_books_idx` (`id_author`),
		  KEY `fk_bm_editors_books_idx` (`id_editor`),
		  CONSTRAINT `fk_bm_authors_books` FOREIGN KEY (`id_author`) REFERENCES `bm_authors` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
		  CONSTRAINT `fk_bm_editors_books` FOREIGN KEY (`id_editor`) REFERENCES `bm_editors` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
		) ENGINE=InnoDB DEFAULT CHARSET=latin1;
	");
	sql disconnect "session1";

	file b64_write "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAALEwAACxMBAJqcGAAAEoBJREFUeJztnXl0VFWex7+/W+9VJamkKgkBFzQQRQdwQW1RBBtkEzca
PTZtu7RVSTCz9LFn1Pb0ae0ZpD060wztmTnOH93YprJ4xlZQ1FFpAReEYAuuCIi4QGgWEZJakkpS
Va/ub/7IYgKppLb3XlVSn3NyTtV79937zbm/enf73d8ljDB4+XLhP3hwIgFTWcoKABUgKgcwFsAY
BsYQUCABK6S0AgCECAsgzEAHAS3o/jsO5mYAB0iI/QzscZaXH6AVK6Rp/5wOkNkCUuXEsmVnKZo2
i4FZAKYTcBEAuy6FMbcz0WcAdpCUTRrQVNbQcFiXsgwi6wyAXa68APNcKcR1LOX1QojzzNQjgX2C
eT2I1juKit4RTz4ZMlNPomSFAXBNjRqIRBZJKW8j5iUQoshsTTEIAHiJgOccVutGWr06Yrag4cho
A/C73ecxsEwCbgGMM1tPIjDwLYA6kvJPxQ0NX5utJxYZZwAMkM/tngspHyAhbjBbTzpg4DUwryqu
r99MAJutpz8ZYwAMkM/lWkJE/wbgUrP16MSHElhRUlf3aqYYQkYYgM/tXgTgMQA/MFuLEUhguyB6
uNjj2WS2FlMNIOByTY4SPUHA9WbqMAtmflVI+YCzsXGfWRpMMYDDNTUF9nD4Ecl8nyBSzNCQKUgp
I0S0qi0YfLR87dpOo8s33AC8bvc8BlYL4Fyjy85kpJRfwmK5p9Tj2WxkuYYZALtceT6i3xHwC6PK
zEqYn3A4HA8ZNaFkiAG0VFVdaIlGnwXRhUaUl/VI+algvt3R2Pi53kUJvQvwVVbebtG093OVnwBC
TJMWyw5vZeWP9S5KtzcAL11q8RcU/CeI7tOrjFHCSmcw+BCtWRPVI3NdDODoXXfZ84V4FkIs1iP/
Uci6oNV61/jVqzvSnXHaDaCtuvq0aDT6GkbJpI5RSGC7QnSTw+M5ns5802oAJ5YtO0uEw5uEEH+X
znxzdMNS7tEUZeHY2toj6cozbQbgdbkmEtFbACrSlWeOU5HA1xBifmltbXM68kvLKODEsmVn5Srf
GARwLqR883hV1Zlpyi812qqrTxPh8CYkUfnWOZeACmypShh1COBcRcpNgcrKsanmlVITcPSuu+z5
irIZSXb4HKt+DlgVhLfsRHjjDkhfeypyRh2S+f1Om21eKqODpN8AvHSpJV+IZ5Fib5/yrLAtvBxF
//73KKi6AZbxKRv1qEEQXWkPh5/hpUstyeaR9Eqcv6BgJYjSN863CKgzLoA64wJou/YjtGE7tL0H
05b9COYWv93+OIBfJfNwUk2Ar7LydjD/bzLP9sex6ucgR0HM+9HmYwi9sR2Rj/YBckS546cdZv5x
SX39C4k+l7ABtFRVXWjRtPchROyai5PhDKAXedyH0MYPENm2CxzOeEdbc2BuF8B0R3393kQeS8gA
2OXK8wM70rWwE68B9JXf3onQ2x8h/PbH4PY0+k4Qw1IaBRSAgwKyXfc1Mr34xFFUNCORpeSE+gB+
4D/MXNWjwnzkLZ4F26IrEWn6DKGNOyBP+FPK0zIuioIftUE4v29iwrtt6NxgB7Kv1bkk0Nb2GIBf
xvtA3G8Ar9s9j4A3k5IVg0TfAKcgJSIf7UPojR2INn+b+PMEFFX5IIpPremuzfkIfZCfvDYTkVLO
KW1oeDeetHG96w7X1BQwsDo1WTogBNTLJ6Pw4Z/Bfv9tUC5MbC5KlMpBKx8AlHOyuK8hxFPscuXF
kzSuJsAeDi9HhvvwKZPLoUwuR/TQcYQ27EBk+x5ADu16T5bY97PZVVUA5/uIfgPgN8OlHbYJCLhc
kzXgs3i9d/2SsS+soYOHb0AX/c99sDn12cjb2RrAN395H81vfwytKzxoGufpEnOWDd6Z9B4W2OLJ
nCbAToTzrQocIr4OqpQyIlR1avHTT381VLphKzVK9ISIJx0zXgl24Z2uCKIc36aXOczQayUgv9SB
C+5YiIolP8Sbf9mON17bBr934FTzhA5gToznW6MSa9q7dFKXHBYC5ufbcJM9b9i2WwihQtNWAbh5
yHRD3fS53Yvi3bTx5/YuvNkZjrvyjaLAnofFt87Gf/3xl6j+p5txRhZPNUcZ2NARwtp4h8BES7xu
97yhksT8ZTNA/u7tWsNyIKLhvRiv2UxBURVcs/ByzFnwA3y8Yy9eXbcF4UB2TjW/2xnGVXlWnK3E
tQTwGAMzY+1FjNkH8LpcNxPRunhKWBfswpsd3889rPrvf4hrfFk2/kwIi3mTLiHfftiODT646ZRj
8Y12k8GKYrN759f4v7VNfd8XFdiw2B5XRx8E3Oisq3t9sHuDvgEYIH/3Lt248EUHdviK8uNr2cnk
ralWmxrzXn5BHi6YcL6BaoYmFBr4hvUOM8LpTxRYzsD6wd4Cg/78fG73XIzcLdojAk6gryWAK7xu
99Ux7g2ClA8kJytHpiKkfHDQ6ydf8FVXTxopkTly9EOIxb7KynNOuXxKQk1bZoigHIbDUlaffG2A
AXBNjSqJKo2TNLLp/MN9aH9wDoKP3gpIXXZ2JQZRJS9fPqDjP8AAApHIomyLxpWpyNaj0D7ZBG7z
Qh76AtrurWZLAgFn+A8cWND/2gADkMw/MVbSyEV772WAGerMWwAAkc3Pm6yojwF13GcA7HLlkZRD
zhvniBOWiDS9BACwLf5HkGMMtF3vQrZkQFRZolvkvff2TdT0GUCAeW4GR+DMKqJf7IBsOQTLOdNA
JadDnX4jwIzIlrVmSwOA4kBb2+zeL30GIIW4zhw9I49IU/cMunpl91SyetWPeq6/AGgZ4GjC3FfX
3zcBUo7KUG3phjvaEPl4I6CoUKZ3T6eIsydDnD0ZHGiF9onpoQHBRH11LYCebd0mR90eKWg7XgMi
ISgXzwXZnX3X1Znd3atwBnQGCZjSfuedZwA9BqBo2ixzJY0c+l7/M5cMuK5ecSNgURDdtwPyqPmx
oyOKMhPoWQ1kYFZGxIzNcuShfYg27waIEP1mZ/fnflDRGLDvGCLvPg/bbb82SWWPlu4DNl7onRWa
bqaYkUJkW/fQD8wIv/7H2OneexnWm/8FZDPP55CJrgAAhZcvF/7m5otMUzJS0MKIvP8KACCv+ncQ
ZWcNkojR+Yf7wf7voH3wOtRZtxqrsR8EXMQAKf6DBydCrzN2RhHaznfA7T6I0yZCnX5DTG8XdeYS
hNc/hcjm5001AAAOb1VVuSBgqpkqRgoDxv5DuDr1jgaizbsRPbDLEG2xsGjaVNFztFqOFGDfMWi7
u/31lBlD+xGKcRNgOe9yAEBk83O6axsKFqJCIBfYKWUi214CWMIy6TKIMYO1/QNRZ/UsEH2wHhwM
6C0vNswVSs+hijlSwLrABXX+z0CW+PaTqTMWQ7lsIQCAVBODZBFNUNB9omaOVLDmJRZogQTIlnJ8
jXRQJgCMMVtFDpOQskzpOUs3xxBomoauLuP3CRIR7Hb9RugsRJlCQEa8izKZb48dw9atxrt02Qvs
WLxYv91JBOQrErBmbUQcg7CqVpSWlBpebl6cO6xSwKZASivi3HM+Whk3biyuvXah2TLSjpTSlqv5
UY4CIcIA4ttmOkoJBttx9GgSQahSRFVVTJgwQbf8hRAhRQA5AxgGr8+PDz780PBy7QV2XQ0AQEhh
oIMAh56lZDtFhYWYMmWy4eVa9Z4llLJDIaAFwOn6lpTdOJ1OTLt4mtky9KBFoNsAcoxGhDihAEjr
KVQjkba2Nhw6dMjwclVVxaRJk3TLXwLHFTA3mx6rJcPxBwL4dOdOw8u1F9h1NQABNCsADuhWwgjB
6XBg2sUXG16uqsaOYZQWiPYrJMT+ROLNjCiYANsZg99Ti/s+FhUVYcqUKQaJMg6KRg8oDOwxW4hp
EAOho92f1TKgaCrg3QqwzO5gwXESZd6tOMvLD/gPHGgHUaHZgkyj+Epg7I2AUIGii4GjA331Wlu9
+GLfF4bLstlsuOxSnYK1SekvaWz8m0IrVkiv2/0ZAVfpU1IGQ3nAeDdQ2O+k27zxwMR7gcCnfZc6
OjvQ3JyWgzoTwl5g180AWIhdBHDve24HRqMBqCVAXtmp10kFnJf3fS0rHYPZP5x9ajqdsegYRZWY
twM9ewNJyiYI8QvdSsty8vLzcGZ+jM5ilsJEW4EeA9CAppHf5UkeLRJBhwkuYYIIhYX6dM1U5m1A
jwGUNTQcbnW79wkgc4LjZhDffvfdiHIJYyn3FDY0fAv0CxYtmNeDKGcAg2BVVYwZY7zzdH6ePqv0
JMT63s/fv/mJ1gP4Z11KzHLGjRuHhQsWDJ8wS2DmPgPo62Y6ioreAWDoPiWtKwTOhAiaowgJeIs7
Orb0fu8zgJ7TJl8yUkwk2I7OllZ0tXoRCQYhIxkQQWuEI6RcR2vW9B0+MGCgSYAp21VlVEOkowNd
Ph86W1oQbmtDNBwGRusahb4MqOMBoz+H1brR29V1TAhxmrGavoelhNbVBa2rCyCCRVVhsVphsVlB
Iq4zcnLEQsojzoqKt/pfGvgGWL06QkJ4jFU1BMyIhsMIt/c0Fd5cU5EKLISHVqzQ+l87Za6RpPyT
cZISQ2r9m4oTPU1FKNdUxIEEGJr29MnXTzGA4oaGrxl4zRhZycOSoXV1IeQPoKOlBSG/H1pnF1hm
35HfRiCYXyl55pn9J18ffAaYeRWIbtRdVbroaSqi4TDQDgjFAovNBotqhdDbqyZLkEKsGuz6oMtN
xfX1mwEYvxMiTUgtikjw5FHF6G0qGPhricfTNNi9QQ2Aun1iVugryxh6RxUDm4rOUdVUEPBIrJND
Yy4CltTVvep1u7cL4IpEC/ziYDMoCzyNLRYVrX6v2TLi4qs9R5J6joGm4rq6DbHuxzQAAthH9DCY
NyZa6N4vv855mqeZEyeSM1QmejjWrx8Y5vTwYo9nEzO/mlTJOXQlrh+YlC+Wejybh0oyrB+IkPKB
KNEiIUTM7nTJSQEmjjT7hjiWOkcy+FoHHhlfOkxQDwmEhcUy6Gmh/Ymrmrwu1+NEFDO++cFIFCt9
7fFklSNN/LqkEOOHOD6egd+W1NUtHy6fuLwO24LBR6WUX8a6X65acHWeNZ6scqSBa/Jtw1X+XmdR
0ePx5BWXAZSvXdsJi+WeodL8pCgf1xbkwZJ79euGQoQbCmy4tTC2p5AEmInu6VneH5aEqsvncv0e
RPcPlaZdMr6MaAiO0kkXvSgkwiTVgsLhA3qtLK6r+1W8+SbkDOxwOB4KtLUtABBzp2ShIFxqy02/
msSHzmDwXxN5IKGdB+LJJ0MiGv0pgGBCsnIYQYCi0Tv6e/vEQ8JbTxyNjZ8DyJ0wnmFI4G5nY+O+
RJ9Lau9RcV3dGgArk3k2R/ph5sdL6+peTubZpDefOYPBhwCsS/b5HGljTfHEiQm1+/1JadB2uKam
IL+r6x0hRO7YORNg4L229vb55WvXdg6fenBSHrUHKivHRpk3EzDyQmhkMsy7SMprnI2NKUV5S3n/
scPjOa4JsUBK+U2qeeWID8n8lQIsTLXygTQYAACMra09AkWZJwHzD8Ud4UjmryDl/ML6+rQEL05b
BILS2trmqBCzGfg8XXnmOAnmXVbgh6WNjQfTlWVaQ1CMra09YiGaI4Ht6cw3R3eHj6S8Jl2//F7S
HoPE4fEc77Ra5yI3REwna9ra2+eno80/GV2C0IxfvbrDGQwuRW6yKGWY+XHnhAk/TWWoNxS6L956
Xa5bCagb1WHokiMggbuTneGLF0NW7wMu12TJ/GcIMSJjruvAhxSN3pHM3H6iGHJmkKO+fq/D6bwS
wO+NKC9bkd3euyudweBMIyofMMF1s/Xuu2dDiKdyAakGwsBeJrqn1OMxNBqV4aeGlTY0vFvCPI2B
x6SUo36ftwTCDPzWWVR0idGVD5jsvO2rrp4ETVsFoiVm6jANKV+ExfJgscdj2jR6Rrhwet3ueQAe
I2CG2VqMgIEmJnp4uE0bRpARBgAADFDA7b4+CixPZj9iNsDAXwl4xFlXt2Go7VpGkjEG0AsD5HW7
rxZSPgghFputJ1UkwIL5FSnEqhKPpylTKr6XjDOA/vgqK89hKatBVElAdkVrlvIIE9UiGq0dLDJH
ppDRBtAL19So/lBoPohug5S3QAin2Zpi4IOULwJ4zllR8dbJAZkykawwgP7Ie++1BdraZoP5Oia6
3mxPJJZyDwmxnpnXF3d0bEnULdtsss4ATqb9zjvPiCjKTAJmMdEVBFwE/Y7CDTDwGTFvZ6KtKvO2
dC/PGk3WG8DJMEDeqqpyi6ZNZSEqwFwBogkAyiBlGQtRRkA+AJuU0gZ0n6INIAQpOwC0QIgTEjgu
gGYQ7ado9ECUeXdJY+PfMq0Tlyr/D+l0lC6zEmb0AAAAAElFTkSuQmCC" 
	"web/https/bookmanager/images/bookmanager.png";

	file b64_write "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4woJCiIOJiF6VgAABHVJREFUWMO1l81vFHUYxz+/+c3s
7FKg01LZLu+oXLXxD/DlwsXEg1YIybIzQdPERNQqvehJvBmTEnvDEGe7prEE5WQ0VWNiTDw0So0o
EVEabAnUbXdLSLvbefl52Nl2C52+0PU5zfzmmd/zfd6fR7AGlWybtny+/nxUCHEY6AIOAFbEVgbG
gTFgxHLdYYBSLkfb4OCq94u4D5M9Pew+e5ay46SBD4AsG6NCCH3trnv7Rnc3+y5cWD+Asm1j5fOU
HOeMgNfZBCmlzrTl871lx8Fy3bUB3M1m8TWtA037BdhFc2gSIbqMarXYMjQUD+BuNotvGAdR6hqg
ESpAgaY1A0QQwiEzCK63FAqLh1qj2X1N61gUDsj9abaceBaxNQVBsFkAUoM/PSk7yra9HMBkTw9W
Pk9k9iV1hcB4qovtA71sOdmN1tmOWvAbHAxyp49IqXWDAMasfB4VgVh0QT3gJFABAqXQ96XZcfol
8CKhRoLgj3HmLn5PaewaCcOk891pFn5PMDO8DSHjgegCTARBDXd/m+u+CSBKto0QIg3cEsC3c1W+
2ZokZSbYvechet8+vgSgTobOxMS/DBdGeOv5n7lyLcnAZ63IVQDMzS/wnBfwzBaTiCsdhuGUACg7
TgHISuDD4h1eeOcYDz+SQUiJvr0VVMzFUsLl16D1cdj/CuA3xLYGLMXNr6O/8cV7n/Dqjm3104Ll
urm6v7MNbsf3AzzPx/eDteMaIFTgL4DngecRjl9m4auPwPcXz3wvQCxP+uMAesm2j9JM0iTeD59D
Igl6Erz5WNay4xzRotrePBIawV+XUJW7+D9eXIv7sBY1lqaR9/XHJF9+n2TuNN7ol2CYq7F36VFX
a4LptVrdeOxJyByC0Cf14ilQIUhJTBgf0Bta6ibMDpP/TFAs3q693xxd+nbzJ1SokDK50p+W3hTt
VQ2EEBtt+qBHw0T7ZhGkUklat7fGDzbFyoqJoEeTTPsDq57aB1oS0zRRLVtjuBSl4orpOK5HY9QT
DyY/hIOngJCFmRnmKvNxQ0ncDWM6MAKciA8wEV+KEaBq1bJSqXBndnZFrlAphDBWst+IbrnucNlx
Pl3xR99nbmoK3TSRpolMJGIBZTIZMplMrB6XRq/cd9bmuufrWVCo1+aa0gLRENJBtUpQqQWRTCSQ
ySTSNBdzf30F8j6+wVovyOUIoU+LAAghuHpjnFm/FJtRquZYNN0gCMN1Afj76q1lSgF9M7bdMJDY
dr8mxBvfzVcZ9jx0qdHUEu2HHEsYPJ0yCRsHEoD63F52nEkJu6qAr1RTATRMRBOW6+4NT55EGxhY
skDZcUCIDpS6Fc1u/wcFQBqYru8Ii3a2XBejWi2GSh1aNso0UbgKw0eRcrpxQVnm6JahIcwwvA50
ApNNFD4BpIVhjFvnzi1vovdythQKoFTRct09Cvqb0Kf6LdfdC0zfK3zVPqVsG5HPU3acndFyenyD
sgeBPst1p+oBt8FGWaOZXI72aMUu2/YR1reenweYsW3ao9U+jv4Dpm+4zJz+0DgAAAAASUVORK5C
YII=" 
	"web/https/bookmanager/images/bookmanager_bar.png";

	
} "Return nothing";

app create "https" "bookmanager" "bookmanager" "100";

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