Copyright (C) 2005 James Grant Copyright (C) 2007 David Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> "committee_main.php") ); /* Send a greeting */ echo i18n('Welcome to the new report interface. You can select and save specific reports under specific categories so you can always find the report you need without having to go through the list each time. To begin customizing this list, click on the "Click Here to edit your Report List" link at the bottom of this page. '); echo i18n('The old report list is still available').' '.i18n('here').', but will be deleted in the summer of 2008'; echo '

'; } else { send_header("Edit My Reports", array("Committee Main" => "committee_main.php", "My Reports" => "admin/reports.php") ); } /* Load all the users reports */ $q = mysql_query("SELECT reports_committee.*,reports.name FROM reports_committee LEFT JOIN reports ON reports.id=reports_committee.reports_id WHERE users_id='{$_SESSION['users_id']}' ORDER BY category,id"); echo mysql_error(); if(mysql_num_rows($q) == 0) { echo i18n('You have no reports saved'); } else { /* List each report with info */ if($edit_mode == true) { echo i18n('Deleting all the reports from a category will also delete the category.'); echo '
'; echo '
'; echo ''.i18n('Click here when you are finished editing your report list').''; echo '
'; echo '
'; } echo ''; $last_category = ''; $x=0; while($i = mysql_fetch_object($q)) { $trclass = ($x % 2 == 0) ? "even" : "odd"; $x++; if($last_category != $i->category) { /* New category */ echo '

'; if($edit_mode == true) echo i18n('Category').': '; echo "{$i->category}

"; $last_category = $i->category; } if($i->reports_id > 0) { $name = $i->name; $url = "admin/reports_gen.php?id={$i->reports_id}&show_options=1"; } else { $name = $report_custom[-$i->reports_id]['name']; $url = $report_custom[-$i->reports_id]['custom_url']; } if($edit_mode == false) $name = "$name"; echo "
"; echo "'; /* if($i->reports_id > 0) { echo ''; } */ echo ""; echo "
"; if($edit_mode == true) echo "id}\">\"Remove "; echo $name.'
'; echo ''; echo i18n('Format').": {$i->format}, "; echo i18n('Paper').": {$report_stock[$i->stock]['name']}, "; echo i18n('Year').": {$config['FAIRYEAR']}"; echo ''; echo '
{$i->comment}
"; } } /* Load available reports */ $reports = report_load_all(); if($edit_mode == false) { echo '
'; echo ''.i18n('Click here to edit your Report List').''; echo '
'; echo "

".i18n("All Reports")."

"; /* Print all the reports in a pulldown menu for generation */ echo "
"; echo ""; echo ""; echo "
"; echo "
"; send_footer(); exit; } echo '
'; ?> '.i18n('Add a Report to your Report List').''; echo "
"; echo ""; echo "\n"; echo '"; echo ""; /* Load the full specific report */ if($reports_id > 0) $report = report_load($reports_id); $option_keys = array('type','stock'); foreach($report_options as $ok=>$o) { if(!in_array($ok, $option_keys)) continue; echo ""; echo ""; } echo ""; echo ""; echo '
'; echo "
Category:"; $q = mysql_query("SELECT DISTINCT category FROM reports_committee WHERE users_id='{$_SESSION['users_id']}' ORDER BY category"); echo "Existing Category:
"; echo "OR New Category: "; echo "
{$o['desc']}:
Comments:"; echo "
'; echo '
'; echo '

Descriptions for All Reports

'; echo i18n('Click on the report number to try the report with the default report options before you add it to your Report List'); echo '

'; echo "\n"; $x=0; foreach(array_merge($reports, $report_custom) as $r) { $trclass = ($x % 2 == 0) ? "even" : "odd"; $x++; echo ""; if($r['custom_url'] == '') { $url = "admin/reports_gen.php?id={$r['id']}"; } else { $url = $r['custom_url']; } echo ""; echo ""; } echo "
$x."; echo ""; echo ""; echo ""; echo "
{$r['name']}Created By: {$r['creator']}
{$r['desc']}
"; echo "
"; send_footer(); ?>