 - <?php
- include ("settings.php");
- include('./anti_inject.php');
- header("Content-type: image/png");
- $user = $_POST['Character'];
- $user = test($user);
- //$user = str_replace(".png", "", $_GET['user']);
- $msconnect=odbc_connect("$dbname","$dbuser","$dbpass");
- $msteste="SELECT strUserID, Level, Loyalty, Nation, Knights, Class, Race FROM USERDATA us WHERE strUserID = '".$user."'";
- $msresul=odbc_exec($msconnect,$msteste) or die(odbc_error());
- $username = odbc_result($msresul, 1);
- $getClan = "SELECT k.IDName FROM KNIGHTS k, KNIGHTS_USER ku WHERE ku.strUserID = '".$user."' AND ku.sIDNum = k.IDNum";
- $msclan=odbc_exec($msconnect,$getClan) or die(odbc_error());
- $clan = odbc_result($msclan, 1);
- if (empty($clan)) { $clan = "None"; }
- $class = odbc_result($msresul, 6);
- $race = odbc_result($msresul, 7);
- $np = odbc_result($msresul, 3);
- // Get Picture Type
- $img = "blank";
- if ($race == 1 && $class == 105) {
- $img = "kwarr";}
- if ($race == 2 && $class == 107) {
- $img = "krogue";}
- if ($race == 2 && $class == 111) {
- $img = "kpriestm";}
- if ($race == 3 && $class == 109) {
- $img = "kmage";}
- if ($race == 4 && $class == 111) {
- $img = "kpriestf";}
- if ($race == 11 && $class == 205) {
- $img = "elbarb2";}
- if ($race == 12) {
- if ($class == 205) {
- $img = "elwarrm";}
- if ($class == 207) {
- $img = "elroguem";}
- if ($class == 209) {
- $img = "elmagem";}
- if ($class == 211) {
- $img = "elpriestm";}
- }
- if ($race == 13) {
- if ($class == 205) {
- $img = "elwarrf";}
- if ($class == 207) {
- $img = "elroguef";}
- if ($class == 209) {
- $img = "elmagef";}
- if ($class == 211) {
- $img = "elpriestf";}
- }
- $lvl = odbc_result($msresul, 2);
- if ($lvl < 10) {
- $lvlw = 246;} else { $lvlw = 230;}
- //$im = @imagecreate(280, 60);
- $im = imagecreatefrompng("http://i94.photobucket.com/albums/l117/shortround4271/sig1/".$img.".png");
- $background_color = imagecolorallocate($im, 0, 0, 0);
- $text_color = imagecolorallocate($im, 255, 255, 255);
- $font = './SwissBold.ttf';
- $fontNP = './tapeworm.ttf';
- $font3 = './sui generis.ttf';
- //imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
- // Name
- imagettftext($im, 11, 0, 137, 26, $text_color, $font, $username);
- // Clan
- imagettftext($im, 7, 0, 133, 44, $text_color, $font, "Clan: ");
- imagettftext($im, 7, 0, 163, 44, $text_color, $font3, $clan);
- // NP
- imagettftext($im, 7, 0, 133, 57, $text_color, $font, "NP: ");
- imagettftext($im, 7, 0, 155, 57, $text_color, $fontNP, $np);
- // Server
- imagettftext($im, 7, 0, 133, 68, $text_color, $font, "Server: ");
- imagettftext($im, 7, 0, 173, 68, $text_color, $font3, $name);
- // Level
- //imagettftext($im, 7, 0, 242, 60, $text_color, $font, "Level:");
- imagettftext($im, 16, 0, $lvlw+5, 74, $text_color, $font3, odbc_result($msresul, 2));
- imagepng($im);
- imagedestroy($im);
- ?>
复制代码 |