Jump to content
Sign in to follow this  
ShinSo

Help for Php !

Recommended Posts

hi caden

 

I want to add these two items

top guilds

top achievement players

for trinitycore 3.3.5!

 

who can help me!? Please.

Edited by ShinSo

Share this post


Link to post
Share on other sites

index.php

<?php
include ('config.php');

if($website_center_yes_no == 1){
echo "<center>";	
}else{
	
}
?>
<style type="text/css">
	.TFtable{
		width:100%; 
		border-collapse:collapse; 
	}
	.TFtable td{ 
		padding:7px; border:#4e95f4 1px solid;
	}
	/* provide some minimal visual accomodation for IE8 and below */
	.TFtable tr{
		background: #b8d1f3;
	}
	/*  Define the background color for all the ODD background rows  */
	.TFtable tr:nth-child(odd){ 
		background: #b8d1f3;
	}
	/*  Define the background color for all the EVEN background rows  */
	.TFtable tr:nth-child(even){
		background: #dae5f4;
	}
	
	<?php
if($website_bacground_yes_no == 1){
echo "
body {
background-image:url($bg_image_address);
background-position:top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
	
background-color:$bg_collor_all;
}


";	
}else{
	
} 
?>
</style>


<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo"$php_valody_kods"; ?>">
<title><?php echo"$site_titele"; ?></title>
</head>
<?php
if($use_type_of_connect == 2){
$aVar = mysqli_connect("$host_dlja_conect:$port_dlja_connect", "$login_dlja_connect", "$password_dlja_conect", "$characters_db");
}else{
mysql_connect("$host_dlja_conect:$port_dlja_connect", "$login_dlja_connect", "$password_dlja_conect") or die(mysql_error());       
mysql_select_db($characters_db) or die(mysql_error());
}

$nosakam_top_pec = @$_POST['select_top'];
if($nosakam_top_pec){}else{
$nosakam_top_pec = 1;
}

if($nosakam_top_pec == 1){
$select_top = $where_you_find_totaltime;
$nosaukums_auksa = $total_time_title;
}else{
}
if($nosakam_top_pec == 2){
$select_top = $where_you_find_totalKills;
$nosaukums_auksa = $totalkills_title;
}else{
}

if($nosakam_top_pec == 3){
$select_top = $where_you_find_money;
$nosaukums_auksa = $money_title;
}else{
}
if($nosakam_top_pec == 4){
$select_top = $where_you_find_level;
$nosaukums_auksa = $level_title;
}else{
}
?>

<table 

border="0" cellpadding="0" cellspacing="0" width="<?php echo $width_settings_on_table;?>" ><tr><td style="padding:3px;">

<center><font size= "5">
<?php echo "".$realm_selected_title.": <b> <font color='green'>$selektojam_realmu_darbam_ir_name </font></b>"; ?>
</font></center>




<table 
<?php 
if($rhasot_tabulu_vai_nee){
	echo "class=TFtable";
}else{
	} ?> 
	border=8 width="<?php echo $width_settings_on_table;?>" style="color:black">
<tr><td>#</td><td><center><?php echo "".$text_nr1_tittle.""; ?></center></td><td width="64"><?php echo "".$text_nr2_tittle.""; ?></td><td><font color=''><b><?php echo "".$text_nr3_tittle.""; ?></b></font></td>
<td><center>
<form method="post" action="">
<select name="select_top" onChange="submit()">
<option style="color: yellow; background-color: green;" value=0><?php echo $nosaukums_auksa;?> </option>
<option value=1> <?php echo $total_time_title;?> </option>
<option value=2> <?php echo $totalkills_title;?></option>
<option value=3> <?php echo $money_title;?></option>
<option value=4> <?php echo $level_title;?></option>
</select>
</form>
</center></td>
<td><?php echo $online_title;?></td>
</tr><?php
$place = 1;
// Php 5.5 +
if($use_type_of_connect == 2){
	mysqli_query ($aVar, 'SET NAMES CP1251');
$speletaju_status_online = mysqli_query($aVar,"SELECT * FROM `characters` ORDER BY `$select_top` DESC LIMIT 0 ,".$top_playres_how_much."");
	
	
	
while($status_online_pl = mysqli_fetch_object($speletaju_status_online)){
$spel_stat_guid = $status_online_pl->guid; 
$spel_stat_name = $status_online_pl->name;
$spel_stat_race = $status_online_pl->race;
$spel_stat_class = $status_online_pl->class;
$spel_stat_gender = $status_online_pl->gender;
$spel_stat_level = $status_online_pl->level;
$money = $status_online_pl->money;
$time = $status_online_pl->totaltime;              
$time = intval ($time/60); 
$min = $time%60; 
$time = intval ($time/60); 
$hours = $time%24; 
$time = intval($time/24);     
$days = $time;  
$spel_stat_zone = $status_online_pl->zone;
$spel_stat_totalKills = $status_online_pl->totalKills;
$spel_stat_online = $status_online_pl->online;

$money_gold = (int)($money/10000);
	$total_money = $money - ($money_gold*10000);
	$money_silver = (int)($total_money/100);
	$money_cooper = $total_money - ($money_silver*100);
	

$noradam_lejaa = "$days d $hours h  $min m";
if($nosakam_top_pec == 1){
$noradam_lejaa = "$days d $hours h  $min m";
}else{
}
if($nosakam_top_pec == 2){
$noradam_lejaa = "$spel_stat_totalKills";
}else{
}

if($nosakam_top_pec == 3){
$noradam_lejaa = "$money_gold <img src='./img/money/money_gold.gif'> $money_silver<img src='./img/money/money_silver.gif'> $money_cooper<img src='./img/money/money_copper.gif'>";
}else{
}


$ch_race = $spel_stat_race;
$ch_fraction_color="";
if ($ch_race == 1) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 3) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 4) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 7) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 22) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 11) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 2) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 5) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 6) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 8) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 10) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 9) 
{
$ch_fraction_color = "red";
}

$place_nr = $place++;

// radiit gildi 
if($radiit_gildi_pie_player == 1){
	
	$meklejam_gildi ="SELECT * FROM guild_member WHERE guid='".$spel_stat_guid."'";
$meklejam_gildi1 = mysqli_query($aVar, $meklejam_gildi);
$meklejam_gildi2 = mysqli_fetch_array($meklejam_gildi1);
$meklejam_gildi3 = $meklejam_gildi2['guildid'];
	
		$meklejam_gildis ="SELECT * FROM guild WHERE guildid='".$meklejam_gildi3."'";
$meklejam_gildi1s = mysqli_query($aVar, $meklejam_gildis);
$meklejam_gildi2s = mysqli_fetch_array($meklejam_gildi1s);
$meklejam_gildi3s = $meklejam_gildi2s['name'];
	
	
	
if($meklejam_gildi3){
	$gildes_name_ir = "<br> < $meklejam_gildi3s > ";
}else{
	$gildes_name_ir = "<br>$nav_nekada_gilde  "; 
}
	
}else{
	$gildes_name_ir = "<br> $nav_nekada_gilde "; 
}
// radiit gildi 


// Armory 
if($klikojot_uz_player_vest_uz_armory == 1){
	$spel_stat_name = "<a href='$addrese_armory_kur=$spel_stat_guid' target='_blank'> $spel_stat_name </a>";
}else{
	$spel_stat_name = $spel_stat_name ;
}
// Armory


// online
if($spel_stat_online == 1){
	$online_status_now = "<img src='./img/on.png'>";
	
}else{
	
	$online_status_now = "<img src='./img/off.png'>";
	
}

// online 
echo "<tr><td><b>$place_nr</b>.</td><td><font color='$ch_fraction_color'><b><center>$spel_stat_name $gildes_name_ir</center></font></b></td>
<td width='64'><center><img src='./img/$spel_stat_race-$spel_stat_gender.png' width='32' height='32'><img src='./img/$spel_stat_class.png' width='32' height='32'></center></td>
<td><font color='green'><b>$spel_stat_level</b></font></td>
<td><font color='orange'><b>$noradam_lejaa</b></font></td>
<td>$online_status_now</td>

