Php Fusion Panel urodziny


(Mateusz16612) #1

Mam problem z panelem urodziny wykrywa kto

ma urodziny w miesiacu ale jak juz przyjdzie dzien w ktorym dany user ma urodziny nie pokazuje tego albo czasem o dziwo pokazuje wszystkich którzy maja w miesiacu nie wiem co z tym fantem robic i dlatego prosze was o pomoc oto kod:

bday_panel.php

<?php


if (file_exists(INFUSIONS."bday_panel/locale/".$settings['locale'].".php")) {

   include INFUSIONS."bday_panel/locale/".$settings['locale'].".php";

} else {

   include INFUSIONS."bday_panel/locale/English.php";

}


$thisdate = "____-".date("m")."-__";


    if (date("m") == "01") { $mnd = "".$locale['bp_001'].""; }

elseif (date("m") == "02") { $mnd = "".$locale['bp_002'].""; }

elseif (date("m") == "03") { $mnd = "".$locale['bp_003'].""; }

elseif (date("m") == "04") { $mnd = "".$locale['bp_004'].""; }

elseif (date("m") == "05") { $mnd = "".$locale['bp_005'].""; }

elseif (date("m") == "06") { $mnd = "".$locale['bp_006'].""; }

elseif (date("m") == "07") { $mnd = "".$locale['bp_007'].""; }

elseif (date("m") == "08") { $mnd = "".$locale['bp_008'].""; }

elseif (date("m") == "09") { $mnd = "".$locale['bp_009'].""; }

elseif (date("m") == "10") { $mnd = "".$locale['bp_010'].""; }

elseif (date("m") == "11") { $mnd = "".$locale['bp_011'].""; }

elseif (date("m") == "12") { $mnd = "".$locale['bp_012'].""; }


$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_birthdate like '$thisdate' ORDER BY user_birthdate DESC");


    if (date("m") == "01") { $img = ""; }

elseif (date("m") == "02") { $img = ""; }

elseif (date("m") == "03") { $img = ""; }

elseif (date("m") == "04") { $img = ""; }

elseif (date("m") == "05") { $img = ""; }

elseif (date("m") == "06") { $img = ""; }

elseif (date("m") == "07") { $img = ""; }

elseif (date("m") == "08") { $img = ""; }

elseif (date("m") == "09") { $img = ""; }

elseif (date("m") == "10") { $img = ""; }

elseif (date("m") == "11") { $img = ""; }

elseif (date("m") == "12") { $img = ""; }


openside("".$locale['bp_100']." {$mnd}", "on");

echo "

$img
\n"; if (dbrows($result) == 0) { echo "".$locale['bp_101']." {$mnd}"; } echo "
".$locale['bp_016']."
\n"; while ($db = dbarray($result)) { //My New Code $newdate = explode ("-", $db['user_birthdate']); $date = $newdate; $now = date("Y-m-d"); $yr = date("Y"); $age = substr($now, 0, 4) - substr($db['user_birthdate'], 0, 4); if ($date[2] == date("d")) { $present = "