";
+ echo "request id is {$response['requestid']}";
+ $_SESSION['requestid'] = $response['requestid'];
+ echo "";
+ echo "Go to the Current Reservations page to view the status of your reservation.";
+ }
+ else {
+ echo "
Sorry, the Image could not be requested. Please try again later or contact your VCL Administrator for assistance.
";
+ }
+echo "";
+
+
+mysql_close();
+?>
+
+
+
+
diff -Naur cbvcl/broker/queryBrokerView.php vcl/broker/queryBrokerView.php
--- cbvcl/broker/queryBrokerView.php 1969-12-31 19:00:00.000000000 -0500
+++ vcl/broker/queryBrokerView.php 2012-07-20 02:04:44.000000000 -0400
@@ -0,0 +1,246 @@
+
+
+
+
+
+
+'on' and $compliance<>'on') {
+ $query = "select image.id, image.prettyname, platform.name as platformname, OS.prettyname as OSname, OS.type as OSType, image_security.Data_Encryption, image_security.Data_Location, image_security.Data_Deletion,image_security.VM_separation, image_security.User_Authentication from image,platform,OS,image_security where (image.OSid=OS.id and image.platformid=platform.id and image_security.imageID=image.id and OS.type='$OSType' and platform.name='$platform' and image.prettyname like '%$application%')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+
+ if ($num==0) {
+ echo "
No images match application \"$application\". Relaxing application constraint. Requerying ...
";
+ $query = "select image.id, image.prettyname, platform.name as platformname, OS.prettyname as OSname, OS.type as OSType, image_security.Data_Encryption, image_security.Data_Location, image_security.Data_Deletion,image_security.VM_separation, image_security.User_Authentication from image,platform,OS,image_security where (image.OSid=OS.id and image.platformid=platform.id and image_security.imageID=image.id and OS.type='$OSType' and platform.name='$platform')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match platform $platform. Relaxing Platform constraint. Requerying ...
";
+ $query = "select image.id, image.prettyname, platform.name as platformname, OS.prettyname as OSname, OS.type as OSType, image_security.Data_Encryption, image_security.Data_Location, image_security.Data_Deletion,image_security.VM_separation, image_security.User_Authentication from image,platform,OS,image_security where (image.OSid=OS.id and image.platformid=platform.id and image_security.imageID=image.id and OS.type='$OSType')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match your selection. Contact the VCL administrator to create the image.
";
+}}}}
+
+##
+## only security constraints included in search.
+##
+elseif ($security=='on' and $compliance<>'on') {
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and VM_separation='$VMseparation' and User_Authentication='$authentication' and Service_Interface='$interface')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+
+ if ($num==0) {
+ echo "
No images match service interface \"$interface\". Relaxing Service Interface constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and User_Authentication='$authentication' and VM_separation='$VMseparation' )";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match Virtual Machine separation \"$VMseparation\". Relaxing VM Separation constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data deletion \"$datadeletion\". Relaxing Data Deletion constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data Location \"$Location\". Relaxing Data Location constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data Encryption \"$Encryption\". Relaxing Data Encryption constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data User Authentication \"$authentication\". Relaxing User Authentication constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data application \"$application\". Relaxing application constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match platform $platform. Relaxing Platform constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) { echo "
No images match your selection. Contact the VCL administrator to create the image.
"; }
+}} } } } } } }}
+
+##
+## only compliance constraints includes in search.
+##
+
+elseif ($security<>'on' and $compliance=='on') {
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and TIC_Connection ='$TIC' and CC_EAL='$EAL')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data CC Evaluation Assurance Level \"$EAL\". Relaxing CC Evaluation Assurance Level constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and TIC_Connection='$TIC')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data TIC \"$TIC\". Relaxing Trusted Internet Connection (TIC) constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' )";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data application \"$application\". Relaxing application constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match platform $platform. Relaxing Platform constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) { echo "
No images match your selection. Contact the VCL administrator to create the image.
"; }
+}} } } }
+
+##
+## ALL constraints includes in search.
+##
+
+else {
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and VM_separation='$VMseparation' and User_Authentication='$authentication' and Service_Interface='$interface' and TIC_Connection='$TIC' and CC_EAL='$EAL')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data CC Evaluation Assurance Level \"$EAL\". Relaxing CC Evaluation Assurance Level constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and VM_separation='$VMseparation' and User_Authentication='$authentication' and Service_Interface='$interface' and TIC_Connection='$TIC')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data TIC \"$TIC\". Relaxing Trusted Internet Connection (TIC) constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and VM_separation='$VMseparation' and User_Authentication='$authentication' and Service_Interface='$interface')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match service interface \"$interface\". Relaxing Service Interface constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and User_Authentication='$authentication' and VM_separation='$VMseparation' )";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match Virtual Machine separation \"$VMseparation\". Relaxing VM Separation constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and Data_Deletion='$datadeletion' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data deletion \"$datadeletion\". Relaxing Data Deletion constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and Data_Location='$Location' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data Location \"$Location\". Relaxing Data Location constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and Data_Encryption='$Encryption' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data Encryption \"$Encryption\". Relaxing Data Encryption constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%' and User_Authentication='$authentication')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data User Authentication \"$authentication\". Relaxing User Authentication constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform' and prettyname like '%$application%')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match data application \"$application\". Relaxing application constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType' and platformname='$platform')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) {
+ echo "
No images match platform $platform. Relaxing Platform constraint. Requerying ...
";
+ $query = "select id, prettyname, platformname, OSname, OSType, Data_Encryption, Data_Location, Data_Deletion,VM_separation, User_Authentication from VCLBrokerView where (OSType='$OSType')";
+ $result=mysql_query($query);
+ $num=mysql_numrows($result);
+ if ($num==0) { echo "
No images match your selection. Contact the VCL administrator to create the image.
"; }
+}}}}}}}}}}}
+
+echo "No of images discovered: " . $num;
+echo "