Jump to content

TomBullock

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by TomBullock

  1. As a follow up to this, I tried to use the same code method on another site but the class="current" won't work. Here is the code: <body> <html> <?php $page = basename($_SERVER['PHP_SELF']);?> <div class="menu_nav"> <ul> <?php $class = ($page == 'index.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="index.php">Home</a></li> <?php $class = ($page == 'facilities.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="facilities.php">Facilities</a></li> <?php $class = ($page == 'activities.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="activities.php">Activities</a></li> <?php $class = ($page == 'ssp.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="ssp.php">SSP</a></li> <?php $class = ($page == 'bookings.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="bookings.php">Bookings</a></li> <?php $class = ($page == 'contacts.php') ? 'active' : '';?> <li><a class"<?php echo $class; ?>" href="contacts.php">Contacts</a></li> </ul> One thing I did notice is that before adding the inlcude to where the menu would go, the class was set to class="active". I did try changing the all the "current" in the code to "active" but with no joy?
  2. Hi, Is it possible to add PHP code into a TPL file? Ive tried adding my code in as standard PHP and also tried it with the {php}.....{/php} tags but it still doesnt work. Any help appreciated! Thanks Tom
  3. Awesome! Ill keep a note of that site! Thanks! Ill give it a go
  4. Another issue that has arrised (nothing to do with the above code) is with a footer include. The include code is: <body> <html> <p> Copyright © 2010 <a href="http://www.company.co.uk">Company</a> · Design by <a href="http://www.designer.co.uk">Designer</a></p> When I view this in a browser, it gives me: Copyright © 2010 Company · Design by Designer I remember reading before that I need to put something before the © and the - but Im not sure if thats the correct way?
  5. Ahh, thank you! Worked a treat!
  6. Hi Ive only just started using PHP so go easy I have a PHP include for a menu on a site I run. <body> <html> <ul class="avmenu"> <li><a class="current" href="index.php">Home</a></li> <li><a href="about.php">About</a></li> <li><a href="services.php">Services</a></li> <li><a href="projects.php">Projects</a> <ul> <li><a href="highcroft_house.php">Highcroft House</a></li> <li><a href="barn_conversion.php">Barn Conversion</a></li> <li><a href="sunroom_extension.php">Sunroom Extension</a></li> <li><a href="dance_school.php">Dance School</a></li> </ul> </li> <li><a href="testimonials.php">Testimonials</a></li> <li><a href="offers.php">Special Offers</a></li> <li><a href="links.php">Links</a></li> <li><a href="contact.php">Contact</a></li> </ul> As you can see, on the first link, the index link, it has the class="current" property which displays a little tab next to the menu to show what link is currently selected. With using the include, obviously the class="current" is passed on to every page. Is there a way that I can tell the include file to change according to what page its on? Any help appreciated! Thanks Tom
  7. Hello Ive created a little code thats logs you into the site an external page. Is there a way I can make it submit to more than one php login form? So for example, I could login to 2 forums with 1 form? My code so far is here: http://sackthis.co.uk/test/autoproxy.php Would appreciate any help Thanks Thomas
  8. Hello I have this script, but i only want it to be able to upload music files, such as mp3, wma and wav. <?php //set where you want to store files //in this example we keep files in folder upload //$HTTP_POST_FILES['ufile']['name']; = upload file name //for example uploads file name cartoon.gif . $path will be uploads/cartoon.gif $path= "uploads/".$HTTP_POST_FILES['ufile']['name']; if($ufile !=none) { if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path)) { echo "Successful<BR/>"; //$HTTP_POST_FILES['ufile']['name'] = file name //$HTTP_POST_FILES['ufile']['size'] = file size //$HTTP_POST_FILES['ufile']['type'] = type of file echo "File Name :".$HTTP_POST_FILES['ufile']['name']."<BR/>"; echo "File Size :".$HTTP_POST_FILES['ufile']['size']."<BR/>"; echo "File Type :".$HTTP_POST_FILES['ufile']['type']."<BR/>"; echo "<img src=\"$path\" width=\"150\" height=\"150\">"; } else { echo "Error"; } } ?> Can anyone help me so if they try to upload anything apart from the music files i mentioned, they get an error. Thanks Tom Bullock
  9. Can i put that code on the same page under the current script?
  10. Hello This is part of my script: { echo "online"; } else { echo "offline"; } As you can see, there is the word 'online' and 'offline'. How do i make the word 'online' green and the word 'offline' red? Thanks
  11. Haha, what a poor insult. You tell me whats so hard about this: $server = "000.000.000.000"; // IP Address Of Shoutcast Server. $port = "000"; // Shoutcast Port $online = "/images/online.gif"; // Online Image $offline = "/images/offline.gif"; // Offline Image Maybe your the big idiot.
  12. Well if you had a brain, thats what ive come to ask you. ^^^ I think that means ive found my answer. Theres no need to cry bud
  13. Can anyone help me change this script from images to text? $server = "212.72.165.23"; // IP address to your shoutcast server. $port = "8681"; // port of your shoutcast server $online = "http://www.streamsolutions.co.uk/scripts/status_img/online.gif"; // Online Gif image $offline = "http://www.streamsolutions.co.uk//scripts/status_img/offline.gif"; // offline gif image
  14. Thats basically what i said wasn't it? Cheers anyway.
  15. I dont know, the transfer from the i.p or something.
  16. Right, what im looking for is a code that i can put into my site. When the Shoutcast server is broadcasting there is a bit of text saying Online in green and when the Shoutcast server isn't broadcasting there is a bit of text saying Offline in red.
  17. With i script. Ive seen it on many sites so i know it can be done.
  18. Hello Has anyone got a script that shows weather a shoutcast server is on or off. Im looking for one that says 'Online' in green when on and 'Offline in red when its off. Can anyone help? Thanks
  19. If i used this and added my fields to the form, would i have to add more script into the php script?
  20. Hello Im starting my own hosting company and i am offering my client to customize thier own packages. I have this code, and i want all the information from it to go to my email. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form id="form1" name="Custom Quote Form" method="post" action=""> <u>Contact Information</u><br /> <br /> Name:<br /> <label> <input name="Name" type="text" size="20" /> </label> <br /> E-Mail:<br /> <label> <input name="E-Mail" type="text" size="20" /> </label> <br /> Address:<br /> <label> <input name="Address" type="text" size="20" /> </label> <br /> <label></label> Town:<br /> <label> <input name="Town" type="text" size="20" /> </label> <br /> County:<br /> <label> <input name="County" type="text" size="20" /> </label> <br /> Post Code:<br /> <label> <input name="Post Code" type="text" size="20" maxlength="6" /> </label> <br /> Country:<br /> <label> <input name="Country" type="text" size="20" /> </label> <p><u>Package Information<br /> <br /> </u>Webspace:<br /> <label> <input name="Webspace" type="text" size="15" /> </label> MB<br /> Transfer:<br /> <input name="Transfer" type="text" size="15" /> MB<br /> E-Mail Boxes:<br /> <input name="E-Mail Boxes" type="text" size="15" /> <br /> Sub-Domains:<br /> <input name="Sub-Domains" type="text" size="15" /> <br /> SQL Databases:<br /> <input name="SQL Databases" type="text" size="15" /> <br /> FTP Accounts:<br /> <input name="FTP Accounts" type="text" size="15" /> </p> <p> <label> <input type="submit" name="Submit" value="Submit" /> </label> </p> </form> <p> </p> </body> </html> Can anyone tell me where to go from here? Thankyou Tom Bullock
  21. Thank you very much I really apreciate it Thanks again
  22. Yes that is exactly what im looking for except instead of having images to display the status, i need it to be text. Many thanks Tom Bullock
  23. Yes, the same principal, but just a script where i can enter the i.p address and port number of my server into the script and when the server is online it says 'Online' in green and when it is offline is says 'Offline' in red. Many thanks Tom Bullock
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.