item = intval($_GET["cal"]); $current_user = wp_get_current_user(); $current_user_access = current_user_can('edit_pages'); if ( !is_admin() || (!$current_user_access && !@in_array($current_user->ID, unserialize($this->get_option("cp_user_access",""))))) { echo 'Direct access not allowed.'; exit; } $message = ''; if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST[$this->prefix.'_pform_process'] ) ) $message = 'Booking added. It appears now in the bookings list.'; $nonce = wp_create_nonce( 'cpappb_actions_admin' ); if ($message) echo "
".$message."