PHPMaker - The Best PHP Code Generator Ever !

Preview:

DESCRIPTION

PHPMaker - The Best PHP Code Generator Ever ! It's time for you as the web developers to change your method in the web application development. PHPMaker can save tons of your time to develop and maintain many web applications. Why don't you leave your old method to develop web applications starting today? No need to write the code from scratch anymore.

Citation preview

PHPMaker – The Best PHP Code Generator Ever !

by Masino Sinaga masino.sinaga@gmail.com

http://www.ilovephpmaker.com

Why PHPMaker is The Best (1 of 3)

• It can generate all the script files for a web app within only a few minutes,

• All script files are linked up properly; no need to customize the generated code,

• Easy to implement Business Logic and Business Process using Server Events and Client Scripts,

• Easy to customize the generated look and feel by using Custom Templates and or Extensions,

• Easy to incorporate the external pages to the current project,

Why PHPMaker is The Best (2 of 3)

• All the work and changes are saved in a project file and auto-backup the latest 10 changed files,

• Easy to maintain (load the project file in future, auto-update project file for the latest version PHPMaker),

• Easy to customize the template by creating your own Extensions or use the ready Extensions,

• The generated codes are clean, straightforward, and easy-to-learn,

• Complete solutions to develop web apps (almost web apps features have been included),

Why PHPMaker is The Best (3 of 3)

• Lots of Server Events and Client Scripts to customize web apps easily and quickly,

• Rich and Strong of Template Object Properties,• Always using the latest technology such as: AJAX,

jQuery, Less, Bootstrap, HTML5, PHP5,• Updated every year for the major release,• Updated every three months for the minor

release,• Great support via Email and Discussion Forum.

Who Should Use PHPMaker (1 of 2)

• Those who want to develop the web apps which have the must features in a web app,

• Those who want to be focus on implementing the business logic and or business process instead of creating the common features of a web app,

• Those who don’t want to write the code from scratch and don’t want to reinvent the wheel,

• Those who want to maintain so many web apps at the same time simultaneously,

• Those who don’t want to write hundreds or even thousands lines of code which will make life gets boring,

Who Should Use PHPMaker (2 of 2)

• Those who want to create web apps that basically need the CRUDS operations; including: the Login page, Registration Page, Terms and Conditions, Forgot Password Page, Change Password Page, Users Management, RBAC, etc,

• Those who will create the web apps for the very first time (beginner web developer),

• Those who need to learn the complete and integrated features of the web apps,

• Those who don’t want to miss the latest web technologies.

Project Based File

• Saving and restoring all the related project settings into and from the Project File.

• Auto update Project File to the latest PHPMaker version.

• Auto backup for the latest 10 versions of Project File.• Including the Project Name and Project ID• Easy to Save As to create a new project based on the

existing one.• Easy to Save a Copy to backup the existing project.

Database Setup

• Supports for MySQL, MS SQL Server, MS Access, PostgreSQL, and Oracle databases.

• Direct connection (default).• URL connection (for remote database).• SQL Identifier Quote Character.• Optional Dynamic Table Loading.• Load from .pmp (PHPMaker Project) File.• Auto-synchronize the database changes.

PHP Settings (1 of 4)

• Add shell call for Unix-based server.• Set locale to use the correct local setting.• Caching in browser.• MySQLi extension.• Default Date Format.• Multi-Language.• Default Language.

PHP Settings (2 of 4)

• List and View Page Options (Global).• Default Records per Page.• Selectable page sizes.• Pagination Style (Button or Links).• Sort type (None, Single, Multiple column).• Multiple column n records per row.• File Upload to folder or database.• Audit Trail to Database or File.

PHP Settings (3 of 4)

• Server Side Validation.• Paging section at top and or bottom of page.• Paging section in View and or Edit page.• Multiple delete or Inline delete.• Links on Left or Right side.• Use buttons as links.• Use button dropdown for links.• Use button dropdown in paging section.

PHP Settings (4 of 4)

• Export to Excel, CSV, Word, HTML, XML, PDF, Email, and Printer Friendly.

• Enable Export in List and or View page.• Use button dropdown in Export Options.• Optional Displaying Image and Text in Export

Options.• Export records type: All pages, Current page,

or selected records.

Email Settings

• SMTP Server.• SMTP Server Port.• SMTP Server Username.• SMTP Server Password.• Sender Email.• Recipient Email.• Security Email Type.

HTML Settings

• Application Title (supports for Multi language).• Charset Type.• Site icon.• Site header logo.• Site footer text (supports for Multi language).• Theme Editor and Preview.• CSS Styles Editor.• Supports for LESS; the Dynamic Stylesheet

Language.

Security Settings (1 of 5)

• Administrator Login (hard-coded).• User Security Table for Login.• Login Options (Auto-login, Remember Me,

Always Ask).• Anonymous User access.• User ID, User Level, and User Level Permission.• Static and or Dynamic Security.• Roles Based on Access Control (RBAC).

Security Settings (2 of 5)

• User Login Options.• Track failed attempts.• Maximum failed attempts.• Optional Disallow concurrent login.• Login status timeout in minutes.• CAPTCHA security code on Login page.• Optional MD5 hash password.• Optional Password Expiry time in days.

Security Settings (3 of 5)

• User Registration Page.• Confirmation before Submit.• Send Email after Registration.• Optional Requires activation.• Auto-login after registration/activation.• CAPTCHA security code on registration page.• Password Strength Meter (via extension).• Password Policy (via extension).

Security Settings (4 of 5)

• Change Password Page.• Automatic displayed and force users to change

password when it has expired.• Send Email on Change Password.• CAPTCHA security code on change password.• Password Strength Meter (via extension).• Password Policy (via extension).

Security Settings (5 of 5)

• Password Recovery page (Forgot Password).• CAPTCHA security code on Forgot Password

page.• Send email after recovering the password.• Multiple Email Template for Multi Language

project.

Tables Setup (1 of 2)

• Filter and or Sort Recordset .• Default Table Loading.• Inline Add, Inline Copy, Inline Edit, Grid Add,

Grid Edit, Detail Add, Detail Edit, Detail View.• Multiple Detail Tables, Detail Record Count.• Sequence Record Number.• Requires Search Criteria.• Audit Trail

Tables Setup (2 of 2)

• View Pages.• Add and or Copy Pages including Confirmation

Page.• Delete Pages including Confirmation Page .• Edit Pages including Confirmation Page.• Check Conflict on Edit Records.• Multi-Update including Confirmation Page.• Search (Basic and Advanced Search).

Fields Setup (1 of 2)

• DIV Tag Attributes (Align, Italic, Bold, Custom Attributes).

• Hyperlink Fields.• Tooltip Fields.• Edit Tag (Text, Password, Radio, Checkbox,

Select/Combobox, TextArea, File, and Hidden).• Lookup Table and Fields with optional AJAX.• Auto-Update Value.

Fields Setup (2 of 2)

• Group Fields for Multiple Page.• Lookup Fields (Filter, Order By, Distinct, Auto

Fill, Allow Add, Allow Sort/Search, Text Input for Search).

• Dynamic Selection for Select/Combobox Fields.

• Default Value for Add and or Edit pages.

Tools

• Database synchronization.• Auto synchronize on load project file.• Multi Language Property Editor.• Extensions.• Menu Editor.• Advanced Settings.• Delete Template Caches.• Copy Table and Field Settings.

Database Synchronization

• Imagine if your web app uses hundreds tables/views, lots of changes have been occured, and you want to make sure all the changes have been implemented to your web app.

• PHPMaker can synchronize all the changes by doing one click only!

• This will ensure you to implement the latest changes in database to your web app quickly and correctly.

• You can even set to Auto-Synchronize to detect the database changes when loading the project.

Multi Language Property Editor

• Imagine if you want to create a multi language web app and you have to translate all the table captions, table fields, labels on form, the project related phrases, or even the custom language phrases.

• PHPMaker provides Multi Language Property Editor to allow you managing all the custom language phrases easily and quickly.

• The language files are saved in XML format. You can also customize the XML language file.

• The phrases are loaded based on the related phrases which are needed on the page (loading faster).

Extensions

• Imagine if you want to enhance or extend the ability of your web apps without customizing the template file manually.

• PHPMaker provides some great extensions which will save tons of your time to customize your web apps quickly and easily.

• You can even create your own extensions and use them for your own PHPMaker project.

PHPMaker Extensions

• CAPTCHA,• CKEditor, TinyMCE,• Preview,• PHPExcel,• FCKeditorFileManager,• HorizontalMenu,• PHP Thumb Library,• DOMPDF,• JSCalendar,• ScrollingTable.

Masino Extensions

• MasinoCAPTCHA10,• MasinoCustomCSS10,• MasinoForgotPwd10,• MasinoChangePwd10,• MasinoLogin10,• MasinoRegister10,• MasinoHeaderFooter10,• MasinoHorizontalVertical10,• MasinoFixedWidthSite10.• Get it from: http://www.ilovephpmaker.com

Menu Editor

• Add Menu Items.• Delete Menu Items.• Reordering Menu Items.• Import Menu Items from PHP Report Maker.• Multi Language Menu Editor.• Expand and Collapsing Menu Item.• Show Checked Menu Items only.

Advanced Settings (1 of 8)

• Auto-Update values.• Custom validation functions.• Script engine timeout in seconds.• Optional UTF-8 output files.• IIS Express (iisexpress.exe) path • IIS Exporess port.• PHP CGI (php-cgi.exe) path.

Advanced Settings (2 of 8)

• Project Name.• Project ID.• Optional Debug Mode.• Compress project .css file.• Compress project .js file.• Disable project CSS styles.• Character encoding (for Ajax/iconv).• File system encoding.

Advanced Settings (3 of 8)

• MySQL Charset (for SET NAMES).• Optional Validate NOT NULL fields.• Default time zone.• Optional Use DOM XML for Language object.• Optional Use Javascript popup message.• Optional Use datenumber.js file.• Optional Disable button on submit.• Optional Allow login by URL.

Advanced Settings (4 of 8)

• Optional Remove XSS.• Composite key separator.• Export all time limit.• Optional Export field caption.• Optional Export original values.• Optional Export CSS styles.• Optional Format output for XML export.• Optional Export master record.

Advanced Settings (5 of 8)

• Export master record for CSV.• Optional Show vertical master record in List page.• XML Language files.• Optional Allow no paging section.• Optional Use hierarchical User ID.• Optional Use subquery for master/detail.• Optional Initiate search panel as collapsed.• Blob field byte count for hash value calculation.

Advanced Settings (6 of 8)

• Optional Separate permissions for List, View, and Search page.

• Oracle Charset.• Auto-Suggest maximum display entries.• Optional Auto-Suggest for all display fields.• Optional Create upload file on copy.• Grid-Add row count.• Optional Use View Tag number of decimal digits

for edit.

Advanced Settings (7 of 8)

• Thumbnail default width (px).• Thumbnail default height (px).• Thumbnail default quality (JPEG).• Search multiple value option.• Optional Replace textarea by text input for search.• Optional Use ILIKE operator (PostgreSQL).• Collation for LIKE operator (MySQL).• Collation for LIKE operator (MS SQL Server).

Advanced Settings (8 of 8)

• Max email recipient.• Max email sent count per session.• Optional Use User ID for Audit Trail.• Optional Use Mobile Menu.• Optional Reflow HTML elements for mobile.• Optional Use place holder for Text Box.

Delete Template Cache Files

• Sometimes after you customized the template file and while generating the script files, you will get the error from PHPMaker application.

• This can be happened if the template is not customized correctly and needs to be cleared.

• Delete Template Cache Files is useful to remove all the template cache files so that PHPMaker will generate the new template cache files in the next generation process.

Copy Table Settings

• Most of the times, you create a Database View based on the current table.

• Instead of setting up the table setting in that Database View from beginning, you should use Copy Table Settings menu to copy all the related settings from the original table.

• This will save lots of your time and make sure you are using the same table setting that belongs to the original one.

Copy Field Settings

• Most of the times, you create a Database View based on the current table.

• Instead of setting up the fields in that Database View from beginning, you can use Copy Field Settings menu to copy all the related fields setup from the original table.

• This will save lots of your time and make sure you are using the same fields setting that belongs to the original table.

Server Events and Client Scripts

• Imagine if you want to insert your business logic for the certain table or even implementing the certain business process for some tables without having to touch the template files and the generated code.

• Server Events and Client Scripts are provided to allow you writing less code to implement all your needs easily and quickly.

• No need to touch the template files or customizing the generated code.

• They will be saved in the .pmp (PHPMaker Project) file so that you can load it in the future (easy to maintain).

Server Events

• Global (All Pages)• Table-Specific (Common, Add/Copy Page, Edit

Page, List Page, Multi-Update Page, Report Page, Search Page, View Page, and Preview Page).

• Other (Default Page, Login Page, Logout Page, Registration Page, Change Password Page, and Password Recovery/Forgot Password Page).

Client Scripts

• Global (Page with header/footer).• Table-Specific (Add/Copy Page, Delete Page,

Edit Page, List Page, Multi-Update Page, Reprot Page, Search Page, and View Page).

• Other (Login Page, Registration Page, Change Password Page, and Password Recovery/Forgot Password Page).

Custom Templates

• Imagine if you want to customize the standard look and feel that generated by PHPMaker without having to touch the generated files.

• PHPMaker provides Custom Templates to allow you to customize the look and feel of the page without having to customize the generated code.

• Table-Specific (Add/Copy Page, Delete Page, Edit Page, List Page, Search Page, View Page, and Master Record Page).

• Other (Registration Page).

Generate (1 of 2)

• Template file.• Application root folder.• Destination folder.• Output filename (prefix, lowercase).• Generate a blank page.• Browse after generation.• Testing root URL.

Generate (2 of 2)

• Generate Dialog Window.• Select All / Unselect All.• Partial generating for the certain table.• PHP Files (info, master, list, add, view, edit,

update, delete, search).• Other Files.• Optional Generate without Header/Footer.

Server Events in Action (1 of 7)

• Database_Connecting: No need to change the config file after working on localhost.

// Database Connecting event, case: MySQL databasefunction Database_Connecting(&$info) { if (ew_CurrentUserIP() == "127.0.0.1") { // develop on local PC $info["host"] = "localhost"; $info["user"] = "usertonlocalhost"; $info["pass"] = "passowrdonlocalhost"; $info["db"] = "databaseonlocalhost"; } else { $info["host"] = "localhost"; $info["user"] = "useronremoteserver"; $info["pass"] = "passwordonremoteserver"; $info["db"] = "databaseonremoteserver"; }}

Server Events in Action (2 of 7)

• Page_Rendering: Case displaying Image and Text for all List and View pages.

// Page Rendering eventfunction Page_Rendering() { if (CurrentPageID() == "list") { CurrentPage()->ListOptions->UseImageAndText = TRUE; CurrentPage()->ExportOptions->UseImageAndText = TRUE; } if (CurrentPageID() == "view") { CurrentPage()->OtherOptions["action"]->UseImageAndText = TRUE; CurrentPage()->ExportOptions->UseImageAndText = TRUE; }}

Server Events in Action (3 of 7)

• Row_Rendered: Case customizing the row cell in table after rendered to the page.

// Row Rendered eventfunction Row_Rendered() { // To view properties of field class, use: //var_dump($this-><FieldName>); // Change the row color in List page if ($this->PageID == "list" && $this->Trademark->ViewValue == "BMW") $this->RowAttrs["style"] = "color: red; background-color:

#ccffcc"; // Change text style if ($this->Category->CurrentValue == "SPORTS") $this->Category->ViewAttrs["style"] = "color: #00cc00; font-

weight: bold; background-color: #ffff99";}

Server Events in Action (4 of 7)

• Row_Deleting: Case preventing delete in Demo Mode.

// Row Deleting eventfunction Row_Deleting(&$rs) {

if (@MS_DEMO_MODE) {$this->setFailureMessage("Not allowed in DEMO mode.");

return FALSE;

} return TRUE;

}

Server Events in Action (5 of 7)

• Row_Inserting: Case concat two fields value to generate the value of code field while inserting new record.

// Row Inserting eventfunction Row_Inserting($rsold, &$rsnew) {

$rsnew["code"] = $rsnew["first"] . "-" . $rsnew["second"]; return TRUE;

}

Server Events in Action (6 of 7)

• MenuItem_Adding: Case hiding the Change Password and Logout menu items.

function MenuItem_Adding(&$Item) {// var_dump($Item);// Return FALSE if menu item not allowedif ($Item->Text == $Language->Phrase("changepwd") || $Item->Text == $Language->Phrase("logout")) {return FALSE; }

}

Server Events in Action (7 of 7)

• Row_Updated: Update another table after updated the related record in current table.

function Row_Updated($rsold, &$rsnew) {ew_Execute("UPDATE `employees` SET `Emp_Status` = '1' WHERE `employee_id` = '".$rsnew["emp_id"]."'");

}

Client Scripts in Action (1 of 3)

• Client_Script: Case enable submit button after the value in input control has been changed.

$(document).ready(function(){ $("input").change(function(){ $('input[type=submit]').removeAttr("disabled"); $('input[type=submit]').addClass("msButton"); });});

Client Scripts in Action (2 of 3)

• Client_Script: Case adding sliding effect in Search Panel when it is being clicked.

