def getListTime(self, cinemaID, filmID): self.listTime = [] db = DB() for db in DB().select("Times", "*", "cinema_id="+str(cinemaID)+" AND film_id="+str(filmID)): arr = {} arr["id"] = db[0] arr['time'] = db[3] arr['price'] = db[4] self.listTime.append(arr)
def getListFilm(self): self.listFilm = [] for db in DB().select("Films", "*"): arr = [] arr.append(db[0]) arr.append(db[1]) self.listFilm.append(arr)
def getListPlaces(self, timeID): self.listPlace = [] for db in DB().select("Halls", "*", "time_id=" + str(timeID)): arr = {} arr["id"] = db[0] arr['place'] = db[2] arr['status'] = db[3] self.listPlace.append(arr)
def __init__(self): self.user = User() self.myTickets = MyTickets() self.cinema = Cinema() self.film = Film() self.time = Time() self.place = Place() self.db = DB()
def setPlace(self, place): self.place = place for item in self.listPlace: if item['place'] in place: DB().change("Halls", "status=1", "id=" + str(item['id']))
def __init__(self): self.id = None self.login = None self.password = None self.name = None self.db = DB()
def getListCinema(self): self.listCinema = [] db = DB() data = db.select('Cinemas', ['id', 'name']) for item in data: self.listCinema.append(item)