當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Attachment::getFileList方法代碼示例

本文整理匯總了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;
 }
開發者ID:dabielkabuto,項目名稱:eventum,代碼行數:32,代碼來源:class.notification.php

示例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;
     }
 }
開發者ID:juliogallardo1326,項目名稱:proc,代碼行數:22,代碼來源:class.notification.php


注:本文中的Attachment::getFileList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。