cgilite_count(){
case $1 in
- GET) printf %s "${QUERY_STRING}";;
- POST) printf %s "?${cgilite_post}";;
- REF) printf %s "?${HTTP_REFERER#*\?}";;
+ GET) printf %s "&${QUERY_STRING}";;
+ POST) printf %s "&${cgilite_post}";;
+ REF) printf %s "&${HTTP_REFERER#*\?}";;
esac \
- | grep -Eo '[&?]'"$2"'=[^&]*' \
+ | grep -Eo '&'"$2"'=[^&]*' \
| wc -l
}
cgilite_value(){
printf "$(
case $1 in
- GET) printf %s "${QUERY_STRING}";;
- POST) printf %s "?${cgilite_post}";;
- REF) printf %s "?${HTTP_REFERER#*\?}";;
+ GET) printf %s "&${QUERY_STRING}";;
+ POST) printf %s "&${cgilite_post}";;
+ REF) printf %s "&${HTTP_REFERER#*\?}";;
esac \
- | grep -Eo '[&?]'"$2"'=[^&]*' \
+ | grep -Eo '&'"$2"'=[^&]*' \
| sed -rn "${3:-1}"'{s;^[^=]+=;;; s;\+; ;g; s;\\;\\\\;g; s;%;\\x;g; p}'
)"
}