示例#1
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" xml:lang="en" lang="en">
<head>
<title>Demo theme - Small Calendar</title>
</head>

<body>

<h2>PHP Quick Calender Demo - Small Calendar</h2>
<p>Very useful for most apps. Looks good when sits on the left or right column. Mouseover the links shows the short description.</p>

<?php 
require_once '../../controller.php';
$cssCalendar = 'float:left;margin-right:30px;';
$cssLongDesc = 'float:left;margin-left:50px;width:400px';
// configure calendar theme
initQCalendar('small', 'qCalendarSmall', $cssCalendar, 'myContentSmall', $cssLongDesc, 0, 0, 0, 0, 0);
?>

</body>
</html>
示例#2
0
    foreach ($rw as $k => $v) {
        $view[$k] = $v;
    }
    // calls the required model
    require_once QCALENDAR_SYS_PATH . "/themes/{$_GET['theme']}/model/Longdesc.php";
    $classname = 'Longdesc' . ucfirst($_GET['theme']);
    $longdesc = new $classname($view, $_GET['theme']);
    $longdesc->render();
    exit;
}
// if user clicks on cell links to display many events
if (!isset($_GET['divCalendar']) && isset($_GET['m'])) {
    $sql = "SELECT q.day, q.month, q.year, q.link, q.hr, q.min, c.short_desc as category, q.short_desc, q.long_desc, q.short_desc_image, q.long_desc_image FROM " . QCALENDAR_TABLE . " as q, " . QCALENDAR_CAT_TABLE . " as c WHERE q.category_id=c.id AND IF ({$_GET['c']}!= 0, c.id = '{$_GET['c']}', 1) AND q.active='1' AND ((q.day = '{$_GET['d']}' && q.month='{$_GET['m']}' AND q.year='{$_GET['y']}') || (q.day = '{$_GET['d']}' && q.month='*' AND q.year='{$_GET['y']}') || (q.day = '{$_GET['d']}' && q.month='{$_GET['m']}' AND q.year='*') || (q.day = '*' && q.month='{$_GET['m']}' AND q.year='{$_GET['y']}') || (q.day = '*' && q.month='{$_GET['m']}' AND q.year='{$_GET['y']}') || (q.day = '*' && q.month='*' AND q.year='*') || (q.day = '{$_GET['d']}' && q.month='*' AND q.year='*') || (q.day = '*' && q.month='{$_GET['m']}' AND q.year='*') || (q.day = '*' && q.month='*' AND q.year='{$_GET['y']}')) order by q.hr asc, q.min asc";
    $rs = mysql_query($sql);
    while ($rw = mysql_fetch_assoc($rs)) {
        foreach ($rw as $k => $v) {
            $view[$k][] = $v;
        }
    }
    // calls the required model
    require_once QCALENDAR_SYS_PATH . "/themes/{$_GET['theme']}/model/Longdesc.php";
    $classname = 'Longdesc' . ucfirst($_GET['theme']);
    $longdesc = new $classname($view, $_GET['theme']);
    $longdesc->render();
    exit;
}
// if user clicks on month or year navigation, re-render calendar
if (isset($_GET['divCalendar']) && isset($_GET['m'])) {
    initQCalendar($_GET['theme'], $_GET['divCalendar'], '', $_GET['divLongDesc'], '', $_GET['d'], $_GET['m'], $_GET['y'], $_GET['c'], 1);
    exit;
}
示例#3
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" xml:lang="en" lang="en">
<head>
<title>Demo theme - Two Column Calendar</title>

</head>

<body>

<h2>PHP Quick Calender Demo - Two Column</h2>
<p>Displays the whole month in two columns. Good for events planning. If you are using the latest firefox or safari, you see see the CSS3 curved borders...yay!</p>
<?php 
require_once '../../controller.php';
$cssCalendar = 'float:left';
$cssLongDesc = 'width:400px;overflow:auto;z-index:10;position:absolute;border:1px solid #0066FF; background-color:#FFFFFF; visibility:hidden;';
// configure calendar theme
initQCalendar('twocolumn', 'qCalendarTwoColumn', $cssCalendar, 'myContentTwoColumn', $cssLongDesc, 0, 0, 0, 0, 0);
?>

</body>
</html>
示例#4
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" xml:lang="en" lang="en">
<head>

<title>Demo theme - Plain Calendar</title>

</head>

<body>

<h2>PHP Quick Calender Demo - Plain Calendar</h2>
<p>Shows basic functionality without header and footer. Added abit of mouseover effects.</p>

<?php 
require_once '../../controller.php';
$cssCalendar = 'float:left;border: 1px dashed #ddd;';
$cssLongDesc = 'width:300px;overflow:auto;z-index:10;position:absolute;border:1px solid #333; background-color:#fff; visibility:hidden;padding:5px;';
// configure calendar theme
initQCalendar('plain', 'qCalendarPlain', $cssCalendar, 'myContentPlain', $cssLongDesc, 0, 0, 0, 0, 0);
?>

</body>
</html>
示例#5
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" xml:lang="en" lang="en">
<head>

<title>Demo theme - Standard Calendar</title>

</head>

<body>

<h2>PHP Quick Calender Demo - Large Standard Calendar</h2>
<p>Gives an overview of events and happenings in a month.</p>
<?php 
require_once '../../controller.php';
$cssCalendar = 'float:left;margin-left:40px;';
$cssLongDesc = 'float:right;padding-left:20px;width:300px';
initQCalendar('standard', 'qCalendarStandard', $cssCalendar, 'myContentStandard', $cssLongDesc, 0, 0, 0, 0, 0);
?>

</body>
</html>
示例#6
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" xml:lang="en" lang="en">
<head>

<title>Demo theme - Multiple Calendars</title>

</head>

<body>

<h2>PHP Quick Calender Demo - Multiple calendars</h2>
<p>Display multiple calendars at a time using simple for-loop. With abit of CSS styling, noticed all the calendar has the same height irregardless of the number of weeks in a month.</p>
<?php 
require_once '../../controller.php';
for ($i = 1; $i < 13; $i++) {
    // configure calendar theme
    echo "<div style='float:left; margin-right:20px;margin-bottom:20px;border:1px dashed red; vertical-align:top;height:180px;'>";
    $cssCalendar = '';
    $cssLongDesc = 'width:300px;overflow:auto;z-index:10;position:absolute;border:1px solid #333; background-color:#fff; visibility:hidden;padding:5px;';
    initQCalendar('plain', 'qCalendar' . $i, $cssCalendar, 'myContent' . $i, $cssLongDesc, 0, $i, '2009', 0, 0);
    echo "</div>";
}
?>

</body>
</html>
示例#7
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" xml:lang="en" lang="en">
<head>
<title>Demo theme - Rounded Calendar</title>

</head>

<body>

<h2>PHP Quick Calender Demo - Rounded Corners</h2>
<p>Smiliar to the small calendar but with some css trick and floating div. Noticed that the start of week starts from Wednesday. Kinda stupid but shows how the calendar can be easily configured.</p>

<?php 
require_once '../../controller.php';
// configure calendar theme
$cssCalendar = '';
$cssLongDesc = 'width:300px;overflow:auto;z-index:10;position:absolute;border:1px solid #333; background-color:#FFCCCC; visibility:hidden;padding:5px;';
initQCalendar('rounded', 'qCalendarRounded', $cssCalendar, 'myContentRounded', $cssLongDesc, 0, 0, 0, 0, 0);
?>

</body>
</html>
示例#8
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" xml:lang="en" lang="en">
<head>
<title>Demo theme - Tiny Calendar</title>
</head>

<body>
<h2>PHP Quick Calender Demo - Tiny Calendar</h2>
<p>Really small calendar. Only hightlight days when there are events.</p>
<?php 
require_once '../../controller.php';
$cssCalendar = 'float:left;border: 1px solid #efefef;';
$cssLongDesc = '';
// configure calendar theme
initQCalendar('tiny', 'qCalendarPlain', $cssCalendar, 'qCalendarLongDesc', $cssLongDesc, 0, 0, 0, 0, 0);
?>
</body>
</html>
示例#9
0
<?php 
$cssCalendar = 'float:left';
$cssLongDesc = 'width:400px;overflow:auto;z-index:10;position:absolute;border:1px solid #0066FF; background-color:#FFFFFF; visibility:hidden;';
// configure calendar theme
initQCalendar('twocolumn', 'qCalendarTwoColumn', $cssCalendar, 'myContentTwoColumn', $cssLongDesc, 0, $month, $year, $cat_id, 0);
?>
</div>

<div style="float:left;padding-left:20px;">
<?php 
$mon = $month;
$y = $year;
$monthDisplay = 3;
for ($i = $month; $i < $month + $monthDisplay; $i++) {
    // configure calendar theme
    echo "<div style='margin-right:10px;margin-bottom:10px;border:1px solid blue;'>";
    $cssCalendar = '';
    $cssLongDesc = '';
    $mon = $i;
    if ($i > 12) {
        $y = $year + 1;
        $mon = $i - 12;
    }
    initQCalendar('tiny', 'qCalendarTiny' . $i, $cssCalendar, 'myContentTiny' . $i, $cssLongDesc, 0, $mon, $y, $cat_id, 0);
    echo "</div><div style='clear:both'></div>";
}
?>
</div>
</body>
</html>