From 0077cb99704fe863cf731fc5cab792af2ede96c2 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 17 Apr 2011 20:13:07 -0400 Subject: Backporting retarded amount of changes outside of version control --- admin/newsreel/updateDB.php | 87 +++++++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 39 deletions(-) (limited to 'admin/newsreel/updateDB.php') diff --git a/admin/newsreel/updateDB.php b/admin/newsreel/updateDB.php index f4031a2..cd1a311 100644 --- a/admin/newsreel/updateDB.php +++ b/admin/newsreel/updateDB.php @@ -1,40 +1,49 @@ -Connect( - $config['sql']['hostname'], - $config['sql']['username'], - $config['sql']['password'] - ); -$db->Select_db($config['sql']['database']); - -if ($action == "updateReelOrder"){ - - $listingCounter = 1; - foreach ($updateRecordsArray as $recordIDValue) { - - $db->Query("UPDATE `bayonet_newsreel` SET `weight` = '$listingCounter' WHERE `slide_id` = '$recordIDValue'"); - $listingCounter = $listingCounter + 1; - } - echo ""; -/* - echo '
';
-	print_r($updateRecordsArray);
-	echo '
'; - echo 'If you refresh the page, you will see that records will stay just as you modified.'; -*/ -} -else{ - echo ""; -} -date_default_timezone_set("America/New_York"); -echo " Updated at ".date("g:i:s a", time()); +Connect($config['sql']['hostname'], $config['sql']['username'], $config['sql']['password']); +$db->Select_db($config['sql']['database']); + +/*----------------------------- */ + +$action = $_POST['action']; +$updateRecordsArray = $_POST['recordsArray']; + +if ($action == "updateReelOrder"){ + + $listingCounter = 1; + foreach ($updateRecordsArray as $recordIDValue) { + + $db->Query("UPDATE `bayonet_newsreel` SET `weight` = '$listingCounter' WHERE `slide_id` = '$recordIDValue'"); + $listingCounter = $listingCounter + 1; + } + echo ""; +/* + echo '
';
+	print_r($updateRecordsArray);
+	echo '
'; + echo 'If you refresh the page, you will see that records will stay just as you modified.'; +*/ +} +else{ + echo ""; +} +date_default_timezone_set("America/New_York"); +echo " Updated at ".date("g:i:s a", time()); ?> \ No newline at end of file -- cgit