Sindbad~EG File Manager
from core import app
from flask import url_for,render_template
from datetime import datetime, date, time, timedelta
import datetime
from flask import render_template_string
import random
#settime working as global variable but commented for easy identification of this variable using class name
# global settime
# settime = 5
class Helper:
open_profile = 1
app_type = "PROFILE"
# testmail = "sridharan.r@numerotec.com"
testmail = "harini@numerotec.com"
cdn_url = "https://cdn.jsdelivr.net/gh/NumeroTec/ntec_cdn@main"
live_url = "https://sc.aios-scientificcommittee.org/1/aios"
# society_id = 12
# attch_type_id = {'aios':1}
def email_mask(email):
if email:
lo = email.find('@')
if lo>0:
mask_email = email[0]+"*****"+email[lo-1:]
return mask_email
return email
def mobile_mask(mobile):
if mobile:
lo = len(mobile)
if lo>0:
mask = mobile[:2]+"******"+mobile[lo-2:]
return mask
return mobile
def getcurrenttimestamp():
ct = datetime.datetime.now()
ts = ct.timestamp()
return ts
def join_dicts(x, y):
z = x.copy() # start with keys and values of x
z.update(y) # modifies z with keys and values of y
return z
def getAdditionalform(society_id,data):
if int(society_id) == 1: #VRSI
# print("calling")
return render_template('users/additional/vrsi.html',data=data)
if int(society_id)==18:
# print("calling")
return render_template('users/additional/ksos.html',data=data)
return ""
def convert_html_from_string(data):
temp = app.jinja_env.from_string("{{html_content|safe}}").render(**data)
return render_template_string(temp,**data)
def merge_tags(text,values):
for k, v in values.items():
text = text.replace('*|'+k+'|*', v)
return text
def random4digt():
number = random.randint(1000,9999)
return number
app.jinja_env.globals.update(Helper=Helper)
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists