void Not_RemoveNotice (void) { char Query[512]; long NotCod; /***** Get the code of the notice to remove *****/ NotCod = Not_GetParamNotCod (); /***** Remove notice *****/ /* Copy notice to table of deleted notices */ sprintf (Query,"INSERT IGNORE INTO notices_deleted (NotCod,CrsCod,UsrCod,CreatTime,Content,NumNotif)" " SELECT NotCod,CrsCod,UsrCod,CreatTime,Content,NumNotif" " FROM notices" " WHERE NotCod='%ld' AND CrsCod='%ld'", NotCod,Gbl.CurrentCrs.Crs.CrsCod); DB_QueryINSERT (Query,"can not remove notice"); /* Remove notice */ sprintf (Query,"DELETE FROM notices" " WHERE NotCod='%ld' AND CrsCod='%ld'", NotCod,Gbl.CurrentCrs.Crs.CrsCod); DB_QueryDELETE (Query,"can not remove notice"); /***** Mark possible notifications as removed *****/ Ntf_MarkNotifAsRemoved (Ntf_EVENT_NOTICE,NotCod); /***** Mark possible social note as unavailable *****/ Soc_MarkSocialNoteAsUnavailableUsingNoteTypeAndCod (Soc_NOTE_NOTICE,NotCod); /***** Update RSS of current course *****/ RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs); }
static void Ban_CreateBanner (struct Banner *Ban) { /***** Create a new banner *****/ DB_QueryINSERT ("can not create banner", "INSERT INTO banners" " (Hidden,ShortName,FullName,Img,WWW)" " VALUES" " ('N','%s','%s','%s','%s')", Ban->ShrtName,Ban->FullName,Ban->Img,Ban->WWW); }