|
|
|
|
24
|
|
24
|
|
25
|
if ($_POST["type"]=="2") { // is Photo type
|
25
|
if ($_POST["type"]=="2") { // is Photo type
|
26
|
if (isset($_POST["url"]) && $_POST["url"]!="") {
|
26
|
if (isset($_POST["url"]) && $_POST["url"]!="") {
|
27
|
- $photoName = getFileName($_POST["url"]);
|
|
|
|
|
27
|
+ $photoName = util::getFileName($_POST["url"]);
|
28
|
if (!$tumble->savePhoto($_POST["url"])) {
|
28
|
if (!$tumble->savePhoto($_POST["url"])) {
|
29
|
header("Location: ".$conf->urlGelato."/admin/index.php?photo=false");
|
29
|
header("Location: ".$conf->urlGelato."/admin/index.php?photo=false");
|
30
|
die();
|
30
|
die();
|
31
|
}
|
31
|
}
|
32
|
$_POST["url"] = "../uploads/".util::sanitizeName($photoName);
|
32
|
$_POST["url"] = "../uploads/".util::sanitizeName($photoName);
|
33
|
- }
|
|
|
34
|
-
|
|
|
35
|
- if ( move_uploaded_file( $_FILES['photo']['tmp_name'], "../uploads/".sanitizeName($_FILES['photo']['name']) ) ) {
|
|
|
36
|
- $_POST["url"] = "../uploads/".util::sanitizeName($_FILES['photo']['name']);
|
|
|
37
|
- }
|
|
|
|
|
33
|
+ }
|
38
|
|
34
|
|
39
|
unset($_POST["photo"]);
|
35
|
unset($_POST["photo"]);
|
40
|
unset($_POST["MAX_FILE_SIZE"]);
|
36
|
unset($_POST["MAX_FILE_SIZE"]);
|
|
|
|
|
42
|
|
38
|
|
43
|
if ($_POST["type"]=="7") { // is MP3 type
|
39
|
if ($_POST["type"]=="7") { // is MP3 type
|
44
|
set_time_limit(300);
|
40
|
set_time_limit(300);
|
45
|
- $mp3Name = getFileName($_POST["url"]);
|
|
|
|
|
41
|
+ $mp3Name = util::getFileName($_POST["url"]);
|
46
|
if (!$tumble->saveMP3($_POST["url"])) {
|
42
|
if (!$tumble->saveMP3($_POST["url"])) {
|
47
|
header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false");
|
43
|
header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false");
|
48
|
die();
|
44
|
die();
|