本文整理汇总了PHP中Calendar::draw方法的典型用法代码示例。如果您正苦于以下问题:PHP Calendar::draw方法的具体用法?PHP Calendar::draw怎么用?PHP Calendar::draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calendar
的用法示例。
在下文中一共展示了Calendar::draw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Calendar
width: 30px;
height: 30px;
text-align: center;
font-size: 15px;
box-sizing: border-box;
}
div.year-welcome-msg {
text-align: center;
font-size: 50px;
}
thead.month-text {
font-size: 20px;
}
td.table-cells-weekends {
color: red;
}
</style>
</head>
<body>
<?php
require_once 'Calendar.php';
$calendar = new Calendar(2014);
$calendar->draw();
?>
</body>
</html>
示例2: AND
// 0=sun, 1=mon
$cal->set_conf(array('show_timeurl' => false));
$first = $cal->first_date();
$last = $cal->last_date();
// populate the calendar with days that have awards
$list = $ps->db->fetch_rows(1, "SELECT awarddate,awardrange FROM {$ps->t_awards} WHERE awardrange <> 'week' AND (awarddate BETWEEN '{$first}' AND '{$last}') {$andplr} GROUP BY awarddate");
foreach ($list as $day) {
$cal->day($day['awarddate'], array('link' => ps_url_wrapper(array('v' => $day['awardrange'], 'd' => $day['awarddate'], 'p' => $p))));
}
$list = $ps->db->fetch_rows(1, "SELECT awarddate FROM {$ps->t_awards} WHERE awardrange='week' AND (awarddate BETWEEN '{$first}' AND '{$last}') {$andplr} GROUP BY awarddate");
foreach ($list as $week) {
$cal->week($week['awarddate'], array('link' => ps_url_wrapper(array('v' => 'week', 'd' => $week['awarddate'], 'p' => $p))));
}
// select the week on the calendar so it highlights the week instead of the 1st day
$cal->selected($v);
$cms->theme->assign('calendar', $cal->draw());
// load the awards for the date specified (for all players; not just the selected one if $p is selected)
$list = $ps->db->fetch_rows(1, "SELECT a.*,ac.phrase,ac.negative,ac.format,ac.rankedonly,ac.description,p.*,pp.* " . "FROM {$ps->t_awards} a, {$ps->t_config_awards} ac, {$ps->t_plr} p, {$ps->t_plr_profile} pp " . "WHERE ac.id=a.awardid AND p.plrid=a.topplrid AND pp.uniqueid=p.uniqueid AND awardrange='{$v}' AND awarddate='{$d}' " . "ORDER BY idx,awardtype,awardname");
$awards = array();
foreach ($list as $a) {
if ($a['interpolate']) {
$ary = unserialize($a['interpolate']);
if (is_array($ary)) {
$a = array_merge($a, $ary);
}
unset($ary);
}
$awards[$a['awardtype']][] = $a;
// if ($a['awardtype'] == 'player') {
// $awards[ $a['awardtype'] ][] = $a;
// } else {
示例3: Calendar
?>
" value="M" checked="">
Male</label>
</div><div class="radio">
<label class="radio-inline">
<input type="radio" name="stu_gender_<?php
echo $i;
?>
" value="F">
Female</label>
</div>
<label>Date of birth*</label>
<div class="datepick">
<?php
$cal1 = new Calendar('b', 1);
$cal1->draw();
?>
<input type="hidden" name="stu_dob_<?php
echo $i;
?>
" required="">
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
<input type="hidden" name="school_id" value="<?php