Exemple #1
0
 function test()
 {
     echo '<link src="/templates/default/css/calender.css"/>';
     /* sample usages */
     echo '<h2>October 2012</h2>';
     echo draw_calendar('10', 2012);
     echo '<h2>November 2012</h2>';
     echo draw_calendar('11', 2012);
 }
Exemple #2
0
function draw_page() 
{	
	global $calendar
	?>
	<div class="container">
	<?php
	open_panel('calendar','Calendar');
	draw_calendar($calendar);
	close_panel();
	
	open_panel('addappt','Add Appointment');
	draw_add_appt_form();
	close_panel();
?>
	</div>
	<?php
 } 
Exemple #3
0
    return $calendar;
}
//for($i=1;$i<13;$i+=2) {
?>
<!--<table><tr><td><?php 
//echo draw_calendar($i,2015);
?>
</td><td><?php 
//echo draw_calendar($i+1,2015);
?>
</td></tr></table>-->
<?php 
//}
echo '<center><h2 style="font-size:20px; color:#000000;">' . date('M') . ' ' . date('Y') . '</h2></center>';
echo "<center>";
echo draw_calendar(date('n'), date('Y'));
echo "</center>";
// December Calender
/* echo '<h2>Nov '.date('Y').'</h2>';
echo draw_calendar(11,2015); // November Calender

echo '<h2>Oct '.date('Y').'</h2>';
echo draw_calendar(10,2015); */
// October Calender
?>
</td>
  </tr>
  </table>
</form>
</div>
<form>
Exemple #4
0
}
?>
                            </select>
                            <input class = 'span4 form-control button' name = 'refresh' type = 'submit' value = 'Refresh'/>
                        </div>
                    </form>
                    <?php 
if (isset($_POST['refresh'])) {
    $month = $_POST['month'];
    $Month = getMonthString($_POST['month']);
    $year = $_POST['year'];
    $alat = $_POST['alat'];
}
echo '<h2>' . $Month . ' ' . $year . '</h2>';
echo '<h4>Nama Alat : ' . $alat . '</h4>';
echo draw_calendar($conn, $month, $year, $alat);
?>
                </div>

                <div id ="form">
                    <h3>Form Peminjaman</h3>
                    <form name ='form_peminjaman' action='controller/transaksi.php' onsubmit="return validateDate()" method = 'post'>
                        <h5>ID Peminjam :</h5>
                        <input type = 'number' min='0' name = 'id' placeholder = 'NIM / NIK Peminjam' required/>
                        <h5>Kode Alat :</h5>
                        <input type = 'text' pattern="[A-Z]{3}[0-9]{3}" name = 'kode-alat' placeholder = 'Kode Alat' required/>
                        <h5>Tanggal Peminjaman :</h5>
                            <input id="tanggal-pinjam" class="form-control" disabled = "true" type="datetime-local" name="tanggal-pinjam" required/>
                        <h5>Rencana Pengembalian :</h5>
                            <input id="tanggal-kembali" type="datetime-local" class="form-control" name="tanggal-kembali" required/>
                        <br />
            if ($day_counter + 1 != $days_in_month) {
                $calendar .= '<tr class="calendar-row">';
            }
            $running_day = -1;
            $days_in_this_week = 0;
        }
        $days_in_this_week++;
        $running_day++;
        $day_counter++;
    }
    if ($days_in_this_week < 8) {
        for ($x = 1; $x <= 8 - $days_in_this_week; $x++) {
            $calendar .= '<td class="calendar-day-np"> </td>';
        }
    }
    /* final row */
    $calendar .= '</tr>';
    /* end the table */
    $calendar .= '</table>';
    /* all done, return result */
    return $calendar;
}
$month = $_GET['m'];
$year = $_GET['y'];
$monthName = date('F', mktime(0, 0, 0, $month, 10));
echo '<h2>' . $monthName . ' ' . $year . '</h2>';
echo draw_calendar($month, $year);
?>
</body> 
</html>
        if ($_SESSION["Tipo"] != "Promotor") {
            $query = "SELECT id_actividad, id_oportunidad, tipo, subtipo, hora, oportunidad, clave_organizacion, descripcion, color, completa, usuario, DATE_FORMAT(fecha,'%Y-%m-%d') AS fecha FROM actividades WHERE fecha LIKE '{$year}-%{$month}-%'";
        } else {
            $query = "SELECT id_actividad, id_oportunidad, tipo, subtipo, hora, oportunidad, clave_organizacion, descripcion, color, completa, usuario, DATE_FORMAT(fecha,'%Y-%m-%d') AS fecha FROM actividades WHERE fecha LIKE '{$year}-%{$month}-%' AND usuario = '{$claveagente}'";
        }
        $result = mysql_query($query, $db) or die('cannot get results!');
        $result = mysql_query($query, $db) or die('error 2');
        while ($row = mysql_fetch_assoc($result)) {
            $events[$row['fecha']][] = $row;
        }
        //Controles
        $controls = '<form method="get">' . $select_month_control . $select_year_control . '&nbsp;<input type="submit" name="submit" value="Ir" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $previous_month_link . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $next_month_link . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $month_link . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $week_link . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $day_link . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $reporte_link . ' </form>';
        echo '<h2 style="float:left; padding-right:30px;">' . $meses[$month - 1] . ' ' . $year . '</h2>';
        echo '<div style="float:left;">' . $controls . '</div>';
        echo '<div style="clear:both;"></div>';
        echo draw_calendar($month, $year, $events);
    }
}
echo '<br /><br />';
?>
        
        </div>
      </div>
    </div>
  </div>
