summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DB/change_db_to_v212.sql3
-rwxr-xr-xwww-ssl/admin/UserPicture.php102
-rw-r--r--www-ssl/inc/ShowUserPicture.php4
3 files changed, 108 insertions, 1 deletions
diff --git a/DB/change_db_to_v212.sql b/DB/change_db_to_v212.sql
new file mode 100644
index 00000000..9ac2fe97
--- /dev/null
+++ b/DB/change_db_to_v212.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `UserCVS` ADD `admin/UserPicture.php` VARCHAR( 1 ) DEFAULT 'N' NOT NULL AFTER `admin/userDefaultSetting.php`;
+INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/UserPicture.php', 'DE', 'Engel Bilder');
+INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) VALUES ('admin/UserPicture.php', 'EN', 'Angel pictures');
diff --git a/www-ssl/admin/UserPicture.php b/www-ssl/admin/UserPicture.php
new file mode 100755
index 00000000..798d5d84
--- /dev/null
+++ b/www-ssl/admin/UserPicture.php
@@ -0,0 +1,102 @@
+<?php
+$title = "UserPicture";
+$header = "Verwaltung der User Picture";
+include ("./inc/header.php");
+include ("./inc/funktion_user.php");
+include ("./inc/funktion_schichtplan_aray.php");
+
+
+if( IsSet($_GET["action"]) )
+{
+ UnSet($SQL);
+
+ switch ($_GET["action"])
+ {
+ case 'SetN':
+ if (IsSet($_GET["UID"]))
+ {
+ echo "Bild von '". UID2Nick( $_GET["UID"]). "' wurde gesperrt:<br>";
+ $SQL = "UPDATE `UserPicture` SET `show`='N' WHERE `UID`='". $_GET["UID"]. "'";
+ }
+ else
+ echo "Fehlerhafter Aufruf";
+ break;
+ case 'SetY':
+ if (IsSet($_GET["UID"]))
+ {
+ echo "Bild von '". UID2Nick( $_GET["UID"]). "' wurde Freigegeben:<br>";
+ $SQL = "UPDATE `UserPicture` SET `show`='Y' WHERE `UID`='". $_GET["UID"]. "'";
+ }
+ else
+ echo "Fehlerhafter Aufruf";
+ break;
+ case 'del':
+ echo "Wollen Sie das Bild von '". UID2Nick( $_GET["UID"]). "' wirklich löschen? ".
+ "<a href=\"./UserPicture.php?action=delYes&UID=". $_GET["UID"]. "\">Yes</a>";
+ break;
+ case 'delYes':
+ if (IsSet($_GET["UID"]))
+ {
+ echo "Bild von '". UID2Nick( $_GET["UID"]). "' wurde gelöscht:<br>";
+ $SQL = "DELETE FROM `UserPicture` WHERE `UID`='". $_GET["UID"]. "' LIMIT 1";
+ }
+ else
+ echo "Fehlerhafter Aufruf";
+ break;
+ default:
+ echo "Fehlerhafter Aufruf";
+
+ } //switch
+
+ // Update ???
+ if (IsSet($SQL))
+ {
+ // hier muesste das SQL ausgefuehrt werden...
+ $Erg = mysql_query($SQL, $con);
+ if ($Erg == 1)
+ echo "&Auml;nderung wurde gesichert...<br>";
+ else
+ {
+ echo "Fehler beim speichern... bitte noch ein mal probieren :)";
+ echo "<br><br>".mysql_error( $con ). "<br>($SQL)<br>";
+ }
+ } // Ende Update
+ echo "<br>\n<hr width=\"100%\">\n<br>\n\n";
+} //IF IsSet($action)
+
+
+//ausgabe der Liste
+$Sql = "SELECT * FROM `UserPicture` WHERE `UID`>0;";
+$Erg = mysql_query($Sql, $con);
+
+echo "Hallo ". $_SESSION['Nick']. ",<br>\nhier hast du die M&ouml;glichkeit, die Bilder der Engel freizugeben:<br><br>\n";
+
+echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
+echo "<tr class=\"contenttopic\">\n";
+echo "\t<td>User</td>\n";
+echo "\t<td>Bild</td>\n";
+echo "\t<td>Status</td>\n";
+echo "\t<td>Löschen</td>\n";
+echo "</tr>";
+
+for( $t = 0; $t < mysql_num_rows($Erg); $t++ )
+{
+ $UID = mysql_result($Erg, $t, "UID");
+ echo "\t<tr class=\"content\">\n";
+
+ echo "\t\t<td>". UID2Nick(mysql_result($Erg, $t, "UID")). "</td>\n";
+ echo "\t\t<td>". displayPictur( $UID, 0). "</td>\n";
+
+ if( GetPicturShow( $UID) == "Y")
+ echo "\t\t<td><a href=\"./UserPicture.php?action=SetN&UID=$UID\">sperren</a></td>\n";
+ elseif( GetPicturShow( $UID) == "N")
+ echo "\t\t<td><a href=\"./UserPicture.php?action=SetY&UID=$UID\">freigeben</a></td>\n";
+ else
+ echo "\t\t<td>ERROR: show='". GetPicturShow( $UID). "'</td>\n";
+ echo "\t\t<td><a href=\"./UserPicture.php?action=del&UID=$UID\">del</a></td>\n";
+ echo "\t</tr>\n";
+} // ende Auflistung Raeume
+echo "</table>";
+
+include ("./inc/footer.php");
+?>
diff --git a/www-ssl/inc/ShowUserPicture.php b/www-ssl/inc/ShowUserPicture.php
index f8185c3e..adad49cb 100644
--- a/www-ssl/inc/ShowUserPicture.php
+++ b/www-ssl/inc/ShowUserPicture.php
@@ -24,7 +24,9 @@ if( mysql_num_rows($res) == 1)
}
// ist das bild sichtbar?
- if( (mysql_result($res, 0, "show")=="N") AND ($_SESSION['UID']!=$_GET["UID"]) )
+ if( (mysql_result($res, 0, "show")=="N") AND
+ ($_SESSION['UID']!=$_GET["UID"]) AND
+ ($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N"))
{
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
$res = mysql_query( $SQL, $con);