Esempio n. 1
0
 function clearcache()
 {
     global $tpl_page;
     if (KU_APC) {
         apc_clear_cache();
         apc_clear_cache('user');
         $tpl_page .= 'APC cache cleared.';
         management_addlogentry(_gettext('Cleared APC cache'), 0);
     } else {
         $tpl_page .= 'APC isn\'t enabled!';
     }
 }
Esempio n. 2
0
     } else {
         if ($post['message'] == '' && KU_NOMESSAGETHREAD != '') {
             $post['message'] = KU_NOMESSAGETHREAD;
         }
     }
     $post_class = new Post(0, $board_class->board['name'], $board_class->board['id'], true);
     $post_id = $post_class->Insert($thread_replyto, $post['name'], $post['tripcode'], $post['email'], $post['subject'], addslashes($post['message']), $upload_class->file_name, $upload_class->original_file_name, $filetype_withoutdot, $upload_class->file_md5, $upload_class->imgWidth, $upload_class->imgHeight, $upload_class->file_size, $upload_class->imgWidth_thumb, $upload_class->imgHeight_thumb, $post_passwordmd5, time(), time(), $_SERVER['REMOTE_ADDR'], $user_authority_display, $post['tag'], $sticky, $lock, $board_class->board['id']);
     if ($user_authority > 0 && $user_authority != 3) {
         $modpost_message = 'Modposted #<a href="' . KU_BOARDSFOLDER . $board_class->board['name'] . '/res/';
         if ($post_isreply) {
             $modpost_message .= $thread_replyto;
         } else {
             $modpost_message .= $post_id;
         }
         $modpost_message .= '.html#' . $post_id . '">' . $post_id . '</a> in /' . $_POST['board'] . '/ with flags: ' . $flags . '.';
         management_addlogentry($modpost_message, 1, md5_decrypt($_POST['modpassword'], KU_RANDOMSEED));
     }
     if ($post['name_save'] && isset($_POST['name'])) {
         setcookie('name', urldecode($_POST['name']), time() + 31556926, '/', KU_DOMAIN);
     }
     if ($post['email_save']) {
         setcookie('email', urldecode($post['email']), time() + 31556926, '/', KU_DOMAIN);
     }
     setcookie('postpassword', urldecode($_POST['postpassword']), time() + 31556926, '/');
 } else {
     exitWithErrorPage(_gettext('Could not copy uploaded image.'));
 }
 // If the user replied to a thread, and they weren't sage-ing it...
 if ($thread_replyto != '0' && strtolower($_POST['em']) != 'sage' && unistr_to_ords($_POST['em']) != array(19979, 12370)) {
     // And if the number of replies already in the thread are less than the maximum thread replies before perma-sage...
     if ($thread_replies <= $board_class->board['maxreplies']) {
Esempio n. 3
0
 public function modPost($post, $board)
 {
     if ($post['user_authority'] > 0 && $post['user_authority'] != 3) {
         $modpost_message = 'Modposted #<a href="' . kxEnv::Get('kx:paths:boards:folder') . $board->board_name . '/res/';
         if ($post['is_reply']) {
             $modpost_message .= $post['thread_info']['parent'];
         } else {
             $modpost_message .= $post['post_id'];
         }
         $modpost_message .= '.html#' . $post['post_id'] . '">' . $post['post_id'] . '</a> in /' . $this->board->board_name . '/ with flags: ' . $post['flags'] . '.';
         management_addlogentry($modpost_message, 1, md5_decrypt($this->request['modpassword'], kxEnv::Get('kx:misc:randomseed')));
     }
 }