List Info

Thread: -e problem




-e problem
user name
2006-12-15 18:22:54
ok here is my test code
I put a "X" and a "Z" next to teh two
images in question so i can see which
part of the code is running.
i should get two images of the camera.gif and the page.gif
button.
i only get one camera and the "X" showing me that
the -e code is not seeing
the .jpg

what it is supposed to do is saythat...
if there is a picture of the product (the jpg) show the
camera.gif
if there is no product picture, do not show the camera.gif

the only thing i can think of at this point is that the path
may be
different for the HTML code than the CGI code...
and I feeel i'm about to just sit here and try that.
that in the HTML the dir/dir/picture.jpg works
but in the CGI the path may have to be
.../dir/dir/pictures.jpg
to back out of the cgi dirs and into tthe html dir???

main dir
    cgi dir
        project dir (where my cgi is)
    html dir
        image.dir (where the picture is)

maybe????????
well here is the code... its not professional.. so don't
barf

   foreach my $Page(Pages)
 {
  $Game = $Page;
  $Game =~ tr/ -/__/;

  # if the pakage is present
  if (-e "$Game.pl")
  {
   if ($Order ne "")
   {
    # camera pic
    print qq|<table style="margin-bottom:
-.5em"><tr><td>|;

    print qq|<a target="$Game"
href="$Pics/$Game.jpg">|;
    print qq|X<img border=0
src="$Pics/Camera.gif"
width="$Game"
height="$Game"><BR>|;
    print qq|</a>|;

    if (-e "$Pics/$Game.jpg")
    {
    print qq|<a target="$Game"
href="$Pics/$Game.jpg">|;
    print qq|Z<img border=0
src="$Pics/Camera.gif"
width="$Game"
height="$Game"><BR>|;
    print qq|</a>|;
    }
    print qq|</td><td>|;

    $Game=$Game;
    $Game=$Game;
    print qq|<form
action="/cgi-bin/$MainDir/$GameName"
method="post">|;
    print qq|<input type="hidden"
name="page" value="$Page">n|;
    print qq|<input type="hidden"
name="Verified"
Value="$Order">n|;
    print qq|<input type="hidden"
name="Phone"
value="$Input">n|;
    print qq|<input type="hidden"
name="PW" value="$Input">n|;
    print qq|<input type="image"
src="$Pics/$Game.gif"
    width="$Game"
height="$Game">n|;
    print qq|</form>n|;
   }
   else
   {
    print qq|$Page<BR>|;
   }
  }
  else
  {
   if ($Order ne "")
   {
    # camera pic
    print qq|<table  style="margin-bottom:
-.25em"><tr><td>|;
    print qq|<a target="$Game"
href="$Pics/$Game.jpg">|;
    print qq|<img border=0
src="$Pics/Camera.gif"
width="$Game"
height="$Game"><BR>|;
    print qq|</a>|;
    print qq|</td><td>|;

    $Game=$Game;
    $Game=$Game;
    print qq|<img border=0
src="$Pics/$Game-0.gif"
width="$Game"
height="$Game"><BR>|;
   }
   else
   {
    print qq|$Page<BR>|;
   }
  }
  print qq|</td></tr></table>|;
 }





Unsubscribing info is here: h
ttp://help.yahoo.com/help/us/groups/groups-32.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://g
roups.yahoo.com/group/perl-beginner/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http
://groups.yahoo.com/group/perl-beginner/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:perl-beginner-digest@yahoogroups.com 
    mailto:perl-beginner-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    perl-beginner-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )