0) { // They attached a file too $newfile = tempnam("uploads", "pay"); move_uploaded_file($_FILES['payfile']['tmp_name'], $newfile); $query .= ", payfile='".addslashes($newfile)."' "; $query .= ", paytype='".addslashes($_FILES['payfile']['type'])."' "; } echo "Thanks!
\n"; echo "The Oracle thanks you for your payment of:
"; echo $payments[$pay['pay']]; echo ".
\n"; echo "
\n"; echo "Hail Eris, All Hail Discordia, Fnord!
\n"; $query .= " where id={$pay['id']}"; $res = db_query($query); db_free($res); }else // We have been asked a question. if (!empty($question)) { // Load the important files $cards = load_deck("disco"); $cardmax = count($cards); $payments = load_payment("payments"); //echo "Question is: $question.
\n"; $seed=make_seed($question); srand($seed); //echo "Random seed is $seed
\n"; $card1 = rand(1,$cardmax); do { $card2 = rand(1,$cardmax); } while ($card2 == $card1); do { $card3 = rand(1,$cardmax); } while ($card3 == $card2 || $card3 == $card1); $pay = rand(1,count($payments)); // Render the cards echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "Your Question:\n"; echo "
\n"; echo $question; echo "
 
\n"; echo "Thus Spake the Oracle...\n"; echo "
The PastThe PresentThe Future
\"{$cards[$card1]['name']}\"\"{$cards[$card2]['name']}\"\"{$cards[$card3]['name']}\"
\n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; echo "
\n"; echo "But what does this all mean ?\n"; echo "
The Past:{$cards[$card1]['name']}{$cards[$card1]['mean']}
The Present:{$cards[$card2]['name']}{$cards[$card2]['mean']}
The Future:{$cards[$card3]['name']}{$cards[$card3]['mean']}
\n"; echo "
\n"; $res = db_query("insert into reading (card1, card2, card3, pay, event, quest) values('$card1', '$card2', '$card3', '$pay', NOW(), '".addslashes($question)."')"); db_free($res); $payid = db_insert_id(); echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "
\n"; echo "You owe the oracle...\n"; echo "
\n"; echo "
"; echo $payments[$pay]; echo "
 \n"; echo "
 
\n"; echo "Please Insert Payment Here:
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
or attach it here... "; echo "\n"; echo "(Max 200K)\n"; echo "
\n"; echo "\n"; echo "
\n"; echo "
\n"; } // Print the 'ask a question' form echo "
\n"; ?>