*g* @alexx hab bissle dein Addon erweitert, hoffe das ist okay
pin_image.php (mit bisschen Farbe )
PHP-Code:
<?
header("Content-type: image/png");
$pin = rand(100,999);
session_start();
$_SESSION['pin_start'] = $pin;
$image = imagecreatetruecolor(90,40);
$color = ImageColorAllocate($image, 255, 255, 255);
$color1 = ImageColorAllocate ($image, 000, 000, 255);
$color2 = ImageColorAllocate($image, 000, 255, 000);
$color3 = ImageColorAllocate ($image, 255, 000, 000);
$color4 = ImageColorAllocate ($image, 255, 255, 000);
imageline($image, 0, 0, 20, 25, $color1);
imageline($image, 0, 0, 75, 15, $color2);
imageline($image, 65, 0, 0, 70, $color3);
imagestring ($image, 5, 25, 10, $pin, $color);
imageline($image, 10, 0, 500, 220, $color4);
imagepng($image);
?>
start_popup.php mit Klammeingabefeld
PHP-Code:
<script language="javascript" type="text/javascript">
function faul(zahl){
document.forms.form.pin.value=document.forms.form.pin.value+zahl;
document.forms.form.pin.focus();
}
</script>
<?
/////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\
//---> Sicherheitscodeabfrage (c) by alexx <---\\
//---> Platin-Casino.de <---\\
////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\
@require_once ('../lib/functions.lib.php');
db_connect();
@require_once ('../lib/session.lib.php');
@require_once ('../lib/layout.lib.php');
userstatus();
if ($_POST['ok']=='Gutschrift'){
if($_POST['pin'] == $_SESSION['pin_start']){
if ( md5($_SESSION['uid']."-".date("H:i")) == $_GET['key']) {
$reloadcheck = db_query("SELECT * FROM ".$db_prefix."_reloads WHERE uid = '".$_SESSION['uid']."' and tan = 'startseitenaufruf' and bis >= '".time()."'");
if (!mysql_num_rows($reloadcheck)) {
// Reload setzen und Umsätze schreiben
$new_reload = time()+$pageconfig['reload_start'];
db_query("INSERT INTO ".$db_prefix."_reloads (ip,uid,tan,bis) VALUES ('".$ip."','".$_SESSION['uid']."','startseitenaufruf','".$new_reload."')");
db_query("UPDATE ".$db_prefix."_kontodaten SET s_aufrufe = s_aufrufe + 1, s_verdienst = s_verdienst + ".$pageconfig['verdienst_start']." WHERE uid = '".$_SESSION['uid']."'");
kontobuchung ('+',$pageconfig['verdienst_start'],$_SESSION['uid']);
$buchungs_id = create_code(14);
buchungsliste ($buchungs_id,'+'.$pageconfig['verdienst_start'],'Vergütung Startseite', $_SESSION['uid']);
refumsatz ($pageconfig['verdienst_start'],$_SESSION['uid']);
aktivralley ($pageconfig['verdienst_start'],$_SESSION['uid']);
$starttext = '<b>Du hast gerade '.number_format($pageconfig['verdienst_start'],2,',','.').' '.$waehrung.' für diesen Aufruf erhalten!</b>';
} else {
$reloadcheck = mysql_fetch_array($reloadcheck);
$starttext = '<b><font color="#FF0000">Du bist noch für '. round((($reloadcheck['bis'] - time())/60),0) .' Minuten für den Startseitenaufruf gesperrt</font></b>';
}
head("");
echo '
<link rel="stylesheet" href="/css/main.css" type="text/css">
<div align="center">'.$starttext.'</div>
<br>
<br>
';
foot();
} else {
head("");
echo '
<link rel="stylesheet" href="/css/main.css" type="text/css">
<div align="center">Ungültiger Aufruf!!!</div>
<br>
';
foot();
}
db_close();
}else
{
if ($_POST['ok']=='Gutschrift')
{
head("");
echo '
<link rel="stylesheet" href="/css/main.css" type="text/css">
<div align="center">Der Sicherheitscode ist falsch!!!</div>
<br>
';
foot();
}
}
}
if (!$_POST['ok']=='Gutschrift'){
echo'
<script>
function data_check(){
if(document.form.pin.value==\'\'){
alert(\'Bitte Sicherheitscode eigeben!\');
return false;
}
}
</script>
<table>
<tr>
<form action="" name="form" method="POST" enctype="application/x-www-form-urlencoded">
<td><img src="pin_image.php" /><br>
<input type="text" size="3" name="pin" / style="width:90px"><br>
<input type="submit" value="Gutschrift" onclick="return data_check()" name="ok" />
</td>
<td align="right" colspan="2">
<form name="buttform">
<input onClick="javascript:faul(\'1\')" type="button" name="z1" value="1"><input onClick="javascript:faul(\'2\')" type="button" name="z2" value="2"><input onClick="javascript:faul(\'3\')" type="button" name="z3" value="3"><br /><input onClick="javascript:faul(\'4\')" type="button" name="z4" value="4"><input onClick="javascript:faul(\'5\')" type="button" name="z5" value="5"><input onClick="javascript:faul(\'6\')" type="button" name="z6" value="6"><br /><input onClick="javascript:faul(\'7\')" type="button" name="z7" value="7"><input onClick="javascript:faul(\'8\')" type="button" name="z8" value="8"><input onClick="javascript:faul(\'9\')" type="button" name="z9" value="9"><br /><input onClick="javascript:faul(\'0\')" type="button" name="z0" value="0">
</form>
</tr>
</table>
</form>
';
}
?>
Gruß
Gremlin