?? class_pollcomment.php
字號:
<?php
/**
* ----------------------------------------------
* Advanced Poll 2.0.3 (PHP)
* Copyright (c)2001 Chi Kien Uong
* URL: http://www.proxy2.de
* ----------------------------------------------
*/
class pollcomment extends poll {
var $comment_form_html;
var $poll_comment_html;
var $comment_data;
var $comment_records;
var $comment_tpl;
var $comment_order;
var $comment_index;
var $total_comments;
var $form_fields;
var $form_message;
var $date_format;
var $comment_array;
function pollcomment() {
global $HTTP_GET_VARS, $HTTP_POST_VARS;
$this->comment_form_html = array();
$this->poll_comment_html = array();
$this->comment_data = array();
$this->comment_records = '';
$this->comment_tpl = '';
$this->comment_order = array();
$this->total_comments = array();
$this->form_message = array();
$this->date_format = "m/d/Y H:i";
$this->comment_array = array();
$this->comment_index = (isset($HTTP_GET_VARS['c_page'])) ? trim($HTTP_GET_VARS['c_page']) : 0;
$this->comment_index = (isset($HTTP_POST_VARS['c_page'])) ? trim($HTTP_POST_VARS['c_page']) : $this->comment_index;
if (empty($this->comment_index) || $this->comment_index<0) {
$this->comment_index = 0;
}
$this->form_fields = array("name","email","message");
$this->poll();
}
function set_comments_per_page($records) {
if (is_integer($records) && $records>0) {
$this->comment_records = $records;
return true;
} else {
return false;
}
}
function set_form_error($error_msg_arr) {
for ($i=0; $i<sizeof($this->form_fields); $i++) {
if (isset($error_msg_arr[$this->form_fields[$i]]) && !empty($error_msg_arr[$this->form_fields[$i]])) {
$error_msg_arr[$this->form_fields[$i]] = trim($error_msg_arr[$this->form_fields[$i]]);
$this->form_message[$this->form_fields[$i]] = $error_msg_arr[$this->form_fields[$i]];
}
}
}
function format_string($strg) {
if (get_magic_quotes_gpc()) {
$strg = stripslashes($strg);
}
$strg = trim($strg);
$strg = str_replace("
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -