def backup():
    qu=ui.popup_menu([u'Phone', u'Memory Card'], u'Select Location')
    loc=['c:\\', 'e:\\']
    try:
        dir=loc[qu]+'ADIKStools\\mySMSbackup\\'+time.strftime('%Y%m%d')+'\\'
    except:
        return
    if not os.path.exists(dir):
        os.makedirs(dir)
        ui.note(u'Folder Successfully Created', 'conf')
    n=dir+time.strftime('%H.%M.%S')+'.txt'
    gui.global_note(u'backing up\nplease wait', 'info')
    fl=open(n, 'a')
    fl.write(u'ADIKSonline SMS Backup\n\n%s\n' %q)
    b=t.sms_messages()
    if len(b)==0:
        ui.note(u'you have no message in your inbox'.upper())
        fl.write(u'No message in Inbox ! ! !\n\n%s\n' %u)
        fl.close()
        return
    y=0
    for i in b:
        try:
            fl.write(u'MESSAGE ID: %d\nSENDER: %s\nTIME: %s\nCONTENTS: %s\n\n%s\n\n' %(i, str(t.address(i)), time.ctime(t.time(i)), t.content(i), u))
            e32.ao_yield()
        except:
            y+=1
            gui.global_note(u'an error occured', 'error')
    fl.write(u'get more, contact:\[email protected]\n+2347035536245')
    fl.close()
    gui.global_note(str(len(b)-y)+u' successful'+u'\n'+str(y)+u' errors', 'confirm')
    e32.ao_sleep(1.5)
    if len(b)-y and msgquery.infopopup(u'View Backup Now?', u'View Backup', msgquery.OKRBack):
        view(n)
def dresscode():
    global a, b
    topc=['red', 'yellow', 'green', 'blue', 'black', 'wine', 'brown', 'white', 'grey', 'pink', 'orange']
    troc=['white', 'black', 'striped', 'blue_jean', 'black_jean']
    a=random.choice(topc)
    b=random.choice(troc)
    #c=random.choice(color_list)
    result=u'TOP: %s\nTROUSERS: %s\n\nyou like it?' %(a, b)
    a, b=eval(a), eval(b)
    viewit(a, b)
    ans=msgquery.infopopup(result, u'Dress Code Result:', msgquery.OKRCancel)
    return ans
def help():
    msgquery.infopopup(u'SMS Backup by ADIKSonline\nVersion: 1.0\n\nclick on d Backup SMS to create a .TXT file of all received messages.\nAll backups ar stored to\nDRIVE:\\ADIKStools\\mySMSbackup\n\n1Luv...', u'mySMSbackup Help', msgquery.OKREmpty)