Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Month top 5 script

Parašė JaWa· 2014 Gru. 3 20:12:10
#3

Ponas24 parašė:

<?php
 
//////////////////menesio TOP tikrinimas/davimas //////////////////
 
if ( file_get_contents ( 'txt/belekoks_m.txt' ) != date ( 'Y.m' ) )
{
include_once("config2.php");
$get_tops1=mssql_query("Select Name,Accountid,mrr from Character order by mrr DESC, name DESC LIMIT 3");
while ($tops1 = mssql_fetch_row($get_tops1)) {
$res1 = mssql_query("update MEMB_CREDITS set credits=credits+200 where memb___id='$tops1[1]'");
}
$fp1 = fopen("txt/belekoks_m.txt", "w");
 
if (flock($fp1, LOCK_EX)) {
fwrite($fp1, date ( 'Y.m' ));
flock($fp1, LOCK_UN);
}
fclose($fp1);
 
$res1 = mssql_query("update Character set mrr=0");
 
} 
?>


Situo atveju visi 3 gaus po 200 kredu, per riebu yra ... Reikia kad 1 vieta 200 , 2 vieta 100 , 3 vieta 50