admin_exists && $user_id && $page=="admin_viewusers_edit" ) { if ( isset($_GET['task']) && $_GET['task']=='save_user_note' ) { $note_result = he_user_note::save_note(0, $user_id, $_GET['note'], true); } elseif ( isset($_GET['task']) && $_GET['task']=='delete_user_note' ) { $note_result = he_user_note::delete_note(0, $user_id, true); } if ( isset($note_result) ) { // CONSTRUCT AND OUTPUT JSON header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 header("Content-Type: application/json"); echo json_encode($note_result); exit(); } $note_info = he_user_note::get_note(0, $user_id, true); $smarty->assign('note_info', $note_info); } $smarty->assign('he_user_note', ($page=='admin_viewusers_edit')); ?>