<?php

///////////////////////////////////////////////////////////////////////////////////////

// PHPizabi 0.848b C1 [ALICIA]                               http://www.phpizabi.net //

///////////////////////////////////////////////////////////////////////////////////////

// Please read the license.txt file before using / modifying this software           //

// Original author:         Claude Desjardins, R - feedback@realitymedias.com        //

// Last modification date:  August 13th 2006                                         //

// Version:                 PHPizabi 0.848b C1                                       //

//                                                                                   //

// (C) 2005, 2006 Real!ty Medias / PHPizabi - All rights reserved                    //

///////////////////////////////////////////////////////////////////////////////////////



	/* Check Structure Availability */

	if (!defined("CORE_STRAP")) die("Out of structure call");



	function updatesign($id) {



			$bDate = explode("/", _fnc("user",$id,"birthdate"));
			

			/* find out the user's astrologic sign */

			switch ($bDate[0]) {

				case(1):

					$sign = ($bDate[1] < 19?"capricorn":"aquarius");

				break;

				case(2):

					$sign = ($bDate[1] < 19?"aquarius":"pisces");

				break;

				case(3):

					$sign = ($bDate[1] < 20?"pisces":"aries");

				break;

				case(4):

					$sign = ($bDate[1] < 20?"aires":"taurus");

				break;

				case(5):

					$sign = ($bDate[1] < 21?"taurus":"gemini");

				break;

				case(6):

					$sign = ($bDate[1] < 22?"gemini":"cancer");

				break;

				case(7):

					$sign = ($bDate[1] < 23?"cancer":"leo");

				break;

				case(8):

					$sign = ($bDate[1] < 23?"leo":"virgo");

				break;

				case(9):

					$sign = ($bDate[1] < 23?"virgo":"libra");

				break;

				case(10):

					$sign = ($bDate[1] < 24?"libra":"scorpio");

				break;

				case(11):

					$sign = ($bDate[1] < 22?"scorpio":"sagittarius");

				break;

				case(12):

					$sign = ($bDate[1] < 22?"sagittarius":"capricorn");

				break;

				default:

				$sign = false;

			}

	

			myQ("UPDATE `[x]users` SET `astrologic_sign`='{$sign}' WHERE `id`='{$id}'");

	

			return $sign;

		}


?>