Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Attachment / Rubis / Emulab-Rubis.Patch

Emulab-Rubis.Patch

HTML icon — HTML, 3 KB (3874 bytes)

File contents

diff -uNrp RUBiS/PHP/PHPprinter.php RUBiS-emulab/PHP/PHPprinter.php
--- RUBiS/PHP/PHPprinter.php	2002-01-22 20:28:50.000000000 -0700
+++ RUBiS-emulab/PHP/PHPprinter.php	2010-11-24 17:27:31.000000000 -0700
@@ -2,7 +2,7 @@
  
 function getDatabaseLink(&$link)
 {
-  $link = mysql_pconnect("localhost", "cecchet", "") or die ("ERROR: Could not connect to database");
+  $link = mysql_pconnect("localhost", "utos", "") or die ("ERROR: Could not connect to database");
   mysql_select_db("rubis", $link) or die("ERROR: Couldn't select RUBiS database");
 }
 
diff -uNrp RUBiS/PHP/RegisterItem.php RUBiS-emulab/PHP/RegisterItem.php
--- RUBiS/PHP/RegisterItem.php	2002-01-22 20:28:50.000000000 -0700
+++ RUBiS-emulab/PHP/RegisterItem.php	2010-11-25 00:49:36.000000000 -0700
@@ -61,17 +61,18 @@
       }
     }
 
-    $reservePrice = $HTTP_POST_VARS['reservePrice'];
-    if ($reservePrice == null)
+    $buyNow = $HTTP_POST_VARS['buyNow'];
+    if ($buyNow == null)
     {
-      $reservePrice = $HTTP_GET_VARS['reservePrice'];
-      if ($reservePrice == null)
+      $buyNow = $HTTP_GET_VARS['buyNow'];
+      if ($buyNow == null)
       {
          printError($scriptName, $startTime, "RegisterItem", "<h3>You must provide a Buy Now price !<br></h3>");
          exit();
       }
     }
 
+    $duration = $HTTP_POST_VARS['duration'];
     if ($duration == null)
     {
       $duration = $HTTP_GET_VARS['duration'];
@@ -82,11 +83,11 @@
       }
     }
 
-    $qty = $HTTP_POST_VARS['quantity'];
-    if ($qty == null)
+    $quantity = $HTTP_POST_VARS['quantity'];
+    if ($quantity == null)
     {
-      $qty = $HTTP_GET_VARS['quantity'];
-      if ($qty == null)
+      $quantity = $HTTP_GET_VARS['quantity'];
+      if ($quantity == null)
       {
          printError($scriptName, $startTime, "RegisterItem", "<h3>You must provide a quantity !<br></h3>");
          exit();
@@ -119,7 +120,7 @@
     print("<TR><TD>Initial price<TD>$initialPrice\n");
     print("<TR><TD>ReservePrice<TD>$reservePrice\n");
     print("<TR><TD>Buy Now<TD>$buyNow\n");
-    print("<TR><TD>Quantity<TD>$qty\n");
+    print("<TR><TD>Quantity<TD>$quantity\n");
     print("<TR><TD>Duration<TD>$duration\n"); 
     print("</TABLE>\n");
     print("<br><b>The following information has been automatically generated by RUBiS:</b><br>\n");
diff -uNrp RUBiS/PHP/RegisterUser.php RUBiS-emulab/PHP/RegisterUser.php
--- RUBiS/PHP/RegisterUser.php	2002-01-22 20:28:50.000000000 -0700
+++ RUBiS-emulab/PHP/RegisterUser.php	2010-11-25 01:05:21.000000000 -0700
@@ -79,7 +79,7 @@
     $regionResult = mysql_query("SELECT * FROM regions WHERE name=\"$region\"", $link) or die("ERROR: Region query failed");
     if (mysql_num_rows($regionResult) == 0)
     {
-      printError($scriptName, $startTime, "Register user", "Region $region does not exist in the database!<br>\n");
+      printError($scriptName, $startTime, "Register user", "Region $region does not exist in the database!<br>Do you speficy in this format: state--city, for exaple: CA--Los Angeles.\n");
       mysql_free_result($regionResult);
       commit($link);
       exit();
diff -uNrp RUBiS/PHP/sellItemForm.html RUBiS-emulab/PHP/sellItemForm.html
--- RUBiS/PHP/sellItemForm.html	2002-01-22 20:28:51.000000000 -0700
+++ RUBiS-emulab/PHP/sellItemForm.html	2010-11-25 00:36:18.000000000 -0700
@@ -42,9 +42,12 @@ Auction duration:
   <option label="3 days" value="3">3 days</option>
   <option label="4 days" value="4">4 days</option>
   <option label="5 days" value="5">5 days</option>
-  <option label="6 days" value="6">6 dion>
   <option label="6 days" value="6">6 days</option>
   <option label="7 days" value="7">7 days</option>
+  <option label="30 days" value="30">30 days</option>
+  <option label="180 days" value="180">180 days</option>
+  <option label="365 days" value="365">365 days</option>
+
 </select>
 </table></center>
 <br>