{source}
<!– You can place html anywhere within the source tags –>
<script language=”javascript” type=”text/javascript” src=”http://www.astrologer.gr/js/pz_chromeless_2_1.js”></script>
<script language=”javascript” type=”text/javascript”>
function openIT(num,map) {
if(num == “help”)
{
theURL=”interp.htm”;
}
else
{
theURL=’http://www.astrologer.gr/cards.html?num=” + num + “&map=” + map
}
wname =”CHROMELESSWIN”
W=340;
H=425;
windowCERRARa = “images/stories/madame_lenor/img/close_a.gif”
windowCERRARd = “images/stories/madame_lenor/img/close_d.gif”
windowCERRARo = “images/stories/madame_lenor/img/close_o.gif”
windowNONEgrf = “images/stories/madame_lenor/img/none.gif”
windowCLOCK = “images/stories/madame_lenor/img/clock.gif”
windowREALtit = ” The Card”
windowTIT = “<font face=<?echo”$font”;?> size=1 color=#FFFFFF> Madame Lenormand Fortune Teller</font>”
windowBORDERCOLOR = “<?echo”$color2″;?>”
windowBORDERCOLORsel = “<?echo”$color2″;?>”
windowTITBGCOLOR = “<?echo”$color2″;?>”
windowTITBGCOLORsel = “<?echo”$color2″;?>”
openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
<?php
// You can place PHP like this
$db = “dicha20_astrolog”; //set this to the name of your database
$host = “localhost”; //set this to the name of your host
$user = “dicha20_astrolog“; //set this to your db user name
$pass = “6658709123”; //set this to your db password
$connect = mysql_connect(“$host”, “$user”, “$pass”); //make db connection
mysql_query(“SET NAMES ‘utf-8′”, $connect);
mysql_query(“SET CHARACTER SET ‘utf-8′”, $connect);
$font = “Arial”;
$fontsize = “2”;
$fontsize2 = “1”;
$headersize = “3”;
$fontcolor = “#000000”;
$color2 = “#900000”;
$color3 = “#FF0000”;
$images = “images/stories/madame_lenor/”; //image directory
srand((double)microtime()*1000000);
$name = stripslashes($_POST[“name”]);
$f = stripslashes($_POST[“f”]);
$m = stripslashes($_POST[“m”]);
$gender = stripslashes($_POST[“gender”]);
?>
<div style= “width:450;”>
<a href=”madamlenormand.html”>Κάντε άλλο Διάβασμα</a>
<p align=”center”><font color=”<?echo”$color2″;?>” face=”<?echo”$font”;?>” size=”<?echo”$headersize”;?>”><b>
<?php
if($name != “”)
{
echo”To Γενικό Διάβασμα για τον/ην $name.”;
}
else
{
echo”To Γενικό Διάβασμα”;
}
?>
</b>
</b></font></p>
<p align=”justify”>
<font face=”<?echo”$font”;?>” size=”<?echo”$fontsize”;?>”>Οι ερμηνείες των καρτών έχουν άμεση σχέση με το πόσο κοντά είναι
στην προσωπική σας κάρτα (υπογραμμισμένη με κόκκινο. ).</font></p>
</div>
<div align=”center”>
<center>
<?php
$maxnumber = 35;
$count= 0;
$index = 0;
$cardcount = 0;
$cardindex = 0;
$cards[0];
$thecards[0][0];
while($count <= $maxnumber)
{
$number = rand(0,36);
for($index; $index <= $maxnumber; $index++)
{
if($cards[$index] == $number)
{
$number = rand(0,36);
$index = -1;
}
}
$cards[$count] = $number;
if($gender == “m” && $cards[$count] == 28)
{
$type = $count;
}
if($gender == “f” && $cards[$count] == 29)
{
$type = $count;
}
$count++;
$index = 0;
}
$count++;
$index = 0;
$pos = 0;
$neg = 0;
$query = “SELECT map FROM maps WHERE (num = ‘$type’)”;
$result = mysql_db_query($db, $query);
while($r = mysql_fetch_array($result))
{
$map= $r[“map”];
$map = explode(“:”,$map);
}
echo”<table border=0 cellpadding=0 width=375 bordercolor=$color2 style=\”border: 3 double $color2\”><tr> <td><table border=’0′ cellpadding=’6′ cellspacing=’2′ width=’600px’> <tr>”;
for($count=0;$count<=$maxnumber;$count++)
{
mysql_query(“SET NAMES ‘utf8′”);
mysql_query(“SET CHARACTER SET ‘utf8′”);
$query = “SELECT num,timage,cw,fw FROM fcards WHERE (num = ‘$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
{
$num = $r[“num”];
$cw = $r[“cw”];
$fw = $r[“fw”];
$thumb = $r[“timage”];
if($count==9 || $count==18 || $count==27)
{
echo”</tr><tr>”;
}
if($num == 28 && $gender == “m”)
{
echo”<td bgcolor=’#ec1010′><img src=\”$images$thumb\” border=\”1\”></td>”;
}
elseif($num == 29 && $gender == “f”)
{
echo”<td bgcolor=’#ec1010′><img src=\”$images$thumb\” border=\”1\”></td>”;
}
else
{
echo”<td><img src=\”$images$thumb\” border=\”0\”></A></td>”;
if($map[$count] > 3)
{
if($fw == 0)
{
$neg = $neg + 1;
}
else
{
$pos = $pos + 1;
}
}
else
{
if($cw == 0)
{
$neg = $neg + 1;
}
else
{
$pos = $pos + 1;
}
}
}
}
// Mycode
if($map <= 4)
{
$query = “SELECT card,cdescrip,timage FROM fcards WHERE (num = ‘$num’)”;
$result = mysql_db_query($db, $query);
while($r = mysql_fetch_array($result))
{
$card = $r[“card”];
$descrip = $r[“cdescrip”];
$image = $r[“timage”];
}
}
if($map > 4)
{
$query = “SELECT card,fdescrip,timage FROM fcards WHERE (num = ‘$num’)”;
$result = mysql_db_query($db, $query);
while($r = mysql_fetch_array($result))
{
$card = $r[“card”];
$descrip = $r[“fdescrip”];
$image = $r[“timage”];
}
}
$display .= “<tr><td width=55 align=center><img border=0 src=$images$image></td><td width=367 valign=top><font face=verdana color=red size=0>$card</font><font face=verdana color=black size=2 valign=top> $descrip</font><br><BR></td></tr>”;
//end of my code
}
$count = 0;
$index = 0;
if($neg > $pos)
{
$percent = $neg/35;
$flag = 0;
}
else
{
$percent = $pos/35;
$flag = 1;
}
$percent = sprintf(“%00.7f”, $percent);
$percent = substr(“$percent”,2,2);
if($percent == 50 && $neg > $pos)
{
$percent = 49;
}
if($percent == 50 && $neg < $pos)
{
$percent = 51;
}
if($neg > $pos) {
$weight = “<font color=’maroon’><b>Εχετε $neg ($percent %) αρνητικές κάρτες και $pos θετικές κάρτες στο διάβασμά σας.</b></font>”;
}
elseif($neg == $pos) {
$weight = “<font color=’maroon’><b>Έχετε $pos ($percent %) θετικές κάρτες και $neg αρνητικές κάρτες στο διάβασμά σας.</b></font>”;
}
else {
$weight = “<font color=’maroon’><b>Έχετε $pos ($percent %) θετικές κάρτες και $neg αρνητικές κάρτες στο διάβασμά σας. Η επιρροή των αρνητικών καρτών μειώνεται όταν έχετε περισσότερες θετικές κάρτες.</b></font>”;
}
?>
</tr>
</table>
</center>
</div>
</td></tr></table>
<table border=0 cellpadding=0 width=”375px”>
<tr>
<td>
<? echo $display; ?>
</div>
</td>
</tr>
</table>
<CENTER><?php echo”<table border=0 cellpadding=0 width=375><TR><TD><font face=$font size=$fontsize><BR>$weight</font></td></tr></table>”;?></CENTER>
{/source}