2 * Worldvisions Weaver Software
:
3 * Copyright (C
) 1997-2004 Net Integration Technologies
, Inc
.
5 * Dave
's cheesy webloggy thingy's picture viewer
11 include( "config.inc.php" );
13 function do_sizebutton( $link, $text )
22 print( "<a href=\"img.php?num=$num&when=$when&day=$day&size=$link\">" );
29 function do_prevnextbutton( $link, $text )
38 print( "<a href=\"img.php?num=$link" .
39 "&when=$when&day=$day&size=$size\">" );
51 print( "<meta name=Keywords content=\"$name $username NITI NITLog weblog " .
52 "Net Integration\">\n\n" );
55 <style type
="text/css">
57 A
:link
{text
-decoration
:none
; color
: #0000f0}
58 A
:visited
{text
-decoration
:none
; color
: #0000f0}
59 A
:active
{text
-decoration
: none
; color
: #0000f0}
61 font
-family
: lucida
, helvetica
, sans
-serif
;
65 font
-family
: lucida
, helvetica
, sans
-serif
;
70 font
-family
: fixed
, lucidatypewriter
, courier
new;
76 <head
><title
>Image
</title
></head
>
82 $fname['sm'] = "$when/img_$num"."_sm.jpg";
83 $fname['lg'] = "$when/img_$num"."_lg.jpg";
84 $fname['hg'] = "$when/img_$num.jpg";
86 $havesmall = file_exists( $fname['sm'] );
87 $havebig = file_exists( $fname['lg'] );
88 $havehuge = file_exists( $fname['hg'] );
93 if( $size=='sm' && !$havesmall )
95 if( $size=='lg' && !$havebig )
97 if( $size=='hg' && !$havehuge ) {
102 // Grab the caption...
103 // Also determine what prev and next should be, if any...
104 $file = file( "$when/$day" );
105 foreach( $file as $line ) {
107 if( substr( $line, 0, 6 ) === 'thumb ' ) {
108 $next = substr( $line, 6, 4 );
113 if( substr( $line, 0, 11 ) === "thumb $num " ) {
114 $caption = substr( $line, 11 );
116 } else if( substr( $line, 0, 6 ) === 'thumb ' ) {
117 $prev = substr( $line, 6, 4 );
121 // Show the caption and the image
122 print( "$caption<br><img border=0 src=\"$fname[$size]\"><br>" );
124 // Print the size buttons
126 do_sizebutton( 'sm', 'small' );
128 do_sizebutton( 'lg', 'big' );
130 do_sizebutton( 'hg', 'huge' );
133 // Print the prev, up, next buttons
134 do_prevnextbutton( $prev, 'prev' );
135 print( " [<a href=\"index.php?m=$when&size=$size#$num\">up</a>]" .
137 do_prevnextbutton( $next, 'next' );