$(document).ready(function() { $('div#employee_list_SearchPanel').hide(); $('a#searchPanelAnchor').click(function () { if ($('div#employee_list_SearchPanel').is(':hidden')) { $('div#employee_list_SearchPanel').slideDown(300, function () { $("a#searchPanelAnchor").html('<i class="sprite collapse

prefix"></i>') }); } else { $('div#employee_list_SearchPanel').slideUp(300, function () { $("a#searchPanelAnchor").html('<i class="sprite expand prefix"></i>') }); } }); });

Client Scripts in Action (3 of 3)

• Client_Script: Case hiding the certain field based on the selected value in a select control.

$(document).ready(function(){ $("#x_User_Level").change(function() { var str = $("option:selected", this); if (this.value == "1") { $("#r_Report_To").hide(); } else { $("#r_Report_To").show(); } });});

Custom Templates in Action (1 of 3)

• CustomTemplateHeader: Case customizing the template table header in the List page.

<table cellspacing="0" class="ewTable ewTableSeparate"> <thead> <tr class="ewTableHeader"> {{{list_options 2}}} <td rowspan="2">{{{Picture}}}</td> <td>{{{ID}}}</td> <td>{{{Trademark}}}</td> <td>{{{Model}}}</td> <td>{{{HP}}}</td> </tr> <tr class="ewTableHeader"> <td>{{{Liter}}}</td> <td>{{{Cyl}}}</td> <td>{{{Category}}}</td> <td>{{{Price}}}</td> </tr> </thead> <tbody>

Custom Templates in Action (2 of 3)

• CustomTemplateBody: Case customizing the template table body in the List page.

<tr{{{row_attrs}}}> {{{list_options 2}}} <td rowspan="2">{{{Picture}}}</td> <td>{{{ID}}}</td> <td>{{{Trademark}}}</td> <td>{{{Model}}}</td> <td>{{{HP}}}</td> </tr><tr{{{row_attrs}}}> <td>{{{Liter}}}</td> <td>{{{Cyl}}}</td> <td>{{{Category}}}</td> <td>{{{Price}}}</td></tr>

Custom Templates in Action (3 of 3)

• CustomTemplateFooter: Case customizing the template footer table in the List page.

</tbody> <!-- <tfoot><tr

class="ewTableFooter">{{{list_options}}}<td>{{{MyField1}}}</td><td>&nbsp;</td></tr></tfoot> -->

</table>

Template Objects Properties

• Control Object• Project Object• Master Details Object• Custom Scripts Object• MenuList Object• Database Object• Table Object• Field Object• Language Object

Classes in PHPMaker (1 of 2)

• cExportBase, for exporting records.• cEmail, for sending email.• cNumericPager, for numeric pagination/pager.• cPrevNextPager, for button pagination style.• cBreadcrumb, for breadcrumb links.• cTableBase, for Tables related.• cField, for Fields related.• cListOptions, for List Options collection.• cListOption, for List Option.• cBasicSearch, for Basic Search.• cAdvancedSearch, for Advanced Search.

Classes in PHPMaker (2 of 2)

• cUpload, for Uploading.• cAdvancedSecurity, for Advanced Security.• cFormObj, for Forms related.• cTEA, for String Encryption and Decryption.• cUserProfile, for User Profiles related.• cLanguage, for Multi Language.• cXMLDocument, for XML document.• cMenu, for Menu.• cMenuItem, for Menu Item.• cTimer, for Debug timer.• UploadHandler, for Upload handler.

The Generated Login Page

• Login Form.• Track Failed Attempts.• Failed attempts window (minutes).• Disallow concurrent login.• Login status timeout (minutes).• CAPTCHA security code.• Password expiry time (days).

The Generated Registration Page

• User Registration Form.• Terms and Conditions (via extension).• Confirm before Submit.• Send Email.• Requires activation.• CAPTCHA security code.• Auto-login after registration/activation.

The Generated Change Password Page

• Send Email.• CAPTCHA security code.• Force user to change password if expired.• Password strength meter (extension).• Password policy (extension).

The Generated Forgot Password Page

• Send Email.• CAPTCHA security code.• Password Activation and Confirmation.

Roles Based on Access Control (RBAC)

• Add/Copy, • Edit, • Delete, • List, • View, • Search,• Printer Friendly,

• Export to Excel, • Export to Word, • Export to HTML, • Export to CSV, • Export to XML, • Export to PDF.• Send to Email.

The Generated List Page

• List of Records.• Grid Add, Grid Edit.• Inline Add, Inline Edit.• Master/Detail Add (as Detail).• Master/Detail Edit (as Detail).• Master/Detail View (as Detail).• Multiple detail tables.

The Generated Add Page

• Single Add.• Copy.• Inlined Add.• Inline Copy.• Grid Add.• Master/Detail Add (as Detail).

The Generated Edit Page

• Single Edit.• Inline Edit.• Grid Edit.• Master/Detail Edit (as Detail).• Multi-Update.

The Generated Delete Page

• Delete.• Inline Delete.• Multiple Delete.

The Generated View Page

• View.• Master/Detail View (as Detail).

The Generated Search Page

• Basic Search (List Page),• Extended Search (List page),• Advanced Search:– 2 Default Search Value,– 2 Default Search Operator.

Master/Detail

• Multiple Master/Details,• Master/Detail editor window,• Referential Integrity,• Cascade Delete,• Cascade Update,• Master/Detail View Page,• Master/Detail Add Page,• Master/Detail Edit Page,• Master/Detail Records Navigation.

Pagination/Pagers

• Next/Prev Button or Number Links Style,• Default Records per Page,• Selectable page sizes,• Sort Type (Single or Multiple columns),• Multiple columns for n records per row,• Multi-Page Type (Tabs, Pills, Accordion),• Paging section at top and or bottom,• Paging section in View and or Edit pages.

Custom View Tags

• Flash Files • Google Maps • Barcode • QR code • YouTube videos

Custom Locale Settings (1 of 2)

• Decimal point character,• Thousand separator, • International currency symbol,• Monetary decimal point character,• Monetary thousand separator,• Sign for positive values,• Sign for negative values,• International fractional digits,

Custom Locale Settings (2 of 2)

• Local fractional digits,• Currency symbol precedes a positive value,• A space separates currency symbol from a

positive value,• Currency symbol precedes a negative value,• A space separates currency symbol from a

negative value,• Positive sign position,• Negative sign position.

Further Information

• Visit: http://www.hkvstore.com/phpmaker/ for downloading and trying the application.

• Visit http://download.hkvstore.com/forums/viewforum.php?f=27 for PHPMaker discussion board.

• Visit: http://www.ilovephpmaker.com for downloading the extensions that will save tons of your time to customize your web apps.

Recommended