def regis(self, name1, name2, email, phone, password): email = email.replace('.', '') data = { email: { 'name': name1 + ' ' + name2, 'phone': phone, 'password': password, 't1': '0', 't2': '0', 't3': '0', 't4': '0', 't5': '0', 't6': '0', 't7': '0', 't8': '0' } } response = set_firebase('', data) if response == 0: pop.error_pop('please turn on internet') self.dialog.dismiss() return db.change_all_db(name1 + ' ' + name2, phone, email, '0', '0', '0', '0', '0', '0', '0', '0') a = App.get_running_app() if a.info_state != 0: a.info_state = 1 if db.get_status() != '0': a.event_scr_effects = [1, 1, 1, 1, 1, 1] db.change_status('1') a.main_widget.ids.logStatus.text = 'logout' self.dialog.dismiss() Snackbar(text="registered successfully").show() self.manager.current = 'vute'
def send_fed1(self, t): phone = db.get_db('phone') data1 = {phone: t} response = set_firebase('feedback', data1) self.dialoga.dismiss() if response == 0: pop.error_pop('please on internet') else: Snackbar(text="Thanks for feedback").show() self.manager.current = 'vute'
def regis(self, email, password): if (email == '') | (password == ''): pop.error_pop('fill all the partuculars') self.dialog.dismiss() return email = email.replace('.', '') r2 = get_firebase(email) if r2 != 0: if (r2 == None): pop.error_pop('entered non registerd email address') self.dialog.dismiss() return r = str(r2['password']) if (r != password): pop.error_pop('incorrect password') self.dialog.dismiss() return db.change_all_db(r2['name'], r2['phone'], email, r2['t1'], r2['t2'], r2['t3'], r2['t4'], r2['t5'], r2['t6'], r2['t7'], r2['t8']) db.change_status('1') self.dialog.dismiss() a = App.get_running_app() if a.info_state != 0: a.info_state = 1 a.event_scr_effects = [1, 1, 1, 1, 1, 1] Snackbar(text="login success").show() a.main_widget.ids.logStatus.text = 'logout' #self.manager.=FadeTransition self.manager.current = 'vute' else: pop.error_pop('no internet connection') self.dialog.dismiss()
def enroll1(self, event, no): dblist = db.get_db('all') namedb = dblist[0] numberdb = dblist[1] maildb = dblist[2] data = {numberdb: {'name': namedb}} k1 = set_firebase(event, data) data1 = {'t' + str(no): '1'} k2 = set_firebase(maildb, data1) if (k1 == 0) | (k2 == 0): pop.error_pop('please turn on internet') self.dialoga.dismiss() return else: db.change_db(no, '1') self.dialoga.dismiss() self.event_scr_effects[no - 1] = 1 if self.info_state != 0: self.info_state = 1 Snackbar(text="successfully enrolled").show() self.main_widget.ids.scr_mngr.current = 'event'
def show_example_dialog(self, name1, name2, email, phone, password): self.dialog = pop.load_pop() if (len(name1) == 0) | (len(name2) == 0) | (len(email) == 0) | ( len(phone) == 0) | (len(password) == 0): pop.error_pop("please fill all the details") return if (email[-10:] != '@gmail.com'): pop.error_pop("please enter valid email address") return if (len(phone) < 10) | (len(phone) > 10): pop.error_pop("please enter valid phone number") return if (len(password) < 6): pop.error_pop("password should have a minimum 6 digits") return #self.regis() k = threading.Thread(target=self.regis, args=(name1, name2, email, phone, password)) k.start() self.dialog.open()