搜索
 找回密码
 加入

共享一些签名图片!及网站调用代码

ctgwglzc 2009-1-13 23:00:55 2105






























4 回复

ctgwglzc
2008-12-13 00:08:01
楼主

网站调用代码

点击查看详情
  1. <?php

  2. include ("settings.php");
  3. include('./anti_inject.php');


  4. header("Content-type: image/png");



  5. $user = $_POST['Character'];

  6. $user = test($user);

  7. //$user = str_replace(".png", "", $_GET['user']);
  8. $msconnect=odbc_connect("$dbname","$dbuser","$dbpass");

  9. $msteste="SELECT strUserID, Level, Loyalty, Nation, Knights, Class, Race FROM USERDATA us WHERE strUserID = '".$user."'";
  10. $msresul=odbc_exec($msconnect,$msteste) or die(odbc_error());
  11. $username = odbc_result($msresul, 1);
  12. $getClan = "SELECT k.IDName FROM KNIGHTS k, KNIGHTS_USER ku WHERE ku.strUserID = '".$user."' AND ku.sIDNum = k.IDNum";
  13. $msclan=odbc_exec($msconnect,$getClan) or die(odbc_error());
  14. $clan = odbc_result($msclan, 1);
  15. if (empty($clan)) { $clan = "None"; }
  16. $class = odbc_result($msresul, 6);
  17. $race = odbc_result($msresul, 7);
  18. $np = odbc_result($msresul, 3);

  19. // Get Picture Type
  20. $img = "blank";
  21. if ($race == 1 && $class == 105) {
  22.         $img = "kwarr";}
  23. if ($race == 2 && $class == 107) {
  24.         $img = "krogue";}
  25. if ($race == 2 && $class == 111) {
  26.         $img = "kpriestm";}
  27. if ($race == 3 && $class == 109) {
  28.         $img = "kmage";}
  29. if ($race == 4 && $class == 111) {
  30.         $img = "kpriestf";}
  31. if ($race == 11 && $class == 205) {
  32.         $img = "elbarb2";}
  33. if ($race == 12) {
  34.         if ($class == 205) {
  35.                 $img = "elwarrm";}
  36.         if ($class == 207) {
  37.                 $img = "elroguem";}
  38.         if ($class == 209) {
  39.                 $img = "elmagem";}
  40.         if ($class == 211) {
  41.                 $img = "elpriestm";}
  42. }
  43. if ($race == 13) {
  44.         if ($class == 205) {
  45.                 $img = "elwarrf";}
  46.         if ($class == 207) {
  47.                 $img = "elroguef";}
  48.         if ($class == 209) {
  49.                 $img = "elmagef";}
  50.         if ($class == 211) {
  51.                 $img = "elpriestf";}
  52. }

  53. $lvl = odbc_result($msresul, 2);
  54. if ($lvl < 10) {
  55. $lvlw = 246;} else { $lvlw = 230;}

  56. //$im = @imagecreate(280, 60);
  57. $im = imagecreatefrompng("http://i94.photobucket.com/albums/l117/shortround4271/sig1/".$img.".png");
  58. $background_color = imagecolorallocate($im, 0, 0, 0);
  59. $text_color = imagecolorallocate($im, 255, 255, 255);
  60. $font = './SwissBold.ttf';
  61. $fontNP = './tapeworm.ttf';
  62. $font3 = './sui generis.ttf';

  63. //imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
  64. // Name
  65. imagettftext($im, 11, 0, 137, 26, $text_color, $font,  $username);
  66. // Clan
  67. imagettftext($im, 7, 0, 133, 44, $text_color, $font,  "Clan: ");
  68. imagettftext($im, 7, 0, 163, 44, $text_color, $font3,  $clan);
  69. // NP
  70. imagettftext($im, 7, 0, 133, 57, $text_color, $font,  "NP: ");
  71. imagettftext($im, 7, 0, 155, 57, $text_color, $fontNP,  $np);
  72. // Server
  73. imagettftext($im, 7, 0, 133, 68, $text_color, $font, "Server: ");
  74. imagettftext($im, 7, 0, 173, 68, $text_color, $font3, $name);
  75. // Level
  76. //imagettftext($im, 7, 0, 242, 60, $text_color, $font,  "Level:");
  77. imagettftext($im, 16, 0, $lvlw+5, 74, $text_color, $font3,  odbc_result($msresul, 2));
  78. imagepng($im);
  79. imagedestroy($im);
  80. ?>
复制代码
WZQ911
2008-12-13 22:23:13
不错的图 顶了 CT 现在怎么没领钱的拉。。
hhbwzh
2009-1-13 21:46:37
怎么用的哦 不会啊
ctgwglzc
2009-1-13 23:00:55
楼主
呵呵,看不懂PHP,说了也没用。
高级模式
游客