| ︙ | | | ︙ | |
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
/*
** WEBPAGE: setup_access
**
** The access-control settings page. Requires Setup privileges.
*/
void setup_access(void){
static const char *const azRedirectOpts[] = {
"0", "Off",
"1", "Login Page Only",
"2", "All Pages"
};
login_check_credentials();
if( !g.perm.Setup ){
|
|
|
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
/*
** WEBPAGE: setup_access
**
** The access-control settings page. Requires Setup privileges.
*/
void setup_access_page(void){
static const char *const azRedirectOpts[] = {
"0", "Off",
"1", "Login Page Only",
"2", "All Pages"
};
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | | | ︙ | |
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
|
/*
** WEBPAGE: setup_login_group
**
** Change how the current repository participates in a login
** group.
*/
void setup_login_group(void){
const char *zGroup;
char *zErrMsg = 0;
Blob fullName;
char *zSelfRepo;
const char *zRepo = PD("repo", "");
const char *zLogin = PD("login", "");
const char *zPw = PD("pw", "");
|
|
|
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
|
/*
** WEBPAGE: setup_login_group
**
** Change how the current repository participates in a login
** group.
*/
void setup_login_group_page(void){
const char *zGroup;
char *zErrMsg = 0;
Blob fullName;
char *zSelfRepo;
const char *zRepo = PD("repo", "");
const char *zLogin = PD("login", "");
const char *zPw = PD("pw", "");
|
| ︙ | | | ︙ | |
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
|
/*
** WEBPAGE: setup_timeline
**
** Edit administrative settings controlling the display of
** timelines.
*/
void setup_timeline(void){
double tmDiff;
char zTmDiff[20];
static const char *const azTimeFormats[] = {
"0", "HH:MM",
"1", "HH:MM:SS",
"2", "YYYY-MM-DD HH:MM",
"3", "YYMMDD HH:MM",
|
|
|
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
|
/*
** WEBPAGE: setup_timeline
**
** Edit administrative settings controlling the display of
** timelines.
*/
void setup_timeline_page(void){
double tmDiff;
char zTmDiff[20];
static const char *const azTimeFormats[] = {
"0", "HH:MM",
"1", "HH:MM:SS",
"2", "YYYY-MM-DD HH:MM",
"3", "YYMMDD HH:MM",
|
| ︙ | | | ︙ | |
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
|
/*
** WEBPAGE: setup_settings
**
** Change or view miscellaneous settings. Part of the
** /setup pages requiring Setup privileges.
*/
void setup_settings(void){
int nSetting;
int i;
Setting const *pSet;
const Setting *aSetting = setting_info(&nSetting);
login_check_credentials();
if( !g.perm.Setup ){
|
|
|
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
|
/*
** WEBPAGE: setup_settings
**
** Change or view miscellaneous settings. Part of the
** /setup pages requiring Setup privileges.
*/
void setup_settings_page(void){
int nSetting;
int i;
Setting const *pSet;
const Setting *aSetting = setting_info(&nSetting);
login_check_credentials();
if( !g.perm.Setup ){
|
| ︙ | | | ︙ | |
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
|
}
/*
** WEBPAGE: setup_config
**
** The "Admin/Configuration" page. Requires Setup privilege.
*/
void setup_config(void){
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_header("WWW Configuration");
|
|
|
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
|
}
/*
** WEBPAGE: setup_config
**
** The "Admin/Configuration" page. Requires Setup privilege.
*/
void setup_config_page(void){
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_header("WWW Configuration");
|
| ︙ | | | ︙ | |
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
|
}
/*
** WEBPAGE: setup_wiki
**
** The "Admin/Wiki" page. Requires Setup privilege.
*/
void setup_wiki(void){
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_header("Wiki Configuration");
|
|
|
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
|
}
/*
** WEBPAGE: setup_wiki
**
** The "Admin/Wiki" page. Requires Setup privilege.
*/
void setup_wiki_page(void){
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_header("Wiki Configuration");
|
| ︙ | | | ︙ | |
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
|
}
/*
** WEBPAGE: setup_modreq
**
** Admin page for setting up moderation of tickets and wiki.
*/
void setup_modreq(void){
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
style_header("Moderator For Wiki And Tickets");
|
|
|
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
|
}
/*
** WEBPAGE: setup_modreq
**
** Admin page for setting up moderation of tickets and wiki.
*/
void setup_modreq_page(void){
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
style_header("Moderator For Wiki And Tickets");
|
| ︙ | | | ︙ | |
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
|
/*
** WEBPAGE: setup_adunit
**
** Administrative page for configuring and controlling ad units
** and how they are displayed.
*/
void setup_adunit(void){
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
db_begin_transaction();
if( P("clear")!=0 && cgi_csrf_safe(1) ){
|
|
|
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
|
/*
** WEBPAGE: setup_adunit
**
** Administrative page for configuring and controlling ad units
** and how they are displayed.
*/
void setup_adunit_page(void){
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
db_begin_transaction();
if( P("clear")!=0 && cgi_csrf_safe(1) ){
|
| ︙ | | | ︙ | |
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
|
}
/*
** WEBPAGE: setup_logo
**
** Administrative page for changing the logo image.
*/
void setup_logo(void){
const char *zLogoMtime = db_get_mtime("logo-image", 0, 0);
const char *zLogoMime = db_get("logo-mimetype","image/gif");
const char *aLogoImg = P("logoim");
int szLogoImg = atoi(PD("logoim:bytes","0"));
const char *zBgMtime = db_get_mtime("background-image", 0, 0);
const char *zBgMime = db_get("background-mimetype","image/gif");
const char *aBgImg = P("bgim");
|
|
|
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
|
}
/*
** WEBPAGE: setup_logo
**
** Administrative page for changing the logo image.
*/
void setup_logo_page(void){
const char *zLogoMtime = db_get_mtime("logo-image", 0, 0);
const char *zLogoMime = db_get("logo-mimetype","image/gif");
const char *aLogoImg = P("logoim");
int szLogoImg = atoi(PD("logoim:bytes","0"));
const char *zBgMtime = db_get_mtime("background-image", 0, 0);
const char *zBgMime = db_get("background-mimetype","image/gif");
const char *aBgImg = P("bgim");
|
| ︙ | | | ︙ | |
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
|
/*
** WEBPAGE: admin_sql
**
** Run raw SQL commands against the database file using the web interface.
** Requires Setup privileges.
*/
void sql_page(void){
const char *zQ;
int go = P("go")!=0;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
|
|
|
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
|
/*
** WEBPAGE: admin_sql
**
** Run raw SQL commands against the database file using the web interface.
** Requires Setup privileges.
*/
void admin_sql_page(void){
const char *zQ;
int go = P("go")!=0;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
|
| ︙ | | | ︙ | |
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
|
/*
** WEBPAGE: admin_th1
**
** Run raw TH1 commands using the web interface. If Tcl integration was
** enabled at compile-time and the "tcl" setting is enabled, Tcl commands
** may be run as well. Requires Admin privilege.
*/
void th1_page(void){
const char *zQ = P("q");
int go = P("go")!=0;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
|
|
|
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
|
/*
** WEBPAGE: admin_th1
**
** Run raw TH1 commands using the web interface. If Tcl integration was
** enabled at compile-time and the "tcl" setting is enabled, Tcl commands
** may be run as well. Requires Admin privilege.
*/
void admin_th1_page(void){
const char *zQ = P("q");
int go = P("go")!=0;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
|
| ︙ | | | ︙ | |
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
|
/*
** WEBPAGE: admin_log
**
** Shows the contents of the admin_log table, which is only created if
** the admin-log setting is enabled. Requires Admin or Setup ('a' or
** 's') permissions.
*/
void page_admin_log(){
Stmt stLog;
int limit; /* How many entries to show */
int ofst; /* Offset to the first entry */
int fLogEnabled;
int counter = 0;
login_check_credentials();
if( !g.perm.Admin ){
|
|
|
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
|
/*
** WEBPAGE: admin_log
**
** Shows the contents of the admin_log table, which is only created if
** the admin-log setting is enabled. Requires Admin or Setup ('a' or
** 's') permissions.
*/
void admin_log_page(){
Stmt stLog;
int limit; /* How many entries to show */
int ofst; /* Offset to the first entry */
int fLogEnabled;
int counter = 0;
login_check_credentials();
if( !g.perm.Admin ){
|
| ︙ | | | ︙ | |
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
|
}
/*
** WEBPAGE: srchsetup
**
** Configure the search engine. Requires Admin privilege.
*/
void page_srchsetup(){
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
style_header("Search Configuration");
@ <form action="%s(g.zTop)/srchsetup" method="post"><div>
|
|
|
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
|
}
/*
** WEBPAGE: srchsetup
**
** Configure the search engine. Requires Admin privilege.
*/
void srchsetup_page(){
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
}
style_header("Search Configuration");
@ <form action="%s(g.zTop)/srchsetup" method="post"><div>
|
| ︙ | | | ︙ | |
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
|
}
/*
** WEBPAGE: waliassetup
**
** Configure the URL aliases
*/
void page_waliassetup(){
Stmt q;
int cnt = 0;
Blob namelist;
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
|
|
|
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
|
}
/*
** WEBPAGE: waliassetup
**
** Configure the URL aliases
*/
void waliassetup_page(){
Stmt q;
int cnt = 0;
Blob namelist;
login_check_credentials();
if( !g.perm.Admin ){
login_needed(0);
return;
|
| ︙ | | | ︙ | |