Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * User: epmak
- * Date: 31.10.2014
- * Time: 19:59
- * MuWebClone
- * legacy 1.5
- * very legacy....
- */
- if (!defined('insite')) die("no access");
- $ntime = @filemtime("_dat/cach/top_strongest");
- require_once "configs/strongest_cfg.php";
- if(!$ntime || (time()-$ntime>$strongest["cach"]))
- {
- global $db,$config,$content;
- if($strongest["show_adm"]==0)
- $ctlCode = " ch.CtlCode NOT IN(1,17)";
- else
- $ctlCode = " ch.CtlCode NOT IN(1,17,32)";
- if(!empty($strongest["stron_hiden"]))
- {
- $hiden.=" AND Name NOT IN ({$strongest["stron_hiden"]})";
- }
- else
- $hiden="";
- $resulttop5 = $db->query("SELECT TOP 5
- ch.Name,
- ch.cLevel,
- ch.Class,
- ch.{$strongest["res_colum"]},
- ch.PkCount,
- ch.PkLevel,
- gm.G_Name,
- CONVERT(varchar(max),gld.G_Mark,2) as g_mark,
- ms.ConnectStat,
- CONVERT(varchar(max),ms.ConnectTM,120) as ConnectTM,
- CONVERT(varchar(max), ms.DisConnectTM ,120) as DisConnectTM,
- ch.gr_res
- FROM [Character] ch
- left join [GuildMember] gm ON gm.Name = ch.Name
- left join Guild gld on gm.G_Name = gld.G_Name
- inner join MEMB_STAT ms on ms.memb___id COLLATE DATABASE_DEFAULT = ch.AccountID COLLATE DATABASE_DEFAULT
- WHERE $ctlCode $hiden ".$strongest["str_sort"]);
- ob_start();
- if ($strongest["top_type"]==1)
- {
- for($i=0;$i < 5;$i++)
- {
- $rowtop5 = $db->fetchrow($resulttop5);
- $rowtop5[2] = classname($rowtop5[2]); //class
- if($rowtop5[6]!= null) //guilds
- {
- $guild = $rowtop5[6];
- }
- else
- $guild = "-/-";
- if($rowtop5[8] == 1)//online
- $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];
- else
- $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];
- if ($strongest["greset"]==1 && $strongest["greset_st"]==1)
- {
- $gr_star=" ";
- while ($rowtop5[11]>0)
- {
- $gr_star.="<img src=\"imgs/gres.gif\" border=\"0\" />";
- $rowtop5[11]--;
- }
- }
- else if ($str["greset"]==1 && $str["greset_st"]==0)
- {
- $gr_star=" <br>Grand Reset:".$rowtop5[5];
- }
- $oinfo = $content->lng["sreongest_guild"]." <i>$guild</i><br>".$content->lng["sreongest_class"]." <i>{$rowtop5[2]}</i><br>$online";
- $content->set("|oinfo|", $oinfo);
- $content->set("|level|", $rowtop5[1]);
- $content->set("|reset|", $rowtop5[3]);
- $content->set("|gstar|", $gr_star);
- $content->set("|cname|", $rowtop5[0]);
- $content->out_content("theme/".$config["theme"]."/them/strongest.html");
- }
- }
- elseif ($strongest["top_type"]==2)
- {
- $class_list = explode(",", $strongest["stron_sh"]);
- $st_show="";
- foreach ($class_list as $n=>$v)
- {
- $st_show.=q_chr_top($v);
- }
- echo $st_show;
- }
- else echo "error: in top_type!";
- $temp = ob_get_contents();
- write_catch ("_dat/cach/top_strongest",$temp);
- ob_end_clean();
- }
- else $temp = file_get_contents ('_dat/cach/top_strongest');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement