<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
// $Id: xoopspoll.php,v 1.8 2003/07/15 00:15:21 half-dead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: Kazumi Ono
// Author Website : http://www.mywebaddons.com/ , http://www.myweb.ne.jp
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
function b_moon_show() {
global $_COOKIE, $xoopsUser;
	include_once(XOOPS_ROOT_PATH."/modules/moon/class/moon-phase.cls.php");
	
	$dateAsTimeStamp = '';
    $mp = new moonPhase($dateAsTimeStamp);
	$image = XOOPS_URL.'modules/moon/images/'.$moon.'.jpg';
	$moon = $mp->getPositionInDays();
		switch ($moon) {
case 0:
   $phase = MP_FULL_MOON_NAME;
   break;
case 1:
   $phase = MP_FULL_MOON_NAME;
   break;
case 2:
   $phase = MP_WANING_GIBBOUS_NAME;
   break;
case 29:
   $phase = MP_FULL_MOON_NAME;
   break;
case 28:
   $phase = MP_WAXING_GIBBOUS_NAME;
   break;
case 13:
   $phase = MP_WANING_CRESCENT_NAME;
   break;
case 14:
   $phase = MP_NEW_MOON_NAME;
   break;
case 15:
   $phase = MP_NEW_MOON_NAME;
   break;
case 16:
   $phase = MP_WAXING_CRESCENT_NAME;
   break;
default:
	$phase = $mp->getPhaseName();
	break;
	
}	
		
		
	
	$block            = array();
	$block['title']   = _MB_MOON_TITLE1;
	$block['content'] = "<table style='background-color: rgb(0, 0, 0);'><tbody><tr><td><a href='".XOOPS_URL."/modules/moon/index.php'><img src='".XOOPS_URL."/modules/moon/images/".$moon.".jpg' /></a><br><center><span style='color: rgb(255, 255, 255);'>".$phase."</span></center><br><center><a href='http://www.exoops-catala.org/modules/mydownloads/singlefile.php?lid=7' TARGET='_blank'><img src='".XOOPS_URL."/modules/moon/images/moon_logo.gif' /></a></center></td></tr></tbody></table>";
	
	
return $block;
}
?>
