当前位置: 首页>>代码示例>>PHP>>正文


PHP Captcha::get_pic方法代码示例

本文整理汇总了PHP中Captcha::get_pic方法的典型用法代码示例。如果您正苦于以下问题:PHP Captcha::get_pic方法的具体用法?PHP Captcha::get_pic怎么用?PHP Captcha::get_pic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Captcha的用法示例。


在下文中一共展示了Captcha::get_pic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _send_entryform

 /**
  * Sendet das Formular zum Eintragen der Nachricht. Je nach Parameter werden Standartwerte oder POST-Daten an
  * das Formular weitergegeben.
  *
  * @param boolean $first_form
  * @param string $error
  */
 private function _send_entryform($first_form = true, $error = null)
 {
     $this->_tpl_file = "mailform.tpl";
     /* Daten ermitteln */
     if ($first_form == false) {
         /* Daten aus Post-Array */
         $data = array('entry_id' => $this->_gpc['POST']['entry_id'], 'entry_title' => $this->_gpc['POST']['title'], 'entry_content' => $this->_gpc['POST']['content'], 'entry_name' => $this->_gpc['POST']['name'], 'entry_email' => $this->_gpc['POST']['email'], 'sessioncode' => $this->_sessioncode);
     } else {
         /* Standard-Einträge */
         $mail_vars = $this->_configvars['Mail'];
         $data = array('entry_id' => $this->_gpc['GET']['entry_id'], 'entry_title' => $mail_vars['entry_title'], 'entry_content' => $mail_vars['entry_content'], 'entry_name' => $mail_vars['entry_name'], 'entry_email' => $mail_vars['entry_email'], 'sessioncode' => $this->_sessioncode);
     }
     /* Error-Einträge */
     if (isset($error)) {
         $data['dump_errors'] = true;
         $data['error_title'] = $this->_configvars['Form_Error']['error_in_form'];
         $data['error_contents'] = $error;
     }
     $hash = $this->_captcha->get_pic(4);
     $data['captcha_img'] = $hash;
     $this->_mysql->query("SELECT `{$this->mail_tbl['column_name']}` FROM `{$this->mail_tbl['table']}` WHERE `{$this->mail_tbl['column_ID']}` = '{$data['entry_id']}' LIMIT 1");
     $member_array = $this->_mysql->fetcharray();
     $data['reciver_name'] = $member_array[$this->mail_tbl['column_name']];
     $this->_smarty->assign($data);
 }
开发者ID:BackupTheBerlios,项目名称:jclubcms,代码行数:32,代码来源:mailmodule.class.php

示例2: _send_entryform

 /**
  * Erstellt das Eintragsformular für Beiträge im Gästebuch. Wenn nötig werden der vorhergehende
  * Einträg (und die Kommentare dazu) ermittelt.
  *
  * @param boolean $first_form 1. Aufruf des Formulars?
  * @param string|null $error Errortexte
  * @param boolean $comment Ist der Beitrag ein Kommentar?
  * @param boolean $mysql_data Werden die Daten vom Mysql geholt.
  */
 private function _send_entryform($first_form = true, $error = null, $comment = false)
 {
     $data = array();
     /* Daten ermitteln */
     if ($first_form == false) {
         /* Daten aus Post-Array */
         if ($comment == false) {
             $data['entry_title'] = stripslashes($this->_gpc['POST']['title']);
         }
         $data += array('entry_content' => stripslashes($this->_gpc['POST']['content']), 'entry_name' => stripslashes($this->_gpc['POST']['name']), 'entry_email' => stripslashes($this->_gpc['POST']['email']), 'entry_hp' => stripslashes($this->_gpc['POST']['hp']), 'sessioncode' => $this->_sessioncode);
     } else {
         /* Standard-Einträge */
         $gbook_vars = $this->_configvars['Gbook'];
         $data += array('entry_title' => $gbook_vars['entry_title'], 'entry_content' => $gbook_vars['entry_content'], 'entry_name' => $gbook_vars['entry_name'], 'entry_email' => $gbook_vars['entry_email'], 'entry_hp' => $gbook_vars['entry_hp'], 'sessioncode' => $this->_sessioncode);
     }
     /* Bei Kommentaren ist der vorhergehende Eintrag zu ermitteln */
     if ($comment == true) {
         $this->_tplfile = "gbook_comment.tpl";
         $data['gbook'] = $this->_msbox->getEntry($this->_gpc['GET']['ref_ID'], $this->_timeformat, true);
         $data['gbook']['gbook_title'] = htmlentities($data['gbook']['gbook_title']);
         $data['gbook']['gbook_content'] = htmlentities($data['gbook']['gbook_content']);
         $data['gbook']['gbook_email'] = htmlentities($data['gbook']['gbook_email']);
         $data['gbook']['gbook_hp'] = htmlentities($data['gbook']['gbook_hp']);
         $data['gbook']['gbook_name'] = htmlentities($data['gbook']['gbook_name']);
         $data['gbook']['gbook_content'] = $this->_smilie->show_smilie($data['gbook']['gbook_content'], $this->_mysql);
         /* HTML-Zeichen umwandeln */
         foreach ($data['gbook']['comments'] as $key => $value) {
             $data['gbook']['comments'][$key]['gbook_content'] = htmlentities($value['gbook_content']);
             $data['gbook']['comments'][$key]['gbook_email'] = htmlentities($value['gbook_email']);
             $data['gbook']['comments'][$key]['gbook_hp'] = htmlentities($value['gbook_hp']);
             $data['gbook']['comments'][$key]['gbook_name'] = htmlentities($value['gbook_name']);
             $data['gbook']['comments'][$key]['gbook_content'] = $this->_smilie->show_smilie($data['gbook']['comments'][$key]['gbook_content'], $this->_mysql);
         }
         /*Anzeigetitle des Editors festlegen */
         $data['entry_title'] = 'RE: ' . $data['gbook']['gbook_title'];
     } else {
         /* Keine Kommentareintrag -> Normaler Editor */
         $this->_tplfile = "gbook_entry.tpl";
     }
     /* Error-Einträge */
     if (isset($error)) {
         $data['dump_errors'] = true;
         $data['error_title'] = 'Fehler im Formular';
         $data['error_content'] = $error;
     }
     $hash = $this->_captcha->get_pic(4);
     $data['captcha_img'] = $hash;
     $data['smilies_list'] = $this->_smilie->create_smiliesarray($this->_mysql);
     $this->_smarty->assign($data);
 }
开发者ID:BackupTheBerlios,项目名称:jclubcms,代码行数:59,代码来源:gbook.class.php


注:本文中的Captcha::get_pic方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。