1 |
<?php |
2 |
function MyQuote($str) { |
3 |
global $dbh; |
4 |
if (!$dbh) return "'$str'"; |
5 |
return $dbh->quote($str); |
6 |
} |
7 |
|
8 |
function MyMove($src, $dest) { |
9 |
$cmd = "mv -f '".EscapeShellCmd($src)."' '".EscapeShellCmd($dest)."'"; |
10 |
return exec($cmd); |
11 |
} |
12 |
|
13 |
function MyDelete($src) { |
14 |
@unlink($src); |
15 |
} |
16 |
|
17 |
function PicSize($pic, $dir = "") { |
18 |
$ret = array(0, 0); |
19 |
if ($pic) { |
20 |
if (!$dir) { |
21 |
global $syspicdir; |
22 |
$dir = $syspicdir; |
23 |
} |
24 |
@$size = GetImageSize($dir."/".$pic); |
25 |
$ret = array($size[0], $size[1]); |
26 |
} |
27 |
return $ret; |
28 |
} |
29 |
|
30 |
$isEdit = stristr($PHP_SELF, "/edit/") ? true : false; |
31 |
$isMed = stristr($PHP_SELF, "/med/") ? true : false; |
32 |
header("Content-Type: text/html; charset=ISO-8859-2"); |
33 |
?> |