summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaidyn Lev <jadedctrl@teknik.io>2018-04-08 02:15:07 +0000
committerJaidyn Lev <jadedctrl@teknik.io>2018-04-08 02:15:07 +0000
commit8373023f1c2621a8c7c66269e69b000027d304e6 (patch)
tree7f942d5514fdb909908f4ca6fe66dac60e306117
parent52668f35d46206632985ac190d66ada32119f160 (diff)
downloadinsert-coin-8373023f1c2621a8c7c66269e69b000027d304e6.zip
insert-coin-8373023f1c2621a8c7c66269e69b000027d304e6.tar.bz2
Added URL-display on file-submit page
-rw-r--r--beam.php2
-rw-r--r--lib.php20
2 files changed, 20 insertions, 2 deletions
diff --git a/beam.php b/beam.php
index 10c948d..13332bd 100644
--- a/beam.php
+++ b/beam.php
@@ -19,8 +19,6 @@ if (!empty($_POST["desired_filename"]))
PATHINFO_EXTENSION));
}
- echo($file_name);
-
$beaming_permitted = 0;
}
else if (!empty($_FILES["fileToUpload"]["name"]))
diff --git a/lib.php b/lib.php
index 2f8e364..00e408a 100644
--- a/lib.php
+++ b/lib.php
@@ -88,6 +88,25 @@ function url_to_filename($url)
return $filename;
}
+function get_cwd($url)
+{
+ $url_array = (explode("/", $url));
+
+ if (end($url_array))
+ {
+ $parts = count($url_array);
+
+ $url = implode(array_splice($url_array, 1, $parts - 2));
+
+ return $url;
+ }
+ else
+ {
+ return $url;
+ }
+}
+
+
function celebrate($dest_file, $item_type, $image_url, $image_alt, $meta_data = false)
{
@@ -100,6 +119,7 @@ function celebrate($dest_file, $item_type, $image_url, $image_alt, $meta_data =
<p>Your <?php echo($item_type); ?>'s
<a href="<?php echo ($dest_file); ?>">over here</a></p>
+ <p><b><?php echo("https://" . get_cwd($_SERVER["REQUEST_URI"]) . "/" . $dest_file); ?></b></p>
<?php
if ($meta_data)
{