Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 09:16 pm EST
Geeklog Forums
Some pointers/help needed
Status: offline
spatz4000
Forum User
Junior
Registered: 07/14/06
Posts: 25
I have this snippet of code, which is a part of the larger pieice of code "theme tester"
/*----------------------------------------------ORIGINAL CODE---------------------------------------------------------------------------------------*/
/* if ($_USER['uid'] > 1 AND $thememode == 'save' AND !empty($usetheme)) {
DB_query("UPDATE {$_TABLES['users']} SET theme='$usetheme' WHERE uid = {$_USER['uid']}");
echo COM_refresh($PHP_SELF);
} */
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------NEW CODE----------------------------------------------------------------------------------------------*/
if ($_USER['uid'] > 1 AND $thememode == 'save' AND !empty($usetheme)) {
DB_query("UPDATE {$_TABLES['users']} SET theme='$usetheme' WHERE uid = 1" ); /*{$_USER['uid']}"); */
echo COM_refresh($PHP_SELF);
}
/*--------------------------------------------------------------------------------------------------------------------------------------------------------*/
}
Ignoring the security aspects right now ( I'm not checking for admin user, right now ) why is change not getting written to the database? I have 4 themes. I can change themes no problem, but nothing gets put into the database.
Any ideas?
Text Formatted Code
/*----------------------------------------------ORIGINAL CODE---------------------------------------------------------------------------------------*/
/* if ($_USER['uid'] > 1 AND $thememode == 'save' AND !empty($usetheme)) {
DB_query("UPDATE {$_TABLES['users']} SET theme='$usetheme' WHERE uid = {$_USER['uid']}");
echo COM_refresh($PHP_SELF);
} */
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------NEW CODE----------------------------------------------------------------------------------------------*/
if ($_USER['uid'] > 1 AND $thememode == 'save' AND !empty($usetheme)) {
DB_query("UPDATE {$_TABLES['users']} SET theme='$usetheme' WHERE uid = 1" ); /*{$_USER['uid']}"); */
echo COM_refresh($PHP_SELF);
}
/*--------------------------------------------------------------------------------------------------------------------------------------------------------*/
}
Ignoring the security aspects right now ( I'm not checking for admin user, right now ) why is change not getting written to the database? I have 4 themes. I can change themes no problem, but nothing gets put into the database.
Any ideas?
9
6
Quote
All times are EST. The time is now 09:16 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content