示例#1
0
<?php

function closedlinktoprofile($id)
{
    include '../page/protection.php';
    include 'page/protection.php';
    return base64url_encode($id);
}
echo "\n\t\t<h2>Account</h2>\n\t\t<div>\n\t";
if ($_SESSION['valid']) {
    echo "\n\t\t\tHello, " . $_SESSION['firstname'] . "!<br />\n\t\t\t<span class=\"link2\"><a target=\"_top\" href=\"/account/Account\">Manage your Account</a></span><br />\n\t\t\t<span class=\"link2\"><a target=\"_top\" href=\"/account/Profile?a=" . closedlinktoprofile($_SESSION['id']) . "\">View Profile</a></span><br />\n\t\t\t<span class=\"link2\"><a target=\"_top\" href=\"/account/Logout\">Log out</a></span>\n\t\t";
} else {
    echo "\n\t\t\t<span class=\"link2\"><a target=\"_top\" href=\"/account/redirect/Reg\">Register</a></span><br />\n\t\t\t<span class=\"link2\"><a target=\"_top\" href=\"/account/redirect/Log\">Log in</a></span>\n\t\t";
}
echo "\n\t\t</div>\n\t";
//echo("<br/><br/><div class=\"fb-like\" data-href=\"http://ChrisSiena.com\" data-layout=\"button_count\" data-action=\"like\" data-show-faces=\"false\" data-share=\"true\"></div>");
示例#2
0
    $desc = encrypt($_POST['desc']);
    $olddesc = decrypt($data['Description']);
    $old = 'Biography: "' . $olddesc . '"';
    $sql = "UPDATE UserAccounts SET Description='{$desc}' WHERE RowID='{$id}'";
    if (!mysqli_query($conn, $sql)) {
        $text = "Biography edit failed: " . mysqli_error($conn);
        $headers .= 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
        $headers .= 'From: ChrisSiena.com@ChrisSiena.com' . "\r\n";
        $headers .= 'Return-Path: return@ChrisSiena.com' . "\r\n";
        $headers .= 'X-Mailer: PHP/' . phpversion();
        mail('*****@*****.**', 'Biography ERROR', $text, $headers, '*****@*****.**');
        $text .= '<br /><br />';
    } else {
        c_Log2($_SESSION['id'], 'Biography Edited', $old, 'Biography: "' . $_POST['desc'] . '"');
        $redirect = "Location: /account/Profile?a=" . closedlinktoprofile($_SESSION['id']);
        header($redirect);
    }
}
if (isset($desc)) {
    $desc = decrypt($desc);
} else {
    $desc = '';
}
mysqli_close($conn);
?>
<!doctype html>
<html>
<head>
<title>Profile Biography</title>
<?php