X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_user.php;h=9e689ce6c4f681b95cf119af98289d26a960bade;hp=8618702c4d8e2d595d4f599bf55a9422a8a5c8bb;hb=7800e16349a7f1ccd0eccc3197c81fc261740937;hpb=6c763653e88b9d10627e651ca59c7201d4b7d62b diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 8618702c4d..9e689ce6c4 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -79,7 +79,10 @@ if (GET_EXT_VERSION("user") >= "0.3.4") { 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; } @@ -115,8 +118,19 @@ LIMIT 1", if ($REFS > 0) $REFS = $BASE."&what=list_refs&u_id=".$uid."\">".$REFS."]"; if ($CATS > 0) $CATS = $BASE."&what=list_cats&u_id=".$uid."\">".$CATS."]"; + // 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); @@ -222,16 +236,16 @@ LIMIT 1", $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']; @@ -259,7 +273,7 @@ LIMIT 1", } 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', ""); @@ -323,7 +337,7 @@ LIMIT 1", 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'] = "???"; }