mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 02:32:50 -06:00
Improvements of "gf -server" mode and related setup
"gf -server" mode now contains everything needed to run the minibar and the grammar editor (including example-based grammar writing). The Setup.hs script installs the required files where gf -server can find them. These files have been moved to a new directory: src/www. The separate server program pgf-http is now obsolete.
This commit is contained in:
44
src/www/minibar/feedback.cgi
Normal file
44
src/www/minibar/feedback.cgi
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
bin=bin
|
||||
AUTOHEADER=no
|
||||
. $bin/cgistart.sh
|
||||
|
||||
save_feedback() {
|
||||
getquery
|
||||
|
||||
if [ -n "$feedback_path" ] &&
|
||||
echo "t=$(date +%F+%T)&ip=$REMOTE_ADDR&$query&accept_language=$HTTP_ACCEPT_LANGUAGE&user_agent=$(echo -n $HTTP_USER_AGENT | plain2url)" >> "$feedback_path"
|
||||
then
|
||||
|
||||
pagestart "Thank you!"
|
||||
echo "Your feedback has been saved."
|
||||
begin script type="text/javascript"
|
||||
echo "setTimeout(function(){window.close()},4000);"
|
||||
end
|
||||
pageend
|
||||
|
||||
else
|
||||
|
||||
pagestart "Feedback error"
|
||||
echo "Your feedback could not be saved. Sorry."
|
||||
p
|
||||
tag 'input type=button onclick="javascript:history.back()" value="<- Go back"'
|
||||
pageend
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
view_feedback() {
|
||||
charset="UTF-8"
|
||||
pagestart "Collected Feedback"
|
||||
begin pre class=feedbacklist
|
||||
Reg show reverse drop color_depth,pixel_depth,outer_size,inner_size,available_screen_size from-url <"$PATH_TRANSLATED" | plain2html
|
||||
end
|
||||
pageend
|
||||
}
|
||||
|
||||
case "$PATH_TRANSLATED" in
|
||||
"") save_feedback ;;
|
||||
*) view_feedback
|
||||
esac
|
||||
Reference in New Issue
Block a user