Advertisement
Guest User

Kusaba recaptcha

a guest
Jun 15th, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.37 KB | None | 0 0
  1.     /**
  2.      * Generate the postbox area
  3.      *
  4.      * @param integer $replythread The ID of the thread being replied to.  0 if not replying
  5.      * @param string $postboxnotice The postbox notice
  6.      * @return string The generated postbox
  7.      */
  8.     function Postbox($replythread = 0) {
  9.         global $tc_db;
  10.         if (KU_BLOTTER && $this->board['type'] != 1) {
  11.             $this->dwoo_data->assign('blotter', getBlotter());
  12.             $this->dwoo_data->assign('blotter_updated', getBlotterLastUpdated());
  13.         }
  14.         $postbox = '';
  15.  
  16.         if ($this->board['type'] == 2 && $replythread > 0) {
  17.             $oekposts = $tc_db->GetAll("SELECT `id` FROM `" . KU_DBPREFIX."posts` WHERE `boardid` = " . $this->board['id']." AND (`id` = ".$replythread." OR `parentid` = ".$replythread.") AND `file` != '' AND `file` != 'removed' AND `file_type` IN ('jpg', 'gif', 'png') AND `IS_DELETED` = 0 ORDER BY `parentid` ASC, `timestamp` ASC");
  18.             $this->dwoo_data->assign('oekposts', $oekposts);
  19.         }
  20.         if ($this->board['enablecaptcha'] ==  1 && $replythread == 0) {
  21.             require_once(KU_ROOTDIR.'recaptchalib.php');
  22.             $publickey = "--hide--";
  23.             $this->dwoo_data->assign('recaptcha', recaptcha_get_html($publickey));
  24.         }
  25.         if(($this->board['type'] == 1 && $replythread == 0) || $this->board['type'] != 1) {
  26.             $postbox .= $this->dwoo->get(KU_TEMPLATEDIR . '/' . $this->board['text_readable'] . '_post_box.tpl', $this->dwoo_data);
  27.         }
  28.         return $postbox;
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement