本文整理汇总了PHP中comment::get_value方法的典型用法代码示例。如果您正苦于以下问题:PHP comment::get_value方法的具体用法?PHP comment::get_value怎么用?PHP comment::get_value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comment
的用法示例。
在下文中一共展示了comment::get_value方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: comment
}
}
//$lockfile = ATTACHMENTS_DIR."mail.lock.person_".$current_user->get_id();
$info["host"] = config::get_config_item("allocEmailHost");
$info["port"] = config::get_config_item("allocEmailPort");
$info["username"] = config::get_config_item("allocEmailUsername");
$info["password"] = config::get_config_item("allocEmailPassword");
$info["protocol"] = config::get_config_item("allocEmailProtocol");
if (!$info["host"]) {
alloc_error("Email mailbox host not defined, assuming email fetch function is inactive.", true);
}
if ($_REQUEST["commentID"]) {
$c = new comment();
$c->set_id($_REQUEST["commentID"]);
$c->select();
$entity = $c->get_value("commentMaster");
$entityID = $c->get_value("commentMasterID");
$mail = new email_receive($info);
$mail->open_mailbox(config::get_config_item("allocEmailFolder") . "/" . $entity . $entityID);
if ($_REQUEST["uid"]) {
header('Content-Type: text/plain; charset=utf-8');
list($h, $b) = $mail->get_raw_email_by_msg_uid($_REQUEST["uid"]);
$mail->close();
echo $h . $b;
exit;
}
//$uids = $mail->get_all_email_msg_uids();
$t = new token();
$t->select_token_by_entity_and_action($c->get_value("commentType"), $c->get_value("commentLinkID"), "add_comment_from_email");
$hash = $t->get_value("tokenHash");
// First try a messageID search
示例2: array
function send_comment($commentID, $emailRecipients, $email_receive = false, $files = array())
{
$comment = new comment();
$comment->set_id($commentID);
$comment->select();
$token = new token();
if ($comment->get_value("commentType") == "comment" && $comment->get_value("commentLinkID")) {
$c = new comment();
$c->set_id($comment->get_value("commentLinkID"));
$c->select();
$is_a_reply_comment = true;
if ($token->select_token_by_entity_and_action("comment", $c->get_id(), "add_comment_from_email")) {
$hash = $token->get_value("tokenHash");
}
}
if (!$hash) {
if ($token->select_token_by_entity_and_action("comment", $comment->get_id(), "add_comment_from_email")) {
$hash = $token->get_value("tokenHash");
} else {
$hash = $comment->make_token_add_comment_from_email();
}
}
$rtn = $comment->send_emails($emailRecipients, $email_receive, $hash, $is_a_reply_comment, $files);
if (is_array($rtn)) {
$email_sent = true;
list($successful_recipients, $messageid) = $rtn;
}
// Append success to end of the comment
if ($successful_recipients) {
$append_comment_text = "Email sent to: " . $successful_recipients;
$message_good .= $append_comment_text;
//$comment->set_value("commentEmailMessageID",$messageid); that's the outbound message-id :-(
$comment->set_value("commentEmailRecipients", $successful_recipients);
}
$comment->skip_modified_fields = true;
$comment->updateSearchIndexLater = true;
$comment->save();
return $email_sent;
}
示例3: date
function comment_stats()
{
// date from which a comment is counted as being new. if monday then date back to friday, else the previous day
$days = date("w") == 1 ? 3 : 1;
$date = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - $days, date("Y")));
$query = "SELECT * FROM comment";
$db = new db_alloc();
$db->query($query);
while ($db->next_record()) {
$comment = new comment();
$comment->read_db_record($db);
$this->comments["total"][$comment->get_value("commentModifiedUser")]++;
$this->comments["total"]["total"]++;
if ($comment->get_value("commentModifiedTime") != "") {
if (!isset($this->comments["all"][$comment->get_value("commentModifiedUser")])) {
$this->comments["all"][$comment->get_value("commentModifiedUser")] = array();
}
$this->comments["all"][$comment->get_value("commentModifiedUser")][date("Y-m-d", strtotime($comment->get_value("commentModifiedTime")))]++;
$this->comments["all"][$comment->get_value("commentModifiedUser")]["total"]++;
$this->comments["all"]["total"][date("Y-m-d", strtotime($comment->get_value("commentModifiedTime")))]++;
if (strcmp($date, $comment->get_value("commentModifiedTime")) <= 0) {
if (!isset($this->comments["new"][$comment->get_value("commentModifiedUser")])) {
$this->comments["new"][$comment->get_value("commentModifiedUser")] = array();
}
$this->comments["new"][$comment->get_value("commentModifiedUser")][date("Y-m-d", strtotime($comment->get_value("commentModifiedTime")))]++;
$this->comments["new"][$comment->get_value("commentModifiedUser")]["total"]++;
$this->comments["new"]["total"][date("Y-m-d", strtotime($comment->get_value("commentModifiedTime")))]++;
}
}
}
return $this->comments;
}