invalid command name "hgetvars" while executing "hgetvars" (in namespace eval "::request" script line 13) invoked from within "namespace eval request { puts -nonewline " Shots on q3.utca.hu ..."

OUTPUT BUFFER:

namespace eval request { puts -nonewline " Shots on q3.utca.hu " hgetvars if {([info exists ENVS(QUERY_STRING)]) && ([lindex [array get ENVS QUERY_STRING] 1]!="")} { set param $ENVS(QUERY_STRING) } { set param "category=Shots+opening+page" } regsub -- "(category=)" $param "" param set weburi /shots/ set unixuri /var/www/holanyi.hu/quake3$weburi set smallsize 200 set largesize 640 cd "$unixuri" source shotby.dat set cols 3 proc isjpg {file} { # puts "= $file =" if {([lsearch ".jpg .jpeg" [string tolower [file extension $file]]]!=-1) && ([file readable $file])} { return 1 } { return 0 } } proc getcomment {size image} { if {[file exists comments.txt]} { set cfd [open comments.txt] set comls [split [read $cfd] \n] if {[set cind [lsearch $comls $image*]]!=-1} { set showcom [lrange [lindex $comls $cind] 1 end] if {$size} { return $showcom } { return "[lindex [split $showcom
] 0] (...)" } } { return "No comment available yet" } } { return "No comment available yet" } } proc getshotby {shotname} { global shby set shotbyid [lindex [split [file rootname [file tail $shotname]] _] end] set shotby "(unkown)" if {[array get shby $shotbyid]!=""} { set shotby $shby($shotbyid) } return $shotby } puts "" puts "" } { puts "\"No
No shot available here yet" } set inarow 0 if {$subdir!=""} { set title ": \"[file tail $subdir]\"" } { set title "s " } # set bigimgloc [lsearch $imgs [file tail $bigimg]] # puts "== $bigimg == [file tail $bigimg] ==" # puts "== $imgs ==" set limgs [llength $imgs] puts "" puts "" foreach img $imgs { puts "" set inarow 0 } { puts "" } } } { puts "(No more shots)" } puts "
" puts "
" puts "
Select shots category to show:
" switch -regexp -- $param { "full-(.*)" { set fullimg [lindex [split $param -] 1] set comment [getcomment 1 [file tail $fullimg]] puts "
\"$comment\"
shot taken by [getshotby $fullimg]

$comment" # puts "prev next" puts "
" } "Shots\\\+opening\\\+page" { puts "Under construction. Fejleszte's alatt!

" puts "" set owd /var/www/holanyi.hu/quake3/ cd $owd/maps set pk3s [lsort -dictionary [glob -nocomplain *.pk3]] regsub -all -- "(pak\[0-9\]\*.pk3)" $pk3s "" pk3s set noshotl "" set mline 0 foreach map $pk3s { set mapnm [file rootname [file tail [lindex [exec unzip -qq -l $map *.bsp] 3]]] if {![file exists $owd/shots/$mapnm]} { file mkdir $owd/shots/$mapnm catch {exec unzip -L -j -n -qq $map levelshots/\*.jpg -d $owd/shots/$mapnm} output foreach jpgf [glob -nocomplain $owd/shots/$mapnm/*.jpg] { set NF [set mapnm]_[lindex [exec /usr/bin/md5sum $jpgf] 0]_-1.jpg file rename -force -- "$jpgf" $owd/shots/$mapnm/$NF file mkdir $owd/shots/$mapnm/.jpg200 catch {exec /usr/bin/X11/convert -geometry 200x150 $owd/shots/$mapnm/$NF $owd/shots/$mapnm/.jpg200/200-$NF} catch_out file mkdir $owd/shots/$mapnm/.jpg640 catch {exec /usr/bin/X11/convert -geometry 640x480 $owd/shots/$mapnm/$NF $owd/shots/$mapnm/.jpg640/640-$NF} catch_out } } if {[set lshots [glob -nocomplain $owd/shots/$mapnm/*.jpg]]!=""} { set lshot [lindex $lshots [expr int([llength $lshots]*rand())]] puts "" } { puts "" puts "" foreach {map1 map2} $noshotl { set mline 0 foreach {map mapnm} "$map1 $map2" { puts "" } puts "
Maps with available JPEG screenshots
" puts "" cd $owd/maps puts "
$map" puts "[format %5.2f [expr [file size $map]/1024/1024.0]]
mb

" incr mline if {![expr [set mline]%2]} { puts "
  " } } { append noshotl "\{$map $mapnm\} " } } puts "
Maps with no available JPEG screenshots
" cd $owd/maps puts "
$map" puts "[format %5.2f [expr [file size $map]/1024/1024.0]]
mb

" incr mline if {[expr [set mline]%2]} { puts "
  " } } puts "
" } default { set bigimg "[string map {.. {}} $param]" #regsub -- "^\[/\.]*" $bigimg "" bigimg if {"$bigimg"==""} { set subdir "" } { if {[file isdirectory "$bigimg"]} { set subdir "$bigimg/" set bigimg "" } { set subdir [file dirname "$bigimg"]/ } cd "$subdir" } if {"$subdir"=="./"} { set subdir "" } set imgl [glob -nocomplain *.jpg] set imgs "" foreach file $imgl { if {([isjpg "$file"]) && ([file tail "$file"]!=[file tail "$bigimg"])} { lappend imgs $file } } if {"$bigimg"==""} { if {[file exists [set unixuri][set subdir]init.img]} { set ifd [open [set unixuri][set subdir]init.img] gets $ifd bigimg close $ifd } { set bigimg [set subdir][lindex $imgs 0] set imgs [lrange $imgs 1 end] } } puts "

" if {[llength $imgl]!=0} { puts "Click for full size
" puts "
" puts "\"[getcomment" puts "
shot taken by [getshotby $bigimg]

[getcomment 1 [file tail $bigimg]]
" # if {$bigimgloc>1} { # set previmg [lindex $imgs [expr $bigimgloc-1]] # puts "prev " # } puts "main " # if {$bigimgloc<$limgs} { # set nextimg [lindex $imgs [expr $bigimgloc+1]] # puts "next" # } puts "

Q3 UrT$title shots repository @ q3.utca.hu


" if {$limgs!=0} { puts "$limgs more shots follows - click the small images to enlarge!

" puts "
" set imgname [file rootname $img] if {![file readable ./.jpg[set smallsize]/[set smallsize]-$imgname.jpg]} { # file mkdir ./.jpg[set smallsize] # catch {exec /usr/X11R6/bin/convert -geometry [set smallsize] $img ./.jpg[set smallsize]/[set smallsize]-$imgname.jpg} catchoutput # puts "== $catchoutput ==" } puts "\"[getcomment" puts "
shot taken by [getshotby $img]

[getcomment 0 [file tail $img]]
" if {[incr inarow]==$cols} { puts "
" } } puts -nonewline " " }