• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_config_value函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_config_value函数的典型用法代码示例。如果您正苦于以下问题:PHP get_config_value函数的具体用法?PHP get_config_value怎么用?PHP get_config_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: update_blog

 function update_blog()
 {
     if ($_FILES['image']['name']) {
         $image = $this->load_image_name($this->input->post('id'));
         unlink('upload/images/' . $image);
         $config['upload_path'] = get_config_value('upload_blog_path');
         $config['allowed_types'] = 'gif|jpg|jpeg|png';
         $config['max_size'] = get_config_value('max_size');
         $config['encrypt_name'] = TRUE;
         // rename to random string
         $this->load->library('upload', $config);
         if ($this->upload->do_upload('image')) {
             $datax = $this->upload->data();
             $this->db->set('image', $datax['file_name']);
         } else {
             print_r($this->upload->display_errors());
             exit;
         }
     }
     $this->db->set('title', $this->input->post('title'));
     $this->db->set('alias', seo_url($this->input->post('title')));
     $this->db->set('content', $this->input->post('content'));
     $this->db->where('id', $this->input->post('id'));
     $result = $this->db->update('blog');
     return $result;
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:26,代码来源:blog_model.php


示例2: add_article

 function add_article($data)
 {
     $config['upload_path'] = get_config_value('upload_news_path');
     $config['allowed_types'] = 'gif|jpg|jpeg|png';
     $config['max_size'] = get_config_value('max_size');
     $config['encrypt_name'] = TRUE;
     // rename to random string
     if ($_FILES['image']['name']) {
         $this->load->library('upload', $config);
         if ($this->upload->do_upload('image')) {
             $datax = $this->upload->data();
         } else {
             print_r($this->upload->display_errors());
             exit;
         }
     } else {
         $datax['file_name'] = NULL;
     }
     $this->db->set('title', $data['title']);
     $this->db->set('alias', seo_url($data['title']));
     $this->db->set('category_id', $data['category_id']);
     $this->db->set('image', $datax['file_name']);
     $this->db->set('short_content', $data['short_content']);
     $this->db->set('full_content', $data['full_content']);
     $this->db->set('time', time());
     $this->db->set('publish', 1);
     $result = $this->db->insert('article');
     return $result;
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:29,代码来源:article_model.php


示例3: save_edit

 function save_edit()
 {
     if ($_FILES['image']['name']) {
         $image = $this->article_model->load_image_name($this->input->post('id'));
         unlink('upload/images/' . $image);
         $config['upload_path'] = get_config_value('upload_news_path');
         $config['allowed_types'] = 'gif|jpg|jpeg|png';
         $config['max_size'] = get_config_value('max_size');
         $config['encrypt_name'] = TRUE;
         // rename to random string
         $this->load->library('upload', $config);
         if ($this->upload->do_upload('image')) {
             $datax = $this->upload->data();
             $data['image'] = $datax['file_name'];
         } else {
             print_r($this->upload->display_errors());
             exit;
         }
     }
     $data['title'] = $this->input->post('title');
     $data['alias'] = seo_url($this->input->post('title'));
     $data['category_id'] = $this->input->post('category_id');
     $data['short_content'] = html_entity_decode($this->input->post('short_content'), ENT_QUOTES, "UTF-8");
     $data['full_content'] = html_entity_decode($this->input->post('full_content'), ENT_QUOTES, "UTF-8");
     $isOK = $this->article_model->update_article($this->input->post('id'), $data);
     if ($isOK) {
         $this->session->set_flashdata('message', 'Information is saved');
         redirect('/article');
     } else {
         $this->session->set_flashdata('message', 'Can\'t save information');
         redirect('/article');
     }
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:33,代码来源:article.php


示例4: update_b2b

 function update_b2b($data)
 {
     if ($_FILES['image']['name']) {
         $image = $this->load_image_name($this->input->post('id'));
         unlink('upload/b2b/' . $image);
         $config['upload_path'] = get_config_value('upload_b2b_path');
         $config['allowed_types'] = 'gif|jpg|jpeg|png';
         $config['max_size'] = get_config_value('max_size');
         $config['encrypt_name'] = TRUE;
         // rename to random string
         $this->load->library('upload', $config);
         if ($this->upload->do_upload('image')) {
             $datax = $this->upload->data();
             $this->db->set('image', $datax['file_name']);
         } else {
             print_r($this->upload->display_errors());
             exit;
         }
     }
     if ($data['new_pass']) {
         $this->db->set('password', md5($data['new_pass']));
     }
     $this->db->set('name', $data['name']);
     $this->db->set('web', $data['web']);
     $this->db->set('company', $data['company']);
     $this->db->where('id', $data['id']);
     $result = $this->db->update('b2b_user');
     return $result;
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:29,代码来源:b2b_user_model.php


示例5: getInstance

 /**
  *   Return a geocoder singleton
  *
  *   @param $config KConfig object
  *
  *   @return ComLocationsGeocoderAdapterAbstract child singleton
  */
 public function getInstance(KConfig $config)
 {
     if ($this->_geocoder) {
         return $this->_geocoder;
     }
     $service = ucfirst(get_config_value('locations.service', 'google'));
     $class_name = 'ComLocationsGeocoderAdapter' . $service;
     $this->_geocoder = new $class_name($config);
     return $this->_geocoder;
 }
开发者ID:LuccaCaldas,项目名称:anahita,代码行数:17,代码来源:default.php


示例6: site_get_symbol

function site_get_symbol($key)
{
    if (!($symbols = get_config_value('symbols', 'site'))) {
        return '';
    }
    if (empty($symbols[$key])) {
        return '';
    }
    return $symbols[$key];
}
开发者ID:nise-nabe,项目名称:uzuramemo,代码行数:10,代码来源:site_helper.php


示例7: smarty_function_get_config_value

function smarty_function_get_config_value($params, &$smarty)
{
    if (empty($params['key'])) {
        return '';
    }
    $key = $params['key'];
    if (!empty($params['index'])) {
        $index = $params['index'];
    }
    return get_config_value($key, $index);
}
开发者ID:nise-nabe,项目名称:uzuramemo,代码行数:11,代码来源:function.get_config_value.php


示例8: map

 /**
  * renders a map
  *
  * @param array of ComLocationsDomainEntityLocation entities
  * @param array of configuration params: longitude, latitude, name, url
  *
  * @return string html
  */
 public function map($locations, $config = array())
 {
     if ($locations instanceof ComLocationsDomainEntityLocation) {
         $locations = array($locations);
     }
     $data = array();
     foreach ($locations as $location) {
         $data[] = array('longitude' => $location->longitude, 'latitude' => $location->latitude, 'name' => $location->name, 'url' => JRoute::_($location->getURL()));
     }
     $config['locations'] = htmlspecialchars(json_encode($data), ENT_QUOTES, 'UTF-8');
     $config['service'] = get_config_value('locations.service', 'google');
     return $this->_render('map_' . $config['service'], $config);
 }
开发者ID:LuccaCaldas,项目名称:anahita,代码行数:21,代码来源:ui.php


示例9: _authorizeAdd

 /**
  * Authorize whether we can add a new actor or not.
  * 
  * @param KCommandContext $context
  * 
  * @return bool
  */
 protected function _authorizeAdd(KCommandContext $context)
 {
     $can_publish = get_config_value($this->_entity->component, 'can_publish', self::CAN_ADD_ADMIN);
     switch ($can_publish) {
         case self::CAN_ADD_ADMIN:
             return $this->_viewer->admin();
         case self::CAN_ADD_SPECIAL:
             return $this->_viewer->userType != 'Registered' && !$this->_viewer->guest();
         case self::CAN_ADD_ALL:
             return !$this->_viewer->guest();
         default:
             return false;
     }
 }
开发者ID:stonyyi,项目名称:anahita,代码行数:21,代码来源:component.php


示例10: ok_to_impersonate

function ok_to_impersonate($euid, $uid)
{
    global $dbh;
    // It's harmless to impersonate yourself ;)
    if ($euid == $uid && $euid > 0 && $uid > 0) {
        return true;
    } else {
        // Domain default users can be impersonated by admins
        // responsible for those domains, and the superadmin.
        // Only the superadmin can impersonate the system default
        // user (@.).
        if (is_a_domain_default_user($euid) || get_config_value("enable_privacy_invasion") == "Y") {
            if (is_superadmin($uid)) {
                return true;
            } else {
                if (is_a_domain_default_user($euid)) {
                    $domain_id = get_domain_id(get_user_name($euid));
                    return is_admin_for_domain($uid, $domain_id);
                } else {
                    if (!is_superadmin($euid)) {
                        $sth = $dbh->prepare("SELECT email FROM users WHERE maia_user_id = ?");
                        $res = $sth->execute(array($euid));
                        if (PEAR::isError($sth)) {
                            die($sth->getMessage());
                        }
                        while ($row = $res->fetchRow()) {
                            $domain_id = get_domain_id("@" . get_domain_from_email($row["email"]));
                            if (is_admin_for_domain($uid, $domain_id)) {
                                $sth->free();
                                return true;
                            }
                        }
                        $sth->free();
                        return false;
                    } else {
                        return false;
                    }
                }
            }
            // Impersonating other users is an invasion of privacy,
            // even for administrators, unless explicitly overridden above.
        } else {
            return false;
        }
    }
}
开发者ID:tenshi3,项目名称:maia_mailguard,代码行数:46,代码来源:user_management.php


示例11: save_add

 function save_add()
 {
     $data['email'] = $this->input->post('email');
     $data['name'] = $this->input->post('name');
     $data['web'] = $this->input->post('web');
     $data['company'] = $this->input->post('company');
     $pass = $this->input->post('pass');
     $isOK = $this->b2b_user_model->check_b2b($data['email']);
     if ($isOK) {
         $this->session->set_flashdata('message', 'This email is used, please input other email');
         redirect(base_url() . index_page() . 'b2b_user/add');
     }
     $data['password'] = md5($pass);
     $data['time'] = time();
     $data['publish'] = 1;
     if ($_FILES['image']['name']) {
         $config['upload_path'] = get_config_value('upload_b2b_path');
         $config['allowed_types'] = 'gif|jpg|jpeg|png';
         $config['max_size'] = get_config_value('max_size');
         $config['encrypt_name'] = TRUE;
         // rename to random string
         $this->load->library('upload', $config);
         if ($this->upload->do_upload('image')) {
             $datax = $this->upload->data();
             $data['image'] = $datax['file_name'];
         } else {
             $data['image'] = "";
         }
     }
     $isOK = $this->b2b_user_model->add_b2b($data);
     if ($isOK) {
         //Send mail to user B2B
         $data['link'] = base_url() . index_page();
         $data['pass'] = $pass;
         $data['login'] = base_url() . index_page() . 'user/login.html';
         $data['site'] = base_url() . index_page() . 'index.html';
         $emailTo = array($data['email']);
         $mailOK = $this->b2b_user_model->sendEmail($emailTo, "Sugardating.dk - Detaljer for ny bruger", 'signupb2b', array('data' => $data), '');
         $this->session->set_flashdata('message', 'A B2B account is added');
         redirect(base_url() . index_page() . 'b2b_user');
     } else {
         $this->session->set_flashdata('message', 'Can\'t add account');
         redirect(base_url() . index_page() . 'b2b_user');
     }
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:45,代码来源:b2b_user.php


示例12: fetch_class

 /**
  * @return string
  */
 public function fetch_class()
 {
     if ($this->class != null) {
         return $this->class;
     }
     // Get default class if not provided
     if (count($this->uri->segments) == 0) {
         if (trim(get_config_value('main', 'default_controller')) == '') {
             error("Default controller is not defined.");
         }
         return strtolower(get_config_value('main', 'default_controller'));
     }
     // Do routing
     $class = strtolower($this->uri->segments[0]);
     $route = get_config_value('routes', $class);
     if ($route !== NULL) {
         array_shift($this->uri->segments);
         $routeSegments = explode("/", $route);
         array_unshift($this->uri->segments, $routeSegments[0], $routeSegments[1]);
     }
     $this->class = strtolower($this->uri->segments[0]);
     return $this->class;
 }
开发者ID:stefda,项目名称:pocketsail,代码行数:26,代码来源:CL_Router.php


示例13: add_image

 function add_image($user_id)
 {
     $config['upload_path'] = get_config_value('upload_gallery_path');
     $config['allowed_types'] = 'gif|jpg|jpeg|png';
     $config['max_size'] = get_config_value('max_size');
     $config['encrypt_name'] = TRUE;
     // rename to random string
     $this->load->library('upload', $config);
     if ($_FILES['upl']['name']) {
         if ($this->upload->do_upload('upl')) {
             $datax = $this->upload->data();
         } else {
             die($this->upload->display_errors());
         }
     } else {
         $datax['file_name'] = NULL;
     }
     $this->db->set('user_id', $user_id);
     $this->db->set('image', $datax['file_name']);
     $this->db->set('time', time());
     $this->db->set('publish', 1);
     $result = $this->db->insert('gallery');
     return $result;
 }
开发者ID:quachvancam,项目名称:sugardating,代码行数:24,代码来源:gallery_model.php


示例14: process_commands_list

function process_commands_list($commands_list, $plugin_name = '')
{
    # check inputs
    if (!is_string($plugin_name)) {
        return error(null, "plugin name is not a string");
    }
    if (!is_array($commands_list)) {
        return error(null, "commands to process are not an array");
    }
    if (empty($commands_list)) {
        return notice(null, "no commands to process");
    }
    # loop through all the commands
    foreach ($commands_list as $commands) {
        $r = process_commands($commands);
        if (@$GLOBALS['error'] === false) {
            $r = true;
        }
        if ($r === true) {
            $syslog = get_config_value('syslog_on_success', false);
            if ($syslog) {
                $syslog_error_msg = "[SureDone {$plugin_name} plugin] [Success]";
                $syslog_priority = get_config_value('syslog_success_priority', LOG_INFO);
            }
            $msg = "[Success] Script execution successful";
        } else {
            $syslog = get_config_value('syslog_on_failure', true);
            if ($syslog) {
                $error_msg = $GLOBALS['error_msg'];
                $syslog_msg = "[SureDone {$plugin_name} plugin] [Error] {$error_msg}";
                $syslog_priority = get_config_value('syslog_failure_priority', LOG_ERR);
            }
            $msg = "[Failure] Script exited with errors";
            break;
        }
    }
    # perform a syslog if required
    if ($syslog) {
        syslog($syslog_priority, $syslog_msg);
        $msg = "{$msg} (logged to syslog)";
        $exit_status = 1;
    } else {
        $msg = "{$msg} (not logged to syslog)";
        $exit_status = 0;
    }
    # echo the success/failure of the script and exit
    echo "{$msg}\n";
    if ($exit_status != 0) {
        exit($exit_status);
    }
}
开发者ID:simpl,项目名称:datapipe,代码行数:51,代码来源:commands.php


示例15: trim

<!DOCTYPE html>
<head>
<title>Servatrice Administrator</title>
</head>
<html>
	<body>
		<?php 
require '.config_commonfunctions';
global $configfile;
$version = trim(get_config_value($configfile, 'version'));
if (strpos(strtolower($version), "fail") !== false) {
    echo $version;
    exit;
}
$banner = trim(get_config_value($configfile, 'indexwelcomemessage'));
if (strpos(strtolower($banner), "fail") !== false) {
    echo $banner;
    exit;
}
?>
		<table border="1" align="center" cellpadding="5">
			<tr align="center">
				<td><a href="loginpage.php">Account Log-in</a></td>
				<td><a href="statistics.php">Statistics</a></td>
				<td><a href="registrationpage.php">Registration</a></td>
				<td><a href="codeofconduct.html">Code of Conduct</a></td>
			</tr>
			<tr><td colspan="4" align="center"><?php 
if (!empty($banner)) {
    echo trim($banner) . '<br>';
}
开发者ID:poixen,项目名称:servatriceadminwebui,代码行数:31,代码来源:index.php


示例16: setPackage

 /**
  * Set the transaction price
  * 
  * @param ComSubscriptionsDomainEntityPackage $package
  * @param boolean $upgraded
  * 
  * @return void
  */
 public function setPackage($package, $upgraded = null)
 {
     $this->currency = get_config_value('subscriptions.currency', 'US');
     $this->itemName = $package->name;
     $this->itemId = $package->id;
     $this->itemAmount = $package->price;
     $this->duration = $package->duration;
     $this->billingPeriod = $package->billingPeriod;
     $this->recurring = $package->recurring;
     if ($upgraded) {
         $this->duration = max(0, $package->duration - $upgraded->duration);
         $this->itemAmount = max(0, $package->price - $upgraded->price);
         $this->upgrade = true;
     }
     $this->_package = $package;
     return $this;
 }
开发者ID:walteraries,项目名称:anahita,代码行数:25,代码来源:order.php


示例17: http_response_code

require_once $_SERVER["DOCUMENT_ROOT"] . "/../includes/base.php";
if (!is_manager()) {
    http_response_code(404);
    header("Location: /error/404/not-found");
}
$page = isset($_GET["page"]) ? intval($_GET["page"]) : 1;
?>
<!DOCTYPE html>
<html>
<head>
	<?php 
include $_SERVER["DOCUMENT_ROOT"] . "/../includes/content.head.php";
?>
	<title><?php 
echo get_config_value("site", "title");
?>
 | Admin - Users</title>
</head>
<body>
	<div class="component-left">
		<div class="container container-center">
			<?php 
include $_SERVER["DOCUMENT_ROOT"] . "/../includes/content.sidebar_left.php";
?>
		</div>
	</div>
	<div class="component-right">
		<div class="container container-padded">
			<h3>Manage Blocked Users</h3>
            <hr/>
开发者ID:ArtOfCode-,项目名称:BlankPost,代码行数:30,代码来源:unblock.php


示例18: defined

<?php

defined('KOOWA') or die('Restricted access');
?>

<?php 
echo get_config_value('subscriptions.welcome_message');
?>

<h1><?php 
echo @text('COM-SUBSCRIPTIONS-INVOICE');
?>
</h1>

<p><strong><?php 
echo @text('COM-SUBSCRIPTIONS-INVOICE-BILLED-TO');
?>
</strong>: <?php 
echo @name($order->getSubscriber());
?>
</p>
<p><strong><?php 
echo @text('COM-SUBSCRIPTIONS-INVOICE-SUBSCRIBED-TO');
?>
</strong>: <?php 
echo stripslashes($order->itemName);
?>
</p>
<p><strong><?php 
echo @text('COM-SUBSCRIPTIONS-TRANSACTION-DATE');
?>
开发者ID:josefXXX,项目名称:anahita,代码行数:31,代码来源:invoice.php


示例19: _initialize

 /**
  * Initializes the default configuration for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  *
  * @return void
  */
 protected function _initialize(KConfig $config)
 {
     $params = get_config_value('com_subscriptions');
     $config->append(array('test_mode' => $params->get('test_mode', false), 'login' => $params->get('login'), 'password' => $params->get('password'), 'signature' => $params->get('signature')));
     parent::_initialize($config);
 }
开发者ID:walteraries,项目名称:anahita,代码行数:15,代码来源:paypal.php


示例20: round

    ?>
:</dt>
            <dd><?php 
    echo round(AnHelperDate::secondsTo('day', $package->duration));
    ?>
 <?php 
    echo @text('COM-SUBSCRIPTIONS-PACKAGE-DAYS');
    ?>
</dd>

            <dt><?php 
    echo @text('COM-SUBSCRIPTIONS-PACKAGE-PRICE');
    ?>
:</dt> 
            <dd><?php 
    echo $package->price . ' ' . get_config_value('subscriptions.currency', 'US');
    ?>
</dd>
        </dl>
    </div>
    
    <div class="entity-description">
        <?php 
    echo @content($package->description);
    ?>
    
        <?php 
    if (!$package->recurring && $package->authorize('upgradepackage')) {
        ?>
        <p>
            <a href="<?php 
开发者ID:walteraries,项目名称:anahita,代码行数:31,代码来源:default.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_configured_carp_interface_list函数代码示例发布时间:2022-05-15
下一篇:
PHP get_config_plugin函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap