diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index ecd1cee8..75aafd58 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -1,5 +1,8 @@ CHANGELOG +2013-08-08 by Squiffy +Drag and Drop ordering on the Do Not Upload page in toolbox + 2013-08-05 by Ajax Search email blacklist diff --git a/gazelle.sql b/gazelle.sql index 121003bd..1db66f73 100644 --- a/gazelle.sql +++ b/gazelle.sql @@ -252,6 +252,7 @@ CREATE TABLE `do_not_upload` ( `Comment` varchar(255) COLLATE utf8_bin NOT NULL, `UserID` int(10) NOT NULL, `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `Sequence` mediumint(8) NOT NULL, PRIMARY KEY (`ID`), KEY `Time` (`Time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/sections/tools/managers/dnu_alter.php b/sections/tools/managers/dnu_alter.php index b3eb4d92..31eb0b87 100644 --- a/sections/tools/managers/dnu_alter.php +++ b/sections/tools/managers/dnu_alter.php @@ -5,7 +5,14 @@ authorize(); -if ($_POST['submit'] == 'Delete') { //Delete +if($_POST['submit'] == 'Reorder') { // Reorder + foreach ($_POST['item'] as $Position => $Item) { + $Position = db_string($Position); + $Item = db_string($Item); + $DB->query('UPDATE `do_not_upload` SET `Sequence` = ' . $Position . ' WHERE `id` = '. $Item); + } + +} else if ($_POST['submit'] == 'Delete') { //Delete if (!is_number($_POST['id']) || $_POST['id'] == '') { error(0); } @@ -38,9 +45,9 @@ } else { //Create $DB->query(" INSERT INTO do_not_upload - (Name, Comment, UserID, Time) + (Name, Comment, UserID, Time, Sequence) VALUES - ('$P[name]','$P[comment]','$LoggedUser[ID]','".sqltime()."')"); + ('$P[name]','$P[comment]','$LoggedUser[ID]','".sqltime()."', 9999)"); } } diff --git a/sections/tools/managers/dnu_list.php b/sections/tools/managers/dnu_list.php index 5e642a78..6464e4fa 100644 --- a/sections/tools/managers/dnu_list.php +++ b/sections/tools/managers/dnu_list.php @@ -4,68 +4,71 @@ } $Title = 'Manage the "Do Not Upload" list'; -View::show_header($Title); +View::show_header($Title, 'jquery-ui,dnu_list'); $DB->query(" - SELECT - d.ID, - d.Name, - d.Comment, - d.UserID, - d.Time - FROM do_not_upload as d - LEFT JOIN users_main AS um ON um.ID=d.UserID - ORDER BY d.Time DESC"); -?> -
Add an entry to the "Do Not Upload" list | -|||
Name | -Comment | -Added | -Submit | -
Name | +Comment | +Added | +Submit | +
+ + + + + | ++ + | +
+ =Users::format_username($UserID, false, false, false)?> + echo time_diff($DNUTime, 1) . "\n"; ?> + |
+ + + + | +