PHP interesse |
|
Ik heb momenteel:
$energy = pretty_number($planetrow["energy_max"]-$planetrow["energy_used"])."/".pretty_number($planetrow["energy_max"]);
//energy
if($planetrow["energy_max"]-$planetrow["energy_used"]< 0){
$parse['energy'] = colorRed($energy);
}else{$parse['energy'] = $energy;}
//metal
$metal = pretty_number($planetrow["metal"]);
if(($planetrow["metal"] > $planetrow["metal_max"])){
$parse['metal'] = colorRed($metal);
}else{$parse['metal'] = $metal;}
//cristal
$crystal = pretty_number($planetrow["crystal"]);
if(($planetrow["crystal"] > $planetrow["crystal_max"])){
$parse['crystal'] = colorRed($crystal);
}else{$parse['crystal'] = $crystal;}
//deuterium
$deuterium = pretty_number($planetrow["deuterium"]);
if(($planetrow["deuterium"] > $planetrow["deuterium_max"])){
$parse['deuterium'] = colorNumber($deuterium);
}else{$parse['deuterium'] = $deuterium;}
//belcredits
$belcredits = pretty_number($planetrow["belcredits"]);
if(($planetrow["belcredits"] > $planetrow["belcredits"])){
$parse['belcredits'] = colorNumber($belcredits);
}else{$parse['belcredits'] = $belcredits;}
//esto es un hecho!
echo parsetemplate(gettemplate('topnav'),$parse);
$energy = pretty_number($planetrow["energy_max"]-$planetrow["energy_used"])."/".pretty_number($planetrow["energy_max"]); //energy if($planetrow["energy_max"]-$planetrow["energy_used"]< 0){ $parse['energy'] = colorRed($energy); }else{$parse['energy'] = $energy;} //metal $metal = pretty_number($planetrow["metal"]); if(($planetrow["metal"] > $planetrow["metal_max"])){ $parse['metal'] = colorRed($metal); }else{$parse['metal'] = $metal;} //cristal $crystal = pretty_number($planetrow["crystal"]); if(($planetrow["crystal"] > $planetrow["crystal_max"])){ $parse['crystal'] = colorRed($crystal); }else{$parse['crystal'] = $crystal;} //deuterium $deuterium = pretty_number($planetrow["deuterium"]); if(($planetrow["deuterium"] > $planetrow["deuterium_max"])){ $parse['deuterium'] = colorNumber($deuterium); }else{$parse['deuterium'] = $deuterium;} //belcredits $belcredits = pretty_number($planetrow["belcredits"]); if(($planetrow["belcredits"] > $planetrow["belcredits"])){ $parse['belcredits'] = colorNumber($belcredits); }else{$parse['belcredits'] = $belcredits;} //esto es un hecho! echo parsetemplate (gettemplate ('topnav'),$parse);
Maar nu wil ik dat de belcredits ( dus niet zoals de overige opties ) worden geladen vanuit de tabel: umgl_users
Wie weet hoe ik dit moet doen? Want wat ik ook probeer ik blijf maar errors en blanco pagina's krijgen.
|