File manager - Edit - /home/justdoit/expresslogiscsvault.com/admin/adduser.php
Back
<?php session_start(); require_once 'db.php'; if($_SESSION['user_id']==null) { header("Location:index.php"); } ?> <!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Admin </title> <meta name="description" content="Tab Styles Inspiration: A small collection of styles for tabs" /> <meta name="keywords" content="tabs, inspiration, web design, css, modern, effects, svg" /> <meta name="author" content="Codrops" /> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" type="text/css" href="css/normalize.css" /> <link rel="stylesheet" type="text/css" href="css/demo.css" /> <link rel="stylesheet" type="text/css" href="css/tabs.css" /> <link rel="stylesheet" type="text/css" href="css/tabstyles.css" /> <link rel="icon" href="https://globewidesecurityandshippings.com/my_uploads/2019/09/zerik-security-logo-1.png" sizes="32x32" /> <link rel="icon" href="https://globewidesecurityandshippings.com/my_uploads/2019/09/zerik-security-logo-1.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://globewidesecurityandshippings.com/my_uploads/2019/09/zerik-security-logo-1.png" /> <script src="js/modernizr.custom.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!-- Google fonts - witch you want to use - (rest you can just remove) --> <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <script src="//code.jquery.com/jquery.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <!-- <link rel="stylesheet" type="text/css" href="alertify/css/main.css"> --> <!-- <link rel="stylesheet" type="text/css" href="alertify/css/alertify.bootstrap.css"> --> <link rel="stylesheet" type="text/css" href="alertify/css/alertify.core.css"> <link rel="stylesheet" type="text/css" href="alertify/css/alertify.default.css"> <!-- <link rel="stylesheet" type="text/css" href="alertify/css/alertify.css"> --> <link rel="stylesheet" type="text/css" href="css/custom.css"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> </head> <body> <br><br> <div class="container" > <div class="row"> <div class="col-md-8 col-md-offset-2"> <div class="alert alert-success" role="alert"> <h5> <a href="assets.php">Create Asset</a> | <a href="addPackage.php">Send Package</a>| <a href="adduser.php">Add User</a>| <a href="deleteuser.php">Delete User</a> | <a href="deletepackage.php">Delete Package</a>| <a href="deleteasset.php">Delete Asset</a>| <a href="allasset.php">All Asset</a>| <a href="signout.php">Signout</a> </h5> </div> </div> </div> <div class="row"> <div id="list" class="col-md-8 col-md-offset-2"> <form method="POST" action="userscript.php"> <div class="form-group row"> <label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">First Name</label> <div class="col-sm-10"> <input type="text" class="form-control form-control-sm" name="fname" id="colFormLabelSm" placeholder="Name here" required> </div> </div> <div class="form-group row"> <label for="colFormLabel" class="col-sm-2 col-form-label">Last Name</label> <div class="col-sm-10"> <input type="text" class="form-control" id="colFormLabel" name="lname" placeholder="Name Here" required> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">Email</label> <div class="col-sm-10"> <input type="email" class="form-control form-control-lg" name="email" id="colFormLabelLg" placeholder="Email here" required> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">User name</label> <div class="col-sm-10"> <input type="text" class="form-control form-control-lg" name="uname" id="colFormLabelLg" placeholder="Username here" required> </div> </div> <div class="form-group row"> <label for="colFormLabelLg" class="col-sm-2 col-form-label col-form-label-lg">User password</label> <div class="col-sm-10"> <input type="password" class="form-control form-control-lg" name="password" id="colFormLabelLg" placeholder="Password Here" required> </div> </div> <div class="form-group row"> <div class="col-sm-10"> <input type="submit" value="Add user" class="btn btn-primary"> <input type="reset" class="btn btn-danger"> </div> </div> </form> </div><!-- /input-group --> </div> </div> </div> <script src="alertify/js/alertify.min.js"></script> <script> function validateForm(){ var val=document.getElementById("txtNewItem").value; if (val.length<5) { alertify.error("Item description must contains at least 20 characters"); return false; }else{ InsertItemInDatabase(); } } function validateEdit(desc){ var desc=document.getElementById("txtNewItem").value; if (desc.length<5) { alertify.error("Item description must contains at least 20 characters"); return false; }else{ return true; } } </script> <script> function InsertItemInDatabase() { //for spinner var buttonString= "<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate' id='spinner'></span> "+$('#addButton').html(); $('#addButton').html(buttonString); var new_desc=document.getElementById("txtNewItem").value; document.getElementById("txtNewItem").value=""; $.ajax({ url:'process.php?insert_description=' + new_desc, complete: function (response) { var status = JSON.parse(response.responseText); // console.log(response); if(status.status =="success"){ alertify.success("New item has been added successfully"); }else if(status.status =="error"){ alertify.error("Error while adding the item"); } $( "#list" ).load( "list.php");// to reload the todo list from database $( "#spinner" ).remove();//remove spinner as task is completed }, error: function () { }, }); } //delete function DeleteItem(id) { alertify.confirm("Are you sure to delete this item?", function (e) { if (e) { //for spinner var buttonString= "<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate' id='spinner'></span> "+$('#delete_'+id).html(); $('#delete_'+id).html(buttonString); $.ajax({ url:'process.php?delete_id=' + id, complete: function (response) { var status = JSON.parse(response.responseText);//parsing status from response received from php if(status.delete_status =="success"){ alertify.success("Item Deleted"); $( "#list" ).load( "list.php" );// to reload the todo list from database }else if(status.delete_status =="error"){ alertify.error("Error while deleting the item"); } }, error: function () { $('#output').html('Bummer: there was an error!'); }, }); } }); } //edit function EditItem(id) { $.ajax({ url:'process.php?edit_id=' + id, complete: function (response) { var status = JSON.parse(response.responseText);//parsing status from response received from php if(status.edit_status =="success"){ alertify.success("Item Deleted"); $( "#list" ).load( "list.php" );// to reload the todo list from database }else if(status.edit_status =="error"){ alertify.error("Error while deleting the item"); } }, error: function () { $('#output').html('Bummer: there was an error!'); }, }); } function checks(id,desc){ //var id= $(this).attr('id'); alertify.prompt("Edit List Item, ID="+id, function (e, str) { if (e) { if (str.length>20) { /*change on database if edited text is valid*/ //for spinner var buttonString= "<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate' id='spinner'></span> "+$('#edit_'+id).html(); $('#edit_'+id).html(buttonString); $.ajax({ url:'process.php', data : {edit_id:id, new_desc:str}, complete: function (response) { var status = JSON.parse(response.responseText);//parsing status from response received from php if(status.edit_status =="success"){ alertify.success("Information updated successfully"); $( "#list" ).load( "list.php" );// to reload the todo list from database $( "#spinner" ).remove(); //remove spinner as task is completed }else if(status.edit_status =="error"){ alertify.error("Error while editing the item"); } }, error: function () { $('#output').html('Bummer: there was an error!'); }, }); //alertify.success("Valid"); /*--if valid ends*/ }else{ alertify.error("Item description must contains at least 20 characters. No changes has been made"); } } else { //alertify.error("You pressed cancel"); } }, desc); } </script> <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> </body> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings