Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Stephen Arrowel, Database Administrator: "We are in the process of implementing Firebird solutions at multiple levels in our international organization. We expect that SQL Maestro Group will do nothing short of revolutionize the way we develop and maintain our Firebird databases. The continuous improvement and development means that the product is extremely flexible and will grow with us. The service and responsiveness of the Support Team has been exceptional. They have devoted countless hours to understanding our needs, so that we could get a Firebird administration tool which would be so simple and effective in use. SQL Maestro Group is helping Sytrax sail into the 21st Century".
Kelly Dires: "First let me say we are very impressed with Firebird Data Wizard, it was not only the fastest but also the easiest to use out of the six tools of this class tested".

More

Add your opinion

SQL Maestro Group / Products / Firebird / News / PHP Generators 17.10 released

PHP Generators 17.10 released

Oct 23, 2017

Prev Next
PHP Generator

SQL Maestro Group is happy to announce the release of PHP Generator 17.10, a GUI frontend that allows you to build high-quality and feature-rich data-driven web applications for your database in minutes. There are versions for MySQL, MS SQL Server, PostgreSQL, Oracle, SQLite, Firebird, DB2, SQL Anywhere and MaxDB.

The following is a list of new feature implementations since the last major release. Most of new features can be seen in action in our Feature Demo, Security Demo, and NBA Demo applications.

New feature highlights:

  • Security-related enhancements. This new version comes with a number of brand new and significantly updated security-related features as follows:
    • Self-registration of users has been implemented. From now on a user (if allowed by the application developer) can register at a generated website providing an email address and clicking a confirmation link in the received message. It is also possible to request a resend of verification email as well as recover a forgotten password. All email messages sent during the registration and verification can be customized with the project-level OnGetCustomTemplate event. Also a number of events to control registration and password recovering processes have been introduced.
    • OnGetCustomPagePermissions and OnGetCustomRecordPermissions events have been added. These events allow you to grant permissions to the users at page and record level accordingly in the most flexible way possible. For example, you can implement a role-based permission model, load permissions from any data source, and so on.

      Code Sample (click here to show/hide)

      Listing 1. OnGetCustomPagePermissions event handler example
      protected function doGetCustomPagePermissions(Page $page, PermissionSet &$permissions, &$handled)
      {
          // do not apply these rules for site admins
          if (GetApplication()->IsLoggedInAsAdmin()) {
              return;
          }
       
          // retrieving the ID of the current user
          $userId = GetApplication()->GetCurrentUserId();
       
          // retrieving user roles
          $sql =
              "SELECT r.role_name " .
              "FROM role_membership rm " .
              "INNER JOIN roles r ON r.id = rm.role_id " .
              "WHERE rm.user_id = %d";
          $result = $page->GetConnection()->fetchAll(sprintf($sql, $userId));
       
          if (empty($result)) {
              return;
          }
       
          $permissions->setGrants(false, false, false, false);
       
          // iterating through retrieved roles
          foreach ($result as $row) {
              if ($row['role_name'] === 'Sales') {
                  $permissions->setGrants(true, true, true, true);
                  break;
              } else if ($row['role_name'] === 'Marketing') {
                  $permissions->setViewGrant(true);
                  $permissions->setAddGrant(true);
              } else if ($row['role_name'] === 'Finance') {
                  $permissions->setViewGrant(true);
              }
          }
       
          // apply the new permissions
          $handled = true;
      }

      A number of live examples can be found in Security Demo.

    • OnAfterLogin event: $canLogin and $errorMessage parameters have been added. These parameters allow you to (temporarily) disable access to the website, for example, for users who are on vacations or for fired employees.

      Code Sample (click here to show/hide)

      Listing 2. OnAfterLogin event handler example
      function OnAfterLogin($userName, $connection, &$canLogin, &$errorMessage)
      {
          // handling blocked users
          $sql = "SELECT is_blocked FROM phpgen_users WHERE user_name = '$userName'";
          $result = $connection->ExecScalarSQL($sql);
          if ($result) {
              // disable login and display error message
              $canLogin = false;
              $errorMessage =
                 "Dear $userName," . "<br/><br/>" .
                 'Your account has been suspended. Please ' .
                 '<a class="alert-link" href="mailto:support@example.com">contact our support team</a>' .
                 'for more info.';
              return;
          }
       
          // handling redirected users
          if ($userName == 'redirected_user') {
              header('Location: advanced_after_login.php');
              exit;
          }
      }
    • Support for Inactivity Timeout has been implemented. The value of this option defines the maximum amount of time (in seconds) after that a user is automatically logged out from the application if he/she does not perform any action during this period.
      Inactivity Timeout MessagePicture 2. Inactivity Timeout Message
    • OnBeforeLogout event has been added. The event fires just before a user logged out from the application by pressing the Logout button or when the inactivity timeout is reached.
    • Support for custom password encryption has been implemented. All you need to use this functionality is to provide two functions in PHP for encrypting and verifying the passwords accordingly. This allows you to use any encryption algorithm API or library you like.
      Custom Password EncryptionPicture 3. Custom Password Encryption
    • User IDs are now assigned automatically in order to simplify adding new users via the Admin Panel and support self-registration features. For users of old versions: please make sure the corresponding column is declared as auto-increment and alter your database schema if necessary.
  • Enhanced Unicode support. Finally it becomes possible to use any language for page headers, column captions, partition labels, descriptions, hard-coded combobox items and other interface elements irrespectively of the Windows system locale. PHP Generator projects and generated files are now saved in the UTF-8 encoding.
    Enhanced Unicode supportPicture 4. Enhanced Unicode support
  • Data Filtering Tools have been significantly improved as described below.
    • Column Filter has been optimized. Now filtering options are loaded from the database only when/if a user presses the filter button. Due to this improvement, the initial page loading time is significantly reduced.
      Column Filter in actionPicture 5. Column Filter in action
      By default only first 20 options are loaded from the database. This value can be customized in the List group of Page Editor.
      Column Filter PropertiesPicture 6. Column Filter Properties
    • Quick Filter has been improved. Now it allows you to select columns to search as well as specify the search condition (Contains, Begins with, etc). To access advanced settings, click the arrow on the right of the edit box.
      Enhanced Quick FilterPicture 7. Enhanced Quick Filter
  • New and updated controls. This version extends the already wide spectrum of components available in grids, cards, and edit/insert forms.
    • External Video data grid column type has been introduced in order to allow users to display and play raw (for example, locally stored) video files. For videos stored on YouTube and Vimeo the Embedded Video column type still should be used.
      External Video column typePicture 8. External Video column type
    • Multiple Select Editor can now load its stored and displayed values from the database (previous versions allowed only hard-coded values).
      Multiple Select Editor propertiesPicture 9. Multiple Select Editor properties
    • HTML WYSIWYG Editor: support for changing text and background colors has been added.
      HTML WYSIWYG EditorPicture 10. HTML WYSIWYG Editor
    • Editors based on the input type="file" control (like Upload File or Upload Image to Folder): it is now possible to restrict types of files displayed in the file loading dialog.
      File Type SelectionPicture 11. File Type Selection
    • Number of lookup values displayed in AutoComplete and Multi-level Autocomplete editors can now be customized.
      AutoComplete Editor PropertiesPicture 12. AutoComplete Editor Properties
    • Multi-level Autocomplete Editor: from now on you can define a filter condition for each level separately. Variables like %CURRENT_USER_ID% are allowed.
      Filter Condition for a certain levelPicture 13. Filter Condition for a certain level
  • GUI enhancements. The PHP Generator GUI itself also has been significantly improved. The most notable new features are as follows:
    • A new event editor has been implemented. Now you can edit all server-side (or client-side) event handlers in a single window that should simplify such operations as copy / paste code between different event handlers.
      New Event EditorPicture 14. New Event Editor
      When you click a button in the event grid, the editor is opened at the corresponding tab. To edit another edit handler, just click its tab within the editor. Tabs that correspond non-empty event handlers are displayed in bold.
    • Security Manager window has been redesigned in order to simplify access to existing and newly added security-related features. Hope you will enjoy its new interface.
    • Copy Page feature has been implemented. From now on you can clone any page with all or certain its settings in a couple of clicks. Settings to copy (event handlers, partitions, charts, etc) can be customized in a dialog window.
      Copy Page dialogPicture 16. Copy Page dialog
    • Starting from this version it is also possible to assign settings from a certain page to existing pages based on the same data source. You can select the pages you want to assign settings to as well as settings to be assigned in the corresponding dialog window.
      Assign Settings dialogPicture 17. Assign Settings dialog
      In particular this feature should be useful when you have both master and detail pages based on the same data source (say, City and Country -> City). In this case you can setup the master page and then assign all its settings to the detail page saving some time during the development.
  • Easy-to-use Email API. Sending an email from a server-side event becomes as simple as possible. All you need is to specify outgoing email settings in the Project Options dialog
    Outgoing mail settingsPicture 18. Outgoing mail settings
    and then call a 3-argument function from any event handler:
    Listing 3. sendMailMessage call example
    sendMailMessage('recipient@example.com', 'Message subject', 'Message body');
    This function also allows you to specify CC, BCC, attachments, and so on. Live examples.
  • Home page enhancements. A couple of new features have been implemented in order to make home pages even more flexible and powerful.
    • Home Page Banner. This new version allows you to specify a piece of the HTML code to be displayed at the top of the application home page. You can use this property for calling extra attention to some special content or information.
      Home Page Banner examplePicture 19. Home Page Banner example
    • Starting from this version it is possible to provide descriptions for menu groups. Such descriptions are displayed on the index pages of the website and groups.
      Menu Group DescriptionPicture 20. Menu Group Description
  • OnGetCustomExportOptions event: it is now possible to customize the page size for export to PDF.
  • The "Offline mode" option has been added to the Project settings. Turn this option ON for websites running on web servers without an Internet connection.
    Offline mode optionPicture 21. Offline mode option
    Note that when this option is checked, you will not be able to use charts and embedded videos in your application.

In addition to above, several bugs have been fixed and some other minor improvements and corrections have been made. For more information about a specific tool see the appropriate page:

Prev Next