Tutorial PHP Maker
Tutorial PHP Maker
Optional PHP list, add/copy, view, edit, delete, multi-update and search pages for each
table/view. (See Table Setup) Customizable table display order.
Optional Inline-Add, Inline-Copy, Inline-Delete, Inline-Edit right in the List page
Optional confirmation page before insering or updating record
Pagers in List/View page
Fully customizable View and Edit format for each field. (See Field Setup) Customizable field
display order.
Client-side JavaScript validation
Optional search features (Quick, ExtendedQuick and Advanced) with search result highlight
Optional User ID and User Level Advanced Security to protect data from unauthorized access.
(See Security Settings) Supports Parent User ID and Dynamic User Levels.
Complete user registration system with optional user activation
Optional HTML settings. Charset, font, CSS, HTML colors, HTML table settings with preview.
(See HTML Settings)
Multiple Master/Detail pages
Various PHP options. Charset, locale, default date formats, etc . (See PHP Settings)
Saving and restoring project from Project File
Synchronize project settings with changes in database.
Creates virtual directory in IIS automatically
CSS stylesheet integration
Field aggregation (sum, average and count)
Custom View with built-in visual query builder
Basic reporting
Export to HTML/Word/Excel/CSV/XML from List/View page
Multi-column sorting
User selectable page size
Table-specific List page options
File uploading to folder and database
Dynamic table loading
Composite key
Highlight and select row color
Auto-Suggest and Auto-Fill textbox
Adding option to Selection List dynamically
Dynamic Selection List with multiple selection support
Auto-login and Auto-Redirect
Multi-page update
Audit Trail
Email Notification on Add/Edit/Delete
Optional CAPTCHA system
File uploading to folder and database
Dynamic table loading
Server events and client scripts
Code repository
Fully customizable template and extensions
PHPMaker 5 is a major upgrade from 4.x. It is loaded with a bunch of new features, including many
frequently requested ones. The template has been largely rewritten to provide better code and better
features. PHPMaker has become even more powerful and flexible, and yet still easy-to-use as always.
Enhanced List Page - Grid-Edit, Inline-Add, Inline-Copy and Search Result Highlight
PHPMaker 5 offers Grid-Edit feature, now you can edit multiple records simultaneously in the List
page. Moreover, complementing the existing Inline-Edit and Inline-Delete features, PHPMaker 5 offers
Inline-Add and Inline-Copy as well, now you can modify (Add/Copy/Edit/Delete) records right in the
List page. Search result can also be optionally highlighted.
Grid-Edit
Inline-Add/Copy
Search Result Highlight
Multi-Update Page
With the existing Multi-Delete feature you can select multiple records in the List page and delete them
all. With new Multi-Update feature you can select multiple records in the List page and update selected
fields to the same data in one go.
The export feature of the List page is extended to the View page for user to export a single record.
Paging (one record per page) is also supported in View page for users to navigate through the records
without going back to the List page.
Enhanced Add/Edit/Registration Page - Data Confirmation
In some cases you may want to let users to check their input before actually inserting or updating a
record. PHPMaker 5 lets you optionally add a confirmation step for Add, Edit or Registration pages. If
the form involves image upload, the user will also be able to view the uploaded image during
confirmation.
CAPTCHA
PHPMaker 5 supports CAPTCHA (template extension) for Add pages and Registration page.
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 PHP application.
Multiple Master/Detail
In previous version mulitple detail tables were allowed for a table but multiple master tables were not
directly supported. PHPMaker 5 offers built-in support for Multiple Master/Detail. Each table can have
multiple detail tables and multiple master tables. A visual master/detail setup interface is also provided
for easy setup and modification.
More Ajax
Auto-Fill
Similar to updating a child combobox in Dynamic Selection List, this Auto-Fill feature automatically
fill a child textbox by Ajax when an option of the parent combobox is selected. You can update
multiple child textboxes just like updating multiple child selection lists in Dynamic Selection List
feature.
Anonymous User
In previous verions, anonymous access is provided by User Level Security's built-in Anonymous User
Level. In PHPMaker 5, the new Anonymous User can work independently or together with User ID
Security and/or User Level Security. When enabled for a table, users will be able to see all records of
the table in the List page before and after login, but only able to modify their own records (and
optionally their child users' records) after login.
Auto-Redirect
In previous verions, users will be redirected to the default page after login. In PHPMaker 5, users will
be redirected to the page they originally access.
If you customize templates, this new feature enables you to save your own code, both server-sider and
client-side, in your project. This feature reduces template customization so you can migrate your
project to other templates more easily. The View Tag (for display) and Edit Tag (for input) of the fields
now supports Custom Attributes so you can add your own attributes to work with your own code. The
server events and client scripts provide advanced users a lot of possibilities for project customization,
for example, you can use the Row_Rendered() event to do conditional formatting of a field.
Furthermore, PHPMaker 5 provides a Code Repository for easy reuse of your code across projects and
sharing with other users.
Auto-Update Fields
This feature makes it easy to auto-update a field, you just need to choose an auto-update value, such as
current date, current user IP, current user name. You can even add you own. It is no longer necessary to
set up default value in the Add page and custom hidden value in Edit page for these fields.
More
After loading the database, the tables and views will be shown in the database pane on the left pane
(database pane). Click on the [Tables] or [Views] or [Custom Views] or [Reports] node to go to the
Table Setup page 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.
The Table Setup pages consists of two section. The upper section is a grid showing available options of
all tables. The lower section contain two panels, the [Table-specific Options] panel and the
[Master/Detail] panel for the selected table.
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.
You can 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.
IMPORTANT NOTES:
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.
General
Note: Avoid special characters, you can use HTML entities instead. See Project
File for more 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 string as the WHERE clause will be
concatenated to the SQL string. For example, "State = 'CA'".
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.
Menu Uncheck the table in the [Menu Item] column if you don't want to show the table
Item in the navigation menu generated by PHPMaker.
List
Settings for List pages:
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-Edit
Enable/disable Grid-Edit function for table. Grid-Edit allows
users to edit multiple records within the List page. Default is
disabled.
Requires Search Specifies if the List page requires search criteria. Default is
Critera disabled.
Notes:
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
Settings for Add pages:
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.
CAPTCH Enable/disable CAPTCHA function for the Add page. Default is disabled.
A (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 PHP application.)
Notes:
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.
Confir Enable/disable confirmation function for the Edit page. Default is disabled. If
m enabled, there will be a confirmation step in the Edit page, users will be able
check their input before actually updating the record.
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
PHPMaker 5 supports Multi-Update.
Multi- If enabled, a Multi-Update page for the table will be generated (for
Update 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.
Note: 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.
Advance If enabled, an Advanced Search Page will be generated and linked to the List
d 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.
Note: The highlight style can be modified by customizing the CSS stylesheet.
Audit Trail
PHPMaker supports audit trail.
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 Setup for details.
Email Notification
PHPMaker supports sending notification emails. 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.
Table-specific Options
There otpions are same as the list page options as described in PHP Setup 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.
Multiple 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).
PHPMaker (5+) supports multiple master/detail, which means that each table can have multiple master
tables and details tables.
You can establish master/detail (one-to-many) relationship between two tables as follows
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.
If you want to use Detail Record Preview feature, click Tools->Extensions to enable to YUI
Container extension (for registered users only).
Note: The Detail Record Preview feature is not applicable to reports (as detail table) and aggregate
values (if any) for the detail records are currently not supported in the preview.
Also See:
Tutorial - Master/Detail
Tutorial - Master/Detail
In this tutorial we will show you how to setup Master/Detail table view in PHPMaker. We will use the
demo database for demonstration.
In the demo, there are two tables called "Orders" and "Order Details". We will set up the master/detail
relation between these two tables.
1. Loading PHPMaker
Click [Tables] (or any child node of the database node) on the Database tree view in the left pane. The
Table Setup page is displayed in the right pane.
To setup the Master/Detail relation between table "Orders" (Master) and "Order Details", select either
table, in this example, we choose "Orders" table at Table/View list. Then in [Master/Detail] panel at
the bottom right corner of the page, click [Modify...] to bring up the visual master/detail relationship
editor. Drag the detail table from the table list on the left to the diagram on the right.
Then 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. In this tutorial, we
only have one detail field ([Order Details].[OrderID]) and one master field ([Orders].[OrderID]).
PHPMaker 5+ supports multiple master/detail, if the table has other master tables or detail tables, just
repeat above process. In this example, we have only one master/detail relationship, so we click [OK] to
confirm. The master/setail relationship is setup.
If you have the YUI Container extension (for registered users only) and want to enable Detail Record
Preview by Ajax, you can click Tools->Extension to enable it. Also see Third-Party Tools.
Note: The Detail Record Preview feature works best when the number of the fields and number of
records are not too many so the size of the preview area will not be too large. Otherwise the preview
area may exceed the browser area and therefore the detail records cannot be viewed completely at a
glance. Or the preview area will be too wide that it covers the detail table link and therefore the
preview area can be hidden by moving the mouse cursor from the link.
3. PHP Script Generation
Click the [Generate PHP] icon to go to the [Generate] tab, click the [Generate] button. PHPMaker
will generate the required PHP scripts automatically.
Click on the link to the "Orders" table, there will be a new column of "Order Details Details" which
links to the "Order Details " table. Click on the link to access the Order Details for that Order.
If you have enabled YUI Container extension, move your mouse cursor over the "Order Details..."
link and you'll see detail records preview:
Click the "Order Details..." link, the Detail Record List Page for "Order Details" will be shown as
below. To add, delete, view, edit or search records in the Detail table, simply click on the
corresponding links in the page.
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 all commonly used ADO data type. 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.
General
List Page
View Page
Edit Page
Add Page
Multi-Update Page
Advanced Search Page
General
Properties
Important Note:
1. You should never change this field unless you are absolutely
sure that this field is unique. Otherwise a particular record
cannot be located and unexpected results may occur.
The dropdown list for this setting is preloaded with a few functions for
your selection. For exmaple, 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:
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) in the following registry key:
HKEY_CURRENT_USER\Software\PHPMaker\<Version>\
Settings\General
Value: AutoUpdateValues
You can change the field order defined in the database by simple drag-and-drop. Simply click the Field
Name column to select the field, then drag it to where you want. PHPMaker will generate PHP and
display records according to this order.
List Page
Properties
Extended Quick Search will use the same search operators specified under
the "Advanced Search Page" section (see below).
View Page
Properties
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.
There are two types of View tag, Formatted Text and Image.
Formatted Text - View Tag to display the field value as formatted text using <div> tag with optional
hyperlink. Properties:
Format
None No formatting
Currency Display in currency format
Date/Time Display in date format
Number Display in number format
Percent Display in percent format
String Format the field value with specified VBScript string function
or custom function
Max Length (List Truncate the field value at specified max. length and append
page) "..." to the end.
Note: This setting only applied to memo fields in list page and
must be larger than 0 to take effect.
DIV Tag attributes
Style Bold - Display as Bold
Italic - Display as Italic
Align - Left/Center/Right/Justify. Align the data.
Custom Attributes Other custom attributes for the <div> tag. For example, you can
enter "onmouseover='myjsfunction();'".
Hyperlink
HREF field Display the field as hyperlink with the href attribute set to the
value of this field. Can be the field itself.
Target _top/_parent/_self/_blank
Prefix - 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)
Suffix Append the input string to the URL
Image - View Tag to display as Image using <img> tag. The field should be a BLOB field or a field
storing the path of the image.
Edit Page
Properties
You can either click the [Edit Tag] column and select a Edit Tag from the drop down box or click the
icon on the [Edit Tag] panel toolbar to select. After selecting the Edit Tag, you can further setup its
properties in the Edit Tag panel:
Edit Tags
Edit Tags are HTML forms elements for the field in Add/Copy/Edit/Search pages. All HTML form
elements are supported:
Notes:
Notes:
For Radio/Checkbox/Select Edit Tags, the default option values are user input values, you can enter as
many value/label pairs as you want in the [User Values] panel next to the [Edit Tag] panel.
Note: For boolean fields, if you use Radio Edit Tag with User Values, the first value/label should be
for True and the second for False.
In real world applications, the option values usually come from a (lookup) table in the database.
PHPMaker make it very simple to use lookup values for key field values, simple click [Use Table], the
[Lookup Table] panel will replace the [User Values] panel, select the following properties:
Notes:
1. Review your lookup table design before using this option. The
option works best if you there is only one display field and the
link field (primary key) is an autoincrement field. In that case the
user only need to fill in a textbox and the option is added. But if
the link field (primary key) is not an auto-increment field, the
user will need to enter the link field value which the user may not
know.
2. The user will be asked to enter the link field and the display
field(s) only. If the lookup table has other NOT NULL fields
other than the link field and display field(s), the new option
cannot be added. However, you can define default values for
these fields in the database (not in PHPMaker).
3. From PHPMaker 5+, this feature also work with child selection
list Dynamic Selection List. The filter field value also be added
according to the selected option of the parent selection list.
The data input for each field can be validated using client-side JavaScript.
Notes:
1. Other than "/", the date separator of the validation format can also be "-"
or ".", depending on the default date format setting in PHP Setup page.
2. From PHPMaker 5+, you can add your own JavaScript functions for
validation. The JavaScript function must accept one argument (the
value) and return true (valid value) or false (invalid value). You can add
your function names (comma separated) in the following registry key:
HKEY_CURRENT_USER\Software\PHPMaker\<Version>\Settings\
General
Value: CustomValidationFunctions
Note: In previous version, the validation is done on server side in Add page
only. From PHPMaker 5+, the validation is done on both Add and Edit pages.
Add Page
Properties
Multi-Update Page
Properties
Properties
Search Show field in Advanced Search page (Note: NOT related to Quick Search)
Search Opr Search operator #1 for the field. Used in Advanced Search or Extended
1 Quick Search.
Search Opr Search operator #2 for the field. Used in Advanced Search or Extended
2 Quick Search.
Notes:
1. This second search operators will be useful when you may have 2
criteria for the field when searching. You can also select AND/OR
to relate the 2 criteria.
2. PHPMaker supports "BETWEEN" search operator. If you want to
use it, select "BETWEEN" as the first search operator. Since
"BETWEEN" requires 2 search criteria, when it is used, the second
search operator will be ignored.
Field Description:
Administrator Login (Hard-
Administrator user id and password
Coded)
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
Auto-login
PHPMaker supports auto-login. 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.
Advanced Security
PHPMaker's 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,
their identities are unknown and they are Anonymous Users.
Anonymous User
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:
User Level
User Level Security secures data at table level. Each user level is granted with specific permissions to
tables in the database.
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:
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 static User Level security for different tables/views:
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.
The Anonymous built-in user level in previous versions is deprecated. Use the new [Anonymous
User] (see above) to configure permissions for users before login.
Notes: You may need to use the hard-coded Administrator Login to log on and assign user levels to
users initially.
Notes:
The email sending function and the email contents can be customized in the template. The following
special tags are used in the email templates:
<!--$From--> is sender email address
<!--$To--> is user email address
<!--$Password--> is user password
<!--FieldName--> (without the $ symbol) is the field value.
Also See:
HTML Settings
General
Title Title displayed on all the PHP pages
Charset Charset setting (not specified if not entered)
Font Default text font (not specified if not entered)
Size Default text size
Site header logo Logo image in the header
Site footer text Footer text (e.g. copyright statement)
Header color Background color of the header banner
Footer color Background color of the footer
Footer font color Text color of footer text
Left column color Left column (menu column by default) color
Body
Background Color Background Color (<body> tag bgcolor= property)
Text Color Text Color (<body> tag text= property)
Link Color Normal HyperLink Color (<body> tag link= property)
Visited Link Color Visited HyperLink Color (<body> tag vlink= property)
Active Link Color Active HyperLink Color (<body> tag alink= property)
Left Margin Body Left Margin (<body> tag leftmargin= property)
Top Margin Body Top Margin (<body> tag topmargin= property)
Table
Stylesheet
Edit A separate CSS stylesheet will be generated for each project. Click the [Edit
stylesheet stylesheet] button to open CSS editor.
Notes:
1. All projects use CSS stylesheet. The option of not using CSS
stylesheet is deprecated.
2. If you have TopStyle (Pro or Lite) installed on your PC, PHPMaker
will use it automatically.
When you edit the CSS styles in the editor, note the follows:
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
Linking to external user stylesheet (will be copied across during generation)
Stylesheet
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".
PHP Settings
General Options
Add shell (For Unix-based server only) If you put the PHP parser binary somewhere
call 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 LC_ALL and localeconv().
localeconc() is for PHP 4 >= 4.0.5 only. For pre-4.0.5 versions, PHPMaker
generated codes use the constants defined in phpmkrfn.php which you can
find in the template and customize it to suit your needs.
No Cache Whether caching is required on browser
Replace
CR+LF by For memo fields
<br>
Use mysqli Use mysqli extension instead of MySQL functions.
extension
Notes:
1. The mysqli extension is designed to work with PHP 5 and MySQL
4.1.3 or above,
Important note:
1. Make sure that the Web server user have read/write access to the
folder. You can right-click the folder and add read/write access for
IUSR_<MachineName> on the Security tab.
2. 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 log file will be C:\Inetpub\wwwroot\demo\
uploads.
Important note:
1. Make sure that the Web server user have read/write access to the
folder. You can right-click the folder in Windows Explorer and add
read/write access for IUSR_<MachineName> on the Security tab.
2. 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.
Allowed file type - The allowed file extensions of the uploaded files.
Separate the file extensions (without ".") by comma, e.g. gif,png,png)
Delete file on update/delete - Option to delete the uploaded file when the
field value is replaced, removed or if the record is deleted.
List/View Page Options (Global)
The following list/view page options are global for all tables. If you want different settings for a
particular table, you can use table-specific options available in the Table Setup page.
Records per Number of records to be displayed on the list page of all tables. If blank or
page 0, default setting of 20 will be used.
Selectable Number of records to be selected by user. Comma separated values, e.g.
page sizes 10,20,50,ALL.
Note: "ALL" (without quotes) is supported, other values must be integers.
Paging
"NumericPages" or "NextPrev"
section style
Sort type None, Single column or Multiple column. If Multiple column is
selected, the generated list page supports multi-column sorting by Ctrl-
clicking the table header.
Multiple Show multiple records per row. Default is 0. This feature will only take
column effect if the value is > 0.
Paging
Show the paging section at top (also applies to View page)
section at top
Paging
section at Show the paging section at bottom (also applies to View page)
bottom
Enable
paging
Show paging section in View also
section in
View page
Multiple
Show checkboxes in the list page for selecting multiple records to delete
delete
Inline delete Delete records directly without showing delete confirm page
Links on left
Show the links on the left instead of right
side
Export CSV/HTML/Excel/Word/XML - Records can export to CSV, HTML,
Excel, Word or XML format. HTML format can be used as a printer
friendly version.
XML Encoding - The XML encoding for export data in XML format.
(XML document requires encoding so the data can be read by XML parser
properly. If your table/field names use English or alphanumerical
characters only, you can leave the encoding blank. Otherwise, you need to
specify an encoding.)
Notes:
1. Binary data (BLOB fields) cannot be exported.
2. Export to CSV/XML are not applicable to reports.
Email Settings
PHPMaker supports many features that can send emails. If you use these features, you'll need to
specify a SMTP server.
By default the emails will be sent by Microsoft CDO using default SMTP
server on the Web server, in such case you can specify "localhost". But
sometimes the default SMTP server may be disabled, in such case you
need to specify another SMTP server.
Note: If you are still using Windows NT4 Server, using other SMTP
server is not supported by the CDONTS object, you'll need to choose
another email component (if available), see below.
SMTP server
Port number of SMTP server. Default is 25.
port
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 Email address of the recipient(s) for notification emails when a record is
address) added/edited/deleted (if enabled). If there are multiple recipients, separate
them by comma.
Email The email components to be used by PHP to send emails.
Component
By default the emails will be sent by PHP mail() function which is a
built-in function of PHP. If SMTP authentication is required, you can
choose PHPMailer.
Application Root
From PHPMaker 4, upload folders and audit trail folder are relative to application root. The change is
to enable the user to put the uploaded files and the audit trail log files in folder outside of the script
folder. (In previous versions, the file upload folder is relative to the script, it was supposed to be a
subfolder under the script.)
Where is the application root? PHPMaker scripts looks for the application root in the following
sequence:
Root Relative Path is the path relative to destination folder. The destination folder is the folder where
the generated scripts reside.
When you generate scripts, you must specify the [Application root folder] and the [Destination
folder] correctly based on your folder structure. The relative folder structure on your local computer
must be the same as that on your production server.
It is recomended that you set the [Application root folder] to the root folder of your Website where is
accessed by http://www.mycompany.com/ so you can specify your upload folder and audit trail folder
straightforwardly using the Website root as a starting point. For example, if you specify "upload/" as
upload path, since it is relative to application root, the upload folder will be accessible by
http://www.mycompany.com/upload/.
On your testing server, you may work with multiple projects and test your projects one folder level
lower at http://localhost/<projectname>/ (cf. http://<projectname>/). In this case you should set the
[Application root folder] in each project as the root folder of the project (the folder that is accessed by
http://localhost/<projectname>/). After uploading to the production server, the site may be then
accessed by http://www.mycompany.com/ (cf. http://localhost/<projectname>/), but as long as the
relative location of the two folders (Application Root folder and the script folder) are the same, the
scripts will still work properly.
2. Document root
If Root Relative Path is empty, the script check the following variables:
$_SERVER["DOCUMENT_ROOT"] or $_ENV["DOCUMENT_ROOT"].
This variable may be blank if you use IIS on Windows. But if you use Apache, it is usually the physical
path of your Website root. e.g. On Linux, it may return
You can put your generated scripts in your Website root, or you can put the generated scripts in a
subfolder under your website root, e.g.
/home/username/public_html/scripts which can be accessed by http://www.mycompany.com/scripts/
When you generate scripts, you still need to specify the [Application root folder] and the [Destination
folder] based on your folder structure so that the relative location of the two folders is correct.
3. Script Path
If both Root Relative Path and Document Root are empty, the script will use the path of the current
script.
4. Custom Path
The above three approaches should handle most cases. If in some special cases they don't return the
path you want, you can modify the function ew_AppRoot() in phpmkrfn.php. You can simply specify
your real server path directly. For example,
Windows:
function ew_AppRoot() {
return 'C:\Inetpub\wwwroot\MyWebRoot\'; // replace with your real server path directly, include the
trailing path delimiter
}
Linux/Unix:
function ew_AppRoot() {
return '/home/username/public_html/'; // replace with your real server path directly, include the
trailing path delimiter
}
Remember that you must also check the value of the constant EW_ROOT_RELATIVE_PATH, make
sure it correctly points to your application folder relative to the script folder. Using above example, you
specify that the application root is "C:\Inetpub\wwwroot\MyWebRoot", if your scripts are placed in
"C:\Inetpub\wwwroot\MyWebRoot\MyScripts\", then EW_ROOT_RELATIVE_PATH should be "..".
TIP: You can call the PHP function phpinfo() (i.e. <?php phpinfo(); ?>) to view your server
information, including the server paths. Alternatively, in the generated scripts (that includes
phpfn<version>.php), you can call the PHPMaker function ew_WritePaths() (i.e. <?php
ew_WritePaths(); ?>) to view the path settings in your project. For example,
<?php
include("phpfn50.php");
echo ew_WritePaths();
?>
Project File
A project file is an XML file which stores database information and settings of a particular project. It
can be used as a good save-and-restart point for the customization process and is also useful as a trace
in case of problematic generation. It is therefore a good practice to save a project file for each site you
are generating.
Like other XML document, project file is human-legible. You should be able to open a project file in
any text editor. With a basic understanding of XML, you should be able to read an XML file and
change the settings.
Each template object is represented by an XML node in the project file. The object properties are saved
as attributes of the node. The property name is same as the attribute name.
XML documents can contain foreign characters, but it requires encoding so the data can be read by
XML parser properly. The encoding of the project file is auto-detected by our products according to
your computer regional setting. Generally, the detected encoding should be compatible with your
language. If not, you can override the auto-detected setting by explicitly setting an encoding to the
registry key:
HKEY_CURRENT_USER\Software\<product name>\<version>\Settings\General
Value name: XMLEncodeCharSet
XML documents cannot include special characters that are not belonged to the specified XML
encoding. Therefore, always avoid using special characters in your project setting. For example, iso-
8859-1 does not include the euro dollar sign. If you copy and paste an euro dollar sign from somewhere
to the project setting, error may occur when you save the project and the project file may become
corrupted. If you must use those special characters, always use the HTML entities, e.g. use "€"
for the euro dollar sign. From PHPMaker 5, there is an alternative, you can force PHPMaker to save the
project file and generate output files as utf-8 encoded files by setting the following registry key value to
True (by default it is False). However, note that not all editors support utf-8 files, if you edit the utf-8
encoded output files with a Web page editor which does not support utf-8, the files might be corrupted.
Only use this setting if your project cannot be saved with the native encoding.
HKEY_CURRENT_USER\Software\<product name>\<version>\Settings\General
Value name: UTF8Project
Auto Backup
PHPMaker 5+ supports auto-backup. When you save a project, the old version will be saved to the
subfolder "<product name>\Backup" under the My Documents folder first, you can recover older
versions of your project from the backup folder in case of corrupted projects or other accidental losses.
Note that only the latest 10 versions will be kept, older versions will be deleted.
Project Name
Each project file has a project name. By default the file name (without extension) of the project file is
used as project name. Before you name your project file when saving it for the first time, a temporary
name, Project<n>, where n is a number, is used. The project name is an important property, it is used in
the generated codes to identify your project.
When you want to create a new project based on an existing project, you can use [Save As...] under the
[Project] menu. If you want to create a backup copy or another version of an existing project, use
[Save a Copy...] to save the file with another name. If [Save a Copy...] is used, the project name is not
changed, so the project name is not same as the file name anymore. However, with the same project
name, scripts generated from these different project files will still work with each other like they are
generated from the same project file.
If you use IIS (Internet Information Services), our products can create virtual directory for your project.
The project name is used as virtual directory alias as well as the path under the default Web site of IIS.
Therefore, if you want to create a virtual directory with a specific name, you can save the project file
using that name first.
Also See: