Pith - miter
miter/back/ditch/delete_file.php [0.6 kb]
Modified: 17:48:37 114 026 (11 Jul 026)
50 Days Ago
<?php
declare(strict_types=1);
session_start();

if (empty($_SESSION['miter'])) {
	header('Location: ../../index.php');
	exit;
}

if (isset($_GET['d'])) {
	$doc_name = basename((string)$_GET['d']);
	$doc_file = "docs/{$doc_name}";

	if (file_exists($doc_file) && is_file($doc_file)) {
		unlink($doc_file);
	}

	// log
	include '../admin/otc.php';
	$log_data = ($o_date . " -- Deleted File (Ditch): " . $doc_name . "\n");
	$log_file = '../admin/log.txt';
	
	file_put_contents($log_file, $log_data, FILE_APPEND | LOCK_EX);

	header('location:../../index.php?u=ditch');
	exit;
}
?>
Updates
Stave - Android 158.026
Kerf - Android 157.026
Kiln - Android 157.026
Wedge - Android 156.026
Whittle - Linux 155.026

Menu
Calendar
Project Tin (024/029)
Miter
RSS Feed
User Avatar
@vgmlr
=SUM(parts)
0.00303
260,565 (+979)