<script LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
if (document.layers){
window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
window.onmousedown=rightclick;
window.onmouseup=rightclick;
function rightclick(e) {
if (e.which == 3) {
// Put right mouse code here
alert('Sorry, this Picture is copyright !');
return false;
}
else {
return true;
}
}
}
if (document.all){
function click() {
if (event.button==2) {
alert('Sorry, this Picture is copyright !')
}
if (event.button==3) {
alert('Sorry, this Picture is copyright !')}
}
document.onmousedown=click
}
// -->
</script>
<?php

##############################################################################
// eCards Virtual Greeting Card System
// Copyright (C) 2004 by 4n-community.de
// http://www.4n-community.de
// ---------------------------------------------------------------------------
// 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
// Original Author: Lothar Dambowsky
// Purpose: Create via web a Virtual Greeting Card
// ---------------------------------------------------------------------------
// Forum to the Script of: http://www.4n-community.de/modules.php?name=4nForum
##############################################################################

if (!isset($mainfile)) { include("mainfile.php");}
include('header.php');
include('modules/Card/include.php');
$index=0;
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

OpenTable();

$kategorien = array ();
$kategorie = array ();
$bilder = array ();
$verz=opendir ('modules/Card/image/');
while ($kateg = readdir ($verz)){if($kateg != "." && $kateg != ".." && $kateg != "index.htm")
{$k++; array_push($kategorie,"$kateg");}}
foreach($kategorie as $kate) {
$pfad="modules/Card/image/$kate/";
$verz2=opendir ($pfad);
while ($bild = readdir ($verz2))
{if($bild != "." && $bild != ".." && $bild != "index.htm" && $bild != stristr($bild,"th_")){
array_push($bilder,"$bild");
array_push($kategorien,"$kate");
}}}
closedir($verz);
closedir($verz2);

$j = sizeof($bilder);
$iii=("$j"-"2");
$ii=("$j"-"1");
if (!isset($i)) {$i="-1"; }
if ($i>=$ii) {$i="-1";}
$i++; 
$pic="$bilder[$i]";
$p="$i"+"1";
$pre="$bilder[$p]";
$kat="$kategorien[$i]";
$picn="image/$kat/$pic";
$katp="$kategorien[$p]";
$preload="modules/Card/image/$katp/$pre";
?>
<script LANGUAGE="JavaScript" TYPE="text/javascript">
<!-- Preload
var preload = new Image();
preload.src = "<? echo "$preload"; ?>";
function doGIF() {
document['form.button'].src = preload.src;
}
// End -->
</script>
<?php
echo "<center><h3>"._CARDALLPREVIEWS."</h3></center>";

echo "<center><form name='button' method='POST' action='modules.php?name=Card&file=show&i=$i&kateg=$kateg'>";
echo "<input type='submit' value='"._CARDNEXT."'></form></center>";
echo "<center><b>"._CARDALTOGETHER." $j "._CARDPICIN." $k "._CARDCATEGORYS."</b><br>"._CARDPIC." $p <br><br>";
echo "<a href='modules.php?name=Card&file=start&picture=$picn'><img src='modules/Card/image/$kat/$pic' border='0'></a></center>";
$pica=substr($pic, 0, -4);
echo "<center><br> $pica</center>";
echo "<center><a href='modules.php?name=Card'><h5>"._CARDBACKTOA."</h5></a></center>";
if(file_exists("modules/Card/file.php")){include "modules/Card/file.php"; CloseTable(); include("footer.php");}

// Dieser Link muss erhalten bleiben und darf nicht entfernt werden - not edit or remove this link, thanks !
echo "<br><hr><center>eCard Modul-PHP-Nuke &copy by <a href='http://www.4n-community.de' target='_blank' title='www.4n-community.de'>4n-community</center>";

CloseTable();

include("footer.php");

?>
