| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: United Kingdom
Posts: 413
![]() ![]() ![]() | [PHP] Progress/Status Bar I've just made this when i was messing about with GD functions in PHP, it is a progress bar type thing (not sure of the exact name). It takes 2 inputs, the total and used then creates a status bar type thing, could be useful for showing the amount of disk used. Heres the main code: ProgressBar.class.php PHP Code: Basic - will take the default values set in the script PHP Code: PHP Code: Thanks, Lee
__________________ Linux Screenshots |
| |
| | #3 (permalink) |
| Senior Member Join Date: Oct 2006 Location: NJ
Posts: 1,147
![]() ![]() ![]() | The function imagecreatetrueimage() is not valid ![]() Maybe its just my GD acting up. Anyways, you have to move the header() call to the line before the include("ProgressBar.class.php"); line
__________________ Web Development |
| |
| | #5 (permalink) |
| Senior Member Join Date: Oct 2006 Location: NJ
Posts: 1,147
![]() ![]() ![]() | I think that my GD is odd...gotta fix that. Ah, I put some whitespace in the wrong place. That's why.
__________________ Web Development |
| |
| | THREAD STARTER #7 (permalink) |
| NamePros Regular Join Date: Mar 2006 Location: United Kingdom
Posts: 413
![]() ![]() ![]() | Thanks Hans ![]() Just wondered if you've had any problems with it, it's the first time I''ve used GD and it [surprisingly] seems to be working Lee
__________________ Linux Screenshots |
| |
| | #8 (permalink) |
![]() Join Date: Jul 2005 Location: Coffs H, Australia
Posts: 3,456
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Nice one, although you might want to look into just using an image and resizing it to a percentage of the table it's in.
__________________ Free Forums / GoDaddy Coupon Codes (NEW DOMAIN!) / Free Arcade Script / <?='Your computer is '.(1?fine:broken).'.'?> |
| |
| | #9 (permalink) |
| NamePros Member Join Date: Nov 2005
Posts: 25
![]() | I hope you don't mind me posting this but I modified your code so I could just call it as an image file. I also changed some variable names to clear the code a little bit. PHP Code: ![]() Cheers. |
| |