#!/usr/bin/perl $scrpath=$ENV{'PATH_TRANSLATED'}; $curpos=rindex($scrpath,'/'); if ($curpos<0) { $curpos=rindex($scrpath,'\\') } if ($curpos<0) { $scrpath=$ENV{'SCRIPT_FILENAME'}; $curpos=rindex($scrpath,'/'); if ($curpos<0) { $curpos=rindex($scrpath,'\\') } } if ($curpos<0) { $scrpath=$0; $curpos=rindex($scrpath,'/'); if ($curpos<0) { $curpos=rindex($scrpath,'\\') } } if ($curpos<0) { die "Can't execute script, because PATH_TRANSLATED or SCRIPT_FILENAME is set incorrectly" } $workdir=substr($scrpath,0,$curpos); $curpos++; $scriptname=substr($scrpath,$curpos,length($scrpath)-$curpos); require "$workdir/config/environ.pl"; require "$moduleconfdir/environ-global.pl"; require "$moduleconfdir/db_headers_tgp.pl"; require "$moduledir/execute-index.pl"; exit;