From a8ba02e76d568536992ec7a2232b79a1aa76d7ac Mon Sep 17 00:00:00 2001 From: Jonathan Ernst Date: Sat, 18 Dec 2004 06:06:46 +0000 Subject: [PATCH] Implemented the user friendly screenshot submitting feature --- admin/adminAppDataQueue.php | 242 +++++++++++++++++++++++++ admin/screenshotQueue.php | 16 ++ include/sidebar_admin.php | 1 + include/util.php | 9 + index.php | 5 +- screenshots.php | 347 ++++++++++++++++++++---------------- tables/appdb_tables.sql | 21 +++ 7 files changed, 485 insertions(+), 156 deletions(-) create mode 100644 admin/adminAppDataQueue.php create mode 100644 admin/screenshotQueue.php diff --git a/admin/adminAppDataQueue.php b/admin/adminAppDataQueue.php new file mode 100644 index 0000000..9f29b57 --- /dev/null +++ b/admin/adminAppDataQueue.php @@ -0,0 +1,242 @@ +The App Data Queue is empty.

',"\n"; + echo '

There is nothing for you to do. Check back later.

',"\n"; + echo html_frame_end(" "); + } + else + { + //help + echo "
\n\n"; + echo "

This is a list of app data submitted by users.\n"; + echo "Please inspect carefully these data before to accept it.\n"; + echo "

\n\n"; + + //show applist + echo html_frame_start("","90%","",0); + echo "\n\n"; + + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "\n\n"; + + $c = 1; + while($ob = mysql_fetch_object($result)) + { + if(isMaintainer($ob->queueappId,$ob->queueversionId) || havepriv("admin")) { + if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } + echo "\n"; + echo " \n"; + echo " \n"; + if($ob->queueuserId) + echo " \n"; + else + echo " \n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n\n"; + $c++; + } + } + echo "
Submission DateQueue IdUsername (e-mail)Application NameVersionType
".date("Y-n-t h:i:sa", $ob->submitTime)."  $ob->queueId".lookupUsername($ob->queueuserId)." (".lookupEmail($ob->queueuserId).")Anonymous".appIdToName($ob->queueappId)."".versionIdToName($ob->queueversionId)."".$ob->queuetype."
\n\n"; + echo html_frame_end(" "); + } + +} else // shows a particular appdata +{ + if(!(havepriv("admin") || isMaintainer($obj_row->queueAppId,$obj_row->queueVersionId))) { + errorpage("You don't have sufficient priviledges to use this page."); + exit; + } + + $str_request="SELECT * FROM appDataQueue WHERE queueId='".$_REQUEST['queueId']."'"; + $res_result=mysql_query($str_request); + $obj_row=mysql_fetch_object($res_result); + + if(!$_REQUEST['sub']=="inside_form") + { + + echo '
',"\n"; + // help + echo "
\n\n"; + echo "Please enter an accurate and personalized reply anytime a submitted scrrenshot is rejected.\n"; + echo "It is not polite to reject someones attempt at trying to help out without explaining why.\n"; + echo "
\n\n"; + + // view application details + echo html_frame_start("New Application Data Form",600,"",0); + echo "\n"; + + // app name + echo '',"\n"; + echo "\n"; + + // version + echo '',"\n"; + echo "\n"; + + //dataDescription + echo '',"\n"; + echo '',"\n"; + + //data + if($obj_row->queuetype == "image") + { + $tmpfname = rand()."screenshotQueue".$obj_row->queueId; + $handle = fopen("../data/screenshots/".$tmpfname, "wb"); + fwrite($handle, $obj_row->queuecontent); + fclose($handle); + echo '',"\n"; + echo '',"\n"; + } elseif($obj_row->queuetype == "url") + { + echo '',"\n"; + echo '',"\n"; + } + + //email response + echo '',"\n"; + echo "\n"; + + /* Add button */ + echo '',"\n"; + + /* Reject button */ + echo '',"\n"; + + echo '
App Name".appIdToName($obj_row->queueappId)."
App Version".versionIdToName($obj_row->queueversionId)."
Description
Submited image
Submitted link
Email reply
' ,"\n"; + echo '
' ,"\n"; + echo '
',"\n"; + echo '',"\n"; + echo '',"\n"; + echo '
'; + } elseif ($_REQUEST['add']) // we accepted the request + { + $statusMessage = ""; + $goodtogo = 0; + + if($obj_row->queuetype == "image") + { + // we write the content in a realfile + $fname = $obj_row->queuappId."-".$obj_row->queueversionId."-".$obj_row->queueurl; + $handle = fopen("../data/screenshots/".$fname, "wb"); + fwrite($handle, $obj_row->queuecontent); + fclose($handle); + + $query = "INSERT INTO appData VALUES (null, ".$obj_row->queueappId.", ".$obj_row->queueversionId.", 'image', ". + "'".addslashes($_REQUEST['description'])."', '".$fname."')"; + } + elseif ($obj_row->queuetype == "url") { + $query = "INSERT INTO appData VALUES (null, ".$obj_row->queueappId.", ".$obj_row->queueversionId.", 'url', ". + "'".addslashes($_REQUEST['description'])."', '".$obj_row->url."')"; + } + + if(debugging()) addmsg("

