<?php
	$NOW_day = date('d');
	$NOW_month  = '';
	$NOW_year  = '';
if ($_SESSION['LANG'] == 'TH') {
	$NOW_month = returnThaiShortMonth(date('m'));
	$NOW_year = $NOW_month;
	$NOW_year .= ' ';
	$NOW_year .= date('Y')+543;

	$LANG_SQL = 'cat.CONTENT_CAT_DESC_LOC AS CONTENT_CAT_LOC , content.CONTENT_DESC_LOC AS CONTENT_LOC , content.BRIEF_LOC AS CONTENT_BRIEF ,';
} else if ($_SESSION['LANG'] == 'EN') {
	$NOW_month .= date('M');
	$NOW_year .= date('M Y');

	$LANG_SQL = 'cat.CONTENT_CAT_DESC_ENG AS CONTENT_CAT_LOC , content.CONTENT_DESC_ENG AS CONTENT_LOC , content.BRIEF_ENG AS CONTENT_BRIEF ,';
}
?>

<div class="part-calendar">
	<div class="box-calendar">
		<div class="box-top">
			<div  class="box-top-date">
				<p class="date"><?=$NOW_day?></p>
				<hr class="line"/>
				<p class="month-year"><?=$NOW_year?></p>
			</div>
			<? /*
			<a class="btn-arrow pev"></a>
			<a class="btn-arrow next"></a>
			*/ ?>
Beispiel #2
0
	/*social*/
	$path = 'event-detail.php?MID=' . $MID . '%26CID=' . $row['CAT_ID'] . '%26SID=' . $row['SUB_CAT_ID'] . '%26CONID=' . $row['CONTENT_ID'];
	$fullpath = _FULL_SITE_PATH_ . '/' . $path;
	$redirect_uri = _FULL_SITE_PATH_ . '/callback.php?p=' . $row['CONTENT_ID'];
	$fb_link = 'https://www.facebook.com/dialog/share?app_id=' . _FACEBOOK_ID_ . '&display=popup&href=' . $fullpath . '&redirect_uri=' . $redirect_uri;
	$path = str_replace("%26", "&amp;", $path);

	$title = htmlspecialchars(trim($row['CONTENT_LOC']));
	$detail = strip_tags(trim($row['CONTENT_BRIEF']));
	/*social*/
	$dt = new DateTime($_POST['date']);

	if ($_SESSION['LANG'] == 'TH') {
		$Month = returnThaiMonth($dt -> format("m"));
		$DayOfWeek = returnThaiDayOfWeek($dt -> format("l"));
		$shortMonth = returnThaiShortMonth($dt -> format("m"));
	} else if ($_SESSION['LANG'] == 'EN') {
		$Month = $dt -> format("F");
		$shortMonth = $dt -> format("M");
		$DayOfWeek = $dt ->  format("D");//format("l");
	}


?>
<div class="box-content-slide cf">
	<div class="box-left">
		<div class="box-date cf <?=strtolower($dt -> format("D"))?>">
			<div class="box-left">
				<p>
					<?=$dt -> format("j")?>
				</p>
Beispiel #3
0
function displayShortMonth($source)
{
    $myDateArray = explode("-", $source);
    if ($_SESSION['LANG'] == 'TH') {
        $myMonth = returnThaiShortMonth($myDateArray[1]);
    } else {
        switch ($myDateArray[1]) {
            case "01":
                $myMonth = "Jan";
                break;
            case "02":
                $myMonth = "Feb";
                break;
            case "03":
                $myMonth = "Mar";
                break;
            case "04":
                $myMonth = "Apr";
                break;
            case "05":
                $myMonth = "May";
                break;
            case "06":
                $myMonth = "Jun";
                break;
            case "07":
                $myMonth = "Jul";
                break;
            case "08":
                $myMonth = "Aug";
                break;
            case "09":
                $myMonth = "Sep";
                break;
            case "10":
                $myMonth = "Oct";
                break;
            case "11":
                $myMonth = "Nov";
                break;
            case "12":
                $myMonth = "Dec";
                break;
        }
    }
    return $myMonth;
}