group_id=run_sql("""SELECT id FROM usergroup WHERE name = %s""",(group,))[0][0]
else:
return""
t="<br /><br /><B>Your request has been taken into account!</B><br /><br />"
sth=run_sql("SELECT rn FROM sbmCPLXAPPROVAL WHERE doctype=%s and categ=%s and rn=%s and type=%s and id_group=%s",(doctype,categ,rn,act,group_id))
ifnotlen(sth)==0:
run_sql("UPDATE sbmCPLXAPPROVAL SET dLastReq=NOW(), status='waiting', dProjectLeaderAction='' WHERE doctype=%s and categ=%s and rn=%s and type=%s and id_group=%s",(doctype,categ,rn,act,group_id))
if(act=="RRP")or(act=="RPB"):
t+="NOTE: Approval has already been requested for this document. You will be warned by email as soon as the Project Leader takes his/her decision regarding your document.<br /><br />"
else:
if(act=="RRP")or(act=="RPB"):
t+="A notification has been sent to the Publication Committee Chair. You will be notified by email as soon as the Project Leader makes his/her decision regarding your document."
ifact=="RDA":
t+="An email has been sent to the Project Leader. You will be warned by email as soon as the Project Leader takes his/her decision regarding your document.<br /><br />"