// Turn of annoying warnings
error_reporting(E_ERROR);
// error_reporting(E_ALL);
// Get MY Functions
if (function_exists('tmc_date_mysql_to_kin')){} else { include(dirname(__FILE__).'/lib/functions.inc'); }
// Using ADOdb Date Time Library -- and only calling once in case the calendar is on the page twice
if (function_exists('adodb_date_test_date')){} else { include(dirname(__FILE__).'/lib/adodb-time.inc.php'); }
// Get some of the GET vars
// Start by retrieving the plugin Url
$purl = $_GET['purl'];
// Get the language
$ucd_locale = $_GET['ucd_locale'];
// Get the posts
$rurl_enc_posts_del = $_GET['rurl_enc_posts_del'];
// Get the official date code
$this_tm_date_proper = $_GET['tm_date_proper'];
$show_famous_events = $_GET['show_famous_events'];
/*
http://uptimehosting.com/sandbox/wp-content/plugins/13-moon-synchronometer/ajax_info.php?
height=300&
width=280&
date=2015-2-11&
purl=http://uptimehosting.com/sandbox/wp-content/plugins&
ucd_locale=en_EN&
show_famous_events=YES&
rurl_enc_posts_del=&
tm_date_proper=NS1.27.8.5
echo "show_famous_events: $show_famous_events";
exit;
*/
if (strlen($rurl_enc_posts_del) > 10){
$posts_pcs = explode("|", $rurl_enc_posts_del);
$inc = 0;
$post_listing = "";
foreach ($posts_pcs as $dummy){
$post_listing .= '
';
$inc++;
if ($posts_pcs[$inc] == ""){
break;
}
}
echo "Posts (".($inc / 2).")";
echo "$post_listing";
}
// http://sandbox.web/wp/experimental-plugin-space/ %3E http://sandbox.web/wp/?p=10
// Directory paths for important things
$moons_img_dir = "$purl/13-moon-synchronometer/images/moons";
$plasmas_img_dir = "$purl/13-moon-synchronometer/images/plasmas";
$tones_img_dir = "$purl/13-moon-synchronometer/images/tones";
$seals_img_dir = "$purl/13-moon-synchronometer/images/seals";
$portals_img_dir = "$purl/13-moon-synchronometer/images/portals";
$ajax_info = "$purl/13-moon-synchronometer/ajax_info.php";
// Determine which mode to run in
if (isset($_GET['kin_num'])){
$kin_num = $_GET[kin_num];
echo "Running by KIN method: kin_num: $kin_num
";
} elseif (isset($_GET['date'])){
$this_mysql_date = $_GET['date'];
// echo "Running by DATE method: this_mysql_date: $this_mysql_date
";
// Break up date for functions
$this_date_pcs = explode("-", $this_mysql_date);
// Check to see if this day is LEAP DAY
$this_mysql_date_pieces = explode("-", $this_mysql_date);
if (($this_mysql_date_pieces[1] == 2)&&($this_mysql_date_pieces[2] == 29)){
$prior_yr = $this_mysql_date_pieces[0];
$prior_mysql_date_ckld = $this_mysql_date_pieces[0]."-02-29";
if (ms_date_is_leapday($prior_mysql_date_ckld)){
$gad_info = "
\n";
echo "$gad_info";
echo " ";
}
} // End if it's leap day
// Check to see if it's either day before or after Day out of Time (Jul 25)
if ((($this_mysql_date_pieces[1] == 7)&&($this_mysql_date_pieces[2] == 24))||(($this_mysql_date_pieces[1] == 7)&&($this_mysql_date_pieces[2] == 26))){
// This is DOOT special Linke to a Popup for it
$doot_link = "Day Out of Time ";
$include_doot_link = "YES";
} else {$include_doot_link = "NO";} // End if it's DOOT
// Include link to DOOT
if ($include_doot_link == "YES"){
$doot_link .= "
";
$doot_link .= "
";
$doot_link .= " ";
echo "$doot_link";
}
// If the date is xxxx-07-25 it's the Day out of Time
if (($this_mysql_date_pieces[1] == 7)&&($this_mysql_date_pieces[2] == 25)){
$gad_info = "