include("config.inc"); //db connection and directory variables
//customize individual pages by changing these values
$pagebackground = "#ffffff"; //page background color
$pagetext = "#000000"; //page text color
$imageborder = "0"; // card border width. this must be set to a number larger than 0 for the images to have a border
//$imagebordercolor = "#00FF00"; //set specific border color. will not work in old browsers
$linkcolor = "blue";//set link color
$vlinkcolor = "#0000FF"; //set visited link color
$headcolor = "blue"; //use this to set the color of headers
$imagewidth = "73";
$imageheight = "120";
$font = "Verdana"; //use this to set the page's font
$fontsize = "2"; //use this to set the page's font size
//the variables below define the page's wording. use these to edit headers and header text
$pagetitle = "Your Planetary Spread"; // page title
$title = "Your Planetary Spread"; // header title
$readlink = "Get Another Reading";
$disclaimlink = "Disclaimer";
$interplink = "Interpretation Basics";
$printlink = "Version to Print";
$titleblurb = "Scroll down for your interpretation. Click on individual cards to see a larger representation."; //blurb under page header
$you = "Your Self Overall";
$moon = "Matters Concerning Your Home (The Moon Card)";
$mercury = "Matters Concerning Business, Skills and Integrity (The Card of Mercury)";
$venus = "Matters Concerning Love (The Card of Venus)";
$mars = "Matters Concerning Hostility, Opposition and Aggression (The Card of Mars)";
$jupitor = "Matters of Finance, Acquisition and Wealth (The Card of Jupiter)";
$saturn = "Matters of the Intellect (The Card of Saturn)";
$outcome = "The Outcome";
$con= @mysql_connect("$host","$user","$pass");
if(!$con)
{
$connect_error = "Failed at mysql_connect. ";
echo"error at db connect";
exit();
}
srand((double)microtime()*1000000);
$maxnumber = 7;
$count= 0;
$index = 0;
$cardcount = 0;
$cardindex = 0;
$cards[0];
$thecards[0][0];
while($count <= $maxnumber)
{
$number = rand(0,78);
for($index; $index <= $maxnumber; $index++)
{
if($cards[$index] == $number)
{
$number = rand(0,78);
$index = -1;
}
}
$cards[$count] = $number;
$randnum = rand(0,78);
if($count != 0)
{
if(($randnum % 2) != 0)
{
$cards[$count] = $cards[$count]."r";
}
}
$query = "SELECT * FROM $table WHERE (card = '$cards[$count]')";
$result = @mysql_db_query($db, $query);
$r = mysql_fetch_array($result);
if(!$result)
{
$query_error = "Failed at the mysql_db_query.";
echo"$query_error";
exit();
}
else
{
$indice = 0;
$thecards[$count][$indice] = $r["title"];
$test2 = $r["card"];
//echo"$test2 <-------no array value test <--->cards count --> $cards[$count]
";
$test = $thecards[$count][$indice];
//echo"$test <-------test
";
$indice++;
$thecards[$count][$indice] = $r["description"];
$indice++;
$thecards[$count][$indice] = $r["thumb"];
$indice++;
$thecards[$count][$indice] = $r["limage"];
}
// $cards[$count] = $number;
// echo"$cards[$count]<---CARD $count <---COUNT
";
$count++;
$index = 0;
}
$count = 0;
$index = 0;
$printcards = implode (":", $cards);
?>