Fossil

Check-in [c4ec179b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Setup webpag updates.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c4ec179bbc214f45b8cebc6555c5817bd757db4f
User & Date: drh 2007-07-22 12:00:06
Context
2007-07-23
19:52
Improvements to the WWW interface. check-in: 66f4caa3 user: drh tags: trunk
2007-07-22
12:00
Setup webpag updates. check-in: c4ec179b user: drh tags: trunk
2007-07-21
19:32
Improvements to web-based user management. check-in: 916b6e4b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/setup.c.

    57     57     login_check_credentials();
    58     58     if( !g.okSetup ){
    59     59       login_needed();
    60     60     }
    61     61   
    62     62     style_header();
    63     63   
           64  +  @ <h2>Setup</h2>
    64     65     @ <dl id="setup">
    65     66     menu_entry("Users", "setup_ulist",
    66     67       "Grant privileges to individual users.");
    67     68     menu_entry("Access", "setup_access",
    68     69       "Control access settings.");
           70  +  menu_entry("Configuration", "setup_config",
           71  +    "Configure the WWW components of the repository");
    69     72     @ </dl>
    70     73   
    71     74     style_footer();
    72     75   }
    73     76   
    74     77   /*
    75     78   ** WEBPAGE: setup_ulist
................................................................................
    86     89       login_needed();
    87     90       return;
    88     91     }
    89     92   
    90     93     style_submenu_element("Add", "Add User", "setup_uedit");
    91     94     style_header();
    92     95     @ <h2>List Of Users</h2>
           96  +  @ <hr>
           97  +  @ <table align="left" hspace="10" border="1" cellpadding="10"><tr><td>
    93     98     @ <table cellspacing=0 cellpadding=0 border=0>
    94     99     @ <tr>
    95         -  @   <th align="right"><nobr>User ID</nobr></th>
          100  +  @   <th align="right">User&nbsp;ID</th>
    96    101     @   <th>&nbsp;&nbsp;&nbsp;Capabilities&nbsp;&nbsp;&nbsp;</th>
    97         -  @   <th><nobr>Contact Info</nobr></th>
          102  +  @   <th>Contact&nbsp;Info</th>
    98    103     @ </tr>
    99    104     db_prepare(&s, "SELECT uid, login, cap, info FROM user ORDER BY login");
   100    105     while( db_step(&s)==SQLITE_ROW ){
   101    106       @ <tr>
   102    107       @ <td align="right">
   103    108       if( g.okAdmin ){
   104    109         @ <a href="setup_uedit?id=%d(db_column_int(&s,0))">
................................................................................
   105    110       }
   106    111       @ <nobr>%h(db_column_text(&s,1))</nobr>
   107    112       if( g.okAdmin ){
   108    113         @ </a>
   109    114       }
   110    115       @ </td>
   111    116       @ <td align="center">%s(db_column_text(&s,2))</td>
   112         -    @ <td align="center">%s(db_column_text(&s,3))</td>
          117  +    @ <td align="left">%s(db_column_text(&s,3))</td>
   113    118       @ </tr>
   114    119     }
   115         -  @ </table>
   116         -  @ <p><hr>
          120  +  @ </table></td></tr></table>
          121  +  @ <p>
   117    122     @ <b>Notes:</b>
   118    123     @ <ol>
   119    124     @ <li><p>The permission flags are as follows:</p>
   120    125     @ <table>
   121    126     @ <tr><td>a</td><td width="10"></td>
   122    127     @     <td>Admin: Create or delete users and ticket report formats</td></tr>
   123    128     @ <tr><td>d</td><td></td>
................................................................................
   445    450     login_check_credentials();
   446    451     if( !g.okSetup ){
   447    452       login_needed();
   448    453     }
   449    454   
   450    455     style_header();
   451    456     db_begin_transaction();
   452         -  @ <form action="%s(g.zBaseURL)/setup_access" method="GET">
          457  +  @ <h2>Access Control Settings</h2>
          458  +  @ <form action="%s(g.zBaseURL)/setup_access" method="POST">
   453    459   
   454    460     @ <hr>
   455    461     onoff_attribute("Require password for local access",
   456    462        "authenticate-localhost", "localauth", 1);
   457    463     @ <p>When enabled, the password sign-in is required for
   458    464     @ web access coming from 127.0.0.1.  When disabled, web access
   459    465     @ from 127.0.0.1 is allows without any login - the user id is selected
................................................................................
   466    472     @ <p>The number of hours for which a login is valid.  This must be a
   467    473     @ positive number.  The default is 8760 hours which is approximately equal
   468    474     @ to a year.</p>
   469    475      
   470    476     @ <hr>
   471    477     onoff_attribute("Allow anonymous signup", "anon-signup", "asu", 0);
   472    478     @ <p>Allow users to create their own accounts</p>
          479  +   
          480  +  @ <hr>
          481  +  @ <p><input type="submit"  name="submit" value="Apply Changes"></p>
          482  +  @ </form>
          483  +  db_end_transaction(0);
          484  +  style_footer();
          485  +}
          486  +
          487  +/*
          488  +** WEBPAGE: setup_config
          489  +*/
          490  +void setup_config(void){
          491  +  login_check_credentials();
          492  +  if( !g.okSetup ){
          493  +    login_needed();
          494  +  }
          495  +
          496  +  style_header();
          497  +  db_begin_transaction();
          498  +  @ <h2>WWW Configuration</h2>
          499  +  @ <form action="%s(g.zBaseURL)/setup_config" method="POST">
          500  +
          501  +  @ <hr>
          502  +  entry_attribute("Home page", 60, "homepage", "hp", "");
          503  +  @ <p>The name of a wiki file that is the homepage for the website.
          504  +  @ The home page is the page that is displayed by the "Home" link
          505  +  @ at the top of this screen.</p>
          506  +
          507  +  entry_attribute("Ticket subdirectory", 60, "ticket-subdir", "tsd", "");
          508  +  @ <p>A subdirectory in the file hierarchy that contains all trouble
          509  +  @ tickets.  Leave this blank to disable ticketing.  Tickets text
          510  +  @ files within this subdirectory containing a particular format
          511  +  @ (documented separately) and with the ".tkt" suffix.</p>
          512  +
          513  +  entry_attribute("Wiki subdirectory", 60, "wiki-subdir", "wsd", "");
          514  +  @ <p>A subdirectory in the file hierarchy that contains wiki pages.
          515  +  @ Leave this blank to disable wiki.  Wiki pages are
          516  +  @ files within this subdirectory whose name is he wiki page title
          517  +  @ and with the suffix ".wiki".</p>
          518  +
   473    519      
   474    520     @ <hr>
   475    521     @ <p><input type="submit"  name="submit" value="Apply Changes"></p>
   476    522     @ </form>
   477    523     db_end_transaction(0);
   478    524     style_footer();
   479    525   }