예제 #1
0
 function Get404()
 {
     global $langmessage, $page;
     gpOutput::AddHeader('Not Found', true, 404);
     $page->head .= '<meta name="robots" content="noindex,nofollow" />';
     //this isn't getting to the template because $page isn't available yet
     //message for admins
     if (common::LoggedIn()) {
         if ($this->requested && !common::SpecialOrAdmin($this->requested)) {
             $with_spaces = htmlspecialchars($this->requested);
             $link = common::GetUrl('Admin_Menu', 'cmd=add_hidden&redir=redir&title=' . rawurlencode($this->requested)) . '" title="' . $langmessage['create_new_file'] . '" data-cmd="gpabox';
             $message = sprintf($langmessage['DOESNT_EXIST'], $with_spaces, $link);
             msg($message);
         }
     }
     //Contents of 404 page
     $wrap = gpOutput::ShowEditLink('Admin_Missing');
     if ($wrap) {
         echo gpOutput::EditAreaLink($edit_index, 'Admin_Missing', $langmessage['edit'], 'cmd=edit404', ' title="' . $langmessage['404_Page'] . '" ');
         echo '<div class="editable_area" id="ExtraEditArea' . $edit_index . '">';
         // class="edit_area" added by javascript
     }
     echo special_missing::Get404Output();
     if ($wrap) {
         echo '</div>';
     }
 }