'); echo('$file='.$file.'
'); echo('$UPLOADIMAGES_PATH='.$UPLOADIMAGES_PATH.'
'); echo('UI = '.$UPLOADIMAGES_PATH."/thumb-".$file.'
'); exit; */ //echo('='..'
'); $fileRemoved = true; if (file_exists($UPLOADIMAGES_PATH."/thumb-".$file)) { system ("rm -f ".$UPLOADIMAGES_PATH."/thumb-".$file); } else { logSRerror("delete.php - cannot find file " . $UPLOADIMAGES_PATH."/thumb-".$file); $fileRemoved = false; } if (file_exists($UPLOADIMAGES_PATH."/resized-".$file)) { system ("rm -f ".$UPLOADIMAGES_PATH."/resized-".$file); logSRdeletes("delete.php: Deleted - " . $UPLOADIMAGES_PATH."/resized-".$file); } else { logSRerror("delete.php - cannot find file " . $UPLOADIMAGES_PATH."/resized-".$file); $fileRemoved = false; } if($fileRemoved) { $db = new DB(); $link = $db->connect(); $uid = getSessionUserid(); $e_fileid = mysql_escape($fileid); $sql = "DELETE FROM sr_files WHERE fileuniqueid = '$e_fileid'"; mysql_query($sql, $link); } //$sql = "DELETE FROM sr_msgs WHERE fileid = '$fileid'"; //mysql_query($sql, $link); header("Location: ".$PHP_SELF."?artid=".$artid); exit; //echo('$fileRemoved='.$fileRemoved.'
'); } $article = new Article($artid); //used for site takeover to detect the car only //$related_cars = getRelationshipCars($article->getArtId(), $link); if ($article->getArtId() == 0 || (!isArticlesAdmin() && $article->isHidden())) { //echo('a1'); header ("Location: $ARTICLE_INDEX_URL"); exit; } if($article->getTypeId()==12){ header ("Location: photo-story.php?artid=".$article->getArtId()); exit; } $section = new Section ($article->getTypeId()); $SUB_APP_ID = $section->getSubAppId(); $images = getArticleImages($article->getArtId()); if(count($images) <= 0) { //echo('a2'); header ("Location: article.php?artid=".$article->getArtId()); exit; } if($fileid) { $index = 0; foreach ($images as $image) { if ($image->getfileid() == $fileid) { //echo('a3'); header ("Location: $PHP_SELF"."?artid=".$artid."&type=".$type."#".$index); exit; } $index++; } } $showroom_category = getPath($srid); $WEBPAGE_TITLE = $article->getArticleTitle().' Photo Gallery | '.$section->getSectionName().' | '.$GLOBAL_PORTAL_NAME; ?>