<?php 
$tabs = array("users-karma", "users-comments", "users-posts");
?>

						<?php 
foreach ($tabs as $tab => $tabname) {
    ?>
							<div class="tabs__tab<?php 
    if ($tab == 0) {
        echo ' is-visible';
    }
    ?>
">

								<?php 
    show_users($tabname);
    ?>

							</div>
						<?php 
}
?>

					</div>
				</div>
			</div>
		</section>

	</div><!-- .main -->

	<footer class="footer">
            // TODO: repopulate domain name(s) to the form if there was an error occured
            $error = true;
        } elseif (add_domain($domain, $owner, $dom_type, '', $zone_template)) {
            success("<a href=\"edit.php?id=" . get_zone_id_from_name($domain) . "\">" . $domain . " - " . SUC_ZONE_ADD . '</a>');
        }
    }
    if (false === $error) {
        unset($domains, $owner, $dom_type, $zone_template);
    }
}
if ($zone_master_add != "1") {
    error(ERR_PERM_ADD_ZONE_MASTER);
} else {
    echo "     <h2>" . _('Add master zone') . "</h2>\n";
    $available_zone_types = array("MASTER", "NATIVE");
    $users = show_users();
    $zone_templates = get_list_zone_templ($_SESSION['userid']);
    echo "     <form method=\"post\" action=\"add_zone_master.php\">\n";
    echo "      <table>\n";
    echo "       <tr>\n";
    echo "        <td class=\"n\">" . _('Zone name') . ":</td>\n";
    echo "        <td class=\"n\">\n";
    echo "         <ul id=\"domain_names\" style=\"list-style-type:none; padding:0 \">\n";
    echo "          <li><input type=\"text\" class=\"input\" name=\"domain[]\" value=\"\" id=\"domain_1\"></li>\n";
    echo "         </ol>\n";
    echo "        </td>\n";
    echo "        <td class=\"n\">\n";
    echo "         <input class=\"button\" type=\"button\" value=\"Add another domain\" onclick=\"addField('domain_names','domain_',0);\" />\n";
    echo "        </td>\n";
    echo "       </tr>\n";
    echo "       <tr>\n";
}
$user_records = get_users();
?>

<html>
<head>
	<title> Show users with actions page </title>
</head>
<body>

	<h3> Displaying Users</h3>
	
	<table name="user_table" width="70%" border="1">
		<?php 
if ($user_records) {
    show_users($user_records);
}
?>
	</table>
	<br>
	<?php 
if ($number_of_rows > 0) {
    ?>
		Total Number of rows: <?php 
    echo $number_of_rows;
    ?>
	<?php 
}
?>

</body>
Beispiel #4
0
     if ($valuser->isadmin() && frm_ok('id', 1)) {
         db_execquery('UPDATE ' . TBL_USERS . ' SET u_status = 0 WHERE u_id = ' . frm_get('id', 1));
     }
     show_users();
     break;
 case 'saveadminuseroptions':
     if ($valuser->isadmin()) {
         if (!frm_isset('cancel')) {
             $id = frm_get('id', 1);
             if (frm_ok('id', 1)) {
                 $id = frm_get('id', 1);
                 save_useroptions($id);
                 show_useroptions(true, $id, get_lang(358), true);
             }
         } else {
             show_users();
         }
     }
     break;
 case 'saveuseroptions':
     if (db_guinfo('u_access') != 2) {
         $state = save_useroptions($u_id);
         switch ($state) {
             case 2:
                 show_useroptions(false, $u_id, get_lang(157), true);
                 break;
             case 3:
                 show_useroptions(false, $u_id, get_lang(165), true);
                 break;
             default:
                 show_useroptions(false, $u_id, get_lang(358), true);
Beispiel #5
0
// $Id: users.inc.php,v 1.1 2008-10-20 14:10:00 dbellamy Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
$admin_layout = str_replace('!!menu_sous_rub!!', htmlentities($msg[26], ENT_QUOTES, $charset), $admin_layout);
print $admin_layout;
require_once './admin/users/users_func.inc.php';
print $admin_user_javascript;
switch ($action) {
    case 'pwd':
        include "./admin/users/user_pwd.inc.php";
        break;
    case 'modif':
        include "./admin/users/user_modif.inc.php";
        break;
    case 'update':
        include "./admin/users/user_update.inc.php";
        break;
    case 'add':
        echo window_title($database_window_title . $msg[347] . $msg[1003] . $msg[1001]);
        user_form("", "", "", 3, 0, "", 10, 10, 10, $form_param_default = "", "", "0", "0");
        echo form_focus('userform', 'form_login');
        break;
    case 'del':
        include "./admin/users/user_del.inc.php";
        break;
    default:
        echo window_title($database_window_title . $msg[25] . $msg[1003] . $msg[1001]);
        show_users($dbh);
        break;
}
Beispiel #6
0
function Draw_Page($Page_Type)
{
    // Read only pages - these pages don't strictly require user authentication.
    // Therefore, to enable permit-all page viewing, comment out the call
    // to rejectIfNotAuthenticated() in the relevant case block. Note, some of
    // these pages will replace sensitive info such as telephone/email with
    // the string 'PROTECTED'
    // ************************************************************************
    switch ($Page_Type) {
        case "default":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/start_page.php';
            startPage();
            break;
        case "View_Service_Endpoint":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_service_endpoint.php';
            view_endpoint();
            break;
        case "Service_Groups":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_all.php';
            showAllServiceGroups();
            break;
        case "Service_Group":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_sgroup.php';
            showServiceGroup();
            break;
        case "Site":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/view_site.php';
            view_site();
            break;
        case "NGI":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/view_ngi.php';
            view_ngi();
            break;
        case "Service":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_service.php';
            view_se();
            break;
        case "Services":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_all.php';
            drawSEs();
            break;
        case "NGIs":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/view_ngis.php';
            view_ngis();
            break;
        case "Sites":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/view_all.php';
            showAllSites();
            break;
        case "Projects":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/view_all.php';
            show_all_projects();
            break;
        case "Project":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/view_project.php';
            show_project();
            break;
        case "Scope_Help":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/scope_help.php';
            show_help();
            break;
        case "Site_Geo_xml":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/sitesForGoogleMapXML.php';
            show_xml();
            break;
        case "Error_Redirect":
            //rejectIfNotAuthenticated();
            show_view('error.php', $_REQUEST['error']);
            break;
        case "Static_HTML":
            //rejectIfNotAuthenticated();
            Draw_Static_HTML();
            break;
        case "Search":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/search.php';
            search();
            break;
            // CrUD Pages - These pages MUST have authentication enabled so
            // the calls to rejectIfNotAuthenticated() must be used.
            // *********************************************************************
        // CrUD Pages - These pages MUST have authentication enabled so
        // the calls to rejectIfNotAuthenticated() must be used.
        // *********************************************************************
        case "Revoke_Role":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/revoke_request.php';
            view_revoke_request();
            break;
        case "Accept_Role_Request":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/accept_request.php';
            view_accept_request();
            break;
        case "Deny_Role_Request":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/deny_request.php';
            view_deny_request();
            break;
        case "Role_Requests":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/view_requests.php';
            view_requests();
            break;
        case "Request_Role":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/request_role.php';
            request_role();
            break;
        case "Edit_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_site.php';
            edit_site();
            break;
        case "Edit_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service.php';
            edit_service();
            break;
        case "SE_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/se_downtimes.php';
            se_downtimes();
            break;
        case "Add_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service.php';
            add_service();
            break;
        case "Add_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service_endpoint.php';
            add_service_endpoint();
            break;
        case "Delete_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service.php';
            delete();
            break;
        case "Edit_User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/edit_user.php';
            edit_user();
            break;
        case "User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/view_user.php';
            view_user();
            break;
        case "Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_downtime.php';
            view();
            break;
        case "My_Sites":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/my_sites.php';
            my_sites();
            break;
        case "Edit_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/edit_ngi.php';
            edit_ngi();
            break;
        case "Edit_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/edit_service_group.php';
            edit_service_group();
            break;
        case "Add_Service_Group_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_ses.php';
            add_ses();
            break;
        case "Search_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/search_ses.php';
            search_ses();
            break;
        case "Remove_Service_Group_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/remove_ses.php';
            remove_ses();
            break;
        case "Add_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/add_site.php';
            add_site();
            break;
        case "SGroup_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_sgroup_downtimes.php';
            view_sgroup_downtimes();
            break;
        case "Add_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_service_group.php';
            add_service_group();
            break;
        case "Site_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/site_downtimes.php';
            site_downtimes();
            break;
        case "Register":
            rejectIfNotAuthenticated('Access denied - ' . 'you need to be pre-authenticated before you can register a new account');
            require_once __DIR__ . '/controllers/user/register.php';
            register();
            break;
        case "Add_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/add_downtime.php';
            //require_once __DIR__.'/controllers/downtime/add_downtime_old.php';
            add();
            break;
        case "Edit_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/edit_downtime.php';
            //require_once __DIR__.'/controllers/downtime/edit_downtime_old.php';
            edit();
            break;
        case "End_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/end_downtime.php';
            endDt();
            break;
        case "Downtime_view_endpoint_tree":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_endpoint_tree.php';
            getServiceandEndpointList();
            break;
        case "Edit_Downtime_view_endpoint_tree":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_endpoint_tree.php';
            editDowntimePopulateEndpointTree();
            break;
        case "Downtime_View_Services":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_services.php';
            getSitesServices();
            break;
        case "Delete_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/delete_site.php';
            delete();
            break;
        case "Delete_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/delete_downtime.php';
            delete();
            break;
        case "Downtimes_Overview":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/downtimes_overview.php';
            view();
            break;
        case "Delete_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/delete_service_group.php';
            delete();
            break;
        case "Delete_User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/delete_user.php';
            delete();
            break;
        case "Edit_Certification_Status":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_cert_status.php';
            edit();
            break;
        case "Retrieve_Account":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/retrieve_account.php';
            retrieve();
            break;
        case "Remove_Project_NGIs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/remove_ngis.php';
            remove_ngis_project();
            break;
        case "Add_Project_NGIs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/add_ngis.php';
            add_ngis_to_project();
            break;
        case "Edit_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/edit_project.php';
            edit_project();
            break;
        case "Delete_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/delete_project.php';
            delete_project();
            break;
        case "Admin_Move_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/move_site.php';
            move_site();
            break;
        case "Admin_Move_SEP":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/move_service_end_point.php';
            move_service_end_point();
            break;
        case "Admin_Service_Types":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/view_service_types.php';
            show_all();
            break;
        case "Admin_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/view_service_type.php';
            view_service_type();
            break;
        case "Admin_Edit_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_service_type.php';
            edit_type();
            break;
        case "Admin_Add_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_service_type.php';
            add_type();
            break;
        case "Admin_Delete_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_service_type.php';
            delete_service_type();
            break;
        case "Admin_Delete_Service_Type_Denied":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_service_type_denied.php';
            deny_delete_type();
            break;
        case "Admin_Add_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_ngi.php';
            add_ngi();
            break;
        case "Admin_Users":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/users.php';
            show_users();
            break;
        case "Admin_Edit_User_DN":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_user_dn.php';
            edit_dn();
            break;
            //        case "Admin_Change_User_Admin_Status":
            //            rejectIfNotAuthenticated();
            //            require_once __DIR__.'/controllers/admin/edit_user_isadmin.php';
            //            make_admin();
            //            break;
        //        case "Admin_Change_User_Admin_Status":
        //            rejectIfNotAuthenticated();
        //            require_once __DIR__.'/controllers/admin/edit_user_isadmin.php';
        //            make_admin();
        //            break;
        case "Admin_Add_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_project.php';
            add_project();
            break;
        case "Admin_Scopes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/scopes.php';
            show_scopes();
            break;
        case "Admin_Remove_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_scope.php';
            remove_scope();
            break;
        case "Admin_Add_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_scope.php';
            add_scope();
            break;
        case "Admin_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/scope.php';
            view_scope();
            break;
        case "Admin_Edit_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_scope.php';
            edit_scope();
            break;
        case "Admin_Delete_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_ngi.php';
            delete_ngi();
            break;
        case "User_Validate_DN_Change":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/retrieve_account_user_validate.php';
            validate_dn_change();
            break;
        case "Add_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/add_site_property.php';
            add_site_property();
            break;
        case "Add_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service_property.php';
            add_service_property();
            break;
        case "Add_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_endpoint_property.php';
            add_endpoint_property();
            break;
        case "Delete_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/delete_site_property.php';
            delete();
            break;
        case "Delete_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service_property.php';
            delete();
            break;
        case "Delete_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_endpoint_property.php';
            delete();
            break;
        case "Edit_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_site_property.php';
            edit_property();
            break;
        case "Edit_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service_property.php';
            edit_property();
            break;
        case "Edit_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_endpoint_property.php';
            edit_property();
            break;
        case "Add_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_service_group_property.php';
            add_service_group_property();
            break;
        case "Edit_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/edit_service_group_property.php';
            edit_property();
            break;
        case "Delete_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/delete_service_group_property.php';
            delete();
            break;
        case "Delete_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service_endpoint.php';
            delete_endpoint();
            break;
        case "Edit_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service_endpoint.php';
            edit_endpoint();
            break;
        default:
            // require auth by default
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/start_page.php';
            startPage();
            break;
    }
}
Beispiel #7
0
         $login = get_user_login($link, $id);
         $pwd_hash = db_escape_string(encrypt_password($tmp_password, $login));
         db_query($link, "UPDATE ttirc_users SET pwd_hash = '{$pwd_hash}'\n\t\t\t\tWHERE id = '{$id}'");
         print json_encode(array("message" => T_sprintf("Reset password of user %s to <b>%s</b>.", $login, $tmp_password)));
     }
     break;
 case "delete-user":
     $ids = db_escape_string($_REQUEST["ids"]);
     if ($_SESSION["access_level"] >= 10) {
         db_query($link, "DELETE FROM ttirc_users WHERE\n\t\t\t\tid in ({$ids}) AND id != " . $_SESSION["uid"]);
         print format_users($link);
     }
     break;
 case "users":
     if ($_SESSION["access_level"] >= 10) {
         show_users($link);
     }
     break;
 case "part-channel":
     $last_id = (int) db_escape_string($_REQUEST["last_id"]);
     $chan = db_escape_string($_REQUEST["chan"]);
     $connection_id = db_escape_string($_REQUEST["connection"]);
     if ($chan && valid_connection($link, $connection_id)) {
         handle_command($link, $connection_id, $chan, "/part");
         db_query($link, "DELETE FROM ttirc_channels WHERE channel = '{$chan}'\n\t\t\t\tAND connection_id = '{$connection_id}'");
     }
     $lines = get_new_lines($link, $last_id);
     $conn = get_conn_info($link);
     $chandata = get_chan_data($link, false);
     $params = get_misc_params($link);
     print json_encode(array($conn, $lines, $chandata, $params));
Beispiel #8
0
$cmd = input_check("show", "uid", 0, "showdetail", "uid", 0, "relation", "!frmid", "!uid", "!wid", 0);
if ($cmd == "show") {
    if ($uid == "") {
        $uid = user_ourself();
    }
    show_users($uid);
}
if ($cmd == "showdetail") {
    if ($uid == "") {
        $uid = user_ourself();
    }
    user_showinfo($uid, USER_SHOWINFO_NORMAL);
}
if ($cmd == "relation") {
    set_relation(user_ourself(), $uid, $wid);
    show_users(user_ourself());
}
print_footer();
exit;
// ============================================================================================
//
//
// Description:
//
//
// Parameters:
//
//
// Returns:
//
//
Beispiel #9
0
    </ul>
</div>

<!-- Main page content: -->
<div id="mainForm">
    <h3>Here you can manage administrators or change your password. (Superuser "admin" cannot be deleted.)</h3>

    <!-- Manage users table -->
    <form action="manage_users.php" method="POST">
    <?php 
    // Update and show changes to admins upon POST
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        update_users($dbc);
        show_users($dbc);
    } else {
        show_users($dbc);
    }
    ?>
    </form>
    <button onclick= "location.href='new_admin.php'">Add New Admin</button>
    <br><br><br><br><br>

    <!-- Password change fields -->
    <form action="manage_users.php" method="POST">
        <?php 
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        // Validates password and changes the password if valid
        if (isset($_POST['pass']) && isset($_POST['pass-repeat']) && strcmp($_POST['pass'], $_POST['pass-repeat']) == 0) {
            change_password($dbc, $_POST['id'], $_POST['pass']);
            echo '<p> Password change successful! </p>';
        } else {
Beispiel #10
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . "/reou/includes/const.php";
require_once D_ROOT . "/reou/controllers/users_controller.php";
$users = show_users($db);
?>


<table id="table" class="user-list-table">
	<tr class="user-list--header"> 
		<th> Email </th>
		<th> Name </th>
		<th> Role </th>
		<th> Status </th>
	</tr>

	<?php 
foreach ($users as $k => $user) {
    ?>

			<tr>
				
				<td> <?php 
    echo $user["email"];
    ?>
 
					<a href="<?php 
    echo user_route('edit', "?userId={$user['id']}");
    ?>
 "> Click here? </a>
				</td>
    }
}
?>

<?php 
$layout_context = "admin";
include "../includes/layouts/header.php";
?>

<div id="main_table">
	<p>
		<a href="../index.php">Back to Main</a>
	</p>

	<?php 
echo show_users("users");
?>
	<p>
		<a href="create_user.php">Create New User</a>&nbsp;&nbsp;
		<a href="delete_user.php?de=0" onclick="return confirm('Are you sure?');">Delete All</a>&nbsp;&nbsp;
	</p>
</div>

<!--
<div id="link_experiment">
	<h4>Experiements:</h4>
	<p>
		<form action="manage_content.php" method="get">
			<select id='attack_type'onclick="chooseAttack()">
			  <option value='0' selected>Normal</option>
			  <option value='1'>Attack 1</option>