Browse Source

Minor fixes

pecesama 17 years ago
parent
commit
469e397185
4 changed files with 7 additions and 20 deletions
  1. 4 4
      admin/add.php
  2. 1 14
      admin/user.php
  3. 1 1
      classes/configuration.class.php
  4. 1 1
      config-sample.php

+ 4 - 4
admin/add.php View File

@@ -30,7 +30,7 @@ if ($user->isAdmin()) {
30 30
 			if (isset($_POST["url"]) && $_POST["url"]!="")  {			
31 31
 				$photoName = getFileName($_POST["url"]);
32 32
 				if (!$tumble->savePhoto($_POST["url"])) {
33
-					header("Location: ".$this->conf->urlGelato."/admin/index.php?photo=false");
33
+					header("Location: ".$conf->urlGelato."/admin/index.php?photo=false");
34 34
 					die();
35 35
 				}
36 36
 				$_POST["url"] = $conf->urlGelato."/uploads/".$photoName;
@@ -48,7 +48,7 @@ if ($user->isAdmin()) {
48 48
 			set_time_limit(300);
49 49
 			$mp3Name = getFileName($_POST["url"]);
50 50
 			if (!$tumble->saveMP3($_POST["url"])) {
51
-				header("Location: ".$this->conf->urlGelato."/admin/index.php?mp3=false");
51
+				header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false");
52 52
 				die();
53 53
 			}
54 54
 			$_POST["url"] = $conf->urlGelato."/uploads/".$mp3Name;
@@ -59,10 +59,10 @@ if ($user->isAdmin()) {
59 59
 			//$tumble->modifyPost($_POST, $_POST["id_post"]);
60 60
 		} else {			
61 61
 			if ($tumble->addPost($_POST)) {
62
-				header("Location: ".$this->conf->urlGelato."/admin/index.php?added=true");
62
+				header("Location: ".$conf->urlGelato."/admin/index.php?added=true");
63 63
 				die();
64 64
 			} else {
65
-				header("Location: ".$this->conf->urlGelato."/admin/index.php?error=2&des=".$this->merror);
65
+				header("Location: ".$conf->urlGelato."/admin/index.php?error=2&des=".$this->merror);
66 66
 				die();
67 67
 			}
68 68
 		}	

+ 1 - 14
admin/user.php View File

@@ -168,20 +168,7 @@ if ($user->isAdmin()) {
168 168
 								<p>
169 169
 									<label for="website">website:</label>
170 170
 										<input class="input-text" name="website" id="website" type="text" value="<?=isset($register["website"])?$register["website"]:"";?>" />
171
-								</p>
172
-								<p>
173
-									<label for="template">template:</label>
174
-									<select name="template" id="template">
175
-<?
176
-									$themes = getThemes();
177
-									$num_elements = count($themes);
178
-									
179
-									for ($i=0; $i < $num_elements; $i++) {
180
-										echo "<option value=\"".$themes[$i]."\">".$themes[$i]."</option>\n";											
181
-									}
182
-?>
183
-									</select>
184
-								</p>
171
+								</p>								
185 172
 								<p>
186 173
 									<label for="about">about:</label><br />
187 174
 										<textarea rows="5" cols="50" name="about" id="about" tabindex="7"><?=isset($register["about"])?$register["about"]:"";?></textarea>

+ 1 - 1
classes/configuration.class.php View File

@@ -10,7 +10,7 @@
10 10
 ?>
11 11
 <?
12 12
 
13
-include "config.php";
13
+include dirname(__FILE__)."/../config.php";
14 14
 
15 15
 class configuration extends Conexion_Mysql {
16 16
 	

+ 1 - 1
config-sample.php View File

@@ -27,4 +27,4 @@
27 27
 	header("Cache-Control: post-check=0, pre-check=0", false);
28 28
 	header("Pragma: no-cache");
29 29
 	require_once(Absolute_Path."classes/mysql_connection.class.php");
30
-?> 
30
+?>