Differences From:
File
src/my_page.c
part of check-in
[c4d6b89e97]
- added a link (for admin users only) to the admin page
by
stephan on
2008-02-08 19:54:50.
Also file
src/my_page.c
part of check-in
[8672e243f8]
- Merge in changes from Stephan's branch.
by
drh on
2008-02-08 21:51:32.
[view]
To:
File
src/my_page.c
part of check-in
[908009fdc4]
- Fix a couple of C++-isms in my_page.c and tagview.c. Remove the
return value from autosync().
by
drh on
2008-05-07 17:38:57.
[view]
@@ -81,14 +81,17 @@
int uid = g.userUid;
char * sql = mprintf( "SELECT login,cap,info FROM user WHERE uid=%d",
uid );
Stmt st;
+ char const *uname;
+ char const *ucap;
+ char const *uinfo;
db_prepare( &st, sql );
free( sql );
db_step(&st);
- char const * uname = db_column_text( &st, 0 );
- char const * ucap = db_column_text( &st, 1 );
- char const * uinfo = db_column_text( &st, 2 );
+ uname = db_column_text( &st, 0 );
+ ucap = db_column_text( &st, 1 );
+ uinfo = db_column_text( &st, 2 );
@ <h2>Welcome, %s(uname)!</h2>
@ Your user ID is: %d(uid)<br/>
@ Your Fossil permissions are: [%s(ucap)]
@@ -126,14 +129,15 @@
/*
** WEBPAGE: /my
*/
void mypage_page(void){
+ const char *name;
login_check_credentials();
if( !g.okRdWiki ){
login_needed();
}
style_header("Your Home");
- char const * name = P("name");
+ name = P("name");
if( name )
{
if( 0 == strcmp(name,"tickets") )
{