本文整理汇总了PHP中__get函数的典型用法代码示例。如果您正苦于以下问题:PHP __get函数的具体用法?PHP __get怎么用?PHP __get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了__get函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _action
function _action()
{
global $user, $db, $conf, $langs;
$PDOdb = new TPDOdb();
//$PDOdb->debug=true;
$action = __get('action', 'list');
switch ($action) {
case 'list':
_list($PDOdb, $db, $user, $conf, $langs);
break;
case 'listAvoir':
_listAvoir($PDOdb, $db, $user, $conf, $langs);
break;
case 'create':
_create($PDOdb, $db, $user, $conf, $langs);
break;
case 'createConfirm':
_create_and_send($PDOdb, $db, $user, $conf, $langs);
break;
case 'createAvoir':
_createAvoir($PDOdb, $db, $user, $conf, $langs);
break;
default:
_list($PDOdb, $db, $user, $conf, $langs);
break;
}
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_sendinvoicetoadherent,代码行数:27,代码来源:sendinvoicetoadherent.php
示例2: osc_render_file
/**
* Render the specified file
*
* @param string $file must be a relative path, from PLUGINS_PATH
*/
function osc_render_file($file = '') {
if($file=='') {
$file = __get('file');
}
// Clean $file to prevent hacking of some type
osc_sanitize_url($file);
$file = str_replace("../", "", str_replace("..\\", "", str_replace("://", "", preg_replace("|http([s]*)|", "", $file))));
include osc_plugins_path().$file;
}
示例3: customHead
function customHead() {
$user = __get('user');
if(isset($user['pk_i_id'])) {
UserForm::js_validation_edit();
} else {
UserForm::js_validation();
}?>
<?php UserForm::location_javascript("admin"); ?>
<?php
}
示例4: set_portfolio
public function set_portfolio($portfolio)
{
$portfolios = array();
if (__isset("portfolios")) {
$portfolios = __get("portfolios");
array_push($portfolios, $portfolio);
__set("portfolios", $portfolios);
} else {
__set("portfolios", array($portfolio));
}
__set("in_portfolio", true);
}
示例5: traite_get
function traite_get(&$PDOdb, $case)
{
switch (strtolower($case)) {
case 'autocomplete':
__out(_autocomplete($PDOdb, GETPOST('fieldcode'), GETPOST('term'), GETPOST('fk_product'), GETPOST('type_product')));
break;
case 'autocomplete-serial':
__out(_autocompleteSerial($PDOdb, GETPOST('lot_number'), GETPOST('fk_product')));
break;
case 'addofproduct':
__out(_addofproduct($PDOdb, GETPOST('id_assetOf'), GETPOST('fk_product'), GETPOST('type'), GETPOST('default_qty_to_make', 'int') ? GETPOST('default_qty_to_make', 'int') : 1));
break;
case 'deletelineof':
__out(_deletelineof($PDOdb, GETPOST('idLine'), GETPOST('type')), 'json');
break;
case 'addlines':
__out(_addlines($PDOdb, GETPOST('idLine'), GETPOST('qty')), GETPOST('type'));
break;
case 'addofworkstation':
__out(_addofworkstation($PDOdb, GETPOST('id_assetOf'), GETPOST('fk_asset_workstation')));
break;
case 'deleteofworkstation':
__out(_deleteofworkstation($PDOdb, GETPOST('id_assetOf'), GETPOST('fk_asset_workstation_of')));
break;
case 'measuringunits':
__out(_measuringUnits(GETPOST('type'), GETPOST('name')), 'json');
break;
case 'getofchildid':
$Tid = array();
$assetOf = new TAssetOF();
$assetOf->load($PDOdb, __get('id', 0, 'integer'));
$assetOf->getListeOFEnfants($PDOdb, $Tid);
__out($Tid);
break;
case 'getchildlisthtml':
$Tid = array();
$assetOf = new TAssetOF();
$assetOf->load($PDOdb, __get('id', 0, 'integer'));
$assetOf->getListeOFEnfants($PDOdb, $Tid);
echo _listOFEnfantHtml($PDOdb, $Tid);
break;
case 'getnomenclatures':
__out(_getNomenclatures($PDOdb, GETPOST('fk_product')), 'json');
break;
case 'validernomenclature':
__out(_validerNomenclature($PDOdb, GETPOST('id_assetOF'), GETPOST('fk_product'), GETPOST('fk_of_line'), GETPOST('fk_nomenclature'), GETPOST('qty')));
break;
}
}
示例6: customText
function customText($return = 'title')
{
$new_item = __get('new_item');
$text = array();
if ($new_item) {
$text['title'] = __('Listing');
$text['subtitle'] = __('Add listing');
$text['button'] = __('Add listing');
} else {
$text['title'] = __('Listing');
$text['subtitle'] = __('Edit listing');
$text['button'] = __('Update listing');
}
return $text[$return];
}
示例7: customFrmText
function customFrmText()
{
$rule = __get('rule');
$return = array();
if (isset($rule['pk_i_id'])) {
$return['edit'] = true;
$return['title'] = __('Edit rule');
$return['action_frm'] = 'edit_ban_rule_post';
$return['btn_text'] = __('Update rule');
} else {
$return['edit'] = false;
$return['title'] = __('Add new ban rule');
$return['action_frm'] = 'create_ban_rule_post';
$return['btn_text'] = __('Add new ban rule');
}
return $return;
}
示例8: customFrmText
function customFrmText($return = 'title')
{
$page = __get('page');
$text = array();
if (isset($page['pk_i_id'])) {
$text['edit'] = true;
$text['title'] = __('Edit page');
$text['action_frm'] = 'edit_post';
$text['btn_text'] = __('Save changes');
} else {
$text['edit'] = false;
$text['title'] = __('Add page');
$text['action_frm'] = 'add_post';
$text['btn_text'] = __('Add page');
}
return $text[$return];
}
示例9: customFrmText
function customFrmText()
{
$admin = __get("admin");
$return = array();
if (isset($admin['pk_i_id'])) {
$return['admin_edit'] = true;
$return['title'] = __('Edit admin');
$return['action_frm'] = 'edit_post';
$return['btn_text'] = __('Save');
} else {
$return['admin_edit'] = false;
$return['title'] = __('Add admin');
$return['action_frm'] = 'add_post';
$return['btn_text'] = __('Add');
}
return $return;
}
示例10: customHead
function customHead()
{
$user = __get('user');
?>
<script type="text/javascript" src="<?php
echo osc_current_admin_theme_js_url('jquery.validate.min.js');
?>
"></script>
<?php
if (isset($user['pk_i_id'])) {
UserForm::js_validation_edit();
} else {
UserForm::js_validation();
}
?>
<?php
UserForm::location_javascript("admin");
?>
<?php
}
示例11: __get
* of the GNU Affero General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
$users = __get('users');
$stat = __get('stat');
$categories = __get('categories');
$countries = __get('countries');
$regions = __get('regions');
$cities = __get('cities');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php
echo str_replace('_', '-', osc_current_user_locale());
?>
">
<head>
<?php
osc_current_admin_theme_path('head.php');
?>
<link href="<?php
echo osc_current_admin_theme_styles_url('datatables.css');
?>
" rel="stylesheet" type="text/css" />
<!-- datatables js -->
示例12: osc_add_hook
</h1>
<?php
}
osc_add_hook('admin_page_header', 'customPageHeader');
function customPageTitle($string)
{
return sprintf(__('Edit language » %s'), $string);
}
osc_add_filter('admin_title', 'customPageTitle');
//customize Head
function customHead()
{
LanguageForm::js_validation();
}
osc_add_hook('admin_header', 'customHead', 10);
$aLocale = __get('aLocale');
osc_current_admin_theme_path('parts/header.php');
?>
<h2 class="render-title"><?php
_e('Edit language');
?>
</h2>
<div id="language-form">
<ul id="error_list"></ul>
<form name="language_form" action="<?php
echo osc_admin_base_url(true);
?>
" method="post">
<input type="hidden" name="page" value="languages" />
<input type="hidden" name="action" value="edit_post" />
<?php
示例13: __get
* OSClass – software for creating and publishing online classified advertising platforms
*
* Copyright (C) 2010 OSCLASS
*
* This program is free software: you can redistribute it and/or modify it under the terms
* of the GNU Affero General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
$aCurrency = __get('aCurrency');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<?php
osc_current_admin_theme_path('head.php');
?>
</head>
<body>
<?php
osc_current_admin_theme_path('header.php');
?>
<div id="update_version" style="display:none;"></div>
<div id="content">
示例14: alert
alert(data.html);
}, 'json');
return false;
});
});
</script>
<?php
}
osc_add_hook('admin_header', 'customHead', 10);
function customPageTitle($string)
{
return sprintf(__('Edit email template » %s'), $string);
}
osc_add_filter('admin_title', 'customPageTitle');
$email = __get("email");
$aEmailVars = EmailVariables::newInstance()->getVariables($email);
$locales = OSCLocale::newInstance()->listAllEnabled();
osc_current_admin_theme_path('parts/header.php');
?>
<div class="grid-row no-bottom-margin">
<div class="row-wrapper">
<h2 class="render-title"><?php
_e('Edit email template');
?>
</h2>
</div>
</div>
<div id="pretty-form">
<div class="grid-row grid-100">
示例15: showingResults
function showingResults()
{
$aData = __get("aData");
echo '<ul class="showing-results"><li><span>' . osc_pagination_showing((Params::getParam('iPage') - 1) * $aData['iDisplayLength'] + 1, (Params::getParam('iPage') - 1) * $aData['iDisplayLength'] + count($aData['aRows']), $aData['iTotalDisplayRecords'], $aData['iTotalRecords']) . '</span></li></ul>';
}