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


PHP AgileSellerManager::getLinkedSellerID方法代码示例

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


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

示例1: postProcess

 public function postProcess()
 {
     ${"GLOBALS"}["blpimnned"] = "id_order_seller";
     $dbodbxes = "id_order";
     ${${"GLOBALS"}["qusrvgm"]} = (int) Tools::getValue("id_order");
     if (!$this->context->customer->isLogged() && !Tools::getValue("secure_key")) {
         Tools::redirect("index.php?controller=authentication&back=my-account");
     }
     ${"GLOBALS"}["tvasln"] = "id_order";
     $jpdhpfqcj = "id_order";
     if (!(int) Configuration::get("PS_INVOICE")) {
         die(Tools::displayError("Invoices are disabled in this shop."));
     }
     if (isset(${${"GLOBALS"}["qusrvgm"]}) && Validate::isUnsignedId(${$dbodbxes})) {
         ${${"GLOBALS"}["ymjzko"]} = new Order(${$jpdhpfqcj});
     }
     if (!isset(${${"GLOBALS"}["ymjzko"]}) || !Validate::isLoadedObject(${${"GLOBALS"}["ymjzko"]})) {
         die(Tools::displayError("Invoice not found"));
     }
     ${${"GLOBALS"}["vewtbt"]} = AgileSellerManager::getObjectOwnerID("order", ${${"GLOBALS"}["tvasln"]});
     ${${"GLOBALS"}["sokafjqdei"]} = AgileSellerManager::getLinkedSellerID($this->context->customer->id);
     if (${${"GLOBALS"}["blpimnned"]} != ${${"GLOBALS"}["sokafjqdei"]}) {
         die(Tools::displayError("You do not have permission to see this invoice"));
     }
     if (Tools::isSubmit("secure_key") && $order->secure_key != Tools::getValue("secure_key")) {
         die(Tools::displayError("You do not have permission to see this invoice"));
     }
     if (!OrderState::invoiceAvailable($order->getCurrentState()) && !$order->invoice_number) {
         die(Tools::displayError("No invoice available"));
     }
     $this->order = ${${"GLOBALS"}["ymjzko"]};
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:32,代码来源:sellerpdfinvoice.php

示例2: createSellerAccount

 public static function createSellerAccount($customer)
 {
     $toqkiomv = "customer";
     global $cookie;
     if (!Validate::isLoadedObject(${$toqkiomv})) {
         return;
     }
     require_once dirname(__FILE__) . "/SellerInfo.php";
     $sid = AgileSellerManager::getLinkedSellerID($customer->id);
     if ($sid > 0) {
         return;
     }
     ${${"GLOBALS"}["qkyaztoiww"]} = Address::getFirstCustomerAddressId($customer->id, true);
     $quvvpsbmm = "address";
     ${${"GLOBALS"}["ttgfmxhakl"]} = new Address(intval(${${"GLOBALS"}["qkyaztoiww"]}));
     if (!Validate::isLoadedObject(${$quvvpsbmm})) {
         $address->id_country = Configuration::get("PS_COUNTRY_DEFAULT");
     }
     if (Employee::employeeExists($customer->email)) {
         $ixpzflfvjdl = "emp";
         ${"GLOBALS"}["tuwsmwyun"] = "seller_emp";
         ${$ixpzflfvjdl} = new Employee();
         ${${"GLOBALS"}["tuwsmwyun"]} = $emp->getByEmail($customer->email);
     } else {
         $jdiwblvo = "seller_emp";
         ${$jdiwblvo} = new Employee();
         $seller_emp->firstname = $customer->firstname;
         $seller_emp->lastname = $customer->lastname;
         $seller_emp->email = $customer->email;
         $seller_emp->id_profile = (int) Configuration::get("AGILE_MS_PROFILE_ID");
         $seller_emp->active = intval(Configuration::get("AGILE_MS_SELLER_APPROVAL")) == 1 ? 0 : 1;
         $seller_emp->id_lang = $cookie->id_lang;
         $seller_emp->passwd = $customer->passwd;
         $seller_emp->default_tab = Tab::getIdFromClassName("AdminProducts");
         $seller_emp->bo_theme = "default";
         $seller_emp->optin = 0;
         $seller_emp->add();
     }
     AgileSellerManager::assignObjectOwner("customer", $customer->id, $seller_emp->id);
     ${"GLOBALS"}["pienutr"] = "customer";
     ${${"GLOBALS"}["atnqtpp"]} = self::createSellerInfo(${${"GLOBALS"}["pienutr"]}, ${${"GLOBALS"}["ttgfmxhakl"]}, ${${"GLOBALS"}["mbnicd"]});
     self::sendNewSellerAccountEmail($sellerinfo->id);
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:43,代码来源:AgileMultipleSellerBase.php

示例3: hasOwnerShip

 private function hasOwnerShip()
 {
     if ($this->id_object > 0) {
         if (!Validate::isLoadedObject($this->object)) {
             return false;
         } else {
             $bdhvealzjd = "id_product_seller";
             $qidpgxmddirk = "id_product_seller";
             ${$bdhvealzjd} = AgileSellerManager::getObjectOwnerID("product", $this->object->id);
             ${${"GLOBALS"}["kibqfcx"]} = AgileSellerManager::getLinkedSellerID($this->context->customer->id);
             if (${$qidpgxmddirk} != ${${"GLOBALS"}["kibqfcx"]} and ${${"GLOBALS"}["kibqfcx"]} > 0) {
                 return false;
             }
         }
     }
     return true;
 }
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:17,代码来源:sellerproductdetailbase.php

示例4: activate_message_front

 public static function activate_message_front($id_agile_sellermessage, $status)
 {
     $onyijb = "id_agile_sellermessage";
     $liwnsfzx = "status";
     global $cookie;
     ${"GLOBALS"}["uabjtdbqh"] = "sql";
     ${"GLOBALS"}["nqtvqxvgxtcj"] = "id_agile_sellermessage";
     if (!Context::getContext()->customer->isLogged()) {
         return Tools::displayError("You must be logged in to perform this action");
     }
     ${"GLOBALS"}["znxpiuheb"] = "id_seller";
     ${${"GLOBALS"}["nqtvqxvgxtcj"]} = intval(Tools::getValue("id_agile_sellermessage"));
     $jgfonrgcuhgk = "message";
     if (${$onyijb} <= 0) {
         return Tools::displayError("Invalid parameter");
     }
     include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/SellerInfo.php";
     include_once _PS_ROOT_DIR_ . "/modules/agilesellermessenger/AgileSellerMessage.php";
     ${"GLOBALS"}["oslxofqt"] = "sql";
     ${${"GLOBALS"}["agnwbbnejad"]} = new AgileSellerMessage(${${"GLOBALS"}["fowvouwvpk"]});
     if (!Validate::isLoadedObject(${$jgfonrgcuhgk})) {
         return Tools::displayError("Message not found");
     }
     ${${"GLOBALS"}["ihicvjpboh"]} = AgileSellerManager::getLinkedSellerID($cookie->id_customer);
     if (${${"GLOBALS"}["znxpiuheb"]} != $message->id_seller) {
         return Tools::displayError("You do not have permission");
     }
     ${${"GLOBALS"}["oslxofqt"]} = "UPDATE " . _DB_PREFIX_ . "agile_sellermessage SET active=" . ${$liwnsfzx} . " WHERE id_agile_sellermessage=" . ${${"GLOBALS"}["fowvouwvpk"]};
     Db::getInstance()->Execute(${${"GLOBALS"}["uabjtdbqh"]});
     return "";
 }
开发者ID:evilscripts,项目名称:gy,代码行数:31,代码来源:agilesellermessenger.php

示例5: initContent

 public function initContent()
 {
     ${"GLOBALS"}["wcbwhorf"] = "id_order";
     parent::initContent();
     if (!(${${"GLOBALS"}["tdrhijkvhp"]} = (int) Tools::getValue("id_order")) || !Validate::isUnsignedId(${${"GLOBALS"}["wcbwhorf"]})) {
         $this->errors[] = Tools::displayError("Order ID required");
     } else {
         ${"GLOBALS"}["vtkcznmlk"] = "id_customer_seller";
         ${"GLOBALS"}["bwkdjg"] = "id_order";
         ${${"GLOBALS"}["thtbvco"]} = new Order(${${"GLOBALS"}["bwkdjg"]});
         ${"GLOBALS"}["tkggscllp"] = "order";
         ${${"GLOBALS"}["gfrblyem"]} = AgileSellerManager::getObjectOwnerID("order", $order->id);
         ${${"GLOBALS"}["taultlaseq"]} = AgileSellerManager::getLinkedSellerID($this->context->customer->id);
         if (Validate::isLoadedObject(${${"GLOBALS"}["thtbvco"]}) && ${${"GLOBALS"}["gfrblyem"]} == ${${"GLOBALS"}["vtkcznmlk"]} && ${${"GLOBALS"}["taultlaseq"]} > 0) {
             $fwsweyfqnpv = "dlv_adr_fields";
             $gcjosivnd = "carrier";
             ${"GLOBALS"}["pffjtshcnb"] = "deliveryAddressFormatedValues";
             $uztnjfwuwsv = "customizedDatas";
             $uvmwhue = "addressDelivery";
             ${"GLOBALS"}["atrcjjwf"] = "carrier";
             ${"GLOBALS"}["flawpcbih"] = "products";
             ${${"GLOBALS"}["tthrzd"]} = (int) $order->getCurrentState();
             ${$gcjosivnd} = new Carrier((int) $order->id_carrier, (int) $order->id_lang);
             ${"GLOBALS"}["rovfqvkjb"] = "addressDelivery";
             ${${"GLOBALS"}["hoviucftx"]} = new Address((int) $order->id_address_invoice);
             $mjqwhmgoyrm = "customizedDatas";
             ${"GLOBALS"}["qguglflbdd"] = "dlv_adr_fields";
             $sitqckqhoebi = "inv_adr_fields";
             $vejelhbyrbl = "addressDelivery";
             ${"GLOBALS"}["zpyvneijb"] = "addressInvoice";
             $tsvbkseunn = "dlv_adr_fields";
             ${"GLOBALS"}["cdlqrupc"] = "inv_adr_fields";
             ${${"GLOBALS"}["rovfqvkjb"]} = new Address((int) $order->id_address_delivery);
             ${$sitqckqhoebi} = AddressFormat::getOrderedAddressFields($addressInvoice->id_country);
             $shfzuivbjgg = "inv_adr_fields";
             ${${"GLOBALS"}["qguglflbdd"]} = AddressFormat::getOrderedAddressFields($addressDelivery->id_country);
             ${${"GLOBALS"}["elucej"]} = AddressFormat::getFormattedAddressFieldsValues(${${"GLOBALS"}["hoviucftx"]}, ${$shfzuivbjgg});
             ${${"GLOBALS"}["pffjtshcnb"]} = AddressFormat::getFormattedAddressFieldsValues(${${"GLOBALS"}["gkxhkddsjf"]}, ${$fwsweyfqnpv});
             $tbfgtqy = "order";
             if ($order->total_discounts > 0) {
                 $this->context->smarty->assign("total_old", (double) ($order->total_paid - $order->total_discounts));
             }
             ${"GLOBALS"}["ikavgzhqpt"] = "deliveryAddressFormatedValues";
             ${${"GLOBALS"}["flawpcbih"]} = $order->getProducts();
             ${${"GLOBALS"}["gdodxcerle"]} = Product::getAllCustomizedDatas((int) $order->id_cart);
             Product::addCustomizationPrice(${${"GLOBALS"}["umrxyqn"]}, ${$mjqwhmgoyrm});
             $buaccdx = "carrier";
             ${${"GLOBALS"}["cdmray"]} = new Customer($order->id_customer);
             ${"GLOBALS"}["betrwosx"] = "products";
             ${${"GLOBALS"}["bfrxhizen"]} = $order->getCurrentOrderState();
             ${${"GLOBALS"}["sslziuxrs"]} = OrderState::getOrderStates((int) $this->context->language->id);
             ${"GLOBALS"}["bwcmquq"] = "addressInvoice";
             $this->context->smarty->assign(array("order_states" => ${${"GLOBALS"}["sslziuxrs"]}));
             $this->context->smarty->assign(array("shop_name" => strval(Configuration::get("PS_SHOP_NAME")), "order" => ${${"GLOBALS"}["thtbvco"]}, "return_allowed" => (int) $order->isReturnable(), "currency" => new Currency($order->id_currency), "order_cur_state" => (int) ${${"GLOBALS"}["tthrzd"]}, "invoiceAllowed" => (int) Configuration::get("PS_INVOICE"), "invoice" => OrderState::invoiceAvailable(${${"GLOBALS"}["tthrzd"]}) && $order->invoice_number, "order_history" => $order->getHistory($this->context->language->id, false, true), "products" => ${${"GLOBALS"}["betrwosx"]}, "discounts" => $order->getCartRules(), "carrier" => ${${"GLOBALS"}["atrcjjwf"]}, "address_invoice" => ${${"GLOBALS"}["bwcmquq"]}, "invoiceState" => Validate::isLoadedObject(${${"GLOBALS"}["zpyvneijb"]}) && $addressInvoice->id_state ? new State($addressInvoice->id_state) : false, "address_delivery" => ${$uvmwhue}, "inv_adr_fields" => ${${"GLOBALS"}["cdlqrupc"]}, "dlv_adr_fields" => ${$tsvbkseunn}, "invoiceAddressFormatedValues" => ${${"GLOBALS"}["elucej"]}, "deliveryAddressFormatedValues" => ${${"GLOBALS"}["ikavgzhqpt"]}, "deliveryState" => Validate::isLoadedObject(${${"GLOBALS"}["gkxhkddsjf"]}) && $addressDelivery->id_state ? new State($addressDelivery->id_state) : false, "is_guest" => false, "messages" => CustomerMessage::getMessagesByOrderId((int) $order->id, false), "CUSTOMIZE_FILE" => Product::CUSTOMIZE_FILE, "CUSTOMIZE_TEXTFIELD" => Product::CUSTOMIZE_TEXTFIELD, "isRecyclable" => Configuration::get("PS_RECYCLABLE_PACK"), "use_tax" => Configuration::get("PS_TAX"), "group_use_tax" => Group::getPriceDisplayMethod($customer->id_default_group) == PS_TAX_INC, "customizedDatas" => ${$uztnjfwuwsv}));
             if ($carrier->url && $order->shipping_number) {
                 $this->context->smarty->assign("followup", str_replace("@", $order->shipping_number, $carrier->url));
             }
             $this->context->smarty->assign("HOOK_ORDERDETAILDISPLAYED", Hook::exec("displayOrderDetail", array("order" => ${${"GLOBALS"}["thtbvco"]})));
             Hook::exec("actionOrderDetail", array("carrier" => ${${"GLOBALS"}["tvqrewgc"]}, "order" => ${$tbfgtqy}));
             unset(${$buaccdx}, ${${"GLOBALS"}["hoviucftx"]}, ${$vejelhbyrbl});
         } else {
             $this->errors[] = Tools::displayError("Cannot find this order");
         }
         unset(${${"GLOBALS"}["tkggscllp"]});
     }
     self::$smarty->assign(array("seller_tab_id" => 4));
     $this->setTemplate("sellerorderdetail.tpl");
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:68,代码来源:sellerorderdetail.php

示例6: dirname

${"GLOBALS"}["ijooxs"] = "id_shop";
${"GLOBALS"}["kfciqhovvbq"] = "action";
${"GLOBALS"}["dwydims"] = "id_product";
$rnxrpiazvd = "id_product";
${"GLOBALS"}["lfghcw"] = "id_seller";
$ntguafqd = "action";
require_once dirname(__FILE__) . "/../../config/config.inc.php";
require_once dirname(__FILE__) . "/../../init.php";
require_once dirname(__FILE__) . "/agilemultipleseller.php";
$tsxqgqfuyd = "action";
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
${"GLOBALS"}["lzguktzczwfp"] = "id_seller";
if (!isset(Context::getContext()->customer) || !Context::getContext()->customer->id || !Context::getContext()->customer->isLogged()) {
    die(Tools::jsonEncode(array("status" => "error", "message" => Tools::displayError("Permission denied"))));
}
${${"GLOBALS"}["lfghcw"]} = AgileSellerManager::getLinkedSellerID(Context::getContext()->customer->id);
${$rnxrpiazvd} = intval(Tools::getValue("id_product"));
${"GLOBALS"}["okfswszsrpim"] = "action";
$kjbefxe = "action";
if (${${"GLOBALS"}["lfghcw"]} > 0 and ${${"GLOBALS"}["dwydims"]} > 0 and ${${"GLOBALS"}["lzguktzczwfp"]} != AgileSellerManager::getObjectOwnerID("product", ${${"GLOBALS"}["dwydims"]})) {
    die(Tools::jsonEncode(array("status" => "error", "message" => Tools::displayError("Permission denied"))));
}
${${"GLOBALS"}["okfswszsrpim"]} = Tools::getValue("action");
$strbdkmkszb = "action";
if (${$ntguafqd} == "updateImagePosition") {
    die(ajaxProcessUpdateImagePosition());
}
if (${${"GLOBALS"}["kfciqhovvbq"]} == "deleteProductImage") {
    die(ajaxProcessDeleteProductImage());
}
if (${${"GLOBALS"}["kfciqhovvbq"]} == "UpdateCover") {
开发者ID:evilscripts,项目名称:gy,代码行数:31,代码来源:ajax_products.php

示例7: init

 public function init()
 {
     if (Tools::getValue("is_seller") && isset($this->context->customer) && $this->context->customer->id && $this->context->customer->isLogged() && Tools::getValue('key')) {
         $filename = str_replace("-orderdetail", "", Tools::getValue('key'));
         if (!Validate::isSha1($filename)) {
             die(Tools::displayError());
         }
         $file = _PS_DOWNLOAD_DIR_ . strval(preg_replace('/\\.{2,}/', '.', $filename));
         $id_product_download = ProductDownload::getIdFromFilename($filename);
         $product_download = new ProductDownload($id_product_download);
         $id_product = $product_download->id_product;
         $id_seller = AgileSellerManager::getLinkedSellerID($this->context->customer->id);
         if ($id_seller != AgileSellerManager::getObjectOwnerID('product', $id_product)) {
             die(Tools::displayError('No access permission'));
         }
         $filename = ProductDownload::getFilenameFromFilename($filename);
         if (empty($filename)) {
             $newFileName = Tools::getValue('filename');
             if (!empty($newFileName)) {
                 $filename = Tools::getValue('filename');
             } else {
                 $filename = 'file';
             }
         }
         if (!file_exists($file)) {
             Tools::redirect('index.php');
         }
         $mimeType = false;
         if (function_exists('finfo_open')) {
             $finfo = @finfo_open(FILEINFO_MIME);
             $mimeType = @finfo_file($finfo, $file);
             @finfo_close($finfo);
         } else {
             if (function_exists('mime_content_type')) {
                 $mimeType = @mime_content_type($file);
             } else {
                 if (function_exists('exec')) {
                     $mimeType = trim(@exec('file -b --mime-type ' . escapeshellarg($file)));
                     if (!$mimeType) {
                         $mimeType = trim(@exec('file --mime ' . escapeshellarg($file)));
                     }
                     if (!$mimeType) {
                         $mimeType = trim(@exec('file -bi ' . escapeshellarg($file)));
                     }
                 }
             }
         }
         if (empty($mimeType)) {
             $bName = basename($filename);
             $bName = explode('.', $bName);
             $bName = strtolower($bName[count($bName) - 1]);
             $mimeTypes = array('ez' => 'application/andrew-inset', 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'doc' => 'application/msword', 'oda' => 'application/oda', 'pdf' => 'application/pdf', 'ai' => 'application/postscript', 'eps' => 'application/postscript', 'ps' => 'application/postscript', 'smi' => 'application/smil', 'smil' => 'application/smil', 'wbxml' => 'application/vnd.wap.wbxml', 'wmlc' => 'application/vnd.wap.wmlc', 'wmlsc' => 'application/vnd.wap.wmlscriptc', 'bcpio' => 'application/x-bcpio', 'vcd' => 'application/x-cdlink', 'pgn' => 'application/x-chess-pgn', 'cpio' => 'application/x-cpio', 'csh' => 'application/x-csh', 'dcr' => 'application/x-director', 'dir' => 'application/x-director', 'dxr' => 'application/x-director', 'dvi' => 'application/x-dvi', 'spl' => 'application/x-futuresplash', 'gtar' => 'application/x-gtar', 'hdf' => 'application/x-hdf', 'js' => 'application/x-javascript', 'skp' => 'application/x-koan', 'skd' => 'application/x-koan', 'skt' => 'application/x-koan', 'skm' => 'application/x-koan', 'latex' => 'application/x-latex', 'nc' => 'application/x-netcdf', 'cdf' => 'application/x-netcdf', 'sh' => 'application/x-sh', 'shar' => 'application/x-shar', 'swf' => 'application/x-shockwave-flash', 'sit' => 'application/x-stuffit', 'sv4cpio' => 'application/x-sv4cpio', 'sv4crc' => 'application/x-sv4crc', 'tar' => 'application/x-tar', 'tcl' => 'application/x-tcl', 'tex' => 'application/x-tex', 'texinfo' => 'application/x-texinfo', 'texi' => 'application/x-texinfo', 't' => 'application/x-troff', 'tr' => 'application/x-troff', 'roff' => 'application/x-troff', 'man' => 'application/x-troff-man', 'me' => 'application/x-troff-me', 'ms' => 'application/x-troff-ms', 'ustar' => 'application/x-ustar', 'src' => 'application/x-wais-source', 'xhtml' => 'application/xhtml+xml', 'xht' => 'application/xhtml+xml', 'zip' => 'application/zip', 'au' => 'audio/basic', 'snd' => 'audio/basic', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'kar' => 'audio/midi', 'mpga' => 'audio/mpeg', 'mp2' => 'audio/mpeg', 'mp3' => 'audio/mpeg', 'aif' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'm3u' => 'audio/x-mpegurl', 'ram' => 'audio/x-pn-realaudio', 'rm' => 'audio/x-pn-realaudio', 'rpm' => 'audio/x-pn-realaudio-plugin', 'ra' => 'audio/x-realaudio', 'wav' => 'audio/x-wav', 'pdb' => 'chemical/x-pdb', 'xyz' => 'chemical/x-xyz', 'bmp' => 'image/bmp', 'gif' => 'image/gif', 'ief' => 'image/ief', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'jpe' => 'image/jpeg', 'png' => 'image/png', 'tiff' => 'image/tiff', 'tif' => 'image/tif', 'djvu' => 'image/vnd.djvu', 'djv' => 'image/vnd.djvu', 'wbmp' => 'image/vnd.wap.wbmp', 'ras' => 'image/x-cmu-raster', 'pnm' => 'image/x-portable-anymap', 'pbm' => 'image/x-portable-bitmap', 'pgm' => 'image/x-portable-graymap', 'ppm' => 'image/x-portable-pixmap', 'rgb' => 'image/x-rgb', 'xbm' => 'image/x-xbitmap', 'xpm' => 'image/x-xpixmap', 'xwd' => 'image/x-windowdump', 'igs' => 'model/iges', 'iges' => 'model/iges', 'msh' => 'model/mesh', 'mesh' => 'model/mesh', 'silo' => 'model/mesh', 'wrl' => 'model/vrml', 'vrml' => 'model/vrml', 'css' => 'text/css', 'html' => 'text/html', 'htm' => 'text/html', 'asc' => 'text/plain', 'txt' => 'text/plain', 'rtx' => 'text/richtext', 'rtf' => 'text/rtf', 'sgml' => 'text/sgml', 'sgm' => 'text/sgml', 'tsv' => 'text/tab-seperated-values', 'wml' => 'text/vnd.wap.wml', 'wmls' => 'text/vnd.wap.wmlscript', 'etx' => 'text/x-setext', 'xml' => 'text/xml', 'xsl' => 'text/xml', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpe' => 'video/mpeg', 'qt' => 'video/quicktime', 'mov' => 'video/quicktime', 'mxu' => 'video/vnd.mpegurl', 'avi' => 'video/x-msvideo', 'movie' => 'video/x-sgi-movie', 'ice' => 'x-conference-xcooltalk');
             if (isset($mimeTypes[$bName])) {
                 $mimeType = $mimeTypes[$bName];
             } else {
                 $mimeType = 'application/octet-stream';
             }
         }
         header('Content-Transfer-Encoding: binary');
         header('Content-Type: ' . $mimeType);
         header('Content-Length: ' . filesize($file));
         header('Content-Disposition: attachment; filename="' . $filename . '"');
         ob_end_flush();
         $fp = fopen($file, 'rb');
         while (!feof($fp)) {
             echo fgets($fp, 16384);
         }
         exit;
     }
     parent::init();
 }
开发者ID:evilscripts,项目名称:gy,代码行数:71,代码来源:GetFileController.php


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