+ + +
diff --git a/admin/bm.php b/admin/bm.php new file mode 100644 index 0000000..d539de3 --- /dev/null +++ b/admin/bm.php @@ -0,0 +1,221 @@ + + + =========================== */ +?> +isAdmin()) { + + if(isset($_POST["btnAdd"])) { + unset($_POST["btnAdd"]); + + if ($_POST["type"]=="2") { // is Photo type + if (isset($_POST["url"]) && $_POST["url"]!="") { + $photoName = getFileName($_POST["url"]); + if (!$tumble->savePhoto($_POST["url"])) { + header("Location: ".$conf->urlGelato."/admin/index.php?photo=false"); + die(); + } + $_POST["url"] = "../uploads/".sanitizeName($photoName); + } + + if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".sanitizeName($_FILES['photo']['name']) ) ) { + $_POST["url"] = "../uploads/".sanitizeName($_FILES['photo']['name']); + } + + unset($_POST["photo"]); + unset($_POST["MAX_FILE_SIZE"]); + } + + if ($_POST["type"]=="7") { // is MP3 type + set_time_limit(300); + $mp3Name = getFileName($_POST["url"]); + if (!$tumble->saveMP3($_POST["url"])) { + header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false"); + die(); + } + if (isMP3($remoteFileName)) { + $_POST["url"] = $conf->urlGelato."/uploads/".$mp3Name; + } + } + + if (!get_magic_quotes_gpc()) { + $_POST["title"] = addslashes($_POST["title"]); + $_POST["description"] = addslashes($_POST["description"]); + } + + $_POST["title"] = strip_tags($_POST["title"]); + $_POST["description"] = strip_tags($_POST["description"]); + + if ($tumble->addPost($_POST)) { + header("Location: ".$conf->urlGelato."/admin/index.php?added=true"); + die(); + } else { + header("Location: ".$conf->urlGelato."/admin/index.php?error=2&des=".$this->merror); + die(); + } + } else { + + if (isset($_GET["url"])) { + $url = $_GET["url"]; + } else { + $url = null; + } + if (isset($url)) { + + if (isMP3($url)) { + $postType = "mp3"; + } elseif (isGoEar($url)) { + $postType = "mp3"; + } elseif (isImageFile($url)) { + $postType = "photo"; + } elseif (isVideo($url)) { + $postType = "video"; + } else { + if (isset($_GET["sel"]) && !$_GET["sel"]=="" ) { + $postType = "post"; + } else { + $postType = "url"; + } + } + + } else { + die(__("Must be a valid URL")); + } +?> + + +
+ + ++ + +
- Textile
+
+ Textile
+
+ Bookmarklet -
+
post" />