-if [ -n "$_GET[\"action\"]" ]; then
- . "$_EXEC/shcgi/action.sh"
-elif [ -n "$_GET[\"export\"]" ]; then
- . "$_EXEC/shcgi/export.sh"
+if [ -n "$STATIC" -a -e "${_EXEC}/static/${STATIC}" ]; then
+ . "$_EXEC/shcgi/static.sh" "$_EXEC/static/$STATIC"
+elif [ -n "$ACTION" -a -x "${_EXEC}/actions/${ACTION}.sh" ]; then
+ . "${_EXEC}/actions/${ACTION}.sh"
+elif [ -n "$PAGE" -a -x "${_EXEC}/pages/${PAGE}.sh" ]; then
+ . "$_EXEC/shcgi/page.sh"