<?php require "../core_API.php"; $UMObj = newSecurityModel("database"); $UMObj->setDataSource("postgres", "localhost:5432", "postgres", "", "testdb"); $UMObj->openDataSource(); // open the connection ?> <html> <head> <title>Test Add/Edit Page</title> </head> <body> <?php $UMObj->getUserAddEditFormSubmit(); if ($_REQUEST['um_submit_form'] != "yes") { // only show the form if they have not submitted $UMObj->getUserAddEditForm(); } saveSecurityModel($UMObj); ?> </body> </html>
} else { require "themes/{$g_rb_theme}/header.php"; } // preg_match for letters, numbers, underscore, and hyphen. Reject anything else if (!empty($_REQUEST['dosql']) && preg_match('/^(\\w|\\-)+$/', $_REQUEST['dosql'])) { include "modules/{$m}/" . $_REQUEST['dosql'] . ".php"; } $msg = $SMObj->getErrorMsg(); if ($msg != '') { echo $msg . "<p>"; $SMObj->setErrorMsg(''); //reset it, we have read it. } // Load the module that is requested if (file_exists("modules/{$m}/{$a}.php")) { include "modules/{$m}/{$a}.php"; } else { include "modules/{$g_rb_default_module}/{$g_rb_default_page}.php"; } if ($format == "yes") { if ($mobile) { // And the default mobile footer to close things require "themes/{$g_rb_theme}/footer_mob.php"; } else { // And the default footer to close things require "themes/{$g_rb_theme}/footer.php"; } } // Save the session infor and clean things up saveSecurityModel($SMObj); $LangUI->cleanUp();