Esempio n. 1
0
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
Esempio n. 2
0
def server_presetlevel():
    sqlCom = "SELECT server_presetlevel FROM server_data"
    db = sql.RunCom(sqlCom)
    #print db
    return int(db[0][0])
Esempio n. 3
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
Esempio n. 4
0
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
Esempio n. 5
0
def Groups():
    sqlCom = "SELECT ap_group FROM accesspoint_ip"
    db = sql.RunCom(sqlCom)
    return db
Esempio n. 6
0
def APdatas():
    sqlCom = "SELECT ap_ip,ap_username,ap_password FROM accesspoint_ip "
    db = sql.RunCom(sqlCom)
    #print db
    return db
Esempio n. 7
0
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
Esempio n. 8
0
def server_different():
    sqlCom = "SELECT server_different FROM server_data"
    db = sql.RunCom(sqlCom)
    #print db
    return int(db[0][0])
Esempio n. 9
0
def server_inactivetime():
    sqlCom = "SELECT server_inactivetime FROM server_data"
    db = sql.RunCom(sqlCom)
    #print db
    return int(db[0][0])