当前位置: 首页>>代码示例>>PHP>>正文


PHP draw_calendar函数代码示例

本文整理汇总了PHP中draw_calendar函数的典型用法代码示例。如果您正苦于以下问题:PHP draw_calendar函数的具体用法?PHP draw_calendar怎么用?PHP draw_calendar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了draw_calendar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test

 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);
 }
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:9,代码来源:contact.php

示例2: draw_page

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
 } 
开发者ID:rogerapras,项目名称:php_timeclock,代码行数:17,代码来源:qmse.php

示例3: date

    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>
开发者ID:4khil,项目名称:bake,代码行数:31,代码来源:calender.php

示例4: getMonthString

}
?>
                            </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 />
开发者ID:fitrakun,项目名称:AIPA,代码行数:31,代码来源:index.php

示例5: date

            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>
开发者ID:anu-maker-club,项目名称:anumc-reg,代码行数:30,代码来源:cal_survey.php

示例6: DATE_FORMAT

        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> | 
开发者ID:specimen90868,项目名称:crmprueba,代码行数:31,代码来源:calendario.php

示例7: show_page

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;
    }
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:62,代码来源:Calendar.php

示例8: date

// 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 
开发者ID:joewatts000,项目名称:Enable,代码行数:31,代码来源:category-events.php

示例9: draw_calendar

		<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>
开发者ID:kaonkit,项目名称:PHP,代码行数:31,代码来源:Task2.php

示例10: draw_calendar

        $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>

开发者ID:netgloo,项目名称:php-samples,代码行数:29,代码来源:build-calendar.php

示例11: mktime

    }
} 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>";
开发者ID:sitracker,项目名称:sitracker_old,代码行数:31,代码来源:year.inc.php

示例12: draw_calendar

				<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 -->
开发者ID:ahmatjan,项目名称:Crimson,代码行数:31,代码来源:calendar.php

示例13: die

            <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>
开发者ID:noveria158,项目名称:mushcode,代码行数:30,代码来源:schedule.php

示例14: showCalendar

function showCalendar($method = 0, $days = 30, $def = '')
{
    echo draw_calendar(time(), time() + 60 * 60 * 24 * $days, $method, $def);
}
开发者ID:bijuys,项目名称:MemorialFlowers,代码行数:4,代码来源:apps_helper.php

示例15: date

        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>";
开发者ID:byryndyk,项目名称:helly,代码行数:31,代码来源:cal.php


注:本文中的draw_calendar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。