Merge branch 'php81-jw'
This commit is contained in:
@ -663,10 +663,10 @@ function _convertRange2d($range)
|
||||
|
||||
// Split the range into 2 cell refs
|
||||
if (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\:\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) {
|
||||
list($cell1, $cell2) = split(':', $range);
|
||||
list($cell1, $cell2) = explode(':', $range);
|
||||
}
|
||||
elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\.\.\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) {
|
||||
list($cell1, $cell2) = split('\.\.', $range);
|
||||
list($cell1, $cell2) = preg_split('/\.\./', $range);
|
||||
}
|
||||
else {
|
||||
// TODO: use real error codes
|
||||
@ -714,7 +714,7 @@ function _convertRange3d($token)
|
||||
$class = 2; // as far as I know, this is magick.
|
||||
|
||||
// Split the ref at the ! symbol
|
||||
list($ext_ref, $range) = split('!', $token);
|
||||
list($ext_ref, $range) = explode('!', $token);
|
||||
|
||||
// Convert the external reference part
|
||||
$ext_ref = $this->_packExtRef($ext_ref);
|
||||
@ -723,7 +723,7 @@ function _convertRange3d($token)
|
||||
}
|
||||
|
||||
// Split the range into 2 cell refs
|
||||
list($cell1, $cell2) = split(':', $range);
|
||||
list($cell1, $cell2) = explode(':', $range);
|
||||
|
||||
// Convert the cell references
|
||||
if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $cell1))
|
||||
@ -812,7 +812,7 @@ function _convertRef3d($cell)
|
||||
$class = 2; // as far as I know, this is magick.
|
||||
|
||||
// Split the ref at the ! symbol
|
||||
list($ext_ref, $cell) = split('!', $cell);
|
||||
list($ext_ref, $cell) = explode('!', $cell);
|
||||
|
||||
// Convert the external reference part
|
||||
$ext_ref = $this->_packExtRef($ext_ref);
|
||||
@ -853,7 +853,7 @@ function _packExtRef($ext_ref) {
|
||||
// Check if there is a sheet range eg., Sheet1:Sheet2.
|
||||
if (preg_match("/:/", $ext_ref))
|
||||
{
|
||||
list($sheet_name1, $sheet_name2) = split(':', $ext_ref);
|
||||
list($sheet_name1, $sheet_name2) = explode(':', $ext_ref);
|
||||
|
||||
$sheet1 = $this->_getSheetIndex($sheet_name1);
|
||||
if ($sheet1 == -1) {
|
||||
|
||||
@ -181,8 +181,8 @@ class PHPExcel_Calculation_FormulaParser
|
||||
// embeds are doubled
|
||||
// end marks token
|
||||
if ($inString) {
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
|
||||
if ((($index + 2) <= $formulaLength) && ($this->formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
|
||||
if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) {
|
||||
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE;
|
||||
++$index;
|
||||
} else {
|
||||
@ -191,7 +191,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
$value = "";
|
||||
}
|
||||
} else {
|
||||
$value .= $this->formula{$index};
|
||||
$value .= $this->formula[$index];
|
||||
}
|
||||
++$index;
|
||||
continue;
|
||||
@ -201,15 +201,15 @@ class PHPExcel_Calculation_FormulaParser
|
||||
// embeds are double
|
||||
// end does not mark a token
|
||||
if ($inPath) {
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
|
||||
if ((($index + 2) <= $formulaLength) && ($this->formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
|
||||
if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) {
|
||||
$value .= PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE;
|
||||
++$index;
|
||||
} else {
|
||||
$inPath = false;
|
||||
}
|
||||
} else {
|
||||
$value .= $this->formula{$index};
|
||||
$value .= $this->formula[$index];
|
||||
}
|
||||
++$index;
|
||||
continue;
|
||||
@ -219,10 +219,10 @@ class PHPExcel_Calculation_FormulaParser
|
||||
// no embeds (changed to "()" by Excel)
|
||||
// end does not mark a token
|
||||
if ($inRange) {
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) {
|
||||
$inRange = false;
|
||||
}
|
||||
$value .= $this->formula{$index};
|
||||
$value .= $this->formula[$index];
|
||||
++$index;
|
||||
continue;
|
||||
}
|
||||
@ -230,7 +230,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
// error values
|
||||
// end marks a token, determined from absolute list of values
|
||||
if ($inError) {
|
||||
$value .= $this->formula{$index};
|
||||
$value .= $this->formula[$index];
|
||||
++$index;
|
||||
if (in_array($value, $ERRORS)) {
|
||||
$inError = false;
|
||||
@ -241,10 +241,10 @@ class PHPExcel_Calculation_FormulaParser
|
||||
}
|
||||
|
||||
// scientific notation check
|
||||
if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->formula{$index}) !== false) {
|
||||
if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->formula[$index]) !== false) {
|
||||
if (strlen($value) > 1) {
|
||||
if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->formula{$index}) != 0) {
|
||||
$value .= $this->formula{$index};
|
||||
if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->formula[$index]) != 0) {
|
||||
$value .= $this->formula[$index];
|
||||
++$index;
|
||||
continue;
|
||||
}
|
||||
@ -254,7 +254,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
// independent character evaluation (order not important)
|
||||
|
||||
// establish state-dependent character evaluations
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) {
|
||||
if (strlen($value > 0)) {
|
||||
// unexpected
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
|
||||
@ -265,7 +265,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) {
|
||||
if (strlen($value) > 0) {
|
||||
// unexpected
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
|
||||
@ -276,14 +276,14 @@ class PHPExcel_Calculation_FormulaParser
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) {
|
||||
$inRange = true;
|
||||
$value .= PHPExcel_Calculation_FormulaParser::BRACKET_OPEN;
|
||||
++$index;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::ERROR_START) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::ERROR_START) {
|
||||
if (strlen($value) > 0) {
|
||||
// unexpected
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
|
||||
@ -296,7 +296,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
}
|
||||
|
||||
// mark start and end of arrays and array rows
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) {
|
||||
if (strlen($value) > 0) {
|
||||
// unexpected
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN);
|
||||
@ -315,7 +315,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::SEMICOLON) {
|
||||
if (strlen($value) > 0) {
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
|
||||
$value = "";
|
||||
@ -337,7 +337,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) {
|
||||
if (strlen($value) > 0) {
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
|
||||
$value = "";
|
||||
@ -358,14 +358,14 @@ class PHPExcel_Calculation_FormulaParser
|
||||
}
|
||||
|
||||
// trim white-space
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) {
|
||||
if (strlen($value) > 0) {
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
|
||||
$value = "";
|
||||
}
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE);
|
||||
++$index;
|
||||
while (($this->formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
|
||||
while (($this->formula[$index] == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) {
|
||||
++$index;
|
||||
}
|
||||
continue;
|
||||
@ -385,29 +385,29 @@ class PHPExcel_Calculation_FormulaParser
|
||||
}
|
||||
|
||||
// standard infix operators
|
||||
if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->formula{$index}) !== false) {
|
||||
if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->formula[$index]) !== false) {
|
||||
if (strlen($value) > 0) {
|
||||
$tokens1[] =new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
|
||||
$value = "";
|
||||
}
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX);
|
||||
++$index;
|
||||
continue;
|
||||
}
|
||||
|
||||
// standard postfix operators (only one)
|
||||
if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->formula{$index}) !== false) {
|
||||
if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->formula[$index]) !== false) {
|
||||
if (strlen($value) > 0) {
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
|
||||
$value = "";
|
||||
}
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula[$index], PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX);
|
||||
++$index;
|
||||
continue;
|
||||
}
|
||||
|
||||
// start subexpression or function
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) {
|
||||
if (strlen($value) > 0) {
|
||||
$tmp = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START);
|
||||
$tokens1[] = $tmp;
|
||||
@ -423,7 +423,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
}
|
||||
|
||||
// function, subexpression, or array parameters, or operand unions
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::COMMA) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::COMMA) {
|
||||
if (strlen($value) > 0) {
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
|
||||
$value = "";
|
||||
@ -444,7 +444,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
}
|
||||
|
||||
// stop subexpression
|
||||
if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
|
||||
if ($this->formula[$index] == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) {
|
||||
if (strlen($value) > 0) {
|
||||
$tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND);
|
||||
$value = "";
|
||||
@ -460,7 +460,7 @@ class PHPExcel_Calculation_FormulaParser
|
||||
}
|
||||
|
||||
// token accumulation
|
||||
$value .= $this->formula{$index};
|
||||
$value .= $this->formula[$index];
|
||||
++$index;
|
||||
}
|
||||
|
||||
|
||||
@ -346,7 +346,7 @@ class PHPExcel_Calculation_Statistical
|
||||
$y = $x;
|
||||
if ($y > 0.0 && $y <= LOG_GAMMA_X_MAX_VALUE) {
|
||||
if ($y <= EPS) {
|
||||
$res = -log(y);
|
||||
$res = -log($y);
|
||||
} elseif ($y <= 1.5) {
|
||||
// ---------------------
|
||||
// EPS .LT. X .LE. 1.5
|
||||
@ -677,7 +677,7 @@ class PHPExcel_Calculation_Statistical
|
||||
$q = $p - 0.5;
|
||||
|
||||
// computation for p close to 0.5
|
||||
if (abs($q) <= split1) {
|
||||
if (abs($q) <= $split1) {
|
||||
$R = $const1 - $q * $q;
|
||||
$z = $q * ((((((($a7 * $R + $a6) * $R + $a5) * $R + $a4) * $R + $a3) * $R + $a2) * $R + $a1) * $R + $a0) /
|
||||
((((((($b7 * $R + $b6) * $R + $b5) * $R + $b4) * $R + $b3) * $R + $b2) * $R + $b1) * $R + 1);
|
||||
|
||||
@ -280,16 +280,16 @@ class PHPExcel_Reader_Excel5_Escher
|
||||
$foDelay = PHPExcel_Reader_Excel5::getInt4d($recordData, 28);
|
||||
|
||||
// offset: 32; size: 1; unused1
|
||||
$unused1 = ord($recordData{32});
|
||||
$unused1 = ord($recordData[32]);
|
||||
|
||||
// offset: 33; size: 1; size of nameData in bytes (including null terminator)
|
||||
$cbName = ord($recordData{33});
|
||||
$cbName = ord($recordData[33]);
|
||||
|
||||
// offset: 34; size: 1; unused2
|
||||
$unused2 = ord($recordData{34});
|
||||
$unused2 = ord($recordData[34]);
|
||||
|
||||
// offset: 35; size: 1; unused3
|
||||
$unused3 = ord($recordData{35});
|
||||
$unused3 = ord($recordData[35]);
|
||||
|
||||
// offset: 36; size: $cbName; nameData
|
||||
$nameData = substr($recordData, 36, $cbName);
|
||||
@ -331,7 +331,7 @@ class PHPExcel_Reader_Excel5_Escher
|
||||
}
|
||||
|
||||
// offset: var; size: 1; tag
|
||||
$tag = ord($recordData{$pos});
|
||||
$tag = ord($recordData[$pos]);
|
||||
$pos += 1;
|
||||
|
||||
// offset: var; size: var; the raw image data
|
||||
@ -372,7 +372,7 @@ class PHPExcel_Reader_Excel5_Escher
|
||||
}
|
||||
|
||||
// offset: var; size: 1; tag
|
||||
$tag = ord($recordData{$pos});
|
||||
$tag = ord($recordData[$pos]);
|
||||
$pos += 1;
|
||||
|
||||
// offset: var; size: var; the raw image data
|
||||
|
||||
@ -535,7 +535,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||
array_push($dataArray, $pData);
|
||||
}
|
||||
}
|
||||
$allCellDataText = implode($dataArray, "\n");
|
||||
$allCellDataText = implode("\n", $dataArray);
|
||||
|
||||
// echo 'Value Type is '.$cellDataOfficeAttributes['value-type'].'<br />';
|
||||
switch ($cellDataOfficeAttributes['value-type']) {
|
||||
|
||||
@ -17,11 +17,12 @@ class G5_URI {
|
||||
}
|
||||
|
||||
public function parseURL() {
|
||||
/* grab URL query string and script name */
|
||||
/* grab URL query string and script name */
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
$script = $_SERVER['SCRIPT_NAME'];
|
||||
/* get extension */
|
||||
$ext = end( explode(".",$script) );
|
||||
$script_names = explode(".",$script);
|
||||
$ext = end($script_names);
|
||||
|
||||
/* if extension is found in URL, eliminate it */
|
||||
if(strstr($uri,".")) {
|
||||
@ -83,14 +84,17 @@ class G5_URI {
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert normal URL query string to clean URL
|
||||
*/
|
||||
public function makeClean($string_url) {
|
||||
/* convert normal URL query string to clean URL */
|
||||
$url=parse_url($string_url);
|
||||
$strurl = basename($url['path'],".php");
|
||||
$qstring = parse_str($url['query'],$vars);
|
||||
while(list($k,$v) = each($vars)) $strurl .= "/".$v;
|
||||
return $strurl;
|
||||
$url = parse_url($string_url);
|
||||
$strUrl = basename($url['path'],".php");
|
||||
parse_str($url['query'],$queryString);
|
||||
foreach($queryString as $value){
|
||||
$strUrl .= "/$value";
|
||||
}
|
||||
return $strUrl;
|
||||
}
|
||||
|
||||
public function url_clean($string_url, $add_qry='') {
|
||||
@ -107,7 +111,7 @@ class G5_URI {
|
||||
}
|
||||
|
||||
$return_url = '';
|
||||
$qstring = parse_str($url['query'], $vars);
|
||||
parse_str($url['query'], $vars);
|
||||
|
||||
// 예) Array ( [scheme] => http [host] => sir.kr [path] => /bbs/board.php [query] => wr_id=1110870&bo_table=cm_free&cpage=1 [fragment] => c_1110946 )
|
||||
//while(list($k,$v) = each($vars)) $page_name .= "/".$v;
|
||||
@ -159,8 +163,10 @@ class G5_URI {
|
||||
$add_param .= $add_param ? '&'.$add_qry : '?'.$add_qry;
|
||||
}
|
||||
|
||||
while(list($k,$v) = each($s)) $return_url .= '/'.$v;
|
||||
foreach($s as $value){
|
||||
$return_url .= "/$value";
|
||||
}
|
||||
|
||||
return $host.$return_url.$add_param.$fragment;
|
||||
return $host.$return_url.$add_param.$fragment;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2491,22 +2491,6 @@ function get_skin_javascript($skin_path, $dir='')
|
||||
return $str;
|
||||
}
|
||||
|
||||
// file_put_contents 는 PHP5 전용 함수이므로 PHP4 하위버전에서 사용하기 위함
|
||||
// http://www.phpied.com/file_get_contents-for-php4/
|
||||
if (!function_exists('file_put_contents')) {
|
||||
function file_put_contents($filename, $data) {
|
||||
$f = @fopen($filename, 'w');
|
||||
if (!$f) {
|
||||
return false;
|
||||
} else {
|
||||
$bytes = fwrite($f, $data);
|
||||
fclose($f);
|
||||
return $bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// HTML 마지막 처리
|
||||
function html_end()
|
||||
{
|
||||
@ -3092,6 +3076,9 @@ function get_search_string($stx)
|
||||
// XSS 관련 태그 제거
|
||||
function clean_xss_tags($str, $check_entities=0, $is_remove_tags=0, $cur_str_len=0)
|
||||
{
|
||||
// tab('\t'), formfeed('\f'), vertical tab('\v'), newline('\n'), carriage return('\r') 를 제거한다.
|
||||
$str = preg_replace("#[\t\f\v\n\r]#", '', $str);
|
||||
|
||||
if( $is_remove_tags ){
|
||||
$str = strip_tags($str);
|
||||
}
|
||||
@ -3353,6 +3340,11 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
|
||||
if(!$msg)
|
||||
$msg = 'url에 타 도메인을 지정할 수 없습니다.';
|
||||
|
||||
// KVE-2021-1277 Open Redirect 취약점 해결
|
||||
if (preg_match('#\\\0#', $url)) {
|
||||
alert('url 에 올바르지 않은 값이 포함되어 있습니다.');
|
||||
}
|
||||
|
||||
$url = urldecode($url);
|
||||
$p = @parse_url(trim($url));
|
||||
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
|
||||
|
||||
@ -28,14 +28,14 @@ function get_icode_port_type($id, $pw)
|
||||
* 접속, 발송, URL발송, 결과등의 실질적으로 쓰이는 모든 부분이 포함되어 있다.
|
||||
*/
|
||||
class LMS {
|
||||
var $icode_id;
|
||||
var $icode_pw;
|
||||
var $socket_host;
|
||||
var $socket_port;
|
||||
var $socket_portcode;
|
||||
var $Data = array();
|
||||
var $Result = array();
|
||||
var $icode_key;
|
||||
public $icode_id;
|
||||
public $icode_pw;
|
||||
public $socket_host;
|
||||
public $socket_port;
|
||||
public $socket_portcode;
|
||||
public $Data = array();
|
||||
public $Result = array();
|
||||
public $icode_key;
|
||||
|
||||
// SMS 서버 접속
|
||||
function SMS_con($host, $id, $pw, $portcode) {
|
||||
@ -327,7 +327,7 @@ function is_vaild_callback($callback){
|
||||
function CheckCommonTypeDate($strDate) {
|
||||
$strDate = preg_replace("/[^0-9]/", "", $strDate);
|
||||
if ($strDate){
|
||||
if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($rsvTime,0,4)))
|
||||
if (!checkdate(substr($strDate,4,2),substr($strDate,6,2),substr($strDate,0,4)))
|
||||
return "예약날짜오류";
|
||||
if (substr($strDate,8,2)>23 || substr($strDate,10,2)>59) return false;
|
||||
return "예약날짜오류";
|
||||
|
||||
@ -22,13 +22,10 @@ function cut_char($word, $cut) {
|
||||
}
|
||||
|
||||
function CheckCommonType($dest, $rsvTime) {
|
||||
//$dest=eregi_replace("[^0-9]","",$dest);
|
||||
$dest=preg_replace("/[^0-9]/i","",$dest);
|
||||
if (strlen($dest)<10 || strlen($dest)>11) return "휴대폰 번호가 틀렸습니다";
|
||||
$CID=substr($dest,0,3);
|
||||
//if ( eregi("[^0-9]",$CID) || ($CID!='010' && $CID!='011' && $CID!='016' && $CID!='017' && $CID!='018' && $CID!='019') ) return "휴대폰 앞자리 번호가 잘못되었습니다";
|
||||
if ( preg_match("/[^0-9]/i",$CID) || ($CID!='010' && $CID!='011' && $CID!='016' && $CID!='017' && $CID!='018' && $CID!='019') ) return "휴대폰 앞자리 번호가 잘못되었습니다";
|
||||
//$rsvTime=eregi_replace("[^0-9]","",$rsvTime);
|
||||
$rsvTime=preg_replace("/[^0-9]/i","",$rsvTime);
|
||||
if ($rsvTime) {
|
||||
if (!checkdate(substr($rsvTime,4,2),substr($rsvTime,6,2),substr($rsvTime,0,4))) return "예약날짜가 잘못되었습니다";
|
||||
@ -37,16 +34,16 @@ function CheckCommonType($dest, $rsvTime) {
|
||||
}
|
||||
|
||||
class SMS {
|
||||
var $ID;
|
||||
var $PWD;
|
||||
var $SMS_Server;
|
||||
var $port;
|
||||
var $SMS_Port;
|
||||
var $Data = array();
|
||||
var $Result = array();
|
||||
var $icode_key;
|
||||
var $socket_port;
|
||||
var $socket_host;
|
||||
public $ID;
|
||||
public $PWD;
|
||||
public $SMS_Server;
|
||||
public $port;
|
||||
public $SMS_Port;
|
||||
public $Data = array();
|
||||
public $Result = array();
|
||||
public $icode_key;
|
||||
public $socket_port;
|
||||
public $socket_host;
|
||||
|
||||
function SMS_con($sms_server,$sms_id,$sms_pw,$port) {
|
||||
global $config;
|
||||
@ -102,7 +99,7 @@ class SMS {
|
||||
if($enc === 'EUC-KR'){
|
||||
$msg = iconv_utf8($msg);
|
||||
}
|
||||
|
||||
|
||||
// 보낼 내용을 배열에 집어넣기
|
||||
$dest = spacing($dest,11);
|
||||
$callBack = spacing($callBack,11);
|
||||
|
||||
@ -138,7 +138,7 @@ function shop_short_url_clean($string_url, $url, $page_name, $array_page_names){
|
||||
$add_param = '?'.http_build_query($result,'','&');
|
||||
}
|
||||
|
||||
if( $add_qry ){
|
||||
if( isset($add_qry) ){
|
||||
$add_param .= $add_param ? '&'.$add_qry : '?'.$add_qry;
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
include_once(dirname(__FILE__) .'/URI/uri.class.php');
|
||||
|
||||
// 짧은 주소 형식으로 만들어서 가져온다.
|
||||
function get_pretty_url($folder, $no='', $query_string='', $action='')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user