forked from rahulyhg/astro-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
solar_arcs_line.php
1482 lines (1214 loc) · 42.5 KB
/
solar_arcs_line.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
$months = array (0 => 'Choose month', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
$my_error = "";
$no_interps = True; //set this to False when you want interpretations
// check if the form has been submitted
if (isset($_POST['submitted']) Or isset($_POST['h_sys_submitted']))
{
$h_sys = safeEscapeString($_POST["h_sys"]);
// get all variables from form - Person #1
$name1 = safeEscapeString($_POST["name1"]);
$month1 = safeEscapeString($_POST["month1"]);
$day1 = safeEscapeString($_POST["day1"]);
$year1 = safeEscapeString($_POST["year1"]);
$hour1 = safeEscapeString($_POST["hour1"]);
$minute1 = safeEscapeString($_POST["minute1"]);
$timezone1 = safeEscapeString($_POST["timezone1"]);
$long_deg1 = safeEscapeString($_POST["long_deg1"]);
$long_min1 = safeEscapeString($_POST["long_min1"]);
$ew1 = safeEscapeString($_POST["ew1"]);
$lat_deg1 = safeEscapeString($_POST["lat_deg1"]);
$lat_min1 = safeEscapeString($_POST["lat_min1"]);
$ns1 = safeEscapeString($_POST["ns1"]);
$start_month = safeEscapeString($_POST["start_month"]);
$start_day = safeEscapeString($_POST["start_day"]);
$start_year = safeEscapeString($_POST["start_year"]);
// set cookie containing natal data here
setcookie ('name', stripslashes($name1), time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('month', $month1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('day', $day1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('year', $year1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('hour', $hour1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('minute', $minute1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('timezone', $timezone1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('long_deg', $long_deg1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('long_min', $long_min1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('ew', $ew1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('lat_deg', $lat_deg1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('lat_min', $lat_min1, time() + 60 * 60 * 24 * 30, '/', '', 0);
setcookie ('ns', $ns1, time() + 60 * 60 * 24 * 30, '/', '', 0);
include ('header_solar_arcs.html'); //here because of setting cookies above
include("validation_class.php");
//error check
$my_form = new Validate_fields;
$my_form->check_4html = true;
$my_form->add_text_field("Name #1", $name1, "text", "y", 40);
$my_form->add_text_field("Month #1", $month1, "text", "y", 2);
$my_form->add_text_field("Day #1", $day1, "text", "y", 2);
$my_form->add_text_field("Year #1", $year1, "text", "y", 4);
$my_form->add_text_field("Hour #1", $hour1, "text", "y", 2);
$my_form->add_text_field("Minute #1", $minute1, "text", "y", 2);
$my_form->add_text_field("Time zone #1", $timezone1, "text", "y", 4);
$my_form->add_text_field("Longitude degree #1", $long_deg1, "text", "y", 3);
$my_form->add_text_field("Longitude minute #1", $long_min1, "text", "y", 2);
$my_form->add_text_field("Longitude E/W #1", $ew1, "text", "y", 2);
$my_form->add_text_field("Latitude degree #1", $lat_deg1, "text", "y", 2);
$my_form->add_text_field("Latitude minute #1", $lat_min1, "text", "y", 2);
$my_form->add_text_field("Latitude N/S #1", $ns1, "text", "y", 2);
$my_form->add_text_field("Start Month", $start_month, "text", "y", 2);
$my_form->add_text_field("Start Day", $start_day, "text", "y", 2);
$my_form->add_text_field("Start Year", $start_year, "text", "y", 4);
// additional error checks on user-entered data
if ($month1 != "" And $day1 != "" And $year1 != "")
{
if (!$date = checkdate($month1, $day1, $year1))
{
$my_error .= "The date of birth you entered is not valid.<br>";
}
}
if (($year1 < 1900) Or ($year1 >= 2100))
{
$my_error .= "Birth year person #1 - please enter a year between 1900 and 2099.<br>";
}
if (($hour1 < 0) Or ($hour1 > 23))
{
$my_error .= "Birth hour must be between 0 and 23.<br>";
}
if (($minute1 < 0) Or ($minute1 > 59))
{
$my_error .= "Birth minute must be between 0 and 59.<br>";
}
if (($long_deg1 < 0) Or ($long_deg1 > 179))
{
$my_error .= "Longitude degrees must be between 0 and 179.<br>";
}
if (($long_min1 < 0) Or ($long_min1 > 59))
{
$my_error .= "Longitude minutes must be between 0 and 59.<br>";
}
if (($lat_deg1 < 0) Or ($lat_deg1 > 65))
{
$my_error .= "Latitude degrees must be between 0 and 65.<br>";
}
if (($lat_min1 < 0) Or ($lat_min1 > 59))
{
$my_error .= "Latitude minutes must be between 0 and 59.<br>";
}
if (($ew1 == '-1') And ($timezone1 > 2))
{
$my_error .= "You have marked West longitude but set an east time zone.<br>";
}
if (($ew1 == '1') And ($timezone1 < 0))
{
$my_error .= "You have marked East longitude but set a west time zone.<br>";
}
if ($start_month != "" And $start_day != "" And $start_year != "")
{
if (!$date = checkdate($start_month, $start_day, $start_year))
{
$my_error .= "The solar arc date you entered is not valid.<br>";
}
}
if (($start_year < 1900) Or ($start_year >= 2100))
{
$my_error .= "Solar arc date - please enter a year between 1900 and 2099.<br>";
}
if ($ew1 < 0)
{
$ew1_txt = "w";
}
else
{
$ew1_txt = "e";
}
if ($ns1 > 0)
{
$ns1_txt = "n";
}
else
{
$ns1_txt = "s";
}
$validation_error = $my_form->validation();
if ((!$validation_error) || ($my_error != ""))
{
$error = $my_form->create_msg();
echo "<TABLE align='center' WIDTH='98%' BORDER='0' CELLSPACING='15' CELLPADDING='0'><tr><td><center><b>";
echo "<font color='#ff0000' size=+2>Error! - The following error(s) occurred:</font><br>";
if ($error)
{
echo $error . $my_error;
}
else
{
echo $error . "<br>" . $my_error;
}
echo "</font>";
echo "<font color='#c020c0'";
echo "<br /><br />PLEASE RE-ENTER YOUR TIME ZONE DATA. THANK YOU.<br><br>";
echo "</font>";
echo "</b></center></td></tr></table>";
}
else
{
// no errors in filling out form, so process form
$swephsrc = 'sweph';
$sweph = 'sweph';
putenv("PATH=$PATH:$swephsrc");
if (strlen($h_sys) != 1)
{
$h_sys = "p";
}
//Person 1 calculations
// Unset any variables not initialized elsewhere in the program
unset($PATH,$out,$pl_name,$longitude1,$house_pos1);
$inmonth = $month1;
$inday = $day1;
$inyear = $year1;
$inhours = $hour1;
$inmins = $minute1;
$insecs = "0";
$intz = $timezone1;
$my_longitude = $ew1 * ($long_deg1 + ($long_min1 / 60));
$my_latitude = $ns1 * ($lat_deg1 + ($lat_min1 / 60));
if ($intz >= 0)
{
$whole = floor($intz);
$fraction = $intz - floor($intz);
}
else
{
$whole = ceil($intz);
$fraction = $intz - ceil($intz);
}
$inhours = $inhours - $whole;
$inmins = $inmins - ($fraction * 60);
// adjust date and time for minus hour due to time zone taking the hour negative
$utdatenow = strftime("%d.%m.%Y", mktime($inhours, $inmins, $insecs, $inmonth, $inday, $inyear));
$utnow = strftime("%H:%M:%S", mktime($inhours, $inmins, $insecs, $inmonth, $inday, $inyear));
exec ("swetest -edir$sweph -b$utdatenow -ut$utnow -p0123456789DAttt -eswe -house$my_longitude,$my_latitude,$h_sys -flsj -g, -head", $out); //add a planet
// Each line of output data from swetest is exploded into array $row, giving these elements:
// 0 = longitude
// 1 = speed
// 2 = house position
// planets are index 0 - index (LAST_PLANET), house cusps are index (LAST_PLANET + 1) - (LAST_PLANET + 12)
foreach ($out as $key => $line)
{
$row = explode(',',$line);
$longitude1[$key] = $row[0];
$speed1[$key] = $row[1];
$house_pos1[$key] = $row[2];
};
include("constants.php"); // this is here because we must rename the planet names
//calculate the Part of Fortune
//is this a day chart or a night chart?
if ($longitude1[LAST_PLANET + 1] > $longitude1[LAST_PLANET + 7])
{
if ($longitude1[0] <= $longitude1[LAST_PLANET + 1] And $longitude1[0] > $longitude1[LAST_PLANET + 7])
{
$day_chart = True;
}
else
{
$day_chart = False;
}
}
else
{
if ($longitude1[0] > $longitude1[LAST_PLANET + 1] And $longitude1[0] <= $longitude1[LAST_PLANET + 7])
{
$day_chart = False;
}
else
{
$day_chart = True;
}
}
if ($day_chart == True)
{
$longitude1[SE_POF] = $longitude1[LAST_PLANET + 1] + $longitude1[1] - $longitude1[0];
}
else
{
$longitude1[SE_POF] = $longitude1[LAST_PLANET + 1] - $longitude1[1] + $longitude1[0];
}
if ($longitude1[SE_POF] >= 360)
{
$longitude1[SE_POF] = $longitude1[SE_POF] - 360;
}
if ($longitude1[SE_POF] < 0)
{
$longitude1[SE_POF] = $longitude1[SE_POF] + 360;
}
//add a planet - maybe some code needs to be put here
//capture the Vertex longitude
$longitude1[LAST_PLANET] = $longitude1[LAST_PLANET + 16]; //Asc = +13, MC = +14, RAMC = +15, Vertex = +16
//get house positions of planets here
for ($x = 1; $x <= 12; $x++)
{
for ($y = 0; $y <= LAST_PLANET; $y++)
{
$pl = $longitude1[$y] + (1 / 36000);
if ($x < 12 And $longitude1[$x + LAST_PLANET] > $longitude1[$x + LAST_PLANET + 1])
{
If (($pl >= $longitude1[$x + LAST_PLANET] And $pl < 360) Or ($pl < $longitude1[$x + LAST_PLANET + 1] And $pl >= 0))
{
$house_pos1[$y] = $x;
continue;
}
}
if ($x == 12 And ($longitude1[$x + LAST_PLANET] > $longitude1[LAST_PLANET + 1]))
{
if (($pl >= $longitude1[$x + LAST_PLANET] And $pl < 360) Or ($pl < $longitude1[LAST_PLANET + 1] And $pl >= 0))
{
$house_pos1[$y] = $x;
}
continue;
}
if (($pl >= $longitude1[$x + LAST_PLANET]) And ($pl < $longitude1[$x + LAST_PLANET + 1]) And ($x < 12))
{
$house_pos1[$y] = $x;
continue;
}
if (($pl >= $longitude1[$x + LAST_PLANET]) And ($pl < $longitude1[LAST_PLANET + 1]) And ($x == 12))
{
$house_pos1[$y] = $x;
}
}
}
//Solar arc calculations
// Unset any variables not initialized elsewhere in the program
unset($out,$longitude2,$speed2);
// get all variables from form - solar_arcs
//get todays date and time
$name2 = "Solar Arcs";
// get progressed birthday
$birth_JD = gregoriantojd($month1, $day1, $year1) - 0.5; // find Julian day for birth date at midnight.
$start_JD = gregoriantojd($start_month, $start_day, $start_year) - 0.5; // find Julian day for start of relationship at midnight.
$birth_JD = $birth_JD + (($inhours + ($inmins / 60)) / 24);
$start_JD = $start_JD + (($inhours + ($inmins / 60)) / 24);
$days_alive = $start_JD - $birth_JD;
$prog_time_to_add = $days_alive / 365.25;
$jd_to_use = $birth_JD + $prog_time_to_add;
//FOR DEBUG
//echo $jd_to_use;
exec ("swetest -edir$sweph -j$jd_to_use -p0 -eswe -fl -g, -head", $out); //add a planet
// Each line of output data from swetest is exploded into array $row, giving these elements:
// 0 = longitude of Sun
foreach ($out as $key => $line)
{
$row = explode(',',$line);
$longitude2[$key] = $row[0];
};
//add a planet - maybe some code needs to be put here
$p_sun = $longitude2[0];
$solar_arc = Crunch($longitude2[0] - $longitude1[0]);
for ($i = 0; $i <= LAST_PLANET + 12; $i++)
{
$longitude2[$i] = Crunch($longitude1[$i] + $solar_arc);
}
//FOR DEBUG
//echo $longitude1[LAST_PLANET + 10] . "<br><br>";
//echo $longitude2[0] . "<br><br>";
//echo $longitude1[0] . "<br><br>";
//echo $p_mc . "<br><br>";
//echo $ob_deg . "<br><br>";
//display natal data
$secs = "0";
if ($timezone1 < 0)
{
$tz1 = $timezone1;
}
else
{
$tz1 = "+" . $timezone1;
}
if ($timezone2 < 0)
{
$tz2 = $timezone2;
}
else
{
$tz2 = "+" . $timezone2;
}
$name_without_slashes = stripslashes($name1);
echo "<center>";
echo "<FONT color='#0000ff' SIZE='3' FACE='Arial'><b>$name_without_slashes</b><br />";
echo '<b>Born ' . strftime("%A, %B %d, %Y<br>%X (time zone = GMT $tz1 hours)</b><br />\n", mktime($hour1, $minute1, $secs, $month1, $day1, $year1));
echo "<b>" . $long_deg1 . $ew1_txt . $long_min1 . ", " . $lat_deg1 . $ns1_txt . $lat_min1 . "</b><br /><br />";
echo "<b>$name2</b><br />";
echo '<b>On ' . strftime("%A, %B %d, %Y<br>%X (time zone = GMT $tz1 hours)</b><br />\n", mktime($hour1, $minute1, $secs, $start_month, $start_day, $start_year));
echo "</font>";
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<select name="h_sys" size="1">
<?php
echo "<option value='p' ";
if ($h_sys == "p"){ echo " selected"; }
echo "> Placidus </option>";
echo "<option value='k' ";
if ($h_sys == "k"){ echo " selected"; }
echo "> Koch </option>";
echo "<option value='r' ";
if ($h_sys == "r"){ echo " selected"; }
echo "> Regiomontanus </option>";
echo "<option value='c' ";
if ($h_sys == "c"){ echo " selected"; }
echo "> Campanus </option>";
echo "<option value='b' ";
if ($h_sys == "b"){ echo " selected"; }
echo "> Alcabitus </option>";
echo "<option value='o' ";
if ($h_sys == "o"){ echo " selected"; }
echo "> Porphyrius </option>";
echo "<option value='m' ";
if ($h_sys == "m"){ echo " selected"; }
echo "> Morinus </option>";
echo "<option value='a' ";
if ($h_sys == "a"){ echo " selected"; }
echo "> Equal house - Asc </option>";
echo "<option value='t' ";
if ($h_sys == "t"){ echo " selected"; }
echo "> Topocentric </option>";
echo "<option value='v' ";
if ($h_sys == "v"){ echo " selected"; }
echo "> Vehlow </option>";
?>
</select>
<input type="hidden" name="name1" value="<?php echo stripslashes($_POST['name1']); ?>">
<input type="hidden" name="month1" value="<?php echo $_POST['month1']; ?>">
<input type="hidden" name="day1" value="<?php echo $_POST['day1']; ?>">
<input type="hidden" name="year1" value="<?php echo $_POST['year1']; ?>">
<input type="hidden" name="hour1" value="<?php echo $_POST['hour1']; ?>">
<input type="hidden" name="minute1" value="<?php echo $_POST['minute1']; ?>">
<input type="hidden" name="timezone1" value="<?php echo $_POST['timezone1']; ?>">
<input type="hidden" name="long_deg1" value="<?php echo $_POST['long_deg1']; ?>">
<input type="hidden" name="long_min1" value="<?php echo $_POST['long_min1']; ?>">
<input type="hidden" name="ew1" value="<?php echo $_POST['ew1']; ?>">
<input type="hidden" name="lat_deg1" value="<?php echo $_POST['lat_deg1']; ?>">
<input type="hidden" name="lat_min1" value="<?php echo $_POST['lat_min1']; ?>">
<input type="hidden" name="ns1" value="<?php echo $_POST['ns1']; ?>">
<input type="hidden" name="start_month" value="<?php echo $_POST['start_month']; ?>">
<input type="hidden" name="start_day" value="<?php echo $_POST['start_day']; ?>">
<input type="hidden" name="start_year" value="<?php echo $_POST['start_year']; ?>">
<input type="hidden" name="h_sys_submitted" value="TRUE">
<INPUT type="submit" name="submit" value="Go" align="middle" style="background-color:#66ff66;color:#000000;font-size:16px;font-weight:bold">
</form>
<?php
echo "</center>";
$hr_ob1 = $hour1;
$min_ob1 = $minute1;
$ubt1 = 0;
if (($hr_ob1 == 12) And ($min_ob1 == 0))
{
$ubt1 = 1; // this person has an unknown birth time
}
$ubt2 = $ubt1;
$rx1 = "";
for ($i = 0; $i <= SE_TNODE; $i++)
{
if ($speed1[$i] < 0)
{
$rx1 .= "R";
}
else
{
$rx1 .= " ";
}
}
$rx2 = "";
for ($i = 0; $i <= SE_TNODE; $i++)
{
$rx2 .= " ";
}
// to make GET string shorter
for ($i = 0; $i <= LAST_PLANET; $i++)
{
$L1[$i] = $longitude1[$i];
$L2[$i] = $longitude2[$i];
}
for ($i = 1; $i <= LAST_PLANET; $i++)
{
$hc1[$i] = $longitude1[LAST_PLANET + $i];
}
for ($i = 1; $i <= 12; $i++)
{
$hc2[$i] = ($i - 1) * 30;
}
$hc2[13] = 0;
$L2[LAST_PLANET + 1] = $longitude2[LAST_PLANET + 1];
$L2[LAST_PLANET + 2] = $longitude2[LAST_PLANET + 10];
// no need to urlencode unless perhaps magic quotes is ON (??)
$ser_L1 = serialize($L1);
$ser_hc1 = serialize($hc1);
$ser_L2 = serialize($L2);
$ser_hc2 = serialize($hc2);
echo "<center>";
echo "<img border='0' src='chartwheel_sa_line.php?rx1=$rx1&rx2=$rx2&p1=$ser_L1&p2=$ser_L2&hc1=$ser_hc1&hc2=$ser_hc2&ubt1=$ubt1&ubt2=$ubt2' width='730' height='400'>";
echo "</center>";
echo "<br>";
// display all data - planets
echo '<center><table width="65%" cellpadding="0" cellspacing="0" border="0">',"\n";
echo '<tr>';
echo "<td><font color='#0000ff'><b> Natal </b></font></td>";
echo "<td><font color='#0000ff'><b> Longitude </b></font></td>";
if ($ubt1 == 1)
{
echo "<td> </td>";
}
else
{
echo "<td><font color='#0000ff'><b> House<br>position </b></font></td>";
}
echo "<td><font color='#0000ff'><b> Solar Arc </b></font></td>";
echo "<td><font color='#0000ff'><b> Longitude </b></font></td>";
echo '</tr>';
if ($ubt1 == 1)
{
$a1 = SE_TNODE;
}
else
{
$a1 = LAST_PLANET;
}
for ($i = 0; $i <= $a1; $i++)
{
echo '<tr>';
echo "<td>" . $pl_name[$i] . "</td>";
echo "<td><font face='Courier New'>" . Convert_Longitude($L1[$i]) . " " . Mid($rx1, $i + 1, 1) . "</font></td>";
if ($ubt1 == 1)
{
echo "<td> </td>";
}
else
{
$hse = floor($house_pos1[$i]);
if ($hse < 10)
{
echo "<td> " . $hse . "</td>";
}
else
{
echo "<td> " . $hse . "</td>";
}
}
if ($i <= LAST_PLANET + 2)
{
echo "<td>" . $pl_name[$i] . "</td>";
}
else
{
echo "<td>   </td>";
}
if ($i <= LAST_PLANET + 2)
{
echo "<td><font face='Courier New'>" . Convert_Longitude($L2[$i]) . " " . Mid($rx2, $i + 1, 1) . "</font></td>";
}
else
{
echo "<td>   </td>";
}
echo '</tr>';
}
echo '<tr>';
echo "<td>   </td>";
echo "<td>   </td>";
echo "<td>   </td>";
echo "<td>   </td>";
echo '</tr>';
// display house cusps
if ($ubt1 == 0)
{
echo '<tr>';
echo "<td><font color='#0000ff'><b> Name </b></font></td>";
echo "<td><font color='#0000ff'><b> Longitude </b></font></td>";
echo '</tr>';
for ($i = 1; $i <= 12; $i++)
{
echo '<tr>';
if ($i == 1)
{
echo "<td>Ascendant </td>";
}
elseif ($i == 10)
{
echo "<td>MC (Midheaven) </td>";
}
else
{
echo "<td>House " . ($i) . "</td>";
}
echo "<td><font face='Courier New'>" . Convert_Longitude($hc1[$i]) . "</font></td>";
echo '</tr>';
}
}
echo '</table></center>',"\n";
echo "<br /><br />";
// display solar arc data - aspect table
$asp_name[1] = "Conjunction";
$asp_name[2] = "Opposition";
$asp_name[3] = "Trine";
$asp_name[4] = "Square";
$asp_name[5] = "Quincunx";
$asp_name[6] = "Sextile";
echo '<center><table width="40%" cellpadding="0" cellspacing="0" border="0">',"\n";
echo '<tr>';
echo "<td><font color='#0000ff'><b> Solar Arc Planet</b></font></td>";
echo "<td><font color='#0000ff'><b> Aspect </b></font></td>";
echo "<td><font color='#0000ff'><b> Natal Planet</b></font></td>";
echo "<td><font color='#0000ff'><b> Orb </b></font></td>";
echo '</tr>';
// include Ascendant and MC
$L1[LAST_PLANET + 1] = $hc1[1];
$L1[LAST_PLANET + 2] = $hc1[10];
$pl_name[LAST_PLANET + 1] = "Ascendant";
$pl_name[LAST_PLANET + 2] = "Midheaven";
for ($i = 0; $i <= LAST_PLANET + 2; $i++)
{
echo "<tr><td colspan='4'> </td></tr>";
for ($j = 0; $j <= LAST_PLANET + 2; $j++)
{
if ($ubt1 == 1 And ($i > SE_TNODE Or $j > SE_TNODE))
{
continue;
}
$q = 0;
$da = Abs($L2[$i] - $L1[$j]);
if ($da > 180)
{
$da = 360 - $da;
}
$orb = 1;
// is there an aspect within orb?
if ($da <= $orb)
{
$q = 1;
$dax = $da;
}
elseif (($da <= (60 + $orb)) And ($da >= (60 - $orb)))
{
$q = 6;
$dax = $da - 60;
}
elseif (($da <= (90 + $orb)) And ($da >= (90 - $orb)))
{
$q = 4;
$dax = $da - 90;
}
elseif (($da <= (120 + $orb)) And ($da >= (120 - $orb)))
{
$q = 3;
$dax = $da - 120;
}
elseif (($da <= (150 + $orb)) And ($da >= (150 - $orb)))
{
$q = 5;
$dax = $da - 150;
}
elseif ($da >= (180 - $orb))
{
$q = 2;
$dax = 180 - $da;
}
if ($q > 0)
{
// aspect exists
echo '<tr>';
echo "<td>" . $pl_name[$i] . "</td>";
echo "<td>" . $asp_name[$q] . "</td>";
echo "<td>" . $pl_name[$j] . "</td>";
echo "<td>" . sprintf("%.2f", abs($dax)) . "</td>";
echo '</tr>';
}
}
}
echo '</table></center>',"\n";
echo "<br /><br />";
//display the solar arc chart report
if ($no_interps == True)
{
include ('footer.html');
exit();
}
else
{
echo '<center><table width="61.8%" cellpadding="0" cellspacing="0" border="0">';
echo '<tr><td><font face="Verdana" size="3">';
//display philosophy of astrology
echo "<center><font size='+1' color='#0000ff'><b>PLANETARY SOLAR ARC ASPECTS</b></font></center>";
$file = "transit_files/aspect.txt";
$fh = fopen($file, "r");
$string = fread($fh, filesize($file));
fclose($fh);
$p_aspect_interp = nl2br($string);
echo "<font size=2>" . $p_aspect_interp . "</font>";
// loop through each planet
for ($i = 0; $i <= 5; $i++)
{
for ($j = 0; $j <= 9; $j++)
{
if (($i == 1) Or ($j == 1 And $unknown_time1 == 1))
{
continue; // do not allow Moon aspects for solar arc planets, or for natal planets if birth time is unknown
}
$da = Abs($L2[$i] - $L1[$j]);
if ($da > 180)
{
$da = 360 - $da;
}
$orb = 1.0; //orb = 1.0 degree
// are planets within orb?
$q = 1;
if ($da <= $orb)
{
$q = 2;
}
elseif (($da <= 60 + $orb) And ($da >= 60 - $orb))
{
$q = 3;
}
elseif (($da <= 90 + $orb) And ($da >= 90 - $orb))
{
$q = 4;
}
elseif (($da <= 120 + $orb) And ($da >= 120 - $orb))
{
$q = 5;
}
elseif ($da >= 180 - $orb)
{
$q = 6;
}
if ($q > 1)
{
if ($q == 2)
{
$aspect = " Conjunct ";
}
elseif ($q == 6)
{
$aspect = " Opposite ";
}
elseif ($q == 3)
{
$aspect = " Sextile ";
}
elseif ($q == 4)
{
$aspect = " Square ";
}
elseif ($q == 5)
{
$aspect = " Trine ";
}
$phrase_to_look_for = $pl_name[$i] . $aspect . $pl_name[$j];
$file = "transit_files/" . strtolower($pl_name[$i]) . "_tr.txt";
$string = Find_Specific_Report_Paragraph($phrase_to_look_for, $file, $pl_name[$i], $aspect, $pl_name[$j], $L2[$i], $speed2[$i]);
$string = nl2br($string);
echo "<font size=2>" . $string . "</font>";
}
}
}
//display closing
$file = "transit_files/closing.txt";
$fh = fopen($file, "r");
$string = fread($fh, filesize($file));
fclose($fh);
$closing = nl2br($string);
echo "<font size=2>" . $closing . "</font>";
echo '</font></td></tr>';
echo '</table></center>';
echo "<br /><br />";
@mail(EMAIL, "Solar Arcs", "");
include ('footer.html');
exit();
}
}
}
else
{
include ('header_solar_arcs.html'); //here because of cookies
$name1 = stripslashes($_COOKIE['name']);
$month1 = $_COOKIE['month'];
$day1 = $_COOKIE['day'];
$year1 = $_COOKIE['year'];
$hour1 = $_COOKIE['hour'];
$minute1 = $_COOKIE['minute'];
$timezone1 = $_COOKIE['timezone'];
$long_deg1 = $_COOKIE["long_deg"];
$long_min1 = $_COOKIE["long_min"];
$ew1 = $_COOKIE["ew"];
$lat_deg1 = $_COOKIE["lat_deg"];
$lat_min1 = $_COOKIE["lat_min"];
$ns1 = $_COOKIE["ns"];
$start_month = strftime("%m", time());
$start_day = strftime("%d", time());
$start_year = strftime("%Y", time());
}
?>
<table style="margin: 0px 20px;">
<tr>
<td>
<font color='#ff0000' size=4>
<b>Please Read This:</b><br>
</font>
<font color='#000000' size=2>
If you do not know all the information that is required by the form below, then here is where you may go<br>
for longitude, latitude, and time zone information (all of which are very important):<br><br>
<a href="http://www.astro.com/atlas">http://www.astro.com/atlas</a><br><br>
1) Click on SEARCH.<br>
2) Click on the link that is your birth place.<br>
3) Fill out the information in order to find the time zone at birth.<br>
4) Click on Continue.<br>
5) Locate the time zone information. For example:<br><br>
<b>Time Zone: 5 h west, Daylight Saving</b> (this means select the "GMT -04:00" option - one hour added for DST.<br><br>
6) Enter the longitude, latitude, and time zone information into the below form.<br><br>
OR JUST GO DIRECTLY TO:<br><br>
<a href="http://www.astro.com/cgi/ade.cgi">http://www.astro.com/cgi/ade.cgi</a><br><br>
and fill out all the information. Then come back here and fill out the form with the data you now have.<br><br><br>
</font>
</td>
</tr>
</table>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" target="_blank" style="margin: 0px 20px;">
<fieldset><legend><font size=4><b>Data entry for Solar Arcs - Enter your birth information</b></font></legend>
<font color="#ff0000"><b>All fields are required.</b></font><br>
<table style="font-size:12px;">
<TR>
<TD>
<P align="right">Name #1:</P>
</TD>
<TD>
<INPUT size="40" name="name1" value="<?php echo $name1; ?>">
<font color="#0000ff">
(do not use your full name if you do want want the world to see it)
</font>
</TD>
</TR>
<TR>
<TD>
<P align="right">Birth date #1:</P>
</TD>
<TD>
<?php
echo '<select name="month1">';
foreach ($months as $key => $value)
{
echo "<option value=\"$key\"";
if ($key == $month1)
{
echo ' selected="selected"';
}
echo ">$value</option>\n";
}
echo '</select>';
?>
<INPUT size="2" maxlength="2" name="day1" value="<?php echo $day1; ?>">
<b>,</b>
<INPUT size="4" maxlength="4" name="year1" value="<?php echo $year1; ?>">
<font color="#0000ff">
(only years from 1900 through 2099 are valid)
</font>
</TD>
</TR>
<TR>
<td valign="top"><P align="right">Birth time #1:</P></td>
<TD>
<INPUT maxlength="2" size="2" name="hour1" value="<?php echo $hour1; ?>">
<b>:</b>
<INPUT maxlength="2" size="2" name="minute1" value="<?php echo $minute1; ?>">
<br>
<font color="#0000ff">
(please give time of birth in 24 hour format. If your birth time is unknown, please enter 12:00)<br>
(if you were born EXACTLY at 12:00, then please enter 11:59 or 12:01 12:00 is reserved for unknown birth times only)
<br><br>
</font>