1 rizwank 1.1 <?php
2 require "./inc/head.php";
3 ?>
4 <?php include "./inc/doctype.php"; ?>
5 <head>
6 <?php include "./inc/charset.php"; ?>
7 <title>SSP Admin :: Edit Album</title>
8 <?php include "./inc/head_elem.php"; ?>
9 <script language="JavaScript" type="text/javascript" src="scripts/tool-man/core.js"></script>
10 <script language="JavaScript" type="text/javascript" src="scripts/tool-man/events.js"></script>
11 <script language="JavaScript" type="text/javascript" src="scripts/tool-man/css.js"></script>
12 <script language="JavaScript" type="text/javascript" src="scripts/tool-man/coordinates.js"></script>
13 <script language="JavaScript" type="text/javascript" src="scripts/tool-man/drag.js"></script>
14 <script language="JavaScript" type="text/javascript" src="scripts/tool-man/dragsort.js"></script>
15 <script language="JavaScript" type="text/javascript" src="scripts/tool-man/cookies.js"></script>
16
17 <script language="JavaScript" type="text/javascript"><!--
18 var dragsort = ToolMan.dragsort()
19 var junkdrawer = ToolMan.junkdrawer()
20
21 window.onload = function() {
22 rizwank 1.1
23 dragsort.makeListSortable(document.getElementById("albums"),
24 verticalOnly, saveOrder)
25
26 }
27
28 function verticalOnly(item) {
29 item.toolManDragGroup.verticalOnly()
30 }
31
32 function saveOrder(item) {
33 var group = item.toolManDragGroup
34 var list = group.element.parentNode
35 var id = list.getAttribute("id")
36 if (id == null) return
37 group.register('dragend', function() {
38 ToolMan.cookies().set("list-" + id,
39 junkdrawer.serializeList(list), 365)
40 })
41 }
42
43 rizwank 1.1 //-->
44 </script>
45
46 </head>
47
48 <body id="order">
49 <div id="container">
50
51 <?php include "./inc/h1.php"; ?>
52
53 <h2>Edit Album Display Order</h2>
54 <?php if ($m==1) echo '<p class="update-msg"><small>Album Order Changed Successfully!</small></p>'; ?>
55
56 <p>To Edit the Album Display Order, drag the albums into the the order you want them to show up in the gallery. Albums will appear from top to bottom. Click Update Album Display Order to save your changes.</p>
57
58 <?php
59 $ac = mysql_num_rows(mysql_query("SELECT id FROM $atbl WHERE active = '1'"));
60
61 if ($ac == 0) { ?>
62 <p class="update-msg">No Active Albums</p>
63 <?php } else if ($ac == 1) { ?>
64 rizwank 1.1 <p class="update-msg">Only One Active Album. Nothing to Reorder...</p>
65 <?php } else { ?>
66
67 <fieldset><input type="button" value="Update Album Display Order" onClick="saveAlbOrder()" /></fieldset>
68
69 <?php albumsListOrder(); ?>
70
71 <?php } ?>
72 </div>
73
74
75 </body>
76 </html>
|