IsSMTP(); // send using SMTP $phpmailerU->Host = "$phpmailerHost"; // SMTP server to use $phpmailerU->SMTPAuth = true; // use SMTP Auth $phpmailerU->Username = "$phpmailerUser"; // SMTP username $phpmailerU->Password = "$phpmailerPass"; // SMTP password $phpmailerU->From = "$email_from"; // sender EMail $phpmailerU->FromName = "Galatool $owner Uni $global_universe"; // sender name $phpmailerU->WordWrap = 80; // set word wrap $phpmailerU->IsHTML(false); // send as HTML } makeheader(USERINFO_TITLE); mysql_connect($dbhost,$dbusername,$dbpassword); mysql_select_db($dbname); if (isset($_GET['order'])) { $order = mysql_escape_string($_GET['order'])." "; $what = $_GET['order']; } else { $order = "username "; $what = "username"; } if (isset($_GET['how'])) { switch ($_GET['how']) { case "desc" : $order .= "DESC"; $how_link = "asc"; break; default : $order .= "ASC"; $how_link = "desc"; break; } } else { $order .= "ASC"; $how_link = "desc"; } if (isset($_GET['activate']) && is_numeric($_GET['activate'])) { $userid = (int)$_GET['activate']; $query = "UPDATE $utablename SET status='active' WHERE id='$userid'"; $res = mysql_query($query) or die(mysql_error()); // send email to activated player $query = "SELECT * FROM $utablename WHERE id='$userid'"; $res = mysql_query($query) or die(mysql_error()); $line = mysql_fetch_object($res); // send email for veryfication if ($usePHPMailer) { $phpmailerU->AddAddress($email); $phpmailerU->Subject = USERINFO_ACTIVATED ; $phpmailerU->Body = USERINFO_ACTIVATIONTEXT ; $result = ($phpmailerU->Send()); } else { $headers = "From: ".$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/plain; charset=utf-8\r\n" . "Content-Transfer-Encoding: 8bit\r\n"; // Send $result = mail($line->email, USERINFO_ACTIVATED, USERINFO_ACTIVATIONTEXT, $headers); } } if (!isset($_GET['userid'])) { echo '
'.USERINFO_TITLE.'
'.USERINFO_NAMES.':
'; $query = "SELECT *,DATE_FORMAT(CONVERT_TZ(lastlogin, '+00:00', '".$_SESSION['s_timezone_offset']."'), '%d. %m. %Y - %H:%i:%s') FROM $utablename ORDER BY $order"; $res = mysql_query($query) or die(mysql_error()); while ($line = mysql_fetch_object($res)) { // User Info switch ($line->status) { case "email": $status_style = "traffic_light_red"; break; case "admin": $status_style = "traffic_light_yellow"; break; case "active": $status_style = "traffic_light_green"; break; } if ($line->lastlogin == "0000-00-00 00:00:00") { $lastlogin = USERINFO_NOLOGIN; } else { $lastlogin = $line->lastlogin; } echo ''."\n"; } echo "
'.USERINFO_USERNAME.' '.USERINFO_INGAME.' '.USERINFO_ALLYTAG.' '.USERINFO_STATUS.' '.USERINFO_LOGINS.' '.USERINFO_LASTLOGIN.'
'.$line->username.' '.$line->ingame.' '.$line->allytag.' '.$line->status.' '.$line->logins.' '.$lastlogin.'
\n"; } elseif (isset($_GET['userid']) && is_numeric($_GET['userid'])) { $userid = (int)$_GET['userid']; $query = "SELECT *, DATE_FORMAT(CONVERT_TZ(lastlogin, '+00:00', '".$_SESSION['s_timezone_offset']."'), '%d. %m. %Y - %H:%i:%s') as lastlogin FROM $utablename WHERE id='$userid'"; $res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($res) > 0) { $line = mysql_fetch_object($res); // User Info switch ($line->status) { case "email": $status = $line->status.'    '.USERINFO_ACTIVATE.''; $status_style = "traffic_light_red"; break; case "admin": $status = $line->status.'    '.USERINFO_ACTIVATE.''; $status_style = "traffic_light_yellow"; break; case "active": $status = $line->status; $status_style = "traffic_light_green"; break; } if ($line->lastlogin == "0000-00-00 00:00:00") { $lastlogin = USERINFO_NOLOGIN; } else { $lastlogin = $line->lastlogin; } echo ' '; // Galaxy Info echo ' \n"; if ($_SESSION['s_isadmin'] == true) { // IP Info echo ' \n"; } // end echo "
'; $query = "SELECT DATE_FORMAT(CONVERT_TZ(MAX(last_update), '+00:00', '".$_SESSION['s_timezone_offset']."'), '%d. %m. %Y - %H:%i:%s') as glast_update FROM $dbtablename WHERE user_id='".$userid."'"; $res = mysql_query($query) or die(mysql_error()); $line = mysql_fetch_object($res); if (!empty($line->glast_update)) { $last_galaxyupdate = $line->glast_update; } else { $last_galaxyupdate = ""; } echo '
'.USERINFO_TITLE.'
'.USERINFO_DETAIL.': '.$line->username.'
'.USERINFO_INGAME.':'.$line->ingame.'
'.USERINFO_EMAIL.':'.$line->email.'
'.USERINFO_ALLYTAG.':'.$line->allytag.'
'.USERINFO_STYLEPATH.':'.$line->stylepath.'
'.USERINFO_STATUS.':'.$status.'
'.USERINFO_LOGINS.':'.$line->logins.'
'.USERINFO_LASTLOGIN.':'.$lastlogin.'
'.USERINFO_LAST_GALAXYUPDATE.':'.$last_galaxyupdate.'
'; $query = "SELECT galaxy,count(*) as anzahl FROM $dbtablename WHERE user_id=$userid AND planet='1' GROUP BY galaxy ORDER BY galaxy"; $res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($res) == 0) { echo ''."\n"; } else { echo ''."\n"; while ($line = mysql_fetch_object($res)) { echo ''."\n"; } } echo "
'.USERINFO_DATA.'
'.USERINFO_NODATA.'
'.USERINFO_GALAXY.''.USERINFO_SYSTEMS.'
'.$line->galaxy.''.$line->anzahl.'
'; $query = "SELECT *,DATE_FORMAT(CONVERT_TZ(logintime, '+00:00', '".$_SESSION['s_timezone_offset']."'), '%d. %m. %Y - %H:%i:%s') as logintime_formated FROM $iptablename WHERE userid='$userid' ORDER BY logintime DESC"; $res = mysql_query($query) or die(mysql_error()); if (mysql_num_rows($res) == 0) { echo ' '; } else { echo ''."\n"; while ($line = mysql_fetch_object($res)) { echo ''."\n"; } } echo "
'.USERINFO_IP.'
'.USERINFO_NOLOGIN.'
'.USERINFO_IP.''.USERINFO_LOGINTIME.'
'.$line->ip.''.$line->logintime_formated.'
"; } else { echo '
'.USERINFO_ERROR1.'
'; } } makefooter(); ?>