 |
SQL Error Message: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1"
SQL : "SELECT `sp_procate`.* FROM `sp_procate` WHERE fid= LIMIT 1"
SQL Error code: "7335941".
Error reason:
Uncaptured exception.
Details:
exception 'FLEA_Db_Exception_SqlQuery' with message 'SQL Error Message: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1"
SQL : "SELECT `sp_procate`.* FROM `sp_procate` WHERE fid= LIMIT 1"
SQL Error code: "7335941".' in /data0/www/others/www.zghcjx.com/FLEA/FLEA/Db/Driver/Mysql.php:126
Stack trace:
#0 /data0/www/others/www.zghcjx.com/FLEA/FLEA/Db/Driver/Mysql.php(187): FLEA_Db_Driver_Mysql->execute('SELECT `sp_pro...')
#1 /data0/www/others/www.zghcjx.com/FLEA/FLEA/Db/TableDataGateway.php(446): FLEA_Db_Driver_Mysql->selectLimit('SELECT `sp_pro...', 1, NULL)
#2 /data0/www/others/www.zghcjx.com/FLEA/FLEA/Db/TableDataGateway.php(400): FLEA_Db_TableDataGateway->findAll('fid=', NULL, 1, '*', true)
#3 /data0/www/others/www.zghcjx.com/APP/View/proview.php(21): FLEA_Db_TableDataGateway->find('fid=')
#4 /data0/www/others/www.zghcjx.com/APP/Controller/home.php(399): include('/data0/www/othe...')
#5 /data0/www/others/www.zghcjx.com/FLEA/FLEA/Dispatcher/Simple.php(120): Controller_home->proview()
#6 /data0/www/others/www.zghcjx.com/FLEA/FLEA/Dispatcher/Auth.php(2): FLEA_Dispatcher_Simple->_executeAction('home', 'proview', 'Controller_home')
#7 /data0/www/others/www.zghcjx.com/FLEA/FLEA.php(801): FLEA_Dispatcher_Auth->dispatching()
#8 /data0/www/others/www.zghcjx.com/index.php(26): FLEA::runMVC()
#9 {main}
Exception: FLEA_Db_Exception_SqlQuery
Message: SQL Error Message: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1"
SQL : "SELECT `sp_procate`.* FROM `sp_procate` WHERE fid= LIMIT 1"
SQL Error code: "7335941".
Filename: /data0/www/others/www.zghcjx.com/FLEA/FLEA/Db/Driver/Mysql.php [187]
#9 FLEA_Db_Driver_Mysql::execute('SELECT `sp_procate`.* FROM ...')
ARGS:
Array
(
[0] => SELECT `sp_procate`.* FROM `sp_procate` WHERE fid= LIMIT 1
)
SOURCE CODE:
| 177 |
if (!is_null($offset)) {
|
| 178 |
$sql .= " LIMIT " . (int)$offset;
|
| 179 |
if (!is_null($length)) {
|
| 180 |
$sql .= ', ' . (int)$length;
|
| 181 |
} else {
|
| 182 |
$sql .= ', 4294967294';
|
| 183 |
}
|
| 184 |
} elseif (!is_null($length)) {
|
| 185 |
$sql .= " LIMIT " . (int)$length;
|
| 186 |
}
|
| 187 |
return $this->execute($sql);
|
| 188 |
}
|
| 189 |
|
| 190 |
function metaColumns($table)
|
| 191 |
{
|
| 192 |
/**
|
| 193 |
* C CHAR 或 VARCHAR 类型字段
|
| 194 |
* X TEXT 或 CLOB 类型字段
|
| 195 |
* B 二进制数据(BLOB)
|
| 196 |
* N 数值或者浮点数
|
| 197 |
* D 日期
|
Filename: /data0/www/others/www.zghcjx.com/FLEA/FLEA/Db/TableDataGateway.php [446]
#8 FLEA_Db_Driver_Mysql::selectLimit('SELECT `sp_procate`.* FROM ...', 1, )
ARGS:
Array
(
[0] => SELECT `sp_procate`.* FROM `sp_procate` WHERE fid=
[1] => 1
[2] =>
)
SOURCE CODE:
| 436 |
$fields = $this->dbo->qfields($fields, $this->fullTableName, $this->schema);
|
| 437 |
if ($enableLinks) {
|
| 438 |
// 当有关联需要处理时,必须获得主表的主键字段值
|
| 439 |
$sql = "SELECT {$distinct} {$this->qpka}, {$fields} FROM {$this->qtableName} {$whereby} {$sortby}";
|
| 440 |
} else {
|
| 441 |
$sql = "SELECT {$distinct} {$fields} FROM {$this->qtableName} {$whereby} {$sortby}";
|
| 442 |
}
|
| 443 |
|
| 444 |
// 根据 $length 和 $offset 参数决定是否使用限定结果集的查询
|
| 445 |
if (null !== $length || null !== $offset) {
|
| 446 |
$result = $this->dbo->selectLimit($sql, $length, $offset);
|
| 447 |
} else {
|
| 448 |
$result = $this->dbo->execute($sql);
|
| 449 |
}
|
| 450 |
|
| 451 |
if ($enableLinks) {
|
| 452 |
/**
|
| 453 |
* 查询时同时将主键值单独提取出来,
|
| 454 |
* 并且准备一个以主键值为键名的二维数组用于关联数据的装配
|
| 455 |
*/
|
| 456 |
$pkvs = array();
|
Filename: /data0/www/others/www.zghcjx.com/FLEA/FLEA/Db/TableDataGateway.php [400]
#7 FLEA_Db_TableDataGateway::findAll('fid=', , 1, '*', 1)
ARGS:
Array
(
[0] => fid=
[1] =>
[2] => 1
[3] => *
[4] => 1
)
SOURCE CODE:
| 390 |
*
|
| 391 |
* @param mixed $conditions
|
| 392 |
* @param string $sort
|
| 393 |
* @param mixed $fields
|
| 394 |
* @param mixed $queryLinks
|
| 395 |
*
|
| 396 |
* @return array
|
| 397 |
*/
|
| 398 |
function & find($conditions, $sort = null, $fields = '*', $queryLinks = true)
|
| 399 |
{
|
| 400 |
$rowset =& $this->findAll($conditions, $sort, 1, $fields, $queryLinks);
|
| 401 |
if (is_array($rowset)) {
|
| 402 |
$row = reset($rowset);
|
| 403 |
} else {
|
| 404 |
$row = false;
|
| 405 |
}
|
| 406 |
unset($rowset);
|
| 407 |
return $row;
|
| 408 |
}
|
| 409 |
|
| 410 |
/**
|
Filename: /data0/www/others/www.zghcjx.com/APP/View/proview.php [21]
#6 FLEA_Db_TableDataGateway::find('fid=')
ARGS:
Array
(
[0] => fid=
)
SOURCE CODE:
| 11 |
<?php
|
| 12 |
include View.DS."top.php";
|
| 13 |
?>
|
| 14 |
<link href="/style/lightbox.css" rel="stylesheet" type="text/css" />
|
| 15 |
<link href="/style/lightboxJQuery.css" rel="stylesheet" type="text/css" />
|
| 16 |
<table width="910" height="421" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
|
| 17 |
<tr>
|
| 18 |
<td width="679" height="421" valign="top"><table width="661" height="19" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
|
| 19 |
<tr>
|
| 20 |
<td width="35" height="19" align="center"><img src="/images/tu.gif" width="9" height="11" /></td>
|
| 21 |
<td width="102" class="zi2"><?php $cate = $this->_procate->find("fid=".$one['cate']);echo $cate['name'] ?>
|
| 22 |
</td>
|
| 23 |
<td align="left"><table width="500" height="10" border="0" align="left" cellpadding="0" cellspacing="0" background="/images/bj6.gif">
|
| 24 |
<tr>
|
| 25 |
<td width="280" height="10"></td>
|
| 26 |
</tr>
|
| 27 |
</table></td>
|
| 28 |
</tr>
|
| 29 |
</table>
|
| 30 |
<script type="text/javascript" src="/script/jquery.lightbox.js"></script>
|
| 31 |
<script type="text/javascript">
|
Filename: /data0/www/others/www.zghcjx.com/APP/Controller/home.php [399]
#5 include('/data0/www/others/www.zghcj ...')
ARGS:
Array
(
[0] => /data0/www/others/www.zghcjx.com/APP/View/proview.php
)
SOURCE CODE:
| 389 |
$_sql = $_pager->getsql();
|
| 390 |
$sql .= $_sql;
|
| 391 |
$this->_data = $this->dbo->getAll($sql);
|
| 392 |
$this->_info = $_pager->GetIndexBar();
|
| 393 |
$this->_infopage = $_pager->GetPageInfo();
|
| 394 |
}
|
| 395 |
function proview()
|
| 396 |
{
|
| 397 |
$pid=intval(trget("pid"));
|
| 398 |
$one= $this->_pros->find("pid=".$pid);
|
| 399 |
include (View.DS."proview.php");
|
| 400 |
}
|
| 401 |
|
| 402 |
|
| 403 |
// following that is hans
|
| 404 |
|
| 405 |
function index2()
|
| 406 |
{
|
| 407 |
include home.DS."login.php";
|
| 408 |
}
|
| 409 |
function showLeft()
|
Filename: /data0/www/others/www.zghcjx.com/FLEA/FLEA/Dispatcher/Simple.php [120]
#4 Controller_home::proview()
ARGS:
Array
(
)
SOURCE CODE:
| 110 |
}
|
| 111 |
if (method_exists($controller, '__setDispatcher')) {
|
| 112 |
$controller->__setDispatcher($this);
|
| 113 |
}
|
| 114 |
|
| 115 |
// 调用 _beforeExecute() 方法
|
| 116 |
if (method_exists($controller, '_beforeExecute')) {
|
| 117 |
$controller->_beforeExecute($actionMethod);
|
| 118 |
}
|
| 119 |
// 执行 action 方法
|
| 120 |
$ret = $controller->{$actionMethod}();
|
| 121 |
// 调用 _afterExecute() 方法
|
| 122 |
if (method_exists($controller, '_afterExecute')) {
|
| 123 |
$controller->_afterExecute($actionMethod);
|
| 124 |
}
|
| 125 |
return $ret;
|
| 126 |
} while (false);
|
| 127 |
|
| 128 |
if ($callback) {
|
| 129 |
// 检查是否调用应用程序设置的错误处理程序
|
| 130 |
$args = array($controllerName, $actionName, $controllerClass);
|
Filename: /data0/www/others/www.zghcjx.com/FLEA/FLEA/Dispatcher/Auth.php [2]
#3 FLEA_Dispatcher_Simple::_executeAction('home', 'proview', 'Controller_home')
ARGS:
Array
(
[0] => home
[1] => proview
[2] => Controller_home
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
FLEA::loadClass('FLEA_Dispatcher_Simple'); class FLEA_Dispatcher_Auth extends FLEA_Dispatcher_Simple { var $_auth; function FLEA_Dispatcher_Auth(& $request) {$request=str_replace('.html','',$request); parent::FLEA_Dispatcher_Simple($request); $this->_auth =& FLEA::getSingleton(FLEA::getAppInf('dispatcherAuthProvider')); } function & getAuthProvider() { return $this->_auth; } function setAuthProvider(& $auth) { $this->_auth =& $auth; } function setUser($userData, $rolesData = null) { $this->_auth->setUser($userData, $rolesData); } function getUser() { return $this->_auth->getUser(); } function getUserRoles() { return $this->_auth->getRolesArray(); } function clearUser() { $this->_auth->clearUser(); } function dispatching() { $controllerName = $this->getControllerName(); $actionName = $this->getActionName(); $controllerClass = $this->getControllerClass($controllerName); if ($this->check($controllerName, $actionName, $controllerClass)) { return $this->_executeAction($controllerName, $actionName, $controllerClass); } else { $callback = FLEA::getAppInf('dispatcherAuthFailedCallback'); $rawACT = $this->getControllerACT($controllerName, $controllerClass); if (is_null($rawACT) || empty($rawACT)) { return true; } $ACT = $this->_auth->prepareACT($rawACT); $roles = $this->_auth->getRolesArray(); $args = array($controllerName, $actionName, $controllerClass, $ACT, $roles); if ($this->_loadController($controllerClass)) { $methods = get_class_methods($controllerClass); if (in_array('_onAuthFailed', $methods, true)) { if (call_user_func_array(array($controllerClass, '_onAuthFailed'), $args) !== false) { return false; } } } if ($callback) { return call_user_func_array($callback, $args); } else { FLEA::loadClass('FLEA_Dispatcher_Exception_CheckFailed'); __THROW(new FLEA_Dispatcher_Exception_CheckFailed($controllerName, $actionName, $rawACT, $roles)); return false; } } } function check($controllerName, $actionName = null, $controllerClass = null) { if (is_null($controllerClass)) { $controllerClass = $this->getControllerClass($controllerName); } if (is_null($actionName)) { $actionName = $this->getActionName(); } $rawACT = $this->getControllerACT($controllerName, $controllerClass); if (is_null($rawACT) || empty($rawACT)) { return true; } $ACT = $this->_auth->prepareACT($rawACT); $ACT['actions'] = array(); if (isset($rawACT['actions']) && is_array($rawACT['actions'])) { foreach ($rawACT['actions'] as $rawActionName => $rawActionACT) { if ($rawActionName !== ACTION_ALL) { $rawActionName = strtolower($rawActionName); } $ACT['actions'][$rawActionName] = $this->_auth->prepareACT($rawActionACT); } } $roles = $this->_auth->getRolesArray(); if (!$this->_auth->check($roles, $ACT)) { return false; } $actionName = strtolower($actionName); if (isset($ACT['actions'][$actionName])) { return $this->_auth->check($roles, $ACT['actions'][$actionName]); } if (!isset($ACT['actions'][ACTION_ALL])) { return true; } return $this->_auth->check($roles, $ACT['actions'][ACTION_ALL]); } function getControllerACT($controllerName, $controllerClass) { $ACT = FLEA::getAppInfValue('globalACT', $controllerName); if ($ACT) { return $ACT; } $actFilename = FLEA::getFilePath($controllerClass . '.act.php'); if (!$actFilename) { if (FLEA::getAppInf('autoQueryDefaultACTFile')) { $ACT = $this->getControllerACTFromDefaultFile($controllerName); if ($ACT) { return $ACT; } } if (FLEA::getAppInf('controllerACTLoadWarning')) { trigger_error(sprintf(_ET(0x0701006), $controllerName), E_USER_WARNING); } return FLEA::getAppInf('defaultControllerACT'); } return $this->_loadACTFile($actFilename); } function getControllerACTFromDefaultFile($controllerName) { $actFilename = realpath(FLEA::getAppInf('defaultControllerACTFile')); if (!$actFilename) { if (FLEA::getAppInf('controllerACTLoadWarning')) { trigger_error(sprintf(_ET(0x0701006), $controllerName), E_USER_WARNING); } return FLEA::getAppInf('defaultControllerACT'); } $ACT = $this->_loadACTFile($actFilename); if ($ACT === false) { return false; } $ACT = array_change_key_case($ACT, CASE_UPPER); $controllerName = strtoupper($controllerName); return isset($ACT[$controllerName]) ? $ACT[$controllerName] : FLEA::getAppInf('defaultControllerACT'); } function _loadACTFile($actFilename) { static $files = array(); if (isset($files[$actFilename])) { return $files[$actFilename]; } $ACT = require($actFilename); if (is_array($ACT)) { $files[$actFilename] = $ACT; return $ACT; } FLEA::loadClass('FLEA_Rbac_Exception_InvalidACTFile'); __THROW(new FLEA_Rbac_Exception_InvalidACTFile($actFilename, $ACT)); return false; } } |
Filename: /data0/www/others/www.zghcjx.com/FLEA/FLEA.php [801]
#2 FLEA_Dispatcher_Auth::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 791 |
require_once($MVCPackageFilename);
|
| 792 |
}
|
| 793 |
FLEA::init();
|
| 794 |
|
| 795 |
// 载入调度器并转发请求到控制器
|
| 796 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 797 |
FLEA::loadClass($dispatcherClass);
|
| 798 |
|
| 799 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 800 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 801 |
$dispatcher->dispatching();
|
| 802 |
}
|
| 803 |
|
| 804 |
/**
|
| 805 |
* 准备运行环境
|
| 806 |
*
|
| 807 |
* @param boolean $loadMVC
|
| 808 |
*/
|
| 809 |
function init($loadMVC = false)
|
| 810 |
{
|
| 811 |
static $firstTime = true;
|
Filename: /data0/www/others/www.zghcjx.com/index.php [26]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 16 |
define('factory',View.DS."factory");
|
| 17 |
define('settings',View.DS."settings");
|
| 18 |
define('forum',View.DS."forum");
|
| 19 |
define('web',View.DS."web");
|
| 20 |
define('newproduct',View.DS."newproduct");
|
| 21 |
require_once(conf.DS."callback.php");
|
| 22 |
require_once(flea_dir.DS."FLEA.php");
|
| 23 |
require_once(root.DS."fckeditor".DS."fckeditor.php");
|
| 24 |
FLEA::loadAppInf(conf.DS."dsn.php");
|
| 25 |
FLEA::import(APP);
|
| 26 |
FLEA::runMVC();
|
| 27 |
?> |
|