本文整理汇总了PHP中siteConfig函数的典型用法代码示例。如果您正苦于以下问题:PHP siteConfig函数的具体用法?PHP siteConfig怎么用?PHP siteConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了siteConfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadApps
function loadApps()
{
$db = new FQuery();
$db->connect();
$qr = null;
//set $qr to null value
$view = app_param('app');
if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] > 3) {
$view = '';
}
$sql = $db->select(FDBPrefix . 'apps', '*', "folder='app_{$view}'");
mysql_fetch_array($sql);
if (mysql_affected_rows() != 0) {
$sql2 = $db->select(FDBPrefix . 'menu', '*', "id=" . Page_ID);
$qrs = @mysql_fetch_array($sql2);
$theme = siteConfig('site_theme');
$tfile = "themes/{$theme}/apps/app_{$view}/index.php";
$file = "apps/app_{$view}/index.php";
if (file_exists($file)) {
if (_FEED_ != 'rss') {
echo '<div class="apps' . $qrs["class"] . $qrs["class"] . '">';
}
if (!empty($qrs['title']) and $qrs['show_title']) {
define("Apps_Title", "{$qrs['title']}");
}
if ($qrs['show_title']) {
if (!defined('Apps_Title')) {
define("Apps_Title", "{$qrs['name']}");
}
}
if (_FEED_ != 'rss') {
echo '<div class="main_apps">';
}
if (file_exists($tfile)) {
include $tfile;
} else {
if (file_exists($file)) {
include $file;
}
}
if (_FEED_ != 'rss') {
echo ' </div></div>';
}
}
} else {
if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] < 3) {
echo "<div style='border: 2px solid #e3e3e3; background: rgba(250,250,250,0.8);\tcolor :#aaa; \n\t\tpadding: 30px; text-align: center; margin: 5px 3px; font-weight: bold;'>Main Content</div>";
} else {
$lang = siteConfig('lang');
echo '<div class="apps' . $qr["class"] . '">' . _404_ . '</div><p>';
$file = "modules/mod_search/mod_search.php";
if (file_exists($file)) {
include $file;
}
echo '</p>';
loadModule('404');
}
}
}
示例2: redirect_www
function redirect_www()
{
if ($_SERVER['SERVER_ADDR'] != '127.0.0.1' and $_SERVER['SERVER_ADDR'] != '::1' and $_SERVER['SERVER_ADDR'] != $_SERVER['HTTP_HOST']) {
if (siteConfig('sef_www')) {
if (!strpos(getUrl(), "//www.")) {
$link = getUrl();
$link = str_replace("http://", "http://www.", $link);
redirect($link);
}
} else {
if (strpos(getUrl(), "//www.")) {
$link = getUrl();
$link = str_replace("http://www.", "http://", $link);
redirect($link);
}
}
}
}
示例3: define
<?php
/**
* @version 2.0
* @package Fiyo CMS
* @copyright Copyright (C) 2014 Fiyo CMS.
* @license GNU/GPL, see LICENSE.
**/
//set single flag file
define('_FINDEX_', 1);
//load query and function files
require_once '../../../system/jscore.php';
require_once '../../../../system/html.php';
//logical for image spot and auto fill
$name = siteConfig('site_theme');
$html = file_get_html("../../../../themes/{$name}/index.php");
$pos = str_replace("<?=loadModule('", "{", $html);
$pos = str_replace("loadModule('", "{", $html);
$pos = str_replace("loadModule(\"", "{", $pos);
$pos = str_replace("')", "}", $pos);
$pos = str_replace("\")", "}", $pos);
preg_match_all('/\\{(.*?)\\}/', $pos, $position);
if (!empty($position[1])) {
$no = 1;
foreach ($position[1] as $val) {
if ($no != 1) {
echo ",";
}
echo "{$val}";
$no++;
}
示例4: elseif
});
var btn = $("#save-file");
btn.show();
});
</script>
<textarea id="text" name="content" class="scrolling text-theme" style="width:100%; max-width:100%; height: 500px;" ><?php
echo $content;
?>
</textarea>
<?php
} elseif ($file == "jpg" || $file == "jpeg" || $file == "png" || $file == "gif" || $file == "tif" || $file == "ico") {
$furl = "../../{$url}";
echo "<div class='warp-img'><img src='" . siteConfig('site_url') . "{$furl}' style='max-width: 90%'/ ></div>";
?>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
var btn = $("#save-file");
btn.hide();
});
</script>
<?php
} else {
alert('error', File_not_support);
?>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
var btn = $("#save-file");
示例5: loadModule
<div class="socials">
<div class="socials-inner">
<?php
loadModule('breadchumb');
?>
<div class="cl"></div>
</div>
</div>
<?php
}
?>
<div id="footer">
<div class="footer-bottom">
<p class="copy">© Copyright <?php
echo siteConfig('site_name') . " " . date("Y");
?>
<br/><strong>My Engine is <a href="http://www.fiyo.org" target="_blank">Fiyo CMS</a></strong></p>
<div class="cl"></div>
</div>
</div>
</div>
<!-- end of container -->
</div>
<!-- end of shell -->
</div>
<!-- end of wrapper -->
</body>
</html>
示例6: siteConfig
</div> <div class="panel box">
<header>
<h5>Update</h5>
</header>
<div>
<table>
<tr>
<td class="row-title"><span class="tips" title="<?php
echo Fiyo_Version_tip;
?>
"><?php
echo Fiyo_Version;
?>
<i class="global-version"></td>
<td><b class="version-val"><?php
echo siteConfig('version');
?>
</b> <a type="button" value="Check Update" class="btn btn-metis-2 updater" href="#update">Check Update</a></td>
</tr>
</table>
</div>
</div>
</form>
<div class="modal fade" id="modal-update" role="dialog" style="display:none">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header"><h4 class="modal-title">Sistem Update</h4>
</div>
<div class="modal-body">
<div class="update-info-update"><?php
示例7: loadModule
function loadModule($position)
{
if (isset($_GET['theme']) and $_GET['theme'] == 'module' and $_SESSION['USER_LEVEL'] < 3) {
echo "<div class='theme-module'>{$position}</div>";
} else {
$db = new FQuery();
$db->connect();
$qrs = $db->select(FDBPrefix . 'module', '*', "status=1 AND position='{$position}'" . Level_Access, 'short ASC');
while ($qr = mysql_fetch_array($qrs)) {
if (!empty($qr['page'])) {
$page = explode(",", $qr['page']);
foreach ($page as $val) {
if (Page_ID == $val) {
$qr['show_title'] == 1 ? $title = "<h3>{$qr['name']}</h3>" : ($title = "");
echo "<div class=\"modules {$qr['class']}\">{$title}<div class=\"mod-inner\" style=\"{$qr['style']}\">";
$modId = $qr['id'];
$modParam = $qr['parameter'];
$modFolder = $qr['folder'];
$theme = siteConfig('site_theme');
$tfile = "themes/{$theme}/modules/{$qr['folder']}/{$qr['folder']}.php";
$file = "modules/{$qr['folder']}/{$qr['folder']}.php";
if (file_exists($tfile)) {
include $tfile;
} else {
if (file_exists($file)) {
include $file;
} else {
echo "Module Error : <b>{$qr['folder']}</b> is not installed!";
}
}
echo "</div></div>";
}
}
} else {
if ($qr['page'] == Page_ID and FUrl == $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) {
if ($qr['show_title'] == 1) {
$title = "<h3>{$qr['name']}</h3>";
} else {
$title = "";
}
echo "<div class=\"modules {$qr['class']}\">{$title}<div class=\"mod-inner\" style=\"{$qr['style']}\">";
$tfile = "themes/{$theme}/modules/{$qr['folder']}/{$qr['folder']}.php";
$file = "modules/{$qr['folder']}/{$qr['folder']}.php";
$modId = $qr['id'];
$modFolder = $qr['folder'];
$modParam = $qr['parameter'];
if (file_exists($tfile)) {
include $tfile;
} else {
if (file_exists($file)) {
include $file;
} else {
echo "Module Error : <b>{$qr['folder']}</b> is not installed!";
}
}
echo "</div></div>";
}
}
}
}
}
示例8: define
if (TitleType == 2) {
define('FTitle', SiteTitle . TitleDiv . PageTitle);
} else {
if (TitleType == 3) {
define('FTitle', PageTitle);
} else {
if (TitleType == 0) {
define('FTitle', SiteTitle);
}
}
}
}
/********************************************/
/* Define Type & Site Title */
/********************************************/
$themes = siteConfig('site_theme');
define("FThemeFolder", $themes);
define("FThemePath", FUrl . "themes/" . FThemeFolder . "");
define("FThemes", "themes/" . FThemeFolder . "/index.php");
/********************************************/
/* Load default theme */
/********************************************/
if (!file_exists(FThemes)) {
echo alert("error", "Theme is not found!", true, true);
die;
} else {
if (_FEED_ == 'rss' or _FINDEX_ == 'blank') {
loadApps();
} else {
require_once FThemes;
}
示例9: defined
<?php
/**
* @version 2.0
* @package Fiyo CMS
* @copyright Copyright (C) 2012 Fiyo CMS.
* @license GNU/GPL, see LICENSE.txt
**/
defined('_FINDEX_') or die('Access Denied');
/*
* Load core files
*/
require_once 'config.php';
require_once 'system/query.php';
require_once 'system/function.php';
//check table setting
$ress = mysql_query("SHOW TABLES LIKE '" . FDBPrefix . "setting'");
mysql_num_rows($ress) or die(alert("error", "Table setting is not found. Please check <b>DBPrefix</b> on file config.php!", true, true));
//set default timezone
$time = siteConfig('timezone');
if ($time) {
date_default_timezone_set(siteConfig('timezone'));
}
/*
* Load extentions
*/
loadExtention();
示例10: strtolower
}
if (is_dir("themes/{$folder}")) {
$no++;
$spot_file = "themes/{$folder}/theme_details.php";
if (file_exists($spot_file)) {
include "{$spot_file}";
} else {
$theme_version = "Error :: File <b>theme_details.php</b> not found in <b>{$folder}</b> ";
$theme_author = "undefined";
$theme_date = "undefined";
$theme_name = $folder;
$theme_name2 = strtolower($folder);
}
$theme_name2 = strtolower($theme_name);
$active = 'enable';
$c = siteConfig('admin_theme');
$ac = Activate;
if ($c == $folder) {
$active = 'active';
$ac = Active;
}
$isi = "\n\t\t<div class='col-theme {$active}' data-name='{$theme_name}'>\n\t\t\t<div class='theme-box'>\n\t\t\t\t<div class='theme-image'>\n\t\t\t\t\t<a hhref='#'>\t\t\t\t\t\t\t\t\n\t\t\t\t\t<img src='themes/{$folder}/{$theme_image}' >\n\t\t\t\t\t<!--div> <span> Details </span></div -->\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<div class='theme-title'>\t\t\t\n\t\t\t\t\t{$theme_name}\t\t\t\t\t\t\t\n\t\t\t\t\t<input type=\"button\" name=\"folder_themes\" data-name=\"{$folder}\" value=\"{$ac}\" class=\"theme-btn {$active} btn btn-success right\">\n\t\t\t\t</div>\n\t\t\t\t<span class='invisible'>{$theme_name2}</span>\n\t\t\t</div>\n\t\t</div>";
if ($c == $folder) {
$act = $isi;
} else {
$thm .= $isi;
}
}
}
echo $act . $thm;
closedir($dir);
示例11: send
function send($name, $email, $post, $send, $to)
{
if (isset($send)) {
if (empty($name) or empty($email) or empty($post)) {
alert("error", contact_Error);
} else {
if (!preg_match("/^.+@.+\\..+\$/", $email)) {
alert("error", contact_Error2);
} else {
if ($_POST['captcha'] == $_SESSION['captcha']) {
// multiple recipients
$site = siteConfig('site_name');
$to = "{$to}";
$subject = "Email via {$site}";
$message = "{$post}<p> </p><p> </p><p> </p><p><small>Sent by <b> {$site}</b></small></p>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "To: <{$to}>\r\n";
$headers .= "From: {$name} <{$email}>" . "\r\n";
$mail = @mail($to, $subject, $message, $headers);
alert("info", contact_Info);
$this->sent = true;
} else {
alert("error", contact_Error3);
}
}
}
}
}
示例12: defined
<?php
/**
* @version 2.0
* @package Fiyo CMS
* @copyright Copyright (C) 2012 Fiyo CMS.
* @license GNU/GPL, see LICENSE.txt
**/
defined('_FINDEX_') or die('Access Denied');
if (siteConfig('site_status') or !empty($_SESSION['USER_ID'])) {
require_once 'user.php';
require_once 'site.php';
require_once 'html.php';
require_once 'plugins.php';
require_once 'apps.php';
require_once 'modules.php';
require_once 'themes.php';
} else {
define('_OFFSITE_', 1);
require_once 'site.php';
require_once 'themes-off.php';
}
示例13: siteConfig
$webmail = siteConfig('site_mail');
$domain = substr(FUrl(), 0, strpos(FUrl(), "/"));
if (empty($webmail)) {
}
$webmail = "noreply@{$domain}";
if (siteConfig('lang') == 'id') {
$subject = 'Konfirmasi Reset Password';
$message = "<font color='#333'>\n\t\t\t\t<p>Hi, {$qr['name']}</p> \n\t\t\t\t<p>Anda telah meminta kami untuk mengirimkan password baru.<br>Konfirmasi pesan ini dengan klik link konfirmasi berikut.</p>\n\t\t\t\t<p><a href='" . FUrl . "?{$reminder}' {$btnClass}> Konfirmasi Reset </a></p>\n\t\t\t\t<p>Pesan ini akan valid dalam 1-2 hari hingga Anda melakukan konfirmasi untuk reset password.<br>Jika Anda ingin membatalkan proses ini, abaikan saja email ini hingga kode kadaluarsa dalam 1-2 hari.</p>\n\t\t\t\t<p>Terimakasih.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><b>" . siteConfig('site_title') . "</b><br>" . FUrl . "</p></font>";
} else {
$subject = 'Password Reset Confirmation';
$message = "<font color='#333'>\n\t\t\t\t<p>Hi, {$qr['name']}</p> \n\t\t\t\t<p>You have asked us to send you a new password.<br>Confirm this message by click the following link.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><a href='" . FUrl . "?{$reminder}' {$btnClass}> Reset Confirmation </a></p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p>This message will be valid within 1-2 days so you do confirm to reset the password.<br>If you want to cancel this process, ignore this letter to Expired code in 1-2 days.</p>\n\t\t\t\t<p>Thankyou.</p>\n\t\t\t\t<p> </p>\n\t\t\t\t<p><b>" . siteConfig('site_title') . "</b><br>" . FUrl . "</p></font>";
}
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= "To: {$qr['name']} <{$_POST['email']}>" . "\r\n";
$headers .= "From: " . siteConfig('site_name') . "<{$webmail}>" . "\r\n";
$headers .= "cc :" . "\r\n";
$headers .= "Bcc :" . "\r\n";
// Mail it
$mail = @mail($to, $subject, $message, $headers);
if ($mail) {
echo "{ \"status\":\"1\" , \"alert\":\"" . alert('success', Password_Reset_Sent) . "\"}";
} else {
echo "{ \"status\":\"0\" , \"alert\":\"" . alert('error', "System error : function mail() can not executed.") . "\"}";
}
} else {
echo "{ \"status\":\"0\" , \"alert\":\"" . alert('error', Email_Not_Registered) . "\"}";
}
}
示例14: siteConfig
</header>
<div id="time" class="panel-collapse collapse">
<table>
<tr>
<td class="row-title"><span class="tips" title="<?php
echo Language_AdminPanel_tip;
?>
"><?php
echo Language;
?>
</td>
<td>
<select name="lang" class="lang-select" style="width: 500px">
<?php
include 'controller/countrycode.php';
$lang = siteConfig('lang');
$dir = opendir("system/lang");
$no = 1;
while ($folder = readdir($dir)) {
if ($folder == "." or $folder == "..") {
continue;
}
if (preg_match("/[\\.]+php/i", $folder)) {
$folder = str_replace(".php", "", $folder);
if ($folder == $lang) {
$selected_lang = 'selected';
} else {
$selected_lang = '';
}
echo "<option value=\"{$folder}\" {$selected_lang}>{$code[$folder]}\n\t\t\t\t\t\t\t\t\t</option>";
}
示例15: mkdir
}
}
} else {
echo 0;
}
if (isset($_POST['patching']) and $_POST['patching'] != false and $site_version != $latest_version and $xml) {
$plink = $p['link'];
$root = "../../..";
$newfile = "{$root}/tmp/patch_{$p['number']}.zip";
if (!file_exists("{$root}/tmp")) {
mkdir("{$root}/tmp");
}
if (copy($plink, $newfile)) {
if (extractZip($newfile, "{$root}/tmp")) {
$dapur = siteConfig('backend_folder');
if (siteConfig('backend_folder') != 'dapur') {
copy_directory("{$root}/dapur", "{$root}/{$dapur}", true);
}
$db = new FQuery();
$db->connect();
$db->update(FDBPrefix . 'setting', array('value' => "{$p['number']}"), "name='version'");
$sup = $p['number'];
@unlink("{$root}/installer.php");
?>
<script>
$(document).ready(function() {
$(".update-info").LoadingDot({
"speed": 500,
"maxDots": 4,
"word": " <?php
echo Installing_patch . $p['number'];