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


PHP Attachment::getMaxAttachmentSize方法代码示例

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


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

示例1: catch

        if (count($item) == 1) {
            $email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($item[0]), $item[0]);
            $tpl->assign(array('issue_summary' => $email_details['sup_subject'], 'issue_description' => $email_details['seb_body']));
            // also auto pre-fill the customer contact text fields
            if (CRM::hasCustomerIntegration($prj_id)) {
                $sender_email = Mail_Helper::getEmailAddress($email_details['sup_from']);
                try {
                    $contact = $crm->getContactByEmail($sender_email);
                    $tpl->assign('contact_details', $contact->getDetails());
                } catch (CRMException $e) {
                }
            }
        }
    }
}
$tpl->assign(array('cats' => Category::getAssocList($prj_id), 'priorities' => Priority::getAssocList($prj_id), 'severities' => Severity::getList($prj_id), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'releases' => Release::getAssocList($prj_id), 'custom_fields' => Custom_Field::getListByProject($prj_id, 'report_form'), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'max_attachment_bytes' => Attachment::getMaxAttachmentSize(true), 'field_display_settings' => Project::getFieldDisplaySettings($prj_id), 'groups' => Group::getAssocList($prj_id), 'products' => Product::getList(false)));
$prefs = Prefs::get($usr_id);
$tpl->assign('user_prefs', $prefs);
$tpl->assign('zones', Date_Helper::getTimezoneList());
if (Auth::getCurrentRole() == User::getRoleID('Customer')) {
    $crm = CRM::getInstance(Auth::getCurrentProject());
    $customer_contact_id = User::getCustomerContactID($usr_id);
    $contact = $crm->getContact($customer_contact_id);
    $customer_id = Auth::getCurrentCustomerID();
    $customer = $crm->getCustomer($customer_id);
    // TODOCRM: Pull contacts via ajax when user selects contract
    $tpl->assign(array('customer_id' => $customer_id, 'contact_id' => $customer_contact_id, 'customer' => $customer, 'contact' => $contact));
}
$clone_iss_id = isset($_GET['clone_iss_id']) ? (int) $_GET['clone_iss_id'] : null;
if ($clone_iss_id && Access::canCloneIssue($clone_iss_id, $usr_id)) {
    $tpl->assign(Issue::getCloneIssueTemplateVariables($clone_iss_id));
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:new.php

示例2: isset

if ($cat == 'reply') {
    $details = Issue::getReplyDetails($_GET['issue_id']);
    if ($details != '') {
        $header = Misc::formatReplyPreamble($details['created_date_ts'], $details['reporter']);
        $details['seb_body'] = $header . Misc::formatReply($details['description']);
        $details['sup_from'] = Mail_Helper::getFormattedName($details['reporter'], $details['reporter_email']);
        $tpl->assign(array('email' => $details, 'parent_email_id' => 0, 'extra_title' => 'Issue #' . $_GET['issue_id'] . ': Reply'));
    }
}
if (!empty($issue_id)) {
    // list the available statuses
    $tpl->assign('statuses', Status::getAssocStatusList($prj_id, false));
    $tpl->assign('current_issue_status', Issue::getStatusID($issue_id));
    // set if the current user is allowed to send emails on this issue or not
    $sender_details = User::getDetails($usr_id);
    $tpl->assign('can_send_email', Support::isAllowedToEmail($issue_id, $sender_details['usr_email']));
    $tpl->assign('subscribers', Notification::getSubscribers($issue_id, 'emails'));
}
if (!empty($_GET['ema_id']) || !empty($_POST['ema_id'])) {
    $ema_id = isset($_GET['ema_id']) ? (int) $_GET['ema_id'] : (isset($_POST['ema_id']) ? (int) $_POST['ema_id'] : null);
    $tpl->assign('ema_id', $ema_id);
}
$user_prefs = Prefs::get($usr_id);
// list of users to display in the lookup field in the To: and Cc: fields
$t = Project::getAddressBook($prj_id, $issue_id);
$tpl->assign(array('from' => User::getFromHeader($usr_id), 'assoc_users' => $t, 'assoc_emails' => array_keys($t), 'canned_responses' => Email_Response::getAssocList($prj_id), 'js_canned_responses' => Email_Response::getAssocListBodies($prj_id), 'current_user_prefs' => $user_prefs, 'issue_access' => Access::getIssueAccessArray($issue_id, $usr_id), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'max_attachment_bytes' => Attachment::getMaxAttachmentSize(true)));
// don't add signature if it already exists. Note: This won't handle multiple user duplicate sigs.
if (@(!empty($draft['emd_body'])) && $user_prefs['auto_append_email_sig'] == 1 && strpos($draft['emd_body'], $user_prefs['email_signature']) !== false) {
    $tpl->assign('body_has_sig_already', 1);
}
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:send.php

示例3: getServerParameter

 /**
  * Method used to retrieve server parameters
  *
  * @param string $parameter
  * @return string
  * @access protected
  * @since 3.0.2
  */
 public function getServerParameter($parameter)
 {
     switch ($parameter) {
         case 'upload_max_filesize':
             return Attachment::getMaxAttachmentSize(true);
     }
     throw new InvalidArgumentException("Invalid parameter: {$parameter}");
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:16,代码来源:RemoteApi.php

示例4: Template_Helper

$usr_id = Auth::getUserID();
$tpl = new Template_Helper();
$tpl->setTemplate('file_upload.tpl.html');
$issue_id = isset($_POST['issue_id']) ? $_POST['issue_id'] : $_GET['iss_id'];
$cat = isset($_POST['cat']) ? $_POST['cat'] : null;
// handle uploads
if ($cat == 'upload_file') {
    // attachment status (public or internal)
    $status = isset($_POST['status']) ? $_POST['status'] : null;
    $internal_only = $status == 'internal';
    // from ajax upload, attachment file ids
    $iaf_ids = !empty($_POST['iaf_ids']) ? explode(',', $_POST['iaf_ids']) : null;
    // description for attachments
    $file_description = isset($_POST['file_description']) ? $_POST['file_description'] : null;
    // if no iaf_ids passed, perhaps it's old style upload
    // TODO: verify that the uploaded file(s) owner is same as attachment owner.
    if (!$iaf_ids && isset($_FILES['attachment'])) {
        $iaf_ids = Attachment::addFiles($_FILES['attachment']);
    }
    try {
        Attachment::attachFiles($issue_id, $usr_id, $iaf_ids, $internal_only, $file_description);
        $res = 1;
    } catch (Exception $e) {
        error_log($e->getMessage());
        error_log($e->getTraceAsString());
        $res = -1;
    }
    $tpl->assign('upload_file_result', $res);
}
$tpl->assign(array('issue_id' => $issue_id, 'current_user_prefs' => Prefs::get(Auth::getUserID()), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'max_attachment_bytes' => Attachment::getMaxAttachmentSize(true)));
$tpl->displayTemplate();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:file_upload.php

示例5:

     $show_releases = 0;
 }
 // get if categories should be displayed
 $cats = Category::getList($prj_id);
 if (count($cats) > 0) {
     $show_category = 1;
 } else {
     $show_category = 0;
 }
 $cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE);
 if (!empty($auto_switched_from)) {
     $tpl->assign(array("project_auto_switched" => 1, "old_project" => Project::getName($auto_switched_from)));
 }
 $setup = Setup::load();
 $tpl->assign("allow_unassigned_issues", @$setup["allow_unassigned_issues"]);
 $tpl->assign(array('next_issue' => @$sides['next'], 'previous_issue' => @$sides['previous'], 'subscribers' => Notification::getSubscribers($issue_id), 'custom_fields' => Custom_Field::getListByIssue($prj_id, $issue_id), 'files' => Attachment::getList($issue_id), 'emails' => Support::getEmailsByIssue($issue_id), 'zones' => Date_API::getTimezoneList(), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'ema_id' => Email_Account::getEmailAccount(), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'show_releases' => $show_releases, 'show_category' => $show_category, 'categories' => Category::getAssocList($prj_id), 'quarantine' => Issue::getQuarantineInfo($issue_id)));
 if ($role_id != User::getRoleID('customer')) {
     if (@$_REQUEST['show_all_drafts'] == 1) {
         $show_all_drafts = true;
     } else {
         $show_all_drafts = false;
     }
     if (Workflow::hasWorkflowIntegration($prj_id)) {
         $statuses = Workflow::getAllowedStatuses($prj_id, $issue_id);
         // if currently selected release is not on list, go ahead and add it.
     } else {
         $statuses = Status::getAssocStatusList($prj_id);
     }
     if (!empty($details['iss_sta_id']) && empty($statuses[$details['iss_sta_id']])) {
         $statuses[$details['iss_sta_id']] = Status::getStatusTitle($details['iss_sta_id']);
     }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:view.php

示例6: list

        }
        // if we are dealing with just one message, use the subject line as the
        // summary for the issue, and the body as the description
        if (count($HTTP_GET_VARS["item"]) == 1) {
            $email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($HTTP_GET_VARS["item"][0]), $HTTP_GET_VARS["item"][0]);
            $tpl->assign(array('issue_summary' => $email_details['sup_subject'], 'issue_description' => $email_details['message']));
            // also auto pre-fill the customer contact text fields
            if (Customer::hasCustomerIntegration($prj_id)) {
                $sender_email = Mail_API::getEmailAddress($email_details['sup_from']);
                list(, $contact_id) = Customer::getCustomerIDByEmails($prj_id, array($sender_email));
                if (!empty($contact_id)) {
                    $tpl->assign("contact_details", Customer::getContactDetails($prj_id, $contact_id));
                }
            }
        }
    }
}
$tpl->assign(array("cats" => Category::getAssocList($prj_id), "priorities" => Priority::getAssocList($prj_id), "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), "releases" => Release::getAssocList($prj_id), "custom_fields" => Custom_Field::getListByProject($prj_id, 'report_form'), "max_attachment_size" => Attachment::getMaxAttachmentSize(), "field_display_settings" => Project::getFieldDisplaySettings($prj_id), "groups" => Group::getAssocList($prj_id)));
$setup = Setup::load();
$tpl->assign("allow_unassigned_issues", @$setup["allow_unassigned_issues"]);
$prefs = Prefs::get($usr_id);
$tpl->assign("user_prefs", $prefs);
$tpl->assign("zones", Date_API::getTimezoneList());
if (User::getRole(Auth::getCurrentRole()) == "Customer") {
    $customer_contact_id = User::getCustomerContactID($usr_id);
    $tpl->assign("contact_details", Customer::getContactDetails($prj_id, $customer_contact_id));
    $customer_id = User::getCustomerID($usr_id);
    $tpl->assign("contacts", Customer::getContactEmailAssocList($prj_id, $customer_id));
    $tpl->assign(array("customer_id" => User::getCustomerID($usr_id), "contact_id" => User::getCustomerContactID($usr_id)));
}
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:new.php

示例7: array

 $columns[1][] = array('title' => ev_gettext('Associated Issues'), 'field' => 'associated_issues');
 if (!isset($issue_fields_display['expected_resolution']) || $issue_fields_display['expected_resolution'] != false) {
     $columns[1][] = array('title' => ev_gettext('Expected Resolution Date'), 'field' => 'expected_resolution');
 }
 if (!isset($issue_fields_display['estimated_dev_time']) || $issue_fields_display['estimated_dev_time'] != false) {
     $columns[1][] = array('title' => ev_gettext('Estimated Dev. Time'), 'data' => empty($details['iss_dev_time']) ? '' : $details['iss_dev_time'] . ' hours', 'field' => 'estimated_dev_time');
 }
 if ($role_id > User::getRoleID('Customer')) {
     $columns[1][] = array('title' => ev_gettext('Duplicates'), 'field' => 'duplicates', 'title_bgcolor' => APP_INTERNAL_COLOR);
     $columns[1][] = array('title' => ev_gettext('Authorized Repliers'), 'field' => 'authorized_repliers', 'title_bgcolor' => APP_INTERNAL_COLOR);
 }
 $groups = Group::getAssocList($prj_id);
 if ($role_id > User::getRoleID('Customer') && count($groups) > 0) {
     $columns[1][] = array('title' => ev_gettext('Group'), 'data' => isset($details['group']) ? $details['group']['grp_name'] : '', 'title_bgcolor' => APP_INTERNAL_COLOR);
 }
 $tpl->assign(array('next_issue' => @$sides['next'], 'previous_issue' => @$sides['previous'], 'subscribers' => Notification::getSubscribers($issue_id), 'custom_fields' => Custom_Field::getListByIssue($prj_id, $issue_id), 'files' => Attachment::getList($issue_id), 'emails' => Support::getEmailsByIssue($issue_id), 'zones' => Date_Helper::getTimezoneList(), 'users' => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')), 'ema_id' => Email_Account::getEmailAccount(), 'max_attachment_size' => Attachment::getMaxAttachmentSize(), 'quarantine' => Issue::getQuarantineInfo($issue_id), 'grid' => $columns, 'can_update' => Issue::canUpdate($issue_id, $usr_id), 'enabled_partners' => Partner::getPartnersByProject($prj_id), 'partners' => Partner::getPartnersByIssue($issue_id), 'issue_access' => Access::getIssueAccessArray($issue_id, $usr_id), 'is_user_notified' => Notification::isUserNotified($issue_id, $usr_id)));
 if ($role_id != User::getRoleID('customer')) {
     if (@$_COOKIE['show_all_drafts'] == 1) {
         $show_all_drafts = true;
     } else {
         $show_all_drafts = false;
     }
     if (Workflow::hasWorkflowIntegration($prj_id)) {
         $statuses = Workflow::getAllowedStatuses($prj_id, $issue_id);
         // if currently selected release is not on list, go ahead and add it.
     } else {
         $statuses = Status::getAssocStatusList($prj_id, false);
     }
     if (!empty($details['iss_sta_id']) && empty($statuses[$details['iss_sta_id']])) {
         $statuses[$details['iss_sta_id']] = Status::getStatusTitle($details['iss_sta_id']);
     }
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:view.php

示例8: Template_API

// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
// | GNU General Public License for more details.                         |
// |                                                                      |
// | You should have received a copy of the GNU General Public License    |
// | along with this program; if not, write to:                           |
// |                                                                      |
// | Free Software Foundation, Inc.                                       |
// | 59 Temple Place - Suite 330                                          |
// | Boston, MA 02111-1307, USA.                                          |
// +----------------------------------------------------------------------+
// | Authors: João Prado Maia <jpm@mysql.com>                             |
// +----------------------------------------------------------------------+
//
// @(#) $Id$
//
include_once "config.inc.php";
include_once APP_INC_PATH . "class.template.php";
include_once APP_INC_PATH . "class.auth.php";
include_once APP_INC_PATH . "class.attachment.php";
include_once APP_INC_PATH . "db_access.php";
$tpl = new Template_API();
$tpl->setTemplate("file_upload.tpl.html");
Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
$usr_id = Auth::getUserID();
$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
if (@$HTTP_POST_VARS["cat"] == "upload_file") {
    $res = Attachment::attach($usr_id, $HTTP_POST_VARS['status']);
    $tpl->assign("upload_file_result", $res);
}
$tpl->assign(array("issue_id" => $issue_id, "current_user_prefs" => Prefs::get(Auth::getUserID()), "max_attachment_size" => Attachment::getMaxAttachmentSize()));
$tpl->displayTemplate();
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:file_upload.php


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