Php Maker 10
February 5, 2017 | Author: kiedis35 | Category: N/A
Short Description
Download Php Maker 10...
Description
CUESTIONES GENERALES
What's New in PHPMaker 10 PHPMaker 10 is a major upgrade from 9.x. It is loaded with a bunch of new features, including many frequently requested ones. PHPMaker 10 is probably the most powerful and flexible product of its kind, and yet still easy-to-use as always.
New Website UI with Bootstrap Brand-new generated website UI with Bootstrap:
Implementations: Tooltip by Tooltip and Popover Search Panel by Collapse Numeric Pager by Pagination NextPrev Pager by Button groups and Icons Add Option Dialog, Export to Email Dialog and JavaScript Popup Message by Modal Server side message by Alert AutoSuggest by Typeahead Vertical Menu by Dropdown
Multi-Page as Tabs, Pills or Accordion
Tabs
Pills
Collapses(Accordion)
Vertical Menu and Horizontal Menu
Vertical menu
Horizontal menu by Horizontal Menu extension (for registered users only)
Enhanced Theme with Bootstrap Variables Allow customizing Bootstrap variables right in the UI:
Breadcrumb Provide links back to previous pages, including master table.
Master/Detail View/Edit/Copy with Multiple Detail Tables Now you can add/copy/edit/view a master table with multiple detail tables in the same page:
Referential Integrity Supports Referential Integrity (enforce foreign key points to a valid record in the master table), Cascade Delete and Cascade Update
Different Styles of Links in List Options, Export Options and Paging Section
Links with icons
Button group
Button dropdown
Button group in paging section
Button dropdown in paging section
Enhanced Detail Preview Extension (FRU) Preview Overlay, Preview Row, or even both.
Multiple File Upload to Folder Allow upload multiple files to folder (NOT to database)
Custom Locale Settings Use your own locale settings easily:
Custom View Tags 5 ready-to-use Custom View Tags for you to display your data visually:
Flash Files Google Maps Barcode QR code YouTube videos
LESS - The Dynamic Stylesheet Language Supports LESS which extends CSS with dynamic behavior such as variables, mixins, operations and functions.
More Server Events
Lookup_Selecting - Fired before selecting records from the lookup table. For customizing lookup table filter dynamically. Page_Rendering and Page_Render - Fired before outputting HTML of the page. For making some last minute changes to the page before it is outputted. Row_CustomAction - Fired for each selected row (by checkboxes) to process the custom action (similar to MultiDelete and Mulit-Update)
More Advanced Settings
Compress project .css - Compress the project stylesheet (i.e. .css) and output minified .css file Compress project .js - Compress the project JavaScript file (i.e. ewp.js) and output minified .js file. Validate NOT NULL fields - Detect fields declared as NOT NULL in the database (and without default value in database or the project) and force "Required" validation. Use datenumber.js - Include YUI date and number library to operate against Date objects and Number objects. Oracle charset - Set alternative charset (other than the project charset) of connection object for Oracle. Use View Tag number of decimal digits for edit - Neglect original precision of a decimal number and use specified number of decimal digits in Edit page. Replace textarea by text input for search - Use text input in search forms for field with TEXTAREA Edit Tag. Reflow HTML elements for mobile - Stack form elements vertically for mobile Use place holder for text box - Automatically set placeholder attributes of form elements as the field's caption or title
More
YUI replaced by jQuery and Bootstrap components Styling by CSS Id and CSS classes added to many HTML elements for easier styling by CSS or jQuery Paging section in Edit page jQuery and jQuery Mobile updated JsRender updated New stylesheet for JsCalendar to match Bootstrap style Sequence number option for List page tinyMCE and CKEditor extensions (for registered users only) updated with latest versions (FCKEditor extension not provided any more) FileManager for CKEditor extension (for registered users only) PHPExcel extension (for registered users only) updated mobile_detect.php updated "Ends With" search operator One more font for Captcha extension 100% site height Password Recovery security improved System requirement updated to PHP >= 5.2 Many other minor improvements
System Requirements PHPMaker
Windows XP/2003/Vista/2008/7/8 PHPMaker requires the following system files. If you do not have latest version of these files, you may experience ActiveX errors. To update your system, go the Microsoft download pages listed below. Service Pack 6 for Visual Basic 6.0: Run-Time Redistribution Pack (vbrun60sp6.exe) Microsoft Windows Script 5.7 (Windows XP) Microsoft Windows Script 5.7 (Windows Server 2003) MSXML Parser 3.0 IIS Express (only required if you want to use IIS Express as testing web server) If you use Microsoft Access, SQL Server or Oracle, PHPMaker requires the following database drivers to connect to the database: Microsoft Data Access Components (MDAC) 2.8 (for Microsoft Access, SQL Server and Oracle) Microsoft Jet 4.0 Service Pack 8 (SP8) (for Microsoft Access = 5.2
Browser
IE 9+, Chrome/Firefox/Safari/Opera (current stable version and the version that preceded it)
Installation and Uninstallation important Before you install PHPMaker, you must log in Windows as an user with administrative privileges. PHPMaker 10 can co-exist with previous version of PHPMaker. You do NOT need to uninstall previous version of PHPMaker if you don't want to. Double-click on the downloaded installer to start the installation process. Follow the prompts and change the settings whenever necessary. To uninstall PHPMaker, go to [Control Panel]. Click [Add/Remove Programs] and select [PHPMaker 10].
Note for Windows Vista/7/8 (or later) users: In Windows Vista/7/8 (or later), User Account Control (UAC) is enabled by default, members of the administrators group do NOT have full administrator privileges. When you install (by double-clicking the installer or right-clicking the installer and choose Run as administrator), an User Account Control prompt may be displayed and ask you if you allow the program to make changes to your computer, click Yes to let the installer run elevated. If you still cannot install successfully, log in Windows as the built-in administrator account to install. The built-in administrator account is disabled by default, you may need to enable the built-in administrator account first: 1. Login as administrator. Open a command prompt (under All Programs -> Accessories) in administrator mode by right-clicking and choosing Run as administrator, 2. Type the command: net user administrator /active:yes. You should see: "The command completed successfully." 3. Log out. You'll now see the Administrator account show up on the login screen. Log in as the built-in administrator and install again. After successful installation, if you want to disable the built-in administrator account. Logout and re-login as your regular user account, and then open an administrator mode command prompt as above. Type the command: net user administrator /active:no. The administrator account will now be disabled, and should not show up on the login screen anymore.
Third-party Tools Note All the following tools are not developed by the author of PHPMaker and are not part of PHPMaker, NO TECHNICAL SUPPORT WILL BE PROVIDED. PHPMaker uses the following third-party tools in template/extensions:
CKeditor Website: http://ckeditor.com CKEditor is distributed under the MPL Open Source license. If IE, requires IE >= 9.
JSCalandar Website: http://www.dynarch.com/projects/calendar/old
PHPMailer Website: http://phpmailer.sourceforge.net
DOMPDF Website: http://code.google.com/p/dompdf Requires MBString and DOM extensions. WARNING! This extension is EXPERIMENTAL only. There are some known issues of DOMPDF, please read the developer website for more information. Known issues includes (but now limited to):
not particularly tolerant to poorly-formed HTML input large files can take a while to render
use a lot of memory
jQuery and jQuery Mobile Website: http://jquery.com/
JsRender Website: https://github.com/BorisMoore/jsrender
Bootstrap Website: http://getbootstrap.com/2.3.2/
Barcode Website: http://www.phpclasses.org/package/2441-PHP-Generate-barcode-graphs-using-different-standards.html
QR Code Website: http://phpqrcode.sourceforge.net/
Additional extensions: (FRU) Note Additional extensions are provided for registered users as examples of customzing and extending template only, NO TECHNICAL SUPPORT WILL BE PROVIDED. Registered users will be provided information to download the extensions. These tools will NOT automatically work with PHPMaker without the extensions.
Horizontal Menu Replaces the graphical extension for previous versions. Uses Bootstrap Navbar as horizontal menu.
TinyMCE Website: http://tinymce.moxiecode.com If IE, requires IE >= 9
PHP Thumb Website: http://phpthumb.gxdlabs.com Supports GIF, JPEG and PNG images only. Requires PHP GD2 extension.
PHPExcel Website: http://phpexcel.codeplex.com Requires PHP version 5.2.0 or higher, PHP extension php_zip enabled (for Excel2007 format), PHP extension php_xml enabled and PHP extension php_gd2 enabled (if not compiled in).
Detail Preview Allow previewing detail records in an expanded row of the main table in List page, and/or in a popup overlay by Bootstrap Popover.
Scrollable Table Scrolling table example. Enable X/Y scrolling of the main table in the List page. If IE, requires IE >= 9.
CAPTCHA Generates CAPTCHA image. Requires PHP GD extension with GD2.
Introduction to PHP and MySQL What is PHP? PHP is a widely-used general-purpose server-side scripting language that can be embedded into HTML. You can think of it as a "plug-in" for your Web server that will allow it to do more than just send plain Web pages when browsers request them. With PHP installed, your Web server will be able to read a new kind of file (called a ) that can do things like retrieve up-to-the-minute information from a database and insert it into a Web page before sending it to the browser that requested it. PHP is completely free to download and use. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. PHP Home Page
Manual Download
What is MySQL? MySQL is a relational database management system, or RDBMS. It has become the world's most popular open source database because of its consistent fast performance, high reliability and ease of use. PHP has MySQL extension which makes it really easy to access data in MySQL. MySQL Home Page Manual Download
Useful MySQL Database Administration Tools phpMyAdmin (freeware)
Installing PHP and MySQL on Windows Both PHP and MySQL support various platforms, including Windows. It is recommended that you install MySQL and PHP on your computer so you can easily develop and test your PHP locally before uploading to your production server. If you use Internet Information Services (IIS), you can install PHP on your Windows system PHP for Windows which installs PHP for IIS, it configures the web server as well. Alternatively, you can use Microsoft Web Platform Installer, see http://php.iis.net/. If you do not have IIS, you can use other Web server such as Apache. If you have difficulties installing PHP and MySQL, you might as well try EasyPHP which is an "out of the box" Apache, MySQL, and PHP installation for Windows. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. The next step is to set up a valid configuration file for PHP, the php.ini. PHP searches for php.ini in the locations described in The configuration file.. Note: If you're using NTFS on Windows, make sure that the user running the web server has read permissions to your php.ini (e.g. make it readable by Everyone).
Some Important Settings in php.ini for Using PHP on Windows extension_dir - In what directory PHP should look for dynamically loadable extensions. It should be set to the folder where your extensions are installed, , e.g. extension_dir="C:\Program Files (x86)\PHP\ext" session.save_path - This is the path where session data files are stored. Make sure this setting points to an existing folder on your machine, e.g. session.save_path="C:\Windows\Temp" Note: If you're using NTFS on Windows, make sure that the user running the web server has write permissions to this folder (e.g. make it readable and writable by Everyone). See the section Configuring Permissions below. upload_tmp_dir - If you want to use file upload, make sure this setting points to an existing folder on your machin, e.g. upload_tmp_dir="C:\Windows\Temp" Note: If you're using NTFS on Windows, make sure that the user running the web server has write permissions to this folder (e.g. make it readable and writable by Everyone). See the section Configuring Permissions below. php_com_dotnet.dll - If you use MS Access or MS SQL Server (on Windows server), the COM extension is required. As of PHP 5.3.15 / 5.4.5, the COM extension requires php_com_dotnet.dll to be enabled inside of php.ini, i.e. extension=php_com_dotnet.dll Note: Also make sure you have installed the php_com_dotnet.dll in the extension folder (extension_dir) specified in php.ini.
Internet Information Services (IIS) IIS 7.0 or 7.5 is included with Windows Vista/2008/7 and is installed via Programs->Turn on or off Windows features in the Control Panel. Read: http://www.iis.net/learn/install/installing-iis-7/installing-iis-on-windows-vista-and-windows-7 IIS 6.0 is included with Windows Server 2003 and is installed via the Add or Remove Programs item in the Control Panel. IIS 6.0 installs in a highly secure state, serving only static HTML content until other features and file types (such as PHP and ISAPI) are enabled. PHP must be enabled in IIS version 6.0. To enable PHP by using IIS Manager, expand the local computer, and then click Web Service Extensions. In the details pane, click php, and then click Allow.
Creating Virtual Directories in IIS 7 (Windows Vista or Later) The IIS manager user interface consists of three panes.
The left hand side pane is Connections, the middle pane is Workspace and the right hand side pane is Actions. The Connections pane lists application pools and websites. The workspace pane consists of two tabs at the bottom namely Features View and Content View. The Features View allows you to work with the settings of the selected item from Connections pane whereas the Content View displays all the child nodes (content) of the selected item. Application pool is a group of IIS applications that are isolated from other application pools. Each application pool runs in its own worker process. Any problem with that process affects the applications residing in it and not the rest of the applications. You can configure application pools individually. In order to create a new application pool, select "Application Pools" under Connections pane. Then click on "Add application pool" from Actions pane. This will open a dialog as shown below:
Specify a name for the new pool to be created. Select .NET framework version that all the applications from the pool will use. Also select pipeline mode. There are two pipeline modes viz. integrated and classic. The integrated mode uses the integrated request processing model whereas the classic mode uses the older request processing model. Click OK to create the application pool. Your new application pool will now be displayed in the Workspace pane. To configure the application pool click on the "Advanced Settings" option under Actions pane. The following figure shows many of the configurable properties of an application pool.
If you use 64-bit Windows, set Enable 32-Bit Applications to True. (See Running on 64-bit Windows Operating System below.) To create a new web site, select Web Sites node under Connections pane and then click on "Add Web Site" under Actions pane. This opens a dialog as shown below:
Here, you can specify properties of the new web site including its application pool and physical location. Creating an IIS application or a Virtual Directory is quick and simple. Just right click on the web site and choose either "Add Application" or "Add Virtual Directory" to open respective dialogs (see below).
An existing Virtual directory can be marked as an IIS application by right clicking on it and selecting "Convert to Application". If you use IE, you may encounter the following error messages when you run PHP pages with IIS 7: An error occurred on the server when processing the URL. Please contact the system administrator. Go to Internet Options -> Advanced, disable Show friendly HTTP error messages.
Configuring Permissions An important aspect of working with file upload to a folder on the Web server is to correctly configure permissions. When a Web application uses a file, the application must have Read permission to the file so the application can access the data. Additionally, the application must have Write permission to the folder that contains the file. Write permission is required because the file may be created at run time. If you use Linux/Unix, CHMOD your upload folder to "777" by using your FTP software. To use an Access database in an PHP Web application, you must configure the folder that contains the Access database to have both Read and Write permissions for the IIS user account.
The default anonymous IIS user depends on IIS version. In IIS 5, it is IUSR_. In IIS 6 and IIS 7 it can be NETWORKSERVICE or IUSR. In IIS 7.5 it depends on Application Pool, read Application Pool Identities for detail. To set permissions in the folder (if you're using NTFS on Windows), 1. In Windows Explorer, move to the root folder for the Web site. e.g. C:\Inetpub\wwwroot\ExampleSite. 2. If the folder does not already exist, create one. 3. Right-click the folder, click Properties, and then click the Security tab.
4. Under Group or user names, look for or add the user. 5. Verify that the account has Read and Write permissions for the folder. Similarly, set permissions in the folder where the audit trail log file reside.
Running on 64-bit Windows Operating System Windows Server 2008 or Windows 7 64-bit (IIS 7.x) On 64-bit Windows 2008/7, IIS 7.x can run both 32-bit and 64-bit worker processes simultaneously. To run 32-bit Web applications in IIS 7.x on 64-bit Windows all it needs is to assign the 32-bit applications to a separate application pool in IIS and turn on the Enable 32-Bit Applications switch for that application pool. To do this, open IIS Manager, open Application Pool, select the application pool, and then click Advanced Settings. In Enable 32-Bit Applications, select True.
Windows Server 2003 64-bit (IIS 6) On 64-bit Windows 2003, although IIS 6 supports running both 64-bit and 32-bit worker processes, it doesn't support running in both modes simultaneously. By default IIS 6 is configured to run in native 64-bit mode and work only with 64-bit worker processes, which means you can only run 64-bit Web applications (for ASP.NET applications they can only target ASP.NET version 2.0 or higher) in the native mode. In order to run 32-bit Web applications you will need to set IIS 6 to run in 32-bit mode. Note: This means all your Web applications will now run in 32-bit mode. To enable IIS 6 to run 32-bit worker processes follow these steps: 1. Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory 2. Type the following command: cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true" 3. Press ENTER 4. Afterwards restart IIS by using the iisreset command from the command-line
The following article explains the details of the changes in the behavior of IIS after configuring it to run 32-bit worker processes: Running 32-bit Applications on 64-bit Windows (IIS 6.0)
Quick Start PHPMaker connects to your database, extracts tables and fields information, and generates PHP scripts instantly based on these information. For each table, it will generate a list page, add/copy page, view page, edit page, delete page and search page all linked up properly. To generate scripts, you just need to follow the tabs and setup the options, that is: [Database] > [PHP] > [HTML] > [Security] > [Generate]
However, if you are a first time user, we recommend you to generate a basic PHP application and get to know how PHPMaker and PHP works first. Note If you have not used PHP before, it is recommended that you read Introduction to PHP and MySQL first. To generate your first PHP project, you can skip the options and use default settings first. In other words, you skip the intermediate steps and go directly to the [Generate] tab after connecting to your data source, that is: [Database] > [Generate]
You can generate the web site quickly by the following steps: 1. Start up PHPMaker. There are two connection methods to connect to your MySQL server - DIRECT or URL. As explained in Introduction to PHP and MySQL, it is recommended that you have a local MySQL server during development. You usually connect to MySQL by the DIRECT method, the URL method is only used when you want to conenct to a remote MySQL server which does not allow direct connection. (See Tutorial - Connecting Remote MySQL using PHPMaker Connection Script.) 2. In this example, we use direct connection. Enter connection details for the MySQL Server .
3. Click the [Connect] button to load the database information. Tables and fields information will be loaded and displayed on the left hand side.
4. Click the [Generate] tab and select the follows: Template file - The zipped file that contains the template of the generated pages. Just use the default template is shipped with PHPMaker. Application root folder - The root folder of your PHP application. (See Application Root) Destination folder - The folder that the generated scripts will reside. This can be same as the application root folder or a subfolder under the application root folder. In this case, we use the same folder for simplicity.
To run PHP you need to setup a website or virtual directory (See Introduction to PHP and MySQL ). If you are not familiar with web server, you can install IIS Express which can be downloaded from Microsoft website. Then select [IIS Express] and [Browse after generation] in PHPMaker. 5. Click the [Generate] button, the generation process will begin. After the web site is generated successfully, a completion message will be displayed. The web site should then be ready to run. If [Browse after generation] is enabled, PHPMaker will open your browser, and - voila! - you'll see PHP displaying the data in your first PHP website.
After understanding how it works, you can then take advantages of various other options provided by PHPMaker and setup your project more precisely. See Project Setup for full details.
PROJECT SETUP To make use of the various features of PHPMaker and create scripts that best suit your Web sites, read the following information and get to know the options PHPMaker provide. It is assumed that you have basic knowledges of HTML and PHP and the technical terms are used without further explanation. To generate a Web site, please perform the following steps: 1. 2. 3. 4. 5.
Database PHP HTML Security Generate
To further control the functionality of the generated scripts, you can setup different options for each table/field: Table Setup Field Setup You can also setup additional database objects for your project in PHPMaker: Custom View Report
Database Setup If you are not at the [Database] tab yet, clicking the icon in the toolbar to go to [Database] tab. PHPMaker can connect to MySQL, PostgresSQL, Microsoft Access and Microsoft SQL Server.
1. MySQL Select MySQL as database type.
There are 2 connection methods you can choose:
Direct Connection (default) 1. Enter your database host/server name (or IP address), username, password and port number (default is 3306 for MySQL), 2. Select your database, 3. Select the SQL Identifier Quote Character, default is backquote (`) for MySQL,
4. Click the [Connect] button to load the database information. Note The server name or IP should be valid on your production Web server also. Otherwise you'll need to modify the generated connection info in ewcfg*.php before you upload it to your production server. For example, if you have a testing MySQL Server installed on the same computer, you can use "localhost" as server name when you connect to it with PHPMaker. The generated scripts will then try to connect to a MySQL Server on the same computer as the production Web server, if this is not the case, the connection will fail.
URL Connection (for remote database) While the direct connection method is quick and easy, some remote MySQL server may not allow direct connection. PHPMaker provides an alternative simple way to connect remote servers: 1. Upload the PHP connection script provided by PHPMaker to your site. Note that: a. The script is named "phpmaker.php" and can be found under your installed folder, usually C:\PHPMaker, b. Always use the script shipped with your version of PHPMaker. PHPMaker may not work with script shipped with previous versions. 2. If it is the first time that you use this script, you may want to test the script with your browser: a. Browse to this script with your browser, b. Enter the connection info, c. Click "Get Database List" and then "View Schema", you should be able to view the schema of your database in XML properly. Now go back to PHPMaker. 2. Enter the SAME connection information, select URL for connection method, enter the URL of the script (e.g. http://servername/path/phpmaker.php), you can test the URL by clicking the [Test] button,
3. Click the [Connect] button to load the database information. PHPMaker will connect to the database server through the PHP script over HTTP.
2. Microsoft SQL Server (Windows only) Note If you use SQL Server 2000/2005/2008/2012 and have installed SQL Server 2012 Native Client on your computer, then Microsoft SQL Server and Microsoft SQL Server 2005/2008/2012 database type will be available for selection. You can use this database type for connection to SQL Server 2000, 2005, 2008 or 2012. You can download SQL Server 2012 Native Client from the Microsoft website. See System Requirements. The native client must also be installed on the web server. (ODBC connection is not recommended and not supported.)
Select Microsoft SQL Server (or Microsoft SQL Server 2005/2008/2012 if you use SQL Server 2005/2008/2012 or later) as database type, Enter the name or IP of the SQL server, Enter the User ID and Password, Select the database you want or just enter the name of your database,
Click the
Connect button to load the database information.
Notes 1. If Microsoft SQL Server 2005/2008/2012, make sure the server name includes the instance name, e.g. localhost/SQLEXPRESS. 2. The server name or IP should be valid on your production Web server also. Otherwise you'll need to modify the generated connection string in ewcfg*.vb/cs before you upload it to your production server. For example, if you have a testing SQL Server installed on the same computer, you can use "(local)" as server name when you connect to it with ASP.NET Maker. The generated scripts will then try to connect to a SQL Server on the same computer as the production Web server, if this is not the case on the server, the connection will fail. It is common that SQL Server is installed on a different server in production environment.
Load from PMP Project File If you previously saved your project file (.pmp file), you can load it back by clicking the open button on the tool bar (or select "Project", "Open" from the menu bar). At completion, the tables and fields information will be loaded and displayed on the left pane.
The database pane is dockable. If you prefer to display the database pane on the right hand side, simply drag it to the right side.
SQL Identifier Quote Character Most databases support quoting of identifiers (database, table, and field names) with a character. If the identifier is a restricted word or contains special characters or spaces you must always quote it with the quote character. In most cases, you do not need to change this setting, PHPMaker will use the default quote character for your databases. However, if for some reason you need to specify it explicitly, select the [SQL Identifier Quote Character] that suits your case.
Dynamic Table Loading By default all tables in the database are loaded. It is convenient but loading and sychronization could be slow if your database contains a large number of tables or fields. If this option is enabled, a table will only be loaded when you select it in the database pane. If you just use a few tables out of a large database, this feature enables you to work much faster than before. To enable this feature, simply check [Load tables dynamically] BEFORE pressing the [Connect] button.
PHP Settings General Options
Add shell cal (For Unix-based server only) If you put the PHP parser binary somewhere outside of the web tree of files, for example, in /usr/local/bin, you will have to put a line similar to: #!/usr/local/bin/php as the first line of any file containing PHP tags. (You will also need to make the file executable.)
Set locale Set locale information. PHPMaker uses localeconv() which returns data based upon the current locale as set by setlocale(). Different systems have different naming schemes for locales. If you do not know the correct locale string on your server or you want to override system locale and use your own locale settings, click the [...] button and enter your locale settings.
Refer to localeconv() for the definition of the settings. Note If you use Multi-Language (see below), DO NOT use this setting unless all languages share the same locale settings. Each language has its own locale settings and you should specify locale settings for each language in the respective language file. (See Customizing Template)
No Cache Whether caching is required on browser
Use mysqli extension Use mysqli extension instead of MySQL functions. Notes 1. The mysqli extension is designed to work with PHP 5 and MySQL 4.1.3 or above, 2. Both mysql and mysqli extension are NOT installed by PHP 5 by default. (See Introduction to PHP and MySQL)
Default Date Format The default date format for the scripts. Possible values are: yyyy/mm/dd, mm/dd/yyyy, dd/mm/yyyy, yyyy-mm-dd, mm-dd-yyyy, dd-mm-yyyy, yyyy.mm.dd, mm.dd.yyyy, dd.mm.yyyy
with or without time (hh:mm:ss). The selected date format also determines the date separator ("/" or "-" or ".").
Multi-Language Enable multi-language project. If enabled, a combobox will appear on the top of the generated scripts for user to select language. See Tools for selecting languages for the multi-language project. Important : 1. Multi-Language project must use utf-8 encoding. The charset of the project must be "utf-8". 2. The data in your database must be stored in unicode, otherwise your data will not be displayed properly. 3. If you have customized the template and put unicode characters in the template directly instead of using language files, enable the Advanced Setting UTF-8 output files (see Customizing Template and Tools).
Default Language Default language of the project. It must be compatible with Charset (see HTML Settings). Default is English. There is always one default language for a project. Only the English language file (english.xml) is shipped with PHPMaker. If your project is single language but you use another language, create a language file for your language (see Customizing Template), put it in the "languages" subfolder under the installation folder and then select your default language using this combobox. If you enable Multi-Language, you must select one of the selected languages as the default language.
File Upload
Upload folder - The global folder where the uploaded files resides. If you do not enter a specific folder for a file upload field in the Edit Tag panel of the Field Setup page, all the uploaded files will be put in this folder. Important Always specify an upload folder if you allow file upload. This folder is used as the root folder of temporary folders for file upload fields during Add/Edit. It is also used as the root folder of the user files folder of CKEditor. Notes 1. Unlike the field specific upload folder setting (which is a PHP expression), this field specific setting must be a constant string (without double quotes). If you want dynamic upload folders for different fields, specify upload folder for each field (see Field Setup). 2. Make sure that the Web server user have read/write access to the folder. 3. The path is relative to application root. Use slashes "/" as path delimiter, no leading slash. e.g. If the application root of your website is C:\Inetpub\wwwroot\demo and you enter "uploads/" in this textbox, the folder for the uploaded files will be C:\Inetpub\wwwroot\demo\uploads. If you are not sure which folder is application root, please read Application Root. Max File Size - Maximum file upload size in bytes. If 0.
Paging section at top Show the paging section at top (also applies to View page)
Paging section at bottom Show the paging section at bottom (also applies to View page)
Paging section in View page Show paging section in View page also
Paging section in Edit page Show paging section in Edit page also
Multiple delete Show checkboxes in the list page for selecting multiple records to delete
Inline delete Delete records directly without showing delete confirm page
Links on left side Show the links in record row on the left instead of right
Use buttons as links Show the links in record row as a button group instead of individual icons or links.
Use button dropdown for links Show the links in record row as a button with dropdown menu instead of individual icons or links.
Use button dropdown in paging section Show the links in paging section as buttons with dropdown menu instead of individual links.
Export Enable export in List page - allow export in List pages Enable export in View page - allow export in View pages also Use button dropdown - show the export links as a button with dropdown menu. Default is showing the export links as a row of icons. Print/CSV/HTML/Excel/Word/XML/PDF/Email - Records can be exported to Print (printer-friendly), CSV, HTML, Excel, Word, XML, PDF format or sent as HTML email content. Note The fields in printer friendly version are same as in List/View page, while the fields in other format are determined by the Export setting of the field in Field Setup page. Note that the fields in printer friendly version are same as in List/View page, while the fields in other format are determined by the Export setting of the field in Field Setup page. Export type - Determines which records to export. The follows are supported:
All Pages - Records in all pages are exported Current Page - All records in current page are exported Selected Record - If selected, a checkbox will be displayed in each row for selection. Only selected records in the current page are exported. (Selecting records in different pages is not allowed.) To select records primary key is required, Current Page export type will be used for tables without primary key.
Notes 1. Binary data (BLOB fields) cannot be exported. 2. Export to HTML/CSV/XML/PDF are not applicable to reports. 3. Images cannot be exported to Word/Excel/CSV/XML. 4. Export-to-XML requires PHP DOM (part of PHP 5 core). 5. Export-to-Word/Excel works by exporting data in HTML format for Word/Excel to convert/import, the exported file is not native .doc/.xls format. (Registered user can use the PHPExcel extension which output native Excel file format.) 6. If Export-to-Email, the user can select sending the records as URL or HTML. If sending URL only, note that the recipient will need to click the URL and go to your site to view the records. All security settings will apply, the recipient may need to login. If the recipient is not an user of your website and your page is protected, you should send by HTML only.
Notes (Export to PDF) 1. The extension is an experimental extension only. There are known issues, see Third-party Tools and read the note in the extension setup page (see Tools -> Extensions) for more information before use. Only enable it if necessary. 2. The extension performs best if you are using non-unicode alphanumerical characters (e.g. iso-8859-1) only. If you use unicode, configure advanced settings for the extension, read the note in the extension setup page (see Tools > Extensions) for more information. 3. By default export is only enabled in View page. If you want to enable it in the List page also (the number of records to be exported is not large), you can set the advanced settings of the extension (see Tools -> Extensions). 4. The extension supports images (jpg, gif and png only), but a temporary folder is required during export, the extension uses the Upload folder (see File Upload above) because write permission for the folder should be already setup properly. If you do not use file upload to folder, but you use export to PDF with images, then make sure you still specify an upload folder and set up the write permission.
Email Settings PHPMaker supports many features that can send emails. If you use these features, you'll need to specify a SMTP server. Note From v9, PHPMailer (see Third-party Tools) is always used as the email component. Make sure you generate and upload the subfolder named "phpmailer" to your website.
SMTP server The host name or IP of the SMTP server. Note Some servers do not support "localhost" as SMTP server, in such case you need to specify a valid SMTP server in the network.
SMTP server port Port number of SMTP server. Default is 25.
SMTP server username User name for SMTP server authentication. If your SMTP server does not require authentication, leave it blank.
SMTP server password Password for SMTP server authentication. If your SMTP server does not require authentication, leave it blank.
Sender (Email address) Email address of the sender of all emails
Recipient (Email address) Email address of the recipient(s) for notification emails when a record is added/edited/deleted (if enabled, see Table Setup). If there are multiple recipients, separate them by comma.
Security Protocol used by the SMTP server. Possible values are: SSL or TLS. Note Leave this setting empty if your SMTP server does not use such protocols.
HTML Settings General
Title Title displayed on all pages. Note If you use Multi-Language (see PHP Settings), use Multi-Language Property Editor, see Tools for details.
Charset Charset setting used in the META tag of the site and for exporting data. Note If you use Multi-Language (see PHP Settings), this setting must be utf-8.
Font Default font (not specified if not entered)
Size Default font size (pixel). Unit must be in pixel for working with Bootstrap (see below).
Site icon Icon of the site. For browsers to show your URL with an icon. Must be an .ico file.
Site header logo Logo image in the header Note This setting is enabled in registered version only. Unregistered version allows no logo.
Site footer text Footer text (e.g. copyright statement) Notes 1. If you use Multi-Language (see PHP Settings), use Multi-Language Property Editor, see Tools for details.
2. This setting is enabled in registered version only.
Theme Provides over a dozen of themes for you to setup the look and feel of your project quickly.
You can change the various properties of the selected theme to suit your style. The property name are self-explanatory. Themes are intergrated with Bootstrap, you can customize Bootstrap properties directly in the Theme tab, scroll down to find the Bootstrap variables which start with "@".
Notes
1. Changing a setting in the user interface does not change the corresponding setting in the theme definitions, it only changes the setting for the project. The theme definition files (in XML format) are installed in the subfolder "themes" under the installation folder. You can easily add your own themes by duplicating one of the theme definition file
(except the theme.xml which is for defining the settings and data type in a theme), rename it and modify the settings in the file, just make sure you give your theme an unique theme name. 2. Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, to get started, checkout http://getbootstrap.com/2.3.2/. 3. After changing theme properties, make sure you re-generate *.css files.
Styles
Edit styles A separate CSS stylesheet will be generated for each project. Click the [Edit styles] button to open CSS editor. Notes 1. All projects use CSS stylesheet. 2. If you have TopStyle Pro (v1.5+) or TopStyle Lite (v1.5-3.1) installed on your PC, PHPMaker will use it automatically. Notes When you edit the CSS styles in the editor, note the follows: 1. DO NOT MODIFY the system styles section, it is generated by the system, your modifications will be overwritten. If you want to change the stylesheet template, modify the ew.css in the "themes" subfolder under the installed directory. Only modify the ew.css if you have the necessary knowledges in CSS. 2. DO NOT REMOVE THE FOLLOWING COMMENTS: BEGIN_USER_STYLES END_USER_STYLES You MUST write your styles between these two comment lines, styles outside this user styles section will be discarded. 3. If you want to override the system styles, you can copy the styles to the User Styles Section, or you can use a separate user stylesheet.
User Stylesheet Specify an external user stylesheet (will be copied across during generation) You can see the effect of new settings immediately in the preview window at the bottom of the HTML tab.
Other than choosing color from the palettes, the color picker can also pick color directly from screen using the "eyedropper".
Security Settings
Field Description:
Administrator Login (Hard-Coded) Administrator user id and password
Login Name Login Name for administrator
Password Password for adminsitrator
Use Existing Table Link to existing table for login name and password validation
Table Existing table in database containing login name and password information
Login Name Field Login Name field in table used for authentication
Password Field Password field in table used for authentication
Login Options Login options in the login page: Auto-login - Auto login until the user logout explicitly
When you enable the auto-login feature, a few cookies will be placed on the user's computer to identify the user, meaning that the user do not have to type username and password every time he/she visit the site. For this reason, you should advise your users not to use this feature on a public or shared computer, as any other user of the computer will be able to access the account. Remember username - Save the user's user name in cookie Always ask - Do not save user name and password, always ask for them in the login page
Advanced Security Advanced Security feature allows you to setup User ID, assign User Levels to users and create a complete user registration system. To setup, click the [Advanced] button. PHPMaker supports two types of security - User ID and User Level. User ID Security secures data at record level. User Level Security secures data at table level. They complements each other and they can work independently or together. Users get their User ID and User Level after login. Before login, an user's identity is unknown and the user is an Anonymous User.
Anonymous User The permissions for Anonymous users are defined in this form.
Steps to setup Anonymous User permissions: 1. Click on Anonymous User in the left pane, 2. Define the permissions for each table.
User ID User ID Security secures data at record level. Protected tables must have an User ID field for identifying which user a record belongs to. The User ID field names can be different in tables though. When User ID security is enabled, users can only access their own data.
Steps to setup User ID security for different tables/views: 1. Click on User ID in the left pane.l
2. Select the [User ID field] from your user table, this field is usually the primary key of the User Table. (Note: if this field is not set, the feature is disabled) 3. (Optional) Select the [Parent User ID field] from your user table. Parent User ID field stores the parent User ID that the user belongs to, parent user can modify the child user's records. Parent User ID is hierarchical, parent users can access the records owned by the child users of their child users. (Note: if this field is not set, the Parent User feature is disabled.) 4. In the [User ID Field] column, select the User ID Field for the tables/views that requires User ID security. 5. (Optional) Enable [Allow View All] if you allow all logged in users (not including Anonymous User) to list/search/view (but not add/copy/edit/delete) all records in the table.
User Level User Level Security secures data at table level. Each user level is granted with specific permissions to tables in the database. There are 2 types of User Level security: 1. Static User Levels - the User Levels and the permissions are defined in this form and the User Levels are not to be changed after script generation.
Steps to setup static User Level security for different tables/views: 1. Click on User Levels in the left pane, 2. Select an integer field in your user table as the [User Level field], (Note: if this field is not set, the feature is disabled) 3. Define your user levels, click icon the add an user level and icon to delete an user level. 2. Dynamic User Levels - the User Levels and the permissions are defined in 2 tables in the database, the User Levels can still be changed with the generated scripts.
Steps to setup dynamic User Level security for different tables/views: 1. Click on User Levels in the left pane, 2. Select an integer field in your user table as the [User Level field],(note: if this field is not set, the feature is disabled) 3. Switch to the [Dynamic User Levels] tab, check [Enable Dynamic User Levels], 4. Select your User Level Table and User Level Permission Table and the required fields. The User Level Table and User Level Permission Table must have the following fields, note the data types, User Level ID and the Permission fields must be of integer type, the field names can be different though:
If you want PHPMaker to create these 2 tables in your database, click the [Create tables] button, the following form will display for you to change the table/field names if necessary. You can change the table/field names and then click OK to continue.
If you have projects created by previous versions of PHPMaker you may want to use dynamic User Levels and migrate the previously defined static User Levels in the project to the database. After selecting or creating the User Level and User Level Permission tables/fields, just click the [Migrate] button to let PHPMaker do that for you. After setting the user levels, PHPMaker will populate the user levels to the User Level field's Edit Tag (also see Field Setup) so administrators can assign user levels using the generated pages. There are two built-in user levels: Administrator - Administrator user level is a built-in user level that has all permissions plus the privileges to modify User IDs and User Levels. Its permissions are same as that of the hard-coded Administrator. The User Level ID of Administrator is -1. Default - Default user level is built-in user level with user level = 0. Since User Level field is an integer field, if you set a default value of 0 for this field, this user level will become the default user level for the user after registration and before the Administrator assigning another higher user level. Important Notes on User Levels
1. Even you enable all permissions for an user defined User Level, the User Level will NOT become same as this Administrator User Level. User defined User Levels will not have the permissions to manage users (although parent users has some control on their child users). 2. From v9, the permissions for List/Search/View are separate in newly created projects. However, for backward compatibility, the permissions for List/View/Search in converted projects (created by previous versions) are the same unless you have enabled Separate permssions for List/View/Search in Advanced Settings. 3. You may need to use the hard-coded Administrator Login to log on and assign dynamic user levels to users initially. 4. It is possible to use single login and common Dynamic User Levels for multiple projects provided that ALL projects use the same project name and same Advanced Security tables (i.e. User Table, User Level Table and User Level Permission Table). If all projects uses the same database and same Advanced Security tables, then the latter condition is automatically fulfilled. However, if the projects use different databases, you need to use Database_Connecting server event to change the connection info so the user can get the Dynamic User Levels from the common Advanced Security tables correctly during login. For the projects not using the database with the common Advanced Security tables, you still need to create dummy Advanced Security tables (with same table/field names as the common Advanced Security tables) in the project database so you can setup Advanced Security.
User Login Options User Login Options allows you to create a complete user registration system for your Web site, with options to let user register, change password and recover password.
Login Track failed attempts If enabled, number of failed login attempts (invalid password) will be tracked. If exceeded, the user will be locked out and the password must be reset.
Maximum failed attempts The maximum number of failed login attempts
Failed attempts windows (minutes) The time window, in minutes, during which failed password attempts are tracked.
Disallow concurrent login If enabled, only one session is allowed for each user (except the hard-coded Administrator). If one user has already logged in, other users trying to login with the same username (and password) will be rejected. Note Users are distinguished by Session ID as recognized by the web server. If you login again with your PC in another window of the same browser or in just another tab of your browser, you can still login. If you login again with another browser or another PC, the Session ID will be different and the login will be rejected.
Login status timeout (minutes) The number of idle minutes after which the login status will be considered as logged out and login will be allowed again. If a logged-in user does not explicitly log out (for example, close the browser directly), the user session is not closed and the user's login status will remain as "logged in". Attempts to login again will fail. This timeout setting ensures login will be allowed again after a period of idle time.
CAPTCHA (requires extension) Optionally requires user to type letters or digits from a distorted image that appears on the screen.. Note Requires CAPTCHA extension, click Tools->Extensions from the main menu to enable. Also see Third-party Tools.
Password MD5 password Use MD5 password Notes 1. If you enable MD5 password, make sure that the passwords in your user table are stored as MD5 hash (32character hexadecimal number) of the clear text password. If you also use case-insensitive password, convert the clear text passwords to lower case first before calculating MD5 hash. Otherwise, existing users will not be able to login. MD5 hash is irreversible, password will be reset during password recovery. Note that the reset password is also in the format of 16-character hexadecimal number, it is NOT the MD5 hash of the old password. 2. PHPMaker will try to detect salted password created by other application. (PHPMaker itself does NOT create salted password.) If salted, the password must be stored in ':' format, and the hashed string must be the md5 hash of the concatenated string of the clear text password and the salt. Other salt algorithm is not supported, you can however customize the function ew_EncryptPassword() in the template to suit your applcation.
Case-sensitive password Use case-sensitive password
Enable password expiry If enabled, user password will expire after a period of time (except the hard-coded Administrator password)
Password expiry time (days) For use with Enable password expiry, user password will expire after the specified number of days
User Registration Page Enabled Generate user registration page and add a link in login page.
Fields Select fields (from the user table) to show in the registration page. Click the [...] button the select the fields.
CAPTCHA (requires extension) Optionally requires user to type letters or digits from a distorted image that appears on the screen.. Note Requires CAPTCHA extension, click Tools->Extensions from the main menu to enable. Also see Third-party Tools.
Confirm before submit Optionally send email confirmation after registration
Send email Optionally send email confirmation after registration
Requires activation Optionally requires user click an activation link in the email sent after registration to activate the user account. Note Send email must be enabled for sending the email with activation link.
Auto login after registration/activation Optionally auto-login the user after registration or activation.
Note Requires activation is enabled, the user is not activated yet after registration, auto login will be applied when the user clicks the activation link in the email.
Change Password Page Enabled Generate change password page Send email Optional email confirmation after changing password CAPTCHA (requires extension) Optionally requires user to type letters or digits from a distorted image that appears on the screen. Note Requires CAPTCHA extension, click Tools->Extensions from the main menu to enable. Also see Third-party Tools.
Password Recovery Page Enabled Generate password recovery page (forgot password page) and add a link in login page. User name and password will be sent to the user's email address.
CAPTCHA (requires extension) Optionally requires user to type letters or digits from a distorted image that appears on the screen. Note Requires CAPTCHA extension, click Tools->Extensions from the main menu to enable. Also see Third-party Tools.
User Table Fields Email address field Email address field in user table used for sending email
Activated field Email activated field in user table used for storing the status of user. A boolean field is recommended, although an integer field or a string field will also work. Notes
1. To enable user account activation, the Requires activation and Send email options under User Registration Page must be checked. The user needs to click an activation link in the email sent after registration to activate the user account. 2. If enabled, make sure the activated field for existing users in your user table is updated with your activation values (e.g. True/False, 1/0, Y/N) or the existing users cannot login because they are not recognized as activated. You can enable Multi-Update feature for the user table so administrators can activate or deactivate existing users easily.
Profile field A memo field for persisting all the additional user information. This field is required if the following options are used:
Track failed attempts
Disallow concurrent login
Enable password expiry
Email Template The email sending function and the email contents can be customized in the template. The following special tags are used in the email templates: is sender email address is user email address is user password
(without the $ symbol) is the field value. For example, is the field value of the field "LastName". The email format can be either "TEXT" or "HTML". If you use HTML, change the line "Format: TEXT" to "Format: HTML" and enter HTML content below it. You can also dynamically change the email by code using Email_Sending event before the email is sent. (See Server Events and Client Scripts)
Also See: Tutorial - User ID Security Tutorial - Static User Level Security Tutorial - Dynamic User Level Security Tutorial - User Registration System
Generate Settings
Template file Template archive (zip file) Application root folder The root folder of the PHP application. (See Application Root for more info on application root)
Destination folder The destination folder where the PHP scripts are to be generated. The folder is usually same as the application root folder or a subfolder under the application root folder.
Output filename None - no prefix/suffix is added Prefix - a prefix is added to all output file names Suffix - a suffix is added to all output file names
Prefix/Infix/Suffix The string to be concatenated to output file names when the Prefix or Infix or Suffix option is specified
Lowercase Specify whether output file names are in lowercase
Extension Extension name of the generated scripts, default is "php".
Default page File name of the start page, default is "index.php". Note This is just the file name of a website's default page usually named index.php. This is NOT the start page (see below) of the generated site.
Generate a blank page Specify whether to generate a blank page with header and footer for you to customize and add your own pages to the site. Note By default the generated blank page is named as blankpage.php. You should rename the page before customizing the page, or the page may be overwritten by a blank page in next generation if you have not disabled this option.
Start page Specify the first page that the default page (usually "index.php") should redirect users to. If this setting is left blank, user will be redirected to the List page of the default table (see Table Setup) or the first table that the user have permission to access. If this setting is not blank, the default page will simply redirect user to the page you specify, e.g. a page not generated by the current project. If you start the site by the typical index.php, leave this setting blank, do NOT enter index.php or there will be a indefinite loop.
Testing web server Specify the web server that you want to use to test the generated site. For use with Browse after generation (see below). You can choose IIS Express or Other. Requires IIS Express installed on the same machine as PHPMaker. IIS Express is a simpler and self-contained version of IIS that is optimized for developers. IIS Express is free, does not require administrative privileges to run and supports all Windows platforms XP and above. It can be downloaded from microsoft.com. If you choose Other web server (e.g. you use IIS or Apache), you need to specify Testing root URL (see below) also.
Browse after generation Specify whether to open a browser to test the generated site after script generation.
Testing root URL Specify the URL of your testing site that maps to the Application root folder (see above). For use with Browse after generation. If you use IIS Express, this setting is NOT required. For example, if you have set up a website like: Application root folder: C:\Documents and Settings\Administrator\My Documents\mycompany.com Destination folder: C:\Documents and Settings\Administrator\My Documents\mycompany.com\project1 and you have setup your testing website's document root at the application root folder, so that you browse the main site by: http://localhost/ and browse the PHPMaker generated site by: http://localhost/project1/ Then the Testing root URL should be: http://localhost/ (NOT http://localhost/project1/, which points to the Destination folder). PHPMaker will calculate the relative path and add "project1/" to the Testing root URL when opening the browser. After setting above, click the [Generate] button to generate scripts. PHPMaker allows you select scripts to generate, just select the files you want to generate in the [Output] column. If you want include PHPMaker scripts into your custom PHP scripts, you may not want to generate header and footer in those pages. Then you can enable [No header/footer] for
those pages. Note that header/footer means the header row containing the site header logo and the footer row containing the site footer text. After selection, click the [Generate] button to generate scripts. Note If it is your first generation for the project or you have changed some project level settings, you must select [Other files] to generate the non table-specific pages. If you modify settings for a table and want to re-generate script for that table only, you can click [Unselect All], then select the files you want to re-generate and click the [Generate] button to generate again. If you are not sure which files to regenerate, click [Select All] and re-generate all files. You can also right-click the column header of [Output] or [No header/footer] to quickly select all or unselect all items in the column.
If you need to abort script generation in the middle of the process, just click the [Cancel] button under the progress bar that displayed during generation.
Also See: Customizing Template Project File
Table Setup Note For simplicity, we use "table" in the following description to refer to any of database object in the project. A database object can be either a table, a view, a Custom View or a report. After loading the database, the tables will be shown in the database pane on the left pane. To access ALL setting for a table (including Multi-page, Table-specific Options and Master/Detail), click the table node of any table in the database pane and then click the [Table] tab to go to the Table Setup page. This is the setup page for a single table.
You can also click on the [Tables] or [Views] or [Custom Views] or [Reports] node in the database pane to go to the Tables Setup page which is a grid showing the most frequently used settings for all tables. If you need to set these settings for multiple tables, this page allow you to view and set them quickly. Note that this page does not include Multi-page, Table-specific Options and Master/Detail.
Notes
1. For all checkbox or combobox columns, if you want to apply the setting to ALL tables or views, you can choose your setting at the [Tables] or [Views] or [Custom Views] or [Reports] row. 2. View/Edit/Search functionality works at field level and can be setup for each field in the Field Level Setup page. Please refer to the Field Setup for details. If all fields are not selected for View/Edit/Search, the function will not be generated. If you prefer to view the tables in alphabetical order, click [Tools]->[Sort Tables Alphabetically] (see Tools). You can still change the display order of the menu item by drag-and-drop. Select a table by clicking the first column [Table/View Name] column, then drag and drop to where you want. Note that a table cannot be moved out of its parent node. Note that changing the display order of table in this Table Setup page does not change the display order of the tables in the menu. To change the display order of the menu item, click [Tools]->[Menu Editor] (see Tools). Important 1. It is assumed that all tables have primary key. (Composite key is supported) If there is no primary key specified, View/Add/Copy/Delete/Edit/Update settings have no effect and will be reset to disabled when the [Generate] button is pressed. Only the List page can be generated. If you add back a primary key later, you'll need to come back to this page and re-enable them. Since reports are read-only, View/Add/Copy/Delete/Edit/Update settings are not applicable to reports. 2. Views or Custom Views involving more than one table are usually NOT updatable. Although you can force PHPMaker to enable the Add/Copy/Delete/Edit/Update pages by specifying a primary key, the generated pages will not work if these views or Custom Views cannot be updated like regular tables. The available table level settings are as follows:
General Generate Select/unselect a particular table for generation
Caption To change the caption of a table, click on [Caption] box to make the necessary change. Note If you use Multi-Language (see PHP Settings), use Multi-Language Property Editor, see Tools for details.
Filter Specify a filter (WHERE clause) for the table. Click the [...] button in [Filter] column, the Filter Editor will popup. Enter your filter, you can drag the field names from the left pane to the editor, the SQL identifier quote characters will also be added for you automatically.
Note The filter must be a valid PHP expression and it will be concatenated to the SQL. If it is a string, it should be double quoted.
Sort Specify the sort fields (ORDER BY clause) for the table. Click the [...] button in [Sort] column, the following dialog box will popup. You can choose up to 6 fields, in either ascending or descending order.
Default Set a Table as the Default Table. The Default table is the first table the user see when visiting your site. Select the table you want in the [Default] column.
List Inline Add Enable/disable Inline Add function for the table. Inline Add allows users to add a record within the List page. Default is disabled.
Inline Copy Enable/disable Inline Copy function for the table. Inline Copy allows users to copy a record within the List page. Default is disabled.
Inline Edit Enable/disable Inline Edit function for the table. Inline Edit allows users to edit a record within the List page. Default is disabled.
Grid Add Enable/disable Grid-Add function for table. Allows users to add multiple records to the table. Default is disabled.
Grid Edit Enable/disable Grid-Edit function for table. Grid-Edit allows users to edit multiple records within the List page. Default is disabled.
Detail Add Enable/disable Master/Detail-Add function for table (as detail table). Allows users to add multiple records to the detail table in the Add page of the master table. Default is disabled.
Detail Edit Enable/disable Master/Detail-Edit function for table (as detail table). Allows users to edit multiple records of the detail table in the Edit page of the master table. Default is disabled.
Detail View Enable/disable Master/Detail-View function for table (as detail table). Allows users to view multiple detail records in the View page of the master table. Default is disabled.
Multiple Detail Tables Enable/disable multiple Detail Add/Edit/View. By default each pair of Master/Detail tables are handled separately, meaning that in a page, there are one master table (the current table) and one of its detail tables only. If this option is enabled, all detail tables will be displayed together in the same page. Enabling this option will hide separate Master/Detail table pairs.
Requires Search Criteria Specifies if the List page requires search criteria. Default is disabled. Notes 1. If enabled, the List page always requires search criteria. When the page is initially loaded, no records will be displayed until searching is done. (Remember to enable Quick Search, including Extended Quick Search, or Advanced Search or both. See below.) 2. If a record is added but the new record does not meet the search criteria (or there is no search criteria yet), the record will not appear in the List page. So this option is best for tables which are for browsing only.
Detail Record Count Specifies if the number of detail records for the master record should be displayed. Default is disabled. Note 1. Applicable to master tables with master/detail relationships defined in PHPMaker only, see below. 2. If the detail table is a report, this feature is NOT applicable, there will be NO detail record counts for the detail report. 3. The counts are retrieved by using a subquery for each detail table. The more detail tables, the more performance penalty. You should enable this feature discreetly.
Sequence number Add a column to show the sequence number (record index) of the record in the recordset.
View View If enabled, a View page for the table will be generated (for displaying a record). Default is enabled. Note The table must have primary key or this setting will be unchecked during generation.
Add Add If enabled, an Add page for the table will be generated (for adding/copying a record). Default is enabled. Note The table must have primary key or this setting will be unchecked during generation.
Copy If enabled, Add page will be generated and "Copy" links will be generated for record(s) in List/View page (for copying). Default is enabled. (If this setting is enabled, the "Add" setting is also enabled by default as copying requires the Add page.) Note The table must have primary key or this setting will be unchecked during generation. CAPTCHA
Enable/disable CAPTCHA function for the Add page. Default is disabled. (CAPTCHA requires that the user type the letters or digits of a distorted image before submitting a form to prevent automated software from posting spam to your web application.) Notes 1. Requires CAPTCHA extension, click Tools->Extensions from the main menu to enable. Also see Third-party Tools. 2. Not applicable to Inline/Grid-Add/Copy.
Confirm Enable/disable confirmation function for the Add page. Default is disabled. If enabled, there will be a confirmation step in the Add page, users will be able check their input before actually inserting the record. Note Not applicable to Inline/Grid-Add/Copy.
Edit Edit If enabled, an Edit page for the table will be generated (for updating a record). Default is enabled. Note The table must have primary key or this setting will be unchecked during generation.
CAPTCHA Enable/disable CAPTCHA function for the Edit page. Default is disabled. (CAPTCHA requires that the user type the letters or digits of a distorted image before submitting a form to prevent automated software from posting spam to your web application.) Notes 1. Requires CAPTCHA extension, click Tools->Extensions from the main menu to enable. Also see Third-party Tools. 2. Not applicable to Inline/Grid-Edit.
Confirm Enable/disable confirmation function for the Edit page. Default is disabled. If enabled, there will be a confirmation step in the Edit page, users will be able check their input before actually updating the record. Note Not applicable to Inline/Grid-Edit. Check Conflicts Check if the record is changed by other user before updating the record. Notes 1. Since processing of current data for later comparison is required, using this feature will increase the time required to load the page. For better performance only the first hundreds of bytes of the BLOB fields are processed by default, but there are chances that change of BLOB data is not detected (if the first nth bytes are not changed). You can increase the number of bytes in Advanced Setting, if you want to process all bytes, enter 0. 2. You can use the Row_UpdateConflict server event (see Server Events and Client Scripts) to resolve the conflicts according to your business logic by code. 3. Not applicable to Inline/Grid-Edit.
Delete Delete If enabled, a Delete page for the table will be generated (for deleting record or multiple records). Default is enabled. Note The table must have primary key or this setting will be unchecked during generation.
Multi-Update Multi-Update If enabled, a Multi-Update page for the table will be generated (for updating multiple records). Default is disabled. With this feature you can select multiple records in the List page and update all records at the same time. You can select fields (see Field Setup page) to be included in the Multi-Update page. Note The table must have primary key or this setting will be unchecked during generation.
Confirm Enable/disable confirmation function for the Multi-Update page. Default is disabled. If enabled, there will be a confirmation step in the Multi-Update page, users will be able check their input before actually updating the selected records.
Search Quick If enabled, Quick Search panel (including Extended Quick Search) will be generated with the List page. Default is enabled. Quick Search searches text fields and optionally numeric fields only. These fields are selectable in Field Setup page. You may want to hide the Quick Search form for tables that do not have searchable fields.
Default value Default value for Quick Search. If no user input for Quick Search, this default value will be used. After users entering their search criteria, the default value will not be used.
Default search type Default search type for Quick Search. Possible values are:
Any words All words Exact match
Extended If enabled, Extended Quick Search inputs will be generated in the List page. Default is disabled.
Fields per Row For use with Extended Quick Search. Specifies the number of fields per row in the Quick Search panel. Default is 0 (unspecifed), which means one field per row.
Advanced If enabled, an Advanced Search Page will be generated and linked to the List page. Default is disabled.
Highlight If this setting is checked, the search criteria in the search result (List page) will be highlighted. Default is disabled.
Audit Trail To use this feature, you must also specify the [Audit Trail folder] or database table and field under [PHP]->[General Options] tab. See PHP Settings for details.
Audit Trail If audit trail for a table is enabled, when an user add/copy/edit/delete a record or login/logout, the related information will be logged in a log file. To use this feature, you must also specify the [Audit Trail folder] under [PHP]->[General Options] tab. See PHP Settings for details.
Email Notification To use this feature, you must also specify the [Email Settings] under [PHP]->[Email Settings] tab. See PHP Setup for details.
On Add If enabled, when an user add a record, an email will be send to pre-set recipient email address(es). Default is disabled.
On Edit If enabled, when an user edit a record, an email will be send to pre-set recipient email address(es). Default is disabled.
On Delete If enabled, when an user delete a record, an email will be send to pre-set recipient email address(es). Default is disabled. Other than above Tables Setup page, you can also click on a particular table node (under [Tables] or [Views] or [Custom Views] or [Reports] node) in the database pane to go to the Table Setup page for that table. The Table Setup page includes the following tabs: Table, Fields, and Server Events/Client Scripts. Click on the Table tab you'll see settings for the selected table only. The right side includes two panel - the [Table-specific Options] panel and the [Master/Detail] panel (see below), the left side contains settings same as above (but for the selected table only) plus the following additional settings:
Multi-page Normally each field is displayed as a table row in the View/Add/Edit page, this Multi-Page features allow you to display divide the fields into pages and display only one page at a time. To enable, at least one field with page number larger than 1 must be set up in Field Setup page. This feature is presented as tabs.
Multi-Page type Specifies how to display the pages. Possible values are:
Tabs - use Bootstrap basic tabs (default) Pills - use Bootstrap basic pills Accordion - use Bootstrap Collapse
Page Labels Specifies the page captions of each page in the Multi-Page. Click the [...] button and enter the page captions and click [OK] to save.
If page captions are not specified, "Page n" will be used by default. To add a page, go to Field Setup page, specify the page number for the fields in the page first. Note If you use Multi-Language (see PHP Settings), use Multi-Language Property Editor, see Tools for details.
Add page Specifies if Multi-Page is enabled for Add page.
Edit page Specifies if Multi-Page is enabled for Edit page.
View page Specifies if Multi-Page is enabled for View page.
Register page Specifies if Multi-Page is enabled for register page. This setting is only available for the user table specified in Security Settings.
Return Pages After Add Specifies the return URL after a new record is added. Note The URL must be a valid PHP expression. If it is a string, it should be double quoted. Example 1 If you want to redirect user to a custom page, enter: (with quotes) "MyPage.php"
Example 2 If you want to pass field values, enter: (with quotes) "MyPage.php?xxx=" . urlencode($this->->CurrentValue)
e.g. "MyPage.php?ID=" . urlencode($this->ID->CurrentValue)
Example 3 If you have just added a master record and want to go to Grid-Add page of the detail table, enter: (with quotes) "list.php?a=gridadd&showmaster=&=" . urlencode($this->->CurrentValue)
e.g. "OrderDetailslist.php?a=gridadd&showmaster=Orders&OrderID=" . urlencode($this->OrderID->CurrentValue)
Example 4 If you have just added a master record and want to go to Add page of the detail table, enter: (with quotes) "add.php?showmaster=&=" . urlencode($this->->CurrentValue)
e.g. "OrderDetailsadd.php?showmaster=Orders&OrderID=" . urlencode($this->OrderID->CurrentValue)
After Edit Specifies the return URL after a record is edited. Note The URL must be a valid PHP expression. If it is a string, it should be double quoted.
After Register Specifies the return URL after an user is registered. This setting is only available for the user table specified in Security Settings. Note The URL must be a valid PHP expression. If it is a string, it should be double quoted.
Table-specific Options These options are same as the list page options as described in PHP Settings except that the options are table-specific, meaning that you can have different list page options for different tables. To use table-specific options, select a table in the grid, uncheck [Use global settings] in the [Table-specific Options] panel, the panel will be enabled for you to setup.
Master/Detail When you set up a master/detail relationship, you link two tables so that all the records of one table (the detail table) always correspond to the single current record in the other table (the master table). Each table can have multiple master tables and details tables. You can establish master/detail (one-to-many) relationship between two tables as follows 1. Select a table in the table grid,
2. Then in [Master/Detail] panel at the bottom right corner of the page, click [Modify...] to bring up the visual master/detail relationship editor. 3. Click [Add table] to add the master and detail table to the diagram. 4. Create a relationship between them by dragging from the master field (key field in master table) to the detail field (foreign key field in the detail table). If there are more linked field, repeat the step until all the relationships are setup.
If you want to remove a relationship, select the link in the diagram and click [Delete]. After setup, click [OK] to confirm. Note The diagram only shows master/detail relationships of the selected table. Although you can setup relationships for other tables in the diagram and view them in the [Master/Detail] panel immediately after clicking [OK], the relationships for other tables will not be loaded again if you go to other table and then come back to this table. Instead, the relationships will only be displayed when you change to the related tables. In most cases, master and detail tables are joined by one field, you have one link between the master/detail table and you have one row in the Master/Detail panel only.
Referential Integrity Specifies that user may not add/update a record in the detail table unless the foreign key points to a valid record in the master table.
Cascade Delete Specifies that if a record in the master table is deleted, all corresponding records in the detail table will be deleted. Note If you have used ON DELETE CASCADE for the table in the database, no need to enable this setting.
Cascade Update Specifies that if the primary key for a record in the master table changes, all corresponding records in the detail table will be updated. Note If you have used ON UPDATE CASCADE for the table in the database, no need to enable this setting.
Also See: Tutorial - Master/Detail
Field Setup After loading the database, the database objects (tables, views, custom views and reports) will be shown in the left pane (the database pane). Click on any table to go to the Field Setup Page for that table at any time. Note For simplicity, we use "table" in the following description to refer to any of database object in the project. A database object can be either a table, a view, a Custom View or a report. PHPMaker support most commonly used data types. If PHPMaker finds any unsupported fields in a table, an [Unsupported Fields] tab will appear. You can click on the tab to view the list of fields that are not supported. The Field Setup pages consists of two section. The upper section is a grid showing available options of all fields. The lower section contain two panels, the [Edit tag] panel and the [View tag] panel for the selected field.
The grid consists of the following sections:
General List Page View Page Edit Page Add Page Multi-Update Page
Advanced Search Page
General
Properties Field Name Field Name (read only)
Data Type Data Type (read only)
Size Maximum field length (read only)
Caption Field caption to be displayed
Primary Key Primary Key of the table. Composite key is supported. Important 1. You should use the same primary key as declared in the database, do not change it unless you are absolutely sure that the selected field(s) values are unique. Otherwise a record cannot be located properly and unexpected results may occur. 2. Primary key is uneditable in the edit page.
Page No. Page number of the field. For use with Multi-Page. By default all the fields are in page 1 and Multi-Page is disabled. Multi-Page is supported for Add/Edit/View/Search pages, you can optionally enable it for each page. Page labels are also supported. See Table Setup. If Multi-Page is enabled and the page number is 0, the field will appear in all pages. Note You can multi-select the fields by ctrl-click or shift-click the Field Name column and then right click to set the page number for the selected fields simultaneously. Auto-Update Value A dynamic value to update the field function automatically in Add/Edit pages. The dropdown list for this setting is preloaded with a few functions for your selection. For example, you may want to record the last modified date of a record, then you can select "ew_CurrentDate". Do not select a function that return values of unmatching data type, for example, you should not select a function that return a non-numeric string for a numeric field. Notes 1. This setting will make the field hidden automatically and it overrides the default value in Add page and custom value for Hidden Edit tag in Edit page. (see section below) 2. You can add your own PHP functions, the function must accept no argument and return a value. You can add your function names (comma separated) for the Advanced Settings Auto-Update values (See Tools - Advanced Settings), e.g. You can enter: (no quotes) 3. MyAutoValueFunction1,MyAutoValueFunction2 4. Then put your functions under server side Global Code section, see Server Events and Client Scripts.
Custom field display order by drag-and-drop You can change the field order defined in the database by simple drag-and-drop. Simply ctrl-click or shift-click the Field Name column to select the field, then drag it to where you want. PHPMaker will generate scripts and display records according to this order.
List Page
Properties List Show field in list page Note The setting is also used for Inline/Grid-Add/Edit and Master/Detail-Add/Edit/View.
Export Include the field when export Aggregate Enable Field Aggregation. Aggregated values will be shown at Page Footer. Not applicable in multi-column view. Aggregate options include: - TOTAL (sum of all field values in current page) - COUNT (count of records in current page) - AVERAGE (average field value in current page) Width Specify CSS width property for field column width . e.g. If you enter: (no quotes) 200px the output will be: style="width: 200px"
Note If your table is too wide, browsers will try to best fit the content into screen and the specified width may be overridden.
Wrap Enable/Disable text-wrap for field value Note If you enable text-wrap but the field value has no line-breaking points (e.g. spaces or punctuation), the text still cannot be wrapped.
Quick Search Include this field when performing Quick(Basic) Search in the List page. Note Only text fields and numeric fields are supported in Quick Search. By default only text fields are enabled.
Ext. Search Use this field in Extended Quick Search Extended Quick Search is enhancement of Quick Search. If a field is checked for Ext. Search, a form element for the field will be shown in the Quick(Basic) Search form and the user input criteria for this field will be included when performing Quick(Basic) Search. Extended Quick Search will use the same search operators specified under the "Advanced Search Page" section (see below).
View Page
Properties View Show field in view page
View Tag HTML tag to display the field. Used in List/View pages. You can either click the [View Tag] column and select a View Tag from the drop down box or click the icon on the View Tag panel toolbar to select. After selecting the View Tag, you can further setup its properties in the View tag panel.
View Tag There are two types of View Tag, Formatted Text and Image. Formatted Text - View Tag to display the field value as formatted text using tag with optional hyperlink. Properties:
DIV Tag attributes Style Align - Left/Center/Right/Justify. Align the data. Italic - Display as Italic Bold - Display as Bold
Custom Attributes Other custom attributes for the tag. For example, you can enter: (with double quotes) "onmouseover='my_js_function();'" Notes 1. The setting must be a valid PHP expression. If it is string, it should be double quoted. 2. If you use your own JavaScript functions for the client events. You can put your JavaScript functions in the Global Code for client scripts (see Server Events and Client Scripts) so it is available for use in the generated scripts. 3. Sometimes the generated code already uses some attributes (e.g. onXXX events), if you add the same attribute here, it may be ignored by some browsers. In such cases, use the Row_Rendered server events instead (see Server Events and Client Scripts).
Format None No formatting Currency Display as formatted currency Date/Time Display as formatted date Note For simplicity the Date/Time named format indicates the date format with "/" as the date separator regardless of the Default date format setting, but the actual date separator used in the generated scripts is determined by the Default date format setting (see PHP Settings). Number Display as formatted number Percent Display as formatted percentage String Format the field value with specified PHP string function or custom function Replace CR+LF by Display the fields with CR+LF replaced by (available for memo fields only) Max Length (List page) Truncate the field value at specified max. length and append "..." to the end. Note This setting only applied to memo fields in list page and must be larger than 0 to take effect. Hyperlink HREF field Display the field as hyperlink with the href attribute set to the value of this field. It can be the field itself. Original field value Use original field value of the Href field in the hyperlink instead of display field value.
If the HREF field has lookup table or user values, by default the display value will be used. If this option is enabled, the original field value will be used instead. Target Target attribute of the hyperlink. Possible values are: _top, _parent, _self, or _blank. You can also enter your own. Prefix Prefix added before the HREF field value. You can select one of the follows: - None (no prefix, relative path of URL) - http:// (prefix http:// added, absolute path of URL) - mailto: (prefix mailto: added, email link) - ftp:// (prefix ftp:// added, ftp link) - file:// (prefix file:// added, file link) - news:// (prefix news:// added, newsgroup link) You can also enter your own partial URL (preceding the HREF field value) Note This setting is a string to be quoted by double quotes, if you want to use PHP variable, wrap it in "{" and "}". Since "{" can not be escaped, this syntax will only be recognized when the "$" immediately follows the "{". Read PHP Strings for more information on parsing variable in string. For example, you can enter: (no quotes) mypage.php?id= The value of the HREF field will be appended to the end of the your prefix in the outputted HTML. If you want pass a field value, you can enter: (no quotes) mypage.php?myfield={$this->UrlEncode($this->MyField->CurrentValue)}&id=
If you need to pass parameters which should not be URL-encoded, for example, if you use ew_Encrypt() to encrypt your parameter, you can enter: (no quotes) mypage.php?myfield={$this->Raw(ew_Encrypt($this->MyField->CurrentValue))}&id=
Suffix Suffix added after the HREF field value. You can use this setting to append additional URL parameters. For example, you can enter: (no quotes) &field2={$this->UrlEncode($this->Field2->CurrentValue)}
Since this is a suffix, you should always use "&" at the beginning of the string. Custom Attributes Custom attributes for the tag. For example, you can enter: (with double quotes) "rel='xxx'" Notes 1. The setting must be a valid PHP expression. If it is string, it should be double quoted. 2. If you use your own JavaScript functions for the client events. You can put your JavaScript functions in the Global Code for client scripts (see Server Events and Client Scripts) so it is available for use in the generated scripts.
Tooltip Tooltip field Display the field as tooltip Tooltip width The width of the tooltip in pixels. Default is 0 (auto). By default the width is not specified and the width will depend on the field value. However, when the tooltip field is a long text field, the width can take up the browser width, which may be unwanted. Then you can specify a value to limit the width.
Custom View Tag Custom View Tag Display the field value in List/View page by custom code. Important Custom View Tag overrides ALL above View Tag settings. There are some ready-to-use Custom View Tag for you to choose:
Flash Files Google Maps Barcode QR code YouTube videos
If your data stores information for above, just click the down arrow button to open the setup form, enable one of them, read the notes at the bottpm panel carefully, then click the Settings tab to setup, and click OK to save your settings. Notes 1. Only one of above Custom View Tag can be selected at a time. All records will use the same Custom View Tag. For instance, you can NOT use Barcode for a record and use QR code for next record. 2. The above Custom View Tags are provided as examples only. The third party tools used are not developed by the author of PHPMaker and are not part of PHPMaker, NO TECHNICAL SUPPORT WILL BE PROVIDED. You can also create your Custom View Tag, they are implemented in exactly the same way as template ex ten si ion (see Customizing Template). Custom View Tags must be placed under the subfolder "customviewtags" of the installation folder. Each Custom View Tag must have a XML description file so it can be loaded for selection. You can open an XML file in the "customviewtags" subfolder to see the content, which is self-explanatory. Unzip the zip file to see how it is implemented. If you want absolute freedom, click the [...] button to enter your own code to display the your data in your own PHP, HTML and JavaScript. Important If you choose to enter your own code, you are completely on your own to display the field value. Intermediate knowledge in PHP, HTML and JavaScript is required. Custom View Tag is HTML, if you want to embed PHP code, use , if you want to use JavaScript, use and . Note DO NOT use $this in your PHP code. There is no $this in the context, you can use CurrentPage() to get the current page object. To reuse the original code, you can generate scripts without Custom View Tag first, then customize the field in View page as needed. When done, copy and paste your customized code to PHPMaker user interface as your Custom View Tag. The original code will also be generated in a hidden DIV with id="orig__", you can also reuse it by JavaScript. Example 1 Output the field value conditionally: Example 2 Output a custom link:
View more...
Comments