Prefix all GPC variables according to our coding standard
This commit is contained in:
@@ -352,7 +352,7 @@ class Application {
|
||||
if($this->sQueued == 'false') // Has been accepted.
|
||||
{
|
||||
$sSubject = $this->sName." has been added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?appId=".$this->iAppId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iAppId=".$this->iAppId."\n";
|
||||
if($this->iSubmitterId)
|
||||
{
|
||||
$oSubmitter = new User($this->iSubmitterId);
|
||||
@@ -376,7 +376,7 @@ class Application {
|
||||
break;
|
||||
case "edit":
|
||||
$sSubject = $this->sName." has been modified by ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?appId=".$this->iAppId."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppId."\n";
|
||||
addmsg("Application modified.", "green");
|
||||
break;
|
||||
case "delete":
|
||||
@@ -393,7 +393,7 @@ class Application {
|
||||
break;
|
||||
case "reject":
|
||||
$sSubject = $this->sName." has been rejected by ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&appId=".$this->iAppId."\n";
|
||||
$sMsg .= APPDB_ROOT."appsubmit.php?sAppType=application&sSub=view&iAppId=".$this->iAppId."\n";
|
||||
|
||||
// if replyText is set we should report the reason the application was rejected
|
||||
if($aClean['replyText'])
|
||||
@@ -416,38 +416,38 @@ class Application {
|
||||
{
|
||||
HtmlAreaLoaderScript(array("app_editor"));
|
||||
|
||||
echo '<input type="hidden" name="appId" value="'.$this->iAppId.'">';
|
||||
echo '<input type="hidden" name="iAppId" value="'.$this->iAppId.'">';
|
||||
|
||||
echo html_frame_start("Application Form", "90%", "", 0);
|
||||
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
|
||||
echo '<tr valign=top><td class="color0"><b>Application name</b></td>',"\n";
|
||||
echo '<td><input size="20" type="text" name="appName" value="'.$this->sName.'"></td></tr>',"\n";
|
||||
echo '<td><input size="20" type="text" name="sAppName" value="'.$this->sName.'"></td></tr>',"\n";
|
||||
|
||||
// app Category
|
||||
$w = new TableVE("view");
|
||||
echo '<tr valign=top><td class="color0"><b>Category</b></td><td>',"\n";
|
||||
$w->make_option_list("appCatId", $this->iCatId,"appCategory","catId","catName");
|
||||
$w->make_option_list("iAppCatId", $this->iCatId,"appCategory","catId","catName");
|
||||
echo '</td></tr>',"\n";
|
||||
|
||||
// vendor name
|
||||
echo '<tr valign=top><td class="color0"><b>Vendor</b></td>',"\n";
|
||||
echo '<td><input size="20" type=text name="appVendorName" value="'.$sVendorName.'"></td></tr>',"\n";
|
||||
echo '<td><input size="20" type=text name="sAppVendorName" value="'.$sVendorName.'"></td></tr>',"\n";
|
||||
|
||||
// alt vendor
|
||||
$x = new TableVE("view");
|
||||
echo '<tr valign=top><td class="color0"> </td><td>',"\n";
|
||||
$x->make_option_list("appVendorId", $this->iVendorId,"vendor","vendorId","vendorName");
|
||||
$x->make_option_list("iAppVendorId", $this->iVendorId,"vendor","vendorId","vendorName");
|
||||
echo '</td></tr>',"\n";
|
||||
|
||||
// url
|
||||
echo '<tr valign=top><td class="color0"><b>URL</b></td>',"\n";
|
||||
echo '<td><input size="20" type=text name="appWebpage" value="'.$this->sWebpage.'"></td></tr>',"\n";
|
||||
echo '<td><input size="20" type=text name="sAppWebpage" value="'.$this->sWebpage.'"></td></tr>',"\n";
|
||||
|
||||
echo '<tr valign=top><td class="color0"><b>Keywords</b></td>',"\n";
|
||||
echo '<td><input size="90%" type="text" name="appKeywords" value="'.$this->sKeywords.'"></td></tr>',"\n";
|
||||
echo '<td><input size="90%" type="text" name="sAppKeywords" value="'.$this->sKeywords.'"></td></tr>',"\n";
|
||||
|
||||
echo '<tr valign=top><td class="color0"><b>Application description</b></td>',"\n";
|
||||
echo '<td><p><textarea cols="80" rows="20" id="app_editor" name="appDescription">';
|
||||
echo '<td><p><textarea cols="80" rows="20" id="app_editor" name="shAppDescription">';
|
||||
|
||||
echo $this->sDescription.'</textarea></p></td></tr>',"\n";
|
||||
|
||||
@@ -461,28 +461,28 @@ class Application {
|
||||
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['appCatId'] = makeSafe($_REQUEST['appCatId']);
|
||||
$aClean['appName'] = makeSafe($_REQUEST['appName']);
|
||||
$aClean['appVendorName'] = makeSafe($_REQUEST['appVendorName']);
|
||||
$aClean['appVendorId'] = makeSafe($_REQUEST['appVendorId']);
|
||||
$aClean['appDescription'] = makeSafe($_REQUEST['appDescription']);
|
||||
$aClean['iAppCatId'] = makeSafe($_REQUEST['iAppCatId']);
|
||||
$aClean['sAppName'] = makeSafe($_REQUEST['sAppName']);
|
||||
$aClean['sAppVendorName'] = makeSafe($_REQUEST['sAppVendorName']);
|
||||
$aClean['iAppVendorId'] = makeSafe($_REQUEST['iAppVendorId']);
|
||||
$aClean['shAppDescription'] = makeSafe($_REQUEST['shAppDescription']);
|
||||
|
||||
$errors = "";
|
||||
|
||||
if (empty($aClean['appCatId']))
|
||||
if (empty($aClean['iAppCatId']))
|
||||
$errors .= "<li>Please enter a category for your application.</li>\n";
|
||||
|
||||
if (strlen($aClean['appName']) > 200 )
|
||||
if (strlen($aClean['sAppName']) > 200 )
|
||||
$errors .= "<li>Your application name is too long.</li>\n";
|
||||
|
||||
if (empty($aClean['appName']))
|
||||
if (empty($aClean['sAppName']))
|
||||
$errors .= "<li>Please enter an application name.</li>\n";
|
||||
|
||||
// No vendor entered, and nothing in the list is selected
|
||||
if (empty($aClean['appVendorName']) && !$aClean['appVendorId'])
|
||||
if (empty($aClean['sAppVendorName']) && !$aClean['iAppVendorId'])
|
||||
$errors .= "<li>Please enter a vendor.</li>\n";
|
||||
|
||||
if (empty($aClean['appDescription']))
|
||||
if (empty($aClean['shAppDescription']))
|
||||
$errors .= "<li>Please enter a description of your application.</li>\n";
|
||||
|
||||
return $errors;
|
||||
@@ -493,21 +493,21 @@ class Application {
|
||||
{
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['appId'] = makeSafe($_REQUEST['appId']);
|
||||
$aClean['appVendorId'] = makeSafe($_REQUEST['appVendorId']);
|
||||
$aClean['appName'] = makeSafe($_REQUEST['appName']);
|
||||
$aClean['appDescription'] = makeSafe($_REQUEST['appDescription']);
|
||||
$aClean['appCatId'] = makeSafe($_REQUEST['appCatId']);
|
||||
$aClean['appWebpage'] = makeSafe($_REQUEST['appWebpage']);
|
||||
$aClean['appKeywords'] = makeSafe($_REQUEST['appKeywords']);
|
||||
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
|
||||
$aClean['iAppVendorId'] = makeSafe($_REQUEST['iAppVendorId']);
|
||||
$aClean['sAppName'] = makeSafe($_REQUEST['sAppName']);
|
||||
$aClean['shAppDescription'] = makeSafe($_REQUEST['shAppDescription']);
|
||||
$aClean['iAppCatId'] = makeSafe($_REQUEST['iAppCatId']);
|
||||
$aClean['sAppWebpage'] = makeSafe($_REQUEST['sAppWebpage']);
|
||||
$aClean['sAppKeywords'] = makeSafe($_REQUEST['sAppKeywords']);
|
||||
|
||||
$this->iAppId = $aClean['appId'];
|
||||
$this->sName = $aClean['appName'];
|
||||
$this->sDescription = $aClean['appDescription'];
|
||||
$this->iCatId = $aClean['appCatId'];
|
||||
$this->iVendorId = $aClean['appVendorId'];
|
||||
$this->sWebpage = $aClean['appWebpage'];
|
||||
$this->sKeywords = $aClean['appKeywords'];
|
||||
$this->iAppId = $aClean['iAppId'];
|
||||
$this->sName = $aClean['sAppName'];
|
||||
$this->sDescription = $aClean['shAppDescription'];
|
||||
$this->iCatId = $aClean['iAppCatId'];
|
||||
$this->iVendorId = $aClean['iAppVendorId'];
|
||||
$this->sWebpage = $aClean['sAppWebpage'];
|
||||
$this->sKeywords = $aClean['sAppKeywords'];
|
||||
}
|
||||
|
||||
/* display this application */
|
||||
@@ -515,7 +515,7 @@ class Application {
|
||||
{
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['appId'] = makeSafe($_REQUEST['appId']);
|
||||
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
|
||||
|
||||
/* is this user supposed to view this version? */
|
||||
if(!$_SESSION['current']->canViewApplication($this))
|
||||
@@ -549,7 +549,7 @@ class Application {
|
||||
echo ' <table width="250" border="0" cellpadding="3" cellspacing="1">',"\n";
|
||||
echo " <tr class=color0 valign=top><td width=\"100\"><b>Name</b></td><td width='100%'> ".$this->sName." </td>\n";
|
||||
echo " <tr class=\"color1\"><td><b>Vendor</b></td><td> ".
|
||||
" <a href='vendorview.php?vendorId=$oVendor->iVendorId'> ".$oVendor->sName." </a> \n";
|
||||
" <a href='vendorview.php?iVendorId=$oVendor->iVendorId'> ".$oVendor->sName." </a> \n";
|
||||
echo " <tr class=\"color0\"><td><b>Votes</b></td><td> ";
|
||||
echo vote_count_app_total($this->iAppId);
|
||||
echo " </td></tr>\n";
|
||||
@@ -559,7 +559,7 @@ class Application {
|
||||
|
||||
// optional links
|
||||
$result = query_parameters("SELECT * FROM appData WHERE appId = '?' AND versionID = 0 AND type = 'url'",
|
||||
$aClean['appId']);
|
||||
$aClean['iAppId']);
|
||||
if($result && mysql_num_rows($result) > 0)
|
||||
{
|
||||
echo " <tr class=\"color1\"><td> <b>Links</b></td><td>\n";
|
||||
@@ -604,35 +604,35 @@ class Application {
|
||||
/* are we already a maintainer? */
|
||||
if($_SESSION['current']->isSuperMaintainer($this->iAppId)) /* yep */
|
||||
{
|
||||
echo ' <form method="post" name="message" action="maintainerdelete.php"><input type=submit value="Remove yourself as a super maintainer" class="button">';
|
||||
echo ' <form method="post" name="sMessage" action="maintainerdelete.php"><input type=submit value="Remove yourself as a super maintainer" class="button">';
|
||||
} else /* nope */
|
||||
{
|
||||
echo ' <form method="post" name="message" action="maintainersubmit.php"><input type="submit" value="Be a super maintainer of this app" class="button" title="Click here to know more about super maintainers.">';
|
||||
echo ' <form method="post" name="sMessage" action="maintainersubmit.php"><input type="submit" value="Be a super maintainer of this app" class="button" title="Click here to know more about super maintainers.">';
|
||||
}
|
||||
|
||||
echo " <input type=\"hidden\" name=\"appId\" value=\"".$this->iAppId."\">";
|
||||
echo " <input type=\"hidden\" name=\"superMaintainer\" value=\"1\">"; /* set superMaintainer to 1 because we are at the appFamily level */
|
||||
echo " <input type=\"hidden\" name=\"iAppId\" value=\"".$this->iAppId."\">";
|
||||
echo " <input type=\"hidden\" name=\"iSuperMaintainer\" value=\"1\">"; /* set superMaintainer to 1 because we are at the appFamily level */
|
||||
echo " </form>";
|
||||
|
||||
if($_SESSION['current']->isSuperMaintainer($this->iAppId) || $_SESSION['current']->hasPriv("admin"))
|
||||
{
|
||||
echo ' <form method="post" name="edit" action="admin/editAppFamily.php"><input type="hidden" name="appId" value="'.$aClean['appId'].'"><input type="submit" value="Edit Application" class="button"></form>';
|
||||
echo ' <form method="post" name="sEdit" action="admin/editAppFamily.php"><input type="hidden" name="iAppId" value="'.$aClean['iAppId'].'"><input type="submit" value="Edit Application" class="button"></form>';
|
||||
}
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
echo '<form method="post" name="message" action="appsubmit.php?appId='.$this->iAppId.'&apptype=version&sub=view">';
|
||||
echo '<form method="post" name="sMessage" action="appsubmit.php?iAppId='.$this->iAppId.'&sAppType=version&sub=view">';
|
||||
echo '<input type=submit value="Submit new version" class="button">';
|
||||
echo '</form>';
|
||||
}
|
||||
if($_SESSION['current']->hasPriv("admin"))
|
||||
{
|
||||
$url = BASE."admin/deleteAny.php?what=appFamily&appId=".$this->iAppId."&confirmed=yes";
|
||||
echo " <form method=\"post\" name=\"edit\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\"><input type=\"submit\" value=\"Delete App\" class=\"button\"></form>";
|
||||
echo ' <form method="post" name="edit" action="admin/editBundle.php"><input type="hidden" name="bundleId" value="'.$this->iAppId.'"><input type="submit" value="Edit Bundle" class="button"></form>';
|
||||
$url = BASE."admin/deleteAny.php?sWhat=appFamily&iAppId=".$this->iAppId."&sConfirmed=yes";
|
||||
echo " <form method=\"post\" name=\"sEdit\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\"><input type=\"submit\" value=\"Delete App\" class=\"button\"></form>";
|
||||
echo ' <form method="post" name="sEdit" action="admin/editBundle.php"><input type="hidden" name="iBundleId" value="'.$this->iAppId.'"><input type="submit" value="Edit Bundle" class="button"></form>';
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo '<form method="post" action="account.php?cmd=login"><input type="submit" value="Log in to become a super maintainer" class="button"></form>';
|
||||
echo '<form method="post" action="account.php?sCmd=login"><input type="submit" value="Log in to become a super maintainer" class="button"></form>';
|
||||
}
|
||||
echo " </td></tr>\n";
|
||||
echo " </table>\n"; /* close of super maintainers table */
|
||||
@@ -700,7 +700,7 @@ class Application {
|
||||
echo " </td>\n";
|
||||
echo " <td>".$sVendor."</td>\n";
|
||||
echo " <td>".$oApp->sName."</td>\n";
|
||||
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?apptype=application&sub=view&appId=".$oApp->iAppId.">process</a>]</td>\n";
|
||||
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sAppType=application&sSub=view&iAppId=".$oApp->iAppId.">process</a>]</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
$c++;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ class Bug {
|
||||
if(!$this->bQueued)
|
||||
{
|
||||
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
if($this->iSubmitterId)
|
||||
{
|
||||
$oSubmitter = new User($this->iSubmitterId);
|
||||
@@ -234,7 +234,7 @@ class Bug {
|
||||
} else // Bug Link queued.
|
||||
{
|
||||
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "This Bug Link has been queued.";
|
||||
$sMsg .= "\n";
|
||||
addmsg("The Bug Link you submitted will be added to the database after being reviewed.", "green");
|
||||
@@ -242,7 +242,7 @@ class Bug {
|
||||
} else // Bug Link deleted.
|
||||
{
|
||||
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
addmsg("Bug Link deleted.", "green");
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
|
||||
//start format table
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
echo "<form method=post action='appview.php?versionId=".$iVersionId."'>\n";
|
||||
echo "<form method=post action='appview.php?iVersionId=".$iVersionId."'>\n";
|
||||
}
|
||||
echo html_frame_start("Known bugs","98%",'',0);
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n\n";
|
||||
@@ -316,10 +316,10 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
|
||||
|
||||
if($bCanEdit == true)
|
||||
{
|
||||
echo "<td align=center>[<a href='appview.php?sub=delete&buglinkId=".$oBuglink->iLinkId."&versionId=".$oBuglink->iVersionId."'>delete</a>]</td>\n";
|
||||
echo "<td align=center>[<a href='appview.php?sSub=delete&iBuglinkId=".$oBuglink->iLinkId."&iVersionId=".$oBuglink->iVersionId."'>delete</a>]</td>\n";
|
||||
if ($oBuglink->bQueued)
|
||||
{
|
||||
echo "<td align=center>[<a href='appview.php?sub=unqueue&buglinkId=".$oBuglink->iLinkId."&versionId=".$oBuglink->iVersionId."'>OK</a>]</td>\n";
|
||||
echo "<td align=center>[<a href='appview.php?sSub=unqueue&iBuglinkId=".$oBuglink->iLinkId."&iVersionId=".$oBuglink->iVersionId."'>OK</a>]</td>\n";
|
||||
} else
|
||||
{
|
||||
echo "<td align=center>Yes</td>\n";
|
||||
@@ -333,10 +333,10 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
|
||||
}
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
echo '<input type="hidden" name="versionId" value="'.$iVersionId.'">',"\n";
|
||||
echo '<input type="hidden" name="iVersionId" value="'.$iVersionId.'">',"\n";
|
||||
echo '<tr class=color3><td align=center>',"\n";
|
||||
echo '<input type="text" name="buglinkId" value="'.$aClean['buglinkId'].'" size="8"></td>',"\n";
|
||||
echo '<td><input type="submit" name="sub" value="Submit a new bug link."></td>',"\n";
|
||||
echo '<input type="text" name="iBuglinkId" value="'.$aClean['buglinkId'].'" size="8"></td>',"\n";
|
||||
echo '<td><input type="submit" name="sSub" value="Submit a new bug link."></td>',"\n";
|
||||
echo '<td colspan=6></td></tr></form>',"\n";
|
||||
}
|
||||
echo '</table>',"\n";
|
||||
|
||||
@@ -239,7 +239,7 @@ function make_cat_path($path, $appId = '', $versionId = '')
|
||||
if(!empty($versionId))
|
||||
{
|
||||
$oVersion = new Version($versionId);
|
||||
$str .= " > ".html_ahref($oApp->sName,"appview.php?appId=$appId");
|
||||
$str .= " > ".html_ahref($oApp->sName,"appview.php?iAppId=$appId");
|
||||
$str .= " > ".$oVersion->sName;
|
||||
} else
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ class Comment {
|
||||
$sSubject = "Comment for '".Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId)."' added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = "To reply to this email please use the link provided below.\n";
|
||||
$sMsg .= "DO NOT reply via your email client as it will not reach the person who wrote the comment\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&mode=nested#Comment-".$this->iCommentId."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&mode=nested#Comment-".$this->iCommentId."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "Subject: ".$this->sSubject."\r\n";
|
||||
$sMsg .= "\n";
|
||||
@@ -166,7 +166,7 @@ class Comment {
|
||||
if($sEmail)
|
||||
{
|
||||
$sSubject = "Comment for '".Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId)."' deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "This comment was made on ".substr($this->sDateCreated,0,10)." by ".$this->oOwner->sRealname."\n";
|
||||
$sMsg .= "\n";
|
||||
@@ -236,8 +236,8 @@ function view_app_comment($oRow)
|
||||
$subject = "RE: ".$oRow->subject;
|
||||
|
||||
// reply post buttons
|
||||
echo " [<a href=\"addcomment.php?appId=$oRow->appId&versionId=$oRow->versionId\"><small>post new</small></a>] \n";
|
||||
echo " [<a href=\"addcomment.php?appId=$oRow->appId&versionId=$oRow->versionId&subject=".
|
||||
echo " [<a href=\"addcomment.php?iAppId=$oRow->appId&iVersionId=$oRow->versionId\"><small>post new</small></a>] \n";
|
||||
echo " [<a href=\"addcomment.php?iAppId=$oRow->appId&iVersionId=$oRow->versionId&sSubject=".
|
||||
urlencode("$subject")."&thread=$oRow->commentId\"><small>reply to this</small></a>] \n";
|
||||
|
||||
echo "</td></tr>\n";
|
||||
@@ -329,7 +329,7 @@ function do_display_comments_threaded($hResult, $is_main)
|
||||
view_app_comment($oRow);
|
||||
} else
|
||||
{
|
||||
echo '<li><a href="commentview.php?appId='.$oRow->appId.'&versionId='.$oRow->versionId.'&threadId='.$oRow->parentId.'"> '.
|
||||
echo '<li><a href="commentview.php?iAppId='.$oRow->appId.'&iVersionId='.$oRow->versionId.'&threadId='.$oRow->parentId.'"> '.
|
||||
$oRow->subject.' </a> by '.forum_lookup_user($oRow->userId).' on '.$oRow->time.' </li>'."\n";
|
||||
}
|
||||
|
||||
@@ -376,8 +376,8 @@ function view_app_comments($versionId, $threadId = 0)
|
||||
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['cmode'] = makeSafe($_REQUEST['cmode']);
|
||||
$aClean['mode'] = makeSafe($_REQUEST['mode']);
|
||||
$aClean['sCmode'] = makeSafe($_REQUEST['sCmode']);
|
||||
$aClean['sMode'] = makeSafe($_REQUEST['sMode']);
|
||||
|
||||
// count posts
|
||||
$hResult = query_parameters("SELECT commentId FROM appComments WHERE versionId = '?'", $versionId);
|
||||
@@ -393,27 +393,27 @@ function view_app_comments($versionId, $threadId = 0)
|
||||
if ($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
// FIXME we need to change this so not logged in users can change current view as well
|
||||
if (!empty($aClean['cmode']))
|
||||
$_SESSION['current']->setPref("comments:mode", $aClean['cmode']);
|
||||
if (!empty($aClean['sCmode']))
|
||||
$_SESSION['current']->setPref("comments:mode", $aClean['sCmode']);
|
||||
|
||||
$sel[$_SESSION['current']->getPref("comments:mode", "threaded")] = 'selected';
|
||||
echo '<td><form method="post" name="smode" action="appview.php">',"\n";
|
||||
echo '<td><form method="post" name="sMode" action="appview.php">',"\n";
|
||||
echo "<b>Application Comments</b> $messageCount total comments ";
|
||||
echo '<b>Mode</b> <select name="cmode" onchange="document.smode.submit();">',"\n";
|
||||
echo '<b>Mode</b> <select name="sCmode" onchange="document.smode.submit();">',"\n";
|
||||
echo ' <option value="flat" '.$sel['flat'].'>Flat</option>',"\n";
|
||||
echo ' <option value="threaded" '.$sel['threaded'].'>Threaded</option>',"\n";
|
||||
echo ' <option value="nested" '.$sel['nested'].'>Nested</option>',"\n";
|
||||
echo ' <option value="off" '.$sel['off'].'>No Comments</option>',"\n";
|
||||
echo '</select>',"\n";
|
||||
echo '<input type="hidden" name="versionId" value="'.$versionId.'"></form></td>',"\n";
|
||||
echo '<input type="hidden" name="iVersionId" value="'.$versionId.'"></form></td>',"\n";
|
||||
}
|
||||
|
||||
// blank space
|
||||
echo '<td> </td>',"\n";
|
||||
|
||||
// post new message button
|
||||
echo '<td><form method="post" name="message" action="addcomment.php"><input type="submit" value="post new comment" class="button"> ',"\n";
|
||||
echo '<input type="hidden" name="versionId" value="'.$versionId.'"></form></td>',"\n";
|
||||
echo '<td><form method="post" name="sMessage" action="addcomment.php"><input type="submit" value="post new comment" class="button"> ',"\n";
|
||||
echo '<input type="hidden" name="iVersionId" value="'.$versionId.'"></form></td>',"\n";
|
||||
|
||||
//end comment format table
|
||||
echo '</tr></table></td></tr>',"\n";
|
||||
@@ -434,7 +434,7 @@ function view_app_comments($versionId, $threadId = 0)
|
||||
else
|
||||
$mode = "threaded"; /* default non-logged in users to threaded comment display mode */
|
||||
|
||||
if ($aClean['mode']=="nested")
|
||||
if ($aClean['sMode']=="nested")
|
||||
$mode = "nested";
|
||||
|
||||
switch ($mode)
|
||||
|
||||
@@ -272,7 +272,7 @@ class distribution{
|
||||
{
|
||||
$sSubject = "Distribution rejected";
|
||||
$sMsg = "The Distribution you submitted (".$this->sName.") has been rejected.";
|
||||
$sMsg .= APPDB_ROOT."testingData.php?sub=view&versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= APPDB_ROOT."testingData.php?sSub=view&iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "Reason given:\n";
|
||||
$sMsg .= $aClean['replyText']."\n"; // append the reply text, if there is any
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ $aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
|
||||
/**************/
|
||||
/* Login Form */
|
||||
/**************/
|
||||
echo '<form method="post" name="flogin" action="account.php">',"\n";
|
||||
echo '<form method="post" name="sFlogin" action="account.php">',"\n";
|
||||
echo html_frame_start("Login to Application DB","400","",0)
|
||||
?>
|
||||
|
||||
@@ -16,8 +16,8 @@ echo html_frame_start("Login to Application DB","400","",0)
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function cmd_send_passwd() {
|
||||
document.flogin.cmd.value = "send_passwd";
|
||||
document.flogin.submit();
|
||||
document.sFlogin.sCmd.value = "send_passwd";
|
||||
document.sFlogin.submit();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
@@ -43,14 +43,14 @@ function cmd_send_passwd() {
|
||||
<?php
|
||||
|
||||
echo html_frame_end(" ");
|
||||
echo '<input type="hidden" name="cmd" value="do_login">',"\n";
|
||||
echo '<input type="hidden" name="ext_referer" value="'.$_SERVER['HTTP_REFERER'].'">',"\n";
|
||||
echo '<input type="hidden" name="sCmd" value="do_login">',"\n";
|
||||
echo '<input type="hidden" name="sExtReferer" value="'.$_SERVER['HTTP_REFERER'].'">',"\n";
|
||||
echo '</form>',"\n";
|
||||
|
||||
?>
|
||||
|
||||
<p align=center>Don't have an account yet?<br>
|
||||
[<a href="account.php?cmd=new" onMouseOver="document.status='';return true;">Create a New Account</a>]</p>
|
||||
[<a href="account.php?sCmd=new" onMouseOver="document.status='';return true;">Create a New Account</a>]</p>
|
||||
|
||||
<p align=center>Lost your password?<br>
|
||||
[<a href="javascript:cmd_send_passwd();" onMouseOver="document.status='';return true;">Email a New Password</a>]</p>
|
||||
|
||||
@@ -106,12 +106,12 @@ class Monitor {
|
||||
{
|
||||
$sSubject = "Monitor for ".$sAppName;
|
||||
$sSubject .= " added: ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
addmsg("You will now recieve an email whenever changes are made to this Application version.", "green");
|
||||
} else
|
||||
{
|
||||
$sSubject = "Monitor for ".$sAppName." added: ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?appId=".$this->iAppid."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppid."\n";
|
||||
addmsg("You will now recieve an email whenever changes are made to this Application.", "green");
|
||||
}
|
||||
break;
|
||||
@@ -120,12 +120,12 @@ class Monitor {
|
||||
{
|
||||
$sSubject = "Monitor for ".$sAppName;
|
||||
$sSubject .= " removed: ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
addmsg("You will no longer recieve an email whenever changes are made to this Application version.", "green");
|
||||
} else
|
||||
{
|
||||
$sSubject = "Monitor for ".$sAppName." removed: ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?appId=".$this->iAppid."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppid."\n";
|
||||
addmsg("You will no longer recieve an email whenever changes are made to this Application.", "green");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -137,7 +137,7 @@ class Note {
|
||||
{
|
||||
case "add":
|
||||
$sSubject = "Note ".$this->sTitle." for ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
addmsg("The note was successfully added into the database.", "green");
|
||||
break;
|
||||
case "edit":
|
||||
|
||||
@@ -267,7 +267,7 @@ class Screenshot {
|
||||
if(!$this->bQueued)
|
||||
{
|
||||
$sSubject = "Screenshot for ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
if($this->iSubmitterId)
|
||||
{
|
||||
$oSubmitter = new User($this->iSubmitterId);
|
||||
@@ -278,7 +278,7 @@ class Screenshot {
|
||||
} else // Screenshot queued.
|
||||
{
|
||||
$sSubject = "Screenshot for ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "This screenshot has been queued.";
|
||||
$sMsg .= "\n";
|
||||
addmsg("The screenshot you submitted will be added to the database database after being reviewed.", "green");
|
||||
@@ -286,7 +286,7 @@ class Screenshot {
|
||||
} else // Screenshot deleted.
|
||||
{
|
||||
$sSubject = "Screenshot for ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
addmsg("Screenshot deleted.", "green");
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ function get_screenshot_img($iAppId = null, $iVersionId = null, $bFormatting = t
|
||||
} else
|
||||
{
|
||||
$oRow = mysql_fetch_object($hResult);
|
||||
$sImgFile = '<img src="appimage.php?thumbnail=true&id='.$oRow->id.'" alt="'.$oRow->description.'" />';
|
||||
$sImgFile = '<img src="appimage.php?bThumbnail=true&iId='.$oRow->id.'" alt="'.$oRow->description.'" />';
|
||||
}
|
||||
|
||||
if($bFormatting)
|
||||
@@ -351,12 +351,12 @@ function get_screenshot_img($iAppId = null, $iVersionId = null, $bFormatting = t
|
||||
if(mysql_num_rows($hResult))
|
||||
{
|
||||
if($iVersionId)
|
||||
$sImg .= "<a href='screenshots.php?appId=$iAppId&versionId=$iVersionId'>$sImgFile<center>View/Submit Screenshot</center></a>";
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>$sImgFile<center>View/Submit Screenshot</center></a>";
|
||||
else
|
||||
$sImg .= "<a href='screenshots.php?appId=$iAppId&versionId=$iVersionId'>$sImgFile<center>View Screenshot</center></a>";
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>$sImgFile<center>View Screenshot</center></a>";
|
||||
} else if($iVersionId) /* we are asking for a specific app version but it has no screenshots */
|
||||
{
|
||||
$sImg .= "<a href='screenshots.php?appId=$iAppId&versionId=$iVersionId'>$sImgFile<center>Submit Screenshot</center></a>";
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>$sImgFile<center>Submit Screenshot</center></a>";
|
||||
} else /* we have no screenshots and we aren't a specific version, we don't allow adding screenshots for an app */
|
||||
{
|
||||
$sImg .= $sImgFile;
|
||||
@@ -409,11 +409,11 @@ function get_thumbnail($id)
|
||||
$randName = User::generate_passwd(5);
|
||||
// set img tag
|
||||
$imgSRC = '<img src="'.apidb_fullurl("appimage.php").
|
||||
'?thumbnail=true&id='.$id.'" alt="'.$oScreenshot->sDescription.
|
||||
'?bThumbnail=true&iId='.$id.'" alt="'.$oScreenshot->sDescription.
|
||||
'" width="'.$oScreenshot->oThumbnailImage->get_width().
|
||||
'" height="'.$oScreenshot->oThumbnailImage->get_height().'">';
|
||||
$img = '<a href="'.apidb_fullurl("appimage.php").
|
||||
'?id='.$id.
|
||||
'?iId='.$id.
|
||||
'" onclick="javascript:openWin(\''.apidb_fullurl("appimage.php").
|
||||
'?id='.$id.'\',\''.$randName.'\','.
|
||||
($oScreenshot->oScreenshotImage->get_width() + 20).','.
|
||||
@@ -426,7 +426,7 @@ function get_thumbnail($id)
|
||||
if ($_SESSION['current']->getpref("window:screenshot") == "no")
|
||||
{
|
||||
$img = '<a href="'.apidb_fullurl("appimage.php").
|
||||
'?imageId='.$id.'">'.$imgSRC.'</a>';
|
||||
'?iImageId='.$id.'">'.$imgSRC.'</a>';
|
||||
}
|
||||
}
|
||||
return $img;
|
||||
|
||||
@@ -10,7 +10,7 @@ function global_sidebar_menu() {
|
||||
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['q'] = makeSafe($_REQUEST['q']);
|
||||
$aClean['sSearchQuery'] = makeSafe($_REQUEST['sSearchQuery']);
|
||||
|
||||
$g = new htmlmenu(APPDB_OWNER." Menu");
|
||||
$g->add(APPDB_OWNER, APPDB_OWNER_URL);
|
||||
@@ -24,7 +24,7 @@ function global_sidebar_menu() {
|
||||
$g->add("Screenshots", BASE."viewScreenshots.php");
|
||||
$g->add("Browse Apps", BASE."appbrowse.php");
|
||||
$g->add("Top 25", BASE."votestats.php");
|
||||
$g->add("Submit Application", BASE."appsubmit.php?sub=view&apptype=application");
|
||||
$g->add("Submit Application", BASE."appsubmit.php?sSub=view&sAppType=application");
|
||||
$g->add("Help & Documentation", BASE."help/");
|
||||
$g->add("AppDB Stats", BASE."appdbStats.php");
|
||||
$g->add("View Distributions (".getNumberOfDistributions().")", BASE."distributionView.php");
|
||||
@@ -34,7 +34,7 @@ function global_sidebar_menu() {
|
||||
$g->done();
|
||||
|
||||
$g = new htmlmenu("Search");
|
||||
$g->addmisc(app_search_box(!empty($aClean['q']) ? $aClean['q'] : ''));
|
||||
$g->addmisc(app_search_box(!empty($aClean['sSearchQuery']) ? $aClean['sSearchQuery'] : ''));
|
||||
$g->done();
|
||||
|
||||
}
|
||||
@@ -43,7 +43,7 @@ function global_sidebar_menu() {
|
||||
function app_search_box($q = '')
|
||||
{
|
||||
$str = "</span><form method=\"get\" action=\"".BASE."search.php\">\n";
|
||||
$str .= "<input type=text name=q value='$q' size=11 class=searchfield>";
|
||||
$str .= "<input type=text name=sSearchQuery value='$q' size=11 class=searchfield>";
|
||||
$str .= "<input type=submit value='Search' class=searchbutton>\n";
|
||||
$str .= "</form>\n<span>";
|
||||
return $str;
|
||||
|
||||
@@ -14,7 +14,7 @@ function global_sidebar_login() {
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
|
||||
$g->add("Logout", BASE."account.php?cmd=logout");
|
||||
$g->add("Logout", BASE."account.php?sCmd=logout");
|
||||
$g->add("Preferences", BASE."preferences.php");
|
||||
|
||||
/* if this user maintains any applications list them */
|
||||
@@ -27,9 +27,9 @@ function global_sidebar_login() {
|
||||
while(list($index, list($appId, $versionId, $superMaintainer)) = each($apps_user_maintains))
|
||||
{
|
||||
if($superMaintainer)
|
||||
$g->addmisc("<a href='".BASE."appview.php?appId=$appId'>".Application::lookup_name($appId)."*</a>", "center");
|
||||
$g->addmisc("<a href='".BASE."appview.php?iAppId=$appId'>".Application::lookup_name($appId)."*</a>", "center");
|
||||
else
|
||||
$g->addmisc("<a href='".BASE."appview.php?versionId=$versionId'>".Application::lookup_name($appId)." ".Version::lookup_name($versionId)."</a>", "center");
|
||||
$g->addmisc("<a href='".BASE."appview.php?iVersionId=$versionId'>".Application::lookup_name($appId)." ".Version::lookup_name($versionId)."</a>", "center");
|
||||
}
|
||||
}
|
||||
$appsRejected = $_SESSION['current']->getAllRejectedApps();
|
||||
@@ -39,7 +39,7 @@ function global_sidebar_login() {
|
||||
}
|
||||
else
|
||||
{
|
||||
$g->add("Login", BASE."account.php?cmd=login");
|
||||
$g->add("Login", BASE."account.php?sCmd=login");
|
||||
}
|
||||
|
||||
$g->done();
|
||||
|
||||
@@ -254,13 +254,13 @@ class testData{
|
||||
case "add":
|
||||
$sSubject = "Submitted testing data accepted";
|
||||
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
|
||||
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
|
||||
$sMsg .= "Administrators Responce:\n";
|
||||
break;
|
||||
case "reject":
|
||||
$sSubject = "Submitted testing data rejected";
|
||||
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been rejected.";
|
||||
$sMsg .= APPDB_ROOT."testResults.php?sub=view&iTestingId=".$this->iTestingId."\n";
|
||||
$sMsg .= APPDB_ROOT."testResults.php?sSub=view&iTestingId=".$this->iTestingId."\n";
|
||||
$sMsg .= "Reason given:\n";
|
||||
break;
|
||||
case "delete":
|
||||
@@ -285,7 +285,7 @@ class testData{
|
||||
|
||||
$oVersion = new Version($this->iVersionId);
|
||||
$oApp = new Application($oVersion->iAppId);
|
||||
$sBacklink = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
|
||||
$sBacklink = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
|
||||
|
||||
switch($sAction)
|
||||
{
|
||||
@@ -465,7 +465,7 @@ class testData{
|
||||
echo ' <td>'.$sStatus.' </td>',"\n";
|
||||
if ($_SESSION['current']->hasAppVersionModifyPermission($oVersion))
|
||||
{
|
||||
echo '<td><a href="'.BASE.'admin/adminTestResults.php?sub=view&iTestingId='.$oTest->iTestingId.'">',"\n";
|
||||
echo '<td><a href="'.BASE.'admin/adminTestResults.php?sSub=view&iTestingId='.$oTest->iTestingId.'">',"\n";
|
||||
echo 'Edit</a></td>',"\n";
|
||||
}
|
||||
echo '</tr>',"\n";
|
||||
@@ -474,7 +474,7 @@ class testData{
|
||||
echo '</table>',"\n";
|
||||
|
||||
echo '<form method=get action="'.$PHP_SELF.'">';
|
||||
echo '<input name="versionId" type=hidden value="',$iVersionId,'" />';
|
||||
echo '<input name="iVersionId" type=hidden value="',$iVersionId,'" />';
|
||||
if($rowsUsed >= $iDisplayLimit && !is_string($showAll))
|
||||
echo '<input class="button" name="showAll" type=submit value="Show All Tests" />';
|
||||
|
||||
@@ -534,7 +534,7 @@ class testData{
|
||||
// Rating
|
||||
echo '<tr><td class="color0"><b>Rating</b></td><td class="color0">',"\n";
|
||||
make_maintainer_rating_list("sTestedRating", $this->sTestedRating);
|
||||
echo '<a href="'.BASE.'/help/?topic=maintainer_ratings" target="_blank">Rating definitions</a></td></tr>',"\n";
|
||||
echo '<a href="'.BASE.'/help/?sTopic=maintainer_ratings" target="_blank">Rating definitions</a></td></tr>',"\n";
|
||||
// extra comments
|
||||
echo '<tr valign=top><td class="color1"><b>Extra comments</b></td>',"\n";
|
||||
echo '<td class="color0"><textarea name="sComments" rows=10 cols=35>';
|
||||
@@ -685,7 +685,7 @@ class testData{
|
||||
echo " <td>".$oApp->sName."</td>\n";
|
||||
echo " <td>".$oVersion->sName."</td>\n";
|
||||
echo " <td>".$oTest->sTestedRelease."</td>\n";
|
||||
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sub=view&iTestingId=".$oTest->iTestingId.">process</a>]</td>\n";
|
||||
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sSub=view&iTestingId=".$oTest->iTestingId.">process</a>]</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
$c++;
|
||||
}
|
||||
|
||||
@@ -53,11 +53,11 @@ class Url {
|
||||
{
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
|
||||
$aClean['appId'] = makeSafe($_REQUEST['appId']);
|
||||
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
|
||||
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
|
||||
|
||||
// Security, if we are not an administrator or a maintainer, the url must be queued.
|
||||
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($aClean['versionId']) || $_SESSION['current']->isSupermaintainer($aClean['appId'])))
|
||||
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($aClean['iVersionId']) || $_SESSION['current']->isSupermaintainer($aClean['iAppId'])))
|
||||
{
|
||||
$this->bQueued = true;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ class Url {
|
||||
if(!$this->bQueued)
|
||||
{
|
||||
$sSubject = "Url for ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
if($this->iSubmitterId)
|
||||
{
|
||||
$oSubmitter = new User($this->iSubmitterId);
|
||||
@@ -223,7 +223,7 @@ class Url {
|
||||
} else // Url queued.
|
||||
{
|
||||
$sSubject = "Url for ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "This url has been queued.";
|
||||
$sMsg .= "\n";
|
||||
addmsg("The url you submitted will be added to the database database after being reviewed.", "green");
|
||||
@@ -231,7 +231,7 @@ class Url {
|
||||
} else // Url deleted.
|
||||
{
|
||||
$sSubject = "Url for ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
addmsg("Url deleted.", "green");
|
||||
}
|
||||
|
||||
|
||||
@@ -727,7 +727,7 @@ class User {
|
||||
$sMsg = "You didn't log in in the past six months to the AppDB.\r\n";
|
||||
$sMsg .= "Please log in or your account will automatically be deleted in one month.\r\n";
|
||||
}
|
||||
$sMsg .= APPDB_ROOT."account.php?cmd=login\r\n";
|
||||
$sMsg .= APPDB_ROOT."account.php?sCmd=login\r\n";
|
||||
|
||||
mail_appdb($this->sEmail, $sSubject, $sMsg);
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ function outputTopXRow($oRow)
|
||||
$img = get_screenshot_img(null, $oRow->versionId, false); // image, disable extra formatting
|
||||
echo '
|
||||
<tr class="white">
|
||||
<td class="app_name"><a href="appview.php?versionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>
|
||||
<td class="app_name"><a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>
|
||||
<td>'.util_trim_description($oApp->sDescription).'</td>
|
||||
<td><center>'.$img.'</center></td>
|
||||
</tr>';
|
||||
@@ -555,7 +555,7 @@ function outputSearchTableForhResult($search_words, $hResult)
|
||||
|
||||
//display row
|
||||
echo "<tr class=$bgcolor>\n";
|
||||
echo " <td>".html_ahref($oRow->appName,BASE."appview.php?appId=$oRow->appId")."</td>\n";
|
||||
echo " <td>".html_ahref($oRow->appName,BASE."appview.php?iAppId=$oRow->appId")."</td>\n";
|
||||
echo " <td>".util_trim_description($oRow->description)."</td>\n";
|
||||
echo " <td>$y->versions </td>\n";
|
||||
echo "</tr>\n\n";
|
||||
@@ -575,55 +575,55 @@ function process_app_version_changes($isVersion)
|
||||
{
|
||||
/* load up the version or application depending on which values are set */
|
||||
if($isVersion)
|
||||
$oVersion = new Version($_REQUEST['versionId']);
|
||||
$oVersion = new Version($_REQUEST['iVersionId']);
|
||||
else
|
||||
$oApp = new Application($_REQUEST['appId']);
|
||||
$oApp = new Application($_REQUEST['iAppId']);
|
||||
|
||||
// commit changes of form to database
|
||||
if(($_REQUEST['submit'] == "Update Database") && $isVersion) /* is a version */
|
||||
if(($_REQUEST['sSubmit'] == "Update Database") && $isVersion) /* is a version */
|
||||
{
|
||||
$oVersion->GetOutputEditorValues();
|
||||
$oVersion->update();
|
||||
} else if(($_REQUEST['submit'] == "Update Database") && !$isVersion) /* is an application */
|
||||
} else if(($_REQUEST['sSubmit'] == "Update Database") && !$isVersion) /* is an application */
|
||||
{
|
||||
$oApp->GetOutputEditorValues();
|
||||
$oApp->update();
|
||||
} else if($_REQUEST['submit'] == "Update URL")
|
||||
} else if($_REQUEST['sSubmit'] == "Update URL")
|
||||
{
|
||||
$sWhatChanged = "";
|
||||
$bAppChanged = false;
|
||||
|
||||
if (!empty($_REQUEST['url_desc']) && !empty($_REQUEST['url']) )
|
||||
if (!empty($_REQUEST['sUrlDesc']) && !empty($_REQUEST['sUrl']) )
|
||||
{
|
||||
// process added URL
|
||||
if($_SESSION['current']->showDebuggingInfos()) { echo "<p align=center><b>{$_REQUEST['url']}:</b> {$_REQUEST['url_desc']} </p>"; }
|
||||
if($_SESSION['current']->showDebuggingInfos()) { echo "<p align=center><b>{$_REQUEST['sUrl']}:</b> {$_REQUEST['sUrlDesc']} </p>"; }
|
||||
|
||||
if($isVersion)
|
||||
{
|
||||
$hResult = query_parameters("INSERT INTO appData (versionId, type, description, url) ".
|
||||
"VALUES ('?', '?', '?', '?')",
|
||||
$_REQUEST['versionId'], "url", $_REQUEST['url_desc'],
|
||||
$_REQUEST['url']);
|
||||
$_REQUEST['iVersionId'], "url", $_REQUEST['sUrlDesc'],
|
||||
$_REQUEST['sUrl']);
|
||||
} else
|
||||
{
|
||||
$hResult = query_parameters("INSERT INTO appData (appId, type, description, url) ".
|
||||
"VALUES ('?', '?', '?', '?')",
|
||||
$_REQUEST['appId'], "url", $_REQUEST['url_desc'],
|
||||
$_REQUEST['url']);
|
||||
$_REQUEST['iAppId'], "url", $_REQUEST['sUrlDesc'],
|
||||
$_REQUEST['sUrl']);
|
||||
|
||||
}
|
||||
|
||||
if ($hResult)
|
||||
{
|
||||
addmsg("The URL was successfully added into the database", "green");
|
||||
$sWhatChanged .= " Added Url: Description: ".stripslashes($_REQUEST['url_desc'])."\n";
|
||||
$sWhatChanged .= " Url: ".stripslashes($_REQUEST['url'])."\n";
|
||||
$sWhatChanged .= " Added Url: Description: ".stripslashes($_REQUEST['sUrlDesc'])."\n";
|
||||
$sWhatChanged .= " Url: ".stripslashes($_REQUEST['sUrl'])."\n";
|
||||
$bAppChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Process changed URLs
|
||||
for($i = 0; $i < $_REQUEST['rows']; $i++)
|
||||
for($i = 0; $i < $_REQUEST['iRows']; $i++)
|
||||
{
|
||||
if($_SESSION['current']->showDebuggingInfos()) { echo "<p align=center><b>{$_REQUEST['adescription'][$i]}:</b> {$_REQUEST['aURL'][$i]}: {$_REQUEST['adelete'][$i]} : {$_REQUEST['aId'][$i]} : .{$_REQUEST['aOldDesc'][$i]}. : {$_REQUEST['aOldURL'][$i]}</p>"; }
|
||||
|
||||
@@ -663,8 +663,8 @@ function process_app_version_changes($isVersion)
|
||||
}
|
||||
if ($bAppChanged)
|
||||
{
|
||||
$sEmail = User::get_notify_email_address_list($_REQUEST['appId']);
|
||||
$oApp = new Application($_REQUEST['appId']);
|
||||
$sEmail = User::get_notify_email_address_list($_REQUEST['iAppId']);
|
||||
$oApp = new Application($_REQUEST['iAppId']);
|
||||
if($sEmail)
|
||||
{
|
||||
if($isVersion)
|
||||
@@ -672,7 +672,7 @@ function process_app_version_changes($isVersion)
|
||||
else
|
||||
$sSubject = "Links for ".$oApp->sName." have been updated by ".$_SESSION['current']->sRealname;
|
||||
|
||||
$sMsg = APPDB_ROOT."appview.php?appId=".$_REQUEST['appId']."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iAppId=".$_REQUEST['iAppId']."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "The following changes have been made:";
|
||||
$sMsg .= "\n";
|
||||
|
||||
@@ -432,7 +432,7 @@ class Version {
|
||||
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been rejected. ";
|
||||
$sMsg .= "Clicking on the link in this email will allow you to modify and resubmit the version. ";
|
||||
$sMsg .= "A link to your queue of applications and versions will also show up on the left hand side of the Appdb site once you have logged in. ";
|
||||
$sMsg .= APPDB_ROOT."appsubmit.php?sub=view&apptype=version&versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= APPDB_ROOT."appsubmit.php?sSub=view&sAppType=version&iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg .= "Reason given:\n";
|
||||
break;
|
||||
case "delete":
|
||||
@@ -461,7 +461,7 @@ class Version {
|
||||
if($this->sQueued == "false")
|
||||
{
|
||||
$sSubject = "Version ".$this->sName." of ".$oApp->sName." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
if($this->iSubmitterId)
|
||||
{
|
||||
$oSubmitter = new User($this->iSubmitterId);
|
||||
@@ -485,7 +485,7 @@ class Version {
|
||||
break;
|
||||
case "edit":
|
||||
$sSubject = "'".$oApp->sName." ".$this->sName."' has been modified by ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
addmsg("Version modified.", "green");
|
||||
break;
|
||||
case "delete":
|
||||
@@ -502,7 +502,7 @@ class Version {
|
||||
break;
|
||||
case "reject":
|
||||
$sSubject = "Version '".$this->sName."' of '".$oApp->sName."' has been rejected by ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&versionId=".$this->iVersionId."\n";
|
||||
$sMsg .= APPDB_ROOT."appsubmit.php?sAppType=application&sSub=view&iVersionId=".$this->iVersionId."\n";
|
||||
|
||||
// if replyText is set we should report the reason the version was rejected
|
||||
if($aClean['replyText'])
|
||||
@@ -529,7 +529,7 @@ class Version {
|
||||
echo html_frame_start("Version Form", "90%", "", 0);
|
||||
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
|
||||
|
||||
echo '<input type="hidden" name="versionId" value='.$this->iVersionId.' />';
|
||||
echo '<input type="hidden" name="iVersionId" value='.$this->iVersionId.' />';
|
||||
|
||||
if($editParentApplication)
|
||||
{
|
||||
@@ -537,20 +537,20 @@ class Version {
|
||||
$x = new TableVE("view");
|
||||
echo '<tr valign=top><td class=color0><b>Application</b></td>', "\n";
|
||||
echo '<td>',"\n";
|
||||
$x->make_option_list("appId",$this->iAppId,"appFamily","appId","appName");
|
||||
$x->make_option_list("iAppId",$this->iAppId,"appFamily","appId","appName");
|
||||
echo '</td></tr>',"\n";
|
||||
} else
|
||||
{
|
||||
echo '<input type="hidden" name="appId" value='.$this->iAppId.' />';
|
||||
echo '<input type="hidden" name="iAppId" value='.$this->iAppId.' />';
|
||||
}
|
||||
|
||||
// version name
|
||||
echo '<tr valign=top><td class="color0"><b>Version name</b></td>',"\n";
|
||||
echo '<td><input size="20" type="text" name="versionName" value="'.$this->sName.'"></td></tr>',"\n";
|
||||
echo '<td><input size="20" type="text" name="sVersionName" value="'.$this->sName.'"></td></tr>',"\n";
|
||||
|
||||
// version description
|
||||
echo '<tr valign=top><td class=color0><b>Version description</b></td>',"\n";
|
||||
echo '<td><p><textarea cols="80" rows="20" id="version_editor" name="versionDescription">',"\n";
|
||||
echo '<td><p><textarea cols="80" rows="20" id="version_editor" name="shVersionDescription">',"\n";
|
||||
|
||||
echo $this->sDescription.'</textarea></p></td></tr>',"\n";
|
||||
|
||||
@@ -563,17 +563,17 @@ class Version {
|
||||
echo html_frame_start("Info", "90%", "", 0);
|
||||
echo "<table border=0 cellpadding=2 cellspacing=0>\n";
|
||||
echo '<tr><td class="color4">Rating</td><td class="color0">',"\n";
|
||||
make_maintainer_rating_list("maintainer_rating", $this->sTestedRating);
|
||||
make_maintainer_rating_list("sMaintainerRating", $this->sTestedRating);
|
||||
echo '</td></tr>',"\n";
|
||||
echo '<tr><td class=color1>Release</td><td class=color0>',"\n";
|
||||
make_bugzilla_version_list("maintainer_release", $this->sTestedRelease);
|
||||
make_bugzilla_version_list("sMaintainerRelease", $this->sTestedRelease);
|
||||
echo '</td></tr>',"\n";
|
||||
echo html_table_end();
|
||||
echo html_frame_end();
|
||||
} else
|
||||
{
|
||||
echo '<input type="hidden" name="maintainer_rating" value='.$this->sTestedRating.' />';
|
||||
echo '<input type="hidden" name="maintainer_release" value='.$this->sTestedRelease.' />';
|
||||
echo '<input type="hidden" name="sMaintainerRating" value='.$this->sTestedRating.' />';
|
||||
echo '<input type="hidden" name="sMaintainerRelease" value='.$this->sTestedRelease.' />';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,15 +581,15 @@ class Version {
|
||||
{
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['versionName'] = makeSafe($_REQUEST['versionName']);
|
||||
$aClean['versionDescription'] = makeSafe($_REQUEST['versionDescription']);
|
||||
$aClean['sVersionName'] = makeSafe($_REQUEST['sVersionName']);
|
||||
$aClean['shVersionDescription'] = makeSafe($_REQUEST['shVersionDescription']);
|
||||
|
||||
$errors = "";
|
||||
|
||||
if (empty($aClean['versionName']))
|
||||
if (empty($aClean['sVersionName']))
|
||||
$errors .= "<li>Please enter an application version.</li>\n";
|
||||
|
||||
if (empty($aClean['versionDescription']))
|
||||
if (empty($aClean['shVersionDescription']))
|
||||
$errors .= "<li>Please enter a version description.</li>\n";
|
||||
|
||||
return $errors;
|
||||
@@ -599,19 +599,19 @@ class Version {
|
||||
function GetOutputEditorValues()
|
||||
{
|
||||
$aClean = array(); //array of filtered user input
|
||||
$aClean['appId'] = makeSafe($_REQUEST['appId']);
|
||||
$aClean['versionId'] = makeSafe($_REQUEST['versionId']);
|
||||
$aClean['versionName'] = makeSafe($_REQUEST['versionName']);
|
||||
$aClean['versionDescription'] = makeSafe($_REQUEST['versionDescription']);
|
||||
$aClean['maintainer_rating'] = makeSafe($_REQUEST['maintainer_rating']);
|
||||
$aClean['maintainer_release'] = makeSafe($_REQUEST['maintainer_release']);
|
||||
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
|
||||
$aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']);
|
||||
$aClean['sVersionName'] = makeSafe($_REQUEST['sVersionName']);
|
||||
$aClean['shVersionDescription'] = makeSafe($_REQUEST['shVersionDescription']);
|
||||
$aClean['sMaintainerRating'] = makeSafe($_REQUEST['sMaintainerRating']);
|
||||
$aClean['sMaintainerRelease'] = makeSafe($_REQUEST['sMaintainerRelease']);
|
||||
|
||||
$this->iAppId = $aClean['appId'];
|
||||
$this->iVersionId = $aClean['versionId'];
|
||||
$this->sName = $aClean['versionName'];
|
||||
$this->sDescription = $aClean['versionDescription'];
|
||||
$this->sTestedRating = $aClean['maintainer_rating'];
|
||||
$this->sTestedRelease = $aClean['maintainer_release'];
|
||||
$this->iAppId = $aClean['iAppId'];
|
||||
$this->iVersionId = $aClean['iVersionId'];
|
||||
$this->sName = $aClean['sVersionName'];
|
||||
$this->sDescription = $aClean['shVersionDescription'];
|
||||
$this->sTestedRating = $aClean['sMaintainerRating'];
|
||||
$this->sTestedRelease = $aClean['sMaintainerRelease'];
|
||||
}
|
||||
|
||||
function display()
|
||||
@@ -713,37 +713,37 @@ class Version {
|
||||
/* of this app family? */
|
||||
if($_SESSION['current']->isSuperMaintainer($oApp->iAppId))
|
||||
{
|
||||
echo '<form method="post" name="message" action="maintainerdelete.php">';
|
||||
echo '<form method="post" name="sMessage" action="maintainerdelete.php">';
|
||||
echo '<input type="submit" value="Remove yourself as a super maintainer" class="button">';
|
||||
echo '<input type="hidden" name="superMaintainer" value="1">';
|
||||
echo "<input type=hidden name=\"appId\" value=\"".$oApp->iAppId."\">";
|
||||
echo "<input type=hidden name=\"versionId\" value=\"".$this->iVersionId."\">";
|
||||
echo '<input type="hidden" name="iSuperMaintainer" value="1">';
|
||||
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">";
|
||||
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
|
||||
echo "</form>";
|
||||
} else
|
||||
{
|
||||
/* are we already a maintainer? */
|
||||
if($_SESSION['current']->isMaintainer($this->iVersionId)) /* yep */
|
||||
{
|
||||
echo '<form method="post" name="message" action="maintainerdelete.php">';
|
||||
echo '<form method="post" name="sMessage" action="maintainerdelete.php">';
|
||||
echo '<input type="submit" value="Remove yourself as a maintainer" class=button>';
|
||||
echo '<input type="hidden" name="superMaintainer" value="0">';
|
||||
echo "<input type=hidden name=\"appId\" value=\"".$oApp->iAppId."\">";
|
||||
echo "<input type=hidden name=\"versionId\" value=\"".$this->iVersionId."\">";
|
||||
echo '<input type="hidden" name="iSuperMaintainer" value="0">';
|
||||
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">";
|
||||
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
|
||||
echo "</form>";
|
||||
} else /* nope */
|
||||
{
|
||||
echo '<form method="post" name="message" action="maintainersubmit.php">';
|
||||
echo '<form method="post" name="sMessage" action="maintainersubmit.php">';
|
||||
echo '<input type="submit" value="Be a maintainer for this app" class="button" title="Click here to know more about maintainers.">';
|
||||
echo "<input type=hidden name=\"appId\" value=\"".$oApp->iAppId."\">";
|
||||
echo "<input type=hidden name=\"versionId\" value=\"".$this->iVersionId."\">";
|
||||
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">";
|
||||
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">";
|
||||
echo "</form>";
|
||||
$oMonitor = new Monitor();
|
||||
$oMonitor->find($_SESSION['current']->iUserId,
|
||||
$oApp->iAppId,$this->iVersionId);
|
||||
if(!$oMonitor->iMonitorId)
|
||||
{
|
||||
echo '<form method=post name=message action=appview.php?versionId='.$this->iVersionId.'&appId='.$oApp->iAppId.'>';
|
||||
echo '<input type=hidden name="sub" value="StartMonitoring" />';
|
||||
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'&iAppId='.$oApp->iAppId.'>';
|
||||
echo '<input type=hidden name="sSub" value="StartMonitoring" />';
|
||||
echo '<input type=submit value="Monitor Version" class="button" />';
|
||||
echo "</form>";
|
||||
}
|
||||
@@ -752,8 +752,8 @@ class Version {
|
||||
|
||||
} else
|
||||
{
|
||||
echo '<form method="post" name="message" action="account.php">';
|
||||
echo '<input type="hidden" name="cmd" value="login">';
|
||||
echo '<form method="post" name="sMessage" action="account.php">';
|
||||
echo '<input type="hidden" name="sCmd" value="login">';
|
||||
echo '<input type=submit value="Log in to become an app maintainer" class="button">';
|
||||
echo '</form>';
|
||||
}
|
||||
@@ -763,13 +763,13 @@ class Version {
|
||||
if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($this->iVersionId) || $_SESSION['current']->isSuperMaintainer($this->iAppId))
|
||||
{
|
||||
echo '<tr><td colspan="2" align="center">';
|
||||
echo '<form method="post" name="message" action="admin/editAppVersion.php">';
|
||||
echo '<input type="hidden" name="appId" value="'.$oApp->iAppId.'" />';
|
||||
echo '<input type="hidden" name="versionId" value="'.$this->iVersionId.'" />';
|
||||
echo '<form method="post" name="sMessage" action="admin/editAppVersion.php">';
|
||||
echo '<input type="hidden" name="iAppId" value="'.$oApp->iAppId.'" />';
|
||||
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" />';
|
||||
echo '<input type=submit value="Edit Version" class="button" />';
|
||||
echo '</form>';
|
||||
$url = BASE."admin/deleteAny.php?what=appVersion&appId=".$oApp->iAppId."&versionId=".$this->iVersionId."&confirmed=yes";
|
||||
echo "<form method=\"post\" name=\"delete\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\">";
|
||||
$url = BASE."admin/deleteAny.php?sWhat=appVersion&iAppId=".$oApp->iAppId."&iVersionId=".$this->iVersionId."&sConfirmed=yes";
|
||||
echo "<form method=\"post\" name=\"sDelete\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\">";
|
||||
echo '<input type=submit value="Delete Version" class="button" />';
|
||||
echo '</form>';
|
||||
echo '<form method="post" name="message" action="admin/addAppNote.php">';
|
||||
@@ -792,8 +792,8 @@ class Version {
|
||||
{
|
||||
echo '<tr><td colspan="2" align="center">';
|
||||
echo '</form>';
|
||||
echo '<form method=post name=message action=appview.php?versionId='.$this->iVersionId.'>';
|
||||
echo '<input type=hidden name="sub" value="StopMonitoring" />';
|
||||
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'>';
|
||||
echo '<input type=hidden name="sSub" value="StopMonitoring" />';
|
||||
echo '<input type=submit value="Stop Monitoring Version" class="button" />';
|
||||
echo '</form>';
|
||||
echo "</td></tr>";
|
||||
@@ -811,10 +811,10 @@ class Version {
|
||||
{
|
||||
$oTest->ShowVersionsTestingTable($this->iVersionId,
|
||||
$iCurrentTest,
|
||||
$_SERVER['PHP_SELF']."?versionId=".$this->iVersionId."&iTestingId=",
|
||||
$_SERVER['PHP_SELF']."?iVersionId=".$this->iVersionId."&iTestingId=",
|
||||
5);
|
||||
}
|
||||
echo '<form method=post name=message action=testResults.php?sub=view&iVersionId='.$this->iVersionId.'>';
|
||||
echo '<form method=post name=sMessage action=testResults.php?sSub=view&iVersionId='.$this->iVersionId.'>';
|
||||
echo '<input type=submit value="Add Testing Data" class="button" />';
|
||||
echo '</form>';
|
||||
|
||||
@@ -885,7 +885,7 @@ class Version {
|
||||
echo " <td>".$sVendor."</td>\n";
|
||||
echo " <td>".$oApp->sName."</td>\n";
|
||||
echo " <td>".$oVersion->sName."</td>\n";
|
||||
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?apptype=version&sub=view&versionId=".$oVersion->iVersionId.">process</a>]</td>\n";
|
||||
echo " <td align=\"center\">[<a href=".$_SERVER['PHP_SELF']."?sAppType=version&sSub=view&iVersionId=".$oVersion->iVersionId.">process</a>]</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
$c++;
|
||||
}
|
||||
@@ -920,7 +920,7 @@ class Version {
|
||||
|
||||
//display row
|
||||
echo "<tr class=$bgcolor>\n";
|
||||
echo " <td><a href=\"".BASE."appview.php?versionId=".$iVersionId."\">".$oVersion->sName."</a></td>\n";
|
||||
echo " <td><a href=\"".BASE."appview.php?iVersionId=".$iVersionId."\">".$oVersion->sName."</a></td>\n";
|
||||
echo " <td>".util_trim_description($oVersion->sDescription)."</td>\n";
|
||||
echo " <td align=center>".$oVersion->sTestedRating."</td>\n";
|
||||
echo " <td align=center>".$oVersion->sTestedRelease."</td>\n";
|
||||
|
||||
@@ -116,7 +116,7 @@ function vote_menu()
|
||||
{
|
||||
|
||||
$aClean = array(); //array of filtered user input
|
||||
$aClean['appId'] = makeSafe($_REQUEST['appId']);
|
||||
$aClean['iAppId'] = makeSafe($_REQUEST['iAppId']);
|
||||
|
||||
$m = new htmlmenu("Votes","updatevote.php");
|
||||
|
||||
@@ -127,22 +127,22 @@ function vote_menu()
|
||||
if(isset($votes[$i]))
|
||||
{
|
||||
$sAppName = Application::lookup_name($votes[$i]->appId);
|
||||
$str = "<a href='appview.php?appId=".$votes[$i]->appId."'> $sAppName</a>";
|
||||
$str = "<a href='appview.php?iAppId=".$votes[$i]->appId."'> $sAppName</a>";
|
||||
$m->add("<input type=radio name=slot value='$i'> ".$str);
|
||||
}
|
||||
else
|
||||
$m->add("<input type=radio name=slot value='$i'> No App Selected");
|
||||
$m->add("<input type=radio name=iSlot value='$i'> No App Selected");
|
||||
}
|
||||
|
||||
$m->addmisc(" ");
|
||||
|
||||
$m->add("<input type=submit name=clear value=' Clear Vote ' class=votebutton>");
|
||||
$m->add("<input type=submit name=vote value='Vote for App' class=votebutton>");
|
||||
$m->add("<input type=submit name=sClear value=' Clear Vote ' class=votebutton>");
|
||||
$m->add("<input type=submit name=sVote value='Vote for App' class=votebutton>");
|
||||
|
||||
$m->addmisc("<input type=hidden name=appId value={$aClean['appId']}>");
|
||||
$m->addmisc("<input type=hidden name=iAppId value={$aClean['iAppId']}>");
|
||||
|
||||
$m->add("View Results", BASE."votestats.php");
|
||||
$m->add("Voting Help", BASE."help/?topic=voting");
|
||||
$m->add("Voting Help", BASE."help/?sTopic=voting");
|
||||
|
||||
$m->done(1);
|
||||
}
|
||||
@@ -156,32 +156,32 @@ function vote_update($vars)
|
||||
return;
|
||||
}
|
||||
|
||||
if( !is_numeric($vars['appId']) OR !is_numeric($vars['slot']))
|
||||
if( !is_numeric($vars['iAppId']) OR !is_numeric($vars['iSlot']))
|
||||
{
|
||||
if(is_numeric($vars['appId']))
|
||||
redirect(apidb_fullurl("appview.php?appId=".$vars["appId"]));
|
||||
if(is_numeric($vars['iAppId']))
|
||||
redirect(apidb_fullurl("appview.php?iAppId=".$vars["iAppId"]));
|
||||
else
|
||||
redirect(apidb_fullurl("index.php"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if($vars["vote"])
|
||||
if($vars["sVote"])
|
||||
{
|
||||
addmsg("Registered vote for App #".$vars["appId"], "green");
|
||||
vote_add($vars["appId"], $vars["slot"]);
|
||||
} else if($vars["clear"])
|
||||
addmsg("Registered vote for App #".$vars["iAppId"], "green");
|
||||
vote_add($vars["iAppId"], $vars["slot"]);
|
||||
} else if($vars["sClear"])
|
||||
{
|
||||
/* see if we have a vote in this slot, if we don't there is */
|
||||
/* little reason to remove it or even mention that we did anything */
|
||||
if(is_vote_in_slot($vars["slot"]))
|
||||
{
|
||||
vote_remove($vars["slot"]);
|
||||
addmsg("Removed vote for App #".$vars["appId"], "green");
|
||||
addmsg("Removed vote for App #".$vars["iAppId"], "green");
|
||||
}
|
||||
}
|
||||
|
||||
redirect(apidb_fullurl("appview.php?appId=".$vars["appId"]));
|
||||
redirect(apidb_fullurl("appview.php?iAppId=".$vars["iAppId"]));
|
||||
}
|
||||
|
||||
// tell us if there is a vote in a given slot so we don't
|
||||
|
||||
Reference in New Issue
Block a user