</ul>

<?php 
loggedIn();
?>
    <!-- end .sidebar1 --></div>
  <div class="content">
    <h1>Ihr Profil</h1>
<?php 
require_once "mysql.inc.php";
if (isset($_SESSION["sessionLogin"])) {
    $sessionName = $_SESSION["sessionLogin"];
    echo "<p>Hallo {$sessionName}, dies ist dein Profil.<br><br></p>";
    echo "<form action='profil_admin.php' method='post'>\n\t\t\t<p><input type='submit' name='submitShowUser' value='Alle Benutzer anzeigen'><br></p>\n\t\t\t</form>";
    echo "<form action='profil_admin.php' method='post'>\n\t\t\t<p><input type='submit' name='submitShowDetails' value='Deine Daten anzeigen'><br></p>\n\t\t\t</form>";
} else {
    echo "<p>Sie sind nicht angemeldet.</p>";
}
if (isset($_POST["submitShowUser"])) {
    showUser();
}
if (isset($_POST["submitShowDetails"])) {
    showDetails($sessionName);
}
?>
  <!-- end .content --></div>
<?php 
include "includes/footer.php";
?>

Exemple #2
0
    if (!($fp = fopen('/etc/squid3/basic.passwd', 'w+'))) {
        print "Cannot open file (" . $fileName . ")";
        exit;
    }
    if ($fp) {
        foreach ($fileName as $line) {
            fwrite($fp, $line);
        }
        fclose($fp);
    }
}
// function for encrypting password
function htpasswd($pass)
{
    $pass = crypt(trim($pass), base64_encode(CRYPT_STD_DES));
    return $pass;
}
if (isset($_POST['changePass'])) {
    editUser($_POST['uname'], $_POST['pass']);
}
if (isset($_POST['delete'])) {
    delUser($_POST['uname']);
}
$out = "\n<html>\n<body>\n<table>\n";
$users = showUser();
foreach ($users as $user) {
    $out .= "\n\t<tr><td>" . $user['username'] . "</td><td>" . $user['password'] . "</td>\n\t<td>\n\t<form action=" . $_SERVER['PHP_SELF'] . " method=post name=delUserForm id=delUserForm>\n\t\t<input type=hidden name=uname value=" . $user['username'] . " />\n\t\t<input type=submit name=delete value=delete />\n\t</form>\n\t</td>\n\t</tr>\n";
}
$out .= "\n</table>\n<table>\n<form action=" . $_SERVER['PHP_SELF'] . " method=post name=squidUserForm id=squidUserForm>\n\t<tr><td>Username:</td><td align=left><input name=uname type=text size=20 /></td></tr>\n\t<tr><td>Password:</td><td align=left><input name=pass type=pass size=20 /></td></tr>\n\t<tr><td colspan=2><input type=submit name=changePass value=Change /></td></tr>\n</form>\n</table>\n";
$out .= "\n</body>\n</html>";
print $out;
Exemple #3
0
<?php

session_start();
if (!isset($_SERVER['HTTP_REFERER']) || !isset($_SESSION['authuser'])) {
    exit;
}
require_once "./include/config.inc";
define('INACTIVE', 0);
define('ACTIVE', 1);
define('DELETED', 2);
if (isset($_GET['action']) && $_GET['action'] == 'showUser') {
    $rt = showUser($_GET['id']);
    echo json_encode($rt);
    exit;
}
if (isset($_GET['action']) && $_GET['action'] == 'saveUser') {
    $username = isset($_GET['username']) ? SQLString($_GET['username'], "text") : '';
    $first_name = isset($_GET['first_name']) ? SQLString(html_entity_decode($_GET['first_name'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $last_name = isset($_GET['last_name']) ? SQLString(html_entity_decode($_GET['last_name'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $email = isset($_GET['email']) ? SQLString($_GET['email'], "text") : '';
    $password = isset($_GET['password']) ? SQLString(html_entity_decode($_GET['password'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $timezone = isset($_GET['timezone']) ? SQLString(html_entity_decode($_GET['timezone'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $phone = isset($_GET['phone']) ? SQLString(html_entity_decode($_GET['phone'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $cell_phone = isset($_GET['cell_phone']) ? SQLString(html_entity_decode($_GET['cell_phone'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $address = isset($_GET['address']) ? SQLString(html_entity_decode($_GET['address'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $location = isset($_GET['location']) ? SQLString(html_entity_decode($_GET['location'], ENT_NOQUOTES, 'UTF-8'), "text") : '';
    $bio = isset($_GET['bio']) ? html_entity_decode($_GET['bio'], ENT_NOQUOTES, 'UTF-8') : "";
    $bio = SQLString($bio, "text");
    if ($_GET['id'] > 0) {
        // update user
        $sql = sprintf("UPDATE user SET\n\t\t\t\t\t\t\tusername = %s,\n\t\t\t\t\t\t\tfirst_name = %s,\n\t\t\t\t\t\t\tlast_name = %s,\n\t\t\t\t\t\t\temail = %s,\n\t\t\t\t\t\t\tpassword = %s,\n\t\t\t\t\t\t\tlanguage_id = %s,\n\t\t\t\t\t\t\tforward_inbox_msg = %d,\n\t\t\t\t\t\t\tsite_admin = %d,\n\t\t\t\t\t\t\tnumber_msgs_per_screen = %d,\n\t\t\t\t\t\t\temail_detail_level = %d,\n\t\t\t\t\t\t\tstatus = %d,\n\t\t\t\t\t\t\ttimezone = %s,\n\t\t\t\t\t\t\tphone = %s,\n\t\t\t\t\t\t\tcell_phone = %s,\n\t\t\t\t\t\t\taddress = %s,\n\t\t\t\t\t\t\tlocation = %s,\n\t\t\t\t\t\t\tbio = %s,\n\t\t\t\t\t\t\torganization_id = %d\n\t\t\t\t\t\tWHERE id = %d", $username, $first_name, $last_name, $email, $password, $_GET['language_id'], $_GET['forward_inbox_msg'], $_GET['site_admin'], $_GET['number_msgs_per_screen'], $_GET['email_detail_level'], $_GET['status'], $timezone, $phone, $cell_phone, $address, $location, $bio, $_GET['organization_id'], $_GET['id']);
Exemple #4
0
        echo "<td></td>";
        echo "<td><a href='/site/blockuser?wallet={$user->username}'>block</a></td>";
    }
    echo "</tr>";
}
$t = time() - 24 * 60 * 60;
$list = dbolist("select userid from shares where pid is null or pid not in (select pid from stratums) group by userid");
foreach ($list as $item) {
    showUser($item['userid'], 'pid');
}
$list = dbolist("select id from accounts where balance>0.001 and id not in (select distinct userid from blocks where userid is not null and time>{$t})");
foreach ($list as $item) {
    showUser($item['id'], 'blocks');
}
$monsters = dbolist("SELECT COUNT(*) AS total, userid FROM workers GROUP BY userid ORDER BY total DESC LIMIT 5");
foreach ($monsters as $item) {
    showUser($item['userid'], 'miners');
}
$monsters = dbolist("SELECT COUNT(*) AS total, workerid FROM shares GROUP BY workerid ORDER BY total DESC LIMIT 5");
foreach ($monsters as $item) {
    $worker = getdbo('db_workers', $item['workerid']);
    if (!$worker) {
        continue;
    }
    showUser($worker->userid, 'shares');
}
$list = getdbolist('db_accounts', "is_locked");
foreach ($list as $user) {
    showUser($user->id, 'locked');
}
echo "</tbody></table>";
     deleteUser($id);
     break;
 case "cancel":
     cancel();
     break;
 case "register":
     register();
     break;
 case "dellic":
     deleteLicense();
     break;
 case "help":
     showHelpRegister();
     break;
 case "user":
     showUser($id);
     break;
 case "createhtaccess":
     createHtaccess();
     break;
 case "deletehtaccess":
     deleteHtaccess();
     break;
 case "deletelog":
     deleteLog();
     break;
 case "changeProfile":
     changeProfile();
     break;
 case "changeMaster":
     changeMaster();