PDA

View Full Version : Help [PHP][+Rep]



Luno1599
26-06-2008, 04:04 PM
Hey

I want to design a script that will show a client how much time i spend on their project.. So on my admin panel I will click onto the client and view profile then i go to time and there will be a clock... starting at 00.00 and when i press a start button it starts counting up (eg from 00.00 to 00.01 then 01.00 as an hour) then when i press stop it stores it in the database so next time i go on it starts at the time i stopped it...

Can this be done? I know it can but can someone help me with this bit of code?

Danny

Independent
26-06-2008, 04:05 PM
Hey

I want to design a script that will show a client how much time i spend on their project.. So on my admin panel I will click onto the client and view profile then i go to time and there will be a clock... starting at 00.00 and when i press a start button it starts counting up (eg from 00.00 to 00.01 then 01.00 as an hour) then when i press stop it stores it in the database so next time i go on it starts at the time i stopped it...

Can this be done? I know it can but can someone help me with this bit of code?

DannySo basically make a script for you for free, and waste our time?

This is a request, not code help, and it would be in the incorrect forum either way.

Protege
26-06-2008, 04:12 PM
It will cost £1 per minute it takes to code it. Take around 1hr, 60.00 - Reasonable pricing.

Luno1599
26-06-2008, 04:19 PM
No i dont want you to make it i know how to do that i just need some help with the clock bit..

I was thinking of puttong the 00.00 in a text field so it can be entered into a database easyerly...

Independent
26-06-2008, 04:21 PM
No i dont want you to make it i know how to do that i just need some help with the clock bit..

I was thinking of puttong the 00.00 in a text field so it can be entered into a database easyerly...
Why do you think it needs to be done by a database? It could be flatfile, it could be stored in a var.

I'd help you but I don't want to waste time on something that won't help me in anyway, so try uk.php.net/time

Luno1599
26-06-2008, 04:36 PM
All im asking for is abit of help... This forum has always helped me before...

Independent
26-06-2008, 05:01 PM
All im asking for is abit of help... This forum has always helped me before...
Yes, but you want all of the time bit done for you which is basically the whole script, nobody has made you a full script; but to save arguing I will not post in this thread again.

Luno1599
26-06-2008, 05:04 PM
Yes, but you want all of the time bit done for you which is basically the whole script, nobody has made you a full script; but to save arguing I will not post in this thread again.


Ok fine, but the time bit is only like 2% if the script and im not even selling the script its for my use only.. so yeah...

Jebbo
26-06-2008, 05:25 PM
Yes, but you want all of the time bit done for you which is basically the whole script, nobody has made you a full script; but to save arguing I will not post in this thread again.

i just read 3 posts and all of them had you being annoying in them..
if you dont want to help him then dont post..

Protege
26-06-2008, 05:39 PM
Heres some help

Record the start time $time = time();
Record the end time $end_time = time();
Find the difference $new_time = $time - $end_time;
Work out the minutes = $time = ( $new_time / 60 ) / 60;

Jebbo = ,,l,

Luno1599
26-06-2008, 05:48 PM
i just read 3 posts and all of them had you being annoying in them..
if you dont want to help him then dont post..


Thanks =] Thats just what I was thinking


Heres some help

Record the start time $time = time();
Record the end time $end_time = time();
Find the difference $new_time = $time - $end_time;
Work out the minutes = $time = ( $new_time / 60 ) / 60;

Jebbo = ,,l,

Thank you too, this is all the help I needed I was thinking the hard way lol
Thanks again

+ Rep both of you

Independent
26-06-2008, 07:33 PM
i just read 3 posts and all of them had you being annoying in them..
if you dont want to help him then dont post..

I've never seen you help, only ask for help. So why don't you shove your comments straight up your backside, because you've not helped anyone.



Thank you too, this is all the help I needed I was thinking the hard way lol
Thanks again

+ Rep both of you ______________
You should already know this if you visited the link I reffered you to, so I did help you just never bothered reading it.. So take that other comment up your backside with "Jebbo"'s.

Edit: If your going to -REP me, then leave your name, coward.

Luno1599
26-06-2008, 08:01 PM
You should already know this if you visited the link I reffered you to, so I did help you just never bothered reading it.. So take that other comment up your backside with "Jebbo"'s.

Edit: If your going to -REP me, then leave your name, coward.

Hi,
No i am not going to -REP you... Its just a small fallout... We have never met so yeah... you neva know we might get on anyway...

+Rep for the link :)

Danny

Independent
26-06-2008, 08:45 PM
I was -REP'd probably by Jebbo, so he's recieved revenge rep and a valid reason for a -REP.

Jebbo
26-06-2008, 09:41 PM
no it wasnt from me.. and you +reped me..

Dentafrice
26-06-2008, 10:47 PM
Why do you think it needs to be done by a database? It could be flatfile, it could be stored in a var.

I'd help you but I don't want to waste time on something that won't help me in anyway, so try uk.php.net/time

you're really getting on my nerves.. if you don't have anything nice to say, don't say it.. you're getting to be like me.. and no one can do that. Only me and Scott.

It's pretty simple. Load the time into a Javascript variable with PHP.

EX:


<?php
// database stuff here that gets it //
$time = $row["time"];
?>




<script type="text/javascript">
var time = "<?php echo $time; ?>";
</script>


http://javascript.internet.com/miscellaneous/stopwatch.html

Integrate that stopwatch script into it.

Then when you get stop, have it to add the new time to the time var.

I'm not spoon feeding it too you, but that is one way to do it.

Hypertext
27-06-2008, 01:05 PM
You could just as easily clock yourself in and add the time. I don't think clients care to the second, unless thats how you charge :P.

It's pretty simple, I'll code it for you if you want it's literally about 4 min. of work..

Want to hide these adverts? Register an account for free!