The application data was successfully added into the database
\n";
+
+ //delete the item from the queue
+ mysql_query("DELETE from appDataQueue where queueId = ".$_REQUEST['queueId'].";");
+
+ $goodtogo = 1; /* set to 1 so we send the response email */
+ } else
+ {
+ //error
+ $statusMessage = "
Database Error! ".mysql_error()."
\n";
+ }
+
+ //Send Status Email
+ if (lookupEmail($obj_row->queueuserId) && $goodtogo)
+ {
+ $ms = "Application Data Request Report\n";
+ $ms .= "----------------------------------\n\n";
+ $ms .= "Your submission of an application data for ".appIdToName($obj_row->queueappId).versionIdToName($obj_row->queueversionId)." has been accepted. ";
+ $ms .= $_REQUEST['replyText'];
+ $ms .= "We appreciate your help in making the Application Database better for all users.\n\n";
+ $ms .= "Thanks!\n";
+ $ms .= "-The AppDB admins\n";
+
+ mail(stripslashes(lookupEmail($obj_row->queueuserId)),'[AppDB] Application Data Request Report',$ms);
+ }
+
+ //done
+ echo html_frame_start("Submit App Data","600");
+ echo "
$statusMessage
\n";
+ } elseif ($_REQUEST['reject'])
+ {
+ if (lookupEmail($obj_row->userId))
+ {
+ $ms = "Application Data Request Report\n";
+ $ms .= "----------------------------------\n\n";
+ $ms .= "Your submission of an application data for ".appIdToName($obj_row->appId).versionIdToName($obj_row->versionId)." was rejected. ";
+ $ms .= $_REQUEST['replyText'];
+ $ms .= "";
+ $ms .= "-The AppDB admins\n";
+
+ mail(stripslashes(lookupEmail($obj_row->queueuserId)),'[AppDB] Application Data Request Report',$ms);
+ }
+
+ //delete main item
+ $query = "DELETE from appDataQueue where queueId = ".$_REQUEST['queueId'].";";
+ $result = mysql_query($query);
+ echo html_frame_start("Delete application data submission",400,"",0);
+ if(!$result)
+ {
+ //error
+ echo "
Internal Error: unable to delete selected maintainer application!
\n";
+ }
+ else
+ {
+ //success
+ echo "
Application data was successfully deleted from the Queue.
\n";
+ }
+ }
+
+}
+echo html_frame_end(" ");
+echo html_back_link(1,'adminAppDataQueue.php');
+apidb_footer();
+?>
+
+
diff --git a/admin/screenshotQueue.php b/admin/screenshotQueue.php
new file mode 100644
index 0000000..f97f3df
--- /dev/null
+++ b/admin/screenshotQueue.php
@@ -0,0 +1,16 @@
+
diff --git a/include/sidebar_admin.php b/include/sidebar_admin.php
index f318ff2..6fee026 100644
--- a/include/sidebar_admin.php
+++ b/include/sidebar_admin.php
@@ -16,6 +16,7 @@ function global_admin_menu() {
$g->addmisc(" ");
$g->add("List Users", $apidb_root."admin/");
$g->add("View App Queue (".getQueuedAppCount().")", $apidb_root."admin/adminAppQueue.php");
+ $g->add("View App Data Queue (".getQueuedAppDataCount().")", $apidb_root."admin/adminAppDataQueue.php");
$g->add("View Maintainer Queue (".getQueuedMaintainerCount().")", $apidb_root."admin/adminMaintainerQueue.php");
$g->add("View Maintainers (".getMaintainerCount().")", $apidb_root."admin/adminMaintainers.php");
diff --git a/include/util.php b/include/util.php
index 566eef3..ca79444 100644
--- a/include/util.php
+++ b/include/util.php
@@ -242,6 +242,15 @@ function getQueuedAppCount()
return $ob->queued_apps;
}
+/* get the number of applications in the appQueue table */
+function getQueuedAppDataCount()
+{
+ $qstring = "SELECT count(*) as queued_appdata FROM appDataQueue";
+ $result = mysql_query($qstring);
+ $ob = mysql_fetch_object($result);
+ return $ob->queued_appdata;
+}
+
/* get the number of applications in the appQueue table */
function getQueuedMaintainerCount()
{
diff --git a/index.php b/index.php
index a19561e..83010f0 100644
--- a/index.php
+++ b/index.php
@@ -33,7 +33,10 @@ are logged in. Some of the benefits of membership are:
stomping out Wine issues will be greatly appreciated.
-If you have anything to contribute (screenshots, howtos), contact us at:
+If you have screenshots or links to contribute, please browse the database and use the AppDB interface to send us your contributions.
+
+
+If you have anything else to contribute (howtos, etc.), contact us at:
appdb@winehq.org
Note that this address is not for end-user support, for end user support please contact the
wine-users mailing list or the wine newsgroup, for more information visit
diff --git a/screenshots.php b/screenshots.php
index c43dfb3..5362837 100644
--- a/screenshots.php
+++ b/screenshots.php
@@ -14,189 +14,226 @@ require(BASE."include/"."application.php");
if($_REQUEST['cmd'])
{
- if(havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId']))
- {
//process screenshot upload
if($_REQUEST['cmd'] == "screenshot_upload")
- {
- if(!copy($_FILES['imagefile']['tmp_name'], "data/screenshots/".$_REQUEST['appId']."-".$_REQUEST['versionId']."-".basename($_FILES['imagefile']['name'])))
- {
- // whoops, copy failed. do something
- errorpage("debug: copy failed; (".$_FILES['imagefile']['tmp_name'].";".$_FILES['imagefile']['name']);
- exit;
- }
-
- $query = "INSERT INTO appData VALUES (null, ".$_REQUEST['appId'].", ".$_REQUEST['versionId'].", 'image', ".
- "'".addslashes($_REQUEST['screenshot_desc'])."', '".$_REQUEST['appId']."-".$_REQUEST['versionId']."-".basename($_FILES['imagefile']['name'])."')";
-
- if(debugging()) addmsg("
\n";
+ echo html_frame_end("Click thumbnail to view image in new window.");
+} else {
+ echo "
There are currently no screenshot for the selected version of this application.";
+ echo " Please consider submitting a screenshot for the selected version yourself.
";
}
+if($_REQUEST['versionId'])
+{
+ //image upload box
+ echo '',"\n";
+}
+echo html_back_link(1);
+apidb_footer();
+
?>
diff --git a/tables/appdb_tables.sql b/tables/appdb_tables.sql
index 0bf88ad..7dca26d 100644
--- a/tables/appdb_tables.sql
+++ b/tables/appdb_tables.sql
@@ -13,6 +13,7 @@ drop table if exists catHitStats;
drop table if exists appOwners;
drop table if exists appComments;
drop table if exists appData;
+drop table if exists appDataQueue;
drop table if exists appQueue;
drop table if exists appCrosslink;
drop table if exists appBundle;
@@ -201,6 +202,26 @@ create table appData (
);
+/*
+ * links to screenshots and other stuff waiting to be accepted
+ */
+create table appDataQueue (
+ queueid int not null auto_increment,
+ queueappId int not null,
+ queueversionId int default 0,
+ queuetype enum('image', 'url'),
+ queuedescription text,
+ queueurl varchar(255),
+ queuecontent longblob,
+ queueuserId int not null,
+ submitTime timestamp,
+ key(queueid),
+ index(queueappId),
+ index(queueversionId)
+);
+
+
+
/*
* allow users to vote for apps, as in, request that an app gets better support
*/