예제 #1
0
def doMenuSelect(menulist,orgid,alvl):
    # sort of a long way around sanitizing the input and then calling the SQL function required
    if menulist[0] == 'view' and alvl > 8:
        #if menulist[1] == 'update':
        doMWList = [menulist[0],menulist[1],orgid]
        doMView_dm.doView(doMWList)
    elif menulist[0] == 'genorgview' and alvl > 8:
        # debug
        #print "\nGenerating a view file for org " + str(orgid)
        doMGenOrgView.doGenView(orgid)
    elif menulist[0] == 'blacklist':
        if menulist[1] == 'update':
            print "\nsend blacklist,update to blacklist function for org " + str(orgid)
            doMWList = [menulist[0],menulist[1],orgid]
            doMBlackList_dm.getViewData(doMWList[2])
        else:
            print "\nsend blacklist,new to blacklist function for org " + str(orgid)
            doMWList = [menulist[0],menulist[1],orgid]
            doMBlackList_dm.getViewData(doMWList[2])
    elif menulist[0] == 'whitelist':
        if menulist[1] == 'update':
            print "\nsend whitelist update to whitelist function for org " + str(orgid)
        else:
            print "\nsend whitelist new to whitelist function for org " + str(orgid)
    else:
        print "\nNo authorized selection was detected\n"
    return
def doMenuSelect(menulist,orgid):
    # sort of a long way around sanitizing the input and then calling the SQL function required
    if menulist[0] == 'view':
        #if menulist[1] == 'update':
        doMWList = [menulist[0],menulist[1],orgid]
        doMView_dm.doView(doMWList)
    elif menulist[0] == 'genorgview':
        # debug
        print "\nGenerating a view file for org " + str(orgid)
        doMGenOrgView.doGenView(orgid)


    elif menulist[0] == 'blacklist':
        if menulist[1] == 'update':
            print "\nsend blacklist,update to blacklist function for org " + str(orgid)
        else:
            print "\nsend blacklist,new to blacklist function for org " + str(orgid)
    else:
        if menulist[1] == 'update':
            print "\nsend whitelist,update to whitelist function for org " + str(orgid)
        else:
            print "\nsend whitelist,new to whitelist function for org " + str(orgid)
    return