return warningMsg("<font color=red size=+1>You first have to login before using this feature. Use the left menu to log in.</font>",req)
else:
res = run_sql("SELECT sbmSUBMISSIONS.* FROM sbmSUBMISSIONS,sbmACTION WHERE sactname=action and email=%s and id!='' "+docselect+" ORDER BY doctype,"+reqorder,(u_email,))
currentdoctype = ""
currentaction = ""
currentstatus = ""
num = 0
for row in res:
if currentdoctype != row[1]:
currentdoctype = row[1]
currentaction = ""
currentstatus = ""
res2 = run_sql("SELECT ldocname FROM sbmDOCTYPE WHERE sdocname=%s",(currentdoctype,))
idtext+= " <a onClick='if (confirm(\"Are you sure you want to delete this submission?\")){document.forms[0].deletedId.value=\"%s\";document.forms[0].deletedDoctype.value=\"%s\";document.forms[0].deletedAction.value=\"%s\";document.forms[0].submit();return true;}else{return false;}' href=''><img src=%s/smallbin.gif border=0 alt='delete submission %s in %s'></a>" % (row[4],currentdoctype,currentaction,images,row[4],ldocname)