#// mview.awk #// Display one post #// 25.04.2015 #// #// Copyright (C) 2015 Balthasar SzczepaƄski #// #// This program is free software: you can redistribute it and/or modify #// it under the terms of the GNU Affero General Public License as #// published by the Free Software Foundation, either version 3 of the #// License, or (at your option) any later version. #// #// This program is distributed in the hope that it will be useful, #// but WITHOUT ANY WARRANTY; without even the implied warranty of #// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #// GNU Affero General Public License for more details. #// #// You should have received a copy of the GNU Affero General Public License #// along with this program. If not, see . BEGIN{ FS="=" }; { eq=index($0,"=") argtab[substr($0,1,eq-1)]=substr($0,eq+1) }; END{ if(key!=argtab["key"]&&cat=="wt"&&argtab["key"]!="") { print"Invalid key.

" exit } print "
" print "
"argtab["subject_h"]"
" print "
"argtab["username_h"]" • "argtab["y"]"-"argtab["m"]"-"argtab["d"]" "argtab["h"]":00
quote "((cat=="wt")?("edit "):"")"remove "(argtab["ID"]!=""?" OTT":"")"
" print "
"((argtab["HTML"]!="")?argtab["HTML"]:argtab["BBHTML"])"
" print "
" }