From 39d6dd59160aa8b836309743950e5c5bf9d2a459 Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 27 Feb 2010 13:52:39 +0000 Subject: Remove some old unused admin files. --- utils/admin_events.php | 85 -------------------------- utils/admin_gallery.php | 108 --------------------------------- utils/admin_guestbook.php | 2 - utils/admin_newsletter.php | 55 ----------------- utils/admin_pressrelease.php | 55 ----------------- utils/album.php | 139 ------------------------------------------- 6 files changed, 444 deletions(-) delete mode 100644 utils/admin_events.php delete mode 100644 utils/admin_gallery.php delete mode 100644 utils/admin_guestbook.php delete mode 100644 utils/admin_newsletter.php delete mode 100644 utils/admin_pressrelease.php delete mode 100644 utils/album.php diff --git a/utils/admin_events.php b/utils/admin_events.php deleted file mode 100644 index 058b9de..0000000 --- a/utils/admin_events.php +++ /dev/null @@ -1,85 +0,0 @@ -

Events

-show(); -?> -Is this correct?
-
- - - - - - -
-
- - - - - - -
- - -add($event); - $events->write(); - - echo "

Event posted successfully.

"; - $title = ""; - $day = ""; - $month = ""; - $year = ""; - $description = ""; -} -?> - - -
Post event
-
-

- Title: -

-

- Date: / - - - -

-

- Description:
- -

- -
diff --git a/utils/admin_gallery.php b/utils/admin_gallery.php deleted file mode 100644 index b584229..0000000 --- a/utils/admin_gallery.php +++ /dev/null @@ -1,108 +0,0 @@ -

Gallery

- - - -"; - echo $albumcopyright . "
"; - echo $albumdir . "
"; - mkdir($albumdir); - $xml = "\n"; - $xml .= "\n"; - $xml .= "\n"; - $fp = fopen($albumdir . "/album.xml", "w"); - fprintf($fp, $xml); - fclose($fp); -} -?> - -"; - echo $description . "
"; - echo $_FILES['userfile']['tmp_name'] . "
"; - - if($_FILES['userfile']['tmp_name'] != "") { - echo "Filename [". $_FILES['userfile']['tmp_name'] . "]"; - if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { - echo "File ". $_FILES['userfile']['name'] ." uploaded successfully.\n"; - - $outputfile = time() . ".jpg"; - - $image = imagecreatefromjpeg($_FILES["userfile"]["tmp_name"]); - list($w, $h) = getimagesize($_FILES["userfile"]["tmp_name"]); - - // output size and quality - $quality = 80; - - $max = 530; - - $width = 530;; - $height = 380; - - if($w > $h) { - $width = 530; - $height = 530 / $w * $h; - } else { - $height = 530; - $width = 530 / $h * $w; - } - $image_p = imagecreatetruecolor($width, $height); - imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $w, $h); - imagejpeg($image_p, $ALBUMS_DIR ."/" .$album ."/" .$outputfile, $quality); - - $photo = new Photo($outputfile, $description); - $album = new Album($album); - $album->add($photo); - $album->write(); - - } else { - echo "Possible file upload attack: "; - echo "filename '". $_FILES['userfile']['tmp_name'] . "'."; - } - } -} -?> - -
New album
-
-

- Title: -

-

- Copyright: -

-

- -

-
- -
Upload image
-
-

- Album: - -

-

- Description: - -

-

- Upload this image: - -

-

- -

-
diff --git a/utils/admin_guestbook.php b/utils/admin_guestbook.php deleted file mode 100644 index ebdefbf..0000000 --- a/utils/admin_guestbook.php +++ /dev/null @@ -1,2 +0,0 @@ -

Guestbook

-... nothing to see here ... yet! \ No newline at end of file diff --git a/utils/admin_newsletter.php b/utils/admin_newsletter.php deleted file mode 100644 index 29275ab..0000000 --- a/utils/admin_newsletter.php +++ /dev/null @@ -1,55 +0,0 @@ -

Newsletter

-send(utf8_decode(stripslashes($subject)), utf8_decode(stripslashes($message))); - echo "A testmail has been sent to " . $testaddr . ". Check this email to berify the correctness of the contents."; - -?> -Is the newsmail correct?
-
- - - - -
-
- - - - -
- - -post(utf8_decode(stripslashes($subject)), utf8_decode(stripslashes($message))); -} -?> - -
Post newsletter
-
-

