예제 #1
0
 */
/*
if( !file_exists( module[ModuleName]::DEF_DIR_DATA ) ) { 
    mkdir( module[ModuleName]::DEF_DIR_DATA);
}
*/
// check to see if the parameter 'skipModule' was provided
$skipModule = isset($_REQUEST['skipModule']);
// if it was NOT provided then update the Modules Table
if (!$skipModule) {
    /*
     * Modules Table
     *
     * Setup the Page Modules Table to include a proper entry for this app.
     */
    $module = new RowManager_siteModuleManager();
    $module->loadByKey(module[ModuleName]::MODULE_KEY);
    $module->setKey(module[ModuleName]::MODULE_KEY);
    $module->setPath('[RAD_PATH_MODULE_ROOT][RAD_CORE_PRE_NAME][ModuleName]/');
    $module->setApplicationFile('app_[ModuleName].php');
    $module->setIncludeFile('incl_[ModuleName].php');
    $module->setName('module[ModuleName]');
    $module->setParameters('');
    $module->setSystemAccessFile('objects_bl/obj_SystemAccess.php');
    $module->setSystemAccessObj(module[ModuleName]::MODULE_KEY . 'Access');
    // if module entry already exists then
    if ($module->isLoaded()) {
        // update current entry
        $module->updateDBTable();
    } else {
        // create new entry
예제 #2
0
 /**
  * function processData
  * <pre>
  * Processes the data for this form.
  * </pre>
  * @return [void]
  */
 function processData()
 {
     if ($this->shouldDelete) {
         /*
          * Previous version of web site had following code to keep stats access
          * tables current:
          * 
                     $this->DB->db_name = 'statistics';
                     $this->DB->SetTableName( 'campusbasedaccess' );
                     $this->DB->SetCondition( 'viewer_id='.$this->ViewerID );
                     $this->DB->DBDelete();
             
                     $this->DB->SetTableName( 'userbasedaccess' );
                     $this->DB->SetCondition( 'viewer_id='.$this->ViewerID );
                     $this->DB->DBDelete();
         *
         * This needs to be reworked to have an automated central system for 
         * an application to register an AccessRemoval object to use for removing
         * account entries:
         forEach ( sysAccessObject ) 
             sysAccessObject->removeViewerAccount( viewer_id );
         next sysAccessObject
         */
         $moduleManager = new RowManager_siteModuleManager();
         $moduleManager->processSystemAccessRemoveViewer($this->itemManager->getID());
         // until that is in place ... Here is a quick hack!
         //require ("modules/app_Stats/objects_da/StatsAccessManager.php");
         //$statsAccessManager = new RowManager_StatsAccessManager(  );
         //$statsAccessManager->removeViewerAccount( $this->itemManager->getID() );
         $this->itemManager->deleteEntry();
     }
 }
예제 #3
0
 */
/*
if( !file_exists( modulecim_hrdb::DEF_DIR_DATA ) ) { 
    mkdir( modulecim_hrdb::DEF_DIR_DATA);
}
*/
// check to see if the parameter 'skipModule' was provided
$skipModule = isset($_REQUEST['skipModule']);
// if it was NOT provided then update the Modules Table
if (!$skipModule) {
    /*
     * Modules Table
     *
     * Setup the Page Modules Table to include a proper entry for this app.
     */
    $module = new RowManager_siteModuleManager();
    $module->loadByKey(modulecim_hrdb::MODULE_KEY);
    $module->setKey(modulecim_hrdb::MODULE_KEY);
    $module->setPath('modules/app_cim_hrdb/');
    $module->setApplicationFile('app_cim_hrdb.php');
    $module->setIncludeFile('incl_cim_hrdb.php');
    $module->setName('modulecim_hrdb');
    $module->setParameters('');
    $module->setSystemAccessFile('objects_bl/obj_SystemAccess.php');
    $module->setSystemAccessObj(modulecim_hrdb::MODULE_KEY . 'Access');
    // if module entry already exists then
    if ($module->isLoaded()) {
        // update current entry
        $module->updateDBTable();
    } else {
        // create new entry
예제 #4
0
 /**
  * function processData
  * <pre>
  * Processes the data for this form.
  * </pre>
  * @return [void]
  */
 function processData()
 {
     // save the value of the Foriegn Key(s)
     $this->formValues['accountgroup_id'] = $this->accountgroup_id;
     /*[RAD_ADMINBOX_FOREIGNKEY]*/
     // store values in table manager object.
     if (!$this->dataManager->isLoaded()) {
         $this->dataManager->createNewEntry();
     }
     $this->dataManager->loadFromArray($this->formValues);
     $accessGroupManager = new RowManager_AccessGroupManager();
     $allAccessGroupID = $accessGroupManager->getAllAccessGroupID();
     // don't need this for CIM stuff - RM
     // $hrdbGroupID = $accessGroupManager->getHRDBAccessGroupID();
     // echo 'hrdbGroupID['.$hrdbGroupID.']<br/>';
     //$this->dataManager->setAccountGroup($allAccessGroupID);
     $viewerAccessGroup = new RowManager_ViewerAccessGroupManager();
     //$hrdbGroupID = 34;
     // $defaultGroups = array($allAccessGroupID, $hrdbGroupID);
     $defaultGroups = array($allAccessGroupID);
     for ($i = 0; $i < count($defaultGroups); $i++) {
         //load values
         $values = array();
         //print($this->dataManager->getID() . "<br>");
         //print($allAccessGroupID);
         $values['viewer_id'] = $this->dataManager->getID();
         //$values[ 'accessgroup_id' ] = $allAccessGroupID;
         $values['accessgroup_id'] = $defaultGroups[$i];
         $viewerAccessGroup->loadFromArray($values);
         //var_export($viewerAccessGroup);
         // update DB Table
         $viewerAccessGroup->createNewEntry();
     }
     // Make sure password is set using the dataManager's routines
     // (for encryption)
     $pword = $this->formValues['viewer_passWord'];
     $this->dataManager->setPassWord($pword);
     $this->dataManager->updateDBTable();
     // now make sure all the systemAccessObjects have been updated
     $moduleManager = new RowManager_siteModuleManager();
     $moduleManager->processSystemAccessNewViewer($this->dataManager->getID());
 }
예제 #5
0
 /**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     /*
      * store the link values
      */
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     /*
      * store any additional link Columns
      */
     // example:
     $title = $this->labels->getLabel('[title_access_groups]');
     $columnLabel = $this->labels->getLabel('[accessGroups]');
     $link = $this->linkValues['accessGroups'];
     $fieldName = 'navbarlink_id';
     $this->addLinkColumn($title, $columnLabel, $link, $fieldName);
     $title = $this->labels->getLabel('[title_viewer]');
     $columnLabel = $this->labels->getLabel('[viewers]');
     $link = $this->linkValues['viewers'];
     $fieldName = 'navbarlink_id';
     $this->addLinkColumn($title, $columnLabel, $link, $fieldName);
     /*
      * Update any label tags ...
      */
     // example:
     $groupManager = new RowManager_NavBarGroupManager($this->navbargroup_id);
     $seriesKey = moduleNavBar::MULTILINGUAL_SERIES_KEY;
     $pageKey = $groupManager->getXMLNodeName();
     $groupMultiLingual = new MultilingualManager($this->viewer->getLanguageID(), $seriesKey, $pageKey);
     $bridgeManager = new RowLabelBridge($groupManager, $groupMultiLingual);
     $name = $bridgeManager->getLabel();
     $this->labels->setLabelTag('[Title]', '[groupName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->navbarlink_id);
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     /*
      * Insert the date start/end values for the following date fields:
      */
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * List related Template variables :
      */
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = $this->dataManager->getXMLNodeName();
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'navbarlink_id');
     // store data list to the template
     // NOTE: we initialize it here to make sure we capture any new data
     // from a recent processData() call.
     //        $this->dataList = new NavBarLinksList( $this->navbargroup_id, $this->sortBy );
     $linkManager = new RowManager_NavBarLinksManager();
     $linkManager->setGroupID($this->navbargroup_id);
     $bridgeManager = new RowLabelBridge($linkManager, $this->bridgeMultiLingualManager);
     $bridgeManager->setSortOrder($this->sortBy);
     $this->dataList = $bridgeManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     /*
      * Add any additional data required by the template here
      */
     $moduleManager = new RowManager_siteModuleManager();
     $moduleManager->setSortOrder($moduleManager->getLabelField());
     $moduleList = $moduleManager->getListIterator();
     $this->template->set('list_module_id', $moduleList->getDropListArray());
     $dateList = array('0000-00-00 00:00:00' => '');
     $this->template->set('list_navbarlink_startDateTime', $dateList);
     $this->template->set('list_navbarlink_endDateTime', $dateList);
     $templateName = TEMPLATE_ADMIN_BOX;
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_LinkList.php';
     return $this->template->fetch($templateName);
 }
예제 #6
0
*/
echo '<table>';
$db = new Database_Site();
$db->connectToDB(SITE_DB_NAME, SITE_DB_PATH, SITE_DB_USER, SITE_DB_PWORD);
$sql = "USE " . SITE_DB_NAME;
runSQL($sql);
// check to see if the parameter 'skipModule' was provided
$skipModule = isset($_REQUEST['skipModule']);
// if it was NOT provided then update the Modules Table
if (!$skipModule) {
    /*
     * Modules Table
     *
     * Setup the Page Modules Table to include a proper entry for this app.
     */
    $module = new RowManager_siteModuleManager();
    $module->loadByKey(moduleRAD::MODULE_KEY);
    $module->setKey(moduleRAD::MODULE_KEY);
    $module->setPath('modules/app_Rad/');
    $module->setApplicationFile('app_RAD.php');
    $module->setIncludeFile('incl_RAD.php');
    $module->setName('moduleRAD');
    $module->setParameters('');
    // if module entry already exists then
    if ($module->isLoaded()) {
        // update current entry
        $module->updateDBTable();
    } else {
        // create new entry
        $module->createNewEntry();
    }
예제 #7
0
    $numAttempts++;
}
require_once $extension . $pathFile;
$db = new Database_Site();
$db->doSuppressErrors();
$db->connectToDB(SITE_DB_NAME, SITE_DB_PATH, SITE_DB_USER, SITE_DB_PWORD);
$sql = "CREATE DATABASE /*!32312 IF NOT EXISTS*/ " . SITE_DB_NAME;
$db->runSQL($sql);
$sql = "USE " . SITE_DB_NAME;
$db->runSQL($sql);
/*
 * Modules Table
 *
 * Setup the Page Modules Table.
 */
$module = new RowManager_siteModuleManager();
$module->dropTable();
$module->createTable();
// Initialize Login Page Module
$module->setKey(PAGE_MODULE_LOGIN);
$module->setPath(SITE_PATH_MODULES . 'site_Login/');
$module->setApplicationFile('login_app.php');
$module->setIncludeFile('login_includes.php');
$module->setName('moduleLogin');
$module->setParameters('');
$module->createNewEntry();
require $extension . SITE_PATH_MODULES . 'site_Login/login_app.php';
// Initialize Logout Page Module
$module->setKey(PAGE_MODULE_LOGOUT);
$module->setPath(SITE_PATH_MODULES . 'site_Login/');
$module->setApplicationFile('login_app.php');
예제 #8
0
  */
 $NavBarLinks = new RowManager_NavBarLinksManager();
 $NavBarLinks->dropTable();
 $NavBarLinks->createTable();
 $seriesKey = moduleNavBar::MULTILINGUAL_SERIES_KEY;
 $pageKey = RowManager_NavBarLinksManager::XML_NODE_NAME;
 $multiLingualContext = new MultilingualManager(1, $seriesKey, $pageKey);
 $link = $NavBarLinks->getRowLabelBridge($multiLingualContext);
 $values = array();
 $values['label_label'] = 'Site Administration';
 $values['navbargroup_id'] = $group->getID();
 if (!defined('moduleAccountAdmin::MODULE_KEY')) {
     require_once $extension . 'modules/site_AccountAdmin/app_AccountAdmin.php';
     require_once $extension . 'modules/site_AccountAdmin/incl_AccountAdmin.php';
 }
 $module = new RowManager_siteModuleManager();
 $module->loadByKey(moduleAccountAdmin::MODULE_KEY);
 $values['module_id'] = $module->getID();
 $values['navbarlink_isActive'] = 1;
 $values['navbarlink_isModule'] = 1;
 $values['navbarlink_order'] = 0;
 $link->loadFromArray($values);
 $link->createNewEntry();
 /*
  * NavLinkAccessGroup Table
  *
  * This table joins which nav bar links are displayed for which site access group.
  *
  * navlinkaccessgroup_id [INTEGER]  Primary Key for this table
  * navbarlink_id [INTEGER]  Foreign Key relating this entry to a link
  * accessgroup_id [INTEGER]  Foreign key relating this link to a site Access Group
예제 #9
0
 */
/*
if( !file_exists( moduleEmailTemplates::DEF_DIR_DATA ) ) { 
    mkdir( moduleEmailTemplates::DEF_DIR_DATA);
}
*/
// check to see if the parameter 'skipModule' was provided
$skipModule = isset($_REQUEST['skipModule']);
// if it was NOT provided then update the Modules Table
if (!$skipModule) {
    /*
     * Modules Table
     *
     * Setup the Page Modules Table to include a proper entry for this app.
     */
    $module = new RowManager_siteModuleManager();
    $module->loadByKey(moduleEmailTemplates::MODULE_KEY);
    $module->setKey(moduleEmailTemplates::MODULE_KEY);
    $module->setPath('modules/app_EmailTemplates/');
    $module->setApplicationFile('app_EmailTemplates.php');
    $module->setIncludeFile('incl_EmailTemplates.php');
    $module->setName('moduleEmailTemplates');
    $module->setParameters('');
    // if module entry already exists then
    if ($module->isLoaded()) {
        // update current entry
        $module->updateDBTable();
    } else {
        // create new entry
        $module->createNewEntry();
    }
예제 #10
0
 /**
  * function loadFromArray
  * <pre>
  * initialized the values of this link
  * </pre>
  * @return [STRING]
  */
 function loadFromArray($values)
 {
     $this->label = $values['label_label'];
     $url = $values['navbarlink_url'];
     if ((int) $values['module_id'] != 0) {
         $moduleManager = new RowManager_siteModuleManager($values['module_id']);
         $url = 'index.php?' . Page::QS_MODULE . '=' . $moduleManager->getKey();
     }
     $this->url = $url;
     $this->title = $values['label_label'];
 }
예제 #11
0
 /**
  * function processData
  * <pre>
  * Processes the data for this form.
  * </pre>
  * @return [void]
  */
 function processData()
 {
     // if this is a delete operation then
     if ($this->opType == 'D') {
         if ($this->shouldDelete) {
             $this->dataManager->deleteEntry();
             // now make sure all the systemAccessObjects have been updated
             $moduleManager = new RowManager_siteModuleManager();
             $moduleManager->processSystemAccessRemoveAdmin($this->formValues['account']);
         }
     } else {
         // else
         /*[RAD_ADMINBOX_FOREIGNKEY]*/
         // store values in table manager object.
         $this->formValues['viewer_id'] = $this->formValues['account'];
         $this->dataManager->loadFromArray($this->formValues);
         if (!$this->dataManager->isLoaded()) {
             $this->dataManager->createNewEntry();
         } else {
             $this->dataManager->updateDBTable();
         }
         // now make sure all the systemAccessObjects have been updated
         $moduleManager = new RowManager_siteModuleManager();
         $moduleManager->processSystemAccessNewAdmin($this->formValues['viewer_id']);
     }
     // end if
     // now Clear out dataManager & FormValues
     $this->dataManager->clearValues();
     $this->formValues = $this->dataManager->getArrayOfValues();
     // on a successful update return accountadminaccess_id to ''
     $this->accountadminaccess_id = '';
 }