<?php
/* $Id: common.lib.php,v 2.128.2.3 2005/05/03 22:52:51 lem9 Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:
/**
* Misc stuff and functions used by almost all the scripts.
* Among other things, it contains the advanced authentification work.
*/
/**
* Order of sections for common.lib.php:
*
* some functions need the constants of libraries/defines.lib.php
* and defines_mysql.lib.php
*
* the PMA_setFontSizes() function must be before the call to the
* libraries/auth/cookie.auth.lib.php library
*
* the include of libraries/defines_mysql.lib.php must be after the connection
* to db to get the MySql version
*
* the PMA_sqlAddslashes() function must be before the connection to db
*
* the authentication libraries must be before the connection to db but
* after the PMA_isInto() function
*
* the PMA_mysqlDie() function must be before the connection to db but
* after mysql extension has been loaded
*
* the PMA_mysqlDie() function needs the PMA_format_sql() Function
*
* ... so the required order is:
*
* - parsing of the configuration file
* - load of the libraries/defines.lib.php library
* - load of mysql extension (if necessary)
* - definition of PMA_sqlAddslashes()
* - definition of PMA_format_sql()
* - definition of PMA_mysqlDie()
* - definition of PMA_isInto()
* - definition of PMA_setFontSizes()
* - loading of an authentication library
* - db connection
* - authentication work
* - load of the libraries/defines_mysql.lib.php library to get the MySQL
* release number
* - other functions, respecting dependencies
*/
/**
* Minimum inclusion? (i.e. for the stylesheet builder)
*/
if (!isset($is_minimum_common)) {
$is_minimum_common = FALSE;
}
/**
* Avoids undefined variables
*/
if (!isset($use_backquotes)) {
$use_backquotes = 0;
}
if (!isset($pos)) {
$pos = 0;
}
/**
* 2004-06-30 rabus: Ensure, that $cfg variables are not set somwhere else
* before including the config file.
*/
unset($cfg);
/**
* Detects the config file we want to load
*/
if (file_exists('./config.inc.developer.php')) {
$cfgfile_to_load = './config.inc.developer.php';
} else {
$cfgfile_to_load = './config.inc.php';
}
/**
* Parses the configuration file and gets some constants used to define
* versions of phpMyAdmin/php/mysql...
*/
//$old_error_reporting = error_reporting(0);
include_once($cfgfile_to_load);
// Include failed
if (!isset($cfgServers) && !isset($cfg['Servers'])) {
// Creates fake settings
$cfg = array('DefaultLang' => 'en-iso-8859-1',
'AllowAnywhereRecoding' => FALSE);
// Loads the language file
require_once('./libraries/select_lang.lib.php');
// Sends the Content-Type header
header('Content-Type: text/html; charset=' . $charset);
// Displays the error message
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2];?>" lang="<?php echo $available_languages[$lang][2];?>" dir="<?php echo $text_dir;?>">
<head>
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset;?>" />
<style type="text/css">
<!--
body {font-family: sans-serif; font-size: small; color: #000000; background-color: #F5F5F5}
h1 {font-family: sans-serif; font-size: large; font-weight: bold}
//-->
</style>
</head>
<body bgcolor="#ffffff">
<h1>phpMyAdmin - <?php echo $strError;?></h1>
<p>
<?php echo $strConfigFileError;?><br /><br />
<a href="config.inc.php" target="_blank">config.inc.php</a>
</p>
</body>
</html>
<?php
exit();
}
//error_reporting($old_error_reporting);
//unset($old_error_reporting;)
unset($cfgfile_to_load);
/**
* Includes compatibility code for older config.inc.php revisions
* if necessary
*/
if (isset($cfg['FileRevision'])) {
// converting revision string into an array
// e.g. "Revision: 2.0" becomes array(2, 0).
$cfg['FileRevision'] = str_replace('$' . 'Revision: ', '', $cfg['FileRevision']);
$cfg['FileRevision'] = str_replace(' $', '', $cfg['FileRevision']);
$cfg['FileRevision'] = explode('.', $cfg['FileRevision']);
} else {
$cfg['FileRevision'] = array(1, 1);
}
if ($cfg['FileRevision'][0] < 2 || ($cfg['FileRevision'][0] == 2 && $cfg['FileRevision'][1] < 52)) {
require_once('./libraries/config_import.lib.php');
}
/**
* Includes the language file if it hasn't been included yet
*/
require_once('./libraries/select_lang.lib.php');
/**
* Gets constants that defines the PHP version number.
* This include must be located physically before any code that needs to
* reference the constants, else PHP 3.0.16 won't be happy.
*/
require_once('./libraries/defines.lib.php');
/**
* Sanitizes $message, taking into account our special codes
* for formatting
*
* @param string the message
*
* @return string the sanitized message
*
* @access public
*/
function PMA_sanitize($message)
{
$replace_pairs = array(
'<' => '<',
'>' => '>',
'[i]' => '<i>',
'[/i]' => '</i>',
'[b]' => '<b>',
'[br]' => '<br />',
'[/b]' => '</b>',
);
return strtr($message, $replace_pairs);
}
// XSS
if (isset($convcharset)) {
$convcharset = PMA_sanitize($convcharset);
}
if ($is_minimum_common == FALSE) {
/**
* Define $is_upload
*/
$is_upload = TRUE;
if (strtolower(@ini_get('file_uploads')) == 'off'
|| @ini_get('file_uploads') == 0) {
$is_upload = FALSE;
}
/**
* Maximum upload size as limited by PHP
* Used with permission from Moodle (http://moodle.org) by Martin Dougiamas
*
* this section generates $max_upload_size in bytes
*/
function get_real_size($size=0) {
/// Converts numbers like 10M into bytes
if (!$size) {
return 0;
}
$scan['MB'] = 1048576;
$scan['Mb'] = 1048576;
$scan['M'] = 1048576;
$scan['m'] = 1048576;
$scan['KB'] = 1024;
$scan['Kb'] = 1024;
$scan['K'] = 1024;
$scan['k'] = 1024;
while (list($key) = each($scan)) {
if ((strlen($size)>strlen($key))&&(substr($size, strlen($size) - strlen($key))==$key)) {
$size = substr($size, 0, strlen($size) - strlen($key)) * $scan[$key];
break;
}
}
return $size;
} // end function
if (!$filesize = ini_get('upload_max_filesize')) {
$filesize = "5M";
}
$max_upload_size = get_real_size($filesize);
if ($postsize = ini_get('post_max_size')) {
$postsize = get_real_size($postsize);
if ($postsize < $max_upload_size) {
$max_upload_size = $postsize;
}
}
unset($filesize);
unset($postsize);
/**
* other functions for maximum upload work
*/
/**
* Displays the maximum size for an upload
*
* @param integer the size
*
* @return string the message
*
* @access public
*/
function PMA_displayMaximumUploadSize($max_upload_size) {
list($max_size, $max_unit) = PMA_formatByteDown($max_upload_size);
return '(' . sprintf($GLOBALS['strMaximumSize'], $max_size, $max_unit) . ')';
}
/**
* Generates a hidden field which should indicate to the browser
* the maximum size for upload
*
* @param integer the size
*
* @return string the INPUT field
*
* @access public
*/
function PMA_generateHiddenMaxFileSize($max_size){
return '<input type="h
没有合适的资源?快使用搜索试试~ 我知道了~
麦进斗外贸商城网店制作源码下载
共929个文件
php:357个
jpg:188个
png:161个
需积分: 10 14 下载量 161 浏览量
2016-11-09
15:09:29
上传
评论
收藏 27.7MB RAR 举报
温馨提示
php语言。适合跨境电商模式,集成多种语言,多支付接口,拥有产品管理,购物车系统。
资源推荐
资源详情
资源评论
收起资源包目录
麦进斗外贸商城网店制作源码下载 (929个子文件)
_htaccess 438B
lib.css 45KB
editor.css 31KB
style.css 16KB
style.css 14KB
dialog.css 13KB
global.css 5KB
yui.css 3KB
docs.css 3KB
templates.css 1KB
toolbar.css 1KB
wsc.css 1004B
contents.css 989B
print.css 37B
ip.dat 8.79MB
Thumbs.db 52KB
Thumbs.db 16KB
Thumbs.db 9KB
Thumbs.db 5KB
8.gif 5KB
0.gif 5KB
6.gif 5KB
1.gif 5KB
7.gif 5KB
3.gif 5KB
5.gif 5KB
9.gif 5KB
2.gif 5KB
4.gif 4KB
top.gif 3KB
loading.gif 3KB
data_posting.gif 2KB
qq_bot.gif 2KB
zoomloader.gif 2KB
qq_top.gif 1KB
button_grey.gif 1KB
uicolor.gif 1KB
1.gif 1KB
zoom1.gif 1KB
button.gif 1KB
0.gif 1KB
contents_bg.gif 667B
zoom0.gif 628B
buttom.gif 613B
background.gif 473B
background4.gif 471B
cry_smile.gif 468B
angel_smile.gif 465B
confused_smile.gif 464B
sad_smile.gif 460B
wink_smile.gif 458B
whatchutalkingabout_smile.gif 452B
omg_smile.gif 451B
regular_smile.gif 450B
shades_smile.gif 449B
tounge_smile.gif 446B
angry_smile.gif 443B
teeth_smile.gif 442B
embaressed_smile.gif 442B
devil_smile.gif 436B
background5.gif 432B
envelope.gif 426B
template3.gif 422B
background3.gif 422B
thumbs_down.gif 408B
thumbs_up.gif 396B
template1.gif 375B
lightbulb.gif 368B
close.gif 357B
min.gif 349B
template2.gif 333B
download.gif 328B
home.gif 294B
kiss.gif 241B
mod.gif 235B
close_all_1.gif 201B
close_all_0.gif 193B
broken_heart.gif 192B
anchor.gif 184B
heart.gif 183B
mini.gif 183B
dot.gif 179B
copy.gif 158B
2.gif 138B
view.gif 121B
qq_bg.gif 111B
hiddenfield.gif 105B
toolbar_start.gif 105B
del.gif 97B
placeholder.gif 96B
arrow_rtl.gif 91B
arrow_ltr.gif 88B
win_close_0.gif 77B
right.gif 74B
left.gif 73B
background2.gif 67B
input_bg.gif 61B
input_bg.gif 61B
gou.gif 57B
pagebreak.gif 54B
共 929 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
qq_36464680
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 202304910142原道明(1).pbix
- 基于Lua的聊天过滤修改版设计源码
- Uibot6.0 (RPA财务机器人师资培训第5天 ) 报销汇总机器人案例实战
- 基于Vue的西安美食攻略应用程序设计源码
- tensorflow-2.6.2-cp38-cp38-win-amd64.whl
- 2023-04-06-项目笔记 - 第八十六阶段 - 4.4.2.84全局变量的作用域-84 -2024.03.28
- 基于C语言解决九宫重排问题(源码+剖析)
- 考研分数计算神器(通过考研分数计算规则制作出来的计算工具,结果精准,操作简单,并且还可以与第二个人进行比较)
- 脚本监控重要文件,并邮箱报警
- 九宫重排介绍.zip说明
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功