forked from 4ducky/4ducky
The PHP sources, templates and old jQuery-based scripts move unchanged into legacy/ for reference. Shared assets (media/, images/, favicon.ico, the default avatar) stay at the repository root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.9 KiB
PHP
46 lines
1.9 KiB
PHP
<?php
|
|
require_once( 'lib/config.php' );
|
|
require_once( 'lib/db.php' );
|
|
include("lib/users.php");
|
|
$user = new User();
|
|
$user->loadEmail();
|
|
$user->login();
|
|
$counter = 0;
|
|
|
|
echo("Login OK<br>");
|
|
|
|
$id = $_GET["id"];
|
|
$userinfo = DB::query("SELECT image,score,fame,id,logged,keyword,thumb FROM pl_images WHERE fame = 0 AND score < 10 ORDER BY logged ASC LIMIT 50",$id);
|
|
|
|
foreach($userinfo as $keyword){
|
|
|
|
$splitter = split("/",$keyword["keyword"]);
|
|
$counter++;
|
|
|
|
echo $counter." - ".$splitter[0]."/".$splitter[1]."/".$keyword["image"];
|
|
|
|
if (file_exists("data/images/".$splitter[0]."/".$splitter[1]."/".$keyword["image"])){
|
|
if (unlink("data/images/".$splitter[0]."/".$splitter[1]."/".$keyword["image"])){ echo(" -> Bild deleted"."<br>");}else{echo(" -> failed"."<br>");}
|
|
}
|
|
|
|
if (file_exists("data/thumbs/".$splitter[0]."/".$splitter[1]."/128x128/".$keyword["thumb"])){
|
|
if (unlink("data/thumbs/".$splitter[0]."/".$splitter[1]."/128x128/".$keyword["thumb"])){ echo(" -> 128x128 deleted"."<br>");}else{echo(" -> failed"."<br>");}
|
|
}
|
|
|
|
if (file_exists("data/thumbs/".$splitter[0]."/".$splitter[1]."/192x192/".$keyword["thumb"])){
|
|
if (unlink("data/thumbs/".$splitter[0]."/".$splitter[1]."/192x192/".$keyword["thumb"])){ echo(" -> 192x192 deleted"."<br>");}else{echo(" -> failed"."<br>");}
|
|
}
|
|
if (file_exists("data/thumbs/".$splitter[0]."/".$splitter[1]."/64x64/".$keyword["thumb"])){
|
|
if (unlink("data/thumbs/".$splitter[0]."/".$splitter[1]."/64x64/".$keyword["thumb"])){ echo(" -> 64x64 deleted"."<br>");}else{echo(" -> failed"."<br>");}
|
|
}
|
|
$u = DB::getRow("DELETE FROM pl_comments WHERE imageId=:1",$keyword["id"]);
|
|
$u = DB::getRow("DELETE FROM pl_unread WHERE imageid=:1",$keyword["id"]);
|
|
$u = DB::getRow("DELETE FROM pl_fav WHERE imageId=:1",$keyword["id"]);
|
|
}
|
|
|
|
$u = DB::query("DELETE FROM pl_images WHERE fame = 0 AND score < 10 ORDER BY logged ASC LIMIT 50",$keyword["id"]);
|
|
|
|
echo "<span style='background-color: #00FF00;'>Bilder entfernt aus der DB</span><br/>";
|
|
|
|
?>
|