daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Jun 18th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /////// PRODUCT DATABASE /////////
  2. if ($_GET['p'] == "pdb") {
  3.     MySQLConnect();
  4.     MySQLSelDB("reeciebo_siteroot");
  5.    
  6.     $query = mysql_query($SQL_PDB_Gather);
  7.     $numRows = mysql_num_rows($query);
  8.    
  9.     for ($i=0; $i < $numRows; $i++) { // Storing Data from `prod_priv_gather` in $GATHER[$i]['arg']
  10.         $prodname = mysql_result($query, $i, "prodname"); $prodcost = mysql_result($query, $i, "prodcost");
  11.         $prodlink = mysql_result($query, $i, "prodlink"); $proddesc = mysql_result($query, $i, "proddesc");
  12.         $GATHER = array($i => array("prodname" => $prodname, "prodcost" => $prodcost, "prodlink" => $prodlink, "proddesc" => $proddesc));  
  13.     }
  14.  
  15.     $query = mysql_query($SQL_PDB_Leveling);
  16.     $numRows = mysql_num_rows($query);
  17.  
  18.     for ($i=0; $i < $numRows; $i++) { // Storing Data from `prod_priv_leveling` in $LEVELING[$i]['arg']
  19.         $prodname = mysql_result($query, $i, "prodname"); $prodcost = mysql_result($query, $i, "prodcost");
  20.         $prodlink = mysql_result($query, $i, "prodlink"); $proddesc = mysql_result($query, $i, "proddesc");
  21.         $LEVELING = array($i => array("prodname" => $prodname, "prodcost" => $prodcost, "prodlink" => $prodlink, "proddesc" => $proddesc));
  22.     }
  23.  
  24.     $query = mysql_query($SQL_PDB_PVP);
  25.     $numRows = mysql_num_rows($query);
  26.  
  27.     for ($i=0; $i < $numRows; $i++) { // Storing Data from `prod_priv_leveling` in $PVP[$i]['arg']
  28.         $prodname = mysql_result($query, $i, "prodname"); $prodcost = mysql_result($query, $i, "prodcost");
  29.         $prodlink = mysql_result($query, $i, "prodlink"); $proddesc = mysql_result($query, $i, "proddesc");
  30.         $PVP = array($i => array("prodname" => $prodname, "prodcost" => $prodcost, "prodlink" => $prodlink, "proddesc" => $proddesc)); 
  31.     }
  32.    
  33.     $query = mysql_query($SQL_PDB_Packs);
  34.     $numRows = mysql_num_rows($query);
  35.  
  36.     for ($i=0; $i < $numRows; $i++) { // Storing Data from `prod_priv_leveling` in $PACKS[$i]['arg']
  37.         $prodname = mysql_result($query, $i, "prodname"); $prodcost = mysql_result($query, $i, "prodcost");
  38.         $prodlink = mysql_result($query, $i, "prodlink"); $proddesc = mysql_result($query, $i, "proddesc");
  39.         $PACKS = array($i => array("prodname" => $prodname, "prodcost" => $prodcost, "prodlink" => $prodlink, "proddesc" => $proddesc));   
  40.     }
  41.    
  42.     // Start Organising the tables.
  43.     /// Gathering Table
  44.  
  45.     $temp = "<tr><td>&nbsp;</td><td>";
  46.     $i = 0;
  47.     $x = 1;
  48.     while ($GATHER[$i]) {
  49.         $temp = $temp.$x.". ".$GATHER[$i]['prodname']."<br/>";
  50.         $i++;
  51.         $x++;
  52.     }
  53.     $temp = $temp."</td></tr>";
  54.     $table1 = Table_Create("PRODUCT JUMP", $temp);
  55.     $pageContents = print_r($GATHER);
  56.  
  57. }
  58.  
  59.  
  60. //////////////////////////////////
  61. // FUNCTIONS /////////////////////
  62. //////////////////////////////////
  63.  
  64. function MySQLConnect() {
  65.     $host = "localhost";
  66.     $user = "removed";
  67.     $pass = "removed";
  68.       $conn = mysql_connect($host, $user, $pass) or die(mysql_error());
  69. }
  70. function MySQLSelDB($db) {
  71.     $seldb = mysql_select_db($db) or die(mysql_error());
  72. }
  73. function Table_Create($pageHeader, $pageBlob) {
  74.         return "<table width='95%' border='0' cellspacing='0' cellpadding='0'><tr><td colspan='2' align='center' height='22' bgcolor='#89BAD8'><span class='headertext'>".$pageHeader."</span></td></tr>".$pageBlob."</table>";
  75.  
  76. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top