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


PHP comment::get_id方法代码示例

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


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

示例1: comment

 $client->set_value("clientPostcodeOne", $data[6]);
 $client->set_value("clientStreetAddressTwo", $data[7]);
 $client->set_value("clientSuburbTwo", $data[8]);
 $client->set_value("clientStatus", "current");
 $client->set_value("clientModifiedUser", $current_user->get_id());
 $client->save();
 if ($client->get_id()) {
     if (rtrim($data[9])) {
         $comment = new comment();
         $comment->set_value("commentMaster", "client");
         $comment->set_value("commentMasterID", $client->get_id());
         $comment->set_value("commentType", "client");
         $comment->set_value("commentLinkID", $client->get_id());
         $comment->set_value("comment", $data[9]);
         $comment->save();
         $comment_id = $comment->get_id();
     }
     if ($data[10] || $data[11]) {
         $cc = new clientContact();
         $cc->set_value("clientID", $client->get_id());
         $cc->set_value("primaryContact", 1);
         $cc->set_value("clientContactName", $data[10]);
         $cc->set_value("clientContactEmail", $data[11]);
         $cc->save();
         $cc_id = $cc->get_id();
     }
 }
 $x++;
 echo "<br>" . $client->get_id() . " --- " . $cc_id . " --- " . $comment_id;
 if ($x > 4) {
     //die();
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:csv_clients.php

示例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;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:39,代码来源:comment.inc.php

示例3: opendir

ini_set('memory_limit', "256M");
$db = new db_alloc();
// Loop through attachments directory
$dir = ATTACHMENTS_DIR . "comment" . DIRECTORY_SEPARATOR;
if (is_dir($dir)) {
    $handle = opendir($dir);
    while (false !== ($file = readdir($handle))) {
        clearstatcache();
        if ($file == "." || $file == ".." || !is_numeric($file) || dir_is_empty($dir . $file) || !is_numeric($file)) {
            continue;
        }
        // Figure out which email created the comment
        $comment = new comment();
        $comment->set_id($file);
        $comment->select();
        echo "<br><br><hr>Examining comment " . $file;
        // Figure out what the mime parts are for the attachments and update comment.commentMimeParts
        list($email, $text, $mimebits) = $comment->find_email(true);
        if (!$email) {
            echo "<br>Couldn't find email for commentID: " . $file . "<br>";
            rename($dir . $file, $dir . "fail_" . $file);
        }
        if ($mimebits) {
            echo "<br>Setting commentMimeParts for comment: " . $comment->get_id();
            $comment->set_value("commentMimeParts", serialize($mimebits));
            $comment->skip_modified_fields = true;
            $comment->save();
            rename($dir . $file, $dir . "done_" . $file);
        }
    }
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:patch-00274-alla.php


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