(file) Return to edit-dynamic-single.php CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / photo / sspadmin

  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             </head>
 46             
 47             <body id="order">
 48             	<div id="container">
 49             		
 50             		<?php include "./inc/h1.php"; ?>
 51             		
 52             		<h2>Edit Dynamic Gallery : <?php echo $aName; ?></h2>
 53             		<?php if ($m==1) echo '<p class="update-msg"><small>Album Order Changed Successfully!</small></p>'; ?>
 54             		<p>This Album's ID for Linking: <strong><?php echo $did; ?></strong></p>
 55             		<?php
 56             			$query = "SELECT id, name FROM $atbl";
 57             			$result = mysql_query($query);
 58             	
 59             			if (mysql_num_rows($result) != 0){
 60             			echo '<ul class="album-sub">';
 61             			while ($row = mysql_fetch_array($result))
 62             			{
 63             				$aName = $row['name'];
 64 rizwank 1.1 				$aid = $row['id'];
 65             				$iquery = "SELECT did FROM $dltbl WHERE did = '$did' AND aid = '$aid'";
 66             				$iresult = mysql_query($iquery);
 67             				if (mysql_num_rows($iresult) == 0){
 68             					echo "<li>$aName - Not Part of this Dynamic Gallery : <a href=\"edit-album-dynamic-exe.php?aid=$aid&did=$did&action=1\">Add</a>";
 69             				} else {
 70             					echo "<li>$aName - Part of this Dynamic Gallery : <a href=\"edit-album-dynamic-exe.php?aid=$aid&did=$did&action=2\">Remove</a>";
 71             				}
 72             			}
 73             			echo '</ul>';
 74             			} else {
 75             				echo '<p><em>You Have Not Added Any Albums to SSPAdmin Yet. Click Add an Album in the Navigation Bar to Get Started.</em></p>';
 76             			}
 77             		?>
 78             		
 79             		<h2>Edit Display Order</h2>
 80             		<p>To Edit the Album Display Order, Order the Albums Below into the sequence you would like them to appear. Albums will appear from top to bottom. Click Update Album Display Order to save your changes.</p>
 81             		
 82             		<?php 
 83             		$ac = mysql_num_rows(mysql_query("SELECT * FROM $dltbl WHERE did = '$did' ORDER BY display"));
 84             		
 85 rizwank 1.1 		if ($ac == 0) { ?>
 86             		<p class="update-msg">No Albums Have Been Added to this Dynamic Gallery</p>
 87             		<?php } else if ($ac == 1) { ?>
 88             		<p class="update-msg">Only One Album. Nothing to Reorder...</p>
 89             		<?php } else { ?>
 90             		
 91             		<fieldset><input type="button" value="Update Album Display Order" onClick="saveDynAlbOrder(<?php echo $did; ?>)" /></fieldset>
 92             		
 93             			<?php dynAlbumsListOrder($did); ?>
 94             
 95             		<?php } ?>
 96             	</div>
 97             	
 98             	
 99             </body>
100             </html>

Rizwan Kassim
Powered by
ViewCVS 0.9.2