Alot has changed in the past few days.
Tasks now complete:
Chat backend.
-Banned users now may not post.( a message is shown: " system: <user> has been banned from chat."
-moderators are orange, admins are blue, and users are black.
Mod class:
-created the mod users and isUserMod() function.
-moderators may hand down chat bans from the mod screen.
Chatbanned class
-chatbanned user class
-isUserCBanned() function;
Access Denied:
-timestamps are logged along with ip, user account, and browser string. i'll give you a peak at the code this is a very complex script.
require_once("models/config.php");
$account = $loggedInUser->display_username;
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
$u_agent = mysql_real_escape_string("Internet Explorer");
}
elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE) {
$u_agent = mysql_real_escape_string("Google Chrome");
}
elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== FALSE) {
$u_agent = mysql_real_escape_string("Opera Mini");
}
elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== FALSE) {
$u_agent = mysql_real_escape_string("Opera");
}
elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/25.0') == TRUE) {
$u_agent = mysql_real_escape_string("Mozilla Firefox");
}
elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== FALSE) {
$u_agent = mysql_real_escape_string("Safari");
}
else {
$u_agent = mysql_real_escape_string("Unknown");
}
$ip = mysql_real_escape_string(getIP()); //get user ip
//show the access denied message no matter what
echo "<style>html { width:100%; height:100%; background:url(assets/img/access_denied.gif) center center no-repeat; background-color: #00000 !important;}</style>";
//check if user is logged in
if(isUserLoggedIn) {
//get user info's
if ($account != null) {
$account = $loggedInUser->display_username;
}
else {
$account = mysql_real_escape_string("Guest/Not Logged In");
}
}
//log with mysql
$date = date("F j, Y, g:i a");
$sql = @mysql_query("INSERT INTO access_violations (username, ip, user_agent, time) VALUES ('$account', '$ip', '$u_agent', '$date');");
//--support system--//
last night, i spent time pouring through viewticket.php, the threaded view of a support ticket and all responses. i refactored the code and built a new css layout thats very user friendly and pleasant to look at now. i think you will like it. next i will reflect the changes in new ticket, just so that the theme is nice and consistent within the support system.
I'll try and update everyone a bit later on the updated work log.
Right now, i'm working on:
-mod functions to ban, and adding a table to show who the user was banned by, so mods will be able to see who is banned at anygiven time as well as who the ban was given by.
Next I'll be working on:
-converting the entire site to mysqli OOP prepared statements for maintainability and peace of mind.
Other participants:
-Don't know what justin's working on. he's supposed to be helping with sql and such but i find he's doing less and less contributing and more and more talking, which is never good, this is a business, and freeloading is not tolerated, talented programmer or not. last i heard he was going to build a permission system in order to make our functions more flexible and changeable at anytime.
-Ivan Peter. I have outsourced some jquery animations for the index, animation and scrolling functions of the chat, and ajax for the trade page to this guy. We'll see what happens with it.