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


PHP CTicket::GetFileList方法代码示例

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


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

示例1: Copyright

<?php

/*
##############################################
# Bitrix: SiteManager                        #
# Copyright (c) 2002 - 2011 Bitrix           #
# http://www.bitrixsoft.com                  #
# mailto:admin@bitrixsoft.com                #
##############################################
*/
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
if (CModule::IncludeModule("support") && strlen($hash) > 0 && preg_match('/^[a-z0-9]{32}$/i', $hash)) {
    $rsFiles = CTicket::GetFileList($v1 = "s_id", $v2 = "asc", array("HASH" => $hash), 'Y');
    if ($rsFiles && ($arFile = $rsFiles->Fetch())) {
        set_time_limit(0);
        $options = array();
        if ($_REQUEST["action"] == "download") {
            $options["force_download"] = true;
        }
        CFile::ViewByUser($arFile, $options);
    }
}
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_after.php";
ShowError(GetMessage("SUP_ERROR_ATTACH_NOT_FOUND"));
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog.php";
开发者ID:Satariall,项目名称:izurit,代码行数:25,代码来源:ticket_show_file.php

示例2: CAdminMessage

             }
         }
     } else {
         if ($e = $APPLICATION->GetException()) {
             $strError = new CAdminMessage(GetMessage("SUP_ERROR"), $e);
         }
     }
 }
 $message = CTicket::GetMessageByID($ID);
 if (!$message->ExtractFields()) {
     //$strError .= GetMessage("SUP_MESSAGE_NOT_FOUND")."<br>";
     $e = $APPLICATION->GetException();
     $strError = new CAdminMessage(GetMessage("SUP_MESSAGE_NOT_FOUND"), $e);
 } else {
     $arFiles = array();
     if ($rsFiles = CTicket::GetFileList($v1 = "s_id", $v2 = "asc", array("MESSAGE_ID" => $ID))) {
         while ($arFile = $rsFiles->Fetch()) {
             $name = $arFile["ORIGINAL_NAME"];
             if (strlen($arFile["EXTENSION_SUFFIX"]) > 0) {
                 $suffix_length = strlen($arFile["EXTENSION_SUFFIX"]);
                 $name = substr($name, 0, strlen($name) - $suffix_length);
             }
             $arFile["NAME"] = $name;
             $arFiles[] = $arFile;
         }
     }
 }
 if ($strError) {
     $DB->InitTableVarsForEdit("b_ticket_message", "", "str_");
 }
 $str_OWNER_USER_ID = intval($str_OWNER_USER_ID) > 0 ? intval($str_OWNER_USER_ID) : "";
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:ticket_message_edit.php

示例3: _GetUserInfo

 //+Ticket and user names
 $arResult["TICKET"] = $arTicket + _GetUserInfo($arTicket["RESPONSIBLE_USER_ID"], "RESPONSIBLE") + _GetUserInfo($arTicket["OWNER_USER_ID"], "OWNER") + _GetUserInfo($arTicket["CREATED_USER_ID"], "CREATED") + _GetUserInfo($arTicket["MODIFIED_USER_ID"], "MODIFIED_BY");
 //Dictionary table
 $arDictionary = array("C" => array("CATEGORY", intval($arTicket["CATEGORY_ID"])), "K" => array("CRITICALITY", intval($arTicket["CRITICALITY_ID"])), "S" => array("STATUS", intval($arTicket["STATUS_ID"])), "M" => array("MARK", intval($arTicket["MARK_ID"])), "SR" => array("SOURCE", intval($arTicket["SOURCE_ID"])));
 //+Ticket dictionary
 $arResult["TICKET"] += _GetDictionaryInfoEx($arDictionary);
 //+Sla
 $arResult["TICKET"]["SLA_NAME"] = $arResult["TICKET"]["SLA_DESCRIPTION"] = "";
 $rsSla = CTicketSLA::GetByID($arTicket["SLA_ID"]);
 if ($rsSla && ($arSla = $rsSla->Fetch())) {
     $arResult["TICKET"]["SLA_NAME"] = htmlspecialcharsbx($arSla["NAME"]);
     $arResult["TICKET"]["SLA_DESCRIPTION"] = htmlspecialcharsbx($arSla["DESCRIPTION"]);
 }
 //Messages files
 $arMessagesFiles = array();
 $rsFiles = CTicket::GetFileList($v1 = "s_id", $v2 = "asc", array("TICKET_ID" => $arParams["ID"]));
 while ($arFile = $rsFiles->Fetch()) {
     $name = strlen($arFile["ORIGINAL_NAME"]) > 0 ? $arFile["ORIGINAL_NAME"] : $arFile["FILE_NAME"];
     if (strlen($arFile["EXTENSION_SUFFIX"]) > 0) {
         $suffix_length = strlen($arFile["EXTENSION_SUFFIX"]);
         $name = substr($name, 0, strlen($name) - $suffix_length);
     }
     $arMessagesFiles[$arFile["MESSAGE_ID"]][] = array("HASH" => $arFile["HASH"], "NAME" => htmlspecialcharsbx($name), "FILE_SIZE" => $arFile["FILE_SIZE"]);
 }
 //+Messages
 $arParams["MESSAGES_PER_PAGE"] = intval($arParams["MESSAGES_PER_PAGE"]) <= 0 ? 20 : intval($arParams["MESSAGES_PER_PAGE"]);
 $arFilter = array("TICKET_ID" => $arParams["ID"], "TICKET_ID_EXACT_MATCH" => "Y", "IS_MESSAGE" => "Y");
 CPageOption::SetOptionString("main", "nav_page_in_session", "N");
 //sort config
 $order = $arParams["MESSAGE_SORT_ORDER"];
 $rsMessage = CTicket::GetMessageList($by, $order, $arFilter, $is_filtered, $check_rights = "Y", $get_user_name = "N");
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例4: htmlspecialcharsbx

        $str_OWNER_LOGIN = htmlspecialcharsbx($arUserTiket['LOGIN']);
        $str_OWNER_NAME = htmlspecialcharsbx($arUserTiket['NAME']) . ' ' . htmlspecialcharsbx($arUserTiket['LAST_NAME']);
        $str_lang = $TICKET_SITE = $str_SITE_ID;
        $TICKET_SLA = $str_SLA_ID = CTicketSLA::GetForUser($str_SITE_ID, $str_OWNER_USER_ID);
        $str_DIFFICULTY_ID = '';
        $str_CRITICALITY_ID = '';
        $obTicketMessage = CTicket::GetMessageByID($_SESSION['MESSAGE_ID']);
        $arTicketMessage = $obTicketMessage->Fetch();
        $MESSAGE = $arTicketMessage['MESSAGE'];
        $_SESSION['MESSAGE_NUM'] = IntVal($arTicketMessage['C_NUMBER']);
        $_SESSION['MESSAGE_DATE'] = $arTicketMessage['DATE_CREATE'];
        $_SESSION["TICKET_TITLE"] = $str_TITLE;
        $str_TITLE = '';
        $str_DATE_CLOSE = null;
        $arFiles = array();
        if ($rsFiles = CTicket::GetFileList($v1 = "s_id", $v2 = "asc", array("MESSAGE_ID" => $_SESSION['MESSAGE_ID']))) {
            while ($arFile = $rsFiles->Fetch()) {
                $name = $arFile["ORIGINAL_NAME"];
                if (strlen($arFile["EXTENSION_SUFFIX"]) > 0) {
                    $suffix_length = strlen($arFile["EXTENSION_SUFFIX"]);
                    $name = substr($name, 0, strlen($name) - $suffix_length);
                }
                $arFile["NAME"] = $name;
                $arFiles[] = $arFile;
            }
        }
    }
}
?>
<form name="form1" method="POST" action="<?php 
echo $APPLICATION->GetCurPage();
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:ticket_edit.php


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