forked from tylerhall/Shine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathorder.php
120 lines (107 loc) · 3.7 KB
/
order.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?PHP
require 'includes/master.inc.php';
$Auth->requireAdmin('login.php');
$o = new Order(@$_GET['id']);
if(!$o->ok()) redirect('orders.php');
if(isset($_GET['act']) && $_GET['act'] == 'email')
$o->emailLicense();
if(isset($_GET['act']) && $_GET['act'] == 'download')
$o->downloadLicense();
if(isset($_GET['act']) && $_GET['act'] == 'delete')
{
$o->delete();
redirect('orders.php');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Shine</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css">
<link rel="stylesheet" href="css/yuiapp.css" type="text/css">
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
</head>
<body class="rounded">
<div id="doc3" class="yui-t6">
<div id="hd">
<h1>Shine</h1>
<div id="navigation">
<ul id="primary-navigation">
<li><a href="index.php">Applications</a></li>
<li class="active"><a href="orders.php">Orders</a></li>
<li><a href="feedback.php">Feedback</a></li>
<li><a href="stats.php">Sparkle Stats</a></li>
</ul>
<ul id="user-navigation">
<li><a href="users.php">Users</a></li>
<li><a href="settings.php">Settings</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div class="block">
<div class="hd">
<h2>Order #<?PHP echo $o->id; ?></h2>
</div>
<div class="bd">
<table>
<?PHP foreach($o->columns as $k => $v) : ?>
<tr>
<th><?PHP echo $k; ?></th>
<td><?PHP echo $v; ?></td>
</tr>
<?PHP endforeach; ?>
</table>
</div>
</div>
</div></div>
</div>
<div id="sidebar" class="yui-b">
<div class="block">
<div class="hd">
<h3>Retrieve License</h3>
</div>
<div class="bd">
<ul class="biglist">
<li><a href="order.php?id=<?PHP echo $o->id; ?>&act=download">Download</a></li>
<li><a href="order.php?id=<?PHP echo $o->id; ?>&act=email" id="email">Email to User</a></li>
</ul>
</div>
</div>
<div class="block">
<div class="hd">
<h3>Order Options</h3>
</div>
<div class="bd">
<ul class="biglist">
<li><a href="order.php?id=<?PHP echo $o->id; ?>&act=delete" id="delete">Delete Order</a></li>
</ul>
</div>
</div>
<div class="block">
<div class="hd">
<h3>Cut & Paste License</h3>
</div>
<div class="bd">
<textarea style="width:100%;"><?PHP echo "Email: {$o->payer_email}\nReg Key: {$o->license}"; ?></textarea>
</div>
</div>
</div>
</div>
<div id="ft"></div>
</div>
<script type="text/javascript" charset="utf-8">
google.load("jquery", "1");
google.setOnLoadCallback(function(){
$('#email').click(function(){return confirm('Are you sure you want to email the user their license?');});
$('#delete').click(function(){return confirm('Are you sure you want to delete this order?');});
});
</script>
</body>
</html>