Skip to content

Commit

Permalink
Merge pull request #8 from JosephRymer/Altering
Browse files Browse the repository at this point in the history
Altering
  • Loading branch information
StrayCargo committed Sep 11, 2015
2 parents f443242 + c95e39d commit b30cbe9
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 164 deletions.
9 changes: 1 addition & 8 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,8 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/CurrentUsers.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/PHP/Reader_Editor.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/CurrentAccounts.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/PHP/Validation.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/profile.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/css/stylesheet.css</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/AccountCreation.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/index.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/UserCreation.php</file>
<file>file:/C:/Apache2.4/htdocs/AccountManagement/public_html/CurrentUsers.php</file>
</group>
</open-files>
</project-private>
62 changes: 32 additions & 30 deletions public_html/AccountCreation.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<?php session_start();
<?php session_start();
if(!empty($_SESSION['lgnuser'])){
if($_SERVER['REQUEST_METHOD']=='POST'){
if($_SERVER['REQUEST_METHOD']=='POST'){
include('PHP/Validation.php');
include('PHP/Reader_Editor.php');
$check = new FormValidationCheck($conn);
$check->CheckAccountFormFields($_POST);
if(empty($accounterrors)){
$run = new DataHandler($conn);
$run->createAccount($_POST);
$run->createAccount($_POST);
}
}
?>
Expand All @@ -21,24 +21,25 @@
</head>
<body>
<div class="navbar navbar fixed top">
<div class="navbar-inner">
<div class="navbar-inner">
<div class="hidden-xs">
<ul id="tab-group" class="nav nav-pills" >
<li role="presentation"><a href="profile.php">Profile</a></li>
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> Accounts <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="AccountCreation.php">Create Account</a></li>
<li><a href="CurrentAccounts.php">Current Accounts</a></li>
<li><a href="CurrentAccounts.php">Current Accounts</a></li>
</ul>
</li>
</li>
<?php if($_SESSION['admin']==='1'){ ?>
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> Users <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="UserCreation.php">Create User</a></li>
<li><a href="CurrentUsers.php">Current Users</a></li>
<li><a href="CurrentUsers.php">Current Users</a></li>
</ul>
</li>
</li><?php } ?>
<li role="presentation"><a href="PHP/Reader_Editor.php?logout=1">Logout</a></li>
</ul>
</div>
Expand All @@ -56,29 +57,30 @@
<li><a href="profile.php">Profile</a></li>
<li><a href="AccountCreation.php">Create Account</a></li>
<li><a href="CurrentAccounts.php">Current Accounts</a></li>
<?php if($_SESSION['admin']==='1'){ ?>
<li role="separator" class="divider"></li>
<li><a href="UserCreation.php">Create User</a></li>
<li><a href="CurrentUsers.php">Current Users</a></li>
<li><a href="CurrentUsers.php">Current Users</a></li> <?php } ?>
<li role="separator" class="divider"></li>
<li><a href="PHP/Reader_Editor.php?logout=1">Logout</a></li>
</ul>
</div>
</div>
</div>
<ul class="breadcrumb">
<a href="http://library.tamu.edu/">University Libraries</a>
>
<a href="profile.php">Profile</a>
>
<a href="AccountCreation.php">Create Account</a>
</ul>
</ul>
</div>
</div>
</div>
</div>
<div class="page-content">
<div class="container">
<div class="row">
<div id="accountcreateform" class="col-lg-6">
<div id="accountcreateform" class="col-lg-6">
<h1 style="text-align: center;"> Create Account Request </h1>
<?php if(isset($accounterrors)){?>
<div class="alert alert-danger" role="alert">
Expand All @@ -88,14 +90,14 @@
<form data-toggle="validator" role="form" action="AccountCreation.php" method="POST">
<label class="control-label" >
First Name
<input type="text" class="form-control" id="inputName" name="F_Name" value="<?php echo $_POST['F_Name']; ?>" required>
</label>
<input type="text" class="form-control" id="inputName" name="F_Name" value="<?php echo $_POST['F_Name']; ?>" required>
</label>
<label class="control-label">
Last Name
<input type="text" class="form-control" name="L_Name" value="<?php echo $_POST['L_Name']; ?>" required>
</label>
</label>
<label class="control-label">
Email
Email
<input type="email" class="form-control" name="E_Mail" value="<?php echo $_POST['E_Mail']; ?>" required>
</label>
<label class="control-label">
Expand Down Expand Up @@ -161,7 +163,7 @@
<option value="WI">WI</option>
<option value="WY">WY</option>
</select>
</div>
</div>
<label class="control-label">
Zip Code
<input type="text" class="form-control" data-minlength="5" name="Zip_Code" value="<?php echo $_POST['Zip_Code']; ?>" required>
Expand All @@ -171,13 +173,13 @@
<input type="text" name="ID_Type" class="form-control" value="<?php echo $_POST['ID_Type']; ?>" >
</label>
<label class="control-label">
ID Number
ID Number
<input type="text" name="ID_Number" class="form-control" value="<?php echo $_POST['ID_Number']; ?>">
</label>
<label class="control-label">
Comments
<input type="text" name="Comments" class="form-control" value="<?php echo $_POST['Comments']; ?>">
</label>
<input type="text" name="Comments" class="form-control" value="<?php echo $_POST['Comments']; ?>">
</label>
<label class="control-label">
Password
<input type="password" name="Password" class="form-control" placeholder="Password" required>
Expand Down Expand Up @@ -206,21 +208,21 @@
</div>
<script src='js/jquery-2.1.4.min.js'></script>
<script src='js/bootstrap.js'></script>
</body>
<div class="container text-center">
</body>
<div class="container text-center">
<footer>
<a title="Texas A&amp;M University" href="http://www.tamu.edu">Texas A&amp;M University</a>
<a title="Employment" href="http://library.tamu.edu/about/employment/">Employment</a>
<a title="Webmaster" href="http://library.tamu.edu/services/forms/contact-info.html">Webmaster</a>
<a title="Legal" href="http://library.tamu.edu/about/general-information/legal-notices.html">Legal</a>
<a title="Comments" href="http://guides.library.tamu.edu/AskTheLibraries">Comments</a>
<a title="Texas A&amp;M University" href="http://www.tamu.edu">Texas A&amp;M University</a>
<a title="Employment" href="http://library.tamu.edu/about/employment/">Employment</a>
<a title="Webmaster" href="http://library.tamu.edu/services/forms/contact-info.html">Webmaster</a>
<a title="Legal" href="http://library.tamu.edu/about/general-information/legal-notices.html">Legal</a>
<a title="Comments" href="http://guides.library.tamu.edu/AskTheLibraries">Comments</a>
<a title="979-845-3731" href="http://library.tamu.edu/about/phone/">979-845-3731</a>
<a title="Site Map" href="http://library.tamu.edu/sitemap.html">Site Map</a>
<a title="Accessibility" href="http://library.tamu.edu/accessibility/">Accessibility</a>
</footer>
</div>
</html>
<?php }else{
header("location:/AccountManagement/public_html/index.php?badlogin=1");
}
?>
header("location:/AccountManagement/public_html/index.php?badlogin=1");
}
?>
43 changes: 23 additions & 20 deletions public_html/CurrentAccounts.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<?php session_start();
<?php session_start();
if(!empty($_SESSION['lgnuser'])){ ?>
<html>
<title> Create Accounts </title>
Expand All @@ -8,7 +8,7 @@
require 'PHP/Validation.php';
$db= new DataHandler($conn);
if(isset($_GET['accountid'])){
$db->updateAccount($_POST,$_GET['accountid']);
$db->updateAccount($_POST,$_GET['accountid']);
}else{
$db->updateAccount($_POST,$_GET['accountid']);
}
Expand All @@ -22,7 +22,7 @@
}else{
$response = $db->getAccount();
}

?>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
Expand All @@ -38,16 +38,17 @@
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> Accounts <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="AccountCreation.php">Create Account</a></li>
<li><a href="CurrentAccounts.php">Current Accounts</a></li>
<li><a href="CurrentAccounts.php">Current Accounts</a></li>
</ul>
</li>
<?php if($_SESSION['admin']==='1'){ ?>
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> Users <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="UserCreation.php">Create User</a></li>
<li><a href="CurrentUsers.php">Current Users</a></li>
<li><a href="CurrentUsers.php">Current Users</a></li>
</ul>
</li>
</li> <?php } ?>
<li role="presentation"><a href="PHP/Reader_Editor.php?logout=1">Logout</a></li>
</ul>
</div>
Expand All @@ -57,21 +58,23 @@
</div>
<div class="color-field">
<div class="row-fluid">
<div class="span12 pull left breadcrumb">
<div class="span12 pull left breadcrumb">
<div class="visible-xs">
<div class="btn-group" style="float:right;">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-align-justify"></span></button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="profile.php">Profile</a></li>
<li><a href="AccountCreation.php">Create Account</a></li>
<li><a href="CurrentAccounts.php">Current Accounts</a></li>
<?php if($_SESSION['admin']==='1'){ ?>
<li role="separator" class="divider"></li>
<li><a href="UserCreation.php">Create User</a></li>
<li><a href="CurrentUsers.php">Current Users</a></li>
<?php } ?>
<li role="separator" class="divider"></li>
<li><a href="PHP/Reader_Editor.php?logout=1">Logout</a></li>
</ul>
</div>
</div>
</div>
<form action="CurrentAccounts.php?accountsearch" method="POST" class="control form-inline" style="float:right;">
<input type="text" class="form-control" name="searchresult" placeholder="Search">
Expand All @@ -84,7 +87,7 @@
<a href="profile.php">
Profile
</a>
>
>
<a href="CurrentAccounts.php">
Current Accounts
</a>
Expand All @@ -110,7 +113,7 @@
<th>Creator</th>
</thead>
<tbody>
<?php
<?php
while($row=mysqli_fetch_array($response,MYSQLI_ASSOC)){
?><tr>
<td><?php echo $row['firstname']; ?></td>
Expand Down Expand Up @@ -164,24 +167,24 @@
</div>
</div>
</div>
</div>
</div>
<script src='js/jquery-2.1.4.min.js'></script>
<script src='js/bootstrap.js'></script>
</body>
<div class="container text-center ">
</body>
<div class="container text-center ">
<footer>
<a title="Texas A&amp;M University" href="http://www.tamu.edu">Texas A&amp;M University</a>
<a title="Employment" href="http://library.tamu.edu/about/employment/">Employment</a>
<a title="Webmaster" href="http://library.tamu.edu/services/forms/contact-info.html">Webmaster</a>
<a title="Legal" href="http://library.tamu.edu/about/general-information/legal-notices.html">Legal</a>
<a title="Comments" href="http://guides.library.tamu.edu/AskTheLibraries">Comments</a>
<a title="Texas A&amp;M University" href="http://www.tamu.edu">Texas A&amp;M University</a>
<a title="Employment" href="http://library.tamu.edu/about/employment/">Employment</a>
<a title="Webmaster" href="http://library.tamu.edu/services/forms/contact-info.html">Webmaster</a>
<a title="Legal" href="http://library.tamu.edu/about/general-information/legal-notices.html">Legal</a>
<a title="Comments" href="http://guides.library.tamu.edu/AskTheLibraries">Comments</a>
<a title="979-845-3731" href="http://library.tamu.edu/about/phone/">979-845-3731</a>
<a title="Site Map" href="http://library.tamu.edu/sitemap.html">Site Map</a>
<a title="Accessibility" href="http://library.tamu.edu/accessibility/">Accessibility</a>
</footer>
</div>
</html>
<?php }else{
header("location:/AccountManagement/public_html/index.php?badlogin=1");
}
header("location:/AccountManagement/public_html/index.php?badlogin=1");
}
?>
Loading

0 comments on commit b30cbe9

Please sign in to comment.