if (EXT_IS_ACTIVE("country")) {
// Add country code
$MORE .= ", country_code";
-} // END - if
+} else {
+ // Add direct value
+ $MORE .= ", country";
+}
// Init unset data (bad that we change $_GET here!)
if (empty($_GET['letter'])) { $_GET['letter'] = _ALL2; }
if ($REFS > 0) $REFS = $BASE."&what=list_refs&u_id=".$uid."\">".$REFS."</A>]";
if ($CATS > 0) $CATS = $BASE."&what=list_cats&u_id=".$uid."\">".$CATS."</A>]";
+ // Calculate timestamp for birthday
+ $stamp = MAKE_DATETIME(mktime(0, 0, 0, $DATA['birth_month'], $DATA['birth_day'], $DATA['birth_year']), "3");
+
+ // Is this above zero?
+ if ($stamp > 0) {
+ // Then use it
+ define('_BIRTHDAY', $stamp);
+ } else {
+ // Zero or below so set zero!
+ define('_BIRTHDAY', MAKE_DATETIME(0, "3"));
+ }
+
// Prepare data for template
- define('_BIRTHDAY', MAKE_DATETIME(mktime(0, 0, 0, $DATA['birth_month'], $DATA['birth_day'], $DATA['birth_year']), "3"));
define('_REFS' , $REFS);
define('_CATS' , $CATS);
define('_LINKS', $LINKS);
$result_master = SQL_QUERY($SQL, __FILE__, __LINE__);
// Calculate page count (0.5 fixes a bug with page count)
- if ($_CONFIG['user_limit'] == 0) {
+ if (getConfig('user_limit') == 0) {
$_CONFIG['user_limit'] = 100;
LOAD_TEMPLATE("admin_settings_saved", false, EXTENSION_WARNING_USER_LIMIT);
} // END - if
// Activate the extension please!
- $PAGES = round(SQL_NUMROWS($result_master) / $_CONFIG['user_limit'] + 0.5);
+ $PAGES = round(SQL_NUMROWS($result_master) / getConfig('user_limit') + 0.5);
if (empty($_GET['page'])) $_GET['page'] = "1";
- if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['user_limit'];
+ if (empty($_GET['offset'])) $_GET['offset'] = getConfig('user_limit');
// Add limitation to SQL string and run him again
$SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET['offset'];
$result = SQL_QUERY($SQL, __FILE__, __LINE__);
- $result_user = SQL_QUERY("SELECT emails_sent FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED'", __FILE__, __LINE__);
+ $result_user = SQL_QUERY("SELECT emails_sent FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED'", __FILE__, __LINE__);
$user_count = SQL_NUMROWS($result_user);
SQL_FREERESULT($result_user);
}
if ($PAGES > 1) {
- define('__PAGE_NAV', ADD_PAGENAV($PAGES, $_CONFIG['user_limit'], true, $colspan, true));
+ define('__PAGE_NAV', ADD_PAGENAV($PAGES, getConfig('user_limit'), true, $colspan, true));
} else {
// No page navigation is required
define('__PAGE_NAV', "");
if (EXT_IS_ACTIVE("country")) {
// Then overwrite country information
$content['country'] = COUNTRY_GENERATE_INFO($content['country_code']);
- } elseif ($content['country'] == 0) {
+ } elseif ($content['country'] == "") {
// Zero ID???
$content['country'] = "???";
}