SunQuest
 
       Miscellaneous Code
  Home arrow Miscellaneous Code arrow Slide Show
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS CODE

Slide Show
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2004-08-05

    Table of Contents:

    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    This is a page that can be used to display images in a folder as a slide show. It is a complete html page and should work with minor changes, as long as images meet simple criteria.
    Newbie here so be gentle when you bend me over for the rape session. Or not.

    By : paulhitz

    <html>
    <head>
    <meta name="author" value="Paul Hitz">
    <meta http-equiv="reply-to" value="paulhitz770@hotmail.com">
    <!-- This is my "junk mail" account, may take a couple tries. Put Paul John in subject -->
    <?php
    // slideshow.php
    // This program will show pictures in a folder as a slide show. The pictures need to be
    // similarly named with a number which distinguishes each picture. For instance for the
    // example, I have chosen JPEGs in a folder called images, named pic001.JPG, pic002.JPG,
    // etc. You can pause the slide show, jump ahead or jump back within the slide show and
    // and set the delay of how long a picture stays up after it is loaded.

    // Get the variables from the url(QUERY_STRING), and move into hash table $vars.
    parse_str($_SERVER['QUERY_STRING'],$vars);

    // Get value of picture, time and savetime from hash table and move into $ variables.
    $picture = $vars['picture'];
    $time = $vars['time'];
    $savetime = $vars['savetime'];


    // Build the image name including path. In this example go up one folder above where
    // slideshow.php is and go into a folder called images. The sprintf(... tells says to
    // display the number as a three digit number and pad with leading zeros, 1 = 001.
    // Hint, you could change ../images/ to a variable, put variable in url, get var from hash
    // table and access any folder on your site (and beyond).
    $picfile = "../images/pic" . sprintf("%03d",$picture) . ".JPG";

    // Increment $picture before you build next url so you go to the next picture.
    $picture += 1;
    $url = 'http://www.hitz.info/Haiti04Jun/slideshow/slideshow.php?picture=' . $picture . '&time=' . $time;

    // Decrement $picture so you pause on same picture and include save time in $urlpause to
    // fill the time input box as the default for restart.
    $picture -= 1;
    $urlpause = 'http://www.hitz.info/Haiti04Jun/slideshow/slideshow.php?picture=' . $picture . '&time=6000&savetime=' . $time;

    // Meta refresh redirect to new page in this case same page with new vars in CONTENT seconds.
    // Change if statement to be number of pictures in folder.
    // Hint create an image that says end of slideshow or some such as closure.
    $meta = '<META HTTP-EQUIV="refresh" CONTENT="' . $time . ';URL=' . $url .'">';
    if ($picture < 82)
    {
    echo $meta;
    }
    ?>
    <title>
    Slide show
    </title>
    </head>
    <body>

    <table border="1">
    <tr>
    <td>
    <table>
    <tr>
    <td rowspan="5"><img src= <?php echo $picfile; ?> >
    </td>
    </tr>
    </table>
    </td>
    <td>
    <table>
    <FORM METHOD='GET' ACTION='HTTP://www.hitz.info/Haiti04Jun/slideshow/slideshow.php'>
    <?php
    if ($time == 6000)
    {
    echo " <tr>\n <td>";
    echo "How many <br>seconds delay <br>per picture?\n";
    echo " </td>\n </tr>\n <tr>\n <td>";
    echo "<INPUT TYPE='text' NAME='time' VALUE='" . $savetime . "' SIZE='3'>\n";
    echo " </td>\n </tr>\n <tr>\n <td>&nbsp;\n";
    echo " </td>\n </tr>\n <tr>\n <td>";
    echo "Which picture <br>do you want <br>to start with? <br>(This is<br>&nbsp;slide\n";
    echo " </td>\n </tr>\n <tr>\n <td>";
    echo "<INPUT TYPE='text' NAME='picture' VALUE='" . $picture . "' SIZE='2'>\n";
    echo " </td>\n </tr>\n <tr>\n <td>";
    echo "&nbsp; of 82.)\n";
    echo " </td>\n </tr>\n <tr>\n <td>";
    echo "<INPUT TYPE='submit' VALUE='submit' NAME='submitbutton'>\n";
    echo " </td>\n </tr>\n";
    }
    else
    {
    echo " <tr>\n <td align='center'>";
    echo "<a href='" . $urlpause . "'>pause</a><br>$picture of 82\n";
    echo " </td>\n </tr>\n";
    }
    ?>
    </FORM>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Miscellaneous Code Articles
    More By Codewalkers

     

    IBM® developerWorks developerWorks - FREE Tools!


    NEW! Accelerating Software Innovation on i on Power Systems

    Attend this launch webcast with Scott Hebner, Vice President of IBM Rational Marketing and Strategy, for an overview of Rational’s new software offerings and resources to help modernize and accelerate software innovation on i on Power Systems – while ensuring past application investments are protected and continue to grow. Learn how these solutions are helping customers extend their core i5/OS solutions toward modern architectures such as SOA and web technologies to deliver business improvements that stand the test of time.
    FREE! Go There Now!


    NEW! Cook up Web sites fast with CakePHP, Part 4: Use CakePHP&apos;s Session and Request Handler components

    CakePHP is a stable production-ready, rapid-development aid for building Web sites in PHP. This "Cook up Web sites fast with CakePHP" series shows you how to build an online product catalog using CakePHP.
    FREE! Go There Now!


    NEW! Evaluate IBM Lotus Sametime Standard V8.0

    Visit IBM developerWorks to download a free trial of the latest release of IBM Lotus Sametime Standard V8.0. Lotus Sametime Standard V8.0 is a platform for unified communications and collaboration that combines security features with an extensible, open solution including integrated Voice over IP, geographic location awareness, mobile clients, and a robust Business Partner community offering telephony and video integration.
    FREE! Go There Now!


    NEW! IBM Enterprise Modernization Sandbox for System z

    IBM Enterprise Modernization solutions help organizations evolve core IT systems towards modern architectures and technologies—reducing the burden of maintenance and freeing up resources to develop new business requirements and capabilities. With the IBM Enterprise Modernization Sandbox for System z you can evaluate IBM Enterprise Modernization solutions focused on five key areas: Assets, Architectures, Skills, Processes and Infrastructures, and Investment. Each solution is based upon real customer experiences and offers a proven path to get you started with your modernization projects.
    FREE! Go There Now!


    NEW! Project and Portfolio Management Executive Resource Kit

    Portfolio Management is about effectively managing portfolio value by aligning portfolio investments with business goals. This complimentary e-kit provides a collection of materials that can help you understand how IBM Rational enables and automates best practices for improved governance and clear visibility into portfolio and project performance across the entire IT project lifecycle.
    FREE! Go There Now!


    NEW! Rational Talks to You: Manage RUP-based CMMI initiatives

    Join this Rational Talks to You teleconference on December 4 at 1:00 pm ET to discuss how Rational Method Composer can help meet your compliance objectives. Get your questions answered!
    FREE! Go There Now!


    NEW! Rational Testing eKits

    Discover how Rational tools and best practices for testing can make your job easier. The new Rational Testing eKits provide you with valuable resources – including demos, webcasts, tutorials, and articles – that help you address your specific testing needs across the software lifecycle. Five new eKits are available covering the topics of Requirements and Test Management, Functional Testing, Performance Testing, Code Quality and Embedded Systems, and SOA and Web Services Testing.
    FREE! Go There Now!


    NEW! The dirty dozen: preventing common application-level hack attacks

    As organizations have grown increasingly dependent on online software, the risk of malicious attacks has also become far more serious. Fortunately, well-governed organizations can protect their Web applications by injecting vulnerability assessments and ethical hacks into their software development and delivery processes. This paper describes 12 of the most common hacker attacks and provides basic rules that you can follow to help create more hack-resistant Web applications.
    FREE! Go There Now!


    NEW! Webcast: Introducing the new Information Server and Solutions community: LeverageInformation

    User communities play an important role in communication and collaboration around products, solutions and other areas of special interest to members. Successful communities are able to provide the right mix of content and services to deliver a value proposition that resonates with each audience. Join Tom Inman, VP of Marketing for Information and Platform Solutions as he introduces the new LeverageINFORMATION community. During this webcast, learn about the value provided by the community and how customers and partners derive value from the community in addressing their own technical and business challenges.
    FREE! Go There Now!


    NEW! Webcast: WebSphere Process Server

    WebSphere Process Server delivers a unique integration framework that simplifies existing IT resources. Often, as IT assets grow to support business demand, so too does their complexity and manageability. In this webcast, we’ll discuss how WebSphere Process Server helps deliver an SOA infrastructure that provides a common model to orchestrate, mediate, connect, map, and execute the underlying IT functions. Discover how WebSphere Process Server simplifies integration of business processes by leveraging existing IT assets as reusable services without the complexities of traditional integration methodologies.
    FREE! Go There Now!



    All FREE IBM® developerWorks Tools!

    MISCELLANEOUS CODE ARTICLES

    - upload image to database sql
    - Random Password Generator
    - BCroot, get the root of a number with BC fun...
    - Find pi in a high precision
    - [PHP5] FORMCHECKER : data validation
    - SPL and ITERATOR : examples
    - Xml with Rss Feeds
    - [PHP5] NOTIMEOUT PACKAGE
    - Class to return variables to a Flash movie.
    - BCGCD Greatest Common Denominator (Large Num...
    - HMAC
    - Binary to Decimal
    - Decimal to Binary using logs
    - web.framework v1.0.0
    - Shopping Cart Class






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway