-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreport.php
51 lines (48 loc) · 2.28 KB
/
report.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
require_once 'orbit.php5';
require_once 'solar_chart.php5';
require_once 'planet.php5';
require_once TEMPLATEPATH . '/include/classes/transit.php5';
require_once TEMPLATEPATH . '/include/classes/astroreport.php5';
//list($month, $numday, $year, $fullmonth, $dow, $hours, $am_pm) = split('[/.-]', date("m.d.Y.F.w.g.a"));
$aa = new AstroReport(26.5, 'N', 75.5, 'E', $day, $month, $year, $hour, $minutes, $amORpm, 5.5);
//$aa = new AstroReport(28.36, 'N', 77.12, 'E', 5, 1, 1987, 1, 50, 'am', 5.5); //khushi
//$aa = new AstroReport(26.5, 'N', 75.5, 'E', 21, 11, 1983, 9, 33, 'pm', 5.5); //Nidhi
//$aa = new AstroReport(28.36, 'N', 77.12, 'E', 28, 8, 1985, 7, 00, 'pm', 5.5); //ahuja
//$aa = new AstroReport(23.16, 'N', 77.24, 'E', 30, 10, 1985, 9, 30, 'am', 5.5); //gupta
//$aa = new AstroReport(28.36, 'N', 77.12, 'E', 6, 2, 1987, 6, 15, 'pm', 5.5); //ishani ahuja
$houses = $aa->getHouses();
$planets = $aa->getPlanets();
var_dump( $houses );
foreach( $planets as $planet => $data )
{
$planetId = getPlanetIdByName($planet);
$h = $data['house'];
$getContentHouses = mysql_query("SELECT content FROM birth_report WHERE content_type = 1 AND object_id = $h AND planet_id = $planetId",$link);
$row = mysql_fetch_row($getContentHouses);
echo '<strong>' . $planet . ' is in ' . $h . ' House.</strong>';
echo "<p>$row[0]</p>";
//echo "<p>SELECT content FROM birth_report WHERE content_type = 1 AND object_id = $h AND planet_id = $planetId</p>";
$h = $data['sign_number'];
$getContentZodiacSigns = mysql_query("SELECT content FROM birth_report WHERE content_type = 2 AND object_id = $h AND planet_id = $planetId",$link);
$row = mysql_fetch_row($getContentZodiacSigns);
echo '<strong>' . $planet . ' is in ' . $data['sign'] . '</strong>';
echo "<p>$row[0]</p>";
//echo "<p>SELECT content FROM birth_report WHERE content_type = 2 AND object_id = $h AND planet_id = $planetId</p><hr />";
echo '<hr />';
}
function getPlanetIdByName($name)
{
$pid = array( 'Sun' => 1, 'Moon' => 2, 'Mercury' => 3, 'Venus' => 4, 'Mars' => 5, 'Jupiter' => 6, 'Saturn' => 7, 'Neptune' => 8, 'Uranus' => 9, 'Pluto' => 10, 'Rahu' => 20, 'Ketu'=> 21 );
return $pid[$name];
}
function getHouseBySignNumber($sign, $houses)
{
$house = $sign - $houses['ASC']['sign_number'] + 1;
if( $house < 1 )
{
$house += 12;
}
return $house;
}
?>