本文整理汇总了PHP中Attachment::getFileList方法的典型用法代码示例。如果您正苦于以下问题:PHP Attachment::getFileList方法的具体用法?PHP Attachment::getFileList怎么用?PHP Attachment::getFileList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attachment
的用法示例。
在下文中一共展示了Attachment::getFileList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAttachment
/**
* Method used to get the details of a given issue and attachment.
*
* @param integer $issue_id The issue ID
* @param integer $attachment_id The attachment ID
* @return array The issue / attachment details
*/
public function getAttachment($issue_id, $attachment_id)
{
$stmt = 'SELECT
iat_id,
usr_full_name,
iat_created_date,
iat_description,
iat_unknown_user
FROM
{{%issue_attachment}},
{{%user}}
WHERE
iat_usr_id=usr_id AND
iat_iss_id=? AND
iat_id=?';
try {
$res = DB_Helper::getInstance()->getRow($stmt, array($issue_id, $attachment_id));
} catch (DbException $e) {
return '';
}
$res['files'] = Attachment::getFileList($res['iat_id']);
$data = Issue::getDetails($issue_id);
$data['attachment'] = $res;
return $data;
}
示例2: getAttachment
/**
* Method used to get the details of a given issue and attachment.
*
* @access public
* @param integer $issue_id The issue ID
* @param integer $attachment_id The attachment ID
* @return array The issue / attachment details
*/
function getAttachment($issue_id, $attachment_id)
{
$stmt = "SELECT\r\n iat_id,\r\n usr_full_name,\r\n iat_created_date,\r\n iat_description,\r\n iat_unknown_user\r\n FROM\r\n " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_attachment,\r\n " . ETEL_USER_TABLE . "\r\n WHERE\r\n iat_usr_id=usr_id AND\r\n iat_iss_id=" . Misc::escapeInteger($issue_id) . " AND\r\n iat_id=" . Misc::escapeInteger($attachment_id);
$res = $GLOBALS["db_api"]->dbh->getRow($stmt, DB_FETCHMODE_ASSOC);
if (PEAR::isError($res)) {
Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
return "";
} else {
$res["files"] = Attachment::getFileList($res["iat_id"]);
$data = Notification::getIssueDetails($issue_id);
$data["attachment"] = $res;
return $data;
}
}