#!/bin/sh
#This script is created by ssparser automatically. The parser first created by MaoShouyan
printf "Content-type: text/html
Cache-Control: no-cache

"
RAMDISK="/usr/ramdisk"
if [ -f ${RAMDISK}/PG.conf ]; then
	. ${RAMDISK}/PG.conf
	PGPATH="${RAMDISK}"
else
	. /etc/PG.conf
fi

. ${PGPATH}/etc/panabit.inf

PGBIN=${PGPATH}/bin
FLOWEYE=${PGBIN}/floweye
EVENTFILE=${PGETC}/log/pending_events
APPWEBDIR=/usr/appweb
APPWEBS="/usr/appweb/appweb/bin/appwebs"

if [ -f ${PGETC}/sysname.conf ]; then
	. ${PGETC}/sysname.conf
fi

myself="/cgi-bin/Maintain/`basename $0`"

serverAddre=""

if [ -f ${PGETC}/ifadmin.conf ]; then
	. ${PGETC}/ifadmin.conf

	if [ -f ${PGPATH}/etc/lighty_port.conf ]; then 
	  server_root=`cat ${PGPATH}/etc/lighty_port.conf | grep var.server_root | cut -d'=' -f2`
	  
	  if [ "${server_root}" != "" ]; then
		  serverAddre="http://${ADMIN_IP}:${server_root}"
	  fi
	fi
fi

echo -n "${serverAddre}"
