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


PHP Flux::config方法代码示例

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


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

示例1: flux_get_default_bmp_data

function flux_get_default_bmp_data()
{
    $filename = sprintf('%s/emblem/%s', FLUX_DATA_DIR, Flux::config('MissingEmblemBMP'));
    if (file_exists($filename)) {
        return file_get_contents($filename);
    }
}
开发者ID:rahuldev345,项目名称:fluxcp,代码行数:7,代码来源:emblem.php

示例2: getCashPoints

 function getCashPoints($account_id, $server)
 {
     $cp_tbl = Flux::config('FluxTables.cashpoints');
     $sql = "SELECT value FROM {$cp_tbl} WHERE account_id = ? AND key = '#CASHPOINTS'";
     $sth = $server->connection->getStatement($sql);
     $sth->execute(array((int) $account_id));
     return $sth->rowCount() ? (int) $sth->fetch()->value : 0;
 }
开发者ID:Dezeter,项目名称:FluxCP_Addons-VoteForPoints,代码行数:8,代码来源:function.php

示例3: isUp

 /**
  * Checks whether the server is up and running (accepting connections).
  * Will return true/false based on the server status.
  *
  * @return bool Returns true if server is running, false if not.
  * @access public
  */
 public function isUp()
 {
     $addr = $this->config->getAddress();
     $port = $this->config->getPort();
     $sock = @fsockopen($addr, $port, $errno, $errstr, (int) Flux::config('ServerStatusTimeout'));
     if (is_resource($sock)) {
         fclose($sock);
         return true;
     } else {
         return false;
     }
 }
开发者ID:Nevercome,项目名称:FluxCP,代码行数:19,代码来源:BaseServer.php

示例4: execute

 public function execute(array $inputParameters = array())
 {
     $res = $this->stmt->execute($inputParameters);
     Flux::$numberOfQueries++;
     if ((int) $this->stmt->errorCode()) {
         $info = $this->stmt->errorInfo();
         self::$errorLog->puts('[SQLSTATE=%s] Err %s: %s', $info[0], $info[1], $info[2]);
         if (Flux::config('DebugMode')) {
             $message = sprintf('MySQL error (SQLSTATE: %s, ERROR: %s): %s', $info[0], $info[1], $info[2]);
             throw new Flux_Error($message);
         }
     }
     return $res;
 }
开发者ID:Nevercome,项目名称:FluxCP,代码行数:14,代码来源:Statement.php

示例5: __construct

 public function __construct($name, $addonDir = null)
 {
     $this->name = $name;
     $this->addonDir = is_null($addonDir) ? FLUX_ADDON_DIR . "/{$name}" : $addonDir;
     $this->configDir = "{$this->addonDir}/config";
     $this->moduleDir = "{$this->addonDir}/modules";
     $this->themeDir = "{$this->addonDir}/themes/" . Flux::config('ThemeName');
     $files = array('addonConfig' => "{$this->configDir}/addon.php", 'accessConfig' => "{$this->configDir}/access.php");
     foreach ($files as $configName => $filename) {
         if (file_exists($filename)) {
             $this->{$configName} = Flux::parseConfigFile($filename);
         }
         if (!$this->{$configName} instanceof Flux_Config) {
             $tempArr = array();
             $this->{$configName} = new Flux_Config($tempArr);
         }
     }
     // Use new language system for messages (also supports addons).
     $this->messagesConfig = Flux::parseLanguageConfigFile($name);
 }
开发者ID:rahuldev345,项目名称:fluxcp,代码行数:20,代码来源:Addon.php

示例6: __construct

 public function __construct()
 {
     if (!self::$errLog) {
         self::$errLog = new Flux_LogFile(FLUX_DATA_DIR . '/logs/errors/mail/' . date('Ymd') . '.log');
     }
     if (!self::$log) {
         self::$log = new Flux_LogFile(FLUX_DATA_DIR . '/logs/mail/' . date('Ymd') . '.log');
     }
     $this->pm = $pm = new PHPMailer();
     $this->errLog = self::$errLog;
     $this->log = self::$log;
     if (Flux::config('MailerUseSMTP')) {
         $pm->IsSMTP();
         if (is_array($hosts = Flux::config('MailerSMTPHosts'))) {
             $hosts = implode(';', $hosts);
         }
         $pm->Host = $hosts;
         if ($user = Flux::config('MailerSMTPUsername')) {
             $pm->SMTPAuth = true;
             if (Flux::config('MailerSMTPUseTLS')) {
                 $pm->SMTPSecure = 'tls';
             }
             if (Flux::config('MailerSMTPUseSSL')) {
                 $pm->SMTPSecure = 'ssl';
             }
             if ($port = Flux::config('MailerSMTPPort')) {
                 $pm->Port = (int) $port;
             }
             $pm->Username = $user;
             if ($pass = Flux::config('MailerSMTPPassword')) {
                 $pm->Password = $pass;
             }
         }
     }
     // From address.
     $pm->From = Flux::config('MailerFromAddress');
     $pm->FromName = Flux::config('MailerFromName');
     // Always use HTML.
     $pm->IsHTML(true);
 }
开发者ID:Nevercome,项目名称:FluxCP,代码行数:40,代码来源:Mailer.php

示例7:

<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$this->loginRequired();
$vfp_sites = Flux::config('FluxTables.vfp_sites');
$vfp_logs = Flux::config('FluxTables.vfp_logs');
$errorMessage = NULL;
// delete voting site
if (isset($_POST['id'])) {
    $id = (int) $params->get('id');
    $sql = "DELETE FROM {$server->loginDatabase}.{$vfp_sites} WHERE id = ?";
    $sth = $server->connection->getStatement($sql);
    $sth->execute(array($id));
    if (!$sth->rowCount()) {
        $errorMessage = Flux::message("VoteSiteDeleteFailed");
    }
    $sql = "DELETE FROM {$server->loginDatabase}.{$vfp_logs} WHERE sites_id = ?";
    $sth = $server->connection->getStatement($sql);
    $sth->execute(array($id));
    if (is_null($errorMessage)) {
        $successMessage = Flux::message("VoteSiteDeleteSuccess");
    }
}
// fetch all voting sites
$sql = "SELECT * FROM {$server->loginDatabase}.{$vfp_sites}";
$sth = $server->connection->getStatement($sql);
$sth->execute();
$votesites_res = $sth->fetchAll();
开发者ID:Dezeter,项目名称:FluxCP_Addons-VoteForPoints,代码行数:30,代码来源:list.php

示例8: htmlspecialchars

    ?>
<p class="red"><?php 
    echo htmlspecialchars($errorMessage);
    ?>
</p>
<?php 
}
?>

<p><?php 
echo htmlspecialchars(Flux::message('EmailChangeInfo'));
?>
</p>

<?php 
if (Flux::config('RequireChangeConfirm')) {
    ?>
<p><?php 
    echo htmlspecialchars(Flux::message('EmailChangeInfo2'));
    ?>
</p>
<?php 
}
?>

<form action="<?php 
echo $this->urlWithQs;
?>
" method="post" class="generic-form">
	<table class="generic-form-table">
		<tr>
开发者ID:mleo1,项目名称:rAFluxCP,代码行数:31,代码来源:changemail.php

示例9: array

			</select>.
			<?php 
    }
    ?>
			<form action="<?php 
    echo $this->urlWithQs;
    ?>
" method="post" name="preferred_server_form" style="display: none">
				<input type="hidden" name="preferred_server" value="" />
			</form>
			</span>
		</td>
		<td bgcolor="#e1eaf3"></td>
	</tr>
	<?php 
    if (!empty($adminMenuItems) && Flux::config('AdminMenuNewStyle')) {
        ?>
	<?php 
        $mItems = array();
        foreach ($adminMenuItems as $menuItem) {
            $mItems[] = sprintf('<a href="%s">%s</a>', $menuItem['url'], $menuItem['name']);
        }
        ?>
	<tr>
		<td bgcolor="#e1eaf3"></td>
		<td bgcolor="#e1eaf3" valign="middle" class="loginbox-admin-menu">
			<strong>Admin</strong>: <?php 
        echo implode(' • ', $mItems);
        ?>
		</td>
		<td bgcolor="#e1eaf3"></td>
开发者ID:rborgesds,项目名称:FluxCP,代码行数:31,代码来源:loginbox.php

示例10: foreach

$tblcat = Flux::config('FluxTables.ServiceDeskCatTable');
$rep = $server->connection->getStatement("SELECT * FROM {$server->loginDatabase}.{$tbl} WHERE status != 'Closed' ORDER BY ticket_id DESC");
$rep->execute();
$ticketlist = $rep->fetchAll();
$rowoutput = NULL;
foreach ($ticketlist as $trow) {
    $catsql = $server->connection->getStatement("SELECT * FROM {$server->loginDatabase}.{$tblcat} WHERE cat_id = ?");
    $catsql->execute(array($trow->category));
    $catlist = $catsql->fetch();
    $rowoutput .= '<tr >
				<td><a href="' . $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) . '" >' . $trow->ticket_id . '</a></td>
				<td>' . $trow->account_id . '</td>
				<td><a href="' . $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) . '" >' . $trow->subject . '</a></td>
				<td><a href="' . $this->url('servicedesk', 'staffview', array('ticketid' => $trow->ticket_id)) . '" >
					' . $catlist->name . '</a></td>
				<td>
					<font color="' . Flux::config('Font' . $trow->status . 'Colour') . '"><strong>' . $trow->status . '</strong></font>
				</td>
				<td width="50">';
    if ($trow->lastreply == '0') {
        $rowoutput .= '<i>None</i>';
    } else {
        $rowoutput .= $trow->lastreply;
    }
    $rowoutput .= '</td>
				<td>
					' . Flux::message('SDGroup' . $trow->team) . '
				</td>
				<td>' . date(Flux::config('DateFormat'), strtotime($trow->timestamp)) . '</td>
			</tr>';
}
开发者ID:mleo1,项目名称:rAFluxCP,代码行数:31,代码来源:staffindex.php

示例11: trim

<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$pages = Flux::config('FluxTables.CMSPagesTable');
$path = trim($params->get('path'));
$sql = "SELECT title, body, modified FROM {$server->loginDatabase}.{$pages} WHERE path = ?";
$sth = $server->connection->getStatement($sql);
$sth->execute(array($path));
$pages = $sth->fetchAll();
if ($pages) {
    foreach ($pages as $prow) {
        $title = $prow->title;
        $body = $prow->body;
        $modified = $prow->modified;
    }
} else {
    $this->redirect($this->url('main', 'index'));
}
开发者ID:mleo1,项目名称:rAFluxCP,代码行数:20,代码来源:content.php

示例12: sprintf

<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$this->loginRequired();
$title = Flux::message('AccountEditTitle');
$accountID = $params->get('id');
$creditsTable = Flux::config('FluxTables.CreditsTable');
$creditColumns = 'credits.balance, credits.last_donation_date, credits.last_donation_amount';
$sql = "SELECT login.*, {$creditColumns} FROM {$server->loginDatabase}.login ";
$sql .= "LEFT OUTER JOIN {$creditsTable} AS credits ON login.account_id = credits.account_id ";
$sql .= "WHERE login.sex != 'S' AND login.group_id >= 0 AND login.account_id = ? LIMIT 1";
$sth = $server->connection->getStatement($sql);
$sth->execute(array($accountID));
// Account object.
$account = $sth->fetch();
$isMine = false;
if ($account) {
    if ($account->group_id > $session->account->group_id && !$auth->allowedToEditHigherPower) {
        $this->deny();
    }
    $isMine = $account->account_id == $session->account->account_id;
    if ($isMine) {
        $title = Flux::message('AccountEditTitle2');
    } else {
        $title = sprintf(Flux::message('AccountEditTitle3'), $account->userid);
    }
    if (count($_POST)) {
        $groups = AccountLevel::getArray();
        $email = trim($params->get('email'));
开发者ID:Nevercome,项目名称:FluxCP,代码行数:31,代码来源:edit.php

示例13: array

<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$title = 'Map Statistics';
$bind = array();
$sql = "SELECT last_map AS map_name, COUNT(last_map) AS player_count FROM {$server->charMapDatabase}.`char` ";
if (($hideLevel = (int) Flux::config('HideFromMapStats')) > 0 && !$auth->allowedToSeeHiddenMapStats) {
    $sql .= "LEFT JOIN {$server->loginDatabase}.login ON `char`.account_id = login.account_id ";
}
$sql .= "WHERE online > 0 ";
if ($hideLevel > 0 && !$auth->allowedToSeeHiddenMapStats) {
    $sql .= "AND login.level < ? ";
    $bind[] = $hideLevel;
}
$sql .= " GROUP BY map_name, online HAVING player_count > 0 ORDER BY map_name ASC";
$sth = $server->connection->getStatement($sql);
$sth->execute($bind);
$maps = $sth->fetchAll();
开发者ID:rahuldev345,项目名称:fluxcp,代码行数:20,代码来源:mapstats.php

示例14: array

<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
$title = 'Email Changes';
$changeTable = Flux::config('FluxTables.ChangeEmailTable');
$sqlpartial = "LEFT JOIN {$server->loginDatabase}.login ON login.account_id = log.account_id ";
$sqlpartial .= 'WHERE 1=1 ';
$bind = array();
// Email change searching.
$requestAfter = $params->get('request_after_date');
$requestBefore = $params->get('request_before_date');
$changeAfter = $params->get('change_after_date');
$changeBefore = $params->get('change_before_date');
$accountID = trim($params->get('account_id'));
$username = trim($params->get('username'));
$oldEmail = trim($params->get('old_email'));
$newEmail = trim($params->get('new_email'));
$requestIP = trim($params->get('request_ip'));
$changeIP = trim($params->get('change_ip'));
if ($requestAfter) {
    $sqlpartial .= 'AND request_date >= ? ';
    $bind[] = $requestAfter;
}
if ($requestBefore) {
    $sqlpartial .= 'AND request_date <= ? ';
    $bind[] = $requestBefore;
}
if ($accountID) {
    $sqlpartial .= 'AND log.account_id = ? ';
开发者ID:Nevercome,项目名称:FluxCP,代码行数:31,代码来源:changemail.php

示例15: array

<?php

if (!defined('FLUX_ROOT')) {
    exit;
}
//$this->loginRequired();
$title = 'Viewing Item';
require_once 'Flux/TemporaryTable.php';
if ($server->isRenewal) {
    $fromTables = array("{$server->charMapDatabase}.item_db_re", "{$server->charMapDatabase}.item_db2_re");
} else {
    $fromTables = array("{$server->charMapDatabase}.item_db", "{$server->charMapDatabase}.item_db2");
}
$tableName = "{$server->charMapDatabase}.items";
$tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables);
$shopTable = Flux::config('FluxTables.ItemShopTable');
$itemID = $params->get('id');
/* ITEM SHOP */
try {
    $sql = 'select * from shops_sells s left join npcs n on s.id_shop = n.id where s.item = ?';
    $sth = $server->connection->getStatement($sql);
    $sth->execute(array($itemID));
    if ((int) $sth->stmt->errorCode()) {
        throw new Flux_Error('db not found');
    }
    $itemShop = $sth->fetchAll();
} catch (Exception $e) {
    $itemShop = false;
}
/* ITEM SHOP */
$col = 'items.id AS item_id, name_english AS identifier, ';
开发者ID:mleo1,项目名称:rAFluxCP,代码行数:31,代码来源:view.php


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