- Test address: - -

-

- Subject: - -

-

- Message:
- -

-

- -

-
diff --git a/utils/admin_pressrelease.php b/utils/admin_pressrelease.php deleted file mode 100644 index 65ba35a..0000000 --- a/utils/admin_pressrelease.php +++ /dev/null @@ -1,55 +0,0 @@ -

Pressrelease

-send(utf8_decode(stripslashes($subject)), utf8_decode(stripslashes($message))); - echo "A testmail has been sent to " . $testaddr . ". Check this email to berify the correctness of the contents."; - -?> -Is the press mail correct?
-
- - - - -
-
- - - - -
- - -post(utf8_decode(stripslashes($subject)), utf8_decode(stripslashes($message))); -} -?> - -
Post pressrelease
-
-

- Test address: - -

-

- Subject: - -

-

- Message:
- -

-

- -

-
diff --git a/utils/album.php b/utils/album.php deleted file mode 100644 index 696e75e..0000000 --- a/utils/album.php +++ /dev/null @@ -1,139 +0,0 @@ -file = $file; - $this->text = $text; - } -} - -class Album { - // Album directory (and identifier) - public $album; - - // Photo array - public $photos; - - // Album data - public $title; - public $icon; - public $copyright; - - public function add($photo) { - // First added image is automatically made album icon. - if($this->icon == "") $this->icon = $photo->file; - - $key = $photo->file; - $this->photos[$key] = $photo; - } - - public function write() - { - $fp = fopen($this->file, "w"); - fwrite($fp, "\n"); - - fwrite($fp, "title . "\" icon=\"".$this->icon."\" copyright=\"" . $this->copyright . "\">\n"); - foreach($this->photos as $photo) { - fwrite($fp, " file . "\"\n"); - fwrite($fp, " text=\"" . $photo->text . "\">\n"); - fwrite($fp, " \n"); - } - fwrite($fp, "\n"); - - fclose($fp); - } - - private function read() - { - - $dom = new DomDocument; - $dom->preserveWhiteSpace = FALSE; - $dom->load($this->file); - - $params = $dom->getElementsByTagName('album'); - foreach ($params as $param) { - $this->title = $param->getAttribute('title'); - $this->icon = $param->getAttribute('icon'); - $this->copyright = $param->getAttribute('copyright'); - } - - $params = $dom->getElementsByTagName('photo'); - foreach ($params as $param) { - $photo = new Photo($param->getAttribute('file'), $param->getAttribute('text')); - $this->add($photo); - } - - // Key sort - if(sizeof($this->photos) > 0) ksort($this->photos); - } - - public function Album($album) - { - global $ALBUMS_DIR; - $this->album = $album; - $this->file = $ALBUMS_DIR ."/". $album . "/album.xml"; - $this->read(); - } - -} - - -function getAllAlbums() -{ - global $ALBUMS_DIR; - $albums = array(); - - $handle = opendir($ALBUMS_DIR . "/"); - $albumdirs = array(); - while($albumdir = readdir($handle)) { - array_push($albumdirs, $albumdir); - } - - rsort($albumdirs); - - foreach($albumdirs as $albumdir) { - if(!strstr($albumdir, ".") && !strstr($albumdir, "..")) { - $album = new Album($albumdir); - array_push($albums, $album); - } - } - - return $albums; -} - -function getRandomPhoto() -{ - $album; - $photo; - - $albums = getAllAlbums(); - - $numalbums = sizeof($albums); - $ralbum = rand(0, sizeof($albums)-1); - foreach($albums as $a) { - $album = $a; - $ralbum--; - if(!$ralbum) break; - } - - $numphotos = sizeof($album->photos); - $rphoto = rand(0, $numphotos-1); - if($album->photos) { - foreach($album->photos as $p) { - $photo = $p; - $rphoto--; - if(!$rphoto) break; - } - } - - // echo "

".$numalbums . " " .$ralbum . " ".$numphotos . " ".$rphoto . "

"; - - return array($album, $photo); -} - - -?> \ No newline at end of file -- cgit v1.2.3