</div>
<div id="footerbg">
  <div id="footerblank">
    <div id="footer">
      <div id="footerlinks">
      	<a href="" class="footerlinks">Dashboard</a> | 
Exemple #7
0
function show_page()
{
    $curr_ts = mktime(0, 0, 0, isset($_GET['Month']) ? $_GET['Month'] : date('n'), 1, isset($_GET['Year']) ? $_GET['Year'] : date('Y'));
    if ($curr_ts === false) {
        $curr_ts = mktime(0, 0, 0, date('n'), 1);
    }
    $back_ts = strtotime('-1 month', $curr_ts);
    $fwd_ts = strtotime('+1 month', $curr_ts);
    $tsurl = function ($ts) {
        return "Calendar?Month=" . date('n', $ts) . "&amp;Year=" . date('Y', $ts);
    };
    $tstxt = function ($ts) {
        return date('F Y', $ts);
    };
    // Assemble Page
    echo <<<HEREDOC
      <h1>Calendar</h1>
      
\t  <h2 class="text-centered" style="margin: 2px;">{$tstxt($curr_ts)}</h2>
\t  <div class="text-centered small"><a href="Calendar">back to today</a></div>
\t  
      <a href="{$tsurl($back_ts)}" class="left">&lt; {$tstxt($back_ts)}</a>
      <a href="{$tsurl($fwd_ts)}" class="right">{$tstxt($fwd_ts)} &gt;</a>
HEREDOC
 . draw_calendar($curr_ts) . <<<HEREDOC
HEREDOC;
    if (user_access('A')) {
        $title = $date = $desc = '';
        if (array_key_exists('title', $_POST)) {
            $title = htmlentities($_POST['title']);
            $date = htmlentities($_POST['date']);
            $desc = htmlentities($_POST['description']);
        }
        $action = htmlentities($_SERVER['REQUEST_URI']);
        echo <<<HEREDOC
      
      <br /><br />
      
      <h3>Add an Event</h3>
      <form method="post" action="{$action}">
        <table>
          <tr>
            <td>Title:</td>
            <td><input type="text" name="title" value="{$title}" size="25" maxlength="25"/></td>
          </tr><tr>
            <td>Date:</td>
            <td><input type="text" name="date" value="{$date}" size="15" class="datepicker"/></td>
          </tr><tr>
            <td>Description:&nbsp;</td>
            <td><textarea name="description" rows="10" cols="80">{$desc}</textarea></td>
          </tr><tr>
            <td></td>
            <td>
              <input type="hidden" name="xsrf_token" value="{$_SESSION['xsrf_token']}"/>
              <input type="submit" name="do_add_event" value="Add Event"/>
            </td>
          </tr>
        </table>
      </form>
HEREDOC;
    }
}
// wp_list_categories( $args );
?>
						</div>
					<div class="calendar-container">
			        	<?php 
//echo '<span class="ajaxurl">'.admin_url('admin-ajax.php').'</span>';
//$chosenMonth = 0;
//$chosenMonth = htmlspecialchars($_GET["calmonth"]);
/* sample usages */
$today = date("Y/m/d");
$thisYear = date("Y");
$thisMonth = date("m");
//echo '<h2>'. date("Y") .' ' . date("M") . '</h2>';
//echo '<h3>Today is: '. $today .'</h3>';
//echo "Month: " + $thisMonth + '<p>hhh</p>';
echo draw_calendar($thisMonth, $thisYear);
?>
			        	
		        	</div>
		        	<div class="cal-popup">
		        		<div class="cal-popup-inner container">
		        			<div class="cal-scroller">

		        			</div>		        			
		        		</div>
		        	</div>
		        	<div class="col-xs-12 calendar-controls">
			        		<div class="pull-left no-padding"><a href="#" class="cal-prev">Prev Month</a></div>
			        		<div class="pull-right no-padding"><a href="#" class="cal-next">Next Month</a></div>
			        </div>
					<?php 
Exemple #9
0
		<form method = "post" action = "Task2.php">
			<select name="month">
				<option value="1" name = "January">January</option>
				<option value="2">February</option>
				<option value="3">March</option>
				<option value="4">April</option>
				<option value="5">May</option>
				<option value="6">June</option>
				<option value="7">July</option>
				<option value="8">August</option>
				<option value="9">September</option>
				<option value="10">October</option>
				<option value="11">November</option>
				<option value="12">December</option>
			</select>
			<input name="year" type="number" min="1950" max="2100" step="1" />
			<input type = "submit" value="Show"/>
			<br>
		<form/>
		<?php 
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['year']) && $_POST['year'] != "") {
        echo '<h2>' . $_POST["month"] . "." . $_POST["year"] . '</h2>';
        echo draw_calendar($_POST["month"], $_POST["year"]);
    } else {
        echo '<h2>' . 'Type year' . '</h2>';
    }
}
?>
	</body>
</html>
        $running_day++;
        $day_counter++;
    }
    // for $day
    // Finish the rest of the days in the week
    if ($days_in_this_week < 8) {
        for ($x = 1; $x <= 8 - $days_in_this_week; $x++) {
            $calendar .= "<td class='{$css_cal_day_blank}'> </td>";
        }
    }
    // Final row
    $calendar .= "</tr>";
    // End the table
    $calendar .= '</table>';
    // All done, return result
    return $calendar;
}
// function draw_calendar
// // Sample usages
// echo '<h2>June 2015</h2>';
// echo draw_calendar(6, 2015);
// Sample usages with events
$events = [5 => ['text' => "An event for the 5 july 2015", 'href' => "http://example.com/link/to/event"], 23 => ['text' => "An event for the 23 july 2015", 'href' => "/link/to/event"]];
echo "<h2>July 2015</h2>";
echo draw_calendar(7, 2015, $events);
?>

</body>
</html>

Exemple #11
0
    }
} else {
    echo $strClickOnDayToSelect;
}
echo "</p>\n";
echo "<h2>{$strYearView}</h2>";
$pdate = mktime(0, 0, 0, $month, $day, $year - 1);
$ndate = mktime(0, 0, 0, $month, $day, $year + 1);
echo "<p align='center'>";
echo "<a href='{$_SERVER['PHP_SELF']}?display=year&amp;year=" . date('Y', $pdate) . "&amp;month=" . date('m', $pdate) . "&amp;day=" . date('d', $pdate) . "&amp;type={$type}'>&lt;</a> ";
echo date('Y', mktime(0, 0, 0, $month, $day, $year));
echo " <a href='{$_SERVER['PHP_SELF']}?display=year&amp;year=" . date('Y', $ndate) . "&amp;month=" . date('m', $ndate) . "&amp;day=" . date('d', $ndate) . "&amp;type={$type}'>&gt;</a>";
echo "</p>";
echo "<table align='center' border='1' cellpadding='0' cellspacing='0' style='border-collapse:collapse; border-color: #AAA; width: 80%;'>";
$displaymonth = 1;
$displayyear = $year;
for ($r = 1; $r <= 3; $r++) {
    echo "<tr>";
    for ($c = 1; $c <= 4; $c++) {
        echo "<td valign='top' align='center' class='shade1'>";
        draw_calendar($displaymonth, $displayyear);
        echo "</td>";
        if ($displaymonth == 12) {
            $displayyear++;
            $displaymonth = 0;
        }
        $displaymonth++;
    }
    echo "</tr>";
}
echo "</table>";
Exemple #12
0
				<input type="hidden" name="month" value="<?php 
echo $month + 1;
?>
">
				<input type="hidden" name="year" value="<?php 
echo $year;
?>
">
				<input type="submit" class="btn btn-default" value="Next Month">
				</form>
				</span>
			</div>
			<div class="clearfix"></div>
			<br />
			<?php 
echo draw_calendar($month, $year, $result, $admin_user, $date_tod);
?>
		</div>
	</div><!--/row-fluid-->
