fixing the old project errors

This commit is contained in:
Anas Rashid committed 2026-04-29 00:42:13 +02:00
1 parent 34753111ed
commit 4ff0c03c62
23 files changed
+117 -278

No files matched your search

+2 -16
View File
@@ -57,7 +57,7 @@
document.getElementById("comments").innerHTML = xmlhttp.responseText;
}
};
xmlhttp.open("GET", "../controllers/loadComments.php?imgId= '" + id +"'", true);
xmlhttp.open("GET", "../controllers/loadComments.php?imgId=" + id, true);
xmlhttp.send();
}
@@ -84,23 +84,9 @@
}
else
{
$id = 0;
$files = glob('c:/xampp/htdocs/webproject/views/images/*'); // get all file names
foreach($files as $file)
{
if(is_file($file))
unlink($file);
}
$paths=array();
foreach($rs as $row)
{
$paths[]="c:/xampp/htdocs/webproject/views/images/".$row['imgId'].".jpg";
file_put_contents("c:/xampp/htdocs/webproject/views/images/".$row['imgId'].".jpg", $row['imageFile']);
echo '<img class="col-md-3" height="190" width="195" id="'.$row['imgId'].'" src="data:image/jpg;base64,'.base64_encode( $row['imageFile']).'" onclick=\'addcomments(id)\'/>';
$id++;
echo '<img class="col-md-3" height="190" width="195" id="'.$row['imgId'].'" src="data:image/jpg;base64,'.base64_encode( $row['imageFile']).'" onclick=\'addcomments(this.id)\'/>';
}
}
?>