def ListForTextSearch(objRequest, objHere): strSearchFor = GetParameter(objHere.REQUEST, 'SearchFor') if not strSearchFor: return "No search criteria entered" lstWords = strSearchFor.split() dictBooks = {} for strWord in lstWords: for strLocation in ('Title', 'SubTitle', 'ISBN', 'Authors'): objBooks = SearchMany(objHere, 'MCIBook', strLocation, strWord) dictBooks = CountBooks(dictBooks, objBooks) strResult = GetBooklistFromDictionary(dictBooks, len(lstWords), "words", objHere) if not strResult: strResult = "No books found" return """<span class = "PageTitle2">All books for "%s"</span><br>%s""" % (strSearchFor, strResult)
def Unbounce(objMember): strEmailAddress = GetParameter(objMember.REQUEST, "SubmitButton") strEmailAddress = strEmailAddress.split()[1] objMember.Unbounce(strEmailAddress) SetMessage(objMember, '', '%s resumed' % strEmailAddress)