Differences From:
File
src/setup.c
part of check-in
[ce277cadda]
- Incremental work on tickets and especially ticket configuration.
by
drh on
2008-05-25 19:36:47.
[view]
To:
File
src/setup.c
part of check-in
[86db6fa150]
- Split of the ticket configuratio into separately editable pieces.
by
drh on
2008-05-28 15:29:16.
[view]
@@ -709,58 +709,7 @@
@ <hr>
@ Here is the default page footer:
@ <blockquote><pre>
@ %h(zDefaultFooter)
- @ </pre></blockquote>
- db_end_transaction(0);
-}
-
-/*
-** WEBPAGE: setup_ticket
-*/
-void setup_ticket(void){
- const char *zConfig;
- int isSubmit;
-
- login_check_credentials();
- if( !g.okSetup ){
- login_needed();
- }
- isSubmit = P("submit")!=0;
- db_begin_transaction();
- zConfig = P("cfg");
- if( zConfig==0 ){
- zConfig = db_text((char*)zDefaultTicketConfig,
- "SELECT value FROM config WHERE name='ticket-configuration'");
- }
- style_header("Edit Ticket Configuration");
- if( P("clear")!=0 ){
- db_multi_exec("DELETE FROM config WHERE name='ticket-configuration'");
- zConfig = zDefaultTicketConfig;
- }else if( isSubmit ){
- char *zErr = ticket_config_check(zConfig);
- if( zErr==0 ){
- db_multi_exec(
- "REPLACE INTO config(name,value) VALUES('ticket-configuration',"
- "%Q)", zConfig
- );
- }else{
- @ <p><font color="red"><b>
- @ SCRIPT ERROR: %h(zErr)
- @ </b></font></p>
- }
- }
- @ <form action="%s(g.zBaseURL)/setup_ticket" method="POST">
- @ <p>Edit the TH1 script that defines the ticketing
- @ system setup for this server.</p>
- @ <textarea name="cfg" rows="40" cols="80">%h(zConfig)</textarea>
- @ <br />
- @ <input type="submit" name="submit" value="Apply Changes">
- @ <input type="submit" name="clear" value="Revert To Default">
- @ </form>
- @ <hr>
- @ Here is the default ticket configuration:
- @ <blockquote><pre>
- @ %h(zDefaultTicketConfig)
@ </pre></blockquote>
db_end_transaction(0);
}