diff --git a/account.php b/account.php
index 4f46342..6f0ba9a 100644
--- a/account.php
+++ b/account.php
@@ -184,7 +184,7 @@ function cmd_do_login()
if($result == null)
{
$current = $user;
- addmsg("You are successfully logged in.", "green");
+ addmsg("You are successfully logged in as '$user->username'.", "green");
redirect(apidb_fullurl("index.php"));
}
else
diff --git a/admin/adminAppQueue.php b/admin/adminAppQueue.php
index bdefe4d..94a32bf 100644
--- a/admin/adminAppQueue.php
+++ b/admin/adminAppQueue.php
@@ -84,13 +84,41 @@ if ($sub)
//version
echo '
App Version
',"\n";
- //vendor
- echo '
App Vendor
',"\n";
+ //vendor/alt vendor fields
+ // try for an exact match
+ $query = "select * from vendor where vendorname = '$ob->queueVendor';";
+ $result = mysql_query($query);
+ if(!$result)
+ {
+ // try for a partial match
+ $query = "select * from vendor where vendorname like '%$ob->queueVendor%';";
+ $result = mysql_query($query);
+ }
+
+ // Use the first match if we found one and clear out the vendor field,
+ // otherwise don't pick a vendor
+ if($result)
+ {
+ $ob->queueVendor = '';
+
+ //vendor field
+ echo '
\n";
}
- if ( empty( $fields['queueVendor']) )
+ // No vendor entered, and nothing in the list is selected
+ if ( empty( $fields['queueVendor']) and $fields['altvendor'] == '0' )
{
$errors .= "
Please enter a vendor.
\n";
}
@@ -51,12 +52,11 @@ function checkInput( $fields )
include("path.php");
require(BASE."include/"."incl.php");
+require(BASE."include/"."tableve.php");
global $current;
if ($_REQUEST['queueName'])
{
- // add to queue
-
// Check input and exit if we found errors
$errors = checkInput($_REQUEST);
if( !empty($errors) )
@@ -64,10 +64,25 @@ if ($_REQUEST['queueName'])
errorpage("We found the following errors:","
$errors
Please go back and correct them.");
exit;
}
+
+ /* if the user picked the vendor we need to retrieve the vendor name */
+ /* and store it into the $queueVendor */
+ if($_REQUEST['altvendor'])
+ {
+ /* retrieve the actual name here */
+ $query = "select * from vendor where vendorId = '$altvendor';";
+ $result = mysql_query($query);
+ if($result)
+ {
+ $ob = mysql_fetch_object($result);
+ $_REQUEST['queueVendor'] = $ob->vendorName;
+ }
+ }
// header
apidb_header("Submit Application");
-
+
+ // add to queue
$query = "INSERT INTO appQueue VALUES (null, '".
addslashes($_REQUEST['queueName'])."', '".
addslashes($_REQUEST['queueVersion'])."', '".
@@ -88,7 +103,6 @@ if ($_REQUEST['queueName'])
echo "
Your application has been submitted for Review. You should hear back\n";
echo "soon about the status of your submission