Sindbad~EG File Manager

Current Path : /home/numerotech/mcinfo.numerotech.com/mc_info_update/core/library/
Upload File :
Current File : //home/numerotech/mcinfo.numerotech.com/mc_info_update/core/library/helper.py

from core import app
from flask import url_for,render_template_string
from datetime import datetime, date, time, timedelta
import random
import datetime
import base64
#settime working as global variable but commented for easy identification of this variable using class name 
# global settime
# settime = 5

class Helper:
	
	AppType             = "MC INFO"
	active_key          = "mc_info"

	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


app.jinja_env.globals.update(Helper=Helper) 

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists