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


PHP getConfigValue函数代码示例

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


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

示例1: logThis

/**
 * non-OO logging function ported from CW
 *
 * For CW logging.
 *
 * @param $msg
 */
function logThis($msg)
{
    $logFile = getConfigValue('log', 'logfile');
    if ($logFile) {
        // it's configured so let's write to it. ("3" means append to a specific file)
        $formattedMsg = "\n" . microDateTime() . ' ' . $msg;
        error_log($formattedMsg, 3, $logFile);
    }
}
开发者ID:zendtech,项目名称:ibmitoolkit,代码行数:16,代码来源:ToolkitService.php

示例2: _send

 function _send($to, $subject, $message)
 {
     $from = getConfigValue("email_from");
     $this->CI->email->set_mailtype("html");
     $this->CI->email->from($from);
     $this->CI->email->to($from);
     $this->CI->email->subject($subject);
     $this->CI->email->message($message);
     $this->CI->email->send();
 }
开发者ID:LunchMatcher,项目名称:lunchcode,代码行数:10,代码来源:email_lib_mar_16.php

示例3: upload

 public function upload($blobRestProxy, $container, $filePath)
 {
     $this->md5 = md5_file($filePath);
     //Get file hash
     $this->name = generateRandomString();
     //Generate file blob name
     $this->url = 'https://' . getConfigValue('azure_storage_account') . '.blob.core.windows.net/' . $container . '/' . $this->name;
     //Get Azure blob URL
     $this->fileHandle = fopen($filePath, 'r');
     $blobRestProxy->createBlockBlob($container, $this->name, $this->fileHandle);
     //Upload blob to Azure Blob Service
 }
开发者ID:ChronusDev,项目名称:DownloadMii-Backend,代码行数:12,代码来源:action.php

示例4: __construct

 /**
  * Constructor takes a PCML string and converts to an array-based new toolkit parameter array.
  *
  * @param string $pcml The string of PCML
  * @param ToolkitService $connection connection object for toolkit
  * @param array $countersAndCounted
  * @throws \Exception
  */
 public function __construct($pcml, ToolkitService $connection, $countersAndCounted = array())
 {
     $this->setConnection($connection);
     $this->setCountersAndCounted($countersAndCounted);
     // Convert PCML from ANSI format (which old toolkit required) to UTF-8 (which SimpleXML requires).
     $encoding = getConfigValue('system', 'encoding', 'ISO-8859-1');
     // XML encoding
     /*
      * Look for optionally set <?xml encoding attribute
      * and change encoding if attribute is set and not UTF-8
      * or change encoding if attribute is not set and ini encoding is not UTF-8
      */
     $pcml = trim($pcml);
     $matches = array();
     $regex = '/^<\\?xml\\s.*?encoding=["\']([^"\']+)["\'].*?\\?>/is';
     if (preg_match($regex, $pcml, $matches) && $matches[1] != 'UTF-8') {
         //remove xml-tag
         $pcml = substr($pcml, strlen($matches[0]));
         $pcml = mb_convert_encoding($pcml, 'UTF-8', $matches[1]);
     } elseif ($encoding != 'UTF-8') {
         $pcml = mb_convert_encoding($pcml, 'UTF-8', $encoding);
     }
     //program name is stored as: /pcml/program name="/qsys.lib/eacdemo.lib/teststruc.pgm"
     $xmlObj = new \SimpleXMLElement($pcml);
     // get root node and make sure it's named 'pcml'
     if (!isset($xmlObj[0]) || $xmlObj[0]->getName() != 'pcml') {
         throw new \Exception("PCML file must contain pcml tag");
     }
     $pcmlObj = $xmlObj[0];
     // get program name, path, etc.
     if (!isset($pcmlObj->program) || !$pcmlObj->program) {
         throw new \Exception("PCML file must contain program tag");
     }
     /**
      * sample:
      * <program name="name"
      * [ entrypoint="entry-point-name" ]
      * [ epccsid="ccsid" ]
      * [ path="path-name" ]
      * [ parseorder="name-list" ]
      * [ returnvalue="{ void | integer }" ]
      * [ threadsafe="{ true | false }" ]>
      * </program>
      */
     // Now create data description array.
     // @todo create separate method to convert PCML to param array.
     $dataDescriptionArray = $this->pcmlToArray($xmlObj);
     //Change the encoding back to the one wanted by the user, since SimpleXML encodes its output always in UTF-8
     mb_convert_variables($encoding, 'UTF-8', $dataDescriptionArray);
     $this->_description = $dataDescriptionArray;
 }
开发者ID:zendtech,项目名称:ibmitoolkit,代码行数:59,代码来源:ToolkitPCML.php

示例5: stream

 function stream($video = "")
 {
     /*
     //aktuellen titel finden
     $currentTrack = count($this->playlist)-1;
     while(($currentTime < $this->playlist[$currentTrack]['starttime']) && ($currentTrack>0)){
     $currentTrack--;
     }
     
     //aktuelle sekunde des aktuellen titels herausfinden
     
     //aktuelle zeit - startzeit = laufzeit
     //laufzeit mod tracklänge = aktuelle position
     
     $runtime = $currentTime-$this->playlist[$currentTrack]['starttime'];
     $currentSecond = fmod($runtime,count($this->keyframecache->cache[$currentTrack]));
     
     $timeToRun = -1;
     //restlaufzeit für diesen titel berechnen
     if ((count($this->playlist)-1)>$currentTrack){
     $timeToRun = $this->playlist[$currentTrack+1]['starttime']-$currentTime;
     }
     $flv = new CustomFLV($this->getFLVFileName($this->playlist[$currentTrack]['filename']));
     $flv->setBrowserCaching(false);
     $flv->playFlv(1,$this->keyframecache->cache[$currentTrack][$currentSecond]);
     */
     if ($video == "") {
         $this->getPlaylistEntry($video, $nextVideoName, $nextVideoStartTime);
     }
     //		$fh = fopen('./tmp/test.log',w);
     //		fwrite($fh,strtotime("now").': Playing '.getConfigValue('videopath').$video);
     //		fclose($fh);
     //
     //		header("Content-Disposition: filename=".basename($video));
     //		header("Content-Type: video/x-flv");
     //		header("Content-Length: " .(string)filesize(getConfigValue('videopath').$video));
     //
     //        $fh = fopen(getConfigValue('videopath').$video,r);
     //        while (!feof($fh)){
     //			print(fread($fh, 1024));
     //        }
     //		fclose($fh);
     $flv = new CustomFLV(getConfigValue('videopath') . $video);
     //$flv->setBrowserCaching(false);
     $flv->playFlv();
 }
开发者ID:BackupTheBerlios,项目名称:flvloopplayer-svn,代码行数:46,代码来源:flvloopstreamer.php

示例6: purchase

 public function purchase()
 {
     $data['page_limit'] = getConfigValue('default_pagination');
     $page_limit = $data['page_limit'];
     $data['limit'] = !$this->input->post('limit') ? $this->input->get('limit') ? $this->input->get('limit') : $page_limit : $this->input->post('limit');
     $data['purchaselist'] = $this->points_model->get_all_purchases();
     $config['total_rows'] = count($data['purchaselist']);
     $config['per_page'] = $data['limit'] == 'all' ? $config['total_rows'] : $data['limit'];
     $this->db->limit($config['per_page'], $_REQUEST['per_page']);
     //$data['userlist']=$this->points_model->get_all();
     $params = '?t=1';
     if ($data['limit'] != '') {
         $params .= '&limit=' . $data['limit'];
     }
     $this->load->library('pagination');
     $config['base_url'] = site_url("admin/points/purchase") . "/" . $params;
     //--------------------------------------------------
     // load pagination class
     $config['page_query_string'] = TRUE;
     $config['first_link'] = 'First';
     $config['last_link'] = 'Last';
     $config['full_tag_open'] = "<ul class='pagination'>";
     $config['full_tag_close'] = "</ul>";
     $config['num_tag_open'] = '<li>';
     $config['num_tag_close'] = '</li>';
     $config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
     $config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
     $config['next_tag_open'] = "<li>";
     $config['next_tagl_close'] = "</li>";
     $config['prev_tag_open'] = "<li>";
     $config['prev_tagl_close'] = "</li>";
     $config['first_tag_open'] = "<li>";
     $config['first_tagl_close'] = "</li>";
     $config['last_tag_open'] = "<li>";
     $config['last_tagl_close'] = "</li>";
     $data['page'] = $_REQUEST['per_page'];
     $this->pagination->initialize($config);
     //----------------------------------------------------------
     //$output['output']=$this->showList($baseurl,count($data['userlist']),$data['userlist']);
     //print_r($output['output']);exit;
     //echo $this->points_model->db->last_query();exit;
     //echo "<pre>"; print_r($data['userlist']); echo "</pre>"; exit;
     $output['output'] = $this->load->view('admin/points/purchaselists', $data, true);
     $this->_render_output($output);
 }
开发者ID:LunchMatcher,项目名称:lunchcode,代码行数:45,代码来源:points.php

示例7: lists

 public function lists()
 {
     $data['startDate'] = !$this->input->post('startDate') ? $this->input->get('startDate') ? $this->input->get('startDate') : date('Y-m-d') : $this->input->post('startDate');
     $data['endDate'] = !$this->input->post('endDate') ? $this->input->get('endDate') ? $this->input->get('endDate') : date('Y-m-d') : $this->input->post('endDate');
     $data['limit'] = !$this->input->post('limit') ? $this->input->get('limit') ? $this->input->get('limit') : $page_limit : $this->input->post('limit');
     //$data['availablelist']=$this->availability_model->get_all_availability();
     $data['availablelistBydate'] = $this->availability_model->getAvailabilityByDate($data['startDate'], $data['endDate']);
     $data['todayMatches'] = $this->availability_model->getMatchHistoryByMatchlog($data['startDate'], $data['endDate']);
     //echo "<pre>"; print_r($data['availablelistBydate']); echo "</pre>"; exit;
     $config['total_rows'] = count($data['availablelistBydate']);
     $config['per_page'] = getConfigValue('default_pagination');
     $this->db->limit($config['per_page'], $_REQUEST['per_page']);
     $params = '?t=1';
     //	$this->load->library('pagination');
     //	$config['base_url'] = site_url("admin/availability/lists")."/".$params;
     // load pagination class
     /*			$config['page_query_string'] = TRUE;
     			$config['first_link'] = 'First';
     			$config['last_link'] = 'Last';
     			$config['full_tag_open'] = "<ul class='pagination'>";
     			$config['full_tag_close'] ="</ul>";
     			$config['num_tag_open'] = '<li>';
     			$config['num_tag_close'] = '</li>';
     			$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
     			$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
     			$config['next_tag_open'] = "<li>";
     			$config['next_tagl_close'] = "</li>";
     			$config['prev_tag_open'] = "<li>";
     			$config['prev_tagl_close'] = "</li>";
     			$config['first_tag_open'] = "<li>";
     			$config['first_tagl_close'] = "</li>";
     			$config['last_tag_open'] = "<li>";
     			$config['last_tagl_close'] = "</li>";			
     			$data['page'] = $_REQUEST['per_page'];
     		$this->pagination->initialize($config);	
     */
     //echo $this->availability_model->db->last_query();exit;
     //echo "<pre>"; print_r($data['userlist']); echo "</pre>"; exit;
     $output['output'] = $this->load->view('admin/availability/lists', $data, true);
     $this->_render_output($output);
 }
开发者ID:LunchMatcher,项目名称:lunchcode,代码行数:41,代码来源:availability.php

示例8: checkConfigs

function checkConfigs()
{
    // There you can add new config checks to your bot interface
    global $lang;
    $errors = 0;
    // Global Config Checker
    if (!preg_match('/[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}/', getConfigValue('connection', 'server_ip'))) {
        echo "\n" . $lang->getLanguage('MNG_ERROR') . " " . $lang->getLanguage('NOT_VALID_IP') . "\n";
        $errors++;
    }
    if (!is_numeric(getConfigValue('connection', 'server_query_port')) || !strlen(getConfigValue('connection', 'server_query_port')) > 5) {
        echo "\n" . $lang->getLanguage('MNG_ERROR') . " " . $lang->getLanguage('NOT_VALID_PORT') . "\n";
        $errors++;
    }
    if (!is_numeric(getConfigValue('connection', 'server_id'))) {
        echo "\n" . $lang->getLanguage('MNG_ERROR') . " " . $lang->getLanguage('NOD_VALID_ID') . "\n";
        $errors++;
    }
    if ($errors > 0) {
        exit;
    }
    return true;
}
开发者ID:warningman,项目名称:TS-ISLAM,代码行数:23,代码来源:config_menager.php

