summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-07 09:39:24 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-07 09:39:24 +0000
commit873c2c27c91e4d64fd2ec3f07e3de47caf8e076b (patch)
treeb1ebafe6f83091c0950e3ade908dca02310a51a3 /phpfspot.class.php
parent169c44bec7e0f9d00be93ace7bfc94deff7da0cd (diff)
some code for issue24
git-svn-id: file:///var/lib/svn/phpfspot/trunk@174 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php41
1 files changed, 40 insertions, 1 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 0047f90..92a0199 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -55,6 +55,8 @@ class PHPFSPOT {
$this->tmpl->assign('searchfor', $_SESSION['searchfor']);
$this->tmpl->assign('page_title', $this->cfg->page_title);
$this->tmpl->assign('current_condition', $_SESSION['tag_condition']);
+ $this->tmpl->assign('from_date', $this->get_calendar());
+ $this->tmpl->assign('to_date', $this->get_calendar());
switch($_GET['mode']) {
case 'showpi':
@@ -1022,10 +1024,15 @@ class PHPFSPOT {
/* Check for HTML_AJAX PEAR package, lent from Horde project */
ini_set('track_errors', 1);
@include_once 'HTML/AJAX/Server.php';
- if(isset($php_errormsg)) {
+ if(isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
print "PEAR HTML_AJAX package is missing<br />\n";
$missing = true;
}
+ @include_once 'Calendar/Calendar.php';
+ if(isset($php_errormsg) && preg_match('/Failed opening.*for inclusion/i', $php_errormsg)) {
+ print "PEAR Calendar package is missing<br />\n";
+ $missing = true;
+ }
ini_restore('track_errors');
if(isset($missing))
@@ -1059,6 +1066,38 @@ class PHPFSPOT {
} // _warning()
+ private function get_calendar()
+ {
+// require_once CALENDAR_ROOT.'Year.php';
+// require_once CALENDAR_ROOT.'Month.php';
+// require_once CALENDAR_ROOT.'Day.php';
+
+// $Year = new Calendar_Year();
+// $Month = new Calendar_Month();
+// $Day = new Calendar_Day();
+
+ $output = "<select name=\"year\">\n";
+ for($year = 1990; $year <= date("Y"); $year++) {
+ $output.= "<option value=\"". $year ."\">". $year ."</option>\n";
+ }
+ $output.= "</select>\n";
+
+ $output.= "<select name=\"month\">\n";
+ for($month = 1; $month <= 12; $month++) {
+ $output.= "<option value=\"". $month ."\">". $month ."</option>\n";
+ }
+ $output.= "</select>\n";
+
+ $output.= "<select name=\"day\">\n";
+ for($day = 1; $day <= 31; $day++) {
+ $output.= "<option value=\"". $day ."\">". $day ."</option>\n";
+ }
+ $output.= "</select>\n";
+
+ return $output;
+
+ } // get_calendar()
+
}
?>