Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.47 KB | None | 0 0
  1. <?php
  2. /**
  3.  * User: epmak
  4.  * Date: 31.10.2014
  5.  * Time: 19:59
  6.  * MuWebClone
  7.  * legacy 1.5
  8.  */
  9. if (!defined('insite')) die("no access");
  10.  
  11. $ntime = @filemtime("_dat/cach/top_strongest");
  12. require_once "configs/strongest_cfg.php";
  13.  
  14. if(!$ntime || (time()-$ntime>$strongest["cach"]))
  15. {
  16.     global $db,$config,$content;
  17.  
  18.     if($strongest["show_adm"]==0)
  19.         $ctlCode = " ch.CtlCode NOT IN(1,17)";
  20.     else
  21.         $ctlCode = " ch.CtlCode NOT IN(1,17,32)";
  22.  
  23.  
  24.     if(!empty($strongest["stron_hiden"]))
  25.     {
  26.         $hiden.=" AND Name NOT IN ({$strongest["stron_hiden"]})";
  27.     }
  28.     else
  29.         $hiden="";
  30.  
  31.     $resulttop5 = $db->query("SELECT TOP 5
  32. ch.Name,
  33. ch.cLevel,
  34. ch.Class,
  35. ch.{$strongest["res_colum"]},
  36. ch.PkCount,
  37. ch.PkLevel,
  38. gm.G_Name,
  39. CONVERT(varchar(64),gld.G_Mark,2) as g_mark,
  40. ms.ConnectStat,
  41. CONVERT(varchar(50),ms.ConnectTM,120) as ConnectTM,
  42. CONVERT(varchar(50), ms.DisConnectTM ,120) as DisConnectTM,
  43. ch.gr_res
  44. FROM  [Character] ch
  45. left join [GuildMember] gm ON gm.Name = ch.Name
  46. left join Guild gld on gm.G_Name = gld.G_Name
  47. inner join MEMB_STAT ms on ms.memb___id COLLATE DATABASE_DEFAULT = ch.AccountID COLLATE DATABASE_DEFAULT
  48. WHERE  $ctlCode $hiden ".$strongest["str_sort"]);
  49.  
  50.     ob_start();
  51.  
  52.     if ($strongest["top_type"]==1)
  53.     {
  54.         for($i=0;$i < 5;$i++)
  55.         {
  56.             $rowtop5 = $db->fetchrow($resulttop5);
  57.  
  58.             $rowtop5[2] = classname($rowtop5[2]); //class
  59.             if($rowtop5[6]!= null) //guilds
  60.             {
  61.                 $guild = $rowtop5[6];
  62.             }
  63.             else
  64.                 $guild = "-/-";
  65.  
  66.             if($rowtop5[8] == 1)//online
  67.                 $online = $content->lng["sreongest_status"]." <span style=color:#04C200;font-weight:bold;font-size:12px;font-style:italic;>Online</span> <br> ".$content->lng["sreongest_pr"]." ".$rowtop5[9];
  68.             else
  69.                 $online = $content->lng["sreongest_status"]." <span style=color:#FF0505;font-weight:bold;font-size:12px;font-style:italic;>Online</span> <br>".$content->lng["sreongest_pr"]." ".$rowtop5[10];
  70.  
  71.             if ($strongest["greset"]==1 && $strongest["greset_st"]==1)
  72.             {
  73.                 $gr_star=" ";
  74.                 while ($rowtop5[11]>0)
  75.                 {
  76.                     $gr_star.="<img src=\"imgs/gres.gif\" border=\"0\" />";
  77.                     $rowtop5[11]--;
  78.                 }
  79.             }
  80.             else if ($str["greset"]==1 && $str["greset_st"]==0)
  81.             {
  82.                 $gr_star=" <br>Grand Reset:".$rowtop5[5];
  83.             }
  84.  
  85.             $oinfo = $content->lng["sreongest_guild"]." <i>$guild</i><br>".$content->lng["sreongest_class"]." <i>{$rowtop5[2]}</i><br>$online";
  86.             $content->set("|oinfo|", $oinfo);
  87.             $content->set("|level|", $rowtop5[1]);
  88.             $content->set("|reset|", $rowtop5[3]);
  89.             $content->set("|gstar|", $gr_star);
  90.             $content->set("|cname|", $rowtop5[0]);
  91.             $content->out_content("theme/".$config["theme"]."/them/strongest.html");
  92.         }
  93.     }
  94.     elseif ($strongest["top_type"]==2)
  95.     {
  96.         $class_list = explode(",", $strongest["stron_sh"]);
  97.         $st_show="";
  98.         foreach ($class_list as $n=>$v)
  99.         {
  100.             $st_show.=q_chr_top($v);
  101.         }
  102.         echo $st_show;
  103.     }
  104.     else echo "error: in top_type!";
  105.     $temp = ob_get_contents();
  106.     write_catch ("_dat/cach/top_strongest",$temp);
  107.     ob_end_clean();
  108. }
  109. else $temp = file_get_contents ('_dat/cach/top_strongest');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement