Skip to content

Commit

Permalink
Added alert when status changes
Browse files Browse the repository at this point in the history
Updated CSS to align left and center columns
  • Loading branch information
root committed Feb 18, 2019
1 parent 72fb713 commit 4e75c20
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 57 deletions.
11 changes: 10 additions & 1 deletion admin/editOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,16 @@ function confirmUpdate()
<tr><td class='right'>Order Number:</td><td class='left'><?php echo $order->get_order_id(); ?></td></tr>
<tr><td class='right'>Email: </td><td class='left'><?php echo $order->get_email(); ?></td></tr>
<tr><td class='right'>Full Name: </td><td class='left'><?php echo $order->get_name(); ?></td></tr>
<tr><td class='right'>File:</td><td class='left'><a href='download.php?orderId=<?php echo $order->get_order_id(); ?>'><?php echo $order->get_filename(); ?></a></td></tr>
<tr><td class='right'>File:</td><td class='left'>
<?php if (!$order->file_exists(poster_dir)) {
echo "<span class='error'>WARNING: Poster File " . $order->get_filename() . " does not exist</span>";
}
else {
echo "<a href='download.php?orderId=" . $order->get_order_id() . "'>" . $order->get_filename() . "</a>";
}

?>
</td></tr>
<tr><td class='right'>CFOP:</td>
<td class='left'>
<input type='text' name='cfop1' id='cfop1' maxlength='1' class='cfop_1' onKeyUp='cfopAdvance1()' value='<?php echo $order->get_cfop_college(); ?>'> -
Expand Down
8 changes: 4 additions & 4 deletions admin/includes/footer.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
</div>

<div id="footer">
&nbsp

</div>
<div id='footer'>
<br><a href='https://www.vpaa.uillinois.edu/resources/web_privacy'>University of Illinois System Web Privacy Notice</a>
<br>&copy; 2007-<?php echo date('Y'); ?> University of Illinois Board of Trustees

</div>
</body>
</html>
Expand Down
15 changes: 6 additions & 9 deletions admin/includes/header.inc.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css"
href="../includes/stylesheet.css"></link>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="../includes/stylesheet.css"></link>

<TITLE>Poster Printer Orders</TITLE>
<TITLE>Poster Printer Orders</TITLE>

</HEAD>

<BODY>
<div id='container'>
<div id="header">
<br><center>Poster Printer Administration Center</center>

</div>
<div id='container'>
<div id='content_left'>
<ul>
<li><a href='index.php'>Current Orders</a></li>
Expand All @@ -33,4 +30,4 @@

</ul>
</div>
<div id="content_center">
<div id="content_center">
8 changes: 3 additions & 5 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//Include files for the script to run

require_once 'includes/main.inc.php';
require_once 'includes/header.inc.php';
require_once 'orders.inc.php';


Expand Down Expand Up @@ -46,11 +45,11 @@
}
}


require_once 'includes/header.inc.php';
?>


<table class='wide'>
<br>
<table class='medium'>
<tr>
<td class='header_center'>Order Number</td>
<td class='header_center'>Email</td>
Expand All @@ -64,5 +63,4 @@


</table>

<?php require_once 'includes/footer.inc.php'; ?>
4 changes: 1 addition & 3 deletions admin/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="../includes/stylesheet.css">
<TITLE>IGB Poster Printer Admin Login</TITLE>
</HEAD>
Expand Down
21 changes: 19 additions & 2 deletions admin/orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require_once 'orders.inc.php';
require_once 'order.class.inc.php';

$message = "";

if ((isset($_GET['orderId'])) && is_numeric($_GET['orderId'])) {
$orderId = $_GET['orderId'];
Expand All @@ -27,7 +28,13 @@
header("Location: index.php");
}
//else if status is set to "Cancel"
elseif ($statusId == 4) { header("Location: index.php"); }
elseif ($statusId == 4) {
header("Location: index.php");

}
else {
$message = "<br><b class='error'>Status sucessfully updated to " . $order->get_status() . "</b>";
}

}
//get last day of previous month
Expand Down Expand Up @@ -74,7 +81,16 @@
<tr><td class='right'>Order Number:</td><td class='left'><?php echo $orderId; ?></td></tr>
<tr><td class='right'>Email: </td><td class='left'><?php echo $order->get_email() ?></td></tr>
<tr><td class='right'>Full Name: </td><td class='left'><?php echo $order->get_name() ?></td></tr>
<tr><td class='right'>File:</td><td class='left'><a href='download.php?orderId=<?php echo $order->get_order_id(); ?>'><?php echo $order->get_filename(); ?></a> <?php if (!$order->file_exists(poster_dir)) { echo "<span class='error'>WARNING: Poster File doesn't exist</span>"; } ?></td></tr>
<tr><td class='right'>File:</td><td class='left'>
<?php if (!$order->file_exists(poster_dir)) {
echo "<span class='error'>WARNING: Poster File " . $order->get_filename() . " does not exist</span>";
}
else {
echo "<a href='download.php?orderId=" . $order->get_order_id() . "'>" . $order->get_filename() . "</a>";
}

?>
</td></tr>
<tr><td class='right'>CFOP:</td><td class='left'><?php echo $order->get_cfop(); ?></td></tr>
<tr><td class='right'>Activity Code:</td><td class='left'><?php echo $order->get_activity_code(); ?></td></tr>
<tr><td class='right'>Time Created:</td><td class='left'><?php echo $order->get_time_created(); ?></td></tr>
Expand All @@ -91,5 +107,6 @@
<br>
<?php echo $edit_order_html; ?>

<?php if (isset($message)) { echo $message; } ?>

<?php require_once 'includes/footer.inc.php'; ?>
74 changes: 49 additions & 25 deletions includes/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,33 @@ color:#333333;

#container {
margin: 0px auto;
min-width: 850px;
max-width: 1200px;
}

.order_container {
margin: 0px auto;
width: 850px;
}
.order_footer {
width:850px;
border-width:0px 0px 0px 0px;
background-color:#002F49;
height:50px;
background-color:#B5B5B5;
text-align: center;
margin-left: auto;
margin-right: auto;

}
/************** Header **************/
#header{
width:850px;
min-width:850px;
height: 50px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:20px;
margin-left: auto;
margin-right: auto;

}
/******** Footer *************/
Expand All @@ -26,8 +44,9 @@ border-width:0px 0px 0px 0px;
background-color:#002F49;
height:50px;
background-color:#B5B5B5;


text-align: center;
margin-left: auto;
margin-right: auto;
}

/*********Global Settings **********/
Expand All @@ -41,11 +60,11 @@ background-color:#dbeaf5;
border:1px solid gray;
}
input.cfop_1 {
width:15px;
width:20px;

}
input.cfop_2 {
width:48px;
width:60px;

}

Expand Down Expand Up @@ -105,15 +124,12 @@ width: 475px;
margin-left: auto;
margin-right: auto;

}
table.wide {
width:625px;

}
table.medium {
width:100%;
margin-left: auto;
margin-right: auto;
min-width:800px;
max-width:1000px;
margin-left: 0;
margin-right: 0;

}
table.center {
Expand All @@ -124,7 +140,6 @@ margin-right: auto;
background: none;
}


table td {
padding-left: 10px;
padding-right: 10px;
Expand Down Expand Up @@ -168,6 +183,8 @@ border-bottom:1px solid #49648E;
background-color:#f4f4f4;
text-align: left;
font-weight: bold;
font-family: Arial, Helvetica, sans-serifi;
font-size: 12px;
}

table td.header_center {
Expand All @@ -178,9 +195,10 @@ font-weight: bold;
}
table td.description {
color:#004466;
font-size:smaller;
font-size:12px;
text-align: left;
padding-left:10px;
font-weight: bold;
}

table tr.rush {
Expand Down Expand Up @@ -208,25 +226,25 @@ font-weight:500;


/***************Order Submit Page***************/
#order {
.order {
float: left;
width: 625px;
width: 850px;
background-color:#F2F4F3;
padding:20px 10px 10px 15px;
line-height: 16px;
border-color:gray;
border-style:solid;
border-width:1px 1px 0px 1px;
font-family:Arial, Helvetica, sans-serif;
min-height:770px;
font-family:Verduna, Arial,Helvetica, sans-serif;
min-height:800px;

}


/******************Login Page******************/
#login_page {
float: left;
width: 625px;
min-width: 850px;
background-color:#F2F4F3;
padding:20px 10px 10px 15px;
line-height: 16px;
Expand Down Expand Up @@ -254,11 +272,12 @@ width: 148px;
background-color:#e1e1e1;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-weight:600;
min-height:798px;
height:100%;
border-color:gray;
border-style:solid;
border-width:1px 1px 1px 1px;
height:100%;
min-height: 750px;
padding-top:10px;
}

#content_left ul {
Expand All @@ -269,15 +288,20 @@ padding-left:20px;

#content_center {
float: left;
width: 678px;
min-width: 750px;
background-color:#F2F4F3;
line-height: 16px;
border-color:gray;
border-style:solid;
border-width:1px 1px 1px 1px;
font-family:Arial, Helvetica, sans-serif;
min-height:778px;
padding:10px;
font-family:Verdana, Arial, Helvetica, sans-serif;
min-height:880px;
//padding:10px 10px 10px 10px;
padding-top:10px;
padding-right:10px;
padding-left:10px;
height:100%;
}



14 changes: 9 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,9 @@
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css"
media='screen'>

Expand All @@ -458,14 +456,20 @@
</head>

<body OnLoad="document.posterInfo.posterWidth.focus();">
<div id='container'>
<div id="order">
<div class='order_container'>
<div class="order">
<h2>Poster Printer Order Submit Form</h2>

<?php echo $form_html; ?>

</div>
</div>
<div class='order_footer'>
<br>Computer & Network Resource Group - Carl R. Woese Institute for Genomic Biology
<br>If you have any questions, please email us at <a href='mailto:'<?php echo admin_email; ?>'><?php echo admin_email; ?></a>
<br><a href='https://www.vpaa.uillinois.edu/resources/web_privacy'>University of Illinois System Web Privacy Notice</a>
<br>&copy; 2007-<?php echo date('Y'); ?> University of Illinois Board of Trustees
</div>
</body>

</html>
2 changes: 0 additions & 2 deletions libs/authentication.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
/////////////////////////////////////////////////

function authenticate($username,$password,$ldaphost,$base_dn,$people_ou,$group_ou,$group,$ssl,$port) {
echo "Base DN: " . $base_dn;
$connect;
if ($ssl == 1) { $connect = ldap_connect("ldaps://" . $ldaphost,$port); }
elseif ($ssl == 0) { $connect = ldap_connect("ldap://" . $ldaphost,$port); }
$bindDN = "uid=" . $username . "," . $people_ou . "," . $base_dn;
echo "<br>Bind DN: " . $bindDN;
$bind_success = @ldap_bind($connect, $bindDN, $password);
$success = 0;
if ($bind_success) {
Expand Down
2 changes: 1 addition & 1 deletion libs/order.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function set_status($status_id) {
$this->db->non_select_query($sql);
$this->time_finished = $time_finished;
$this->status_id = $status_id;
$this->status_name = getStatusName($this->db,$status_id);
$this->status = getStatusName($this->db,$status_id);

}

Expand Down

0 comments on commit 4e75c20

Please sign in to comment.