You are here

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in book_prev() (line 775 of /home/blackh31/public_html/BLACKHILL/modules/book/book.module).

General Application Creation

Steps to create a new page:

1) Insert entry into the lms_app table.

INSERT IGNORE INTO lms_app (NAME, module, constructor, proper_name, GLOBAL)
    VALUES ('url-ref', 'objects/dir/file.php', 'Class', 'Name to Show on Page', 'global_variable');

2) Insert an entry into the lms_menu table.

INSERT IGNORE INTO lms_menu (NAME, url, hierarchy, groups, description, visible)
    VALUES ('Audits', '/cgi-bin/default.php?appname=audit', '90.25',
        (SELECT group_id FROM lms_group WHERE groupname IN ('Master Administrator')),
        'The system audit log menu', 1);

3) Insert an entry into the lms_app_group table (if the page being created is only available to certain groups)

INSERT IGNORE INTO lms_app_group (NAME, group_id)
    VALUES ('audit',
        (SELECT group_id FROM lms_group WHERE groupname IN ('Master Administrator')));

4) Add a root .php file to the objects subdirectory (eg. objects/dir/file.php)

<?php include_once("objects/admin/data/audit.php"); include_once("objects/admin/view/audit.php"); ?>

5) Add a data .php file to the data subdirectory (eg. objects/dir/data/file.php)

<?php class NameDB extends DB {
         function __construct() {
            parent::__construct();
           $this->has(array( ... ));
         }
      }
?>

6) Add a page .php file to the view subdirectory (eg. objects/dir/view/file.php)

<?php class Name extends Page {
         function __construct() {
            parent::__construct("Name");
           $this->data = new NameDB();
         }

         function body() {
             $this->auto_render();
         }
      }
?>

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer