Professional Web Applications Themes

pseudo code? - PHP Development

Hi, can anyone help me build a pseudo-code for an image gallery? I just want to display one picture but i would like a lnk below to switch to the next one, I read out the Directory, and if it's jpeg, i resize it and display it. I got follow idea: if (isset($last_pic)) $actual_pic=$last_pic+1 echo "<img src='resize.php?=".$actual_pic."'>"; echo "<a href='thisfile.php?last_pic=".$actual_pic.">"; but how do I do the 2nd line "$last_pic+1"? I now get the pictures out of the Dir this way: [c&p] $handle=OpenDir (PicDir); [/c&p] while PicDir is a define Var. I think it should work anything like this: $picture = ...

  1. #1

    Default pseudo code?

    Hi,

    can anyone help me build a pseudo-code for an image gallery?
    I just want to display one picture but i would like a lnk below to switch to
    the next one,
    I read out the Directory, and if it's jpeg, i resize it and display it.
    I got follow idea:

    if (isset($last_pic))
    $actual_pic=$last_pic+1
    echo "<img src='resize.php?=".$actual_pic."'>";
    echo "<a href='thisfile.php?last_pic=".$actual_pic.">";
    but how do I do the 2nd line "$last_pic+1"?
    I now get the pictures out of the Dir this way:
    [c&p]
    $handle=OpenDir (PicDir);
    [/c&p]
    while PicDir is a define Var.
    I think it should work anything like this:
    $picture = readdir ($handle);
    but how do I do "this" +1?
    Thank you!

    --
    roN
    www.rideon.ch


    Ron Guest

  2. #2

    Default Re: pseudo code?

    Ron Eggler wrote: 
    okay, got it, just read one more time, then it points to the next one. but
    how can I go forward to the actual pic in a while and then decrement one,
    back to the last again?
    I'd like to display a 'back'button too....

    --
    roN
    www.rideon.ch


    Ron Guest

  3. #3

    Default Re: pseudo code?

    Ron Eggler wrote: 
    > okay, got it, just read one more time, then it points to the next
    > one. but how can I go forward to the actual pic in a while and then
    > decrement one, back to the last again?
    > I'd like to display a 'back'button too....[/ref]

    I need something like this:

    if (isset($PicToDisplay))
    {
    while ($PicToDisplay!=$act_pic)
    $act_pic=readdir($handle);
    last_Pic= (pseudo) $PicToDisplay-1;
    next_Pic= readdir($handle);
    }

    but how to solve the pseudo-part?
    Thank you!

    --
    roN
    www.rideon.ch


    Ron Guest

Similar Threads

  1. Pseudo-dsnless UPDATE
    By Paul_B in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: October 11th, 02:39 AM
  2. (Pseudo)Web Garden for WebService
    By Massimo in forum ASP.NET Web Services
    Replies: 0
    Last Post: August 22nd, 04:27 PM
  3. busying out a pseudo tty
    By PW in forum SCO
    Replies: 3
    Last Post: October 3rd, 01:15 PM
  4. Packet mode pseudo terminals
    By Rich Teer in forum UNIX Programming
    Replies: 1
    Last Post: July 23rd, 12:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139