diff --git a/web/app.py b/web/app.py
index 8d43533..5fa3670 100644
--- a/web/app.py
+++ b/web/app.py
@@ -2565,7 +2565,7 @@ TG #: ''' + str(tg_d.tg) + '''
options_l = ''
content = content + '''
- | ''' + i.query_term + ''' |
+ ?''' + i.query_term + ''' |
''' + i.content + ''' |
''' + i.author + ''' |
''' + options_l + ''' |
@@ -2779,6 +2779,7 @@ TG #: ''' + str(tg_d.tg) + '''
@app.route('/mail/', methods=['GET', 'POST'])
@login_required
def get_mail(user):
+ gateway_o = ''
show_mailbox = False
if current_user.username == user:
if request.args.get('delete_mail'):
@@ -2794,7 +2795,8 @@ TG #: ''' + str(tg_d.tg) + '''
'''
elif request.args.get('send_sms'):
- sms_que_add(current_user.username, '', 0, int(request.form.get('dmr_id')), 'motorola', 'unit', 'DATA', '', request.form.get('message'))
+ sms_que_add(current_user.username, '', 0, int(request.form.get('dmr_id')), 'motorola', 'unit', request.form.get('gateway'), '', request.form.get('message'))
+ print(request.form.get('gateway'))
content = '''Message in que.
Redirecting in 1 seconds.
'''
@@ -2804,6 +2806,10 @@ TG #: ''' + str(tg_d.tg) + '''
else:
show_mailbox = True
mail_all = MailBox.query.filter_by(rcv_callsign=user.upper()).order_by(MailBox.time.desc()).all()
+ data_gateways = ServerList.query.filter(ServerList.other_options.ilike('%DATA_GATEWAY%')).all()
+ for i in data_gateways:
+ gateway_o = gateway_o + ''' \n'''
+
content = ''
for i in mail_all:
content = content + '''
@@ -2815,7 +2821,7 @@ TG #: ''' + str(tg_d.tg) + '''
'''
else:
content = 'Not your mailbox.
'
- return render_template('mail.html', markup_content = Markup(content), user_id = user, show_mail = show_mailbox)
+ return render_template('mail.html', markup_content = Markup(content), user_id = user, show_mail = show_mailbox, gateways = Markup(gateway_o))
@app.route('/talkgroups/') #, methods=['POST', 'GET'])
@@ -6816,24 +6822,27 @@ Name: ''' + p.name + ''' - Port: ''' + str(
elif 'get_sms_que' in hblink_req:
if hblink_req['get_sms_que']:
- q = sms_que('DATA')
- print(q)
+ q = sms_que(hblink_req['get_sms_que'])
response = jsonify(
que=q
- ## OBP=get_OBP(hblink_req['get_config'])
-
)
- sms_que_purge('DATA')
+ sms_que_purge(hblink_req['get_sms_que'])
elif 'sms_cmd' in hblink_req:
if hblink_req['sms_cmd']:
- print(hblink_req['cmd'][:1])
if hblink_req['cmd'][:1] == '?':
- split_cmd = str(hblink_req['cmd']).split(' ')
- tp = TinyPage.query.filter_by(query_term=str(split_cmd[0])[1:]).first()
- print(tp.content)
+ tst = ServerList.query.filter(ServerList.other_options.ilike('%DATA_GATEWAY%')).first()
+ print(tst)
+ oo_str = tst.other_options
+ print(oo_str.split(';'))
- sms_que_add('', '', 0, hblink_req['rf_id'], 'motorola', 'unit', hblink_req['sms_cmd'], '', tp.content)
+ try:
+ split_cmd = str(hblink_req['cmd']).split(' ')
+ tp = TinyPage.query.filter_by(query_term=str(split_cmd[0])[1:]).first()
+## sms_que_add('', '', 0, hblink_req['rf_id'], 'motorola', 'unit', hblink_req['sms_cmd'], '', tp.content)
+ except:
+ sms_que_add('', '', 0, hblink_req['rf_id'], 'motorola', 'unit', hblink_req['sms_cmd'], '', 'Query not found or other error.')
+
diff --git a/web/templates/mail.html b/web/templates/mail.html
index e57cf80..7d5c66c 100644
--- a/web/templates/mail.html
+++ b/web/templates/mail.html
@@ -45,6 +45,13 @@
+
+
Message