1
if
($arcRow[
'litpic'
]!=
""
){
2
$dsql->ExecuteNoneQuery(
"Delete From uploads where url='$arcRow[litpic]'"
);
3
$truedir = GetTruePath($arcRow[
'siterefer'
],$arcRow[
'sitepath'
]);
4
$litpicfile = $truedir.$arcRow[
];
5
@unlink($litpicfile);
6
}
01
$arcbodyQuery =
"Select * from "
.$arcRow[
'addtable'
].
" where aid='$aid'"
;
02
$arcbodyRow = $dsql->GetOne($arcbodyQuery);
03
$imgsrcarray=GetImageSrc($arcbodyRow[
'body'
04
foreach ($imgsrcarray as $
v
) {
05
((trim($
)!=
)&&(!eregi(
"^http://"
,$
))){
06
"Delete From uploads where url='$v'"
07
$picfile = $truedir.$
08
@unlink($picfile);
09
10
function
GetImageSrc($body){
( !isset($body))
return
''
else
{
preg_match_all (
"/<(img|IMG)(.*)(src|SRC)=["
|
'|]{0,}([h|/].*(jpg|JPG|gif|GIF))["|'
|s]{0,}/isU",$body,$out);
$out[4];
7