View of /com_supacart/trunk/admin_files/classes/ps_reportbasic.php
Parent Directory
|
Revision Log
Revision 4 -
(download)
(annotate)
Tue Aug 4 12:46:30 2009 UTC (3 years, 10 months ago) by andphe
File size: 2381 byte(s)
Tue Aug 4 12:46:30 2009 UTC (3 years, 10 months ago) by andphe
File size: 2381 byte(s)
+ adding first set of files for version control
<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); /** * * @version $Id: ps_reportbasic.php 617 2007-01-04 19:43:08Z soeren_nb $ * @package SupaCart * @subpackage classes * See COPYRIGHT.php for copyright notices and details. * @license GNU/GPL Version 2, see LICENSE.php * SupaCart is free software, originally derived from Virtuemart. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_supacart/COPYRIGHT.php for copyright notices and details. * * http://www.supacart.com */ class nh_report { var $classname = "nh_report"; /************************************************************************** ** name: make_date_popups ** created by: nhyde ** description: prints month, day, and year popups ** parameters: menu_name string to append to select names ** sel_date int in YYYYMMDD format ** returns: True ***************************************************************************/ function make_date_popups ($menu_name='', $sel_date = '') { // prepare vars for printing select menus $yr = date("Y"); $eta_year = 0; $popup = '<select name="'. $menu_name . 'month">'; // BEGIN print month popup for ($i = 1; $i <= 12; $i++) { $t_month = sprintf("%02d", $i); $popup .= "\n\t".'<option value="'.$t_month.'"'; if ($t_month == $sel_date["month"]) { $popup .= " selected='selected'"; } $popup .= '>'.date("F", mktime(0,0,0,$t_month,01,$eta_year)); } $popup .= "\n"; // end print month popup $popup .= "</select>\n\t".'<select name="'. $menu_name . 'day">'; for ($i=1;$i<=31;$i++) { $t_day = sprintf("%02d", $i); $popup .= "\n\t<option value=\"".$t_day.'"'; if ($t_day == $sel_date["day"]) { $popup .= ' selected="selected"'; } $popup .= '>'.$i; } $popup .= "\n"; $popup .= "</select>\n\t".'<select name="'. $menu_name . 'year">'; for ($i = -3; $i<=0; $i++) { $print_year = ($yr+$i); $popup .= "\n\t".'<option value="'.$print_year.'"'; if ($print_year == $sel_date["year"]) { $popup .= ' selected="selected"'; } $popup .= '>'.$print_year; } $popup .= "\n"; $popup .= '</select><br/>'; echo $popup; return True; } } ?>
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

