: INSERT INTO : msg : SET : msg_title = ${mysql::cgi.param.msg_title}, : msg_text = ${mysql::cgi.param.msg_text}, : user_id = $userid ); sql(db, <:SQL> : INSERT INTO : msg_journal : SET : msg_id = last_insert_id(), : journal_id = $j.jid ); case action ~== "update": if (not (isadmin or j.userid == userid)) panic "Security ERROR!"; sql(db, <:SQL> : UPDATE : journal : SET : journal_title = ${mysql::cgi.param.update_title}, : journal_text = ${mysql::cgi.param.update_text} : WHERE : journal_id = $j.jid ); sql(db, "DELETE FROM journal_patch WHERE journal_id = $j.jid"); foreach[] match (cgi.param.update_text =~ /^\s*smap\s+(\S+)\s*$/NAimg) sql(db, "INSERT INTO journal_patch SET journal_id = $j.jid, patch_id = (SELECT patch_id FROM patch WHERE patch_uid = ${mysql::match[1]})"); case action ~== "discard": if (not (isadmin or j.userid == userid)) panic "Security ERROR!"; sql(db, <:SQL> : UPDATE : journal : SET : journal_discarded = 1 : WHERE : journal_id = $j.jid ); return "Journal #$j.jid discarded."; } } var j = sql_tuple(db, <:SQL> : SELECT : j.journal_id AS id, : j.journal_title AS title, : j.journal_text AS text, : j.user_id_owner AS userid : FROM : journal AS j : WHERE : journal_id = ${mysql::journal_id} ); if (j.title !~ /\S/) j.title = ""; if (j.text !~ /\S/) j.text = ""; ?>
:
${(xml::j.text) =~ s,^(\s*smap\s+)(\S+)(\s*)$,$1$2$3,Rgm}
SELECT msg.msg_title AS title, msg.msg_text AS text, user.user_name AS username FROM msg, msg_journal, user WHERE msg_journal.journal_id = ${mysql::journal_id} AND msg_journal.msg_id = msg.msg_id AND msg.user_id = user.user_id ORDER BY msg.msg_id ); ?> :

:

:
by ${xml::m.username}
:
${smtext::m.title}
:
${smtext::m.text}
:
This journal is owned by: $owner
Patches in this journal: $po open, $pc closed
:
:
: : : : : Title: :
:
: :
:
:
:
: : : : : Title: :
:
: :
:
:
:
: : : : : :
: