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


PHP Inventory::getValue方法代码示例

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


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

示例1: HtmlPage

    // get value of field in html format
    $value = $inventory->getValue($fieldNameIntern, 'html');
    // Icons anzeigen
    if (strlen($gInventoryFields->getProperty($fieldNameIntern, 'inf_icon')) > 0) {
        $value = $gInventoryFields->getProperty($fieldNameIntern, 'inf_icon') . '  ' . $value;
    }
    // show html of field, if user has a value for that field or it's a checkbox field
    if (strlen($inventory->getValue($fieldNameIntern)) > 0 || $gInventoryFields->getProperty($fieldNameIntern, 'inf_type') === 'CHECKBOX') {
        $html['label'] = $gInventoryFields->getProperty($fieldNameIntern, 'inf_name');
        $html['value'] = $value;
    }
    return $html;
}
unset($_SESSION['profile_request']);
// set headline
$headline = $gL10n->get('PRO_PROFILE_FROM', $inventory->getValue('ITEM_NAME'));
// if user id was not set and own profile should be shown then initialize navigation
if (!isset($_GET['item_id'])) {
    $gNavigation->clear();
}
$gNavigation->addUrl(CURRENT_URL, $headline);
// create html page object
$page = new HtmlPage($headline);
$page->addCssFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/css/datepicker3.css');
$page->addJavascriptFile($g_root_path . '/adm_program/modules/profile/profile.js');
$page->addJavascriptFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/js/bootstrap-datepicker.js');
$page->addJavascriptFile($g_root_path . '/adm_program/libs/bootstrap-datepicker/js/locales/bootstrap-datepicker.' . $gPreferences['system_language'] . '.js');
$page->addJavascript('
    var profileJS = new profileJSClass();
    profileJS.deleteRole_ConfirmText    = "' . $gL10n->get('ROL_MEMBERSHIP_DEL', '[rol_name]') . '";
    profileJS.deleteFRole_ConfirmText   = "' . $gL10n->get('ROL_LINK_MEMBERSHIP_DEL', '[rol_name]') . '";
开发者ID:martinbrylski,项目名称:admidio,代码行数:31,代码来源:item.php

示例2: InventoryFields

// checks if the server settings for file_upload are set to ON
if (ini_get('file_uploads') != '1') {
    $gMessage->show($gL10n->get('SYS_SERVER_NO_UPLOAD'));
}
// read user data and show error if user doesn't exists
$gInventoryFields = new InventoryFields($gDb, $gCurrentOrganization->getValue('org_id'));
$inventory = new Inventory($gDb, $gInventoryFields, $getItemId);
// bei Ordnerspeicherung pruefen ob der Unterordner in adm_my_files mit entsprechenden Rechten existiert
if ($gPreferences['profile_photo_storage'] == 1) {
    // ggf. Ordner für Userfotos in adm_my_files anlegen
    $myFilesProfilePhotos = new MyFiles('USER_PROFILE_PHOTOS');
    if ($myFilesProfilePhotos->checkSettings() == false) {
        $gMessage->show($gL10n->get($myFilesProfilePhotos->errorText, $myFilesProfilePhotos->errorPath, '<a href="mailto:' . $gPreferences['email_administrator'] . '">', '</a>'));
    }
}
if ($inventory->getValue('inv_id') == 0) {
    $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW'));
}
if ($getMode == 'save') {
    /*****************************Foto speichern*************************************/
    if ($gPreferences['profile_photo_storage'] == 1) {
        // Foto im Dateisystem speichern
        //Nachsehen ob fuer den User ein Photo gespeichert war
        if (file_exists(SERVER_PATH . '/adm_my_files/item_photos/' . $getItemId . '_new.jpg')) {
            if (file_exists(SERVER_PATH . '/adm_my_files/item_photos/' . $getItemId . '.jpg')) {
                unlink(SERVER_PATH . '/adm_my_files/item_photos/' . $getItemId . '.jpg');
            }
            rename(SERVER_PATH . '/adm_my_files/item_photos/' . $getItemId . '_new.jpg', SERVER_PATH . '/adm_my_files/item_photos/' . $getItemId . '.jpg');
        }
    } else {
        // Foto in der Datenbank speichern
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:item_photo_edit.php

示例3: admFuncVariableIsValid

require '../../system/common.php';
require '../../system/login_valid.php';
// Initialize and check the parameters
$getItemId = admFuncVariableIsValid($_GET, 'inv_id', 'numeric', array('requireValue' => true));
$getNewPhoto = admFuncVariableIsValid($_GET, 'new_photo', 'boolean');
// lokale Variablen der Uebergabevariablen initialisieren
$image = null;
$picpath = THEME_SERVER_PATH . '/images/no_profile_pic.png';
// only users with the right to edit inventory could use this script
if ($gCurrentUser->editInventory() == false) {
    $gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
// read inventory data and show error if inventory doesn't exists
$gInventoryFields = new InventoryFields($gDb, $gCurrentOrganization->getValue('org_id'));
$inventory = new Inventory($gDb, $gInventoryFields, $getItemId);
if ($inventory->getValue('inv_id') == 0) {
    $gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW'));
}
//Foto aus adm_my_files
if ($gPreferences['profile_photo_storage'] == 1 && $getNewPhoto == 0) {
    if (file_exists(SERVER_PATH . '/adm_my_files/item_photos/' . $getItemId . '.jpg')) {
        $picpath = SERVER_PATH . '/adm_my_files/item_photos/' . $getItemId . '.jpg';
    }
    $image = new Image($picpath);
} elseif ($gPreferences['profile_photo_storage'] == 0 && $getNewPhoto == 0) {
    if (strlen($inventory->getValue('inv_photo')) != NULL) {
        $image = new Image();
        $image->setImageFromData($inventory->getValue('inv_photo'));
    } else {
        $image = new Image($picpath);
    }
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:item_photo_show.php


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