当前位置: 首页>>代码示例>>PHP>>正文


PHP Organization::getValue方法代码示例

本文整理汇总了PHP中Organization::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Organization::getValue方法的具体用法?PHP Organization::getValue怎么用?PHP Organization::getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Organization的用法示例。


在下文中一共展示了Organization::getValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: strStripSlashesDeep

     // add form to html page and show page
     $page->addHtml($form->show(false));
     $page->show();
     break;
 case 3:
     /******************************************************/
     /* Create basic data for new organization in database */
     /******************************************************/
     $_SESSION['add_organization_request'] = strStripSlashesDeep($_POST);
     // form fields are not filled
     if ($_POST['orgaShortName'] === '' || $_POST['orgaLongName'] === '') {
         $gMessage->show($gL10n->get('INS_ORGANIZATION_NAME_NOT_COMPLETELY'));
     }
     // check if orga shortname exists
     $organization = new Organization($gDb, $_POST['orgaShortName']);
     if ($organization->getValue('org_id') > 0) {
         $gMessage->show($gL10n->get('INS_ORGA_SHORTNAME_EXISTS', $_POST['orgaShortName']));
     }
     // set execution time to 2 minutes because we have a lot to do :)
     // there should be no error output because of safe mode
     @set_time_limit(120);
     $gDb->startTransaction();
     // create new organization
     $newOrganization = new Organization($gDb, $_POST['orgaShortName']);
     $newOrganization->setValue('org_longname', $_POST['orgaLongName']);
     $newOrganization->setValue('org_shortname', $_POST['orgaShortName']);
     $newOrganization->setValue('org_homepage', $_SERVER['HTTP_HOST']);
     $newOrganization->save();
     // write all preferences from preferences.php in table adm_preferences
     require_once '../../installation/db_scripts/preferences.php';
     // set some specific preferences whose values came from user input of the installation wizard
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:preferences_function.php

示例2: AutoLogin

    if (array_key_exists($gCookiePraefix . '_DATA', $_COOKIE)) {
        // restore user from auto login session
        $autoLogin = new AutoLogin($gDb, $gSessionId);
        $autoLogin->setValidLogin($gCurrentSession, $_COOKIE[$gCookiePraefix . '_DATA']);
        $userIdAutoLogin = $autoLogin->getValue('atl_usr_id');
        // create object of the organization of config file with their preferences
        if ($autoLogin->getValue('atl_org_id') > 0) {
            $gCurrentOrganization = new Organization($gDb, $autoLogin->getValue('atl_org_id'));
        } else {
            $gCurrentOrganization = new Organization($gDb, $g_organization);
        }
    } else {
        // create object of the organization of config file with their preferences
        $gCurrentOrganization = new Organization($gDb, $g_organization);
    }
    if ($gCurrentOrganization->getValue('org_id') === 0) {
        // organization not found
        exit('<div style="color: #cc0000;">Error: The organization of the config.php could not be found in the database!</div>');
    }
    // add the organization to the session
    $gPreferences = $gCurrentOrganization->getPreferences();
    $gCurrentSession->addObject('gCurrentOrganization', $gCurrentOrganization);
    $gCurrentSession->setValue('ses_org_id', $gCurrentOrganization->getValue('org_id'));
    // create a language data object and assign it to the language object
    $gLanguageData = new LanguageData($gPreferences['system_language']);
    $gL10n->addLanguageData($gLanguageData);
    $gCurrentSession->addObject('gLanguageData', $gLanguageData);
    // delete old entries in session table
    $gCurrentSession->tableCleanup($gPreferences['logout_minutes']);
}
// now if auto login is done, read global user data
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:common.php

示例3: Database

// connect to database
try {
    $gDb = new Database($gDbType, $g_adm_srv, null, $g_adm_db, $g_adm_usr, $g_adm_pw);
} catch (AdmException $e) {
    showNotice($gL10n->get('SYS_DATABASE_NO_LOGIN', $e->getText()), 'installation.php?mode=3', $gL10n->get('SYS_BACK'), 'layout/back.png');
}
// now check if a valid installation exists.
$sql = 'SELECT org_id FROM ' . TBL_ORGANIZATIONS;
$pdoStatement = $gDb->query($sql, false);
if (!$pdoStatement || $pdoStatement->rowCount() === 0) {
    // no valid installation exists -> show installation wizard
    header('Location: installation.php');
}
// Daten der aktuellen Organisation einlesen
$gCurrentOrganization = new Organization($gDb, $g_organization);
if ($gCurrentOrganization->getValue('org_id') == 0) {
    // Organisation wurde nicht gefunden
    exit('<div style="color: #cc0000;">Error: The organization of the config.php could not be found in the database!</div>');
}
// organisationsspezifische Einstellungen aus adm_preferences auslesen
$gPreferences = $gCurrentOrganization->getPreferences();
// create language and language data object to handle translations
if (!isset($gPreferences['system_language'])) {
    $gPreferences['system_language'] = 'de';
}
$gL10n = new Language();
$gLanguageData = new LanguageData($gPreferences['system_language']);
$gL10n->addLanguageData($gLanguageData);
// config.php exists at wrong place
if (file_exists('../../config.php') && file_exists('../../adm_my_files/config.php')) {
    // try to delete the config file at the old place otherwise show notice to user
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:update.php

示例4: header

    $gDbType = 'mysql';
}
// connect to database
$gDb = Database::createDatabaseObject($gDbType);
$gDbConnection = $gDb->connect($g_adm_srv, $g_adm_usr, $g_adm_pw, $g_adm_db);
// now check if a valid installation exists.
$sql = 'SELECT org_id FROM ' . TBL_ORGANIZATIONS;
$gDb->query($sql, false);
$count = $gDb->num_rows();
if ($count === 0) {
    // no valid installation exists -> show installation wizard
    header('Location: installation.php');
}
// Daten der aktuellen Organisation einlesen
$gCurrentOrganization = new Organization($gDb, $g_organization);
if ($gCurrentOrganization->getValue('org_id') == 0) {
    // Organisation wurde nicht gefunden
    die('<div style="color: #cc0000;">Error: The organization of the config.php could not be found in the database!</div>');
}
// organisationsspezifische Einstellungen aus adm_preferences auslesen
$gPreferences = $gCurrentOrganization->getPreferences();
// create language and language data object to handle translations
if (!isset($gPreferences['system_language'])) {
    $gPreferences['system_language'] = 'de';
}
$gL10n = new Language();
$gLanguageData = new LanguageData($gPreferences['system_language']);
$gL10n->addLanguageData($gLanguageData);
// config.php exists at wrong place
if (file_exists('../../config.php') && file_exists('../../adm_my_files/config.php')) {
    // try to delete the config file at the old place otherwise show notice to user
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:update.php


注:本文中的Organization::getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。