Add global music player, invoicing/payment system, account subpages, mail account admin, and the qualityiron.vegas Jet 2.0 port
Jet interpreter (Tag.cpp, __call.cpp, __imap*.cpp/h, __smtpsend.cpp/h, __imapemptyfolder.cpp/h - new): assorted parser/tag fixes found across this work - a stray literal-tag-in-comment and backslash-quote parser corruption class, a dangling-pointer fix, a __call.cpp fd leak, IMAP folder-management tags, multi-account/per-host IMAP support, and a smtpsend Message-ID fix. barant.com site (jetc/barant-site/): - A site-wide persistent music player (header band, playlist/queue, stereo FFT EQ, session-persisted state) fed by new library/ ianslibrary/music song-list subpages. - /account split into info/phones/invoices subpages; a full invoicing and Square payment system (create/edit/copy/pay/email invoice); admin invoice management and mail-account management subpages. - /services split into overview/hosting/siptrunking/documents subpages, retiring the old standalone pages. - SIPPHONE.tag: a Jet 2.0 WebRTC softphone tag. - main.css/spa.js/email.js: the SPA loading indicator, the music player band styling, and assorted fixes accumulated alongside this work. qualityiron-site/: the qualityiron.vegas job/contractor/customer/ document management app, ported from its original Jet 1.4 codebase to Jet 2.0 as barant.coms APIServers second multi-tenant site. wcwc/wcwc.jet: the WCWC site Jet source (wcwc.jtc build output not included). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
905fbafa5a
commit
b8f7793773
406 files changed
+15803
-587
No files matched your search
@@ -0,0 +1,43 @@
|
||||
#api POST /admin/add-mail-account
|
||||
#api POST /admin/remove-mail-account
|
||||
<set name="host" value="localhost">
|
||||
<set name="database" value="barant">
|
||||
<set name="user" value="barant">
|
||||
<set name="password" value="uversa1960">
|
||||
<database name="$[database]" host="$[host]" user="$[user]" password="$[password]" sessionid="">
|
||||
<header name="Content-Type" value="application/json">
|
||||
<if value1="$[@_login_type]" value2="admin" type="ne">
|
||||
{"ok":false,"error":"Not authorized."}
|
||||
<else>
|
||||
<if value1="$[REQUEST_URI]" value2="/admin/add-mail-account" type="eq">
|
||||
<if value1="$[mail_host]" value2="" type="eq">
|
||||
{"ok":false,"error":"Please enter a mail server."}
|
||||
<else>
|
||||
<if value1="$[mail_email]" value2="" type="eq">
|
||||
{"ok":false,"error":"Please enter an e-mail address."}
|
||||
<else>
|
||||
<if value1="$[mail_password]" value2="" type="eq">
|
||||
{"ok":false,"error":"Please enter a password."}
|
||||
<else>
|
||||
<try>
|
||||
<imap config="./email.cfg" host="$[mail_host]" user="$[mail_email]" password="$[mail_password]" sessionid="">
|
||||
</imap>
|
||||
<sql>insert into email_accounts (user_id,email,host,password) values ($[@_login_id],'$[mail_email]','$[mail_host]','$[mail_password]')
|
||||
on duplicate key update host='$[mail_host]', password='$[mail_password]'</sql>
|
||||
{"ok":true}
|
||||
<catch name="_imaperr">
|
||||
{"ok":false,"error":"Could not connect with those credentials: $[_imaperr]"}
|
||||
</try>
|
||||
</if>
|
||||
</if>
|
||||
</if>
|
||||
<else>
|
||||
<if value1="$[account_id]" value2="" type="eq">
|
||||
{"ok":false,"error":"No account specified."}
|
||||
<else>
|
||||
<sql>delete from email_accounts where id=$[account_id] and user_id=$[@_login_id]</sql>
|
||||
{"ok":true}
|
||||
</if>
|
||||
</if>
|
||||
</if>
|
||||
</database>
|
||||
Reference in new issue
Block a user