I think this is a problem with the redirtect.
the recorect is trying to pass a page number to the detail page which is not needed.
change line 227:
$WA_redirectURL = "cwi_detail.php?TraineeID=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."".(isset($_GET["pageNum_WADAtrainee"])?"&pageNum_WADAtrainee=".intval($_GET["pageNum_WADAtrainee"]):"") ."";
to:
$WA_redirectURL = "cwi_detail.php?TraineeID=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";