Version 0.10
This commit is contained in:
parent
73645ccc1f
commit
b9c240c781
246 changed files with 10218 additions and 1598 deletions
|
|
@ -45,6 +45,7 @@ function txtmission($mission){
|
|||
elseif ($mission == 3) return 'Coloniser';
|
||||
elseif ($mission == 4) return 'Recycler';
|
||||
elseif ($mission == 5) return 'Espionner';
|
||||
elseif ($mission == 6) return 'Retour forcé';
|
||||
else return 'Erreur';
|
||||
}
|
||||
|
||||
|
|
@ -61,25 +62,7 @@ function trouvInfo($id_user, $info){
|
|||
}
|
||||
|
||||
function separerNombres($nombre) {
|
||||
$j=0;
|
||||
$lgr=strlen($nombre);
|
||||
$chaine = '';
|
||||
for($i = $lgr-1; $i >= 0; $i--) {
|
||||
$chaine .= substr($nombre,$i,1);
|
||||
$j+=1;
|
||||
if($j == 3 and $i >0) {
|
||||
$chaine .= ".";
|
||||
$j = 0;
|
||||
}
|
||||
}
|
||||
$nombre="";
|
||||
$lgr=strlen($chaine);
|
||||
$j=$lgr;
|
||||
for($i = $lgr+1; $i > 0; $i--) {
|
||||
$nombre .= substr($chaine,$j,1);
|
||||
$j -=1;
|
||||
}
|
||||
return $nombre;
|
||||
return number_format($nombre, 0, ',', ' ');
|
||||
}
|
||||
|
||||
function bbcode($text) {
|
||||
|
|
@ -198,3 +181,46 @@ $query = mysql_query("SELECT user.id ,pseudo, ceil( (
|
|||
return $resultat['points_pts'];
|
||||
}
|
||||
|
||||
function pillage($metal, $cristal, $hydrogene, $vfm){
|
||||
$Qm = $metal / $vfm;
|
||||
$Qc = $cristal / $vfm;
|
||||
$Qh = $hydrogene / $vfm;
|
||||
|
||||
$somme = $Qm + $Qc + $Qh;
|
||||
|
||||
if ($somme < 2) {
|
||||
$Fm = $metal / 2;
|
||||
$Fc = $cristal / 2;
|
||||
$Fh = $hydrogene / 2;
|
||||
}
|
||||
else {
|
||||
$Fm = $Qm / $somme * $vfm;
|
||||
$Fc = $Qc / $somme * $vfm;
|
||||
$Fh = $Qh / $somme * $vfm;
|
||||
}
|
||||
|
||||
return array(floor($Fm), floor($Fc), floor($Fh));
|
||||
}
|
||||
|
||||
function affTemp($secondes){
|
||||
$heures = intval($secondes/3600);
|
||||
$minutes = intval($secondes/60-($heures*60));
|
||||
if ($minutes < 10) $minutes = '0'.$minutes;
|
||||
$seconde = $secondes-($heures*3600)-($minutes*60);
|
||||
if ($seconde < 10) $seconde = '0'.$seconde;
|
||||
|
||||
return $heures.':'.$minutes.':'.$seconde;
|
||||
}
|
||||
|
||||
function dateFR($date){
|
||||
$date = str_replace('Sun','Dim',$date);
|
||||
$date = str_replace('Mon','Lun',$date);
|
||||
$date = str_replace('Tue','Mar',$date);
|
||||
$date = str_replace('Wed','Mer',$date);
|
||||
$date = str_replace('Thu','Jeu',$date);
|
||||
$date = str_replace('Fri','Ven',$date);
|
||||
$date = str_replace('Sat','Sam',$date);
|
||||
|
||||
return $date;
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue