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


PHP Draft::getDetails方法代码示例

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


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

示例1: getDraft

/**
 * Selects a draft from the table and returns the contents.
 *
 * @param   string $id The ID of this draft.
 * @return  A string containing the note.
 */
function getDraft($id)
{
    $info = Draft::getDetails($id);
    if (!Issue::canAccess($info['emd_iss_id'], $GLOBALS['usr_id'])) {
        return '';
    }
    if (empty($_GET['ec_id'])) {
        return $info['emd_body'];
    }
    return Link_Filter::processText(Auth::getCurrentProject(), nl2br(htmlspecialchars($info['emd_body'])));
}
开发者ID:korusdipl,项目名称:eventum,代码行数:17,代码来源:get_remote_data.php

示例2: elseif

} elseif ($cat == 'update_draft') {
    $res = Draft::update($issue_id, $_POST['draft_id'], $_POST['to'], $_POST['cc'], $_POST['subject'], $_POST['message'], $_POST['parent_id']);
    $tpl->assign('draft_result', $res);
}
// enter the time tracking entry about this new email
if ($cat == 'save_draft' || $cat == 'update_draft') {
    if (!empty($_POST['time_spent'])) {
        $date = (array) $_POST['date'];
        $ttc_id = Time_Tracking::getCategoryId($prj_id, 'Email Discussion');
        $time_spent = (int) $_POST['time_spent'];
        $summary = 'Time entry inserted when saving an email draft.';
        Time_Tracking::addTimeEntry($issue_id, $ttc_id, $time_spent, $date, $summary);
    }
}
if ($cat == 'view_draft') {
    $draft = Draft::getDetails($_GET['id']);
    $email = array('sup_subject' => $draft['emd_subject'], 'seb_body' => $draft['emd_body'], 'sup_from' => $draft['to'], 'cc' => implode('; ', $draft['cc']));
    // try to guess the correct email account to be associated with this email
    if (!empty($draft['emd_sup_id'])) {
        $_GET['ema_id'] = Email_Account::getAccountByEmail($draft['emd_sup_id']);
    } else {
        // if we are not replying to an existing message, just get the first email account you can find...
        $_GET['ema_id'] = Email_Account::getEmailAccount();
    }
    $tpl->assign(array('draft_id' => $_GET['id'], 'email' => $email, 'parent_email_id' => $draft['emd_sup_id'], 'draft_status' => $draft['emd_status']));
    if ($draft['emd_status'] != 'pending') {
        $tpl->assign('read_only', 1);
    }
} elseif ($cat == 'create_draft') {
    $tpl->assign('hide_email_buttons', 'yes');
} else {
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:send.php

示例3: getDraft

/**
 * Selects a draft from the table and returns the contents.
 * 
 * @param   string $id The ID of this draft.
 * @return  A string containing the note.
 */
function getDraft($id)
{
    $info = Draft::getDetails($id);
    if (!empty($_GET["ec_id"])) {
        return Link_Filter::processText(Auth::getCurrentProject(), nl2br(htmlspecialchars($_GET["ec_id"] . ":" . $id . ":" . $info["emd_body"])));
    } else {
        return $info["emd_body"];
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:15,代码来源:get_remote_data.php

示例4: send

 /**
  * Converts an email to a draft and sends it.
  *
  * @access  public
  * @param   integer $draft_id The id of the draft to send.
  */
 function send($draft_id)
 {
     global $HTTP_POST_VARS;
     $draft_id = Misc::escapeInteger($draft_id);
     $draft = Draft::getDetails($draft_id);
     $HTTP_POST_VARS["issue_id"] = $draft["emd_iss_id"];
     $HTTP_POST_VARS["subject"] = $draft["emd_subject"];
     $HTTP_POST_VARS["from"] = User::getFromHeader(Auth::getUserID());
     $HTTP_POST_VARS["to"] = $draft["to"];
     $HTTP_POST_VARS["cc"] = @join(";", $draft["cc"]);
     $HTTP_POST_VARS["message"] = $draft["emd_body"];
     $HTTP_POST_VARS["ema_id"] = Email_Account::getEmailAccount();
     $res = Support::sendEmail();
     if ($res == 1) {
         Draft::remove($draft_id);
     }
     return $res;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:24,代码来源:class.draft.php

示例5: elseif

    $res = Draft::update($issue_id, $HTTP_POST_VARS["draft_id"], $HTTP_POST_VARS["to"], $HTTP_POST_VARS["cc"], $HTTP_POST_VARS["subject"], $HTTP_POST_VARS["message"], $HTTP_POST_VARS["parent_id"]);
    $tpl->assign("draft_result", $res);
} elseif (Auth::getCurrentRole() >= User::getRoleID('Developer')) {
    $res = Issue::addUserAssociation($usr_id, $issue_id, $usr_id);
}
// enter the time tracking entry about this new email
if (@$HTTP_POST_VARS["cat"] == "save_draft" || @$HTTP_POST_VARS["cat"] == "update_draft") {
    if (!empty($HTTP_POST_VARS['time_spent'])) {
        $HTTP_POST_VARS['issue_id'] = $issue_id;
        $HTTP_POST_VARS['category'] = Time_Tracking::getCategoryID('Email Discussion');
        $HTTP_POST_VARS['summary'] = 'Time entry inserted when saving an email draft.';
        Time_Tracking::insertEntry();
    }
}
if (@$HTTP_GET_VARS['cat'] == 'view_draft') {
    $draft = Draft::getDetails($HTTP_GET_VARS['id']);
    $email = array('sup_subject' => $draft['emd_subject'], 'seb_body' => $draft['emd_body'], 'sup_from' => $draft['to'], 'cc' => implode('; ', $draft['cc']));
    // try to guess the correct email account to be associated with this email
    if (!empty($draft['emd_sup_id'])) {
        $HTTP_GET_VARS['ema_id'] = Email_Account::getAccountByEmail($draft['emd_sup_id']);
    } else {
        // if we are not replying to an existing message, just get the first email account you can find...
        $HTTP_GET_VARS['ema_id'] = Email_Account::getEmailAccount();
    }
    $tpl->bulkAssign(array("draft_id" => $HTTP_GET_VARS['id'], "email" => $email, "parent_email_id" => $draft['emd_sup_id'], "draft_status" => $draft['emd_status']));
    if ($draft['emd_status'] != 'pending') {
        $tpl->assign("read_only", 1);
    }
} elseif (@$HTTP_GET_VARS['cat'] == 'create_draft') {
    $tpl->assign("hide_email_buttons", "yes");
} else {
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:send.php


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