SCHOKK | Дата: Воскресенье, 16.12.2012, 21:27 | Сообщение # 1 |
Лейтенант
Группа: Проверенные
Сообщений: 42
Статус: Оффлайн
| Подскажите в чём косяк ??? Code <? require('../../config.php'); include "../sql.inc.php";
function class_list($value,$type){ if($type == "long"){ $mod = array( 0 => 'Dark Wizard', 1 => 'Soul Master', 2 => 'Grand Master', 16 => 'Dark Knight', 17 => 'Blade Knight', 18 => 'Blade Master', 32 => 'Elf', 33 => 'Muse Elf', 34 => 'High Elf', 48 => 'Magic Gladiator', 49 => 'Duel Master', 50 => 'Duel Master', 64 => 'Dark Lord', 65 => 'Lord Emperor', 66 => 'Lord Emperor', 80 => 'Summoner', 81 => 'Bloody Summoner', 82 => 'Dimension Master' ); }else{ $mod = array( 0 => 'D. Wizard', 1 => 'S. Master', 2 => 'G. Master', 16 => 'D. Knight', 17 => 'B. Knight', 18 => 'B. Master', 32 => 'Elf', 33 => 'M. Elf', 34 => 'H. Elf', 48 => 'M. Gladiator', 49 => 'D. Master', 50 => 'D. Master', 64 => 'D. Lord', 65 => 'L. Emperor', 66 => 'L. Emperor', 80 => 'Summoner', 81 => 'B. Summoner', 82 => 'Di. Master' ); } if($value == 'list'){ return $mod; }else{ return isset($mod[$value]) ? $mod[$value] : "Unknown" ; } } function Show65kStats($stat_value) { if ($stat_value < 0) { $stat_value = $stat_value + 65535 + 1; return $stat_value; } return $stat_value; }
$char_id = (int)$_GET['id'];
$get_char_info = mssql_query("SELECT [Name], [Class], [Strength], [Dexterity], [Vitality], [Energy],[Status] FROM [Character] WHERE [Name] = '$char_id';"); if (mssql_num_rows($get_char_info) > 0) { $char_info = mssql_fetch_assoc($get_char_info); $Char_NAM = $char_info['Name']; $Char_CLA = class_list($char_info['Class'],'long'); $Char_STR = Show65kStats($char_info['Strength']); $Char_DEX = Show65kStats($char_info['Dexterity']); $Char_VIT = Show65kStats($char_info['Vitality']); $Char_ENR = Show65kStats($char_info['Energy']); } else { $Char_NAM = 'N/A'; $Char_CLA = 'N/A'; $Char_STR = 'N/A'; $Char_DEX = 'N/A'; $Char_VIT = 'N/A'; $Char_ENR = 'N/A'; } if($char_info['Status'] == 0){ $charstatus[1] ='Mu Player';} if($char_info['Status'] == 1){ $charstatus[1] ='Main Admin';} if($char_info['Status'] == 2){ $charstatus[1] ='Admin';} if($char_info['Status'] == 3){ $charstatus[1] ='Super Moderator';} if($char_info['Status'] == 4){ $charstatus[1] ='Moderator';} if($char_info['Status'] == 5){ $charstatus[1] ='Game Master';}
$sql = mssql_query("SELECT count(*) FROM MEMB_STAT WHERE ConnectStat = '1'"); $total['online']=mssql_result($sql, 0, 0);
$sql = mssql_query("SELECT count(*) FROM Character"); $total['character']=mssql_result($sql, 0, 0); $sql = mssql_query("SELECT count(*) FROM MEMB_INFO"); $total['accs']=mssql_result($sql, 0, 0); @mssql_close($msql);
$mw=350; $mh=20; $sig_img = imagecreatefromjpeg('../../inc/sig/signature.jpg'); //imagefill($sig_img, 0, 0, 0xA0C0FF);
$capscolor = imagecolorallocate($sig_img, 255, 255, 255); $textcolor = imagecolorallocate($sig_img, 255, 255, 255); $gray = ImageColorAllocate($sig_img, 0x00, 0x00, 0x00); $white = ImageColorAllocate($sig_img, 0xFF, 0xFF, 0xFF); // STAT CAPTIONS imagestring($sig_img, 1, 200, 80, "Web : ", $capscolor); ImageString ($sig_img, 1, 235, 80,"http://Millenium-Mu.Ru",$capscolor);
imagestring($sig_img, 1, 200, 60, "Online : ", $capscolor); ImageString ($sig_img, 1, 245, 60,"".$total['online']."",$capscolor);
imagestring($sig_img, 1, 200, 50, "Status : ", $capscolor); ImageString ($sig_img, 1, 245, 50,"".$charstatus[1]."",$capscolor);
imagestring($sig_img, 1, 200, 70, "Total Users : ", $capscolor); ImageString ($sig_img, 1, 270, 70,"".$total['accs']."",$capscolor);
imagestring($sig_img, 1, 200, 30, "STR : ", $capscolor); imagestring($sig_img, 1, 270, 30, "AGI : ", $capscolor); imagestring($sig_img, 1, 200, 40, "VIT : ", $capscolor); imagestring($sig_img, 1, 270, 40, "ENE : ", $capscolor);
// STAT VALUES imagestring($sig_img, 1, 235, 30, "$Char_STR", $textcolor); imagestring($sig_img, 1, 300, 30, "$Char_DEX", $textcolor); imagestring($sig_img, 1, 235, 40, "$Char_VIT", $textcolor); imagestring($sig_img, 1, 300, 40, "$Char_ENR", $textcolor);
// UINFO CAPTIONS imagestring($sig_img, 1, 200, 10, "NAME:", $capscolor); imagestring($sig_img, 1, 200, 20, "CLASS:", $capscolor);
// UINFO VALUES imagestring($sig_img, 1, 235, 10, "$Char_NAM", $textcolor); imagestring($sig_img, 1, 235, 20, "$Char_CLA", $textcolor);
header('Content-type: image/png'); imagepng($sig_img); imagedestroy($sig_img); ?> Не показывает не статы, ничего...
В Character добавил строку Status.
Скриин:
Кто подскажет в чем проблема ? Буду очень благодарен...
P.S. =>>> В Character.php есть запись :
<?php $sign_link="http://".$_SERVER['HTTP_HOST'].preg_replace('/\/([^\/]+?)$/', '/', $_SERVER['PHP_SELF'])."Signature-".$name.".jpg"; ?>
И в .htaccess :
RewriteRule ^Signature-(.*).jpg inc/sig/signature.php?id=$1 [L]
Реклама
=))
Сообщение отредактировал SCHOKK - Воскресенье, 16.12.2012, 21:27 |
|
| |