Format: function ZAPsave($page, $value, $text='', $message='')
Explanation: This important function, can accomplish many purposes, depending on the parameters passed to it.
Basically, this function reads the body of the target page, resets it to $text if a value for that is supplied. Next an array is set up from the $value list of fields. If $message indicates the function is called by erasedata, all specified text variable are deleted. Otherwise, the data fields in $value are inserted/overwritten into the target page (after first being encoded to ensure safer values). Finally the specified message is set, and the target page is saved.
This is used by savedata, erasedata, create, delete (by setting $text='delete'), and various other functions.