示例9: getConfigValue

	Author URI: http://www.softsprings.de
	Version: 0.17
	Updated: 11/12/2007

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 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 General Public License for more details.
*/
require_once 'config_inc.php';
require_once getConfigValue('rootpath') . '/shared/flv4php/FLV.php';
// Path to flv.php / (flv4php)
class CustomFLV extends FLV
{
    /* Get Flv Thumb output's a thumb clip from offset point, locate a key frame and from there output's duration
     * if no key frame is found it use the first key frame.
     *
     * @param int $offset			Offset in ms
     * @param bool $usemetadata		Use metadata to attempt to find first keyframe
     *
     * @return int					fileposition of the next frame
     */
    function getFramePosition($offset = 0, $usemetadata = true)
    {
        session_write_close();
        $this->start();
开发者ID:BackupTheBerlios,项目名称:flvloopplayer-svn,代码行数:31,代码来源:customflv.php

示例10: array

  license@systemsmanager.net so we can mail you a copy immediately.
*/
/* Common Elements For Tabs - BEGIN */
$commonCancelButton = $jQuery->getPluginClass('button', array('id' => 'cancel_button', 'text' => 'Cancel'));
$commonSaveButton = $jQuery->getPluginClass('button', array('id' => 'save_button', 'type' => 'submit', 'text' => 'Save'));
/* Common Elements For Tabs - END */
/* Configuration Grid Setup - BEGIN */
if ($store_id == 1) {
    $filter = ' and (store_id = "' . (int) $store_id . '" or store_id = "0")';
} else {
    $filter = ' and store_id = "' . (int) $store_id . '"';
}
$configuration_query = smn_db_query("select configuration_id, configuration_title, configuration_value, configuration_group_id from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int) $gID . "'" . $filter . " order by sort_order");
$configGridData = array();
while ($configuration = smn_db_fetch_array($configuration_query)) {
    $configGridData[] = array('configuration_id' => $configuration['configuration_id'], 'configuration_group_id' => $configuration['configuration_group_id'], 'configuration_title' => $configuration['configuration_title'], 'configuration_value' => getConfigValue($configuration['configuration_group_id'], $configuration['configuration_id']));
}
$configGridEditButton = $jQuery->getPluginClass('button', array('id' => 'editButton', 'text' => 'Edit Selected'));
$configGridHelpButton = $jQuery->getPluginClass('button', array('id' => 'helpButton', 'text' => 'Help'));
$configGrid = $jQuery->getPluginClass('basicgrid', array('id' => 'configGrid', 'sortName' => 'configuration_title', 'paging' => true, 'page_size' => 20, 'columns' => array(array('id' => 'configuration_id', 'text' => 'cID', 'hidden' => true), array('id' => 'configuration_group_id', 'text' => 'gID', 'hidden' => true), array('id' => 'configuration_title', 'text' => TABLE_HEADING_CONFIGURATION_TITLE), array('id' => 'configuration_value', 'text' => TABLE_HEADING_CONFIGURATION_VALUE)), 'data' => $configGridData, 'buttons' => array($configGridEditButton, $configGridHelpButton)));
/* Configuration Grid Setup - END */
/* Configuration Grid Delete Window Setup - BEGIN */
$configEditWindow = $jQuery->getStandAloneClass('box_window', array('id' => 'div_configuration_edit', 'form' => '<form id="configEditForm" action="#" method="post">', 'show_header' => true, 'show_footer' => true, 'header_text' => 'Edit Configuration', 'buttons' => array($commonSaveButton, $commonCancelButton)));
/* Configuration Grid Delete Window Setup - END */
$jQuery->setHelpButton('helpButton');
?>
<script language="Javascript">
 $(document).ready(function (){
<?php 
echo $jQuery->getScriptOutput();
?>
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:configuration.php

示例11: time

# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Foobar; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# record start time, to stop execution if time is exceeded...
$startTime = time();
$yesterdayTimestamp = $startTime - 86400;
// calculate the base path of the program
$basePath = realpath(dirname(__FILE__) . '/../');
$DEBUG_MODE = 'cmd';
$DEBUG_LEVEL = '30';
// Common tasks for both web and cmd
require $basePath . '/inc/common.inc.php';
debug('Checking whether resolving is enabled...', 40, __FILE__, __LINE__);
$resolveClients = getConfigValue($link, 'resolveClients');
if ($resolveClients != 'enabled') {
    debug('Resolving is NOT enabled. Exiting...', 30, __FILE__, __LINE__);
    exit(0);
}
debug('Resolving is enabled.', 40, __FILE__, __LINE__);
error_reporting(E_ALL);
debug('Start timestamp is ' . $startTime, 40, __FILE__, __LINE__);
debug('Configuration:' . print_r($iniConfig, TRUE), 40, __FILE__, __LINE__);
$maxRunTime = 55;
$query = 'SELECT ';
$query .= 'id';
$query .= ',';
$query .= 'INET6_NTOA(UNHEX(ip)) AS ip';
$query .= ' FROM ';
$query .= ' hostnames ';
开发者ID:x86Labs,项目名称:mysar-ng,代码行数:31,代码来源:mysar-resolver.php

示例12: getConfigValue

<?php

require_once "SiteConfigVars.php";
$dbserver = getConfigValue("dbHost_w_menu");
$password = getConfigValue("dbPass_w_menu");
$username = "w-menu";
$dbname = "w_menu";
$conn = new PDO("mysql:host={$dbserver};dbname={$dbname}", $username, $password);
$conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare('SELECT * FROM allUsers;');
$stmt->execute();
$result = $stmt->fetchAll();
$i = 0;
$user_array = [];
foreach ($result as $row) {
    $i++;
    $temp_array = array('place' => ordinal($i), 'user' => $row['user'], 'total' => $row['total']);
    array_push($user_array, $temp_array);
}
$conn = null;
echo json_encode($user_array);
function ordinal($number)
{
    $ends = array('th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th');
    if ($number % 100 >= 11 && $number % 100 <= 13) {
        return $number . 'th';
    } else {
        return $number . $ends[$number % 10];
    }
}
开发者ID:rkalin,项目名称:SolsRecycling,代码行数:31,代码来源:allUsers.php

示例13: saveData

 public function saveData()
 {
     //  John Mikolich   December 30, 2010
     //  It appears the "timezone issue" can be fixed by
     //  preceeding each call to the PHP date function with
     //  a statement that sets the timezone like the one in the code block below.
     if ($this->data->id == 0) {
         date_default_timezone_set(getConfigValue("timeZone"));
         $this->data->timeAdded = date("Y-m-d H:i:s", time());
     }
     $this->data->timeChanged = date("Y-m-d H:i:s", time());
     $this->data->store();
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:13,代码来源:cbodb.functions.php

示例14: date

				 </label>
			</div>
          </div>
		  <div class="clearfix"></div>
          <!-- Text input-->
          <div class="form-group">
		  <div class="col-lg-5">
            <label for="textinput" class="control-label">Notification Time</label>
			</div>
			<div class="col-lg-1">:
		  </div>
			<div class="col-lg-6">
				 <label for="textinput" class="control-label">
				 <?php 
if ($preference[0]['notification_time'] != "") {
    echo date(getConfigValue('time_format'), strtotime($preference[0]['notification_time']));
}
?>
				 
				 
				 </label>
            </div>
          </div>
		  <div class="clearfix"></div>
          <!-- Text input-->
          <div class="form-group">
		  <div class="col-lg-5">
            <label for="textinput" class="control-label">Companies To Exclude</label>
		</div>
		<div class="col-lg-1">:
		  </div>
开发者ID:LunchMatcher,项目名称:lunchcode,代码行数:31,代码来源:viewPreference.php

示例15: saveNewBicycle

function saveNewBicycle($option)
{
    global $mainframe;
    $item = new CbodbItem();
    $postrow = JRequest::get('post');
    $memberID = JRequest::getVar('memberID');
    $db =& JFactory::getDBO();
    $query = "SELECT MAX(tag) FROM #__cbodb_items";
    $db->setQuery($query);
    $maxTag = $db->loadResult();
    if ($db->getErrorNum()) {
        echo $db->stderr();
        return false;
    }
    $item->tag = $maxTag + 1;
    $item->isBike = 1;
    $item->setAll($postrow);
    //$item->commissionUserID = JRequest::getVar('memberID');
    $item->saveData();
    // Added 2012-07-26 Lee Reis Post-Givecamp 2012
    $membertransaction = new CbodbTransaction();
    date_default_timezone_set(getConfigValue("timeZone"));
    $membertransaction->dateOpen = date("Y-m-d H:i:s", time());
    $membertransaction->dateClosed = date("Y-m-d H:i:s", time());
    $membertransaction->type = 7;
    $membertransaction->memberID = $memberID;
    $membertransaction->itemID = $maxTag + 1;
    $membertransaction->cash = $item->priceSale;
    $membertransaction->saveData();
    // End of Added 2012-07-26
    $mainframe->redirect('index.php?option=' . $option . '&task=shop&key=3b767559374f5132236f6e68256b2529#top', "Bicycle is saved with tag number {$item->tag}. Please write the number on the bike's tag!");
}
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:32,代码来源:cbodb.php


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