</tr>";


}



	
	// Old php
}else{
	mysql_query ('SET NAMES CP1251'); 
$speletaju_status_online = mysql_query("SELECT * FROM `characters` ORDER BY `$select_top` DESC LIMIT 0 ,".$top_playres_how_much."");


while($status_online_pl = mysql_fetch_object($speletaju_status_online)){
$spel_stat_guid = $status_online_pl->guid; 
$spel_stat_name = $status_online_pl->name;
$spel_stat_race = $status_online_pl->race;
$spel_stat_class = $status_online_pl->class;
$spel_stat_gender = $status_online_pl->gender;
$spel_stat_level = $status_online_pl->level;
$money = $status_online_pl->money;
$time = $status_online_pl->totaltime;              
$time = intval ($time/60); 
$min = $time%60; 
$time = intval ($time/60); 
$hours = $time%24; 
$time = intval($time/24);     
$days = $time;  
$spel_stat_zone = $status_online_pl->zone;
$spel_stat_totalKills = $status_online_pl->totalKills;
$spel_stat_online = $status_online_pl->online;

$money_gold = (int)($money/10000);
	$total_money = $money - ($money_gold*10000);
	$money_silver = (int)($total_money/100);
	$money_cooper = $total_money - ($money_silver*100);
	

$noradam_lejaa = "$days d $hours h  $min m";
if($nosakam_top_pec == 1){
$noradam_lejaa = "$days d $hours h  $min m";
}else{
}
if($nosakam_top_pec == 2){
$noradam_lejaa = "$spel_stat_totalKills";
}else{
}

if($nosakam_top_pec == 3){
$noradam_lejaa = "$money_gold <img src='./img/money/money_gold.gif'> $money_silver<img src='./img/money/money_silver.gif'> $money_cooper<img src='./img/money/money_copper.gif'>";
}else{
}


$ch_race = $spel_stat_race;
$ch_fraction_color="";
if ($ch_race == 1) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 3) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 4) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 7) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 22) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 11) {
$ch_fraction_color = "blue"; 
}
elseif ($ch_race == 2) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 5) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 6) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 8) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 10) 
{
$ch_fraction_color = "red";
}
elseif ($ch_race == 9) 
{
$ch_fraction_color = "red";
}

$place_nr = $place++;


// radiit gildi 
if($radiit_gildi_pie_player == 1){
	
	$meklejam_gildi ="SELECT * FROM guild_member WHERE guid='".$spel_stat_guid."'";
$meklejam_gildi1 = mysql_query($meklejam_gildi);
$meklejam_gildi2 = mysql_fetch_array($meklejam_gildi1);
$meklejam_gildi3 = $meklejam_gildi2['guildid'];
	
		$meklejam_gildis ="SELECT * FROM guild WHERE guildid='".$meklejam_gildi3."'";
$meklejam_gildi1s = mysql_query($meklejam_gildis);
$meklejam_gildi2s = mysql_fetch_array($meklejam_gildi1s);
$meklejam_gildi3s = $meklejam_gildi2s['name'];
	
	
	
if($meklejam_gildi3){
	$gildes_name_ir = "<br> < $meklejam_gildi3s > ";
}else{
	$gildes_name_ir = "<br> $nav_nekada_gilde"; 
}
	
}else{
	$gildes_name_ir = "<br> $nav_nekada_gilde"; 
}
// radiit gildi 

// Armory 
if($klikojot_uz_player_vest_uz_armory == 1){
	$spel_stat_name = "<a href='$addrese_armory_kur=$spel_stat_guid' target='_blank'> $spel_stat_name </a>";
}else{
	$spel_stat_name = $spel_stat_name ;
}
// Armory

// online
if($spel_stat_online == 1){
	$online_status_now = "<img src='./img/on.png'>";
	
}else{
	
	$online_status_now = "<img src='./img/off.png'>";
	
}

// online 

echo "<tr><td><b>$place_nr</b>.</td><td><font color='$ch_fraction_color'><b><center>$spel_stat_name $gildes_name_ir</center></font></b></td>
<td width='64'><center><img src='./img/$spel_stat_race-$spel_stat_gender.png' width='32' height='32'><img src='./img/$spel_stat_class.png' width='32' height='32'></center></td>
<td><font color='green'><b>$spel_stat_level</b></font></td>
<td><font color='orange'><b>$noradam_lejaa</b></font></td>
<td>$online_status_now</td>


</tr>";


}
}



?>
</table>










</td></tr></table><br />

<center>
This script created for <?php echo $site_titele;?> by Satanjuga! <br>
PayPal: wowfun1989@gmail.com<br>
2015 - <?php echo date("Y"); ?>
</center>


<?php 
if($website_center_yes_no == 1){
echo "</center>";	
}else{
	
}
?>

 

