writelog($actionstring, "moderator"); } if ($pindelta > 0) { $actionstring = "pin\tt:" . $postarray['id'] . "\tb:" . $postarray['board'] . "\tv:" . $pin; writelog($actionstring, "moderator"); } if ($psagedelta > 0) { $actionstring = "psage\tt:" . $postarray['id'] . "\tb:" . $postarray['board'] . "\tv:" . $psage; writelog($actionstring, "moderator"); } // Since we know it exists, let's fetch its images. $postarray['images'] = $db->getimgs($postarray['imgidx']); foreach ($postarray['images'] as $img) { if ($_POST['remimage' . strval($img['hash'])] != 0 && isset($_POST['remimage' . strval($img['hash'])])) { // Make the DB call to delete the image $db->deleteimage($postarray['imgidx'], strval($img['hash']), $img['extra_info']); // And delete the physical file $path = THpath . "images/" . $postarray['imgidx'] . "/"; unlink($path . $img['name']); unlink($path . $img['tname']); // Log this action $actionstring = "Delete img\timgidx:" . $postarray['imgidx'] . "\tn:" . $img['name']; writelog($actionstring, "moderator"); } } } if (isset($_POST['modban']) || isset($_POST['moddo'])) { if ($_POST['modban'] != "nil" || $_POST['moddo'] != "nil") { $moddb = new ThornModDBI(); //Get post $targetid = $postarray['id'];