I Love PHPMaker

... because it gets even more powerful and flexible!!

  • About
  • Terms and Conditions
  • Membership Options
  • Sitemap
  • Downloads
    • PHPMaker Extensions Download
    • PHPMaker Projects Download
    • PHP Report Maker Extensions Download
I Love PHPMaker » PHPMaker Extensions » Step by Step to Implement Masino Extensions in a New Project of PHPMaker 10
How to Display Image and Text in List Options, Export Options, and Other Options of Web Applications that Generated by PHPMaker 10.0.1
MasinoFixedWidthSite10, Extension for Almost All Customization in Web Applications that Generated by PHPMaker 10

October 10, 2013

Step by Step to Implement Masino Extensions in a New Project of PHPMaker 10

This tutorial will guide you how to implement Masino Extensions in a new project of PHPMaker version 10 as well as I did for version 9.2.0. When I was writing this article, I have been testing all the extensions for version 10.0.5 (as this is the latest version). Please, make sure you always download the latest version as I recently updated them every day.

Basically, there are no many different steps between version 10 and 9.2.0. However, please note that I will be keep updating this article for the latest version in future, since there must be some differences (such as bugs-fix, new features, and so on) in the future release. So, for simplicity, let's use Version 10 term also for this and the next minor releases.

In this example, again, we will use MySQL as the database. There are some new tables that will be generated so the extension will work properly by running the provided SQL Code below. For simplicity, the tables name in the SQL Code are the same with the default tables name in the extensions' Advanced Setting. So, if you don’t want to use the default new tables name, then you have to change them from the SQL Code below and also from the extensions' Advanced Setting.

There are seven main steps as follow:

  1. Create a new project in PHPMaker 10,
  2. Run the provided SQL to generate some new tables and alter the users table,
  3. Synchronize the database to your PHPMaker 10 project,
  4. Enable the Security feature for your web application from PHPMaker 10,
  5. Enable all of Masino Extensions from PHPMaker 10,
  6. Insert the new custom phrases into the .xml language files,
  7. Re-generate your script files using PHPMaker, as always.

[hidepost]

  1. Create a new project in PHPMaker 10.
  2. Run the following script in order to create some new tables into your database:

    
    SET FOREIGN_KEY_CHECKS=0;
    
    -- ----------------------------
    -- Table structure for announcement
    -- ----------------------------
    DROP TABLE IF EXISTS `announcement`;
    CREATE TABLE `announcement` (
      `Announcement_ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `Is_Active` enum('N','Y') NOT NULL DEFAULT 'N',
      `Topic` varchar(50) NOT NULL,
      `Message` mediumtext NOT NULL,
      `Date_LastUpdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
      `Language` char(2) NOT NULL DEFAULT 'en',
      `Auto_Publish` enum('Y','N') DEFAULT 'N',
      `Date_Start` datetime DEFAULT NULL,
      `Date_End` datetime DEFAULT NULL,
      `Date_Created` datetime DEFAULT NULL,
      `Created_By` varchar(200) DEFAULT NULL,
      `Translated_ID` int(11) DEFAULT NULL,
      PRIMARY KEY (`Announcement_ID`)
    ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
    
    -- ----------------------------
    -- Records of announcement
    -- ----------------------------
    INSERT INTO `announcement` VALUES ('1', 'Y', 'First Announcement (English)', '<p>Please note that this is the <strong>First Announcement</strong> in <strong>English</strong>. This announcement text came from announcement table which also supports for multi-language and auto-publish. Thanks for seeing this! 🙂 <strong><span style=\"background-color: #ffffff; color: #ff00ff;\"><br /></span></strong></p>', '2014-02-06 14:26:46', 'en', 'Y', '2014-02-01 00:00:01', '2014-02-10 23:59:59', '2014-02-06 13:27:51', 'andrew', '2');
    INSERT INTO `announcement` VALUES ('2', 'Y', 'First Announcement (Indonesian)', '<p>Ini teks <strong>Pengumuman </strong>yang<strong> Pertama</strong> dalam <strong>Bahasa Indonesia</strong>. Teks pengumuman ini berasal dari tabel announcement yang mendukung <strong>multi-bahasa</strong> dan <strong>terbit-otomatis</strong> berdasarkan durasi tanggal tertentu. :)</p>', '2014-02-06 14:26:46', 'id', 'Y', '2014-02-01 00:00:01', '2014-02-10 23:59:59', '2014-02-06 13:28:08', 'janet', '1');
    INSERT INTO `announcement` VALUES ('3', 'N', 'Second Announcement (English)', '<p>This is the <strong>Second Announcement</strong> in <strong>English</strong>. This announcement text came from announcement table which also supports for <strong>multi-language</strong> and <strong>auto-publish</strong>.</p>', '2014-02-06 07:09:25', 'en', 'Y', '2014-02-11 00:00:01', '2014-02-20 23:59:59', '2014-02-06 10:57:43', 'nancy', '4');
    INSERT INTO `announcement` VALUES ('4', 'N', 'Second Announcement (Indonesian)', '<p>Ini <strong>Pengumuman</strong> yang <strong>Kedua</strong> dalam <strong>Bahasa Indonesia</strong>.&nbsp;Teks pengumuman ini berasal dari tabel announcement yang mendukung <strong>multi-bahasa</strong> dan <strong>terbit-otomatis</strong> berdasarkan durasi tanggal tertentu. :)</p>', '2014-02-06 07:11:17', 'id', 'Y', '2014-02-11 00:00:01', '2014-02-20 23:59:59', '2014-02-06 13:29:21', 'margaret', '3');
    INSERT INTO `announcement` VALUES ('5', 'N', 'Third Announcement (English)', '<p>This is the third Announcement in English.</p>', '2013-04-12 22:01:31', 'en', 'Y', '2014-08-01 00:00:01', '2014-08-31 23:59:59', '2014-02-06 10:59:24', 'janet', '6');
    INSERT INTO `announcement` VALUES ('6', 'N', 'Third Announcement (Indonesian)', '<p>Ini teks pengumuman yang ketiga dalam bahasa Indonesia.<em><strong><br /></strong></em></p>', '2014-02-06 13:09:52', 'id', 'Y', '2014-08-01 00:00:01', '2014-08-31 23:59:59', '2014-02-06 13:30:06', 'robert', '5');
    INSERT INTO `announcement` VALUES ('7', 'N', 'Fourth Announcement (English)', '<p>This is the fourth announcement in English.</p>', '2014-02-06 11:02:38', 'en', 'Y', '2014-05-01 00:00:01', '2014-05-31 23:59:59', '2014-02-06 10:21:35', 'margaret', '8');
    INSERT INTO `announcement` VALUES ('8', 'N', 'Fourth Announcement (Indonesian)', '<p>Ini adalah teks pengumuman yang keempat (dalam bahasa Indonesia).</p>', '2014-02-06 09:45:17', 'id', 'Y', '2014-05-01 00:00:01', '2014-05-31 23:59:59', '2014-02-06 11:06:20', 'janet', '7');
    INSERT INTO `announcement` VALUES ('9', 'N', 'Fifth Announcement (English)', '<p>This is the fifth announcement in English.</p>', '2014-02-05 20:01:14', 'en', 'Y', '2014-06-01 00:00:01', '2014-06-30 23:59:59', '2014-02-05 19:47:24', 'andrew', '10');
    INSERT INTO `announcement` VALUES ('10', 'N', 'Fifth Announcement (Indonesian)', '<p>Sedangkan yang ini adalah pengumuman yang kelima dalam bahasa Indonesia.</p>', '2014-02-05 20:01:14', 'id', 'Y', '2014-06-01 00:00:01', '2014-06-30 23:59:59', '2014-02-05 19:47:24', 'andrew', '9');
    
    -- ----------------------------
    -- Table structure for `breadcrumblinks`
    -- ----------------------------
    DROP TABLE IF EXISTS `breadcrumblinks`;
    CREATE TABLE `breadcrumblinks` (
      `Page_Title` varchar(100) NOT NULL,
      `Page_URL` varchar(100) NOT NULL,
      `Lft` int(4) NOT NULL,
      `Rgt` int(4) NOT NULL,
      PRIMARY KEY (`Page_Title`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    
    -- ----------------------------
    -- Table structure for `help`
    -- ----------------------------
    DROP TABLE IF EXISTS `help`;
    CREATE TABLE `help` (
      `Help_ID` int(11) NOT NULL,
      `Language` char(2) NOT NULL,
      `Topic` varchar(255) NOT NULL,
      `Description` longtext NOT NULL,
      `Category` int(11) NOT NULL,
      `Order` int(11) NOT NULL,
      `Display_in_Page` varchar(100) NOT NULL,
      `Updated_By` varchar(20) DEFAULT NULL,
      `Last_Updated` datetime DEFAULT NULL,
      PRIMARY KEY (`Help_ID`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    
    -- ----------------------------
    -- Table structure for `help_categories`
    -- ----------------------------
    DROP TABLE IF EXISTS `help_categories`;
    CREATE TABLE `help_categories` (
      `Category_ID` int(11) NOT NULL,
      `Language` char(2) NOT NULL,
      `Category_Description` varchar(100) NOT NULL,
      PRIMARY KEY (`Category_ID`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    
    -- ----------------------------
    -- Table structure for `languages`
    -- ----------------------------
    DROP TABLE IF EXISTS `languages`;
    CREATE TABLE `languages` (
      `Language_Code` char(2) NOT NULL,
      `Language_Name` varchar(20) NOT NULL,
      `Default` enum('Y','N') DEFAULT 'N',
      `Site_Logo` varchar(100) NOT NULL,
      `Site_Title` varchar(100) NOT NULL,
      `Default_Thousands_Separator` varchar(5) DEFAULT NULL,
      `Default_Decimal_Point` varchar(5) DEFAULT NULL,
      `Default_Currency_Symbol` varchar(10) DEFAULT NULL,
      `Default_Money_Thousands_Separator` varchar(5) DEFAULT NULL,
      `Default_Money_Decimal_Point` varchar(5) DEFAULT NULL,
      `Terms_And_Condition_Text` text NOT NULL,
      `Announcement_Text` text NOT NULL,
      `About_Text` text NOT NULL,
      PRIMARY KEY (`Language_Code`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of languages
    -- ----------------------------
    INSERT INTO `languages` VALUES ('en', 'English', 'Y', '-', 'PHPMaker Demo Project', ',', '.', '$', ',', '.', 'This is the terms and conditions text from database. You can edit this text from the languages table ...', 'This is the announcement text from database. You can edit this text from the languages table ...', '<span class=\'dialogtitle\' style=\'white-space: nowrap;\'>Your Application Title goes here, version 1.0</span><br><br>Your application description line one goes here ... <br><br>Your application description line two goes here ... <br><br><br>Web Developer:<br></span>Masino Sinaga (masino.sinaga@gmail.com)<br>You can edit this text from the languages table,<br>... <br>... <br>');
    INSERT INTO `languages` VALUES ('id', 'Indonesia', 'N', '-', 'PHPMaker Proyek Demo', '.', ',', 'Rp', '.', ',', 'Ini teks syarat dan ketentuan dari database. Anda dapat mengubah teks ini dari tabel languages ... ', 'Ini teks pengumuman dari database. Anda dapat mengubah teks ini dari tabel languages ...', '<span class=\'dialogtitle\' style=\'white-space: nowrap;\'>Judul Aplikasi Anda di sini, versi 1.0</span><br><br>Deskripsi aplikasi baris pertama Anda di sini ... <br><br>Deskripsi aplikasi baris kedua Anda di sini ... <br><br><br>Web Developer:<br></span>Masino Sinaga (masino.sinaga@gmail.com)<br>Anda dapat mengubah teks ini dari tabel languages,<br>... <br>... <br>');
    
    -- ----------------------------
    -- Table structure for `settings`
    -- ----------------------------
    DROP TABLE IF EXISTS `settings`;
    CREATE TABLE `settings` (
      `Option_ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
      `Option_Default` enum('Y','N') DEFAULT 'N',
      `Default_Theme` varchar(30) DEFAULT NULL,
      `Menu_Horizontal` enum('Y','N') DEFAULT 'Y',
      `Vertical_Menu_Width` int(3) NOT NULL DEFAULT '150',
      `Show_Border_Layout` enum('N','Y') DEFAULT 'Y',
      `Show_Shadow_Layout` enum('N','Y') DEFAULT 'Y',
      `Show_Announcement` enum('Y','N') NOT NULL DEFAULT 'N',
      `Demo_Mode` enum('N','Y') DEFAULT 'N',
      `Show_Page_Processing_Time` enum('Y','N') DEFAULT 'N',
      `Allow_User_Preferences` enum('N','Y') DEFAULT 'Y',
      `SMTP_Server` varchar(50) DEFAULT NULL,
      `SMTP_Server_Port` varchar(5) DEFAULT NULL,
      `SMTP_Server_Username` varchar(50) DEFAULT NULL,
      `SMTP_Server_Password` varchar(50) DEFAULT NULL,
      `Sender_Email` varchar(50) DEFAULT NULL,
      `Recipient_Email` varchar(50) DEFAULT NULL,
      `Use_Default_Locale` enum('Y','N') DEFAULT 'Y',
      `Default_Language` varchar(5) DEFAULT NULL,
      `Default_Timezone` varchar(50) DEFAULT NULL,
      `Default_Thousands_Separator` varchar(5) DEFAULT NULL,
      `Default_Decimal_Point` varchar(5) DEFAULT NULL,
      `Default_Currency_Symbol` varchar(10) DEFAULT NULL,
      `Default_Money_Thousands_Separator` varchar(5) DEFAULT NULL,
      `Default_Money_Decimal_Point` varchar(5) DEFAULT NULL,
      `Maintenance_Mode` enum('N','Y') DEFAULT 'N',
      `Maintenance_Finish_DateTime` datetime DEFAULT NULL,
      `Auto_Normal_After_Maintenance` enum('Y','N') DEFAULT 'Y',
      `Allow_User_To_Register` enum('Y','N') DEFAULT 'Y',
      `Suspend_New_User_Account` enum('N','Y') DEFAULT 'N',
      `User_Need_Activation_After_Registered` enum('Y','N') DEFAULT 'Y',
      `Show_Captcha_On_Registration_Page` enum('Y','N') NOT NULL DEFAULT 'N',
      `Show_Terms_And_Conditions_On_Registration_Page` enum('Y','N') NOT NULL DEFAULT 'Y',
      `Show_Captcha_On_Login_Page` enum('N','Y') DEFAULT 'N',
      `Show_Captcha_On_Forgot_Password_Page` enum('N','Y') DEFAULT 'N',
      `Show_Captcha_On_Change_Password_Page` enum('N','Y') DEFAULT 'N',
      `User_Auto_Login_After_Activation_Or_Registration` enum('Y','N') DEFAULT 'Y',
      `User_Auto_Logout_After_Idle_In_Minutes` int(3) DEFAULT '20',
      `User_Login_Maximum_Retry` int(3) DEFAULT '3',
      `User_Login_Retry_Lockout` int(3) DEFAULT '5',
      `Redirect_To_Last_Visited_Page_After_Login` enum('Y','N') NOT NULL DEFAULT 'Y',
      `Enable_Password_Expiry` enum('Y','N') DEFAULT 'Y',
      `Password_Expiry_In_Days` int(3) DEFAULT '90',
      `Show_Entire_Header` enum('Y','N') DEFAULT 'Y',
      `Logo_Width` int(3) NOT NULL DEFAULT '170',
      `Show_Site_Title_In_Header` enum('Y','N') DEFAULT 'Y',
      `Show_Current_User_In_Header` enum('Y','N') DEFAULT 'Y',
      `Text_Align_In_Header` enum('left','center','right') DEFAULT 'left',
      `Site_Title_Text_Style` enum('normal','capitalize','uppercase') DEFAULT 'normal',
      `Language_Selector_Visibility` enum('inheader','belowheader','hidethemall') DEFAULT 'inheader',
      `Language_Selector_Align` enum('autoadjust','left','center','right') NOT NULL DEFAULT 'autoadjust',
      `Show_Entire_Footer` enum('Y','N') DEFAULT 'Y',
      `Show_Text_In_Footer` enum('Y','N') DEFAULT 'Y',
      `Show_Back_To_Top_On_Footer` enum('N','Y') DEFAULT 'Y',
      `Show_Terms_And_Conditions_On_Footer` enum('Y','N') NOT NULL DEFAULT 'Y',
      `Show_About_Us_On_Footer` enum('N','Y') DEFAULT 'Y',
      `Pagination_Position` enum('1','2','3') DEFAULT '3',
      `Pagination_Style` enum('1','2') DEFAULT '2',
      `Selectable_Records_Per_Page` varchar(50) DEFAULT '1,2,3,5,10,15,20,50',
      `Selectable_Groups_Per_Page` varchar(50) DEFAULT '1,2,3,5,10',
      `Default_Record_Per_Page` int(3) DEFAULT '10',
      `Default_Group_Per_Page` int(3) DEFAULT '3',
      `Maximum_Selected_Records` int(3) DEFAULT '50',
      `Maximum_Selected_Groups` int(3) DEFAULT '50',
      `Show_PageNum_If_Record_Not_Over_Pagesize` enum('Y','N') DEFAULT 'Y',
      `Table_Width_Style` enum('1','2','3') DEFAULT '1' COMMENT '1 = Scroll, 2 = Normal, 3 = 100%',
      `Scroll_Table_Width` int(4) DEFAULT '800',
      `Scroll_Table_Height` int(4) DEFAULT '300',
      `Show_Record_Number_On_List_Page` enum('N','Y') DEFAULT 'Y',
      `Show_Empty_Table_On_List_Page` enum('N','Y') DEFAULT 'Y',
      `Search_Panel_Collapsed` enum('Y','N') DEFAULT 'Y',
      `Filter_Panel_Collapsed` enum('Y','N') DEFAULT 'Y',
      `Rows_Vertical_Align_Top` enum('N','Y') DEFAULT 'Y',
      `Show_Add_Success_Message` enum('N','Y') DEFAULT 'Y',
      `Show_Edit_Success_Message` enum('N','Y') DEFAULT 'Y',
      `jQuery_Auto_Hide_Success_Message` enum('N','Y') DEFAULT 'N',
      `Show_Record_Number_On_Detail_Preview` enum('N','Y') DEFAULT 'Y',
      `Show_Empty_Table_In_Detail_Preview` enum('N','Y') DEFAULT 'Y',
      `Detail_Preview_Table_Width` int(3) DEFAULT '100',
      `Password_Minimum_Length` int(2) DEFAULT '6',
      `Password_Maximum_Length` int(2) DEFAULT '20',
      `Password_Must_Comply_With_Minumum_Length` enum('N','Y') DEFAULT 'Y',
      `Password_Must_Comply_With_Maximum_Length` enum('N','Y') DEFAULT 'Y',
      `Password_Must_Contain_At_Least_One_Lower_Case` enum('N','Y') DEFAULT 'Y',
      `Password_Must_Contain_At_Least_One_Upper_Case` enum('N','Y') DEFAULT 'Y',
      `Password_Must_Contain_At_Least_One_Numeric` enum('N','Y') DEFAULT 'Y',
      `Password_Must_Contain_At_Least_One_Symbol` enum('N','Y') DEFAULT 'Y',
      `Password_Must_Be_Difference_Between_Old_And_New` enum('N','Y') DEFAULT 'Y',
      `Export_Record_Options` enum('selectedrecords','currentpage','allpages') DEFAULT 'selectedrecords',
      `Show_Record_Number_On_Exported_List_Page` enum('N','Y') DEFAULT 'Y',
      `Use_Table_Setting_For_Export_Field_Caption` enum('N','Y') DEFAULT 'Y',
      `Use_Table_Setting_For_Export_Original_Value` enum('N','Y') DEFAULT 'Y',
      `Font_Name` varchar(50) DEFAULT 'arial', 
      `Font_Size` varchar(4) DEFAULT '13px',
      `Use_Javascript_Message` enum('1','0') DEFAULT '1',
      `Login_Window_Type` enum('popup','default') DEFAULT 'popup',
      `Forgot_Password_Window_Type` enum('popup','default') DEFAULT 'popup',
      `Change_Password_Window_Type` enum('popup','default') DEFAULT 'popup',
      `Registration_Window_Type` enum('popup','default') DEFAULT 'popup',
      `Reset_Password_Field_Options` enum('EmailOrUsername','Username','Email') DEFAULT 'EmailOrUsername',
      `Action_Button_Alignment` enum('Right','Left') DEFAULT 'Right',
      PRIMARY KEY (`Option_ID`)
    ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
    -- ----------------------------
    -- Records of settings
    -- ----------------------------
    INSERT INTO `settings` VALUES ('1', 'Y', 'theme-gray.css', 'Y', '150', 'N', 'N', 'N', 'Y', 'N', 'Y', 'mail.posindonesia.co.id', '25', 'masino_sinaga@posindonesia.co.id', null, 'masino_sinaga@posindonesia.co.id', 'masino_sinaga@posindonesia.co.id', 'Y', 'id', 'Asia/Jakarta', '.', ',', 'Rp&nbsp;', '.', ',', 'N', '2013-11-12 00:00:00', 'Y', 'Y', 'N', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'Y', '15', '2', '1', 'Y', 'Y', '30', 'Y', '480', 'Y', 'Y', 'left', 'normal', 'inheader', 'autoadjust', 'Y', 'Y', 'Y', 'Y', 'Y', '3', '2', '1,2,3,5,7,10,15,20,50,100,500,1000', '1,2,3,4,5,10', '10', '3', '50', '5', 'N', '2', '1200', '400', 'Y', 'Y', 'Y', 'N', 'Y', 'Y', 'Y', 'N', 'Y', 'Y', '0', '4', '20', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'currentpage', 'Y', 'Y', 'Y', 'arial', '13px', '1', 'popup', 'popup', 'popup', 'popup', 'EmailOrUsername', 'Right');
    
    
    -- ----------------------------
    -- Table structure for `stats_counter`
    -- ----------------------------
    DROP TABLE IF EXISTS `stats_counter`;
    CREATE TABLE `stats_counter` (
      `Type` varchar(50) NOT NULL DEFAULT '',
      `Variable` varchar(50) NOT NULL DEFAULT '',
      `Counter` int(10) unsigned NOT NULL DEFAULT '0',
      PRIMARY KEY (`Type`,`Variable`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of stats_counter
    -- ----------------------------
    INSERT INTO `stats_counter` VALUES ('total', 'hits', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'WebTV', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'Lynx', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'MSIE', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'Opera', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'Konqueror', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'Netscape', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'FireFox', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'Bot', '0');
    INSERT INTO `stats_counter` VALUES ('browser', 'Other', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'Windows', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'Linux', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'Mac', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'FreeBSD', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'SunOS', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'IRIX', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'BeOS', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'OS/2', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'AIX', '0');
    INSERT INTO `stats_counter` VALUES ('os', 'Other', '0');
    
    -- ----------------------------
    -- Table structure for `stats_counterlog`
    -- ----------------------------
    DROP TABLE IF EXISTS `stats_counterlog`;
    CREATE TABLE `stats_counterlog` (
      `IP_Address` varchar(50) NOT NULL DEFAULT '',
      `Hostname` varchar(50) DEFAULT NULL,
      `First_Visit` datetime NOT NULL,
      `Last_Visit` datetime NOT NULL,
      `Counter` int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (`IP_Address`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of stats_counterlog
    -- ----------------------------
    
    -- ----------------------------
    -- Table structure for `stats_date`
    -- ----------------------------
    DROP TABLE IF EXISTS `stats_date`;
    CREATE TABLE `stats_date` (
      `Year` smallint(6) NOT NULL DEFAULT '0',
      `Month` tinyint(4) NOT NULL DEFAULT '0',
      `Date` tinyint(4) NOT NULL DEFAULT '0',
      `Hits` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`Date`,`Month`,`Year`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of stats_date
    -- ----------------------------
    
    -- ----------------------------
    -- Table structure for `stats_hour`
    -- ----------------------------
    DROP TABLE IF EXISTS `stats_hour`;
    CREATE TABLE `stats_hour` (
      `Year` smallint(6) NOT NULL DEFAULT '0',
      `Month` tinyint(4) NOT NULL DEFAULT '0',
      `Date` tinyint(4) NOT NULL DEFAULT '0',
      `Hour` tinyint(4) NOT NULL DEFAULT '0',
      `Hits` int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (`Date`,`Hour`,`Month`,`Year`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of stats_hour
    -- ----------------------------
    
    -- ----------------------------
    -- Table structure for `stats_month`
    -- ----------------------------
    DROP TABLE IF EXISTS `stats_month`;
    CREATE TABLE `stats_month` (
      `Year` smallint(6) NOT NULL DEFAULT '0',
      `Month` tinyint(4) NOT NULL DEFAULT '0',
      `Hits` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`Year`,`Month`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of stats_month
    -- ----------------------------
    
    -- ----------------------------
    -- Table structure for `stats_year`
    -- ----------------------------
    DROP TABLE IF EXISTS `stats_year`;
    CREATE TABLE `stats_year` (
      `Year` smallint(6) NOT NULL DEFAULT '0',
      `Hits` bigint(20) NOT NULL DEFAULT '0',
      PRIMARY KEY (`Year`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of stats_year
    -- ----------------------------
    
    -- ----------------------------
    -- Table structure for `themes`
    -- ----------------------------
    DROP TABLE IF EXISTS `themes`;
    CREATE TABLE `themes` (
      `Theme_ID` varchar(25) NOT NULL,
      `Theme_Name` varchar(25) NOT NULL,
      `Default` enum('Y','N') NOT NULL DEFAULT 'N',
      PRIMARY KEY (`Theme_ID`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of themes
    -- ----------------------------
    INSERT INTO `themes` VALUES ('theme-blue.css', 'Blue', 'N');
    INSERT INTO `themes` VALUES ('theme-dark.css', 'Dark', 'N');
    INSERT INTO `themes` VALUES ('theme-darkglass.css', 'Dark Glass', 'N');
    INSERT INTO `themes` VALUES ('theme-glass.css', 'Glass', 'N');
    INSERT INTO `themes` VALUES ('theme-green.css', 'Green', 'N');
    INSERT INTO `themes` VALUES ('theme-maroon.css', 'Maroon', 'N');
    INSERT INTO `themes` VALUES ('theme-olive.css', 'Olive', 'N');
    INSERT INTO `themes` VALUES ('theme-professional.css', 'Professional', 'N');
    INSERT INTO `themes` VALUES ('theme-purple.css', 'Purple', 'N');
    INSERT INTO `themes` VALUES ('theme-red.css', 'Red', 'N');
    INSERT INTO `themes` VALUES ('theme-sand.css', 'Sand', 'N');
    INSERT INTO `themes` VALUES ('theme-silver.css', 'Silver', 'N');
    INSERT INTO `themes` VALUES ('theme-default.css', 'Default', 'Y');
    INSERT INTO `themes` VALUES ('theme-black.css', 'Black', 'N');
    INSERT INTO `themes` VALUES ('theme-gray.css', 'Gray', 'N');
    INSERT INTO `themes` VALUES ('theme-white.cs', 'White', 'N');
    INSERT INTO `themes` VALUES ('theme-black9pt.css', 'Black (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-blue9pt.css', 'Blue (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-dark9pt.css', 'Dark (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-darkglass9pt.css', 'Dark Glass (Big Font', 'N');
    INSERT INTO `themes` VALUES ('theme-glass9pt.css', 'Glass (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-green9pt.css', 'Green (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-gray9pt.css', 'Gray (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-default9pt.css', 'Default (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-maroon9pt.css', 'Maroon (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-professional9pt.css', 'Professional (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-red9pt.css', 'Red (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-sand9pt.css', 'Sand (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-silver9pt.css', 'Silver (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-white9pt.css', 'White (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-purple9pt.css', 'Purple (Big Font)', 'N');
    INSERT INTO `themes` VALUES ('theme-olive9pt.css', 'Olive (Big Font)', 'N');
    
    -- ----------------------------
    -- Table structure for `timezone`
    -- ----------------------------
    DROP TABLE IF EXISTS `timezone`;
    CREATE TABLE `timezone` (
      `Timezone` varchar(50) NOT NULL,
      `Default` enum('Y','N') NOT NULL DEFAULT 'N',
      PRIMARY KEY (`Timezone`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- ----------------------------
    -- Records of timezone
    -- ----------------------------
    INSERT INTO `timezone` VALUES ('Africa/Abidjan', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Accra', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Addis_Ababa', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Algiers', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Asmara', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Asmera', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Bamako', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Bangui', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Banjul', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Bissau', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Blantyre', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Brazzaville', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Bujumbura', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Cairo', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Casablanca', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Ceuta', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Conakry', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Dakar', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Dar_es_Salaam', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Djibouti', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Douala', 'N');
    INSERT INTO `timezone` VALUES ('Africa/El_Aaiun', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Freetown', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Gaborone', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Harare', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Johannesburg', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Kampala', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Khartoum', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Kigali', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Kinshasa', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Lagos', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Libreville', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Lome', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Luanda', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Lubumbashi', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Lusaka', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Malabo', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Maputo', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Maseru', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Mbabane', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Mogadishu', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Monrovia', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Nairobi', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Ndjamena', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Niamey', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Nouakchott', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Ouagadougou', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Porto-Novo', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Sao_Tome', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Timbuktu', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Tripoli', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Tunis', 'N');
    INSERT INTO `timezone` VALUES ('Africa/Windhoek', 'N');
    INSERT INTO `timezone` VALUES ('America/Adak', 'N');
    INSERT INTO `timezone` VALUES ('America/Anchorage', 'N');
    INSERT INTO `timezone` VALUES ('America/Anguilla', 'N');
    INSERT INTO `timezone` VALUES ('America/Antigua', 'N');
    INSERT INTO `timezone` VALUES ('America/Araguaina', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Buenos_Aires', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Catamarca', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/ComodRivadavia', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Cordoba', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Jujuy', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/La_Rioja', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Mendoza', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Rio_Gallegos', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Salta', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/San_Juan', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/San_Luis', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Tucuman', 'N');
    INSERT INTO `timezone` VALUES ('America/Argentina/Ushuaia', 'N');
    INSERT INTO `timezone` VALUES ('America/Aruba', 'N');
    INSERT INTO `timezone` VALUES ('America/Asuncion', 'N');
    INSERT INTO `timezone` VALUES ('America/Atikokan', 'N');
    INSERT INTO `timezone` VALUES ('America/Atka', 'N');
    INSERT INTO `timezone` VALUES ('America/Bahia', 'N');
    INSERT INTO `timezone` VALUES ('America/Bahia_Banderas', 'N');
    INSERT INTO `timezone` VALUES ('America/Barbados', 'N');
    INSERT INTO `timezone` VALUES ('America/Belem', 'N');
    INSERT INTO `timezone` VALUES ('America/Belize', 'N');
    INSERT INTO `timezone` VALUES ('America/Blanc-Sablon', 'N');
    INSERT INTO `timezone` VALUES ('America/Boa_Vista', 'N');
    INSERT INTO `timezone` VALUES ('America/Bogota', 'N');
    INSERT INTO `timezone` VALUES ('America/Boise', 'N');
    INSERT INTO `timezone` VALUES ('America/Buenos_Aires', 'N');
    INSERT INTO `timezone` VALUES ('America/Cambridge_Bay', 'N');
    INSERT INTO `timezone` VALUES ('America/Campo_Grande', 'N');
    INSERT INTO `timezone` VALUES ('America/Cancun', 'N');
    INSERT INTO `timezone` VALUES ('America/Caracas', 'N');
    INSERT INTO `timezone` VALUES ('America/Catamarca', 'N');
    INSERT INTO `timezone` VALUES ('America/Cayenne', 'N');
    INSERT INTO `timezone` VALUES ('America/Cayman', 'N');
    INSERT INTO `timezone` VALUES ('America/Chicago', 'N');
    INSERT INTO `timezone` VALUES ('America/Chihuahua', 'N');
    INSERT INTO `timezone` VALUES ('America/Coral_Harbour', 'N');
    INSERT INTO `timezone` VALUES ('America/Cordoba', 'N');
    INSERT INTO `timezone` VALUES ('America/Costa_Rica', 'N');
    INSERT INTO `timezone` VALUES ('America/Cuiaba', 'N');
    INSERT INTO `timezone` VALUES ('America/Curacao', 'N');
    INSERT INTO `timezone` VALUES ('America/Danmarkshavn', 'N');
    INSERT INTO `timezone` VALUES ('America/Dawson', 'N');
    INSERT INTO `timezone` VALUES ('America/Dawson_Creek', 'N');
    INSERT INTO `timezone` VALUES ('America/Denver', 'N');
    INSERT INTO `timezone` VALUES ('America/Detroit', 'N');
    INSERT INTO `timezone` VALUES ('America/Dominica', 'N');
    INSERT INTO `timezone` VALUES ('America/Edmonton', 'N');
    INSERT INTO `timezone` VALUES ('America/Eirunepe', 'N');
    INSERT INTO `timezone` VALUES ('America/El_Salvador', 'N');
    INSERT INTO `timezone` VALUES ('America/Ensenada', 'N');
    INSERT INTO `timezone` VALUES ('America/Fort_Wayne', 'N');
    INSERT INTO `timezone` VALUES ('America/Fortaleza', 'N');
    INSERT INTO `timezone` VALUES ('America/Glace_Bay', 'N');
    INSERT INTO `timezone` VALUES ('America/Godthab', 'N');
    INSERT INTO `timezone` VALUES ('America/Goose_Bay', 'N');
    INSERT INTO `timezone` VALUES ('America/Grand_Turk', 'N');
    INSERT INTO `timezone` VALUES ('America/Grenada', 'N');
    INSERT INTO `timezone` VALUES ('America/Guadeloupe', 'N');
    INSERT INTO `timezone` VALUES ('America/Guatemala', 'N');
    INSERT INTO `timezone` VALUES ('America/Guayaquil', 'N');
    INSERT INTO `timezone` VALUES ('America/Guyana', 'N');
    INSERT INTO `timezone` VALUES ('America/Halifax', 'N');
    INSERT INTO `timezone` VALUES ('America/Havana', 'N');
    INSERT INTO `timezone` VALUES ('America/Hermosillo', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Indianapolis', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Knox', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Marengo', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Petersburg', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Tell_City', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Vevay', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Vincennes', 'N');
    INSERT INTO `timezone` VALUES ('America/Indiana/Winamac', 'N');
    INSERT INTO `timezone` VALUES ('America/Indianapolis', 'N');
    INSERT INTO `timezone` VALUES ('America/Inuvik', 'N');
    INSERT INTO `timezone` VALUES ('America/Iqaluit', 'N');
    INSERT INTO `timezone` VALUES ('America/Jamaica', 'N');
    INSERT INTO `timezone` VALUES ('America/Jujuy', 'N');
    INSERT INTO `timezone` VALUES ('America/Juneau', 'N');
    INSERT INTO `timezone` VALUES ('America/Kentucky/Louisville', 'N');
    INSERT INTO `timezone` VALUES ('America/Kentucky/Monticello', 'N');
    INSERT INTO `timezone` VALUES ('America/Knox_IN', 'N');
    INSERT INTO `timezone` VALUES ('America/La_Paz', 'N');
    INSERT INTO `timezone` VALUES ('America/Lima', 'N');
    INSERT INTO `timezone` VALUES ('America/Los_Angeles', 'N');
    INSERT INTO `timezone` VALUES ('America/Louisville', 'N');
    INSERT INTO `timezone` VALUES ('America/Maceio', 'N');
    INSERT INTO `timezone` VALUES ('America/Managua', 'N');
    INSERT INTO `timezone` VALUES ('America/Manaus', 'N');
    INSERT INTO `timezone` VALUES ('America/Marigot', 'N');
    INSERT INTO `timezone` VALUES ('America/Martinique', 'N');
    INSERT INTO `timezone` VALUES ('America/Matamoros', 'N');
    INSERT INTO `timezone` VALUES ('America/Mazatlan', 'N');
    INSERT INTO `timezone` VALUES ('America/Mendoza', 'N');
    INSERT INTO `timezone` VALUES ('America/Menominee', 'N');
    INSERT INTO `timezone` VALUES ('America/Merida', 'N');
    INSERT INTO `timezone` VALUES ('America/Mexico_City', 'N');
    INSERT INTO `timezone` VALUES ('America/Miquelon', 'N');
    INSERT INTO `timezone` VALUES ('America/Moncton', 'N');
    INSERT INTO `timezone` VALUES ('America/Monterrey', 'N');
    INSERT INTO `timezone` VALUES ('America/Montevideo', 'N');
    INSERT INTO `timezone` VALUES ('America/Montreal', 'N');
    INSERT INTO `timezone` VALUES ('America/Montserrat', 'N');
    INSERT INTO `timezone` VALUES ('America/Nassau', 'N');
    INSERT INTO `timezone` VALUES ('America/New_York', 'N');
    INSERT INTO `timezone` VALUES ('America/Nipigon', 'N');
    INSERT INTO `timezone` VALUES ('America/Nome', 'N');
    INSERT INTO `timezone` VALUES ('America/Noronha', 'N');
    INSERT INTO `timezone` VALUES ('America/North_Dakota/Center', 'N');
    INSERT INTO `timezone` VALUES ('America/North_Dakota/New_Salem', 'N');
    INSERT INTO `timezone` VALUES ('America/Ojinaga', 'N');
    INSERT INTO `timezone` VALUES ('America/Panama', 'N');
    INSERT INTO `timezone` VALUES ('America/Pangnirtung', 'N');
    INSERT INTO `timezone` VALUES ('America/Paramaribo', 'N');
    INSERT INTO `timezone` VALUES ('America/Phoenix', 'N');
    INSERT INTO `timezone` VALUES ('America/Port-au-Prince', 'N');
    INSERT INTO `timezone` VALUES ('America/Port_of_Spain', 'N');
    INSERT INTO `timezone` VALUES ('America/Porto_Acre', 'N');
    INSERT INTO `timezone` VALUES ('America/Porto_Velho', 'N');
    INSERT INTO `timezone` VALUES ('America/Puerto_Rico', 'N');
    INSERT INTO `timezone` VALUES ('America/Rainy_River', 'N');
    INSERT INTO `timezone` VALUES ('America/Rankin_Inlet', 'N');
    INSERT INTO `timezone` VALUES ('America/Recife', 'N');
    INSERT INTO `timezone` VALUES ('America/Regina', 'N');
    INSERT INTO `timezone` VALUES ('America/Resolute', 'N');
    INSERT INTO `timezone` VALUES ('America/Rio_Branco', 'N');
    INSERT INTO `timezone` VALUES ('America/Rosario', 'N');
    INSERT INTO `timezone` VALUES ('America/Santa_Isabel', 'N');
    INSERT INTO `timezone` VALUES ('America/Santarem', 'N');
    INSERT INTO `timezone` VALUES ('America/Santiago', 'N');
    INSERT INTO `timezone` VALUES ('America/Santo_Domingo', 'N');
    INSERT INTO `timezone` VALUES ('America/Sao_Paulo', 'N');
    INSERT INTO `timezone` VALUES ('America/Scoresbysund', 'N');
    INSERT INTO `timezone` VALUES ('America/Shiprock', 'N');
    INSERT INTO `timezone` VALUES ('America/St_Barthelemy', 'N');
    INSERT INTO `timezone` VALUES ('America/St_Johns', 'N');
    INSERT INTO `timezone` VALUES ('America/St_Kitts', 'N');
    INSERT INTO `timezone` VALUES ('America/St_Lucia', 'N');
    INSERT INTO `timezone` VALUES ('America/St_Thomas', 'N');
    INSERT INTO `timezone` VALUES ('America/St_Vincent', 'N');
    INSERT INTO `timezone` VALUES ('America/Swift_Current', 'N');
    INSERT INTO `timezone` VALUES ('America/Tegucigalpa', 'N');
    INSERT INTO `timezone` VALUES ('America/Thule', 'N');
    INSERT INTO `timezone` VALUES ('America/Thunder_Bay', 'N');
    INSERT INTO `timezone` VALUES ('America/Tijuana', 'N');
    INSERT INTO `timezone` VALUES ('America/Toronto', 'N');
    INSERT INTO `timezone` VALUES ('America/Tortola', 'N');
    INSERT INTO `timezone` VALUES ('America/Vancouver', 'N');
    INSERT INTO `timezone` VALUES ('America/Virgin', 'N');
    INSERT INTO `timezone` VALUES ('America/Whitehorse', 'N');
    INSERT INTO `timezone` VALUES ('America/Winnipeg', 'N');
    INSERT INTO `timezone` VALUES ('America/Yakutat', 'N');
    INSERT INTO `timezone` VALUES ('America/Yellowknife', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Casey', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Davis', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/DumontDUrville', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Macquarie', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Mawson', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/McMurdo', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Palmer', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Rothera', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/South_Pole', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Syowa', 'N');
    INSERT INTO `timezone` VALUES ('Antarctica/Vostok', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Aden', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Almaty', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Amman', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Anadyr', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Aqtau', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Aqtobe', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Ashgabat', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Ashkhabad', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Baghdad', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Bahrain', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Baku', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Bangkok', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Beirut', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Bishkek', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Brunei', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Calcutta', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Choibalsan', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Chongqing', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Chungking', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Colombo', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Dacca', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Damascus', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Dhaka', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Dili', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Dubai', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Dushanbe', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Gaza', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Harbin', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Ho_Chi_Minh', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Hong_Kong', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Hovd', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Irkutsk', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Istanbul', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Jakarta', 'Y');
    INSERT INTO `timezone` VALUES ('Asia/Jayapura', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Jerusalem', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kabul', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kamchatka', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Karachi', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kashgar', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kathmandu', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Katmandu', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kolkata', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Krasnoyarsk', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kuala_Lumpur', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kuching', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Kuwait', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Macao', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Macau', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Magadan', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Makassar', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Manila', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Muscat', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Nicosia', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Novokuznetsk', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Novosibirsk', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Omsk', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Oral', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Phnom_Penh', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Pontianak', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Pyongyang', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Qatar', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Qyzylorda', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Rangoon', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Riyadh', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Saigon', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Sakhalin', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Samarkand', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Seoul', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Shanghai', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Singapore', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Taipei', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Tashkent', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Tbilisi', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Tehran', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Tel_Aviv', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Thimbu', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Thimphu', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Tokyo', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Ujung_Pandang', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Ulaanbaatar', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Ulan_Bator', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Urumqi', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Vientiane', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Vladivostok', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Yakutsk', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Yekaterinburg', 'N');
    INSERT INTO `timezone` VALUES ('Asia/Yerevan', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Azores', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Bermuda', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Canary', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Cape_Verde', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Faeroe', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Faroe', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Jan_Mayen', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Madeira', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Reykjavik', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/South_Georgia', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/St_Helena', 'N');
    INSERT INTO `timezone` VALUES ('Atlantic/Stanley', 'N');
    INSERT INTO `timezone` VALUES ('Australia/ACT', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Adelaide', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Brisbane', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Broken_Hill', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Canberra', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Currie', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Darwin', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Eucla', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Hobart', 'N');
    INSERT INTO `timezone` VALUES ('Australia/LHI', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Lindeman', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Lord_Howe', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Melbourne', 'N');
    INSERT INTO `timezone` VALUES ('Australia/North', 'N');
    INSERT INTO `timezone` VALUES ('Australia/NSW', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Perth', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Queensland', 'N');
    INSERT INTO `timezone` VALUES ('Australia/South', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Sydney', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Tasmania', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Victoria', 'N');
    INSERT INTO `timezone` VALUES ('Australia/West', 'N');
    INSERT INTO `timezone` VALUES ('Australia/Yancowinna', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Amsterdam', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Andorra', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Athens', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Belfast', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Belgrade', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Berlin', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Bratislava', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Brussels', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Bucharest', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Budapest', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Chisinau', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Copenhagen', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Dublin', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Gibraltar', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Guernsey', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Helsinki', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Isle_of_Man', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Istanbul', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Jersey', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Kaliningrad', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Kiev', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Lisbon', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Ljubljana', 'N');
    INSERT INTO `timezone` VALUES ('Europe/London', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Luxembourg', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Madrid', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Malta', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Mariehamn', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Minsk', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Monaco', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Moscow', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Nicosia', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Oslo', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Paris', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Podgorica', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Prague', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Riga', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Rome', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Samara', 'N');
    INSERT INTO `timezone` VALUES ('Europe/San_Marino', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Sarajevo', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Simferopol', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Skopje', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Sofia', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Stockholm', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Tallinn', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Tirane', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Tiraspol', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Uzhgorod', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Vaduz', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Vatican', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Vienna', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Vilnius', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Volgograd', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Warsaw', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Zagreb', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Zaporozhye', 'N');
    INSERT INTO `timezone` VALUES ('Europe/Zurich', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Antananarivo', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Chagos', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Christmas', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Cocos', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Comoro', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Kerguelen', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Mahe', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Maldives', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Mauritius', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Mayotte', 'N');
    INSERT INTO `timezone` VALUES ('Indian/Reunion', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Apia', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Auckland', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Chatham', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Chuuk', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Easter', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Efate', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Enderbury', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Fakaofo', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Fiji', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Funafuti', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Galapagos', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Gambier', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Guadalcanal', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Guam', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Honolulu', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Johnston', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Kiritimati', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Kosrae', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Kwajalein', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Majuro', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Marquesas', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Midway', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Nauru', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Niue', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Norfolk', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Noumea', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Pago_Pago', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Palau', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Pitcairn', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Pohnpei', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Ponape', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Port_Moresby', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Rarotonga', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Saipan', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Samoa', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Tahiti', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Tarawa', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Tongatapu', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Truk', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Wake', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Wallis', 'N');
    INSERT INTO `timezone` VALUES ('Pacific/Yap', 'N');
    
    -- ----------------------------
    -- Procedure structure for `addnewbreadcrumb`
    -- ----------------------------
    DROP PROCEDURE IF EXISTS `addnewbreadcrumb`;
    DELIMITER ;;
    CREATE PROCEDURE `addnewbreadcrumb`(IN PageTitleParent VARCHAR(100), 
                                        PageTitle VARCHAR(100), 
                                        PageURL VARCHAR(100))
    GoodBye: BEGIN
    -- Need three parameters (PageTitleParent, PageTitle, and PageURL), 
    -- look at this line --> `Page_Title` = PageTitleParent);
    -- look at this line --> VALUES (PageTitle, PageURL, ParentLevel, (ParentLevel + 1));
    DECLARE ParentLevel INTEGER;
    DECLARE RecCount INTEGER;
    DECLARE CheckRecCount INTEGER;
    DECLARE MyPageTitle VARCHAR(100);
     
    SET ParentLevel = (SELECT Rgt FROM `breadcrumblinks` WHERE 
    `Page_Title` = PageTitleParent);
     
    SET CheckRecCount = (SELECT COUNT(*) AS RecCount FROM `breadcrumblinks` WHERE 
    `Page_Title` = PageTitle);
    	IF CheckRecCount > 0 THEN
    		SET MyPageTitle = CONCAT("The following Page_Title is already exists in database: ", PageTitle);
    		SELECT MyPageTitle;
    		LEAVE GoodBye;
      END IF;
     
    UPDATE `breadcrumblinks`
       SET Lft = CASE WHEN Lft > ParentLevel THEN
          Lft + 2
        ELSE
          Lft + 0
        END,
       Rgt = CASE WHEN Rgt >= ParentLevel THEN
          Rgt + 2
       ELSE
          Rgt + 0
       END
    WHERE  Rgt >= ParentLevel;
     
    SET RecCount = (SELECT COUNT(*) FROM `breadcrumblinks`);
    	IF RecCount = 0 THEN
    		-- this is for handling the first record
    		INSERT INTO `breadcrumblinks` (Page_Title, Page_URL, Lft, Rgt)
    					VALUES (PageTitle, PageURL, 1, 2);
    	ELSE
    		-- whereas the following is for the second record, and so forth!
    		INSERT INTO `breadcrumblinks` (Page_Title, Page_URL, Lft, Rgt)
    					VALUES (PageTitle, PageURL, ParentLevel, (ParentLevel + 1));
    	END IF;
     
    END
    ;;
    DELIMITER ;
    
    -- ----------------------------
    -- Procedure structure for `deletebreadcrumbbasedonpagetitle`
    -- ----------------------------
    DROP PROCEDURE IF EXISTS `deletebreadcrumbbasedonpagetitle`;
    DELIMITER ;;
    CREATE PROCEDURE `deletebreadcrumbbasedonpagetitle`(IN `PageTitle` VARCHAR(100))
    BEGIN
    -- Need one parameter (PageTitle), look at the line: WHERE  Page_Title = PageTitle;
    DECLARE DeletedPageTitle VARCHAR(100);
    DECLARE DeletedLft INTEGER;
    DECLARE DeletedRgt INTEGER;
     
    SELECT `Page_Title`, `Lft`, `Rgt`
    INTO   DeletedPageTitle, DeletedLft, DeletedRgt
    FROM   `breadcrumblinks`
    WHERE `Page_Title` = PageTitle;
     
    DELETE FROM `breadcrumblinks`
    WHERE Lft BETWEEN DeletedLft AND DeletedRgt;
     
    UPDATE `breadcrumblinks`
       SET Lft = CASE WHEN Lft > DeletedLft THEN
                 Lft - (DeletedRgt - DeletedLft + 1)
              ELSE
                 Lft
              END,
           Rgt = CASE WHEN Rgt > DeletedLft THEN
                 Rgt - (DeletedRgt - DeletedLft + 1)
              ELSE
                 Rgt
              END
       WHERE Lft > DeletedLft
          OR Rgt > DeletedLft;
    END
    ;;
    DELIMITER ;
    
    -- ----------------------------
    -- Procedure structure for `getbreadcrumblinks`
    -- ----------------------------
    DROP PROCEDURE IF EXISTS `getbreadcrumblinks`;
    DELIMITER ;;
    CREATE PROCEDURE `getbreadcrumblinks`(IN PageTitleParent VARCHAR(100), 
                                        PageTitle VARCHAR(100), 
                                        PageURL VARCHAR(100))
    GoodBye: BEGIN
    -- Need three parameters (PageTitleParent, PageTitle, and PageURL), 
    -- look at this line --> `Page_Title` = PageTitleParent);
    -- look at this line --> VALUES (PageTitle, PageURL, ParentLevel, (ParentLevel + 1));
    DECLARE ParentLevel INTEGER;
    DECLARE RecCount INTEGER;
    DECLARE CheckRecCount INTEGER;
    DECLARE MyPageTitle VARCHAR(100);
     
    SET ParentLevel = (SELECT Rgt FROM `breadcrumblinks` WHERE 
    `Page_Title` = PageTitleParent);
     
    SET CheckRecCount = (SELECT COUNT(*) AS RecCount FROM `breadcrumblinks` WHERE 
    `Page_Title` = PageTitle);
    	IF CheckRecCount > 0 THEN
    		SET MyPageTitle = CONCAT("The following Page_Title is already exists in database: ", PageTitle);
    		SELECT MyPageTitle;
    		LEAVE GoodBye;
      END IF;
     
    UPDATE `breadcrumblinks`
       SET Lft = CASE WHEN Lft > ParentLevel THEN
          Lft + 2
        ELSE
          Lft + 0
        END,
       Rgt = CASE WHEN Rgt >= ParentLevel THEN
          Rgt + 2
       ELSE
          Rgt + 0
       END
    WHERE  Rgt >= ParentLevel;
     
    SET RecCount = (SELECT COUNT(*) FROM `breadcrumblinks`);
    	IF RecCount = 0 THEN
    		-- this is for handling the first record
    		INSERT INTO `breadcrumblinks` (Page_Title, Page_URL, Lft, Rgt)
    					VALUES (PageTitle, PageURL, 1, 2);
    	ELSE
    		-- whereas the following is for the second record, and so forth!
    		INSERT INTO `breadcrumblinks` (Page_Title, Page_URL, Lft, Rgt)
    					VALUES (PageTitle, PageURL, ParentLevel, (ParentLevel + 1));
    	END IF;
     
    END
    ;;
    DELIMITER ;
    
    -- ----------------------------
    -- Procedure structure for `movebreadcrumb`
    -- ----------------------------
    DROP PROCEDURE IF EXISTS `movebreadcrumb`;
    DELIMITER ;;
    CREATE PROCEDURE `movebreadcrumb`(IN CurrentRoot VARCHAR(100), IN NewParent VARCHAR(100))
    BEGIN
    -- Need two parameters: (1) CurrentRoot, and (2) NewParent.
    DECLARE Origin_Lft INTEGER;
    DECLARE Origin_Rgt INTEGER;
    DECLARE NewParent_Rgt INTEGER;
     
    SELECT `Lft`, `Rgt`
    	INTO Origin_Lft, Origin_Rgt
    	FROM `breadcrumblinks`
    	WHERE `Page_Title` = CurrentRoot;
    SET NewParent_Rgt = (SELECT `Rgt` FROM `breadcrumblinks`
    	WHERE `Page_Title` = NewParent);
    UPDATE `breadcrumblinks` 
    	SET `Lft` = `Lft` + 
    	CASE
    		WHEN NewParent_Rgt < Origin_Lft
    			THEN CASE
    				WHEN Lft BETWEEN Origin_Lft AND Origin_Rgt
    					THEN NewParent_Rgt - Origin_Lft
    				WHEN Lft BETWEEN NewParent_Rgt	AND Origin_Lft - 1
    					THEN Origin_Rgt - Origin_Lft + 1
    				ELSE 0 END
    		WHEN NewParent_Rgt > Origin_Rgt
    			THEN CASE
    				WHEN Lft BETWEEN Origin_Lft	AND Origin_Rgt
    					THEN NewParent_Rgt - Origin_Rgt - 1
    				WHEN Lft BETWEEN Origin_Rgt + 1 AND NewParent_Rgt - 1
    					THEN Origin_Lft - Origin_Rgt - 1
    				ELSE 0 END
    			ELSE 0 END,
    	Rgt = Rgt + 
    	CASE
    		WHEN NewParent_Rgt < Origin_Lft
    			THEN CASE
    		WHEN Rgt BETWEEN Origin_Lft AND Origin_Rgt
    			THEN NewParent_Rgt - Origin_Lft
    		WHEN Rgt BETWEEN NewParent_Rgt AND Origin_Lft - 1
    			THEN Origin_Rgt - Origin_Lft + 1
    		ELSE 0 END
    		WHEN NewParent_Rgt > Origin_Rgt
    			THEN CASE
    				WHEN Rgt BETWEEN Origin_Lft AND Origin_Rgt
    					THEN NewParent_Rgt - Origin_Rgt - 1
    				WHEN Rgt BETWEEN Origin_Rgt + 1	AND NewParent_Rgt - 1
    					THEN Origin_Lft - Origin_Rgt - 1
    				ELSE 0 END
    			ELSE 0 END;
    END
    ;;
    DELIMITER ;
    
    

    After running the SQL code above, then make sure now you have already had the following new tables:
    1) announcement
    2) breadcrumblinks
    3) help
    4) help_categories
    5) languages
    6) settings
    7) stats_counter
    8) stats_counterlog
    9) stats_date
    10) stats_hour
    11) stats_month
    12) stats_year
    13) themes
    14) timezone

    In addition, make sure also that you have now four new Stored Procedure as follows:
    1) addnewbreadcrumb
    2) deletebreadcrumbbasedonpagetitle
    3) getbreadcrumblinks
    4) movebreadcrumb

  3. Run the following script to alter your users table. This is a table which will store your web application users. For simplicity, we are using users as the table name for users authentication process. Don't forget to adjust the table name to the one you are using:

    ALTER TABLE `users`
      ADD COLUMN `Current_URL` text,
      ADD COLUMN `Theme` varchar(30) DEFAULT NULL,
      ADD COLUMN `Menu_Horizontal` enum('N','Y') DEFAULT 'Y',
      ADD COLUMN `Table_Width_Style` enum('1','2','3') DEFAULT '1',
      ADD COLUMN `Scroll_Table_Width` int(11) DEFAULT '1000',
      ADD COLUMN `Scroll_Table_Height` int(11) DEFAULT '350',
      ADD COLUMN `Rows_Vertical_Align_Top` enum('N','Y') DEFAULT 'Y',  
      ADD COLUMN `Language` char(2) DEFAULT 'en',
      ADD COLUMN `Redirect_To_Last_Visited_Page_After_Login` enum('N','Y') DEFAULT 'N',
      ADD COLUMN `Font_Name` varchar(50) DEFAULT 'arial',
      ADD COLUMN `Font_Size` varchar(4) DEFAULT '13px';
    

    After run that SQL code above, then make sure in your users table, you have already had 8 new fields as follows:
    1) Current_URL
    2) Theme
    3) Menu_Horizontal
    4) Table_Width_Style
    5) Scroll_Table_Width
    6) Scroll_Table_Height
    7) Rows_Vertical_Align_Top
    8) Language
    9) Redirect_To_Last_Visited_Page_After_Login

  4. Synchronize the database structure change from Tools -> Synchronize of PHPMaker 10 application, and make sure you apply the changes in the database above to the current project in PHPMaker.
  5. Go to Security tab of PHPMaker 10 application, enable Use Existing Table, and then choose Table, Login Name Field, and Password Field, afterwards click on Advanced button in order to setup another Security options.
  6. Go to Tools -> Extensions, then enable the following extensions:
    1) MasinoCustomCSS10
    2) MasinoCAPTCHA10
    3) MasinoChangePwd10
    4) MasinoForgotPwd10
    5) MasinoLogin10
    6) MasinoRegister10
    7) MasinoHorizontalVertical10
    8) MasinoFixedWidthSite10
    9) MasinoHeaderFooter10
    10) MasinoDetectChanges10
    11) MasinoPreviewRow10

    Most of the time, all extensions above use the default extension setting that needed in a web application. I recommend you to play with the Advanced Setting of the other extensions so that you will know the powerful of it.

  7. Insert the new custom phrases into the .xml language files in C:\Program Files\PHPMaker 10\languages folder. For further information, please read this post.
  8. Finally, re-generate your script files using PHPMaker 10 as always.

[/hidepost]

Article by Masino Sinaga / PHPMaker Extensions / extensions, MasinoCAPTCHA10, MasinoChangePwd10, MasinoCustomCSS10, MasinoFixedWidthSite10, MasinoForgotPwd10, MasinoHeaderFooter10, MasinoHorizontalVertical10, MasinoLogin10, MasinoRegister10, PHPMaker 10.0.1, PHPMaker 10.0.2, PHPMaker 10.0.3, PHPMaker 10.0.4, security 20 Comments

How to Display Image and Text in List Options, Export Options, and Other Options of Web Applications that Generated by PHPMaker 10.0.1
MasinoFixedWidthSite10, Extension for Almost All Customization in Web Applications that Generated by PHPMaker 10

Comments

  1. keithh0427 says

    November 2, 2013 at 10:52 pm

    Masino

    A couple of notes to consider.

    the function My_Global_Check() is called as soon as I access the compiled scripts and before I actually login to the system. There is no CurrentUserName() available at that time so the function throws an error.

    Also, no matter what I do to make the search panel collapsed, it is always visible. I have tried all combinations for define(“MS_SEARCH_PANEL_COLLAPSED”, TRUE, TRUE) but nothing seems to work. I have tried it on IE10 (Compatibility mode on and off), Firefox and Chrome. I have also set the corresponding PHPMaker advanced setting.

    Log in to Reply
    • Masino Sinaga says

      November 2, 2013 at 11:30 pm

      Keith,

      Regarding the filter of CurrentUserName(), there is actually the filter for the current user logged in. See the following code inside the My_Global_Check() function:

      $sFilterUserName = str_replace("%u", ew_AdjustSql(CurrentUserName()), EW_USER_NAME_FILTER);
      

      Regarding the collapsing the search panel, try to play with the related setting from the settings table. Simply change the value of the Search_Panel_Collapsed field.

      If you want to ignore the settings from the settings table and want to use the setting from the ewcfg10.php file, then simply change the following code:

      define("MS_USE_CONSTANTS_IN_CONFIG_FILE", FALSE, TRUE); // this is useful if you don't want to use the configuration settings from database, just use from this file!
      

      change it become:

      define("MS_USE_CONSTANTS_IN_CONFIG_FILE", TRUE, TRUE); 
      
      Log in to Reply
  2. keithh0427 says

    November 3, 2013 at 3:04 am

    Masino,

    Thanks for the quick reply. The problem I’m having with the

    $sFilterUserName = str_replace(“%u”, ew_AdjustSql(CurrentUserName()), EW_USER_NAME_FILTER);

    is that there is no CurrentUserName() prior to login but I can’t get to the login page as My_Global_Check() appears to be be called prior to actually logging in.

    Log in to Reply
    • Masino Sinaga says

      November 3, 2013 at 7:41 pm

      Not sure why you cannot get to the login page, but in the demo10 project (see the link on the footer of this site, you can try it), and also in some of my web apps I created here, there is no error prior to the Login page. If there is no CurrentUserName() value, then the setting will be derived from the settings table, and not from employees table (case for the demo10 project).

      Just for your information, even there is no CurrentUserName() prior to login, the SQL which use that filter will not result any error. The SQL will become: “SELECT Menu_Horizontal, Theme, Table_Width_Style, Scroll_Table_Width, Scroll_Table_Height, Language, Redirect_To_Last_Visited_Page_After_Login FROM `employees` WHERE (`Username` = ”)”.

      My questions are:
      1. What is the error message actually you got?
      2. Have you enabled all the Security features, such as table for the login page, User ID, User Level, User Level Permissions, etc?

      Log in to Reply
  3. keithh0427 says

    November 3, 2013 at 9:06 pm

    I’m going to work on this today. After reviewing your demos again, I’m certain it’s on my end. thanks and I will let you know what I find.

    Log in to Reply
  4. keithh0427 says

    November 4, 2013 at 3:18 am

    The problem is resolved, although I don’t know why.

    Log in to Reply
    • Masino Sinaga says

      November 7, 2013 at 6:53 pm

      Keith, I saw that this error occured only if there are no tables acess given to the Guest users. This error won’t be happened if at least there is a table access to the Guest users.

      However, I just modified the My_Global_Check() function in order to prevent this error happened. Please re-download the extensions I just last updated today, November 7, 2013.

      Log in to Reply
  5. Naser Al-Ibrahim says

    March 18, 2014 at 9:06 pm

    I followed the instructions but i keep getting this error
    Generate Activate Page error
    PHPMaker (ewExActivateAccount)
    runtime error (1391)
    Description: ‘sEmailFldName’ is undefined

    I created an empty database
    added table users with 4 col
    added all your sql codes
    and altered the user tables
    enabled all extensions
    fixed the security to match the username and password field
    generated and got the error

    Log in to Reply
    • Masino Sinaga says

      March 19, 2014 at 8:54 am

      Error Description: ‘sEmailFldName’ is undefined is usually caused by the undefined “Email field” under this location: “Advanced Security” -> “User Login Options” -> “User Table Fields”. Make sure you have defined the Email field properly.

      Log in to Reply
  6. muhamad furqon says

    May 26, 2014 at 10:38 pm

    GOT ERROR Fatal error: Call to undefined method stdClass::SaveProfileToDatabase() in …….

    Log in to Reply
    • Masino Sinaga says

      May 27, 2014 at 9:48 am

      Make sure you have already enabled the needed features from Security -> Advanced -> User Login Options.

      I recommend you to download my demo project in this site, and use it as an example for your own project, especially the recommend settings that related to Security.

      Log in to Reply
  7. muhamad furqon says

    May 29, 2014 at 9:13 am

    Masino,

    How to include jquery chosen plugins to multiple select in edit tag?

    Log in to Reply
    • Masino Sinaga says

      May 29, 2014 at 8:54 pm

      Basically and first of all, you need to include the plugin script itself. Just use Page_Head server event. Also, read the instruction (readme) of the plugin how to incorporate it into another script. In PHPMaker, you may also use Client Scripts to put additional code that related to the Javascript/jQuery code.

      Read Server Events and Client Scripts in the PHPMaker Help file for more information and example.

      Log in to Reply
  8. AlMaqdad Al-Lawati says

    October 25, 2014 at 7:58 pm

    I have followed the steps for phpmaker 11.0.3 ? for some reason when i go to login.php the page will be empty, I cant login to the website ?

    Log in to Reply
  9. AlMaqdad Al-Lawati says

    October 25, 2014 at 8:24 pm

    exactly like this :- http://demo11.ilovephpmaker.com/login.php (empty page). plz help

    Log in to Reply
    • Masino Sinaga says

      October 26, 2014 at 12:14 pm

      Please try using Mozilla Firefox at the moment, it should work.

      I just tried using Google Chrome and the Login page is not working properly. Will try to find out the solution for this issue.

      Log in to Reply
      • AlMaqdad Al-Lawati says

        October 26, 2014 at 12:42 pm

        Thank you Masino for your reply,

        it is working fine on Mozilla Firefox but not in the Google Chrome. Plz try to find the solution ASAP because all my current users mostly use Google Chrome therefore, I will not implement Masino Extensions for now till you find a solution.

        Log in to Reply
      • keithh0427 says

        October 27, 2014 at 6:29 am

        It’s now happening on my IE and FireFox as well. It was OK earlier and I just recompiled the languages and the registed.php script.

        Log in to Reply
      • Masino Sinaga says

        October 27, 2014 at 9:53 am

        Okay, the issue has been solved already. Please re-download MasinoHeaderFooter11 extension again.

        I am really sorry for this unconveniences. Thanks for bringing this issue up.

        Log in to Reply
      • Masino Sinaga says

        October 27, 2014 at 10:03 am

        After regenerating all the script files using the updated extension, make sure you have already pressed [F5] button on your keyboard to reload the updated script from your web server when you open the Login page.

        Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • A New PHPMaker 2020 Project File Is Released
  • PHPMaker 2020 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2020 Is Released!
  • Inventory Stock Management Project, Why Should You Have It?
  • A New PHPMaker 2019 Project File Is Released!
  • PHPMaker 2019 Demo Project File Is Released!
  • Masino Extensions for PHPMaker 2019 Is Released!
  • A New PHPMaker 2018 Project File Is Released!
  • PHPMaker 2018 Demo Project File Is Released!
  • Masino Extensions for PHPMaker 2018 Is Released!

Search

Recent Comments

  • Masino Sinaga on Masino Extensions for PHPMaker 2019 Is Released!
  • Masino Sinaga on Masino Extensions for PHPMaker 2019 Is Released!
  • Brien Devine on Masino Extensions for PHPMaker 2019 Is Released!
  • Brien Devine on Masino Extensions for PHPMaker 2019 Is Released!
  • Masino Sinaga on Masino Extensions for PHPMaker 2019 Is Released!

Demo Website

  • Demo of I Love PHPMaker 2020 (MasinoExtensions).
  • Indonesia Post Offices.
  • Stock Inventory Management.
  • Demo of PHPMaker + PHP Report Maker

Another Demo

The following template are not available in this site (must be purchased separately)

  • PHPMaker v2018 Horizontal Vertical Template.
  • PHPMaker v2017 Horizontal Vertical Template.

Demo Explanation

Stock Inventory Management is the good project for your reference, since it uses the real example in the real world. Many useful features you can use from this project, such as how to add the Thousand and Decimal separator character, and also how to calculate multiple row in Grid-Add when End-Users are entering data into the Grid-Add mode.

Categories

  • Customize Template (103)
  • General (3)
  • PHP Report Maker (17)
  • PHP Report Maker Extensions (2)
  • PHPMaker Extensions (76)
  • Tips and Trick (72)

Articles based on version

  • PHPMaker 2020
  • PHPMaker 2019
  • PHPMaker 2018
  • PHPMaker 2017.0.7
  • PHPMaker 12.0.7
  • PHPMaker 11.0.6
  • PHPMaker 10.0.5
  • PHPMaker 9.2.0
  • PHPMaker 8.0.3
  • PHP Report Maker 12

(c) I Love PHPMaker 2010 - 2019 by Masino Sinaga | WordPress | Log in | Back to top