echo "<textarea class=\"mceEditor\" id=\"edit1\" name=\"edit1\" style=\"width:100%; height:500px\">" . htmlspecialchars($page_details['body'], ENT_NOQUOTES) . "</textarea>\n"; // Check for lockout. $current_time = date('YmdHis'); $disabled = ''; if ($userObject->get_user_ID() != $page_details['checkout_authorID']) { if ($page_details['checkout_time'] != '' and $current_time - $page_details['checkout_time'] < 10000) { $editor = UserUtils::get_user_details($page_details['checkout_authorID'], $mysqli); $editor_name = $editor['title'] . ' ' . $editor['initials'] . ' ' . $editor['surname']; echo "<script>\n"; echo " alert('" . $string['entertitle'] . " {$editor_name}. " . $string['isinreadonly'] . "')"; echo "</script>\n"; $checkout_authorID = $page_details['checkout_authorID']; $disabled = ' disabled'; } else { // Set the lock to the current time/author. $help_system->set_edit_lock($edit_id); $checkout_authorID = $userObject->get_user_ID(); } } elseif ($disabled == '' and $userObject->get_user_ID() == $page_details['checkout_authorID']) { $checkout_authorID = $userObject->get_user_ID(); } ?> <input type="hidden" name="checkout_authorID" value="<?php echo $checkout_authorID; ?> " /> <div style="text-align:center; padding-top:8px"><input class="ok" type="submit" name="save_changes" value="<?php echo $string['save']; ?> "<?php echo $disabled;