query: $query

","green"); + + if (mysql_query($query)) + { + $statusMessage = "

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("

query: $query

",green); - - if (mysql_query($query)) - { - //success - $email = getNotifyEmailAddressList($_REQUEST['appId'], $_REQUEST['versionId']); - if($email) + { + if(havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId'])) + { + if(!copy($_FILES['imagefile']['tmp_name'], "data/screenshots/".$_REQUEST['appId']."-".$_REQUEST['versionId']."-".basename($_FILES['imagefile']['name']))) { - $fullAppName = "Application: ".lookupAppName($_REQUEST['appId'])." Version: ".lookupVersionName($_REQUEST['appId'], $_REQUEST['versionId']); - $ms .= APPDB_ROOT."screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']."\n"; - $ms .= "\n"; - $ms .= ($_SESSION['current']->username ? $_SESSION['current']->username : "Anonymous")." added screenshot ".$_REQUEST['screenshot_desc']." to ".$fullAppName."\n"; - $ms .= "\n"; - $ms .= STANDARD_NOTIFY_FOOTER; - - mail(stripslashes($email), "[AppDB] ".$fullAppName ,$ms); - } else - { - $email = "no one"; + // whoops, copy failed. do something + errorpage("debug: copy failed; (".$_FILES['imagefile']['tmp_name'].";".$_FILES['imagefile']['name']); + exit; } - addmsg("mesage sent to: ".$email, green); - addmsg("The image was successfully added into the database", "green"); - redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId'])); - } - else - { - //error - $statusMessage = "

Database Error!
".mysql_error()."

\n"; - addmsg($statusMessage, "red"); - } - } else - { - if($_REQUEST['cmd'] == "delete") - { - $result = mysql_query("DELETE FROM appData WHERE id = ".$_REQUEST['imageId']); - if($result) + $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("

query: $query

","green"); + + if (mysql_query($query)) + { + //success + $email = getNotifyEmailAddressList($_REQUEST['appId'], $_REQUEST['versionId']); + if($email) { - $email = getNotifyEmailAddressList($_REQUEST['appId'], $_REQUEST['versionId']); - if($email) - { - $fullAppName = "Application: ".lookupAppName($_REQUEST['appId'])." Version: ".lookupVersionName($_REQUEST['appId'], $_REQUEST['versionId']); - $ms .= APPDB_ROOT."screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']."\n"; - $ms .= "\n"; - $ms .= ($_SESSION['current']->username ? $_SESSION['current']->username : "Anonymous")." deleted screenshot from ".$fullAppName."\n"; - $ms .= "\n"; - $ms .= STANDARD_NOTIFY_FOOTER; - - mail(stripslashes($email), "[AppDB] ".$fullAppName ,$ms); + $fullAppName = "Application: ".lookupAppName($_REQUEST['appId'])." Version: ".lookupVersionName($_REQUEST['appId'], $_REQUEST['versionId']); + $ms .= APPDB_ROOT."screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']."\n"; + $ms .= "\n"; + $ms .= $_SESSION['current']->username." added screenshot ".$_REQUEST['screenshot_desc']." to ".$fullAppName."\n"; + $ms .= "\n"; + $ms .= STANDARD_NOTIFY_FOOTER; - } else - { - $email = "no one"; - } - addmsg("mesage sent to: ".$email, green); - - addmsg("Image deleted", "green"); - redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId'])); + mail(stripslashes($email), "[AppDB] ".$fullAppName ,$ms); } else { - addmsg("Failed to delete image: ".mysql_error(), "red"); - redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId'])); + $email = "no one"; } + addmsg("mesage sent to: ".$email, "green"); + + addmsg("The image was successfully added into the database", "green"); + redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId'])); } - } - } + else + { + //error + $statusMessage = "

Database Error!
".mysql_error()."

\n"; + addmsg($statusMessage, "red"); + } + } else // we are a normal user or an anonymous and submitted a screenshot + { + if(!$str_data = addslashes(fread(fopen($_FILES['imagefile']['tmp_name'], "rb"), filesize($_FILES['imagefile']['tmp_name'])))) + { + // whoops, copy failed. do something + errorpage("debug: reading of file failed; (".$_FILES['imagefile']['tmp_name'].";".$_FILES['imagefile']['name']); + exit; + } + $str_query = "INSERT INTO appDataQueue VALUES (null, ".$_REQUEST['appId'].", ".$_REQUEST['versionId'].", 'image', ". + "'".addslashes($_REQUEST['screenshot_desc'])."', '".$_REQUEST['appId']."-".$_REQUEST['versionId']."-".basename($_FILES['imagefile']['name'])."', '$str_data', '".$_SESSION['current']->userid."', NOW())"; + + if(debugging()) addmsg("

query: $str_query

","green"); + + if (mysql_query($str_query)) + { + //success + $email = getNotifyEmailAddressList($_REQUEST['appId'], $_REQUEST['versionId']); + if($email) + { + $fullAppName = "Application: ".lookupAppName($_REQUEST['appId'])." Version: ".lookupVersionName($_REQUEST['appId'], $_REQUEST['versionId']); + $ms .= APPDB_ROOT."admin/adminAppDataQueue.php?queueId=".mysql_insert_id()."\n"; + $ms .= "\n"; + $ms .= ($_SESSION['current']->username ? $_SESSION['current']->username : "an anonymous user")." submitted a screenshot ".$_REQUEST['screenshot_desc']." for ".$fullAppName."\n"; + $ms .= "\n"; + $ms .= STANDARD_NOTIFY_FOOTER; + + mail(stripslashes($email), "[AppDB] ".$fullAppName ,$ms); + } else + { + $email = "no one"; + } + addmsg("mesage sent to: ".$email, "green"); + + addmsg("The image you submitted will be added to the database database after being reviewed", "green"); + redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId'])); + } + else + { + //error + $statusMessage = "

Database Error!
".mysql_error()."

\n"; + addmsg($statusMessage, "red"); + } + } + } elseif($_REQUEST['cmd'] == "delete") + { + if(havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId'])) + { + $result = mysql_query("DELETE FROM appData WHERE id = ".$_REQUEST['imageId']); + if($result) + { + $email = getNotifyEmailAddressList($_REQUEST['appId'], $_REQUEST['versionId']); + if($email) + { + $fullAppName = "Application: ".lookupAppName($_REQUEST['appId'])." Version: ".lookupVersionName($_REQUEST['appId'], $_REQUEST['versionId']); + $ms .= APPDB_ROOT."screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']."\n"; + $ms .= "\n"; + $ms .= ($_SESSION['current']->username ? $_SESSION['current']->username : "Anonymous")." deleted screenshot from ".$fullAppName."\n"; + $ms .= "\n"; + $ms .= STANDARD_NOTIFY_FOOTER; + + mail(stripslashes($email), "[AppDB] ".$fullAppName ,$ms); + + } else + { + $email = "no one"; + } + addmsg("mesage sent to: ".$email, "green"); + + addmsg("Image deleted", "green"); + redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId'])); + } else + { + addmsg("Failed to delete image: ".mysql_error(), "red"); + redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId'])); + } + } + } exit; } +// we didn't issue any command if($_REQUEST['versionId']) $result = mysql_query("SELECT * FROM appData WHERE type = 'image' AND appId = ".$_REQUEST['appId']." AND versionId = ".$_REQUEST['versionId']); else $result = mysql_query("SELECT * FROM appData WHERE type = 'image' AND appId = ".$_REQUEST['appId']." ORDER BY versionId"); -if((!$result || !mysql_num_rows($result)) && (!havepriv("admin") && !isMaintainer($_REQUEST['appId'], $_REQUEST['versionId']))) +$app=new Application($_REQUEST['appId']); +apidb_header("Screenshots"); +if($result && mysql_num_rows($result)) { - errorpage("No Screenshots Found","There are no screenshots currently linked to this application."); - exit; -} else -{ - $app=new Application($_REQUEST['appId']); - apidb_header("Screenshots"); - if($result && mysql_num_rows($result)) - { - echo html_frame_start("Screenshot Gallery for ".$app->data->appName,500); + echo html_frame_start("Screenshot Gallery for ".$app->data->appName,500); - // display thumbnails - $c = 1; - echo "
\n"; - while($ob = mysql_fetch_object($result)) + // display thumbnails + $c = 1; + echo "
\n"; + while($ob = mysql_fetch_object($result)) + { + if(!$_REQUEST['versionId'] && $ob->versionId!=$currentVersionId) { - if(!$_REQUEST['versionId'] && $ob->versionId!=$currentVersionId) + if($currentVersionId) { - if($currentVersionId) - { - echo "
\n"; - echo html_frame_end(); - } - $currentVersionId=$ob->versionId; - echo html_frame_start("Version ".lookupVersionName($_REQUEST['appId'], $currentVersionId)); - echo "
\n"; + echo "
\n"; + echo html_frame_end(); + $c=1; } - // set img tag - $imgSRC = ''.$ob->description.''; - - // get image size - $size = getimagesize("data/screenshots/".$ob->url); - - // generate random tag for popup window - $randName = generate_passwd(5); - - // set image link based on user pref - $img = ''.$imgSRC.''; - if (loggedin()) - { - if ($_SESSION['current']->getpref("window:screenshot") == "no") - { - $img = ''.$imgSRC.''; - } - } - - // display image - echo "\n"; - echo html_frame_start(substr(stripslashes($ob->description),0,20),128,"",0); - echo $img; - - //show admin delete link - if(loggedin() && (havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId']))) - { - echo "
[Delete Image]
"; - } - - echo html_frame_end(" "); - echo "\n"; - - // end row if counter of 3 - if ($c % 3 == 0) echo "\n"; - - $c++; + $currentVersionId=$ob->versionId; + echo html_frame_start("Version ".lookupVersionName($_REQUEST['appId'], $currentVersionId)); + echo "
\n"; } - echo "

\n"; + // set img tag + $imgSRC = ''.$ob->description.''; + // get image size + $size = getimagesize("data/screenshots/".$ob->url); - echo html_frame_end("Click thumbnail to view image in new window."); + // generate random tag for popup window + $randName = generate_passwd(5); + + // set image link based on user pref + $img = ''.$imgSRC.''; + if (loggedin()) + { + if ($_SESSION['current']->getpref("window:screenshot") == "no") + { + $img = ''.$imgSRC.''; + } + } + + // display image + echo "\n"; + echo html_frame_start(substr(stripslashes($ob->description),0,20),128,"",0); + echo $img; + + //show admin delete link + if(loggedin() && (havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId']))) + { + echo "
[Delete Image]
"; + } + + echo html_frame_end(" "); + echo "\n"; + + // end row if counter of 3 + if ($c % 3 == 0) echo "\n"; + + $c++; } - if((havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId'])) - && $_REQUEST['versionId']) - { - //image upload box - echo '
',"\n"; - echo html_frame_start("Upload Screenshot","400","",0); - echo '',"\n"; - - echo '',"\n"; - echo '',"\n"; - - echo '',"\n"; - - echo '
Image
Description
',"\n"; - echo html_frame_end(); - echo '',"\n"; - echo '',"\n"; - echo '',"\n"; - echo '
',"\n"; - } - echo html_back_link(1); - - apidb_footer(); + echo "
\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_frame_start("Upload Screenshot","400","",0); + echo '',"\n"; + + echo '',"\n"; + echo '',"\n"; + + echo '',"\n"; + + echo '
Image
Description
',"\n"; + echo html_frame_end(); + echo '',"\n"; + echo '',"\n"; + echo '',"\n"; + 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 */