<?php

##############################################################################
// eCards Virtual Greeting Card System
// Copyright (C) 2004 by 4n-community.de
// http://www.4n-community.de
// http://www.xybersystem.net
// ---------------------------------------------------------------------------
// LICENSE:
// This Script is copyright of www.4n-community.de and may free of charge be used exclusively for private homepage.
// For free use  must all copyright notices unchanged in the Script! Also not be removed, converted, hidden or made invisible.
// If you liked not to indicate the copyright reference or the Script on commercial sides begin, you can acquire a license (= > LIZENZ.txt)!
// ---------------------------------------------------------------------------
// Filename: Card_V7.1 & XCard 0.7.3
// Original Author: Lothar Dambowsky
// Ported & modified by Inhyun Choi
// Purpose: Create via web a Virtual Greeting Card
// ---------------------------------------------------------------------------
// Forum to the Script of: http://www.xybersystem.net
##############################################################################

if (!eregi("admin.php", $PHP_SELF)) { die ("접근이 거절되었습니다."); }
include("header.php");
include("config.php");
include('modules/Card/include.php');
$index=0;

if (isset($lang)) {
    include("modules/Card/language/lang-$lang.php");
    $language = $lang;
} else {
    include("modules/Card/language/lang-$language.php");
}

OpenTable();

if ($af=="1") {
echo "<center><br><h5>"._MENUECHECKPIC."</h5></center>";
echo "<center>[ <a href='admin.php?op=menue&kill=$kill&th=$th&af=2&ziel=$ziel'><b> "._MENUEYES." </b></a>| <a href='admin.php?op=menue&af=0&ziel=$ziel'><b> "._MENUENO." </b></a>]</center><br><br>";
CloseTable(); exit();}
$dat= "modules/Card/image/$ziel/$kill";
if ($af=="2"){if (@unlink($th)) {@chmod ($dat, 0777); @unlink("$dat");}}


$pfadt= "modules/Card/image/$ziel/";
$verz=@opendir ($pfadt);
$thumb = array ();
if (isset($ziel)){
while ($filet = @readdir ($verz)) { if($filet != "." && $filet != ".." && $filet != "index.htm") {array_push($thumb,"$filet");}}
@closedir($verz);}


if ($bl=="1") {
echo "<center><br><h5>"._MENUECHECKALL."</h5></center>";
echo "<center>[ <a href='admin.php?op=menue&bl=2&ziel=$ziel'><b> "._MENUEYES." </b></a>| <a href='admin.php?op=menue&bl=0&ziel=$ziel'><b> "._MENUENO." </b></a>]</center><br><br>";
CloseTable(); exit();}
if ($bl=="2"){
foreach($thumb as $bildx){
$pfadd="$pfadt$bildx";
@chmod ($pfadd, 0777);
@unlink($pfadd);
$thumb=array();}}

echo "<center><b>"._MENUECOPYRIGHT."<hr></b>";


echo "<br><center><table border='1' bgcolor=\"$bgcolor2\" cellpadding='6' bordercolor='#000000'><tr><td><br><h3 class='album'>&nbsp; "._CARDCATEGORY." $ziel &nbsp;</h3></td></tr></table></center>";
echo "<br><center><big><b>"._MENUEUPLOAD."</b></big></center><br>";
echo ""._MENUEFILEINFO."";
echo "<form action='admin.php?op=upload1&ziel=$ziel' enctype='multipart/form-data' method='POST'>
<input type='hidden' name='MAX_FILE_SIZE' value='100000'>
<br><input class=input name='datei' type='file' size='30'><br>
<br><b>"._MENUEREWRITE."&nbsp;&nbsp;</b>
"._MENUEYES." <input type=radio name=ueber value=1> &nbsp;
"._MENUENO." <input type=radio name=ueber value=0 checked><br><br>
<input type=submit value='"._MENUEFILELOAD."'><br><br>";
echo "<hr width='60%'><center>"._MENUEUPINFO."</center><br>";
echo "<input type='submit' value='"._MENUETHUMBCREATE."' name='action'><hr width='60%'></form></center>";


$i=="0";
echo "<center><big><b>"._MENUEPICDELETE."</b></big><br><br></center>";

echo "<center><table border='1' width='90%' cellpadding='6'><tr>";
foreach($thumb as $thum){
if ($thum = stristr($thum,"th_")){
$bild="modules/Card/image/$ziel/$thum";
$name=substr($thum, 3);
$bi="modules/Card/image/$ziel/$name";
@$info = getimagesize($bi);
$wh = $info [3];
@$info2 = filesize ($bi);
$w = $info[0]; $h = $info[1];
echo "<td><center><a  href=\"#\" onClick=\"window.open('modules/Card/image/$ziel/$name','neuesfenster','width=$w,height=$h,directories=no,location=no,menubar=no,scrollbars=auto,status=no,toolbar=no,resizable=yes,');return false\"><img src='$bild' border='0'></a></center></td>";
echo "<td><br><li><b> $name </b></li><br><br><li>$wh</li><br><br><li>"._MENUEFILESIZE." $info2 "._MENUEBYTE."</li>";
echo "<form method='POST' action='admin.php?op=menue&kill=$name&th=$bild&af=1&thum1=$thum1&ziel=$ziel'>
<input type='submit' value=' "._MENUEPICDEL." ' ></form>
</td>";
$i++; $ii=("2"-$i);
if ($ii == "0" ){ echo "</tr><tr>"; $i= "0";}}}
echo "</td></tr></table></center>";

foreach($thumb as $inhalt);
if ($inhalt==""){echo "<center><br> "._MENUEKATDELINFO."</center><br>";} else {
echo "<center><br><b></b><br><form action='admin.php?op=menue&ziel=$ziel&bl=1' method='POST'>";
echo "<input type=submit value='"._MENUEPICALLDEL."' name='action'></form></center>";}

echo "<center><a href=\"admin.php?op=card\"><h5>"._MENUEBACKTOK."</h5></a></center>";
echo "<br><hr>";
// Dieser Link muss erhalten bleiben und darf nicht entfernt werden - not edit or remove this link, thanks!
echo "<center><a title='Module &copy Information' href=\"#\" onClick=\"window.open('modules/Card/modul.php','neuesfenster','width=400,height=300,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes,');return false\">eCard-Modul</a> phpNuke &copy by <a href='http://www.4n-community.de' target='_blank'>4n-community</center>";

CloseTable();
include("footer.php")

?>
