File Annotation
Not logged in
0edee97370 2007-10-03       drh: /*
0edee97370 2007-10-03       drh: ** Copyright (c) 2007 D. Richard Hipp
0edee97370 2007-10-03       drh: **
0edee97370 2007-10-03       drh: ** This program is free software; you can redistribute it and/or
0edee97370 2007-10-03       drh: ** modify it under the terms of the GNU General Public
0edee97370 2007-10-03       drh: ** License version 2 as published by the Free Software Foundation.
0edee97370 2007-10-03       drh: **
0edee97370 2007-10-03       drh: ** This program is distributed in the hope that it will be useful,
0edee97370 2007-10-03       drh: ** but WITHOUT ANY WARRANTY; without even the implied warranty of
0edee97370 2007-10-03       drh: ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0edee97370 2007-10-03       drh: ** General Public License for more details.
0edee97370 2007-10-03       drh: **
0edee97370 2007-10-03       drh: ** You should have received a copy of the GNU General Public
0edee97370 2007-10-03       drh: ** License along with this library; if not, write to the
0edee97370 2007-10-03       drh: ** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0edee97370 2007-10-03       drh: ** Boston, MA  02111-1307, USA.
0edee97370 2007-10-03       drh: **
0edee97370 2007-10-03       drh: ** Author contact information:
0edee97370 2007-10-03       drh: **   drh@hwaci.com
0edee97370 2007-10-03       drh: **   http://www.hwaci.com/drh/
0edee97370 2007-10-03       drh: **
0edee97370 2007-10-03       drh: *******************************************************************************
0edee97370 2007-10-03       drh: **
0edee97370 2007-10-03       drh: ** This file contains code to implement the ticket configuration
0edee97370 2007-10-03       drh: ** setup screens.
0edee97370 2007-10-03       drh: */
0edee97370 2007-10-03       drh: #include "config.h"
0edee97370 2007-10-03       drh: #include "tktsetup.h"
0edee97370 2007-10-03       drh: #include <assert.h>
0edee97370 2007-10-03       drh: 
0edee97370 2007-10-03       drh: /*
0edee97370 2007-10-03       drh: ** Main sub-menu for configuring the ticketing system.
0edee97370 2007-10-03       drh: ** WEBPAGE: /tktsetup
0edee97370 2007-10-03       drh: */
0edee97370 2007-10-03       drh: void tktsetup_page(void){
0edee97370 2007-10-03       drh:   login_check_credentials();
0edee97370 2007-10-03       drh:   if( !g.okSetup ){
0edee97370 2007-10-03       drh:     login_needed();
0edee97370 2007-10-03       drh:   }
0edee97370 2007-10-03       drh: 
0edee97370 2007-10-03       drh:   style_header("Ticket Setup");
0edee97370 2007-10-03       drh:   @ <dl id="setup">
0edee97370 2007-10-03       drh:   setup_menu_entry("Load", "tktsetup_load",
0edee97370 2007-10-03       drh:     "Load a predefined ticket configuration");
0edee97370 2007-10-03       drh:   setup_menu_entry("Save", "tktsetup_save",
0edee97370 2007-10-03       drh:     "Save the current ticket configuration as an artifact");
0edee97370 2007-10-03       drh:   setup_menu_entry("Fields", "tktsetup_fields",
0edee97370 2007-10-03       drh:     "View or edit the fields allowed in tickets");
0edee97370 2007-10-03       drh:   setup_menu_entry("New", "tktsetup_newtemplate",
0edee97370 2007-10-03       drh:     "View or edit the template page used for creating a new ticket");
0edee97370 2007-10-03       drh:   setup_menu_entry("View", "tktsetup_viewtemplate",
0edee97370 2007-10-03       drh:     "View or edit the template page used for viewing a ticket");
0edee97370 2007-10-03       drh:   setup_menu_entry("Edit", "tktsetup_edittemplate",
0edee97370 2007-10-03       drh:     "View or edit the template page used for editing a ticket");
0edee97370 2007-10-03       drh:   @ </dl>
0edee97370 2007-10-03       drh: 
0edee97370 2007-10-03       drh:   style_footer();
0edee97370 2007-10-03       drh: }
0edee97370 2007-10-03       drh: 
0edee97370 2007-10-03       drh: /*
0edee97370 2007-10-03       drh: ** WEBPAGE: /tktsetup_load
0edee97370 2007-10-03       drh: */
0edee97370 2007-10-03       drh: void tktsetup_load_page(void){
0edee97370 2007-10-03       drh:   int loadrid;
0edee97370 2007-10-03       drh:   int loaddflt;
0edee97370 2007-10-03       drh: 
0edee97370 2007-10-03       drh:   login_check_credentials();
0edee97370 2007-10-03       drh:   if( !g.okSetup ){
0edee97370 2007-10-03       drh:     login_needed();
0edee97370 2007-10-03       drh:   }
0edee97370 2007-10-03       drh:   loadrid = atoi(PD("id","0"));
0edee97370 2007-10-03       drh:   loaddflt = P("dflt")!=0;
0edee97370 2007-10-03       drh:   if( loaddflt ){
0edee97370 2007-10-03       drh:     ticket_load_default_config();
0edee97370 2007-10-03       drh:     cgi_redirect("tktsetup");
0edee97370 2007-10-03       drh:   }
0edee97370 2007-10-03       drh: }