</div><!--/container-fluid-->

<div class="navbar navbar-inverse navbar-fixed-bottom">
	<div class="navbar-inner">
		<div class="container-fluid">
			<?php 
include 'inc/footer.php';
?>
		</div><!--/container-fluid-->
	</div><!--/navbar-inner-->
</div><!--/navbar-fixed-bottom-->
<!-- JAVASCRIPT -->
Exemple #13
0
            <td>||</td>
            <td><a rel="alternate" href="scheduleRSS.php" title="Scene System Schedule Feed" type="application/rss+xml" />Scene Schedule RSS</a></td>
        </tr>
    </table>
    <?php 
if (!$error) {
    $q = $scenedb->query("SELECT * FROM `{$db_prefix}{$db_schedule}` NATURAL LEFT JOIN `{$db_prefix}{$db_players}` WHERE schedule_id='{$num}'") or die($scenedb->error);
    if (!$q) {
        echo "Something went wrong!";
    }
    while ($schedule = mysqli_fetch_array($q)) {
        scheduleview($schedule);
    }
} else {
    /* $q = mysql_query("SELECT * FROM `scene_schedule` WHERE `time` >= DATE_SUB(NOW(),INTERVAL 1 DAY)") or die(mysql_error());
    		if(!$q)
    			echo "Something went wrong!";
    		while($schedule = mysql_fetch_array($q))
    		{
    			scheduleview($schedule);
    			echo "<br>";
    		} */
    echo "<h1><center>" . date('F, Y') . "</center></h1>";
    echo draw_calendar(date('m'), date('Y'));
    echo "<h1><center>" . date('F, Y', mktime(0, 0, 0, date("m") + 1, date("d"), date("Y"))) . "</center></h1>";
    echo draw_calendar(date('m') + 1, date('Y'));
}
?>
</body>
</html>
function showCalendar($method = 0, $days = 30, $def = '')
{
    echo draw_calendar(time(), time() + 60 * 60 * 24 * $days, $method, $def);
}
Exemple #15
0
        if ($running_day == 6) {
            $calendar .= '</tr>';
            if ($day_counter + 1 != $days_in_month) {
                $calendar .= '<tr class="calendar-row">';
            }
            $running_day = -1;
            $days_in_this_week = 0;
        }
        $days_in_this_week++;
        $running_day++;
        $day_counter++;
    }
    /* Выводим пустые ячейки в конце последней недели */
    if ($days_in_this_week < 8) {
        for ($x = 1; $x <= 8 - $days_in_this_week; $x++) {
            $calendar .= '<td class="calendar-day-np"> </td>';
        }
    }
    /* Закрываем последнюю строку */
    $calendar .= '</tr>';
    /* Закрываем таблицу */
    $calendar .= '</table>';
    /* Все сделано, возвращаем результат */
    return $calendar;
}
/* СПОСОБ ПРИМЕНЕНИЯ */
// echo "<div class='panel panel-default'>";
//    echo "<div class='panel-heading' id='title'>".(date("<b>F Y</b>"))."</div>";
echo date("<b>F Y</b>");
echo draw_calendar(date("d"), date("m"), date("Y"));
//    echo "</div>";
	<?php 
echo draw_calendar(1, 2016);
?>
</div>

<hr>

<h2>Календарь на год</h2>

<?php 
$months = array(0 => 'Январь', 1 => 'Февраль', 2 => 'Март', 3 => 'Апрель', 4 => 'Май', 5 => 'Июнь', 6 => 'Июль', 7 => 'Август', 8 => 'Сентябрь', 9 => 'Октябрь', 10 => 'Ноябрь', 11 => 'Декабрь');
for ($month = 1; $month <= 12; $month++) {
    ?>
		<div class="b-calendar b-calendar--many">
			<div class="b-calendar__title"><span class="b-calendar__month"><?php 
    echo $months[$month - 1];
    ?>
</span> <span class="b-calendar__year">'16</span></div>
			<?php 
    echo draw_calendar($month, 2016);
    ?>
		</div>
	<?php 
}
?>




</body>
</html>
function custblock_func()
{
    echo '<div class="calendar-showup">';
    echo '<ul class="list-grid-style">
		<li><span>View</span></li>
		<li><a class="list-view" href="' . site_url() . '/the-block/concert-calendar/?monthadd=' . date('m') . '&yearadd=' . date('Y') . '"><img src="' . plugins_url('images/list-view.png', __FILE__) . '" /></a></li>
		<li><a class="grid-view" href="' . site_url() . '/the-block/concert-calendar/?typ=full&monthadd=1&yearadd=' . date('Y') . '"><img src="' . plugins_url('images/grid-view.png', __FILE__) . '" /></a></li>
	</ul>';
    echo "<form name='taax1' id='taax1' action='' method='post' class='taxonomy_form'>";
    echo get_cat_frm_taxonomy1('concerttypes');
    echo get_cat_frm_taxonomy2('composers');
    echo "<input type='submit' name='submit' value='View Results' class='taxonomy_submit'/>";
    echo "</form>";
    $val = "The Block";
    $taxonomysearch1 = $_POST['tax1'] != '' ? $_POST['tax1'] : $val;
    $taxonomysearch2 = $_POST['tax2'] != '' ? $_POST['tax2'] : '';
    if ($_GET['typ'] == '' && $_GET['monthadd'] == '') {
        $mmon = date('m');
        $years = date('Y');
        echo '<ul class="month-list-view">
					<li><a href="' . site_url() . '/the-block/concert-calendar/?monthadd=' . $mmon . '&yearadd=' . $years . '">' . date('F', mktime(0, 0, 0, $mmon, 1, $year)) . ' ' . $years . '</a>
						<ul>';
        for ($i = 0; $i < 12; $i++) {
            if ($i == 0) {
                $mmon = $mmon - 1;
            }
            if ($mmon < 10) {
                $mmon = '0' . $mmon;
            }
            echo '<li><a href="' . site_url() . '/the-block/concert-calendar/?monthadd=' . $mmon . '&yearadd=' . $years . '">' . date('F', mktime(0, 0, 0, $mmon, 1, $yrs)) . ' ' . $years . '</a></li>';
            $years = $mmon != 12 ? $years : $years + 1;
            $mmon = $mmon != 12 ? $mmon + 1 : 1;
        }
        echo '</ul>
					</li>
				  </ul>';
        echo draw_calendar(date('m'), date('Y'), $taxonomysearch1, $taxonomysearch2);
    }
    if ($_GET['typ'] == 'full' && $_GET['monthadd'] != '') {
        date_funct_button_sixmon_block();
        $mmon = $_GET['monthadd'];
        $yar = $_GET['yearadd'];
        echo '<div class="calendar-area-full">';
        for ($i = 0; $i < 6; $i++) {
            if ($mmon < 10) {
                $mmon = '0' . $mmon;
            }
            echo '<div class="calendar-panel">';
            echo '<h1>' . date('F', mktime(0, 0, 0, $mmon, 1, $yar)) . '</h1>';
            echo draw_calendar_full($mmon, $yar, $taxonomysearch1, $taxonomysearch2);
            echo '</div>';
            $mmon = $mmon != 12 ? $mmon + 1 : 1;
        }
        echo '<div class="clear"></div></div>';
    }
    if ($_GET['monthadd'] != '' && $_GET['typ'] == '') {
        //date_funct_button();
        $mmon = $_GET['monthadd'];
        $years = $_GET['yearadd'];
        echo '<ul class="month-list-view">
					<li><a href="' . site_url() . '/the-block/concert-calendar/?monthadd=' . $mmon . '&yearadd=' . $years . '">' . date('F', mktime(0, 0, 0, $mmon, 1, $years)) . ' ' . $years . '</a>
						<ul>';
        for ($i = 0; $i < 12; $i++) {
            if ($i == 0) {
                $mmon = $mmon != 1 ? $mmon - 1 : 12;
                //echo $years;
                $years = $mmon != 12 ? $years : $years - 1;
                if ($mmon < 10) {
                    $mmon = '0' . $mmon;
                }
                echo '<li><a href="' . site_url() . '/the-block/concert-calendar/?monthadd=' . $mmon . '&yearadd=' . $years . '">' . date('F', mktime(0, 0, 0, $mmon, 1, $years)) . ' ' . $years . '</a></li>';
                $years = $mmon != 12 ? $years : $years + 1;
                $mmon = $mmon != 12 ? $mmon + 1 : 1;
            }
            if ($i >= 1) {
                if ($mmon < 10) {
                    $mmon = '0' . $mmon;
                }
                echo '<li><a href="' . site_url() . '/the-block/concert-calendar/?monthadd=' . $mmon . '&yearadd=' . $years . '">' . date('F', mktime(0, 0, 0, $mmon, 1, $years)) . ' ' . $years . '</a></li>';
                $years = $mmon != 12 ? $years : $years + 1;
                $mmon = $mmon != 12 ? $mmon + 1 : 1;
            }
        }
        echo '</ul>
					</li>
				  </ul>';
        echo draw_calendar($_GET['monthadd'], $_GET['yearadd'], $taxonomysearch1, $taxonomysearch2);
    }
    echo '</div>';
}
Exemple #18
0
        if ($running_day == 6) {
            $calendar .= '</tr>';
            if ($day_counter + 1 != $days_in_month) {
                $calendar .= '<tr class="calendar-row">';
            }
            $running_day = -1;
            $days_in_this_week = 0;
        }
        $days_in_this_week++;
        $running_day++;
        $day_counter++;
    }
    /* finish the rest of the days in the week */
    if ($days_in_this_week < 8) {
        for ($x = 1; $x <= 8 - $days_in_this_week; $x++) {
            $calendar .= '<td class="calendar-day-np"> </td>';
        }
    }
    /* final row */
    $calendar .= '</tr>';
    /* end the table */
    $calendar .= '</table>';
    /* all done, return result */
    return $calendar;
}
$calendar = draw_calendar(date('m'), date('y'));
if (isset($_POST['nxt']) && isset($_GET['mnth']) == "nxt") {
    $calendar = draw_calendar(date('m') + 1, date('y'));
} else {
    $calendar = draw_calendar(date('m'), date('y'));
}
Exemple #19
0
echo $fgmembersite->GetSelfScript();
?>
' method='post' accept-charset='UTF-8'>
			<input type='hidden' name='submitted' id='submitted' value='1'/>
			<input type='hidden' name='hashtag' id='hashtag' value='#kisii'/>
			<b>Broadcast A Message</b><br/>
			<textarea form="broadcast" name="messageText" id="messageText" class="message-text-field" rows="5" placeholder="Enter your message here"></textarea><br/>
			<span style="float:left">Channels</span><span style="float:right"><button type='submit'>Send Now</button><button type="button">Schedule</button></span><br/>
			<a href="">#kisii</a><br />
			People<br/>
			<a href="">@Oksy</a>, <a href="">@user1</a>, <a href="">@pregnantMother</a>
		</form>
		</div>
		<div class="cal-div">
			<?php 
echo draw_calendar(11, 2015);
?>
		</div>
		<div class="clear"></div>
		<div class="hub-channel-list">
		    <ul class="hub-list">
		        <li class="connect-list-item"><a href="">#infection</a></li>
		        <li class="connect-list-item"><a href="">#pregnancy</a></li>
		        <li class="connect-list-item"><a href="">#diabetes</a></li>
		        <li class="connect-list-item"><a href="">#malaria</a></li>
		        <li class="connect-list-item"><a href="">#maasai</a></li>
		        <li class="connect-list-item"><a href="">#accidents</a></li>
		        <li class="connect-list-item"><a href="">#pneumonia</a></li>
		        <li class="connect-list-item"><a href="">#kisii</a></li>
		        <li class="connect-list-item"><a href="">#expectantMothers</a></li>
		        <li class="connect-list-item"><a href="">#newMothers</a></li>
Exemple #20
0
    $firstmonth = array_shift(array_keys($dayswithevents[$firstyear]));
    $lastyear = array_pop(array_keys($dayswithevents));
    ksort($dayswithevents[$lastyear]);
    $lastmonth = array_pop(array_keys($dayswithevents[$lastyear]));
    // Force current month between first and last
    if (mktime(0, 0, 0, $firstmonth, 1, $firstyear) > time()) {
        $firstmonth = date("m");
        $firstyear = date("Y");
    } elseif (mktime(0, 0, 0, $lastmonth, 1, $lastyear) < mktime(0, 0, 0, date("m"), 1)) {
        $lastmonth = date("m");
        $lastyear = date("Y");
    }
    $year = $firstyear;
    $month = $firstmonth;
    while (strtotime($year . '-' . $month . '-01 00:00:00') <= strtotime($lastyear . '-' . $lastmonth . '-01 00:00:00')) {
        echo draw_calendar(sprintf("%'.02d", $month), $year, $dayswithevents, $calendarurl);
        $month++;
        if ($month > 12) {
            $month -= 12;
            $year++;
        }
    }
    /*
    foreach ($dayswithevents as $year => $months) {
    	foreach ($months as $month => $days) {
    		echo draw_calendar($month,$year,$dayswithevents,$calendarurl);
    	}
    }
    */
    echo '</div>';
}