|
include("setup.php");
//include("../scripts/functions.inc.php");
function encrypt_decrypt($action, $string) {
$output = false;
$encrypt_method = "AES-256-CBC";
$secret_key = 'er48#$5@';
$secret_iv = 'jhjhY&*gh^$';
$key = hash('sha256', $secret_key);
$iv = substr(hash('sha256', $secret_iv), 0, 16);
if( $action == 'encrypt' ) {
$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
$output = base64_encode($output);
}
else if( $action == 'decrypt' ){
$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
}
return $output;
}
if(isset($_GET['gp'])){
$encrypted_txt = encrypt_decrypt('encrypt', $_GET['gp']);
//echo $encrypted_txt.' '; $nick = encrypt_decrypt('decrypt', $_GET['gp']); //echo $encrypt_decrypt.' '; function totaldebits_1($d = 2, $f = 100, $point = '.', $comma = ',',$start=0){ $cash=(totaldebits / 100000 / $f * -1) + $start; return number_format($cash, $d, $point, $comma); } function cash_earnings_baner($d = 4, $f = 100, $point = '.', $comma = ',', $nick) { list ($cash)=@mysql_fetch_row(@mysql_query("select sum(amount) from " . mysql_prefix . "accounting where username='$nick' and type='cash' and amount>0 and unixtime=0 and description!='".dldescription."' limit 1")); $cash=$cash / 100000 / $f; if ($d=='return' && $d) return $cash; else return number_format($cash, $d, $point, $comma); } $stan_konta=cash_earnings_baner(4,100, '.', ',', $nick); $wyplaty=totaldebits_1(); $im=imagecreatefromjpeg("images/billboard.jpeg"); $scr = imagecreatetruecolor('468', '60'); if(!$im) { $im = imagecreatetruecolor(150, 30); $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 150, 30, $bgc); imagestring($im, 1, 5, 5, 'Error loading ' . $imgname, $tc); } $red = imagecolorallocate($im, 0xFF, 0x00, 0x00); $black = imagecolorallocate($im, 0x00, 0x00, 0x00); $font_file = 'Roboto-Black.ttf'; imagefttext($im, 13, 0, 500, 25, $black, $font_file, 'Zarobiłem: '.$stan_konta.'zł'); imagefttext($im, 13, 0, 500, 45, $black, $font_file, 'Wypłaciliśmy: '.$wyplaty.'zł'); imagecopyresized($scr, $im, 0, 0, 0, 0, '468', '60', '728', '80'); header('Content-Type: image/jpeg');imagejpeg($im, NULL, 90); imagedestroy($im); } else { echo ' Baner wyświetlający statystyki serwisu '; echo ''; //echo ' '; echo ' '; } ?> |