Thread subject: pHpFusion Nederlands (BE|NL) » Ondersteuning, Themas, Infusies, Modificaties en Installatie :: [Opgelost] Birthday infusion : Error

Posted by Tivano on 24 februari 2009, 18:04
#3

Code

if (!defined("IN_FUSION")) { die("Access Denied"); }

// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."birthday_panel/locale/".$settings['locale'].".php")) {
   // Load the locale file matching the current site locale setting.
   include INFUSIONS."birthday_panel/locale/".$settings['locale'].".php";
} else {
   // Load the infusion's default locale file.
   include INFUSIONS."birthday_panel/locale/English.php";
}

$result=dbquery("SELECT user_id, user_name, user_avatar,
   DATE_FORMAT(user_birthdate, '%d') AS birth_day,
   EXTRACT(MONTH FROM user_birthdate) AS birth_month
   FROM ".DB_USERS."
   WHERE (EXTRACT(MONTH FROM user_birthdate)=EXTRACT(MONTH FROM NOW())
   AND EXTRACT(DAY FROM user_birthdate)=EXTRACT(DAY FROM NOW()))
   ORDER BY birth_month , birth_day LIMIT 0,15"
);

$rows = dbrows($result);
if ($rows != 0) {
   @openside($locale['bdp_title']);
   echo "
'".$locale['bdp_title']."'\n";
   echo "
\n";
   if(dbrows($result)!=0) {
      $months=explode("|", $locale['shortmonths']);
      while($data=dbarray($result)) {
         //echo "\n";
         if(!empty($data['user_avatar'])) {
            $avatar = "'".$data['user_name']."'\n";
         } else {
            $avatar = "\n";
         }
         if (USERGOLD) {
            $username = $data['user_name'];
         } else {
            $username = goldmod_user($data['user_id'], $data['user_name']);
         }
         echo "
$avatar

\n";
         echo "".$username."
\n";
      }
   }
   echo "
\n";
   @closeside();
} else {
   openside($locale['bdp_001']);
   echo "
'".$locale['bdp_001']."'\n";
   echo "
\n";
   echo "Geen jarigen vandaag\n";
   echo "
\n";
   closeside();
}
?>

Edited by Puma on 24 februari 2009, 21:15