Fossil

Diff
Login

Diff

Differences From Artifact [dc93483c83]:

To Artifact [99dd85042a]:


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
**
** Author contact information:
**   drh@hwaci.com
**   http://www.hwaci.com/drh/
**
*******************************************************************************
**  
** Code to generate the bug report listings
*/
#include "config.h"
#include "report.h"
#include <assert.h>

/* Forward references to static routines */
static void report_format_hints(void);

/*
** WEBPAGE: /reportlist
*/
void view_list(void){
  Stmt q;
  int rn = 0;
  int cnt = 0;

  login_check_credentials();
  if( !g.okRdTkt && !g.okNewTkt ){ login_needed(); return; }
  style_header("Bug Report Main Menu");
  if( g.okNewTkt ){
    @ <p>Enter a new bug report:</p>
    @ <ol><li value="1"><a href="tktnew">New bug report</a></li></ol>
    @
    cnt++;
  }
  if( !g.okRdTkt ){
    @ <p>You are not authorized to view existing bug reports.</p>
  }else{
    db_prepare(&q, "SELECT rn, title, owner FROM reportfmt ORDER BY title");
    @ <p>Choose a report format from the following list:</p>
    @ <ol>
    while( db_step(&q)==SQLITE_ROW ){
      const char *zTitle = db_column_text(&q, 1);
      const char *zOwner = db_column_text(&q, 2);







|


















|

|
|




|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
**
** Author contact information:
**   drh@hwaci.com
**   http://www.hwaci.com/drh/
**
*******************************************************************************
**  
** Code to generate the ticket listings
*/
#include "config.h"
#include "report.h"
#include <assert.h>

/* Forward references to static routines */
static void report_format_hints(void);

/*
** WEBPAGE: /reportlist
*/
void view_list(void){
  Stmt q;
  int rn = 0;
  int cnt = 0;

  login_check_credentials();
  if( !g.okRdTkt && !g.okNewTkt ){ login_needed(); return; }
  style_header("Ticket Main Menu");
  if( g.okNewTkt ){
    @ <p>Enter a new ticket:</p>
    @ <ol><li value="1"><a href="tktnew">New ticket</a></li></ol>
    @
    cnt++;
  }
  if( !g.okRdTkt ){
    @ <p>You are not authorized to view existing tickets.</p>
  }else{
    db_prepare(&q, "SELECT rn, title, owner FROM reportfmt ORDER BY title");
    @ <p>Choose a report format from the following list:</p>
    @ <ol>
    while( db_step(&q)==SQLITE_ROW ){
      const char *zTitle = db_column_text(&q, 1);
      const char *zOwner = db_column_text(&q, 2);
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
        @ [<a href="rptsql?rn=%d(rn)" rel="nofollow">sql</a>]
      }
      @ </li>
    }
  }
  @ </ol>
  if( g.okTktFmt ){
    @ <p>Create a new bug report display format:</p>
    @ <ol>
    @ <li value="%d(cnt+1)"><a href="rptnew">New report format</a></li>
    @ </ol>
  }
  style_footer();
}








|







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
        @ [<a href="rptsql?rn=%d(rn)" rel="nofollow">sql</a>]
      }
      @ </li>
    }
  }
  @ </ol>
  if( g.okTktFmt ){
    @ <p>Create a new ticket display format:</p>
    @ <ol>
    @ <li value="%d(cnt+1)"><a href="rptnew">New report format</a></li>
    @ </ol>
  }
  style_footer();
}