示例#1
0
// Was data submitted via the web?
$sub = isset($_REQUEST['btnUdmSubmit']) ? $_REQUEST['btnUdmSubmit'] : false;
// Fetch or save user data.
if ($sub) {
    // Save only if submitted data is present, and the user is
    // authenticated, or if the submission is anonymous (i.e., !$uid)
    if ($udm->saveUser()) {
        header("Location: calendar_gxlist.php");
    }
    $udm->showForm = true;
} elseif (!$sub && $uid) {
    // Fetch the user data for $uid if there is no submitted data
    // and the user is authenticated.
    $get_options = array("_userid" => $uid, "calid" => $calid);
    $udm->useDefaults = false;
    $udm->doAction("Read", $get_options);
    #$udm->getUser( $uid );
}
/* Now Output the Form.

   Any necessary changes to the form should have been registered
   before now, including any error messages, notices, or
   complete form overhauls. This can happen either within the
   $udm object, or from print() or echo() statements.

   By default, the form will include AMP's base template code,
   and any database-backed intro text to the appropriate module.

*/
$mod_id = $udm->modTemplateID;
//require_once( 'header.php' );