Raised This Month: $32 Target: $400
 8% 

Webstats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DA_PRIEZZZ
Junior Member
Join Date: Dec 2004
Location: Belgium
Old 07-02-2005 , 20:02   Webstats
Reply With Quote #1

Hello,

Cause i can't find webstats, i've made some by my own.

I used the header of the superhero website, sorry if it's wrong -> just let me know it and i will remove the header.

demo: http://212.104.212.77/sherostats/

Greetz,
GDX^
Attached Files
File Type: zip shwebstats_by_gdx.zip (44.3 KB, 361 views)
DA_PRIEZZZ is offline
guy
Senior Member
Join Date: Apr 2005
Old 07-02-2005 , 20:07  
Reply With Quote #2

This isn't really a tech support issue...
http://forums.alliedmods.net/forumdisplay.php?f=50
__________________
Call it, friendo.
guy is offline
kanu | DarkPredator
Senior Member
Join Date: Apr 2005
Old 07-02-2005 , 20:48  
Reply With Quote #3

There are webstats already, scroll down and there is a whole forum on the webstats, good job on making some though.
__________________
Dark | Predator
kanu | DarkPredator is offline
DA_PRIEZZZ
Junior Member
Join Date: Dec 2004
Location: Belgium
Old 07-03-2005 , 06:31  
Reply With Quote #4

sorry about the wrong topic...

I didn't see the others, but, here are mine. I will edit the post when i maded a new update
DA_PRIEZZZ is offline
123
Veteran Member
Join Date: Apr 2005
Location: Katy, TX
Old 07-03-2005 , 14:12  
Reply With Quote #5

I have an update to my stats system coming in a short period of time.
__________________
//ShadowLeader - 123
123 is offline
123
Veteran Member
Join Date: Apr 2005
Location: Katy, TX
Old 07-03-2005 , 16:45  
Reply With Quote #6

Btw. Your 'Last Time Connected' does not work:
http://pandersenfisk.dk/stats/shstat...AM_0:1:1412357

It depents on wether the webserver uses linux or windows...
As far as I know mine uses linux, and it does not work there.
__________________
//ShadowLeader - 123
123 is offline
MajesticM00se
Junior Member
Join Date: Apr 2004
Old 07-13-2005 , 20:50  
Reply With Quote #7

when you call the last connected time up use this in your query [substr_code.php]:

Code:
<?

$connected_query = "20050608192750";

print_date_time($connected_query);

function print_date_time($connected)
{
echo "Date ";
echo substr($connected, 0, 4);
echo "/";
echo substr($connected, 4, 2);
echo "/";
echo substr($connected, 6, 2);
echo " Time ";
echo substr($connected, 8, 2);
echo ":";
echo substr($connected, 10, 2);
echo ":";
echo substr($connected, 12, 2);

return 0;
}

?>
you could use[substring_long_code.php]:

Code:
<?

$connected = "20050608192750";

echo "Date "."substr($connected, 0, 4)"."/"."substr($connected, 4, 2)"."/"."substr($connected, 6, 2)"." Time "."substr($connected, 8, 2)".":"."substr($connected, 10, 2)".":"."substr($connected, 12, 2);

?>
or in a function[substr_function_code.php]:
Code:
<?

$connected_query = "20050608192750";

print_date_time($connected_query);

function print_date_time($connected)
{
echo "Date ";
echo substr($connected, 0, 4);
echo "/";
echo substr($connected, 4, 2);
echo "/";
echo substr($connected, 6, 2);
echo " Time ";
echo substr($connected, 8, 2);
echo ":";
echo substr($connected, 10, 2);
echo ":";
echo substr($connected, 12, 2);

return 0;
}

?>
It's basically the same code less to process but I like to keep my code clean so i'd use the top code, because it's not really something that should be used for a function because there isn't enough code to process for need for a function in a query unless your passing the code around a number of equasions.

Which Will result in [substr.php]/[substr_long.php]/[substr_function.php]:

Code:
Date 2005/06/08 Time 19:27:50
Obiously replace $connected/$connect_query with the array from the MYSQL query, they all return the same result so it's up to you really

For more info on substr check out http://uk.php.net/substr

and it's different in your setup 123 because your using an int field and GDX^ is using a Datetime field which return different results but superhero stats uses an int field, so for people not using a datetime field should use this code
MajesticM00se is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode