* */ extract($_SERVER); extract($_REQUEST); # Initialization stuff # -------------------- $bn_action="edit"; $bn_action_mode="W"; require ("./init.inc"); # header and footer are to be displayed if no-frame mode & no popup # ------------------------------------------------------------------ $header_footer = ( ($bn_popup==0) && ($bn_frames==0) ) ? true : false; # if note to edit is not defined then return to the list # ------------------------------------------------------ if (!$key) { display_header ("Edit note", $header_footer); MsgForm (Msg(3), "list.$ext", "close"); display_footer ($header_footer); } # Check that the "allow modify" option is set on this forum # ------------------------------------------------------------------- if (!$bn_modify) { display_header ("Edit note", $header_footer); MsgForm (msg(48), "view.$ext?key=$key", "close"); display_footer ($header_footer); } # read note from database # ----------------------- $note = $db->getNote ($bn_db, $key); if (!$note) { display_header ("Edit note", $header_footer); MsgForm (Msg(10), "list.$ext", "close"); display_footer ($header_footer); } # set all fields as global variables # ---------------------------------- while ( list( $var, $val ) = each( $note)) { if (is_string ($var)) { $$var = stripSlashes(my_br2nl($val)); if ($bn_use_smileys && $bn_html_var[$var]) { $$var = strip_smileys($$var); } if ($bn_auto_url && $bn_html_var[$var]) { $$var = strip_url($$var); } $$var = kill_quotes($$var); } } # Execute before_access program # ----------------------------- if ($bn_before_access) { include "$bn_dir/$bn_before_access"; } display_header ("Edit note", $header_footer); # Display form # ------------ $setUserField = false; // Don't set username and password from cookies, get it from the note $form_action = "./update.$ext"; $back_form="edit"; # password must be entered to edit this note # ------------------------------------------ $checkPassword = true; include "$inc_dir/form.$ext"; # Display footer # -------------- display_footer ($header_footer); ?>