What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Can someone edit this script?

Can someone edit this script?
Author: Message:
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
35 / Male / –
Joined: Jun 2004
RE: RE: Can someone edit this script?
quote:
Originally posted by Hobbes
Ill ask my host now

edit: No it doesnt support php5. Maybe u can do it with another version of php?

Done
code:
<?php
if(!isset($_GET['num']) OR $_GET['num'] < 1){//If the input is less than one correct it
$num = "1";
}
else{
$num = $_GET['num'];//Only use the get varible if it exists or is >1
}
?>
<img src="http://www.hobbes.weirdfish.net/strips/strip<?echo $num;?>.jpg" alt="strip<?echo $num;?>.jpg error" /><br />
<?php
//first we count the files in the strips
$fileno = count_files("strips");
if($num < $fileno){//If we are on the last line dont echo a link other wise do
$next = $num + 1;
echo "<a href=\"http://hobbes.weirdfish.net/strip.php?num=" . $next  . "\">Forward</a> - ";
}
if($num > 1){//check to see if the number is greater than one, if so echo the back link
$prev = $num - 1;
echo "<a href=\"http://hobbes.weirdfish.net/strip.php?num=" . $prev . "\">Back</a>";
}
//other wise just dont echo anything

//file counting function
function count_files($dir){
$dh = opendir($dir);
$files = array();
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
array_splice($files, 0, 2);
$filesnum = count($files);
return $filesnum;
}
?>



This post was edited on 03-26-2005 at 02:32 PM by Plik.
03-26-2005 01:57 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Can someone edit this script? - by .Roy on 03-26-2005 at 12:12 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 12:15 PM
RE: RE: Can someone edit this script? - by Ash_ on 03-26-2005 at 12:16 PM
RE: Can someone edit this script? - by .Roy on 03-26-2005 at 12:44 PM
RE: RE: Can someone edit this script? - by Ash_ on 03-26-2005 at 01:19 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 01:21 PM
RE: Can someone edit this script? - by -dt- on 03-26-2005 at 01:30 PM
RE: RE: Can someone edit this script? - by Ash_ on 03-26-2005 at 01:31 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 01:33 PM
RE: Can someone edit this script? - by -dt- on 03-26-2005 at 01:35 PM
RE: Can someone edit this script? - by .Roy on 03-26-2005 at 01:48 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 01:50 PM
RE: Can someone edit this script? - by .Roy on 03-26-2005 at 01:52 PM
RE: RE: Can someone edit this script? - by Plik on 03-26-2005 at 01:57 PM
RE: Can someone edit this script? - by .Roy on 03-26-2005 at 02:01 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 02:03 PM
RE: Can someone edit this script? - by .Roy on 03-26-2005 at 02:04 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 02:23 PM
RE: Can someone edit this script? - by .Roy on 03-26-2005 at 02:23 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 02:27 PM
RE: Can someone edit this script? - by .Roy on 03-26-2005 at 02:32 PM
RE: Can someone edit this script? - by segosa on 03-26-2005 at 07:32 PM
RE: Can someone edit this script? - by Plik on 03-26-2005 at 08:00 PM
RE: Can someone edit this script? - by segosa on 03-26-2005 at 08:12 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On