Merge branch 'g5'
This commit is contained in:
@ -225,13 +225,14 @@ if (isset($_REQUEST['sfl'])) {
|
|||||||
if (isset($_REQUEST['stx'])) { // search text (검색어)
|
if (isset($_REQUEST['stx'])) { // search text (검색어)
|
||||||
$stx = trim($_REQUEST['stx']);
|
$stx = trim($_REQUEST['stx']);
|
||||||
if ($stx)
|
if ($stx)
|
||||||
$qstr .= '&stx=' . urlencode($stx);
|
$qstr .= '&stx=' . urlencode(cut_str($stx, 20, ''));
|
||||||
} else {
|
} else {
|
||||||
$stx = '';
|
$stx = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_REQUEST['sst'])) {
|
if (isset($_REQUEST['sst'])) {
|
||||||
$sst = trim($_REQUEST['sst']);
|
$sst = trim($_REQUEST['sst']);
|
||||||
|
$sst = preg_replace("/[\<\>\'\"\%\=\(\)\s]/", "", $sst);
|
||||||
if ($sst)
|
if ($sst)
|
||||||
$qstr .= '&sst=' . urlencode($sst); // search sort (검색 정렬 필드)
|
$qstr .= '&sst=' . urlencode($sst); // search sort (검색 정렬 필드)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -153,6 +153,10 @@ define('G5_SMTP', '127.0.0.1');
|
|||||||
기타 상수
|
기타 상수
|
||||||
********************/
|
********************/
|
||||||
|
|
||||||
|
// SQL 에러를 표시할 것인지 지정
|
||||||
|
// 에러를 표시하지 않으려면 FALSE 로 변경
|
||||||
|
define('G5_DISPLAY_SQL_ERROR', TRUE);
|
||||||
|
|
||||||
// escape string 처리 함수 지정
|
// escape string 처리 함수 지정
|
||||||
// POST 등에서 한글이 깨질 경우 addslashes 로 변경
|
// POST 등에서 한글이 깨질 경우 addslashes 로 변경
|
||||||
define('G5_ESCAPE_FUNCTION', 'mysql_real_escape_string');
|
define('G5_ESCAPE_FUNCTION', 'mysql_real_escape_string');
|
||||||
|
|||||||
@ -1433,7 +1433,7 @@ function sql_select_db($db, $connect)
|
|||||||
|
|
||||||
|
|
||||||
// mysql_query 와 mysql_error 를 한꺼번에 처리
|
// mysql_query 와 mysql_error 를 한꺼번에 처리
|
||||||
function sql_query($sql, $error=TRUE)
|
function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR)
|
||||||
{
|
{
|
||||||
if ($error)
|
if ($error)
|
||||||
$result = @mysql_query($sql) or die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : {$_SERVER['PHP_SELF']}");
|
$result = @mysql_query($sql) or die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : {$_SERVER['PHP_SELF']}");
|
||||||
@ -1444,7 +1444,7 @@ function sql_query($sql, $error=TRUE)
|
|||||||
|
|
||||||
|
|
||||||
// 쿼리를 실행한 후 결과값에서 한행을 얻는다.
|
// 쿼리를 실행한 후 결과값에서 한행을 얻는다.
|
||||||
function sql_fetch($sql, $error=TRUE)
|
function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR)
|
||||||
{
|
{
|
||||||
$result = sql_query($sql, $error);
|
$result = sql_query($sql, $error);
|
||||||
//$row = @sql_fetch_array($result) or die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : $_SERVER['PHP_SELF']");
|
//$row = @sql_fetch_array($result) or die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : $_SERVER['PHP_SELF']");
|
||||||
|
|||||||
Reference in New Issue
Block a user