| @@ 324-332 (lines=9) @@ | ||
| 321 | * @param string $value |
|
| 322 | * @return boolean |
|
| 323 | */ |
|
| 324 | function isUnderRoot($value) |
|
| 325 | { |
|
| 326 | $roorPath = strtolower(addTrailingSlash(backslashToSlash(getRealPath(CONFIG_SYS_ROOT_PATH)))); |
|
| 327 | if(file_exists($value) && @strpos(strtolower(addTrailingSlash(backslashToSlash(getRealPath($value)))), $roorPath) === 0 ) |
|
| 328 | { |
|
| 329 | return true; |
|
| 330 | } |
|
| 331 | return false; |
|
| 332 | } |
|
| 333 | /** |
|
| 334 | * check if a file under the session folder |
|
| 335 | * |
|
| @@ 339-348 (lines=10) @@ | ||
| 336 | * @param string $value |
|
| 337 | * @return boolean |
|
| 338 | */ |
|
| 339 | function isUnderSession($value) |
|
| 340 | { |
|
| 341 | global $session; |
|
| 342 | $sessionPath = strtolower(addTrailingSlash(backslashToSlash(getRealPath($session->getSessionDir())))); |
|
| 343 | if(file_exists($value) && @strpos(strtolower(addTrailingSlash(backslashToSlash(getRealPath($value)))), $sessionPath) === 0 ) |
|
| 344 | { |
|
| 345 | return true; |
|
| 346 | } |
|
| 347 | return false; |
|
| 348 | } |
|
| 349 | ||
| 350 | ||
| 351 | /** |
|