Smooth out remnants of public_html
This commit is contained in:
parent
08756e769b
commit
1ab9730db9
|
@ -13,7 +13,7 @@ if (!empty($_POST["desired_filename"])) {
|
|||
$file_name = sanitize_filename($file_name);
|
||||
|
||||
$dest_name = $GLOBALS["file_beam_dir"] . $file_name;
|
||||
$dest_file = root("public_html/" . $dest_name);
|
||||
$dest_file = root("/" . $dest_name);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ $visible_name = $url_alias . $GLOBALS["url_aliasize_visible_suffix"];
|
|||
$visible_dest = $GLOBALS["url_aliasize_dir"] . $visible_name;
|
||||
$dest_name = $GLOBALS["url_aliasize_dir"] . $url_alias
|
||||
. $GLOBALS["url_aliasize_suffix"];
|
||||
$dest_file = root("public_html/" . $dest_name);
|
||||
$dest_file = root("/" . $dest_name);
|
||||
|
||||
|
||||
switch (true) {
|
||||
|
|
Binary file not shown.
|
@ -4,18 +4,22 @@
|
|||
// This file contains some global configuration you might wanna do
|
||||
//
|
||||
|
||||
$site_name = "insert-coin"; // what the site will be called
|
||||
$root_name = "insert-coin"; // the directory containing this instance
|
||||
$site_name = "insert-coin"; // what the site will be called
|
||||
|
||||
$root = "/srv/www/htdocs/insert-coin"; // the absolute path of this instance
|
||||
$webroot = "/insert-coin/" // path of instance relative to
|
||||
// web-root (I.E., how it looks in
|
||||
// the URL without the hostname)
|
||||
|
||||
|
||||
|
||||
// vars related to URL shortening
|
||||
|
||||
$url_aliasize_img = "/res/img/mask-big.png";
|
||||
$url_aliasize_img = "res/img/mask-big.png";
|
||||
$url_aliasize_alt = "A mask, floating in mid-air.";
|
||||
$url_aliasize_win_img = "/res/img/mask_win-big.png";
|
||||
$url_aliasize_win_img = "res/img/mask_win-big.png";
|
||||
$url_aliasize_win_alt = "A whimsical mask sparkling.";
|
||||
$url_aliasize_die_img = "/res/img/mask_die-big.png";
|
||||
$url_aliasize_die_img = "res/img/mask_die-big.png";
|
||||
$url_aliasize_die_alt = "A whimsical mask on fire.";
|
||||
|
||||
$url_aliasize_item = "mask"; // what the alias is affectionately called
|
||||
|
@ -29,11 +33,11 @@ $url_aliasize_suffix = ".php"; // actual suffix in redirect links
|
|||
|
||||
// vars related to file uploading
|
||||
|
||||
$file_beam_img = "/res/img/coin-big.png";
|
||||
$file_beam_img = "res/img/coin-big.png";
|
||||
$file_beam_alt = "A big & yellow coin lying before a coin-slot";
|
||||
$file_beam_win_img = "/res/img/coin_win-big.png";
|
||||
$file_beam_win_img = "res/img/coin_win-big.png";
|
||||
$file_beam_win_alt = "A coin inserted into a coin slot.";
|
||||
$file_beam_die_img = "/res/img/coin_die-big.png";
|
||||
$file_beam_die_img = "res/img/coin_die-big.png";
|
||||
$file_beam_die_alt = "A coin on fire.";
|
||||
|
||||
$file_beam_item = "coin"; // what the file is affectionately called
|
||||
|
|
|
@ -14,7 +14,7 @@ function create_page($page_title, $template, $image_alt_text, $image_path)
|
|||
?>
|
||||
<img
|
||||
alt="<?php echo($image_alt_text); ?>"
|
||||
src="<?php echo(root($image_path)); ?>">
|
||||
src="<?php echo(webroot($image_path)); ?>">
|
||||
</main> <?php
|
||||
include(root("res/templates/footer.php"));
|
||||
?></body>
|
||||
|
|
|
@ -18,6 +18,13 @@ function root($path)
|
|||
return $absolute_path;
|
||||
}
|
||||
|
||||
// PATH_RELATIVE_TO_PROJECT_ROOT --> PATH_RELATIVE_TO_WEB_ROOT
|
||||
// Return the absolute path to something within the project's root.
|
||||
function webroot($path)
|
||||
{
|
||||
return $GLOBALS['webroot'] . $path;
|
||||
}
|
||||
|
||||
include(root("res/library/array.php"));
|
||||
include(root("res/library/file.php"));
|
||||
include(root("res/library/insert-coin.php"));
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
include("../config.php");
|
||||
include("main.php");
|
||||
|
||||
echo(valid_url("htt/coinsh.red/hello.php"));
|
|
@ -48,8 +48,7 @@ function make_url($path)
|
|||
{
|
||||
$url = protocol()
|
||||
. $_SERVER['HTTP_HOST']
|
||||
. "/"
|
||||
. $path;
|
||||
. webroot($path);
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<form action="private/beam.php" method="post" enctype="multipart/form-data">
|
||||
<form action="<?php echo webroot("private/beam.php")?>"
|
||||
method="post" enctype="multipart/form-data">
|
||||
<p>
|
||||
<input type="text" placeholder="Filename (Blank for uploaded name)"
|
||||
name="desired_filename" class="basic-text">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<li><a href="https://libregamenight.xyz">lgn</a></li>
|
||||
<li><a href="https://fsf.org">fsf</a></li>
|
||||
<li><a href="https://eunichx.us">eunichx</a></li>
|
||||
<li><a href="http://coinsh.red/rse/img/war_duck.png">
|
||||
<li><a href="http://4wxnumwn5zljjkyi.onion/">
|
||||
onion</a></li>
|
||||
<li><b><a href="https://git.eunichx.us/insert-coin.git">
|
||||
source-code</a></b></li>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
href="https://fontlibrary.org/face/connection" type="text/css"/>
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="<?php echo root("res/css/style.css") ?>">
|
||||
<link rel="shortcut icon" href="<?php echo root("res/img/coin.png") ?>">
|
||||
href="<?php echo webroot("res/css/style.css") ?>">
|
||||
<link rel="shortcut icon" href="<?php echo webroot("res/img/coin.png") ?>">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<form action="private/create.php" method="post" enctype="multipart/form-data">
|
||||
<form action="<?php echo webroot("private/create.php")?>"
|
||||
method="post" enctype="multipart/form-data">
|
||||
<p>
|
||||
<input type="text" placeholder="URL"
|
||||
name="url_target" class="basic-text">
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
<div class="menu top-menu">
|
||||
<h2><a href="/"><?php echo($GLOBALS["site_name"]); ?></a>
|
||||
<img id="duck"
|
||||
src="<?php echo root("/res/img/war_duck.png") ?>"
|
||||
<h2> <a href="<?php echo webroot(""); ?>">
|
||||
<?php echo($GLOBALS["site_name"]); ?>
|
||||
</a>
|
||||
<a href="<?php echo webroot("d"); ?>">
|
||||
<img id="duck"
|
||||
src="<?php echo webroot("res/img/war_duck.png") ?>"
|
||||
alt="Warduck lives!">
|
||||
</a>
|
||||
</h2>
|
||||
<ul>
|
||||
<li><a href="<?php echo root("coin.php"); ?>">file-beamer</a></li>
|
||||
<li><a href="<?php echo root("mask.php") ?>">url-shortener</a></li>
|
||||
<li><a href="<?php echo webroot("coin.php"); ?>">file-beamer</a></li>
|
||||
<li><a href="<?php echo webroot("mask.php") ?>">url-shortener</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Ŝarĝante…
Reference in New Issue