def __init__(self,root): self.root=root root.title('Allied High School®') self.img01=PhotoImage(file='bg.png') self.labelsframe=Frame(self.root) self.h=root.winfo_screenheight() self.labelsframe.place(x=0,y=100) self.labelsframe=Frame(self.root,) self.labelsframe.place(x=0,y=100) self.root.geometry('1300x'+str(self.h-10)) self.labelbg=Label(self.root,image=self.img01) self.labelbg.place(x=0 ,y=0, width=1300, height=995) self.img00=PhotoImage(file='capture.png') program_nameS=Label(self.root,image=self.img00,font=('arial'),bg='black',fg='white',) program_nameS.place(x=0,y=0) menus=Menu(self.root) submenu0=Menu(menus) root.config(menu=menus) menus.add_cascade(label='File',menu=submenu0) submenu0.add_command(label='Exit',command=self.root.quit) self.loginframe=Frame(self.root,width=200, height=220,background="lightblue",) self.loginframe.config(bg=_from_rgb((204, 214, 229))) self.loginframe.place(x=500, y=200, width=340, height=200) self.p1=PhotoImage(file='img0.png') labels=Label(self.loginframe,image=self.p1) labels.place(x=0,y=0) login_label0=Label(self.loginframe,text='please enter your login credentials',font=('Garamond'),fg='black') login_label0.config(bg=_from_rgb((204, 214, 229))) login_label0.pack() login_label1=Label(self.loginframe,text='Username:'******'Garamond'),bg=_from_rgb((204, 214, 229))) login_label1.place(x=0,y=45) login_label2=Label(self.loginframe,text='password:'******'Garamond'),bg=_from_rgb((204, 214, 229))) login_label2.place(x=0,y=85) username=StringVar() password=StringVar() entry0a=Entry(self.loginframe,width='30', textvariable=username) entry0a.place(x=87,y=50) entry0b=Entry(self.loginframe,width='30',textvariable=password) entry0b.place(x=87,y=90,) buton0=Button(self.loginframe,text='Login',width=6,height=1,command=lambda:self.auth(str(username.get()),str(password.get()))) buton0["border"] = "5" buton0.place(relx=.5, rely=.75, anchor="center") self.label3=Label(self.loginframe,text='Invalid credentials! please Try again',width=30,height=1,fg='black',bg='red') self.footer=Frame(self.root) self.footer.place(x=0,y=740,height=30,width=1300) self.img1t=PhotoImage(file='f.png') self.img2=PhotoImage(file='t.png') self.img3=PhotoImage(file='g.png') buttonN=Button(self.footer,image=self.img1t,command=lambda:openlink('https://www.facebook.com/Aschool.php'),relief=RIDGE) buttonN.place(relx=.973,rely=0) buttonN=Button(self.footer,image=self.img2,command=lambda:openlink('https://www.Twitter.com/Aschool'),relief=RIDGE) buttonN.place(relx=.946,rely=0) buttonN=Button(self.footer,image=self.img3,command=lambda:openlink('https://www.gmail.com/Aschool'),relief=RIDGE) buttonN.place(relx=.919,rely=0) self.img1=PhotoImage(file='h.png') buton0p=Button(self.root,image=self.img1,command=self.runa) buton0p["border"] = "4" buton0p.place(x=21,y=145, anchor="center") Thread(target=self.times).start() Thread(target=self.anim).start()
def open_bill(self): try: number = int(open("PHONE", "r").read()) except: number = simpledialog.askstring("Landline Number", "Enter Number without 0.") with open("PHONE", "w") as file: file.write(f'{number}') file.close() if number: self.logs(f'Number Found: {number}') data, type = self.__http("bill", phone=number) data = data["ROWSET"]["ROW"][0] self.logs(f'Original Data: {data}') raw = { "StatementIdentifier": "TEST", "SystemIdentifier": "CWSC", "InvoiceNumber": data["INVOICE_NO"], "BillingAccountNumber": data["ACCOUNT_NO"], "SSACode": data["SSA_CODE"], "InvoiceDate": self._date(data["INVOICE_DATE"].split("-")), } self.logs(f'Dict raw data: {raw}') with tempfile.NamedTemporaryFile(delete=False, suffix=".html") as iconfile: iconfile.write(self._get_html(raw).encode()) openlink(f"{iconfile.name}") self.master.deleting_list.append(iconfile.name) return True messagebox.showinfo("Landline", "Landline number not found.")
def SoftwareUpdate(self): ver, type = self.__http("update") self.logs(f'UPDATE: {ver}') if ver["latest"] == __version__: self.isupdateaviable.set("Update Not Available") else: openlink(ver["download"]) self.isupdateaviable.set(f'Latest v{ver["latest"]} Available')
def SoftwareUpdate(self): ver = self._http( "get", "https://raw.githubusercontent.com/MayankFawkes/BSNL_FTTH/master/" "latest.json?flush_cache=True") if ver["latest"] == __version__: self.isupdateaviable.set("Update Not Available") else: openlink(ver["download"]) self.isupdateaviable.set(f'Latest v{ver["latest"]} Available')
def widget(self): tkinter.Label(self, text="Tech Solution & Gaming (Partner)", font=("TkDefaultFont", 15)).grid(row=0, column=0, columnspan=2, padx=10, pady=(25, 5)) tkinter.Button( self, text=f'Youtube', height="2", width="10", command=lambda: openlink( "https://www.youtube.com/channel/UCFW1OrFlAOdvN8Nl09BKZyw") ).grid(row=1, column=0, columnspan=2, padx=30, pady=30) tkinter.Label(self, text="Mayank Gupta (Owner)", font=("TkDefaultFont", 15)).grid(row=2, column=0, columnspan=2, padx=10, pady=(25, 5)) tkinter.Label(self, text="*****@*****.**", font=("TkDefaultFont", 10)).grid(row=3, column=0, columnspan=2, padx=10, pady=(5, 15)) tkinter.Button( self, text=f'Github', height="2", width="10", command=lambda: openlink("https://github.com/MayankFawkes")).grid( row=4, column=0, padx=30, pady=30) tkinter.Button( self, text=f'Website', height="2", width="10", command=lambda: openlink("https://mayankfawkes.xyz")).grid( row=4, column=1, padx=30, pady=30)
def widget(self): tkinter.Label(self, text="Ayushman Singh Chauhan :)", font=("TkDefaultFont", 15)).grid(row=0, column=0, columnspan=2, padx=10, pady=(25, 5)) tkinter.Button( self, text=f'Play Store', height="2", width="10", command=lambda: openlink( "https://play.google.com/store/apps/dev?id=6829475143276494298" )).grid(row=1, column=0, columnspan=2, padx=30, pady=30) tkinter.Label(self, text="Ayushman Singh Chauhan (Owner)", font=("TkDefaultFont", 15)).grid(row=2, column=0, columnspan=2, padx=10, pady=(25, 5)) tkinter.Label(self, text="*****@*****.**", font=("TkDefaultFont", 10)).grid(row=3, column=0, columnspan=2, padx=10, pady=(5, 15)) tkinter.Button( self, text=f'Github', height="2", width="10", command=lambda: openlink("https://github.com/ayushman17")).grid( row=4, column=0, padx=30, pady=30) tkinter.Button(self, text=f'Website', height="2", width="10", command=lambda: openlink( "https://github.com/ayushman17/ayushman17")).grid( row=4, column=1, padx=30, pady=30)