It's time to customize the look of the Header and Footer of your web application that created with PHPMaker version 9.0.1. There are some constants that were added into the configuration file that aims to support the change of your Header and Footer view. Most of the information that we will add into the Header and Footer is the most common functionality that usually exists in a website application, and they are controlled by the usage of the related constants.
Some of these constants are for:
- Display or hide the entire header,
- Display or hide the entire footer,
- Display or hide site title in header,
- Display or hide current Username in header,
- Display or hide the Languages Selector (whether “in the header”, “below the header”, or “hide them all”),
- Text-alignment for Site Title, current Username, and Languages Selector.
- Display the style of Site Title (whether “normal”, “capitalize”, or “uppercase”),
- Logo width setting (this will adjust the space between logo image and Site Title, current Username, and Languages Selector),
- The Language Selector alignment (whether “autoadjust”, “left”, “center”, or “right”),
- Display or hide the copyright text on footer,
- Display or hide the “Back to Top” link on footer,
- Display or hide the “Terms and Conditions” link on footer,
All we have to do is customizing PHPMaker template files. In other words, we will not modify the generated script files.
After implementing this modifications, now you can customize your Header and Footer and the related items by simply changing the value of the related constants.
Updated on May 30, 2012: This customization has been implemented in PHPMaker version 9.0.2, it matches to each other, and as a result, it works properly.
Updated on July 21, 2012: This customization has been implemented in PHPMaker version 9.0.3, it matches to each other, and as a result, it works properly.
Updated on September 4, 2012: This customization has been implemented in PHPMaker version 9.0.4, it matches to each other, and as a result, it works properly.
Updated on November 28, 2012: This customization has been implemented in PHPMaker version 9.1.0, it matches to each other, and as a result, it works properly.
Updated on February 9, 2013: This customization has been implemented in PHPMaker version 9.2.0, it matches to each other, and as a result, it works properly.
Updated on June 17, 2013: The customization has been handled by using MasinoHeaderFooter extension. You don’t need to implement the customization below if you use my extensions together with the original PHPMaker Template and Extension files.
[hidepost]
-
Open your C:\Program Files\PHPMaker 9\languages\english.xml file, and find this code:
</global>
before that line of code, please insert the following code:
<phrase id="Welcome" value="Welcome"/> <phrase id="AskToLogout" value="Are you sure you want to logout now?"/> <phrase id="BackToTop" value="Back to Top"/> <phrase id="UserID" value="User ID"/> <phrase id="TaCTitle" value="Terms and Conditions"/>
Do the same way to your another .xml language file, for example, I am using Indonesian language too, so I add this following code into my indonesian.xml file:
<phrase id="Welcome" value="Selamat Datang"/> <phrase id="AskToLogout" value="Anda yakin ingin logout sekarang?"/> <phrase id="BackToTop" value="Kembali ke Atas"/> <phrase id="UserID" value="ID Pengguna"/> <phrase id="TaCTitle" value="Syarat dan Ketentuan"/>
-
Next step, we will add our new style to the .css file that will be generated by PHPMaker. This will overide the height of html and body section in your generated pages. From your PHPMaker application, go to HTML tab, then click on Styles sub-tab, and then click on Edit Styles button. You will see a CSS Editor window afterwards. Scroll down to the bottom of that textbox, and find this code:
/*END_USER_STYLES*/
before that line, insert this following code:
/* Begin of Customizing Header and Footer, by Masino Sinaga, May 2, 2012 */ html, body { height: auto; } /* End of Customizing Header and Footer, by Masino Sinaga, May 2, 2012 */
That modification will make your page height to automatically adjust to the maximum height of the current content page. This will overide the old “100%” value of the html and body section of your page, since the old value will break your layout if using this current modification.
-
Open your \Script\ewcfg.php file, and find this code:
// General
before that line, please insert this following code:
// Begin of modification Customize Header and Footer, by Masino Sinaga, May 2, 2012 define("MS_LANGUAGE_SELECTOR_VISIBILITY", "inheader", TRUE); // Whether "inheader", "belowheader", or "hidethemall" define("MS_LANGUAGE_SELECTOR_ALIGN", "autoadjust", TRUE); // Language selector align: "autoadjust", "left", "center", or "right" define("MS_SHOW_SITE_TITLE_IN_HEADER", TRUE, TRUE); // Show Site title in header define("MS_SHOW_CURRENT_USER_IN_HEADER", TRUE, TRUE); // Show current User status in header define("MS_SHOW_ENTIRE_HEADER", TRUE, TRUE); // Show entire header block define("MS_SHOW_ENTIRE_FOOTER", TRUE, TRUE); // Show entire footer block define("MS_SHOW_TEXT_IN_FOOTER", TRUE, TRUE); // Show text in footer block define("MS_TEXT_ALIGN_IN_HEADER", "left", TRUE); // Text align in header, left, center, or right define("MS_SITE_TITLE_TEXT_STYLE", "normal", TRUE); // Whether "normal", "capitalize", or "uppercase" define("MS_LOGO_WIDTH", 170, TRUE); // Logo width define("MS_SHOW_BACKTOTOP_ON_FOOTER", TRUE, TRUE); // Back to Top link define("MS_SHOW_TOC_ON_FOOTER", TRUE, TRUE); // Terms of Condition // End of modification Customize Header and Footer, by Masino Sinaga, May 2, 2012
-
Open your \Script\control.xml file, and find this code:
<control id="ew.js" type="other" ofolderid="_js" ifiles="ewp.js" ofile="ewp9" oext="js"> <session type="key" value="jscommon" /> </control>
after the last line of that code, insert this following code:
<!-- Added by Masino Sinaga, for Scroll to Top, May 2, 2012 --> <control id="scroll.js" type="copy" remark="Copy scroll.js" ofolderid="_js" ifiles="scroll.js" />
-
Warning: This step only for PHPMaker < 9.1.0 only! Do not do this step for PHPMaker >= 9.1.0 as it will break your layout! Do step 6 for PHPMaker version >= 9.1.0. Open your \Script\template.php file, and replace entire code inside that file with this following code (It is Strongly Recommended to backup your template.php file before doing this step!):
<!--##session common_config##--> <!--## // Export sProjName = PROJ.ProjName; sProjVar = PROJ.ProjVar; if (IsExport() || ew_IsNotEmpty(PROJ.AppRelatedProject)) { sTmplExpStart = "<?php if (@$gsExport == \"\") { ?>"; sTmplExpEnd = "<?php } ?>"; sTmplPrintExpStart = "<?php if (@$gsExport == \"\" || @$gsExport == \"print\") { ?>"; } else { sTmplExpStart = ""; sTmplExpEnd = ""; sTmplPrintExpStart = ""; } sTmplSkipStart = "<?php if (@!$gbSkipHeaderFooter) { ?>"; sTmplSkipEnd = "<?php } ?>"; // Config YUI options bUseYuiAddOpt = UseYuiAddOpt(); bUseEmailExport = UseEmailExport(); // Export to Email bUseTooltip = UseTooltip(); // Use Tooltip bUseYuiTab = UseYuiTab(); // Use Yui Tab bUseYuiContainer = (bUseYuiAddOpt || bUseEmailExport || bUseTooltip); // Use Yui Container bUseYuiButton = (bUseYuiAddOpt || bUseEmailExport); // Use Yui Button bUseYuiAutoComplete = bUseYuiAutoSuggest; // Use Yui AutoComplete bUseYuiResize = true; // Use Yui Resize bUseJSTemplate = true; // Use JS Template bUsejQuery = UsejQuery(); // Use jQuery ##--> <!--##/session##--> <!--##session header_top##--> <?php // Compatibility with PHP Report Maker if (!isset($Language)) { include_once "<!--##=ew_GetFileNameByCtrlID("ewconfig")##-->"; include_once "<!--##=ew_GetFileNameByCtrlID("ewshared")##-->"; $Language = new cLanguage(); } ?> <!--## if (PROJ.DocType == "HTML" || PROJ.DocType == "") { ##--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--## } else if (PROJ.DocType == "XHTML") { ##--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--## } else if (PROJ.DocType == "HTML5") { ##--> <!doctype html> <!--## } ##--> <html> <head> <title><?php echo $Language->ProjectPhrase("BodyTitle") ?></title> <!--##=sTmplExpStart##--> <!--##include ewmenuext.php/menuextcss##--> <!--## if (bUseYuiTab) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/tabview/assets/skins/sam/tabview.css"> <!--## } ##--> <!--## if (bUseYuiButton) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/button/assets/skins/sam/button.css" /> <!--## } ##--> <!--## if (bUseYuiContainer) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/container/assets/skins/sam/container.css" /> <!--## } ##--> <!--## if (bUseYuiAutoComplete) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/autocomplete/assets/skins/sam/autocomplete.css" /> <!--## } ##--> <!--## if (bUseYuiResize) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/resize/assets/skins/sam/resize.css"> <!--## } ##--> <!--##=sTmplExpEnd##--> <!--##=sTmplPrintExpStart##--> <link rel="stylesheet" type="text/css" href="<?php echo EW_PROJECT_STYLESHEET_FILENAME ?>" /> <!--##=SYSTEMFUNCTIONS.CSSFile()##--> <!--## if (bUsejQuery) { ##--> <script type="text/javascript" src="<?php echo ew_jQueryHost(); ?>jquery.min.js"></script> <!--## } else { ##--> <script type="text/javascript" src="<!--##=ew_FolderPath("_js")##-->/sizzle-min.js"></script> <!--## } ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/utilities/utilities.js"></script> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/json/json-min.js"></script> <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <!--## if (bUseYuiTab) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/tabview/tabview-min.js"></script> <!--## } ##--> <!--## if (bUseYuiButton) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/button/button-min.js"></script> <!--## } ##--> <!--## if (bUseYuiContainer) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/container/container-min.js"></script> <!--## } ##--> <!--## if (bUseYuiAutoSuggest) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/datasource/datasource-min.js"></script> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/autocomplete/autocomplete-min.js"></script> <!--## } else { ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("datenumber-min.js")##-->"></script> <!--## } ##--> <!--## if (bUseYuiResize) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/resize/resize-min.js"></script> <!--## } ##--> <!--##include ewmenuext.php/menuextjs##--> <!--##/session##--> <!--##session header_top_2##--> <script type="text/javascript"> var EW_LANGUAGE_ID = "<?php echo $gsLanguage ?>"; var EW_DATE_SEPARATOR = "<!--##=PROJ.DateSeparator##-->" || "/"; // Default date separator var EW_DECIMAL_POINT = "<?php echo $DEFAULT_DECIMAL_POINT ?>"; var EW_THOUSANDS_SEP = "<?php echo $DEFAULT_THOUSANDS_SEP ?>"; var EW_UPLOAD_ALLOWED_FILE_EXT = "<!--##=PROJ.UploadAllowedFileExt##-->"; // Allowed upload file extension // Ajax settings var EW_RECORD_DELIMITER = "\r"; var EW_FIELD_DELIMITER = "|"; var EW_LOOKUP_FILE_NAME = "<!--##=ew_GetFileNameByCtrlID("lookup")##-->"; // Lookup file name var EW_AUTO_SUGGEST_MAX_ENTRIES = <?php echo EW_AUTO_SUGGEST_MAX_ENTRIES ?>; // Auto-Suggest max entries // Common JavaScript messages var EW_ADDOPT_BUTTON_SUBMIT_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("AddBtn"))) ?>"; var EW_EMAIL_EXPORT_BUTTON_SUBMIT_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("SendEmailBtn"))) ?>"; var EW_BUTTON_CANCEL_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("CancelBtn"))) ?>"; <!--## if (bUseEmailExport) { ##--> var EW_MAX_EMAIL_RECIPIENT = <?php echo EW_MAX_EMAIL_RECIPIENT ?>; <!--## } ##--> var EW_DISABLE_BUTTON_ON_SUBMIT = <!--##=ew_JsVal(bDisableButtonOnSubmit)##-->; var EW_IMAGE_FOLDER = "<!--##=GetImageFolder()##-->"; // Image folder </script> <!--##=sTmplExpEnd##--> <!--##=sTmplPrintExpStart##--> <!--## if (bUseJSTemplate) { ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("jsrender.js")##-->"></script> <!--## } ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("ew.js")##-->"></script> <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("user.js")##-->"></script> <script type="text/javascript" src="phpjs/scroll.js"></script> <script type="text/javascript"> <?php echo $Language->ToJSON() ?> </script> <!--## if (SYSTEMFUNCTIONS.ServerScriptExist("Global","Page_Head")) { ##--> <?php <!--##~SYSTEMFUNCTIONS.GetServerScript("Global","Page_Head")##--> ?> <!--## } ##--> <!--##~SYSTEMFUNCTIONS.GetClientScript("Global","Client Script")##--> <!--##=sTmplExpEnd##--> <!--##=SYSTEMFUNCTIONS.CharSet()##--> <!--##=SYSTEMFUNCTIONS.FavIcon()##--> <?php // Begin of modification Fixed Width Site, by Masino Sinaga, April 28, 2012 ?> <?php if (@$_GET["export"] == "") { ?> <?php $bordercolor = ""; ?> <style> html { height: auto; border-left: 1px solid <?php echo $bordercolor; ?>; border-right: 1px solid <?php echo $bordercolor; ?>; border-top: 1px solid <?php echo $bordercolor; ?>; border-bottom: 1px solid <?php echo $bordercolor; ?>; width: <?php echo (MS_TOTAL_WIDTH); ?>px; display: block; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; } body { background-color: inherit; /* background color */ color: inherit; /* text color */ margin: 0; /* top right bottom left */ width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: auto; display: block; } /* template layout */ .ewLayout { width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: 100%; } .ewContentTable { width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: 100%; clear: left; } .ewMenuColumn { width: <?php echo MS_VERTICAL_MENU_WIDTH; ?>px; } </style> <?php } ?> <?php // End of modification Fixed Width Site, by Masino Sinaga, April 28, 2012 ?> <script language="JavaScript"> <!-- function popupWindow(url) { var SecondaryWin; SecondaryWin = window.open(url,"secondary","toolbars=0,statusbars=0,menubars=0,scroll=1,fullscreen=0,resizable=1,width=450,height=580"); self.name="main"; } --> </script> </head> <body class="yui-skin-sam"> <!--##=sTmplSkipStart##--> <!--##=sTmplExpStart##--> <div class="ewLayout"> <!-- header (begin) --> <?php if (MS_SHOW_ENTIRE_HEADER) { // begin of show header block ?> <!-- header (begin) --><!-- *** Note: Only licensed users are allowed to change the logo *** --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="ewHeaderRow"> <td width="<?php echo (MS_LOGO_WIDTH); ?>px" rowspan="3"> <?php echo '<a href="." title="'.$Language->ProjectPhrase("BodyTitle").'"><!--##=SYSTEMFUNCTIONS.HeaderLogo()##--></a>'; ?> </td> <td> <?php if (MS_SHOW_SITE_TITLE_IN_HEADER) { ?> <font class="ewFooterText"><strong><div align="<?php echo MS_TEXT_ALIGN_IN_HEADER; ?>" style="text-transform:<?php echo MS_SITE_TITLE_TEXT_STYLE; ?>"><?php echo $Language->ProjectPhrase("BodyTitle") ?> </div></strong></font> <?php } ?> </td> </tr> <tr class="ewHeaderRow"> <td > <!--## if (PROJ.SecType != "None" && PROJ.SecType != "Hard Code") { ##--> <?php if (MS_SHOW_CURRENT_USER_IN_HEADER) { ?> <font class="ewFooterText"><div align="<?php echo MS_TEXT_ALIGN_IN_HEADER; ?>"><?php if ($Security->IsLoggedIn()=="login") { echo "". $Language->Phrase("UserID").": <strong>" . $Security->CurrentUserName() . "</strong>, [ <a onclick=\"return ew_Confirm('".$Language->Phrase("AskToLogout")."');\" href=logout.php>Logout</a> ]"; } ?> </div></font> <?php } ?> <!--## } ##--> </td> </tr> <tr class="ewHeaderRow"> <td> <!--## if (bMultiLanguage && arLanguageFile.length > 1) { ##--> <?php if (MS_LANGUAGE_SELECTOR_VISIBILITY=="inheader") { ?> <div align="<?php if (MS_LANGUAGE_SELECTOR_ALIGN=="autoadjust") { echo MS_TEXT_ALIGN_IN_HEADER; } else { echo MS_LANGUAGE_SELECTOR_ALIGN; } ?>"><form class="ewForm"> <span class="phpmaker"><?php echo $Language->Phrase("Language") ?></span> <select id="language" name="language" onchange="ew_SubmitLanguageForm(this.form);"> <?php foreach ($EW_LANGUAGE_FILE as $langfile) { ?> <option value="<?php echo $langfile[0] ?>"<?php if ($gsLanguage == $langfile[0]) echo " selected=\"selected\"" ?>><?php echo $langfile[1] ?></option> <?php } ?> </select> </form></div> <?php } ?> <!--## } ##--> </td> </tr> </table> <!-- header (end) --> <?php } else { // else of show entire header ?> <div class="ewHeaderRow"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="ewHeaderRow"> <td rowspan="2"> </td> <td> </td> </tr> <tr class="ewHeaderRow"> <td > </td> </tr> </table> </div> <?php } // end of show entire header ?> <!--##/session##--> <!--##session menu_top##--> <!-- content (begin) --> <table cellspacing="0" class="ewContentTable"> <tr> <td class="ewMenuColumn"> <!-- left column (begin) --> <!--##/session##--> <!--##session menu_bottom##--> <!-- left column (end) --> </td> <!--##/session##--> <!--##session header_bottom##--> <td class="ewContentColumn"> <!-- right column (begin) --> <!--## if (bMultiLanguage && arLanguageFile.length > 1) { ##--> <?php if (MS_LANGUAGE_SELECTOR_VISIBILITY=="belowheader") { ?> <div align="<?php if (MS_LANGUAGE_SELECTOR_ALIGN=="autoadjust") { echo MS_TEXT_ALIGN_IN_HEADER; } else { echo MS_LANGUAGE_SELECTOR_ALIGN; } ?>"><form class="ewForm"> <span class="phpmaker"><?php echo $Language->Phrase("Language") ?></span> <select id="language" name="language" onchange="ew_SubmitLanguageForm(this.form);"> <?php foreach ($EW_LANGUAGE_FILE as $langfile) { ?> <option value="<?php echo $langfile[0] ?>"<?php if ($gsLanguage == $langfile[0]) echo " selected=\"selected\"" ?>><?php echo $langfile[1] ?></option> <?php } ?> </select> </form></div> <?php } ?> <!--## } ##--> <?php if (!MS_SHOW_SITE_TITLE_IN_HEADER) { ?> <p class="phpmaker ewTitle"><b><?php echo $Language->ProjectPhrase("BodyTitle") ?></b></p> <?php } ?> <!--##=sTmplExpEnd##--> <!--##=sTmplSkipEnd##--> <!--##/session##--> <!--##session footer##--> <!--##=sTmplExpStart##--> <!--##=sTmplSkipStart##--> <p> </p> <!-- right column (end) --> <?php if (isset($gTimer)) $gTimer->Stop() ?> </td> </tr> </table> <!-- content (end) --> <?php if (MS_SHOW_ENTIRE_FOOTER) { // begin of show footer block ?> <!-- footer (begin) --> <div class="ewFooterRow"> <div class="ewFooterText"> <?php if (MS_SHOW_TEXT_IN_FOOTER) { ?> <?php echo $Language->ProjectPhrase("FooterText") ?> <?php } ?> <?php if (MS_SHOW_BACKTOTOP_ON_FOOTER) { ?> | <a id="gotop" href="#" onclick="MGJS.goTop();return false;"><?php echo $Language->Phrase("BackToTop"); ?></a> <?php } ?> <?php if (MS_SHOW_TOC_ON_FOOTER) { ?> | <a href="javascript:popupWindow('toc.php')"><?php echo $Language->Phrase("TaCTitle"); ?></a> <?php } ?> </div> <!-- Place other links, for example, disclaimer, here --> </div> <!-- footer (end) --> <?php } // end of show footer block ?> </div> <!--##=sTmplSkipEnd##--> <!--## if (bUseYuiAddOpt) { ##--> <table cellspacing="0" cellpadding="0"><tr><td><div id="ewAddOptDialog" class="phpmaker"></div></td></tr></table> <!--## } ##--> <!--## if (bUseEmailExport) { ##--> <table cellspacing="0" cellpadding="0"><tr><td><div id="ewEmailDialog" class="phpmaker" style="visibility: hidden;"> <!--##=SYSTEMFUNCTIONS.IncludeFile("ewemail","other")##--> </div></td></tr></table> <!--## } ##--> <div class="yui-tt" id="ewTooltipDiv" style="visibility: hidden; border: 0px;"></div> <!--##=sTmplExpEnd##--> <script type="text/javascript"> <!--##=sTmplPrintExpStart##--> ew_Select("table." + EW_TABLE_CLASSNAME, document, ew_SetupTable); // Init tables ew_Select("table." + EW_GRID_CLASSNAME, document, ew_SetupGrid); // Init grids <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <!--## if (bUseYuiAddOpt) { ##--> ew_InitAddOptDialog(); // Init the add option dialog <!--## } ##--> <!--## if (bUseEmailExport) { ##--> ew_InitEmailDialog(); // Init the email dialog <!--## } ##--> <!--## if (bUseTooltip) { ##--> ew_InitTooltipDiv(); // init tooltip div <!--## } ##--> <!--##=sTmplExpEnd##--> <!--## if (bUseJavaScriptMessage) { ##--> ew_ShowMessage(); // Show message <!--## } ##--> </script> <!--##=sTmplExpStart##--> <!--##~SYSTEMFUNCTIONS.GetClientScript("Global","Startup Script")##--> <!--##=sTmplExpEnd##--> </body> </html> <!--##/session##-->
-
Warning: This step only for PHPMaker version 9.1.0 only! Do not do this step for PHPMaker < 9.1.0 as it will break your layout! Do step 5 for PHPMaker version < 9.1.0 or step 7 for PHPMaker version 9.2.0. Open your \Script\template.php file, and replace entire code inside that file with this following code (It is Strongly Recommended to backup your template.php file before doing this step!):
<!--##session common_config##--> <!--## // Export sProjName = PROJ.ProjName; sProjVar = PROJ.ProjVar; if (IsExport() || ew_IsNotEmpty(PROJ.AppRelatedProject)) { sTmplExpStart = "<?php if (@$gsExport == \"\") { ?>"; sTmplExpEnd = "<?php } ?>"; sTmplHtmlExpStart = "<?php if (@$gsExport == \"\" || @$gsExport == \"print\") { ?>"; sTmplHtmlExpEnd = "<?php } ?>"; sTmplPrintExpStart = "<?php if (@$gsExport == \"\" || @$gsExport == \"print\") { ?>"; } else { sTmplExpStart = ""; sTmplExpEnd = ""; sTmplHtmlExpStart = ""; sTmplHtmlExpEnd = ""; sTmplPrintExpStart = ""; } sTmplSkipStart = "<?php if (@!$gbSkipHeaderFooter) { ?>"; sTmplSkipEnd = "<?php } ?>"; // Config YUI options bUseYuiAddOpt = UseYuiAddOpt(); bUseEmailExport = UseEmailExport(); // Export to Email bUseTooltip = UseTooltip(); // Use Tooltip bUseYuiTab = UseYuiTab(); // Use Yui Tab bUseYuiContainer = (bUseYuiAddOpt || bUseEmailExport || bUseTooltip); // Use Yui Container bUseYuiButton = (bUseYuiAddOpt || bUseEmailExport); // Use Yui Button bUseYuiAutoComplete = bUseYuiAutoSuggest; // Use Yui AutoComplete bUseYuiResize = true; // Use Yui Resize bUseJSTemplate = true; // Use JS Template bDisableProjectStyles = PROJ.GetV("DisableProjectStyles"); ##--> <!--##/session##--> <!--##session header_top##--> <?php // Compatibility with PHP Report Maker if (!isset($Language)) { include_once "<!--##=ew_GetFileNameByCtrlID("ewconfig")##-->"; include_once "<!--##=ew_GetFileNameByCtrlID("ewshared")##-->"; $Language = new cLanguage(); } ?> <!--## if (PROJ.DocType == "HTML" || PROJ.DocType == "") { ##--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--## } else if (PROJ.DocType == "XHTML") { ##--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--## } else if (PROJ.DocType == "HTML5") { ##--> <!doctype html> <!--## } ##--> <html> <head> <title><?php echo $Language->ProjectPhrase("BodyTitle") ?></title> <!--##=sTmplExpStart##--> <!--##include ewmenuext.php/menuextcss##--> <!--## if (bUseYuiTab) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/tabview/assets/skins/sam/tabview.css"> <!--## } ##--> <!--## if (bUseYuiButton) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/button/assets/skins/sam/button.css" /> <!--## } ##--> <!--## if (bUseYuiContainer) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/container/assets/skins/sam/container.css" /> <!--## } ##--> <!--## if (bUseYuiAutoComplete) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/autocomplete/assets/skins/sam/autocomplete.css" /> <!--## } ##--> <!--## if (bUseYuiResize) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/resize/assets/skins/sam/resize.css"> <!--## } ##--> <!--##=sTmplExpEnd##--> <!--##=sTmplPrintExpStart##--> <!--## if (!bDisableProjectStyles) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo EW_PROJECT_STYLESHEET_FILENAME ?>" /> <?php if (ew_IsMobile()) { ?> <link rel="stylesheet" type="text/css" href="<!--##=ew_GetFileNameByCtrlID("ewmobile.css")##-->" /> <?php } ?> <!--## } ##--> <!--##=SYSTEMFUNCTIONS.CSSFile()##--> <script type="text/javascript" src="<?php echo ew_jQueryFile("jquery-%v.min.js") ?>"></script> <?php if (ew_IsMobile()) { ?> <link rel="stylesheet" type="text/css" href="<?php echo ew_jQueryFile("jquery.mobile-%v.min.css") ?>" /> <script type="text/javascript"> jQuery(document).bind("mobileinit", function() { jQuery.mobile.ajaxEnabled = false; jQuery.mobile.ignoreContentEnabled = true; }); </script> <script type="text/javascript" src="<?php echo ew_jQueryFile("jquery.mobile-%v.min.js") ?>"></script> <?php } ?> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/utilities/utilities.js"></script> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/json/json-min.js"></script> <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <!--## if (bUseYuiTab) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/tabview/tabview-min.js"></script> <!--## } ##--> <!--## if (bUseYuiButton) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/button/button-min.js"></script> <!--## } ##--> <!--## if (bUseYuiContainer) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/container/container-min.js"></script> <!--## } ##--> <!--## if (bUseYuiAutoSuggest) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/datasource/datasource-min.js"></script> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/autocomplete/autocomplete-min.js"></script> <!--## } else { ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("datenumber-min.js")##-->"></script> <!--## } ##--> <!--## if (bUseYuiResize) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/resize/resize-min.js"></script> <!--## } ##--> <!--##include ewmenuext.php/menuextjs##--> <!--##/session##--> <!--##session header_top_2##--> <script type="text/javascript"> var EW_LANGUAGE_ID = "<?php echo $gsLanguage ?>"; var EW_DATE_SEPARATOR = "<!--##=PROJ.DateSeparator##-->" || "/"; // Default date separator var EW_DECIMAL_POINT = "<?php echo $DEFAULT_DECIMAL_POINT ?>"; var EW_THOUSANDS_SEP = "<?php echo $DEFAULT_THOUSANDS_SEP ?>"; var EW_UPLOAD_ALLOWED_FILE_EXT = "<!--##=PROJ.UploadAllowedFileExt##-->"; // Allowed upload file extension // Ajax settings var EW_RECORD_DELIMITER = "\r"; var EW_FIELD_DELIMITER = "|"; var EW_LOOKUP_FILE_NAME = "<!--##=ew_GetFileNameByCtrlID("lookup")##-->"; // Lookup file name var EW_AUTO_SUGGEST_MAX_ENTRIES = <?php echo EW_AUTO_SUGGEST_MAX_ENTRIES ?>; // Auto-Suggest max entries // Common JavaScript messages var EW_ADDOPT_BUTTON_SUBMIT_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("AddBtn"))) ?>"; var EW_EMAIL_EXPORT_BUTTON_SUBMIT_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("SendEmailBtn"))) ?>"; var EW_BUTTON_CANCEL_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("CancelBtn"))) ?>"; <!--## if (bUseEmailExport) { ##--> var EW_MAX_EMAIL_RECIPIENT = <?php echo EW_MAX_EMAIL_RECIPIENT ?>; <!--## } ##--> var EW_DISABLE_BUTTON_ON_SUBMIT = <!--##=ew_JsVal(bDisableButtonOnSubmit)##-->; var EW_IMAGE_FOLDER = "<!--##=GetImageFolder()##-->"; // Image folder </script> <!--##=sTmplExpEnd##--> <!--##=sTmplPrintExpStart##--> <!--## if (bUseJSTemplate) { ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("jsrender.js")##-->"></script> <!--## } ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("ew.js")##-->"></script> <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("user.js")##-->"></script> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("scroll.js")##-->"></script> <script type="text/javascript"> <?php echo $Language->ToJSON() ?> </script> <!--## if (SYSTEMFUNCTIONS.ServerScriptExist("Global","Page_Head")) { ##--> <?php <!--##~SYSTEMFUNCTIONS.GetServerScript("Global","Page_Head")##--> ?> <!--## } ##--> <!--##~SYSTEMFUNCTIONS.GetClientScript("Global","Client Script")##--> <!--##=sTmplExpEnd##--> <!--##=SYSTEMFUNCTIONS.CharSet()##--> <!--##=SYSTEMFUNCTIONS.FavIcon()##--> <?php // Begin of modification Fixed Width Site, by Masino Sinaga, April 28, 2012 ?> <?php if (@$_GET["export"] == "") { ?> <?php $bordercolor = ""; ?> <style> html { height: auto; border-left: 1px solid <?php echo $bordercolor; ?>; border-right: 1px solid <?php echo $bordercolor; ?>; border-top: 1px solid <?php echo $bordercolor; ?>; border-bottom: 1px solid <?php echo $bordercolor; ?>; width: <?php echo (MS_TOTAL_WIDTH); ?>px; display: block; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; } body { background-color: inherit; /* background color */ color: inherit; /* text color */ margin: 0; /* top right bottom left */ width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: auto; display: block; } /* template layout */ .ewLayout { width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: 100%; } .ewContentTable { width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: 100%; clear: left; } .ewMenuColumn { width: <?php echo MS_VERTICAL_MENU_WIDTH; ?>px; } </style> <?php } ?> <?php // End of modification Fixed Width Site, by Masino Sinaga, April 28, 2012 ?> </head> <body class="yui-skin-sam"> <!--##=sTmplHtmlExpStart##--> <?php if (ew_IsMobile()) { ?> <div data-role="page"> <div data-role="header"> <a href="<!--##=ew_GetFileNameByCtrlID("mobilemenu")##-->"><?php echo $Language->Phrase("MobileMenu") ?></a> <h1 id="ewPageTitle"></h1> <!--## if (bSecurityEnabled) { ##--> <?php if (IsLoggedIn()) { ?> <a href="<!--##=sFnLogout##-->"><?php echo $Language->Phrase("Logout") ?></a> <?php } elseif (substr(ew_ScriptName(), 0 - strlen("<!--##=sFnLogin##-->")) <> "<!--##=sFnLogin##-->") { ?> <a href="<!--##=sFnLogin##-->"><?php echo $Language->Phrase("Login") ?></a> <?php } ?> <!--## } ##--> </div> <?php } ?> <!--##=sTmplHtmlExpEnd##--> <!--##=sTmplSkipStart##--> <!--##=sTmplExpStart##--> <div class="ewLayout"> <?php if (!ew_IsMobile()) { ?> <?php if (MS_SHOW_ENTIRE_HEADER) { // begin of show header block ?> <!-- header (begin) --><!-- *** Note: Only licensed users are allowed to change the logo *** --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="ewHeaderRow"> <td width="<?php echo (MS_LOGO_WIDTH); ?>px" rowspan="3"> <?php echo '<a href="." title="'.$Language->ProjectPhrase("BodyTitle").'"><!--##=SYSTEMFUNCTIONS.HeaderLogo()##--></a>'; ?> </td> <td> <?php if (MS_SHOW_SITE_TITLE_IN_HEADER) { ?> <font class="ewFooterText"><strong><div align="<?php echo MS_TEXT_ALIGN_IN_HEADER; ?>" style="text-transform:<?php echo MS_SITE_TITLE_TEXT_STYLE; ?>"><?php echo $Language->ProjectPhrase("BodyTitle") ?> </div></strong></font> <?php } ?> </td> </tr> <tr class="ewHeaderRow"> <td > <!--## if (PROJ.SecType != "None" && PROJ.SecType != "Hard Code") { ##--> <?php if (MS_SHOW_CURRENT_USER_IN_HEADER) { ?> <font class="ewFooterText"><div align="<?php echo MS_TEXT_ALIGN_IN_HEADER; ?>"><?php if ($Security->IsLoggedIn()=="login") { echo "". $Language->Phrase("UserID").": <strong>" . $Security->CurrentUserName() . "</strong>, [ <a onclick=\"return ew_Confirm('".$Language->Phrase("AskToLogout")."');\" href=logout.php>Logout</a> ]"; } ?> </div></font> <?php } ?> <!--## } ##--> </td> </tr> <tr class="ewHeaderRow"> <td> <!--## if (bMultiLanguage && arLanguageFile.length > 1) { ##--> <?php if (MS_LANGUAGE_SELECTOR_VISIBILITY=="inheader") { ?> <div align="<?php if (MS_LANGUAGE_SELECTOR_ALIGN=="autoadjust") { echo MS_TEXT_ALIGN_IN_HEADER; } else { echo MS_LANGUAGE_SELECTOR_ALIGN; } ?>"><form class="ewForm"> <span class="phpmaker"><?php echo $Language->Phrase("Language") ?></span> <select id="language" name="language" onchange="ew_SubmitLanguageForm(this.form);"> <?php foreach ($EW_LANGUAGE_FILE as $langfile) { ?> <option value="<?php echo $langfile[0] ?>"<?php if ($gsLanguage == $langfile[0]) echo " selected=\"selected\"" ?>><?php echo $langfile[1] ?></option> <?php } ?> </select> </form></div> <?php } ?> <!--## } ##--> </td> </tr> </table> <!-- header (end) --> <?php } else { // else of show entire header ?> <div class="ewHeaderRow"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="ewHeaderRow"> <td rowspan="2"> </td> <td> </td> </tr> <tr class="ewHeaderRow"> <td > </td> </tr> </table> </div> <?php } // end of show entire header ?> <?php } ?> <!--##/session##--> <!--##session menu##--> <?php if (ew_IsMobile()) { ?> <div data-role="content" data-enhance="false"> <table class="ewContentTable"> <tr> <?php } else { ?> <!-- content (begin) --> <table cellspacing="0" class="ewContentTable"> <tr> <td class="ewMenuColumn"> <!-- left column (begin) --> <!--##=SYSTEMFUNCTIONS.IncludeFile("menu","")##--> <!-- left column (end) --> </td> <?php } ?> <!--##/session##--> <!--##session header_bottom##--> <td class="ewContentColumn"> <!-- right column (begin) --> <!--## if (bMultiLanguage && arLanguageFile.length > 1) { ##--> <?php if (MS_LANGUAGE_SELECTOR_VISIBILITY=="belowheader") { ?> <div align="<?php if (MS_LANGUAGE_SELECTOR_ALIGN=="autoadjust") { echo MS_TEXT_ALIGN_IN_HEADER; } else { echo MS_LANGUAGE_SELECTOR_ALIGN; } ?>"><form class="ewForm"> <span class="phpmaker"><?php echo $Language->Phrase("Language") ?></span> <select id="language" name="language" onchange="ew_SubmitLanguageForm(this.form);"> <?php foreach ($EW_LANGUAGE_FILE as $langfile) { ?> <option value="<?php echo $langfile[0] ?>"<?php if ($gsLanguage == $langfile[0]) echo " selected=\"selected\"" ?>><?php echo $langfile[1] ?></option> <?php } ?> </select> </form></div> <?php } ?> <!--## } ##--> <?php if (!MS_SHOW_SITE_TITLE_IN_HEADER) { ?> <p class="phpmaker ewTitle"><b><?php echo $Language->ProjectPhrase("BodyTitle") ?></b></p> <?php } ?> <!--##=sTmplExpEnd##--> <!--##=sTmplSkipEnd##--> <!--##/session##--> <!--##session footer##--> <!--##=sTmplExpStart##--> <!--##=sTmplSkipStart##--> <p> </p> <!-- right column (end) --> <?php if (isset($gTimer)) $gTimer->Stop() ?> </td> </tr> </table> <!-- content (end) --> <?php if (!ew_IsMobile()) { ?> <?php if (MS_SHOW_ENTIRE_FOOTER) { // begin of show footer block ?> <!-- footer (begin) --> <div class="ewFooterRow"> <div class="ewFooterText"> <?php if (MS_SHOW_TEXT_IN_FOOTER) { ?> <?php echo $Language->ProjectPhrase("FooterText") ?> <?php } ?> <?php if (MS_SHOW_BACKTOTOP_ON_FOOTER) { ?> | <a id="gotop" href="#" onclick="MGJS.goTop();return false;"><?php echo $Language->Phrase("BackToTop"); ?></a> <?php } ?> <?php if (MS_SHOW_TOC_ON_FOOTER) { ?> | <a href="javascript:popupWindow('toc.php')"><?php echo $Language->Phrase("TaCTitle"); ?></a> <?php } ?> </div> <!-- Place other links, for example, disclaimer, here --> </div> <!-- footer (end) --> <?php } // end of show footer block ?> <?php } ?> </div> <!--##=sTmplSkipEnd##--> <!--##=sTmplHtmlExpStart##--> <?php if (ew_IsMobile()) { ?> </div> <!-- footer (begin) --><!-- *** Note: Only licensed users are allowed to remove or change the following copyright statement. *** --> <!-- *** Remove comment lines to show footer for mobile <div data-role="footer"> <h4> <?php echo $Language->ProjectPhrase("FooterText") ?></h4> </div> *** --> <!-- footer (end) --> </div> <script type="text/javascript"> ew_Select("#ewPageTitle")[0].innerHTML = ew_Select("#ewPageCaption")[0].innerHTML; </script> <?php } ?> <!--##=sTmplHtmlExpEnd##--> <!--## if (bUseYuiAddOpt) { ##--> <table class="ewStdTable"><tbody><tr><td><div id="ewAddOptDialog" class="phpmaker"></div></td></tr></tbody></table> <!--## } ##--> <!--## if (bUseEmailExport) { ##--> <table class="ewStdTable"><tbody><tr><td><div id="ewEmailDialog" class="phpmaker" style="visibility: hidden;"> <!--##=SYSTEMFUNCTIONS.IncludeFile("ewemail","other")##--> </div></td></tr></tbody></table> <!--## } ##--> <div class="yui-tt" id="ewTooltipDiv" style="visibility: hidden; border: 0px;"></div> <!--##=sTmplExpEnd##--> <script type="text/javascript"> <!--##=sTmplPrintExpStart##--> ew_Select("table." + EW_TABLE_CLASSNAME, document, ew_SetupTable); // Init tables ew_Select("table." + EW_GRID_CLASSNAME, document, ew_SetupGrid); // Init grids <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <!--## if (bUseYuiAddOpt) { ##--> ew_InitAddOptDialog(); // Init the add option dialog <!--## } ##--> <!--## if (bUseEmailExport) { ##--> ew_InitEmailDialog(); // Init the email dialog <!--## } ##--> <!--## if (bUseTooltip) { ##--> ew_InitTooltipDiv(); // init tooltip div <!--## } ##--> <!--##=sTmplExpEnd##--> <!--## if (bUseJavaScriptMessage) { ##--> ew_ShowMessage(); // Show message <!--## } ##--> </script> <!--##=sTmplExpStart##--> <!--##~SYSTEMFUNCTIONS.GetClientScript("Global","Startup Script")##--> <!--##=sTmplExpEnd##--> </body> </html> <!--##/session##-->
-
Warning: This step only for PHPMaker version 9.2.0 only! Do not do this following step for PHPMaker version < 9.2.0 as it will break your layout! Do step 5 for PHPMaker version < 9.1.0, or step 6 for PHPMaker version 9.1.0. Open your \Script\template.php file, and replace entire code inside that file with this following code (It is Strongly Recommended to backup your template.php file before doing this step!):
<!--##session common_config##--> <!--## // Export sProjName = PROJ.ProjName; sProjVar = PROJ.ProjVar; if (IsExport() || ew_IsNotEmpty(PROJ.AppRelatedProject)) { sTmplExpStart = "<?php if (@$gsExport == \"\") { ?>"; sTmplExpEnd = "<?php } ?>"; sTmplHtmlExpStart = "<?php if (@$gsExport == \"\" || @$gsExport == \"print\") { ?>"; sTmplHtmlExpEnd = "<?php } ?>"; sTmplPrintExpStart = "<?php if (@$gsExport == \"\" || @$gsExport == \"print\") { ?>"; } else { sTmplExpStart = ""; sTmplExpEnd = ""; sTmplHtmlExpStart = ""; sTmplHtmlExpEnd = ""; sTmplPrintExpStart = ""; } sTmplSkipStart = "<?php if (@!$gbSkipHeaderFooter) { ?>"; sTmplSkipEnd = "<?php } ?>"; // Config YUI options bUseYuiAddOpt = UseYuiAddOpt(); bUseEmailExport = UseEmailExport(); // Export to Email bUseTooltip = UseTooltip(); // Use Tooltip bUseYuiTab = UseYuiTab(); // Use Yui Tab bUseYuiContainer = (bUseYuiAddOpt || bUseEmailExport || bUseTooltip); // Use Yui Container bUseYuiButton = (bUseYuiAddOpt || bUseEmailExport); // Use Yui Button bUseYuiAutoComplete = bUseYuiAutoSuggest; // Use Yui AutoComplete bUseYuiResize = true; // Use Yui Resize bUseJSTemplate = true; // Use JS Template bDisableProjectStyles = PROJ.GetV("DisableProjectStyles"); ##--> <!--##/session##--> <!--##session header_top##--> <?php // Compatibility with PHP Report Maker if (!isset($Language)) { include_once "<!--##=ew_GetFileNameByCtrlID("ewconfig")##-->"; include_once "<!--##=ew_GetFileNameByCtrlID("ewshared")##-->"; $Language = new cLanguage(); } ?> <!--## if (PROJ.DocType == "HTML" || PROJ.DocType == "") { ##--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--## } else if (PROJ.DocType == "XHTML") { ##--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--## } else if (PROJ.DocType == "HTML5") { ##--> <!doctype html> <!--## } ##--> <html> <head> <title><?php echo $Language->ProjectPhrase("BodyTitle") ?></title> <!--##=sTmplExpStart##--> <!--##include ewmenuext.php/menuextcss##--> <!--## if (bUseYuiTab) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/tabview/assets/skins/sam/tabview.css"> <!--## } ##--> <!--## if (bUseYuiButton) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/button/assets/skins/sam/button.css" /> <!--## } ##--> <!--## if (bUseYuiContainer) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/container/assets/skins/sam/container.css" /> <!--## } ##--> <!--## if (bUseYuiAutoComplete) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/autocomplete/assets/skins/sam/autocomplete.css" /> <!--## } ##--> <!--## if (bUseYuiResize) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo ew_YuiHost() ?>build/resize/assets/skins/sam/resize.css"> <!--## } ##--> <!--##=sTmplExpEnd##--> <!--##=sTmplPrintExpStart##--> <!--## if (!bDisableProjectStyles) { ##--> <link rel="stylesheet" type="text/css" href="<?php echo EW_PROJECT_STYLESHEET_FILENAME ?>" /> <?php if (ew_IsMobile()) { ?> <link rel="stylesheet" type="text/css" href="<!--##=ew_GetFileNameByCtrlID("ewmobile.css")##-->" /> <?php } ?> <!--## } ##--> <!--##=SYSTEMFUNCTIONS.CSSFile()##--> <script type="text/javascript" src="<?php echo ew_jQueryFile("jquery-%v.min.js") ?>"></script> <?php if (ew_IsMobile()) { ?> <link rel="stylesheet" type="text/css" href="<?php echo ew_jQueryFile("jquery.mobile-%v.min.css") ?>" /> <script type="text/javascript"> jQuery(document).bind("mobileinit", function() { jQuery.mobile.ajaxEnabled = false; jQuery.mobile.ignoreContentEnabled = true; }); </script> <script type="text/javascript" src="<?php echo ew_jQueryFile("jquery.mobile-%v.min.js") ?>"></script> <?php } ?> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/utilities/utilities.js"></script> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/json/json-min.js"></script> <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <!--## if (bUseYuiTab) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/tabview/tabview-min.js"></script> <!--## } ##--> <!--## if (bUseYuiButton) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/button/button-min.js"></script> <!--## } ##--> <!--## if (bUseYuiContainer) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/container/container-min.js"></script> <!--## } ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/datasource/datasource-min.js"></script> <!--## if (bUseYuiAutoSuggest) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/autocomplete/autocomplete-min.js"></script> <!--## } ##--> <!--## if (bUseYuiResize) { ##--> <script type="text/javascript" src="<?php echo ew_YuiHost() ?>build/resize/resize-min.js"></script> <!--## } ##--> <!--##include ewmenuext.php/menuextjs##--> <!--##/session##--> <!--##session header_top_2##--> <script type="text/javascript"> var EW_LANGUAGE_ID = "<?php echo $gsLanguage ?>"; var EW_DATE_SEPARATOR = "<!--##=PROJ.DateSeparator##-->" || "/"; // Default date separator var EW_DECIMAL_POINT = "<?php echo $DEFAULT_DECIMAL_POINT ?>"; var EW_THOUSANDS_SEP = "<?php echo $DEFAULT_THOUSANDS_SEP ?>"; var EW_UPLOAD_ALLOWED_FILE_EXT = "<!--##=PROJ.UploadAllowedFileExt##-->"; // Allowed upload file extension // Ajax settings var EW_RECORD_DELIMITER = "\r"; var EW_FIELD_DELIMITER = "|"; var EW_LOOKUP_FILE_NAME = "<!--##=ew_GetFileNameByCtrlID("lookup")##-->"; // Lookup file name var EW_AUTO_SUGGEST_MAX_ENTRIES = <?php echo EW_AUTO_SUGGEST_MAX_ENTRIES ?>; // Auto-Suggest max entries // Common JavaScript messages var EW_ADDOPT_BUTTON_SUBMIT_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("AddBtn"))) ?>"; var EW_EMAIL_EXPORT_BUTTON_SUBMIT_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("SendEmailBtn"))) ?>"; var EW_BUTTON_CANCEL_TEXT = "<?php echo ew_JsEncode2(ew_BtnCaption($Language->Phrase("CancelBtn"))) ?>"; <!--## if (bUseEmailExport) { ##--> var EW_MAX_EMAIL_RECIPIENT = <?php echo EW_MAX_EMAIL_RECIPIENT ?>; <!--## } ##--> var EW_DISABLE_BUTTON_ON_SUBMIT = <!--##=ew_JsVal(bDisableButtonOnSubmit)##-->; var EW_IMAGE_FOLDER = "<!--##=GetImageFolder()##-->"; // Image folder </script> <!--##=sTmplExpEnd##--> <!--##=sTmplPrintExpStart##--> <!--## if (bUseJSTemplate) { ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("jsrender.js")##-->"></script> <!--## } ##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("ew.js")##-->"></script> <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("user.js")##-->"></script> <script type="text/javascript" src="<!--##=ew_GetFileNameByCtrlID("scroll.js")##-->"></script> <script type="text/javascript"> <?php echo $Language->ToJSON() ?> </script> <!--## if (SYSTEMFUNCTIONS.ServerScriptExist("Global","Page_Head")) { ##--> <?php <!--##~SYSTEMFUNCTIONS.GetServerScript("Global","Page_Head")##--> ?> <!--## } ##--> <!--##~SYSTEMFUNCTIONS.GetClientScript("Global","Client Script")##--> <!--##=sTmplExpEnd##--> <!--##=SYSTEMFUNCTIONS.CharSet()##--> <!--##=SYSTEMFUNCTIONS.FavIcon()##--> <?php // Begin of modification Fixed Width Site, by Masino Sinaga, April 28, 2012 ?> <?php if (@$_GET["export"] == "") { ?> <?php $bordercolor = ""; ?> <style> html { height: auto; border-left: 1px solid <?php echo $bordercolor; ?>; border-right: 1px solid <?php echo $bordercolor; ?>; border-top: 1px solid <?php echo $bordercolor; ?>; border-bottom: 1px solid <?php echo $bordercolor; ?>; width: <?php echo (MS_TOTAL_WIDTH); ?>px; display: block; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 10px; } body { background-color: inherit; /* background color */ color: inherit; /* text color */ margin: 0; /* top right bottom left */ width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: auto; display: block; } /* template layout */ .ewLayout { width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: 100%; } .ewContentTable { width: <?php echo (MS_TOTAL_WIDTH); ?>px; height: 100%; clear: left; } .ewMenuColumn { width: <?php echo MS_VERTICAL_MENU_WIDTH; ?>px; } </style> <?php } ?> <?php // End of modification Fixed Width Site, by Masino Sinaga, April 28, 2012 ?> </head> <body class="yui-skin-sam"> <!--##=sTmplHtmlExpStart##--> <?php if (ew_IsMobile()) { ?> <div data-role="page"> <div data-role="header"> <a href="<!--##=ew_GetFileNameByCtrlID("mobilemenu")##-->"><?php echo $Language->Phrase("MobileMenu") ?></a> <h1 id="ewPageTitle"></h1> <!--## if (bSecurityEnabled) { ##--> <?php if (IsLoggedIn()) { ?> <a href="<!--##=sFnLogout##-->"><?php echo $Language->Phrase("Logout") ?></a> <?php } elseif (substr(ew_ScriptName(), 0 - strlen("<!--##=sFnLogin##-->")) <> "<!--##=sFnLogin##-->") { ?> <a href="<!--##=sFnLogin##-->"><?php echo $Language->Phrase("Login") ?></a> <?php } ?> <!--## } ##--> </div> <?php } ?> <!--##=sTmplHtmlExpEnd##--> <!--##=sTmplSkipStart##--> <!--##=sTmplExpStart##--> <div class="ewLayout"> <?php if (!ew_IsMobile()) { ?> <?php if (MS_SHOW_ENTIRE_HEADER) { // begin of show header block ?> <!-- header (begin) --><!-- *** Note: Only licensed users are allowed to change the logo *** --> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="ewHeaderRow"> <td width="<?php echo (MS_LOGO_WIDTH); ?>px" rowspan="3"> <?php echo '<a href="." title="'.$Language->ProjectPhrase("BodyTitle").'"><!--##=SYSTEMFUNCTIONS.HeaderLogo()##--></a>'; ?> </td> <td> <?php if (MS_SHOW_SITE_TITLE_IN_HEADER) { ?> <font class="ewFooterText"><strong><div align="<?php echo MS_TEXT_ALIGN_IN_HEADER; ?>" style="text-transform:<?php echo MS_SITE_TITLE_TEXT_STYLE; ?>"><?php echo $Language->ProjectPhrase("BodyTitle") ?> </div></strong></font> <?php } ?> </td> </tr> <tr class="ewHeaderRow"> <td > <!--## if (PROJ.SecType != "None" && PROJ.SecType != "Hard Code") { ##--> <?php if (MS_SHOW_CURRENT_USER_IN_HEADER) { ?> <font class="ewFooterText"><div align="<?php echo MS_TEXT_ALIGN_IN_HEADER; ?>"><?php if ($Security->IsLoggedIn()=="login") { echo "". $Language->Phrase("UserID").": <strong>" . $Security->CurrentUserName() . "</strong>, [ <a onclick=\"return ew_Confirm('".$Language->Phrase("AskToLogout")."');\" href=logout.php>Logout</a> ]"; } ?> </div></font> <?php } ?> <!--## } ##--> </td> </tr> <tr class="ewHeaderRow"> <td> <!--## if (bMultiLanguage && arLanguageFile.length > 1) { ##--> <?php if (MS_LANGUAGE_SELECTOR_VISIBILITY=="inheader") { ?> <div align="<?php if (MS_LANGUAGE_SELECTOR_ALIGN=="autoadjust") { echo MS_TEXT_ALIGN_IN_HEADER; } else { echo MS_LANGUAGE_SELECTOR_ALIGN; } ?>"><form class="ewForm"> <span class="phpmaker"><?php echo $Language->Phrase("Language") ?></span> <select id="language" name="language" onchange="ew_SubmitLanguageForm(this.form);"> <?php foreach ($EW_LANGUAGE_FILE as $langfile) { ?> <option value="<?php echo $langfile[0] ?>"<?php if ($gsLanguage == $langfile[0]) echo " selected=\"selected\"" ?>><?php echo $langfile[1] ?></option> <?php } ?> </select> </form></div> <?php } ?> <!--## } ##--> </td> </tr> </table> <!-- header (end) --> <?php } else { // else of show entire header ?> <div class="ewHeaderRow"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="ewHeaderRow"> <td rowspan="2"> </td> <td> </td> </tr> <tr class="ewHeaderRow"> <td > </td> </tr> </table> </div> <?php } // end of show entire header ?> <?php } ?> <!--##/session##--> <!--##session menu##--> <?php if (ew_IsMobile()) { ?> <div data-role="content" data-enhance="false"> <table class="ewContentTable"> <tr> <?php } else { ?> <!-- content (begin) --> <table cellspacing="0" class="ewContentTable"> <tr> <td class="ewMenuColumn"> <!-- left column (begin) --> <!--##=SYSTEMFUNCTIONS.IncludeFile("menu","")##--> <!-- left column (end) --> </td> <?php } ?> <!--##/session##--> <!--##session header_bottom##--> <td class="ewContentColumn"> <!-- right column (begin) --> <!--## if (bMultiLanguage && arLanguageFile.length > 1) { ##--> <?php if (MS_LANGUAGE_SELECTOR_VISIBILITY=="belowheader") { ?> <div align="<?php if (MS_LANGUAGE_SELECTOR_ALIGN=="autoadjust") { echo MS_TEXT_ALIGN_IN_HEADER; } else { echo MS_LANGUAGE_SELECTOR_ALIGN; } ?>"><form class="ewForm"> <span class="phpmaker"><?php echo $Language->Phrase("Language") ?></span> <select id="language" name="language" onchange="ew_SubmitLanguageForm(this.form);"> <?php foreach ($EW_LANGUAGE_FILE as $langfile) { ?> <option value="<?php echo $langfile[0] ?>"<?php if ($gsLanguage == $langfile[0]) echo " selected=\"selected\"" ?>><?php echo $langfile[1] ?></option> <?php } ?> </select> </form></div> <?php } ?> <!--## } ##--> <?php if (!MS_SHOW_SITE_TITLE_IN_HEADER) { ?> <p class="phpmaker ewTitle"><b><?php echo $Language->ProjectPhrase("BodyTitle") ?></b></p> <?php } ?> <!--##=sTmplExpEnd##--> <!--##=sTmplSkipEnd##--> <!--##/session##--> <!--##session footer##--> <!--##=sTmplExpStart##--> <!--##=sTmplSkipStart##--> <p> </p> <!-- right column (end) --> <?php if (isset($gTimer)) $gTimer->Stop() ?> </td> </tr> </table> <!-- content (end) --> <?php if (!ew_IsMobile()) { ?> <?php if (MS_SHOW_ENTIRE_FOOTER) { // begin of show footer block ?> <!-- footer (begin) --> <div class="ewFooterRow"> <div class="ewFooterText"> <?php if (MS_SHOW_TEXT_IN_FOOTER) { ?> <?php echo $Language->ProjectPhrase("FooterText") ?> <?php } ?> <?php if (MS_SHOW_BACKTOTOP_ON_FOOTER) { ?> | <a id="gotop" href="#" onclick="MGJS.goTop();return false;"><?php echo $Language->Phrase("BackToTop"); ?></a> <?php } ?> <?php if (MS_SHOW_TOC_ON_FOOTER) { ?> | <a href="javascript:popupWindow('toc.php')"><?php echo $Language->Phrase("TaCTitle"); ?></a> <?php } ?> </div> <!-- Place other links, for example, disclaimer, here --> </div> <!-- footer (end) --> <?php } // end of show footer block ?> <?php } ?> </div> <!--##=sTmplSkipEnd##--> <!--##=sTmplHtmlExpStart##--> <?php if (ew_IsMobile()) { ?> </div> <!-- footer (begin) --><!-- *** Note: Only licensed users are allowed to remove or change the following copyright statement. *** --> <!-- *** Remove comment lines to show footer for mobile <div data-role="footer"> <h4> <?php echo $Language->ProjectPhrase("FooterText") ?></h4> </div> *** --> <!-- footer (end) --> </div> <script type="text/javascript"> $("#ewPageTitle").html($("#ewPageCaption").text()); </script> <?php } ?> <?php if (@$_GET["_row"] <> "") { ?> <script type="text/javascript"> ewLang.later(1000, null, function() { var el = document.getElementById("<?php echo $_GET["_row"] ?>"); if (el) el.scrollIntoView(); }); </script> <?php } ?> <!--##=sTmplHtmlExpEnd##--> <!--## if (bUseYuiAddOpt) { ##--> <table class="ewStdTable"><tbody><tr><td><div id="ewAddOptDialog" class="phpmaker"></div></td></tr></tbody></table> <!--## } ##--> <!--## if (bUseEmailExport) { ##--> <table class="ewStdTable"><tbody><tr><td><div id="ewEmailDialog" class="phpmaker" style="visibility: hidden;"> <!--##=SYSTEMFUNCTIONS.IncludeFile("ewemail","other")##--> </div></td></tr></tbody></table> <!--## } ##--> <div class="yui-tt" id="ewTooltipDiv" style="visibility: hidden; border: 0px;"></div> <!--##=sTmplExpEnd##--> <script type="text/javascript"> <!--##=sTmplPrintExpStart##--> ew_Select("table." + EW_TABLE_CLASSNAME, document, ew_SetupTable); // Init tables ew_Select("table." + EW_GRID_CLASSNAME, document, ew_SetupGrid); // Init grids <!--##=sTmplExpEnd##--> <!--##=sTmplExpStart##--> <!--## if (bUseYuiAddOpt) { ##--> ew_InitAddOptDialog(); // Init the add option dialog <!--## } ##--> <!--## if (bUseEmailExport) { ##--> ew_InitEmailDialog(); // Init the email dialog <!--## } ##--> <!--## if (bUseTooltip) { ##--> ew_InitTooltipDiv(); // init tooltip div <!--## } ##--> <!--##=sTmplExpEnd##--> <!--## if (bUseJavaScriptMessage) { ##--> ew_ShowMessage(); // Show message <!--## } ##--> </script> <!--##=sTmplExpStart##--> <!--##~SYSTEMFUNCTIONS.GetClientScript("Global","Startup Script")##--> <!--##=sTmplExpEnd##--> </body> </html> <!--##/session##-->
- Download scroll.zip file, and then extract it. There is one file inside named scroll.js. Put this scroll.js file into your C:\Documents and Settings\{YourName}\My Documents\PHPMaker\Templates\phpv90.zip\Script directory. Afterwards, re-generate your script files using PHPMaker as usual.
[/hidepost]
Andrew Pietrzyk says
Is there a 9.1.0 confirmation on this yet? I tried it out and had a failure during script gen….
Masino Sinaga says
Andrew, do not do step 5 for PHPMaker < 9.1.0 since there are several changes in 9.1.0 template. I am still working on it for >= 9.1.0. Will let you know afterwards. Thanks.
Masino Sinaga says
Andrew, I just added step 6 for PHPMaker >= 9.1.0. I had already tested it and it works properly now. Please try it by yourself. Thanks.
Adam Burgoyne says
There seems to be some formatting issue in the header after applying this modification.
With MS_SHOW_SITE_TITLE_IN_HEADER and MS_SHOW_CURRENT_USER_IN_HEADER = FALSE
– Firefox: there is a gap of about 20px between the bottom of the default logo and the menu
– Chrome: as with Firefox but the gap is only about 4px
With MS_SHOW_SITE_TITLE_IN_HEADER and MS_SHOW_CURRENT_USER_IN_HEADER = TRUE
– Firefox: there is a gap of about 20px between the bottom of the default logo and the menu plus there is a gap of about 25px between the site title and the user name
– Chrome: as with Firefox, the gap below the logo is about 20px but there is no spacing between the site title and the user name
I checked the new header code carefully and also viewed the page output in Firefox using FireBug – it looks like the ewHeaderRow rows are just too tall
Any ideas?
Adam Burgoyne says
Think I’ve found it.. there’s an ” ” following the logo in the following cell:
<td width="px” rowspan=”3″>
The space is being forced to wrap because the cell width is fixed at the width of the logo!
Adam Burgoyne says
Oops… code got filtered out again! … anyway, it’s the table cell containing the logo image – removing the trailing space has fixed the layout in both browsers.
Masino Sinaga says
Please re-post your comment which contains the code using the Code Tags I sent to your email.