config.php

<?php
// config.php  to work script need this settings! "Tnx Satanjuga"  Для работоспособности скрипта нужно севолиш все настроить в етом фаиле!
$top_playres_how_much = "15"; // Example: 100 "Tnx Satanjuga" сколко играков отброжат в топе? 
$use_type_of_connect = "1"; // Example: 1 - mysql_query (PHP 5.4 o earlier (DEPRECATED)) 2 - mysqli_query (PHP 5.5 (New method)) "Tnx Satanjuga" Тип Пхп 1- старый 2- Новый!
$php_valody_kods = "windows-1251"; // Example: windows-1251 "Tnx Satanjuga"  Кодировка Веба

$host_dlja_conect = "localhost"; // Example: 127.0.0.1 "Tnx Satanjuga" Ип адрес
$port_dlja_connect = "3310"; // Example: 3306 "Tnx Satanjuga" Порт к маискюл
$login_dlja_connect = "root"; // Example: root  "Tnx Satanjuga" Логин к маискюл
$password_dlja_conect = "123456"; // Example: ascent  "Tnx Satanjuga" Пароль к мискюл
$characters_db = "characters"; // Example: characters  "Tnx Satanjuga" База даних с mysql Characters
 

$site_titele = "Your server name"; // Example: Your Server Name  "Tnx Satanjuga"  Названия вашего проекта


$website_bacground_yes_no = "1"; // Example: 1 - show bg image and color 2 - Not! "Thx Satanjuga" 1 - Показавать фоновую картинку и покраску 2- нет!
$bg_image_address = "./img/bg_bg2.jpg"; // Example: ./img/bg_bg2.jpg  - Deff Or enter full addres to image!  "Thx Satanjuga" ./img/bg_bg2.jpg  - Стандарт Или веди полний адрес на картинку!
$bg_collor_all = "orange"; // Example orange - Bg color "Thx Satanjuga"  orange - Покраска фона!
$rhasot_tabulu_vai_nee = "1"; // Example: 1 - Color rows 2 - Not use bg color for rows! "Tnx Satanjuga" 1 - Красит полоски таблицы  2 - некрасить!
// guild
$radiit_gildi_pie_player = "1"; // Example 1 - Show Guild 2 - Not! "Tnx Satanjuga" Отбражать гилдию или нет!
$nav_nekada_gilde = ""; // Example: < No Guild >  "Tnx Satanjuga" < Нету Гилдий > какои текст тогда
// guild

// Armory
$klikojot_uz_player_vest_uz_armory = "2"; // Example: 1 - use link to armory 2 - not! "Tnx Satanjuga" 1 - Ползоватса силкои на армри!
$addrese_armory_kur = "http://night-wow.com/?armory"; // Example: http://night-wow.com/?armory(=there_id) "Tnx Satanjuga" Адрес на армори после  http://night-wow.com/?armory(=будет_ид_игрока!)
 
// Armory

$selektojam_realmu_darbam_ir_name = "Your realm name"; // Realm Name... Example: Test Realm x1 "Tnx Satanjuga" Названия реалма скаторого считаваетса инфа

// Size settings
$width_settings_on_table = "700"; // Example: 100% "Tnx Satanjuga" Ширына тоблицы

// language settings
$total_time_title = "Played time"; // Example: Total Time "Tnx Satanjuga" Совсем убиств
$totalkills_title = "Kills"; // Example: Total Kills  "Tnx Satanjuga" Убиства
$money_title = "Money"; // Example: Money  "Tnx Satanjuga" Денги
$level_title = "Level"; // Example: Level  "Tnx Satanjuga"  Уровень
$realm_selected_title = "Top players of realm"; // Example: Top Playes of Realm  "Tnx Satanjuga" Топ Игроки с реалма
$text_nr1_tittle = "Player Name"; // Example: Character Name  "Tnx Satanjuga" Имя игрока
$text_nr2_tittle = "Race/Class"; // Example: Race/Class  "Tnx Satanjuga" Расса/Клас
$text_nr3_tittle = "Level"; // Example: Level  "Tnx Satanjuga" Уровень
$online_title = "Online status"; // Example: Online "Tnx Satanjuga" Онлаин

$website_center_yes_no = "1";  // Example: 1 - Yes 2 - No (Center all script) "Tnx Satanjuga" Веб по центру или нет!

$where_you_find_totaltime = "totaltime"; // Example: totaltime "Tnx Satanjuga" как обозначено в Mysql время игры!
$where_you_find_totalKills = "totalKills"; // Example: totalKills "Tnx Satanjuga" как обозначено в Mysql совсем убиств!
$where_you_find_money = "money"; // Example: money "Tnx Satanjuga" как обозначено в Mysql денги!
$where_you_find_level = "level"; // Example: level "Tnx Satanjuga" как обозначено в Mysql уровень!
// This script created by Satanjuga! 
// Paypal: wowfun1989@gmail.com
?>

 

Edited by ShinSo

Share this post


Link to post
Share on other sites

@darksoke ! NP

 

top guilds

Table => Guild or guild_bank_eventlog : The most active and online players in Guild   =  top guilds

 

top achievement players

table => character_achievement & achievement   = top achievement players

 

 

I ask you to add these two if you can ! Do you think harded?

 

 

Edited by ShinSo

Share this post


Link to post
Share on other sites
57 minutes ago, ShinSo said:

OMG GUYS?

WHO CAN!

This forum is pull of pieces of sh!t!!!! Seriously, not giving this man his damn answers? WTF!?!?!?!

Share this post


Link to post
Share on other sites

If we do not respond within 12 hours. Don't worry, we might answer at 24 hours and if not 24 hours then maybe 48 hours. My point is.. Give us some time, We are not paid to provide support, but willingly providing free support whenever we have time.

Share this post


Link to post
Share on other sites
21 hours ago, darksoke said:

that is so poorly codded i wanna cry ...

I know right, it's too bad, almost at the point where you have to mentally prepare for the headache that's coming lol.. It has heckin' 464 lines of code xD

 

9 hours ago, ShinSo said:

OMG GUYS?

WHO CAN!

Look i can do it, but if @darksoke is going to, then i don't see the point in wasting time on it.

Share this post


Link to post
Share on other sites

holly mother of god, where do you want those to be implemented ? do you already have a website and want to merge those 2 systems ? do you want those instead of a website omg what is that hard to provide this most important information ?

Share this post


Link to post
Share on other sites
9 hours ago, ShinSo said:

OMG

this is just php page for top players!

 

download link

http://www.mediafire.com/download/oxls9oogxiuydub/top_v1.2.rar

 

I want to add these two items

top guilds

top achievement players

Holly crap man WHERE IN THE NAME OF GOD YOU WANT THOSE TO BE IMPLEMENTED ? Do you want them as a static website ? do you want to link them with your current website ? Do you want to use them instead of a website ? Or what the hell you want to do with them ....? 

Share this post


Link to post
Share on other sites

yes , dear

On this page ! Php Top Players
But not found

top guilds

top achievements

iwant added to menus...! done !

 

please darksoke (doh)

Edited by ShinSo

Share this post


Link to post
Share on other sites

@darksoke

do you want to link them with your current website ?  YES .

 

download link

http://www.mediafire.com/download/oxls9oogxiuydub/top_v1.2.rar

 

top guilds

top achievements

iwant added to menus...!

 

 

information:

top guilds

Table => Guild or guild_bank_eventlog : The most active and online players in Guild   =  top guilds

top achievement players

table => character_achievement & achievement   = top achievement players

:'(

Edited by ShinSo

Share this post


Link to post
Share on other sites
14 hours ago, ShinSo said:

Everyone said it was easy !

Why not doing !!!

 

(shake):s

 

If it's so easy why not do it your damn self? Jesus Christ.

Share this post


Link to post
Share on other sites

@Caden

 

In the post above, you said this code is simple.

I thought it would be helpful in this forum

If someone does not help say please

Edited by ShinSo

Share this post


Link to post
Share on other sites
On 2/21/2019 at 4:40 AM, darksoke said:

that is so poorly codded i wanna cry ... but stil my question is where do you want those to be implemented ? 

@darksoke

do you want to link them with your current website ?  YES .

 

download link

http://www.mediafire.com/download/oxls9oogxiuydub/top_v1.2.rar

 

top guilds

top achievements

iwant added to menus...!

 

 

information:

top guilds

Table => Guild or guild_bank_eventlog : The most active and online players in Guild   =  top guilds

top achievement players

table => character_achievement & achievement   = top achievement players

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...