Implemented the user friendly screenshot submitting feature
This commit is contained in:
242
admin/adminAppDataQueue.php
Normal file
242
admin/adminAppDataQueue.php
Normal file
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
/********************************************************/
|
||||
/* code to view and approve new application data */
|
||||
/********************************************************/
|
||||
|
||||
include("path.php");
|
||||
require(BASE."include/"."incl.php");
|
||||
require(BASE."include/"."tableve.php");
|
||||
require(BASE."include/"."category.php");
|
||||
|
||||
apidb_header("Admin Application Data Queue");
|
||||
|
||||
// deny access if not logged in
|
||||
if(!loggedin())
|
||||
{
|
||||
errorpage("You need to be logged in to use this page.");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
// shows the list of appdata in queue
|
||||
if (!$_REQUEST['queueId'])
|
||||
{
|
||||
//get available appData
|
||||
$query = "SELECT queueId, queueappId, queueversionId,".
|
||||
"queuetype, queuedescription,".
|
||||
"queueurl,queuecontent,queueuserId,".
|
||||
"UNIX_TIMESTAMP(submitTime) as submitTime ".
|
||||
"from appDataQueue;";
|
||||
$result = mysql_query($query);
|
||||
|
||||
if(!$result || !mysql_num_rows($result))
|
||||
{
|
||||
//no appData in queue
|
||||
echo html_frame_start("","90%");
|
||||
echo '<p><b>The App Data Queue is empty.</b></p>',"\n";
|
||||
echo '<p>There is nothing for you to do. Check back later.</p>',"\n";
|
||||
echo html_frame_end(" ");
|
||||
}
|
||||
else
|
||||
{
|
||||
//help
|
||||
echo "<div align=center><table width='90%' border=0 cellpadding=3 cellspacing=0><tr><td>\n\n";
|
||||
echo "<p>This is a list of app data submitted by users.\n";
|
||||
echo "Please inspect carefully these data before to accept it.\n";
|
||||
echo "</td></tr></table></div>\n\n";
|
||||
|
||||
//show applist
|
||||
echo html_frame_start("","90%","",0);
|
||||
echo "<table width='100%' border=0 cellpadding=3 cellspacing=0>\n\n";
|
||||
|
||||
echo "<tr class=color4>\n";
|
||||
echo " <td><font color=white>Submission Date</font></td>\n";
|
||||
echo " <td><font color=white>Queue Id</font></td>\n";
|
||||
echo " <td><font color=white>Username (e-mail)</font></td>\n";
|
||||
echo " <td><font color=white>Application Name</font></td>\n";
|
||||
echo " <td><font color=white>Version</font></td>\n";
|
||||
echo " <td><font color=white>Type</font></td>\n";
|
||||
echo "</tr>\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 "<tr class=$bgcolor>\n";
|
||||
echo " <td>".date("Y-n-t h:i:sa", $ob->submitTime)." </td>\n";
|
||||
echo " <td><a href='adminAppDataQueue.php?queueId=$ob->queueId'>$ob->queueId</a></td>\n";
|
||||
if($ob->queueuserId)
|
||||
echo " <td>".lookupUsername($ob->queueuserId)." (".lookupEmail($ob->queueuserId).")</td>\n";
|
||||
else
|
||||
echo " <td>Anonymous</td>\n";
|
||||
echo "<td>".appIdToName($ob->queueappId)."</td>\n";
|
||||
echo "<td>".versionIdToName($ob->queueversionId)."</td>\n";
|
||||
echo "<td>".$ob->queuetype."</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
echo "</table>\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 '<form name="qform" action="adminAppDataQueue.php" method="get">',"\n";
|
||||
// help
|
||||
echo "<div align=center><table width='90%' border=0 cellpadding=3 cellspacing=0><tr><td>\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 "</td></tr></table></div>\n\n";
|
||||
|
||||
// view application details
|
||||
echo html_frame_start("New Application Data Form",600,"",0);
|
||||
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
|
||||
|
||||
// app name
|
||||
echo '<tr valign=top><td class=color0><b>App Name</b></td>',"\n";
|
||||
echo "<td>".appIdToName($obj_row->queueappId)."</td></tr>\n";
|
||||
|
||||
// version
|
||||
echo '<tr valign=top><td class=color0><b>App Version</b></td>',"\n";
|
||||
echo "<td>".versionIdToName($obj_row->queueversionId)."</td></tr>\n";
|
||||
|
||||
//dataDescription
|
||||
echo '<tr valign=top><td class=color0><b>Description</b></td>',"\n";
|
||||
echo '<td><textarea name="description" rows=10 cols=35>'.stripslashes($obj_row->queuedescription).'</textarea></td></tr>',"\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 '<tr valign=top><td class=color0><b>Submited image</b></td>',"\n";
|
||||
echo '<td><img src="screenshotQueue.php?file='.$tmpfname.'" title="'.stripslashes($obj_row->queueurl).'" /></td></tr>',"\n";
|
||||
} elseif($obj_row->queuetype == "url")
|
||||
{
|
||||
echo '<tr valign=top><td class=color0><b>Submitted link</b></td>',"\n";
|
||||
echo '<td><textarea name="content" rows=10 cols=35>'.stripslashes($obj_row->queueurl).'</textarea></td></tr>',"\n";
|
||||
}
|
||||
|
||||
//email response
|
||||
echo '<tr valign=top><td class=color0><b>Email reply</b></td>',"\n";
|
||||
echo "<td><textarea name='replyText' rows=10 cols=35>Enter a personalized reason for acceptance or rejection of the submitted application data here</textarea></td></tr>\n";
|
||||
|
||||
/* Add button */
|
||||
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
|
||||
echo '<input type=submit name=add value=" Add data to this application " class=button /> </td></tr>',"\n";
|
||||
|
||||
/* Reject button */
|
||||
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
|
||||
echo '<input type=submit name=reject value=" Reject this request " class=button /></td></tr>',"\n";
|
||||
|
||||
echo '</table>',"\n";
|
||||
echo '<input type=hidden name="sub" value="inside_form" />',"\n";
|
||||
echo '<input type=hidden name="queueId" value="'.$_REQUEST['queueId'].'" />',"\n";
|
||||
echo '</form>';
|
||||
} 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("<p align=center><b>query:</b> $query </p>","green");
|
||||
|
||||
if (mysql_query($query))
|
||||
{
|
||||
$statusMessage = "<p>The application data was successfully added into the database</p>\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 = "<p><b>Database Error!<br>".mysql_error()."</b></p>\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 "<p><b>$statusMessage</b></p>\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 "<p>Internal Error: unable to delete selected maintainer application!</p>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//success
|
||||
echo "<p>Application data was successfully deleted from the Queue.</p>\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo html_frame_end(" ");
|
||||
echo html_back_link(1,'adminAppDataQueue.php');
|
||||
apidb_footer();
|
||||
?>
|
||||
|
||||
|
||||
16
admin/screenshotQueue.php
Normal file
16
admin/screenshotQueue.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/************************************************/
|
||||
/* code to show an image stored in mysql */
|
||||
/************************************************/
|
||||
|
||||
include("path.php");
|
||||
require(BASE."include/"."incl.php");
|
||||
if($info=getimagesize("../data/screenshots/".$_REQUEST['file']))
|
||||
{
|
||||
header('Content-type: '.$info['mime']);
|
||||
$handle = fopen("../data/screenshots/".$_REQUEST['file'], "rb");
|
||||
echo fread($handle, filesize("../data/screenshots/".$_REQUEST['file']));
|
||||
fclose($handle);
|
||||
}
|
||||
unlink("../data/screenshots/".$_REQUEST['file']);
|
||||
?>
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,10 @@ are logged in. Some of the benefits of membership are:<p>
|
||||
stomping out Wine issues will be greatly appreciated.</p>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
If you have anything else to contribute (howtos, etc.), contact us at:
|
||||
<a href="mailto:appdb@winehq.org">appdb@winehq.org</a><br />
|
||||
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
|
||||
|
||||
@@ -14,10 +14,10 @@ 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(havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId']))
|
||||
{
|
||||
if(!copy($_FILES['imagefile']['tmp_name'], "data/screenshots/".$_REQUEST['appId']."-".$_REQUEST['versionId']."-".basename($_FILES['imagefile']['name'])))
|
||||
{
|
||||
@@ -29,7 +29,7 @@ if($_REQUEST['cmd'])
|
||||
$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("<p align=center><b>query:</b> $query </p>",green);
|
||||
if(debugging()) addmsg("<p align=center><b>query:</b> $query </p>","green");
|
||||
|
||||
if (mysql_query($query))
|
||||
{
|
||||
@@ -40,7 +40,7 @@ if($_REQUEST['cmd'])
|
||||
$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 .= $_SESSION['current']->username." added screenshot ".$_REQUEST['screenshot_desc']." to ".$fullAppName."\n";
|
||||
$ms .= "\n";
|
||||
$ms .= STANDARD_NOTIFY_FOOTER;
|
||||
|
||||
@@ -49,7 +49,7 @@ if($_REQUEST['cmd'])
|
||||
{
|
||||
$email = "no one";
|
||||
}
|
||||
addmsg("mesage sent to: ".$email, green);
|
||||
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']));
|
||||
@@ -60,9 +60,52 @@ if($_REQUEST['cmd'])
|
||||
$statusMessage = "<p><b>Database Error!<br>".mysql_error()."</b></p>\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("<p align=center><b>query:</b> $str_query </p>","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
|
||||
{
|
||||
if($_REQUEST['cmd'] == "delete")
|
||||
$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 = "<p><b>Database Error!<br>".mysql_error()."</b></p>\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)
|
||||
@@ -83,7 +126,7 @@ if($_REQUEST['cmd'])
|
||||
{
|
||||
$email = "no one";
|
||||
}
|
||||
addmsg("mesage sent to: ".$email, green);
|
||||
addmsg("mesage sent to: ".$email, "green");
|
||||
|
||||
addmsg("Image deleted", "green");
|
||||
redirect(apidb_fullurl("screenshots.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']));
|
||||
@@ -94,25 +137,19 @@ if($_REQUEST['cmd'])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
// display thumbnails
|
||||
@@ -126,14 +163,14 @@ if((!$result || !mysql_num_rows($result)) && (!havepriv("admin") && !isMaintaine
|
||||
{
|
||||
echo "</tr></table></div>\n";
|
||||
echo html_frame_end();
|
||||
$c=1;
|
||||
}
|
||||
$currentVersionId=$ob->versionId;
|
||||
echo html_frame_start("Version ".lookupVersionName($_REQUEST['appId'], $currentVersionId));
|
||||
echo "<div align=center><table><tr>\n";
|
||||
}
|
||||
// set img tag
|
||||
$imgSRC = '<img src="appimage.php?imageId='.$ob->id.'&width=128&height=128" alt="'.$ob->description.'">';
|
||||
|
||||
$imgSRC = '<img src="appimage.php?imageId='.$ob->id.'&width=128&height=128" border=0 alt="'.$ob->description.'">';
|
||||
// get image size
|
||||
$size = getimagesize("data/screenshots/".$ob->url);
|
||||
|
||||
@@ -172,10 +209,13 @@ if((!$result || !mysql_num_rows($result)) && (!havepriv("admin") && !isMaintaine
|
||||
echo "</tr></table></div><br>\n";
|
||||
|
||||
echo html_frame_end("Click thumbnail to view image in new window.");
|
||||
}
|
||||
if((havepriv("admin") || isMaintainer($_REQUEST['appId'], $_REQUEST['versionId']))
|
||||
&& $_REQUEST['versionId'])
|
||||
{
|
||||
} else {
|
||||
echo "<p align=\"center\">There are currently no screenshot for the selected version of this application.";
|
||||
echo "<br />Please consider submitting a screenshot for the selected version yourself.</p>";
|
||||
}
|
||||
|
||||
if($_REQUEST['versionId'])
|
||||
{
|
||||
//image upload box
|
||||
echo '<form enctype="multipart/form-data" action="screenshots.php" name=imageForm method="post">',"\n";
|
||||
echo html_frame_start("Upload Screenshot","400","",0);
|
||||
@@ -192,11 +232,8 @@ if((!$result || !mysql_num_rows($result)) && (!havepriv("admin") && !isMaintaine
|
||||
echo '<input type="hidden" name="cmd" value="screenshot_upload" />',"\n";
|
||||
echo '<input type="hidden" name="appId" value="'.$_REQUEST['appId'].'" />',"\n";
|
||||
echo '<input type="hidden" name="versionId" value="'.$_REQUEST['versionId'].'"></form />',"\n";
|
||||
}
|
||||
echo html_back_link(1);
|
||||
|
||||
apidb_footer();
|
||||
|
||||
}
|
||||
echo html_back_link(1);
|
||||
apidb_footer();
|
||||
|
||||
?>
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user