код (+/-)
<?php
/*
////////////////////////////////////////////////////////////////////////////////
// JohnCMS Mobile Content Management System //
// Project site: http://johncms.com //
// Support site: http://gazenwagen.com //
////////////////////////////////////////////////////////////////////////////////
// Lead Developer: Oleg Kasyanov (AlkatraZ) alkatraz@gazenwagen.com //
// Development Team: Eugene Ryabinin (john77) john77@gazenwagen.com //
// Dmitry Liseenko (FlySelf) flyself@johncms.com
Mod by EcHo Texas
echo.texas@mail.ru //
////////////////////////////////////////////////////////////////////////////////
*/
define('_IN_JOHNCMS', 1);
require('../incfiles/core.php');
$kt = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `id`='".$id."'"), 0);
if($kt == 0) {
echo '<div class="rmenu">Доступ запрещен!</div>';
exit;
}
$res = mysql_fetch_assoc(mysql_query("SELECT `name`, `datereg`,`postchat`, `rights`,`balans` FROM `users` WHERE `id`='".$id."'"));
$arank = $res['postchat'];
if ($arank = 0)
$arank = 'Newbie';
elseif ($arank <= 9)
$arank = 'Newbie';
elseif ($arank <= 30)
$arank = 'Addict';
elseif ($arank <= 70)
$arank = 'Royal';
elseif ($arank <= 120)
$arank = 'Golden';
elseif ($arank <= 190)
$arank = 'Platinum';
elseif ($arank <= 270)
$arank = 'fvip';
elseif ($arank <= 340)
$arank = 'Legend';
elseif ($arank <= 440)
$arank = 'Freak';
elseif ($arank >= 500)
$arank = 'Big Boss';
if (!empty($res['rights'])){
$pa = $res['rights'];
}else{
$pa = $arank;
}
$rank = array(
0 => ''.$pa.'',
3 => 'Moderator',
6 => 'S Moderator',
7 => 'Pro Admin',
9 => 'C.E.O Founder'
);
if(isset($id)) {
if(file_exists(('../files/users/avatar/'.$id.'.png'))) {
$stamp=imagecreatefrompng('../files/users/avatar/'.$id.'.png');
} else {
$stamp=imagecreatefrompng('../images/empty.png');
}
$im=imagecreatefrompng('center/he.png');
$rong = imagesx($im);
$cao = imagesy($im);
$marge_right=52;
$marge_bottom=67;
$sx=imagesx($stamp);
$sy=imagesy($stamp);
imagecopyresized($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, 65, 70, imagesx($stamp), imagesy($stamp));
$white=imagecolorallocate($im,255,255,255);
$grey=imagecolorallocate($im,128,128,128);
$black=imagecolorallocate($im,0,0,0);
$font = 'center/arrusb.ttf';
$company = 'V4ate.ru';
imagettftext($im,10,0,2,17, $white,$font,$company);
$text = 'Визитка ID:'.$id.'';
imagettftext($im,8,0,2,35, $white,$font,$text);
$text1 = 'Имя: '.$res['name'].'';
imagettftext($im,7,0,2,65, $black,$font,$text1);
$text4 = 'Посты: '.$res['postchat'].'';
imagettftext($im,7,0,2,79, $black,$font,$text4);
$text5 = 'Баллы: '.$res['balans'].'';
imagettftext($im,7,0,2,93, $black,$font,$text5);
$text6 = 'Ранг: '.$rank[$res['rights']].'';
imagettftext($im,7,0,2,108, $black,$font,$text6);
$text3 = 'С нами с: ' . functions::display_date($res['datereg']) . '';
imagettftext($im,7,0,2,120, $black,$font,$text3);
imagettftext($im,7,0,2,124, $black,$font,$textx);
$company2 = 'Супер чат';
imagettftext($im,9,0,2,140, $white,$font,$company2);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
} else {
echo 'Файл не найден!';
}
?>