Ejemplo n.º 1
0
 /** Index page showing calendrical interface to dates of recording
  */
 public function indexAction()
 {
     $date = $this->_getParam('date') ? $this->_getParam('date') : $this->getTimeForForms();
     $this->view->years = $this->years();
     $calendar = new Calendar($date);
     $cases = new Finds();
     $cases = $cases->getFindsByDay();
     $lists = array();
     foreach ($cases as $value) {
         $lists[] = $value['createdOn'];
     }
     $caseslisted = $lists;
     $calendar->highlighted_dates = $caseslisted;
     $calendar->formatted_link_to = $this->view->baseUrl() . '/database/search/results/created/%Y-%m-%d';
     print '<div id="calendar">';
     print "<ul id=\"year\">\n";
     for ($i = 1; $i <= 12; $i++) {
         print "<li>";
         if ($i == $calendar->month) {
             print $calendar->output_calendar();
         } else {
             print $calendar->output_calendar($calendar->year, $i);
         }
         print "</li>\n";
     }
     print "</ul></div>";
 }
Ejemplo n.º 2
0
 /** Index page showing calendrical interface to dates of recording
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $date = $this->getParam('date') ? $this->getParam('date') : $this->getTimeForForms();
     $calendar = new Calendar($date);
     $cases = $this->_finds->getFindsByDay();
     $lists = array();
     foreach ($cases as $value) {
         $lists[] = $value['createdOn'];
     }
     $calendar->highlighted_dates = $lists;
     $calendar->formatted_link_to = $this->view->baseUrl() . '/database/search/results/created/%Y-%m-%d';
     print '<div id="calendar">';
     for ($i = 1; $i <= 12; $i++) {
         if ($i == $calendar->month) {
             print $calendar->output_calendar(null, null, 'table table-striped');
         } else {
             print $calendar->output_calendar($calendar->year, $i, 'table table-striped');
         }
     }
     print "</div>";
 }
Ejemplo n.º 3
0
 /**
  * Render data for view on index action
  */
 function indexAction()
 {
     $this->view->headTitle('Events at the Scheme');
     $content = new Content();
     $this->view->contents = $content->getFrontContent('events');
     $year = strftime("%Y", strtotime(Zend_Date::now()->toString('yyyy-MM-dd')));
     $this->view->year = $year;
     $adults = new Events();
     $this->view->adults = $adults->getAttendanceAdults($year . '-01-01', $year . '-12-31');
     $eventsList = new Events();
     $eventsListed = $eventsList->getUpcomingEvents();
     $calendar = new Calendar();
     $lists = array();
     foreach ($eventsListed as $value) {
         $lists[] = $value['eventStartDate'];
     }
     $listedDates = $lists;
     $calendar->highlighted_dates = $listedDates;
     $url = $this->view->url(array('module' => 'events', 'controller' => 'upcoming', 'action' => 'index'), 'upcoming', true);
     $calendar->formatted_link_to = $url . '/%Y-%m-%d';
     $cal = '<div id="calendars" style="float:right;margin-top:100px;margin-left:10px;">' . $calendar->output_calendar() . '</div>';
     $this->view->cal = $cal;
 }
@include('vendor.calendar')
<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-4">
      
<?php 
$calendar = new Calendar(null, null, null, $orders);
for ($i = 1; $i <= 12; $i++) {
    //echo "string";
    print "<li>" . $calendar->output_calendar("2015", $i) . "</li>";
}
?>

</ul>
//-------------------------------------------------------- start weeks on Monday
$calendar->week_start_on = 1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>calendar.class.php - Example New Version 2.5 Feature - Specify Start of Week</title>
<style type="text/css">
<!--
@import url("base_calendar_style.css");
-->
</style>
</head>

<body>
<?php 
//-------------------------------------------------------------- output calendar
print $calendar->output_calendar();
?>

<p><a href="index.html">back to examples</a></p>
</body>
</html>
<!--
calendar.class.php v2.5
copyright © 2008 Jim Mayes
licensed under: Creative Commons Attribution-Share Alike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
This class may not be used for commercial purposes without written consent.
Visit style-vs-substance.com for information and updates
-->
@include('vendor.calendar')

<ul class="small-block-grid-1 medium-block-grid-1 large-block-grid-1">

<?php 
$calendar = new Calendar($date, NULL, NULL, $orders, $capacity);
print "<li>" . $calendar->output_calendar() . "</li>";
?>

</ul>
Ejemplo n.º 7
0
 /**
  * Render data for view on year archive action
  */
 public function yearAction()
 {
     $date = $this->_getParam('date') . '-01-01' ? $this->_getParam('date') . '-01-01' : Zend_Date::now()->toString('yyyy-MM-dd');
     $current_year = date('Y');
     if ($date < $current_year) {
         $this->_flashMessenger->addMessage('As you chose a date in the past, you have been sent to the archive');
         $this->_redirect('events/archives/year/date/' . $date);
     }
     $years = range($current_year, $current_year + 2);
     $yearslist = array();
     foreach ($years as $key => $value) {
         $yearslist[] = array('year' => $value);
     }
     $list = $yearslist;
     $this->view->years = $list;
     $calendar = new Calendar($date);
     $cases = new Events();
     $cases = $cases->getEventsByDayFuture();
     $lists = array();
     foreach ($cases as $value) {
         $lists[] = $value['eventStartDate'];
     }
     $caseslisted = $lists;
     $calendar->highlighted_dates = $caseslisted;
     $url = $this->view->url(array('module' => 'events', 'controller' => 'upcoming', 'action' => 'list'), null, true);
     $calendar->formatted_link_to = $url . '/day/%Y-%m-%d';
     print '<div id="calendar">';
     print "<ul id=\"year\">\n";
     for ($i = 1; $i <= 12; $i++) {
         print "<li>";
         if ($i == $calendar->month) {
             print $calendar->output_calendar();
         } else {
             print $calendar->output_calendar($calendar->year, $i);
         }
         print "</li>\n";
     }
     print "</ul></div>";
 }
Ejemplo n.º 8
0
 /** Return data for the archive by years
  */
 public function yearAction()
 {
     $date = $this->_getParam('date') . '-01-01' ? $this->_getParam('date') . '-01-01' : Zend_Date::now()->toString('yyyy-MM-dd');
     $this->view->date = substr($date, 0, 4);
     $current_year = date('Y');
     $years = range(1998, $current_year);
     $yearslist = array();
     foreach ($years as $key => $value) {
         $yearslist[] = array('year' => $value);
     }
     $list = $yearslist;
     $this->view->years = $list;
     $calendar = new Calendar($date);
     $cases = new Events();
     $cases = $cases->getEventsByDayPast();
     $lists = array();
     foreach ($cases as $value) {
         $lists[] = $value['eventStartDate'];
     }
     $caseslisted = $lists;
     $calendar->highlighted_dates = $caseslisted;
     $url = $this->view->url(array('module' => 'events', 'controller' => 'archives', 'action' => 'list'), null, true);
     $calendar->formatted_link_to = $url . '/day/%Y-%m-%d';
     print '<div id="calendar">';
     print "<ul id=\"year\">\n";
     for ($i = 1; $i <= 12; $i++) {
         print "<li>";
         if ($i == $calendar->month) {
             print $calendar->output_calendar();
         } else {
             print $calendar->output_calendar($calendar->year, $i);
         }
         print "</li>\n";
     }
     print "</ul></div>";
 }
Ejemplo n.º 9
0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>calendar.class.php - Example 8 - Full Year-at-a-time Calendar</title>
<style type="text/css">
<!--
@import url("base_calendar_style.css");
-->
</style>
</head>

<body>
<?php 
//-------------------------------------------------------------- output calendar
print "<ol id=\"year\">\n";
for ($i = 1; $i <= 12; $i++) {
    print "<li>";
    print $calendar->output_calendar($calendar->year, $i);
    print "</li>\n";
}
print "</ol>";
?>

<p><a href="index.html">back to examples</a></p>
</body>
</html>
<!--
calendar.class.php v2.0
copyright © 2007 Jim Mayes
licensed under: Creative Commons Attribution-Share Alike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
This class may not be used for commercial purposes without written consent.
Visit style-vs-substance.com for information and updates
-->
Ejemplo n.º 10
0
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>calendar.class.php - Example 7 - Previous, Current and Next Months</title>
<style type="text/css">
<!--
@import url("base_calendar_style.css");
-->
</style>
</head>

<body>
<?php 
//-------------------------------------------------------------- output calendar
print $calendar->output_calendar($previous_year, $previous_month);
print $calendar->output_calendar();
print $calendar->output_calendar($next_year, $next_month);
?>

<p><a href="index.html">back to examples</a></p>
</body>
</html>
<!--
calendar.class.php v2.0
copyright © 2007 Jim Mayes
licensed under: Creative Commons Attribution-Share Alike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
This class may not be used for commercial purposes without written consent.
Visit style-vs-substance.com for information and updates
-->
@include('vendor.calendar')

<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-6">
      
<?php 
$calendar = new Calendar(null, null, null, $orders, $capacity);
for ($i = 1; $i <= 12; $i++) {
    //echo "string";
    print "<li>" . $calendar->output_calendar($date->year, $i) . "</li>";
}
?>

</ul>