fix start/end conservation on import
This commit is contained in:
parent
d6115e9f73
commit
338209ed31
37
import
37
import
@ -28,16 +28,31 @@ template=AP:Explorer:Seer:XM:Walked:Builder:Connector:Mind_Controller:MU:Longest
|
|||||||
|
|
||||||
if [[ $REQUEST_METHOD == POST ]]
|
if [[ $REQUEST_METHOD == POST ]]
|
||||||
then
|
then
|
||||||
|
declare -A POST
|
||||||
|
exprdsname='^[[:upper:][:lower:]_]+$'
|
||||||
|
while read dsname value
|
||||||
|
do
|
||||||
|
if [[ $dsname =~ $exprdsname ]]
|
||||||
|
then
|
||||||
|
POST["$dsname"]="$value"
|
||||||
|
fi
|
||||||
|
done < <(
|
||||||
|
sed 's/&/\n/g;s/=/ /g'
|
||||||
|
)
|
||||||
|
POST["data"]="${POST["data"]//%0D%0A/
|
||||||
|
}"
|
||||||
|
POST["data"]="${POST["data"]//%3A/:}"
|
||||||
|
POST["data"]="${POST["data"]//+/ }"
|
||||||
|
|
||||||
cat <<-EOHead
|
cat <<-EOHead
|
||||||
Content-type: text/plain
|
Content-type: text/plain
|
||||||
Last-Modified: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z')
|
Last-Modified: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z')
|
||||||
Expires: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z')
|
Expires: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z')
|
||||||
|
|
||||||
EOHead
|
EOHead
|
||||||
cat <<-EOHead >/dev/null
|
cat <<-EOHead
|
||||||
refresh: 0,url=/cgi/$webuser/?start=${POST["start"]}&end=${POST["end"]}
|
refresh: 0,url=/cgi/$webuser/?start=${POST["start"]}&end=${POST["end"]}
|
||||||
|
|
||||||
EOHead
|
EOHead
|
||||||
|
echo
|
||||||
if [[ $webuser == $AUTH_USER || $webuser == dev ]]
|
if [[ $webuser == $AUTH_USER || $webuser == dev ]]
|
||||||
then
|
then
|
||||||
echo "Welcome agent $webuser"$'!\n\n'
|
echo "Welcome agent $webuser"$'!\n\n'
|
||||||
@ -61,22 +76,6 @@ then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
declare -A POST
|
|
||||||
exprdsname='^[[:upper:][:lower:]_]+$'
|
|
||||||
while read dsname value
|
|
||||||
do
|
|
||||||
if [[ $dsname =~ $exprdsname ]]
|
|
||||||
then
|
|
||||||
POST["$dsname"]="$value"
|
|
||||||
fi
|
|
||||||
done < <(
|
|
||||||
sed 's/&/\n/g;s/=/ /g'
|
|
||||||
)
|
|
||||||
POST["data"]="${POST["data"]//%0D%0A/
|
|
||||||
}"
|
|
||||||
POST["data"]="${POST["data"]//%3A/:}"
|
|
||||||
POST["data"]="${POST["data"]//+/ }"
|
|
||||||
echo "${POST["data"]}"
|
|
||||||
while read date hour data
|
while read date hour data
|
||||||
do
|
do
|
||||||
data=$(date -d "$date $hour" +%s):${data// /:}
|
data=$(date -d "$date $hour" +%s):${data// /:}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user