Esempio n. 1
0
function reportError($errormsg)
{
    $to = szEmail();
    $subject = 'SiteZilla ERROR REPORT';
    $message = $errormsg;
    $headers = 'From: ' . szCronEmail() . "\r\n" . 'X-Mailer: PHP/' . phpversion();
    if (mail($to, $subject, $message, $headers)) {
        return true;
    } else {
        return false;
    }
}
Esempio n. 2
0
function showUserInfo($userid)
{
    $db = Database::obtain();
    $sql = "SELECT * FROM " . TABLE_USERS . "\n\t\t\t\t\tWHERE `id` =" . $userid . "";
    $userdata = $db->query_first($sql);
    $userid = $userdata['id'];
    $username = $userdata['username'];
    $maxwebsites = $userdata['maxwebsites'];
    $fullnames = $userdata['fullnames'];
    $phone = $userdata['phone'];
    $user_website = $userdata['user_website'];
    $email = $userdata['email'];
    if (isset($_SESSION['last_visit'])) {
        $last_visit = $_SESSION['last_visit'];
    } else {
        $last_visit = $userdata['last_visit'];
    }
    $register_date = $userdata['joined'];
    $status = getAccountStatus($userdata['account_active']);
    $group = getGroup($userdata['group']);
    $date = getAccountExpireDate($userid);
    // 		date_add($date, date_interval_create_from_date_string('90 days')); //only available in PHP 5.3.0
    date_modify($date, '+ 90 days');
    $renewdate = date_format($date, 'Y-m-d');
    $userlanguage = showUserLanguage($userdata['language']);
    $profilemsg = file_get_contents('pages/profile_message.php');
    $statuslink = '';
    if ($userdata['account_active'] == '0') {
        if (scriptName() == 'admin.php') {
            $adml = '&user='******'';
        }
        if (isUser($userid)) {
            $statuslink = ' - ' . textLink(scriptName() . '?activate' . $adml, MSG00151) . helpIcon(MSG00152);
        } else {
            $statuslink = ' - ' . textLink(scriptName() . '?activate' . $adml, MSG00151) . helpIcon(MSG00150);
        }
    } elseif ($userdata['account_active'] == '3') {
        $statuslink = ' - ' . textLink('mailto:' . szEmail(), MSG00149);
    }
    include_once 'views/profile_view.php';
}