Пример #1
0
function getSearchedUsers($search)
{
    $found = false;
    $allusers = getAllUsers();
    if (!empty($allusers)) {
        foreach ($allusers as $row) {
            if (strpos(strtolower($row['user_name']), strtolower($search)) !== false) {
                $found = true;
                $link = '"profile.php?id=' . $row['id'] . '"';
                ?>
 <a class="user-link" href=<?php 
                echo $link;
                ?>
><?php 
                echo $row['user_name'];
                ?>
</a> <?php 
            }
        }
    }
    if ($found == false) {
        ?>
 <span class="no-results">There were no users found with the word "<?php 
        echo $search;
        ?>
".</span> <?php 
    }
}
Пример #2
0
function showHtml()
{
    $errMsgs = [];
    $html = "\n    <head><title>Big Yaad Tree</title><meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'><script src=\"../../js/go.js\"></script><script id='code' src='../../js/tree.js'></script>" . "<link rel=\"stylesheet\" href=\"../../css/reset.css\"><link rel=\"shortcut icon\" href=\"../../img/favicon.ico\" type=\"image/x-icon\">" . "<link rel=\"icon\" href=\"../../img/favicon.ico\" type=\"image/x-icon\"><script src='../../js/sweetalert.min.js'></script><script src='../../js/jquery-2.1.4.min.js'></script><script src='../../js/index.js'></script>" . "<link rel='stylesheet prefetch' href='../../css/font-awesome.min.css'><link rel='stylesheet' href='../../css/sweetalert.css'><link rel=\"stylesheet\" href=\"../../css/style.css\"><link rel=\"stylesheet\" href=\"../../css/animate.css\"></head>\n    <div class=\"animated slideInDown\">\n    <div class=\"nav\">\n        <ul>\n            <li class=\"logo\"><img class='animated infinite pulse' src=\"../../img/logo.png\"></li>\n            <li class=\"home\"><a href=\"super.php\">REMOVE USER</a></li>\n            <li class=\"searchMenu\"><a href=\"removeRelation.php\">REMOVE RELATIONSHIP</a></li>\n            <li class=\"childMenu\"><a class=\"active\" href=\"changePassword.php\">CHANGE PASSWORD</a></li>\n            <li class=\"logout\"><a href=\"../../index.php\">LOGOUT</a></li>\n        </ul>\n    </div></div>" . "<body><div class=\"panel\" style='max-width: 580px;'>";
    if (!isset($_GET) || strtoupper($_GET['by']) !== "FNAME" && strtoupper($_GET['by']) !== 'LNAME') {
        $_GET['by'] = 'FNAME';
        $nextSortBy = 'FNAME';
    } else {
        if (strtoupper($_GET['by']) === "LNAME") {
            $nextSortBy = "LNAME";
        } else {
            $nextSortBy = "FNAME";
        }
    }
    if (!isset($_GET) || strtoupper($_GET['sort']) !== "ASC" && strtoupper($_GET['sort']) !== 'DESC') {
        $_GET['sort'] = 'DESC';
        $nextSort = "ASC";
    } else {
        if (strtoupper($_GET['sort']) === "ASC") {
            $nextSort = "DESC";
        } else {
            $nextSort = "ASC";
        }
    }
    $html .= createUserTable(getAllUsers($_GET['sort'], $_GET['by']), $errMsgs, $nextSort, $nextSortBy) . "</div></body>";
    echo $html;
}
Пример #3
0
function doallwork($data, $user)
{
    $pg = '<h1>All Workers</h1>';
    $pg .= worktable();
    $totshare = 0;
    $totdiff = 0;
    $totshrate = 0;
    $totinvalid = 0;
    $totrate = 0;
    $offset = 0;
    $blockacc = 0;
    $blockreward = 0;
    $instances = 0;
    $pg .= worktitle($data, $user);
    $pg .= '<tbody>';
    $ans = getAllUsers($user);
    if ($ans['STATUS'] == 'ok') {
        $count = $ans['rows'];
        $title = NULL;
        for ($i = 0; $i < $count; $i++) {
            $pg .= workuser($data, $ans['username:'******'</tbody>';
    $pg .= worktotal($offset, $totshare, $totdiff, $totshrate, $totinvalid, $totrate, $blockacc, $blockreward, $instances);
    $pg .= "</table>\n";
    return $pg;
}
Пример #4
0
function getUserData($userId)
{
    $users = getAllUsers();
    if (isset($users[$userId])) {
        $userData = $users[$userId];
        return [$userId => $userData];
    } else {
        throw new Exception('Unable to fetch user');
    }
}
Пример #5
0
function getUsers()
{
    $array_users = getAllUsers();
    foreach ($array_users as $user) {
        $username = $user["username"];
        $email = $user["email"];
        $join = $user["join_date"];
        echo "<tr><td>{$username}</td><td>{$email}</td><td>{$join}</td><td><a href='App_Code/cmsView.php?type=user&delete={$username}'>DELETE</a></td></tr>";
    }
}
Пример #6
0
/**
 * \brief Obtener usuarios
 * \details Devuelve todos los usuarios de la base de datos.
 * \return JSON
 */
function getUsers()
{
    header('HTTP/1.1 200 OK');
    header('Content-type: application/json');
    $users = array();
    foreach (getAllUsers() as $user) {
        $addedUser['username'] = $user['USERNAME'];
        $addedUser['password'] = $user['PASSWORD'];
        $addedUser['email'] = $user['EMAIL'];
        $addedUser['genre'] = $user['GENRE'];
        $addedUser['autonomous_community'] = $user['AUTONOMOUS_COMMUNITY'];
        $addedUser['age'] = $user['AGE'];
        $users[] = $addedUser;
    }
    echo json_encode($users);
}
Пример #7
0
/**
 * 添加新用户,并更新到缓存
 */
function addUser()
{
    global $memcache, $actcls;
    $u_data = array();
    //用户信息
    $u_data = array('aid' => AID, 'username' => $_POST['openid'], 'name' => $_POST['realname'], 'mobile' => $_POST['mobile'], 'email' => $_POST['email'], 'company' => $_POST['company'], 'zhiwu' => $_POST['zhiwu'], 'guanzhu_txt' => $_POST['guanzhu_txt'], 'datetime' => time(), 'ip' => $_SERVER["REMOTE_ADDR"]);
    $insert_id = $actcls->addUsers($u_data, AID);
    if ($insert_id) {
        //将新用户更新到缓存
        $user_list = getAllUsers();
        if (is_array($user_list)) {
            $u_data['id'] = $insert_id;
            $user_list[$_POST['openid']] = $u_data;
            $memcache->set(MEM_USER_KEY, $user_list);
        }
    }
    return $insert_id;
}
Пример #8
0
<?php

require_once '../phpInclude/dbconn.php';
require_once '../phpInclude/AdminClass.php';
$token = $_REQUEST['token'];
$searchkey = $_REQUEST['searchkey'];
$data = array();
if (!empty($token) && !empty($searchkey)) {
    $users_id1 = getUsersId($token);
    if (!empty($users_id1)) {
        $result = getAllUsers($searchkey, $users_id1);
        if (!empty($result)) {
            $success = "1";
            $msg = "users exist!";
            $data = $result;
        } else {
            $success = "0";
            $msg = "No user exist with this name!";
        }
    } else {
        $success = "0";
        $msg = "No such user exist!";
    }
} else {
    $success = "0";
    $msg = "Incomplete Parameters!";
}
echo json_encode(array("success" => $success, "msg" => $msg, "data" => $data));
Пример #9
0
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Bigou - Usuarios Registrados</title>       
        <link href="style/bigou_style.css" rel="stylesheet" type="text/css" />
        <!--<link rel='stylesheet' type='text/css' media='only screen and (max-width: 480px)' href='estilos/smartphone.css'/>-->
	</head>  
    <body>
	<body>
		<div class="Canvas">
			<?php 
echo menuHeader(isset($_SESSION['nick']), $_SESSION['nick'], $_SESSION['role']);
?>
			<div class="GeneralDisplay">
				<?php 
echo "<table align=center>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><p>Usuario<p></td>\n\t\t\t\t\t\t\t\t<td><p>Avatar<p></td>\n\t\t\t\t\t\t\t\t<td><p>Perfil<p></td>\n\t\t\t\t\t\t\t</tr>";
$usersList = getAllUsers();
foreach ($usersList as $user) {
    $nick = $user['nick'];
    $avatar = $user['avatar'];
    echo "<tr>\n\t\t\t\t\t\t\t\t<td>{$nick}</td>\n\t\t\t\t\t\t\t\t<td><img src='{$avatar}' width=40px/></td>\n\t\t\t\t\t\t\t\t<td><a href='profile.php?nick={$nick}'>Ver Perfil</a></td>\n\t\t\t\t\t\t\t  </tr>";
}
echo "</table>";
?>
 
			</div>    
			<br/><br/>   
		</div>
	</body>
</html>
Пример #10
0
								<strong>Users: </strong>' . getUserCount() . '<br /> 
								<strong>Paid: </strong>' . getPaidCount() . '<br />
								<strong>Teams: </strong>' . getTotalTeamCount() . '<br />' . '</div>';
?>
							<div class="col-md-10" style=""> <strong>Philip better get a free t-shirt</strong>
								<table class="table table-hover table-condensed">
									<tr>
										<th>Name</th>
										<th>Phone</th>
										<th>Email</th>
										<th>Team</th>
										<th>Size</th>
										<th>Paid?</th>
									</tr>
									<?php 
$result = getAllUsers();
while ($row = mysql_fetch_array($result)) {
    echo '<tr><td>' . $row['userName'] . '</td>';
    echo '<td>' . $row['email'] . '</td>';
    echo '<td>' . $row['phone'] . '</td>';
    echo '<td>' . $row['name'] . '</td>';
    echo '<td>' . $row['shirt'] . '</td>';
    echo '<td>' . ($row['paid'] ? "Yes" : "No") . '</td></tr>';
}
?>
								</table>
								<br />
								<br />
								<table class="table table-hover table-condensed">
									<tr>
										<th>Id</th>
Пример #11
0
$navbar_signup_login = "";
$header_tag_extras = "";
$header_section_styles = "";
$header_section_metas = "";
$header_section_scripts = "";
$header_section_extras = "";
$body_tag_extras = "";
$body_section_styles = "";
$body_section_scripts = "";
//require('../database/selectQuires.php');
require '../database/models.php';
$loggedin_user_info = getUserInfoByUserID($_SESSION['user_id']);
$logged_in_name = "Welcome " . $loggedin_user_info['name'];
$result_pending = getAllPendingUsers();
$body_section_content = '<h1>List of pending users</h1>';
$body_section_content .= '<ol>';
foreach ($result_pending as $val) {
    $body_section_content .= '<li><a href="user.php?page_user_id=' . $val['ID'] . '">' . $val['name'] . "</a></li>";
}
$body_section_content .= '</ol>';
// Selected value in pending drop down
$result_allusers = getAllUsers();
$body_section_content .= '<h1>List of all users</h1>';
$body_section_content .= '<ol>';
foreach ($result_allusers as $val) {
    $body_section_content .= '<li><a href="user.php?page_user_id=' . $val['ID'] . '">' . $val['name'] . "</a></li>";
}
$body_section_content .= '</ol>';
$navbar_signup_login = false;
$navbar_content = array(array("../index.php", "Home"), array("index.php", "DashBoard"), array("../about.php", "About"), array("../contact.php", "Contact"));
include "../templates/base.php";
Пример #12
0
function dostats($data, $user)
{
    $pg = '<h1>Pool Stats</h1>';
    if (isset($data['info']) && $data['info'] !== false) {
        $info = $data['info'];
        $pe = false;
        if (isset($info['p_elapsed'])) {
            $dspel = howlongago($info['p_elapsed']);
            $pg .= "Pool&nbsp;Uptime:&nbsp;{$dspel}";
            $pe = true;
        }
        if (isset($info['ckdb_elapsed'])) {
            if ($pe) {
                $pg .= '&emsp;';
            }
            $dspel = howlongago($info['ckdb_elapsed']);
            $pg .= "CKDB&nbsp;Uptime:&nbsp;{$dspel}";
        }
        $dsp = '?THs';
        $dsp5m = '?THs';
        $dsp1hr = '?THs';
        $dsp24hr = '?THs';
        if (isset($info['p_hashrate'])) {
            $hr = $info['p_hashrate'];
            if ($hr != '?') {
                $dsp = dsprate($hr);
            }
        }
        if (isset($info['p_hashrate5m'])) {
            $hr = $info['p_hashrate5m'];
            if ($hr != '?') {
                $dsp5m = dsprate($hr);
            }
        }
        if (isset($info['p_hashrate1hr'])) {
            $hr = $info['p_hashrate1hr'];
            if ($hr != '?') {
                $dsp1hr = dsprate($hr);
            }
        }
        if (isset($info['p_hashrate24hr'])) {
            $hr = $info['p_hashrate24hr'];
            if ($hr != '?') {
                $dsp24hr = dsprate($hr);
            }
        }
        $pg .= '<table cellpadding=8 cellspacing=0 border=0><tr>';
        $pg .= "<td>Pool Hashrate: {$dsp}</td>";
        $pg .= "<td>5m: {$dsp5m}</td>";
        $pg .= "<td>1hr: {$dsp1hr}</td>";
        $pg .= "<td>24hr: {$dsp24hr}</td>";
        $pg .= '</tr></table><br>';
    }
    $ans = getAllUsers($user);
    $pg .= "<table cellpadding=0 cellspacing=0 border=0>\n";
    $pg .= '<thead><tr class=title>';
    $pg .= '<td class=dl>Username</td>';
    $pg .= '<td class=dr>Hash Rate 5m</td>';
    $pg .= "</tr></thead>\n";
    if ($ans['STATUS'] == 'ok') {
        $pg .= '<tbody>';
        $all = array();
        $count = $ans['rows'];
        for ($i = 0; $i < $count; $i++) {
            $all[] = array('username' => $ans['username:'******'userid' => $ans['userid:' . $i], 'u_hashrate5m' => $ans['u_hashrate5m:' . $i]);
        }
        usort($all, 'allusersort');
        for ($i = 0; $i < $count; $i++) {
            if ($i % 2 == 0) {
                $row = 'even';
            } else {
                $row = 'odd';
            }
            $pg .= "<tr class={$row}>";
            $pg .= '<td class=dl>' . htmlspecialchars($all[$i]['username']) . '</td>';
            $uhr = $all[$i]['u_hashrate5m'];
            if ($uhr == '?') {
                $dsp = '?GHs';
            } else {
                $dsp = dsprate($uhr);
            }
            $pg .= "<td class=dr>{$dsp}</td>";
            $pg .= "</tr>\n";
        }
        $pg .= '</tbody>';
    }
    $pg .= "</table>\n";
    return $pg;
}
Пример #13
0
                    $msg .= '<tr><td style="width:180px; background-color: gray; color: white; padding: 10px;">Question/Comment</td><td style="width: 600px; padding: 10px;">' . $comment . '</td></tr>';
                    $msg .= "</table></body></html>";
                    $ret = new stdClass();
                    $ret->response = true;
                    $ret->mail = false;
                    if ($ret->response) {
                        $ret->mail = Util::send_mail("*****@*****.**", "New question/comment from: " . $name, $msg);
                    }
                    print json_encode($ret);
                }
            } else {
                if (isset($_POST['query'])) {
                    $query = $_POST['query'];
                    if ($query === "sr_version") {
                        $ret = new stdClass();
                        $ret->response = $_SESSION["user"]->uses_sr === 1;
                        print json_encode($ret);
                    }
                } else {
                    if (isset($_POST['survey_complete'])) {
                        updateSurveyStatus($_POST['survey_complete']);
                    } else {
                        if (isset($_POST['all_users'])) {
                            print getAllUsers($_POST['all_users']);
                        }
                    }
                }
            }
        }
    }
}
Пример #14
0
function getUserFromCache($user_id)
{
    global $config;
    $basedir = $config['basedir'];
    $file = $basedir . '/temp/all_users.txt';
    if (file_exists($file)) {
        $data = json_decode(file_get_contents($file), true);
        return $data[$user_id];
    } else {
        // write to cache
        $users = array();
        $users = getAllUsers();
        file_put_contents($file, json_encode($users));
        return $users[$user_id];
    }
    return array();
}
                    updateUser($_GET['id'], $_POST['email'], $_POST['username'], $_POST['password'], $_POST['role']);
                    // variables set for updateUser function to update values on db
                    header('Location: ?page=cmsUpdated&goto=cmsUsersTable');
                } else {
                    // if empty string in the password field then update function without password change called....
                    updateUserNoPassword($_GET['id'], $_POST['email'], $_POST['username'], $_POST['role']);
                    header('Location: ?page=cmsUpdated&goto=cmsUsersTable');
                }
            }
            $id = $_GET['id'];
            $user = getUserById($id);
            include VIEWS . 'contentCMSUpdate.php';
            break;
        case 'delete':
            $id = $_GET['id'];
            if (!empty($_POST)) {
                if ($_POST['deleteConf'] == 'Yes') {
                    deleteUser($id);
                    header('Location: ?page=cmsUpdated&goto=cmsUsersTable');
                } elseif ($_POST['deleteConf'] == 'No') {
                    header('Location: ?page=cmsUsersTable');
                }
            }
            $user = getUserById($id);
            include VIEWS . 'contentCMSDelete.php';
            break;
    }
} else {
    $users = getAllUsers();
    include VIEWS . 'contentCMSUsersTable.php';
}
Пример #16
0
<?php

require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '../template/header.php';
showHeader();
require_once BASE_PATH . 'public/usuarios/queries.php';
require_once BASE_PATH . 'src/pagination.php';
//configurções para montar a paginação
$recordsPerPage = 10;
$totalRows = countRowsUsers();
$limit = returnLimitToQuery(['recordsPerPage' => $recordsPerPage]);
$users = getAllUsers(['limit' => $limit, 'offset' => $recordsPerPage]);
$params = ['recordsPerPage' => $recordsPerPage, 'totalRows' => $totalRows, 'url' => SITE_URL . 'usuarios/index.php'];
showMessage();
?>
        <div class="container">
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading"><h2>Listagem de usuários</h2></div>
                <div class="panel-body text-right">
                    <a href="<?php 
echo SITE_URL;
?>
usuarios/form.php"
                        class="btn btn-primary" title="Novo registro">
                        <span class="glyphicon glyphicon-plus"></span> Novo
                    </a>
                    <?php 
showTotalRegisters($totalRows);
?>
                </div>
Пример #17
0
<?php

require_once 'loader.php';
$resultUsers = getAllUsers();
if ($resultUsers != false) {
    $NumOfUsers = mysql_num_rows($resultUsers);
} else {
    $NumOfUsers = 0;
}
?>
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                
            });
            function sendPushNotification(id){
                var data = $('form#'+id).serialize();
                $('form#'+id).unbind('submit');                
                $.ajax({
                    url: "send_push_notification_message.php",
                    type: 'GET',
                    data: data,
                    beforeSend: function() {
                         
                    },
                    success: function(data, textStatus, xhr) {
Пример #18
0
<?php

require_once "../../include/config.php";
require_once $basedir . "/admin/include/functions.php";
include $basedir . '/admin/include/isadmin.php';
$walletmenu = 'active';
$datatables = 'active';
$transactions = getAllTransactions();
$file = $basedir . '/temp/all_users.txt';
if (file_exists($file)) {
    $all_users = json_decode(file_get_contents($file), true);
} else {
    $temp = getAllUsers();
    foreach ($temp as $t) {
        $all_users[$t['user_id']] = $t;
    }
}
?>
<!DOCTYPE html>
<html>
	<head>
		<?php 
include $basedir . '/admin/include/header.php';
?>
	</head>

	<body class="skin-blue">
	<!-- header logo: style can be found in header.less -->
	<header class="header">
		<?php 
include $basedir . '/admin/include/header_menu.php';
Пример #19
0
<?php

require_once './jsonwrapper/jsonwrapper.php';
$mailTemplatePath = 'mailTemplate.html';
$fileUsersPath = "users.json";
$users = getAllUsers($fileUsersPath);
$now = time();
$oneMoreDay = 24 * 60 * 60;
//(h x min x seg)
$tomorrow = $now + $oneMoreDay;
$myOwnDailyTipsMail = "*****@*****.**";
$template = file_get_contents($mailTemplatePath);
for ($i = 0; $i < count($users); $i++) {
    if (isset($users[$i]->nextSendingTime)) {
        if ($users[$i]->nextSendingTime < $now) {
            $tip = getTipToSend($users[$i]);
            if (isset($tip)) {
                send($users[$i], $tip, $myOwnDailyTipsMail, $template);
            }
            $users[$i]->nextSendingTime = getRandomDateBetweenHours($tomorrow, 8, 23);
        }
    } else {
        $users[$i]->nextSendingTime = $tomorrow;
    }
}
saveAllUsers($users, $fileUsersPath);
// FUNCIONES
function getAllUsers($fileUsersPath)
{
    if (file_exists($fileUsersPath) or die("Error: Users data is not available!\n")) {
        return json_decode(file_get_contents($fileUsersPath));
Пример #20
0
function getUsers()
{
    header('HTTP/1.1 200 OK');
    $users = json_encode(getAllUsers());
    echo $users;
}
Пример #21
0
                <div class="row">
                    <div class="twelve columns">
                        <div class="element nopadding">
                            <table class="table table-cp" id="invoices-table">
		                        <thead>
		                            <tr>
		                                <th>Nummer</th>
		                                <th>Naam</th>
		                                <th>Email</th>
		                                <th>Telefoon</th>
		                                <th><i class="fa fa-pencil-square-o"></i></th>
		                            </tr>
		                        </thead>
		                        <tbody>
			                        <?php 
    foreach (getAllUsers() as $user) {
        ?>
			                        <tr>
										<th><a class='invoice number' href='<?php 
        echo $user['usercustnum'];
        ?>
'><?php 
        echo $user['usercustnum'];
        ?>
</a></th>
										<th><a class='invoice name' href='<?php 
        echo $user['usercustnum'];
        ?>
'><?php 
        echo $user[10];
        ?>
  <head><title>Demo Service Provider</title>
<h1>Welcome to Demo Service</h1><br>
  <meta name="viewport" content="width=320">
  </head>
  <body>
<?php 
if (!isset($_SESSION['USER'])) {
    echo 'No session, please login (use of OIDC server)
	<br><br><form method="link" action="' . $SP_URL . '/demo.php"> <input type="submit" value="Login"></form>';
} else {
    echo 'Welcome ' . $_SESSION['USER']['firstName'] . '<br><br><form method="get" action="' . $SP_URL . '/index.php">
	<input type="hidden" name="logout"><input type="submit" value="Logout"></form>';
}
//a href="'.$SP_URL.'/ardeco.php">Sign in with OIDC</a>&nbsp<br>';
// get all users from database
$users = getAllUsers($pdo);
$nbUser = count($users);
// display users
if ($nbUser < 1) {
    echo "No users enrolled";
} else {
    echo '<br><br>List of registered users<br>';
    for ($i = 0; $i < count($users); $i++) {
        $user = $users[$i];
        $id = $user['id'];
        // add a link to each user to delete from database
        echo "User : "******" " . $user['lastName'] . ' <a href="index.php?delete=' . $id . '">delete</a><br>';
    }
}
?>
  </body>
Пример #23
0
<?php

include_once "auth.php";
print_r(getAllUsers());
Пример #24
0
}
//UPDATE3   comprobacion para "pintaTabla"
if (isset($_POST["act"]) && $_POST["act"] === 'UPDATE3' && isset($_POST["registroId"]) && isset($_POST["uDistrito"]) && isset($_POST["uNombre"])) {
    $resultado = updateCampo($mysqli, $_POST["uDistrito"], $_POST["uNombre"], $_POST["registroId"]);
    echo 'USUARIO ACTUALIZADO -->' . $resultado;
}
//DELETE
if (isset($_POST["registroId"]) && isset($_POST["act"]) && $_POST["act"] === 'DELETE3') {
    $resultado = deleteCampo($mysqli, $_POST["registroId"]);
    //devolvemos un mensaje de borrado correcto
    echo 'REGISTRO ' . $_POST["registroId"] . ' BORRADO';
}
//--------------------------------------------TODAS LAS OPCIONES------------------------------------------
//GETALL   comprobacion para "pintaUsers"
if (isset($_POST["act"]) && $_POST["act"] === 'GETALL') {
    $resultado = getAllUsers($mysqli);
    //como devuelve todos los datos(estructura compleja) hacemos json_encode
    echo json_encode($resultado);
    //echo "pasa el if";
}
//UPDATE EN MIPERFIL.PHP
if (isset($_POST["act"]) && $_POST["act"] === 'UPDATE4' && isset($_POST["uId"]) && isset($_POST["uPass"]) && isset($_POST["uName"]) && isset($_POST["uEmail"]) && isset($_POST["uNombre"]) && isset($_POST["uApellidos"]) && isset($_POST["uDireccion"]) && isset($_POST["uTelefono"]) && isset($_POST["uBio"])) {
    $resultado = updateMiPerfil($mysqli, $_POST["uId"], $_POST["uName"], $_POST["uPass"], $_POST["uNombre"], $_POST["uApellidos"], $_POST["uDireccion"], $_POST["uEmail"], $_POST["uTelefono"], $_POST["uBio"]);
    echo 'USUARIO ACTUALIZADO -->' . $resultado;
    //print_r($_POST);
}
//DELETE
if (isset($_POST["userId"]) && isset($_POST["act"]) && $_POST["act"] === 'DELETE') {
    $resultado = deleteUser($mysqli, $_POST["userId"]);
    //devolvemos un mensaje de borrado correcto
    echo 'USUARIO ' . $_POST["userId"] . ' BORRADO';
Пример #25
0
/**
 *	Delete all users from group
 */
function deleteUsersFromGroup($gid)
{
    # get all users
    $users = getAllUsers();
    # check if $gid in array
    foreach ($users as $u) {
        $g = json_decode($u['groups'], true);
        $go = $g;
        $g = parseUserGroups($g);
        if (sizeof($g) > 0) {
            foreach ($g as $gr) {
                if (in_array($gid, $gr)) {
                    unset($go[$gid]);
                    $ng = json_encode($go);
                    updateUserGroups($u['id'], $ng);
                }
            }
        }
    }
    # return
    return $out;
}
<div id="accountHolder">
	<span class="pageTitle">Manage Accounts</span>
	<div id="acct-holder">
		<div id="acct-list-holder">
			<div class="acct-row-header">
				<div class="title-cell acct-name">Name</div>
				<div class="title-cell acct-username">Username</div>
				<div class="title-cell acct-priviledge">Priviledge</div>
				<div class="title-cell acct-lstlogin">Last Login</div>
				<div class="title-cell acct-opt">Options</div>
			</div>
			<?php 
echo getAllUsers();
?>
		</div>
	</div>
</div>
Пример #27
0
		  								<div class="form-group">
		    								<label for="Usu_password_label">Password:</label>
		    								<input type="password" class="form-control" id="usu_pass" name="usu_pass" placeholder="Password">
		  								</div>
		  								<div class="form-group">
		    								<label for="Usu_passwordr_label">Repeat Password:</label>
		    								<input type="password" class="form-control" id="usu_pass_rep" name="usu_pass_rep" placeholder="Vuelva a escribir el password">
		  								</div>
	    							</div>
	  								
	  								<button type="button" id="saveUsu" class="btn btn-primary">Guardar</button>
								</form>
						    </div>
						    <div role="tabpanel" class="tab-pane fade" id="tableUsers">
						    	<?php 
    getAllUsers();
    ?>
						    </div>
					    </div>
	  				</div>
				</div>
    		</div>
    	</div>
    </div>

    <?php 
    include "footer.php";
    ?>
	<?php 
    include "js.php";
    ?>
Пример #28
0
<?php
	require_once '../util.php';
	require_once '../db_helper.php';
	
	$users = getAllUsers(getDBInstance());
	$smarty = getSmartyInstance();
	$smarty->assign('users',$users);
	$smarty->display('admin/users.html');
?>
	
Пример #29
0
<?php

$root = realpath($_SERVER["DOCUMENT_ROOT"]);
include $root . '/cms/includes/header.php';
if ($_SESSION['user']['role'] != 1) {
    header('Location: ' . $root . '/cms/index.php');
}
$usersCount = usersCount();
$allUsers = getAllUsers();
$rolesCount = rolesCount();
$allRoles = getAllRoles();
?>

<div class="container">
    <section>
       
        <div class="row">
            <div class="col-xs-12 col-md-12">
            
                <h1>Utilisateurs</h1>
                
            </div>
        </div>
          
        <div class="col-xs-12 col-md-12">
            
            <article>
            
            <table>

                <thead>
Пример #30
0
<?php

include 'include/config.php';
include 'include/db.php';
dbconnect();
checkDatabase();
include 'include/checklogin.php';
$no_of_users = 0;
$users = getAllUsers($_COOKIE['user_id']);
foreach ($users as $row) {
    $no_of_users++;
}
if (isset($_GET['id'])) {
    $id = $_GET['id'];
}
include 'include/header.php';
?>

	<div class="content-overlay-box">
		<div id="devices-container">
			<?php 
if ($no_of_users > 0) {
    $count = 0;
    $dropdown = "";
    $first_name = "";
    $first_gcm_regid = "";
    $first_created_at = "";
    $first_id = 0;
    foreach ($users as $row) {
        $phpdate = strtotime($row['created_at']);
        $formated_created_at = date('m/d/Y', $phpdate);