本文整理汇总了PHP中get_global_params函数的典型用法代码示例。如果您正苦于以下问题:PHP get_global_params函数的具体用法?PHP get_global_params怎么用?PHP get_global_params使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_global_params函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_param_log
function get_param_log() {
global $tf_filename, $tf_version, $tf_date, $param_backup, $popup;
// Get global params
$params = get_global_params("log");
// sel_user_id can be filled by sel_user_id or sel_ent (see below)
if (is_array($params["user_id"])) {
while (list($key, $value) = each($params["user_id"]) ) {
// sel_user_id contains select infos (data-user-$id)
if (strcmp(substr($value, 0, 10),"data-user-") == 0) {
$data = explode("-", $value);
$id = $data[2];
$params["sel_user_id"][] = $id;
} else {
// direct id
$params["sel_user_id"][] = $value;
}
}
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:23,代码来源:log_index.php
示例2: get_todo_params
function get_todo_params() {
// Get global params
$params = get_global_params('Todo');
// Get todo specific params
if (is_array($params['user_id'])) {
while ( list( $key, $value ) = each($params['user_id'])) {
// user_id contains select infos (data-user-$id)
if (strcmp(substr($value, 0, 10),'data-user-') == 0) {
$data = explode('-', $value);
$id = $data[2];
$params['user_ids'][] = $id;
} else {
// direct id
$params['user_ids'][] = $value;
}
}
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:22,代码来源:todo_index.php
示例3: get_userpattern_params
function get_userpattern_params() {
// Get global params
$params = get_global_params('userpattern');
if (isset($params['mail_server_id']))
$params['attributes']['mail_server_id'] = $params['mail_server_id'];
if (is_array($GLOBALS['cgp_user']['user']['field'])) {
foreach ($GLOBALS['cgp_user']['user']['field'] as $fieldname => $properties) {
if (isset($params[$fieldname])) $params['attributes'][$fieldname] = $params[$fieldname];
}
}
if (is_array($GLOBALS['cgp_user']['user']['category'])) {
foreach ($GLOBALS['cgp_user']['user']['category'] as $fieldname => $properties) {
if (isset($params[$fieldname])) $params['attributes'][$fieldname] = $params[$fieldname];
}
}
// !!! WARNING: cheat anti magic_quotes !!!
if (get_magic_quotes_gpc()) {
if (is_array($params['userpattern']))
array_walk_recursive($params['userpattern'],create_function('&$value,$key','$value=stripslashes($value);'));
if (is_array($params['attributes']))
array_walk_recursive($params['attributes'],create_function('&$value,$key','$value=stripslashes($value);'));
}
if (is_array($params['attributes']['aliases'])) {
foreach ($params['attributes']['aliases'] as $i => $alias) {
if (!empty($alias)) {
$params['attributes']['email'][$i] .= "@$alias";
}
}
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:36,代码来源:userpattern_index.php
示例4: get_admin_ref_params
function get_admin_ref_params() {
$params = get_global_params('admin_ref');
// Admin - Country fields
if (isset ($params['country'])) {
$sel_country = $params['country'];
$pos = strpos($sel_country, '-');
$params['iso'] = substr($sel_country, 0, $pos);
$params['lang'] = substr($sel_country, $pos+1);
}
if (isset ($$params['ext_id'])) { $params['id'] = $params['ext_id']; }
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:16,代码来源:admin_ref_index.php
示例5: get_list_params
function get_list_params() {
global $cgp_user;
// Get global params
$params = get_global_params('List');
// Get List specific params
if (isset ($params['ext_id'])) $params['list_id'] = $params['ext_id'];
// Criteria params :
// Company
if (isset ($params['company_name'])) $params['criteria']['modules']['company']['company_name'] = $params['company_name'];
if (isset ($params['company_country_iso3166'])) $params['criteria']['modules']['company']['company_country_iso3166'] = $params['company_country_iso3166'];
if (isset ($params['company_timeafter'])) $params['criteria']['modules']['company']['company_timeafter'] = $params['company_timeafter'];
if (isset ($params['company_timebefore'])) $params['criteria']['modules']['company']['company_timebefore'] = $params['company_timebefore'];
if (isset ($params['company_zipcode'])) $params['criteria']['modules']['company']['company_zipcode'] = $params['company_zipcode'];
if (isset ($params['company_marketingmanager_id'])) $params['criteria']['modules']['company']['company_marketingmanager_id'] = $params['company_marketingmanager_id'];
if (isset ($params['company_town'])) $params['criteria']['modules']['company']['company_town'] = $params['company_town'];
if (isset ($params['company_datasource_id'])) $params['criteria']['modules']['company']['company_datasource_id'] = $params['company_datasource_id'];
// User data categories handling
if (is_array($cgp_user['company']['category'])) {
foreach($cgp_user['company']['category'] as $cat_name => $one_cat) {
$cat_id = "${cat_name}_id";
$cat_tree = "${cat_name}_tree";
if (isset ($params[$cat_id])) $params['criteria']['modules']['company'][$cat_id] = $params[$cat_id];
if (isset ($params[$cat_name])) $params['criteria']['modules']['company'][$cat_name] = $params[$cat_name];
if (isset ($params[$cat_tree])) $params['criteria']['modules']['company'][$cat_tree] = $params[$cat_tree];
}
}
// Contact
if (isset ($params['contact_lastname'])) $params['criteria']['modules']['contact']['contact_lastname'] = $params['contact_lastname'];
if (isset ($params['contact_firstname'])) $params['criteria']['modules']['contact']['contact_firstname'] = $params['contact_firstname'];
if (isset ($params['contact_country_iso3166'])) $params['criteria']['modules']['contact']['contact_country_iso3166'] = $params['contact_country_iso3166'];
if (isset ($params['contact_timeafter'])) $params['criteria']['modules']['contact']['contact_timeafter'] = $params['contact_timeafter'];
if (isset ($params['contact_timebefore'])) $params['criteria']['modules']['contact']['contact_timebefore'] = $params['contact_timebefore'];
if (isset ($params['contact_marketingmanager_id'])) $params['criteria']['modules']['contact']['contact_marketingmanager_id'] = $params['contact_marketingmanager_id'];
if (isset ($params['contact_datasource_id'])) $params['criteria']['modules']['contact']['contact_datasource_id'] = $params['contact_datasource_id'];
if (isset ($params['contact_town'])) $params['criteria']['modules']['contact']['contact_town'] = $params['contact_town'];
if (isset ($params['contact_zipcode'])) $params['criteria']['modules']['contact']['contact_zipcode'] = $params['contact_zipcode'];
if (isset ($params['contact_function_id'])) $params['criteria']['modules']['contact']['contact_function_id'] = $params['contact_function_id'];
if (isset ($params['kind_lang'])) $params['criteria']['modules']['contact']['kind_lang'] = $params['kind_lang'];
// User data categories handling
if (is_array($cgp_user['contact']['category'])) {
foreach($cgp_user['contact']['category'] as $cat_name => $one_cat) {
$cat_id = "${cat_name}_id";
$cat_tree = "${cat_name}_tree";
if (isset ($params[$cat_id])) $params['criteria']['modules']['contact'][$cat_id] = $params[$cat_id];
if (isset ($params[$cat_name])) $params['criteria']['modules']['contact'][$cat_name] = $params[$cat_name];
if (isset ($params[$cat_tree])) $params['criteria']['modules']['contact'][$cat_tree] = $params[$cat_tree];
}
}
// Publication
if (isset ($params['subscription_publication_id'])) $params['criteria']['modules']['publication']['subscription_publication_id'] = $params['subscription_publication_id'];
if (isset ($params['publication_lang'])) $params['criteria']['modules']['publication']['publication_lang'] = $params['publication_lang'];
if (isset ($params['publication_year'])) $params['criteria']['modules']['publication']['publication_year'] = $params['publication_year'];
if (isset ($params['subscription_reception_id'])) $params['criteria']['modules']['publication']['subscription_reception_id'] = $params['subscription_reception_id'];
if (isset ($params['subscription_renewal'])) $params['criteria']['modules']['publication']['subscription_renewal'] = $params['subscription_renewal'];
if (isset ($params['subscription_timeafter'])) $params['criteria']['modules']['publication']['subscription_timeafter'] = $params['subscription_timeafter'];
if (isset ($params['subscription_timebefore'])) $params['criteria']['modules']['publication']['subscription_timebefore'] = $params['subscription_timebefore'];
if (isset ($params['log_not'])) $params['criteria']['logical']['NOT'] = $params['log_not'];
if (isset ($params['log_and'])) $params['criteria']['logical']['AND'] = $params['log_and'];
if (isset ($params['se_criteria'])) {
$params['criteria'] = unserialize(urldecode($params['se_criteria']));
}
$nb_con = 0;
$nb_list = 0;
$params['static_con'] = array();
foreach($_REQUEST as $key => $value ) {
if (strcmp(substr($key, 0, 6),'cb_con') == 0) {
$con_num = intval(substr($key, 6));
if ($con_num > 0) {
$nb_con++;
$params['static_con'][] = $con_num;
}
}
}
$params['con_nb'] = $nb_con;
$params['list_nb'] = $nb_list;
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:88,代码来源:list_index.php
示例6: get_group_params
function get_group_params() {
// Get global params
$params = get_global_params('Group');
// Get group specific params
// Group fields
if (isset ($params['ext_id'])) $params['group_id'] = trim($params['ext_id']);
$nb_user = 0;
$nb_group = 0;
$nb_contact = 0;
foreach ($params as $key => $value) {
if (strcmp(substr($key, 0, 10),'data-user-') == 0) {
$nb_user++;
$u_num = substr($key, 10);
$params["user$nb_user"] = $u_num;
} elseif (strcmp(substr($key, 0, 11),'data-group-') == 0) {
$nb_group++;
$params_num = substr($key, 11);
$params["group$nb_group"] = $params_num;
} elseif (strcmp(substr($key, 0, 13),'data-contact-') == 0) {
$nb_contact++;
$params_num = substr($key, 13);
$params["contact$nb_contact"] = $params_num;
}
}
if(isset($params['groups_add'])) {
$nb_group++;
$params_num = substr($params['groups_add'], 11);
$params["group$nb_group"] = $params_num;
}
if(isset($params['users_add'])) {
$nb_user++;
$u_num = substr($params['users_add'], 10);
$params["user$nb_user"] = $u_num;
}
if(isset($params['contacts_add'])) {
$nb_contact++;
$c_num = substr($params['contacts_add'], 13);
$params["contact$nb_contact"] = $c_num;
}
$params['contact_nb'] = $nb_contact;
$params['user_nb'] = $nb_user;
$params['group_nb'] = $nb_group;
if(is_array($params['email'])) {
$email_aliases = array();
while(!empty($params['email'])) {
$email = trim(array_shift($params['email']));
$domain = array_shift($params['aliases']);
if(!empty($email)) {
if(!empty($domain)) {
$email_aliases[] = $email.'@'.$domain;
} else {
$email_aliases[] = $email;
}
}
}
$params['email'] = implode("\r\n",$email_aliases);
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:63,代码来源:group_index.php
示例7: get_user_params
function get_user_params() {
// Get global params
$params = get_global_params('UserObm');
if (isset($params)) {
$nb_group = 0;
while ( list( $key ) = each($params) ) {
if (strcmp(substr($key, 0, 7),'data-g-') == 0) {
$nb_group++;
$group_num = substr($key, 7);
$params["group_$nb_group"] = $group_num;
}
}
$params['group_nb'] = $nb_group;
}
if (isset ($_FILES['fi_file'])) {
$params['file_tmp'] = $_FILES['fi_file']['tmp_name'];
$params['file_name'] = $_FILES['fi_file']['name'];
$params['size'] = $_FILES['fi_file']['size'];
$params['type'] = $_FILES['fi_file']['type'];
}
if(is_array($params['email'])) {
$email_aliases = array();
while(!empty($params['email'])) {
$email = trim(array_shift($params['email']));
$domain = array_shift($params['aliases']);
if(!empty($email)) {
if(!empty($domain)) {
$email_aliases[] = $email.'@'.$domain;
} else {
$email_aliases[] = $email;
}
}
}
$params['email'] = implode("\r\n", $email_aliases);
}
// retrocompability with address with bad language syntax
$params['adress'] = $params['address'];
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:47,代码来源:people_index.php
示例8: get_domain_params
function get_domain_params() {
// Get global params
$params = get_global_params();
if (isset ($params['ext_id'])) $params['domain_id'] = trim($params['ext_id']);
$nb_m = 0;
foreach ($params as $key => $value) {
if (strcmp(substr($key, 0, 7),'data-m-') == 0) {
$nb_m++;
$m_num = substr($key, 7);
$params["mailserver$nb_m"] = $m_num;
}
}
$params['mailserver_nb'] = $nb_m;
if(is_array($params['imap'])) {
$params['imap'] = array_unique($params['imap']);
$array = array();
foreach($params['imap'] as $imap) {
$imap = trim($imap);
if(!empty($imap)) {
$array[] = $imap;
}
}
$params['imap'] = $array;
}
if(is_array($params['smtp_out'])) {
$params['smtp_out'] = array_unique($params['smtp_out']);
$array = array();
foreach($params['smtp_out'] as $smtp_out) {
$smtp_out = trim($smtp_out);
if(!empty($smtp_out)) {
$array[] = $smtp_out;
}
}
$params['smtp_out'] = $array;
}
if(is_array($params['smtp_in'])) {
$params['smtp_in'] = array_unique($params['smtp_in']);
$array = array();
foreach($params['smtp_in'] as $smtp_in) {
$smtp_in = trim($smtp_in);
if(!empty($smtp_in)) {
$array[] = $smtp_in;
}
}
$params['smtp_in'] = $array;
}
if(is_array($params['alias'])) {
$aliases = array();
while(!empty($params['alias'])) {
$alias= trim(array_shift($params['alias']));
if(!empty($alias)) {
$aliases[] = $alias;
}
}
$params['alias'] = implode("\r\n",$aliases);
}
if(isset($params['samba'])) {
foreach($params['samba'] as $key => $value) $params['samba'][$key] = stripslashes($value);
}
if (!empty($params['mail_server_id']) && $params['mail_server_id'][0] == 'a') {
$params['mail_server_auto'] = str_replace('a', '', $params['mail_server_id']) + 0;
unset($params['mail_server_id']);
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:69,代码来源:domain_index.php
示例9: get_import_params
function get_import_params() {
global $tmp_path, $action;
// Get global params
$params = get_global_params('Import');
if (($action == 'file_import') && ($params['file'] != '')
&& ($params['file_saved'] == '')) {
$file_saved = $tmp_path . '/' . $params['file_name'];
copy ($params['file'], $file_saved);
$params['file_saved'] = $file_saved;
}
// Run mode
if ($action == 'file_test') {
$params['run_mode'] = 'test';
} else if ($action == 'file_import') {
if (isset ($params['auto_mode'])) {
$params['run_mode'] = 'auto';
} else {
$params['run_mode'] = 'run';
}
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:26,代码来源:import_index.php
示例10: get_time_params
function get_time_params() {
// Get global params
$params = get_global_params();
// Get time specific params
if ($params['date'] == '') { $params['date'] = date('Y-m-d'); }
// We retrieve the selected users if any, else we get them from sessiom
if (isset ($params['user_id'])) {
if (is_array($params['user_id'])) {
$params['user_ids'] = $params['user_id'];
} else {
$params['user_ids'] = array($params['user_id']);
}
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:19,代码来源:time_index.php
示例11: get_user_params
function get_user_params() {
// Get global params
$params = get_global_params('UserObm');
if (isset($params)) {
$nb_group = 0;
while ( list( $key ) = each($params) ) {
if (strcmp(substr($key, 0, 11),'data-group-') == 0) {
$nb_group++;
$group_num = substr($key, 11);
$params["group_$nb_group"] = $group_num;
}
}
$params['group_nb'] = $nb_group;
}
if(isset($params['exp_op'])) $params['exp_op'] = urldecode($params['exp_op']);
if(isset($params['quota_op'])) $params['quota_op'] = urldecode($params['quota_op']);
if (isset ($_FILES['fi_file'])) {
$params['file_tmp'] = $_FILES['fi_file']['tmp_name'];
$params['file_name'] = $_FILES['fi_file']['name'];
$params['size'] = $_FILES['fi_file']['size'];
$params['type'] = $_FILES['fi_file']['type'];
}
if(isset ($params['vacation_datebegin'])) {
$params['vacation_datebegin'] = of_isodate_convert($params['vacation_datebegin']);
$params['vacation_datebegin'] = new Of_Date($params['vacation_datebegin']);
$params['vacation_datebegin']->setHour($params["time_begin"])->setMinute($params["min_begin"])->setSecond(0);
}
if(isset ($params['vacation_dateend'])) {
$params['vacation_dateend'] = of_isodate_convert($params['vacation_dateend']);
$params['vacation_dateend'] = new Of_Date($params['vacation_dateend']);
$params['vacation_dateend']->setHour($params["time_end"])->setMinute($params["min_end"])->setSecond(0);
}
if (is_array($params['email_nomade'])) {
$email_aliases = array();
while(!empty($params['email_nomade'])) {
$email = trim(array_shift($params['email_nomade']));
if(!empty($email)) {
$email_aliases[] = $email;
}
}
$params['email_nomade'] = implode("\r\n", $email_aliases);
}
if (is_array($params['email'])) {
$email_aliases = array();
while(!empty($params['email'])) {
$email = trim(array_shift($params['email']));
$domain = array_shift($params['aliases']);
if(!empty($email)) {
if(!empty($domain)) {
$email_aliases[] = $email.'@'.$domain;
} else {
$email_aliases[] = $email;
}
}
}
$params['email'] = implode("\r\n", $email_aliases);
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:69,代码来源:user_index.php
示例12: get_mailbox_params
function get_mailbox_params() {
global $action, $cdg_param, $popup;
global $cb_read_public, $cb_write_public,$sel_accept_write,$sel_accept_read;
// Get global params
$params = get_global_params("Mailbox");
if ((isset ($params["entity_id"])) && (! isset($params["mailbox_id"]))) {
$params["mailbox_id"] = $params["entity_id"];
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:13,代码来源:mailbox_index.php
示例13: get_chart_params
function get_chart_params() {
// Get global params
$params = get_global_params("Chart");
if (isset ($params["title"])) $params["title"] = stripslashes($params["title"]);
if (isset ($params["values"])) $params["values"] = unserialize(stripslashes($params["values"]));
if (isset ($params["labels"])) $params["labels"] = unserialize(stripslashes($params["labels"]));
if (isset ($params["xlabels"])) $params["xlabels"] = unserialize(stripslashes($params["xlabels"]));
if (isset ($params["plots"])) $params["plots"] = unserialize(stripslashes($params["plots"]));
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:14,代码来源:chart_index.php
示例14: get_calendar_params
function get_calendar_params() {
global $ccalendar_first_hour, $ccalendar_last_hour;
// Get global params
$params = get_global_params('Entity');
$params['date'] = of_isodate_convert($params['date']);
$params['date'] = new Of_Date($params['date']);
$params['event_before_date'] = of_isodate_convert($params['event_before_date']);
if(!is_null($params['event_before_date'])) {
$params['event_before_date'] = new Of_Date($params['event_before_date']);
}
$params['date_begin'] = of_isodate_convert($params['date_begin'],true);
if(!is_null($params['date_begin'])) {
$params['date_begin'] = new Of_Date($params['date_begin']);
}
$params['date_end'] = of_isodate_convert($params['date_end'],true);
if(!is_null($params['date_end'])) {
$params['date_end'] = new Of_Date($params['date_end']);
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:22,代码来源:calendar_render.php
示例15: get_cv_params
/**
* Stores cv parameters transmited in $cv hash
* @return array $cv hash with parameters set
*/
function get_cv_params() {
$params = get_global_params("CV");
$params["additionalrefs"] = format_additionalrefs($params["additionalrefs_date"], $params["additionalrefs_duration"], $params["additionalrefs_project"], $params["additionalrefs_role"], $params["additionalrefs_desc"], $params["additionalrefs_tech"]);
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:12,代码来源:cv_index.php
示例16: getenv
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| http://www.obm.org |
+-------------------------------------------------------------------------+
*/
?>
<?php
$path = '..';
$module = 'webmail';
$obminclude = getenv('OBM_INCLUDE_VAR');
if ($obminclude == '') $obminclude = 'obminclude';
include("$obminclude/global.inc");
$params = get_global_params('webmail');
page_open(array('sess' => 'OBM_Session', 'auth' => $auth_class_name, 'perm' => 'OBM_Perm'));
include("$obminclude/global_pref.inc");
include("webmail_display.inc");
get_webmail_action();
//$perm->check_permissions($module, $action);
$action = 'index';
page_close();
if ($action == 'index' || $action == '') {
///////////////////////////////////////////////////////////////////////////////
$display['detail'] = dis_webmail_content();
}
开发者ID:Kervinou,项目名称:OBM,代码行数:30,代码来源:webmail_index.php
示例17: get_admin_data_params
function get_admin_data_params() {
$params = get_global_params('admin_data');
if (($params['mode'] == '') || ($params['mode'] != 'html')) {
$params['mode'] = 'txt';
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:10,代码来源:admin_data_index.php
示例18: get_profile_params
function get_profile_params() {
// Get global params
$params = get_global_params('profile');
$action = $params['action'];
if(is_array($params['rights'])) {
foreach($params['rights'] as $module => $rights) {
$params['module'][$module] = 0;
foreach($rights as $right) {
$params['module'][$module] = $params['module'][$module] | ($right);
}
}
}
if(is_array($params['enabled'])) {
foreach($params['enabled'] as $section => $show) {
$params['section'][$section] = $show;
}
}
if(is_array($params['property'])) {
foreach($params['property'] as $property => $value) {
if(!is_array($value) && count(explode(',', $value)) > 1) {
$params['property'][$property] = explode(',', $value);
}
}
}
if(is_array($property['default_right'])) {
}
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:30,代码来源:profile_index.php
示例19: get_settings_params
function get_settings_params() {
// Get global params
$params = get_global_params('Settings');
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:7,代码来源:settings_index.php
示例20: get_statistic_params
function get_statistic_params() {
// Get global params
$params = get_global_params();
return $params;
}
开发者ID:Kervinou,项目名称:OBM,代码行数:6,代码来源:statistic_index.php
注:本文中的get_global_params函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论