fix typo and remove some globals

main
Jan-Philipp Litza 13 years ago
parent 1342dc49cf
commit e9193a7161

@ -155,10 +155,10 @@ function user_settings() {
echo "</form>\n";
}
switch (GetPicturShow($_SESSION['UID'])) {
switch (GetPictureShow($_SESSION['UID'])) {
case 'Y' :
echo Get_Text('pub_einstellungen_PictureShow') . "<br />";
echo displayPictur($_SESSION['UID'], 0);
echo displayPicture($_SESSION['UID'], 0);
echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
echo "<input type=\"submit\" value=\"" . Get_Text("delete"), "\">\n";
@ -166,7 +166,7 @@ function user_settings() {
break;
case 'N' :
echo Get_Text('pub_einstellungen_PictureNoShow') . "<br />";
echo displayPictur($_SESSION['UID'], 0);
echo displayPicture($_SESSION['UID'], 0);
echo "<form action=\"./einstellungen.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"delPicture\">\n";
echo "<input type=\"submit\" value=\"" . Get_Text("delete"), "\">\n";
@ -217,7 +217,7 @@ function user_settings() {
if (($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/gif")) {
$data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"])));
if (GetPicturShow($_SESSION['UID']) == "")
if (GetPictureShow($_SESSION['UID']) == "")
$SQL = "INSERT INTO `UserPicture` " .
"( `UID`,`Bild`, `ContentType`, `show`) " .
"VALUES ('" . $_SESSION['UID'] . "', '$data', '" . $_FILES["file"]["type"] . "', 'N')";

@ -33,8 +33,6 @@ function TID2Type($TID) {
}
function ReplaceSmilies($neueckig) {
global $url, $ENGEL_ROOT;
$neueckig = str_replace(";o))", "<img src=\"pic/smiles/icon_redface.gif\">", $neueckig);
$neueckig = str_replace(":-))", "<img src=\"pic/smiles/icon_redface.gif\">", $neueckig);
$neueckig = str_replace(";o)", "<img src=\"pic/smiles/icon_wind.gif\">", $neueckig);
@ -59,7 +57,7 @@ function ReplaceSmilies($neueckig) {
return $neueckig;
}
function GetPicturShow($UID) {
function GetPictureShow($UID) {
global $con;
$SQL = "SELECT `show` FROM `UserPicture` WHERE `UID`='" . sql_escape($UID) . "'";
@ -71,7 +69,7 @@ function GetPicturShow($UID) {
return "";
}
function displayPictur($UID, $height = "30") {
function displayPicture($UID, $height = "30") {
global $url, $ENGEL_ROOT;
if ($height > 0)
@ -83,8 +81,8 @@ function displayPictur($UID, $height = "30") {
function displayavatar($UID, $height = "30") {
global $con, $url, $ENGEL_ROOT;
if (GetPicturShow($UID) == 'Y')
return "&nbsp;" . displayPictur($UID, $height);
if (GetPictureShow($UID) == 'Y')
return "&nbsp;" . displayPicture($UID, $height);
$user = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($UID) . " LIMIT 1");
if (count($user) > 0)

Loading…
Cancel
Save