WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Calendars to choose a range of dates , reservation events ...
Categories : PHP, Calendar, Java Script, Date Time Click here to Update Your Picture
patricia benedetto
Date : Jan 08th 2007
Grade : 2 of 5 (graded 3 times)
Viewed : 15335
File : 4562.inc
Images : Image 1
Search : More code by patricia benedetto
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

This is a raw and simple example with only two clicks on the calendars (beginning and end)

You will get
$beg : start date.
$end : end date
$c1 unix time in second (start)
$c2 unix time in second (end)

So it's very simple to use those variables to select a range of records between a starting date and an ending date from a database.
This code has to be adapted for US date (if you are from the USA) and use some style sheet to improve the look 'n feel.

I'm planning to rewrite the code so that a single calendar will be used.

The use of this example is to quickly choose a range of dates to browse between events. For example, someone may what to get documents edited between a date and another in archives or someone may what to browse rapidly to choose a range to reserve a travel ticket.


Usage Example (test.php):
<?
if( ! defined ("BZ_calendar") ) include "lib/BZ_calendar.inc";
if (
$time=='' ) $time = time();
if ( !isset (
$c1 )) $c1 = $time ;
if ( !isset (
$c2 )) $c2 = $time ;
if (!isset (
$beg ) ) $beg = date("Y-m-d", $time);
if (!isset (
$end ) ) $end = date("Y-m-d", $time);
if (
$cal == 1 && $c2 < $c1 ) $c2 = $c1 ;
if (
$cal == 2 && $c2 < $c1 ) $c1 = $c2 ;
$cal1= new BZ_calendar( 1 , $beg , $end ) ;
$cal2 = new BZ_calendar( 2 , $beg , $end ) ;

$cal1->draw("test.php" , $c1 ,$c2 );

$cal2->draw("test.php" , $c1 ,$c2 );
?>

sample
http://patricia.benedetto.free.fr/test.php?beg=2007-01-08&end=2007-01-19&cal=2&c2=1168260569&c1=1168260569



enhanced date picker with jcript checking for a dynamic date input
Categories : PHP, Java Script, Date Time, Calendar, Arrays
PHP Calendar
Categories : PHP, Calendar, Date Time, Java Script, CSS
Calendar class on the same page , suitable for reservation
Categories : PHP, Calendar, Date Time
Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first day name of the month, occurrences of Sun, occurrences of Mon, etc. Allows you to calculate number of working hours exclude Holidays.
Categories : Calendar, Date Time, PHP, Databases, MySQL
CALENDAR - easy calendar-navigation with PHP
Categories : PHP, Date Time, HTML and PHP, Calendar
A simple and fast calendar combining PHP and tables. Use this as a base for applications in which a calendar is needed.
Categories : Date Time, PHP, Complete Programs, Calendar
Local-to-user date and time display regardless of time zone or where the website's server is located
Categories : PHP, Date Time, HTML and PHP, Java Script
Dynamic Calendar in PHP, Javascript and HTML.
Categories : PHP, Java Script, HTML and PHP, Calendar
PHP Calendar Web App
Categories : PHP, Databases, MySQL, Date Time, Calendar
Local Time clock and Server time usign PHP and JavaScript
Categories : PHP, Java Script, Date Time, Beginner Guides
Javascript Date Picker
Categories : Java Script, Date Time, Calendar
Simple PHP control CSS Calendar
Categories : PHP, HTML and PHP, Calendar, Date Time, CSS
table calendar pretty much does what cal(1) does - prints out a calendar.
Categories : Date Time, PHP, Calendar
Shows the current time as a PNG-image. This script does not use the GD library. You can use it as a benchmark (because it's slow), or as a quick reference for implementing a simple PNG-file generator.
Categories : Graphics, Zlib, Calendar, PHP, Date Time
Customizable Calendar Class
Categories : HTML and PHP, Date Time, PHP, PHP Classes, Calendar
 Walter Torres wrote :1675
OK, nice idea, but I don`t think I want to use code off his web site each time I want to use this.

I full demo package would be nice