def UserNumber(): i=0 sqlCom = "SELECT ap_numclient,ap_ip FROM accesspoint_ip" db = sql.RunCom(sqlCom) dbUserNumber=[] for x in db : dbUserNumber.append([]) dbUserNumber[i].append(x[0]) dbUserNumber[i].append(x[1]) i+=1 return dbUserNumber
def server_presetlevel(): sqlCom = "SELECT server_presetlevel FROM server_data" db = sql.RunCom(sqlCom) #print db return int(db[0][0])
def Group(ip): sqlCom = "SELECT ap_group FROM accesspoint_ip WHERE ap_ip = '%s'" %(ip) db = sql.RunCom(sqlCom) db = db[0] db = db[0] return db
def APdata(ip): sqlCom = "SELECT ap_ip,ap_username,ap_password FROM accesspoint_ip WHERE ap_ip = '%s'" % (ip) db = sql.RunCom(sqlCom) return db
def Groups(): sqlCom = "SELECT ap_group FROM accesspoint_ip" db = sql.RunCom(sqlCom) return db
def APdatas(): sqlCom = "SELECT ap_ip,ap_username,ap_password FROM accesspoint_ip " db = sql.RunCom(sqlCom) #print db return db
def APdataStart(Group): sqlCom = "SELECT ap_ip,ap_username,ap_password FROM accesspoint_ip WHERE ap_group = '%s'" %(Group) db = sql.RunCom(sqlCom) #print db return db
def server_different(): sqlCom = "SELECT server_different FROM server_data" db = sql.RunCom(sqlCom) #print db return int(db[0][0])
def server_inactivetime(): sqlCom = "SELECT server_inactivetime FROM server_data" db = sql.RunCom(sqlCom) #print db return int(db[0][0])