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


PHP Price::importPrice方法代碼示例

本文整理匯總了PHP中Price::importPrice方法的典型用法代碼示例。如果您正苦於以下問題:PHP Price::importPrice方法的具體用法?PHP Price::importPrice怎麽用?PHP Price::importPrice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Price的用法示例。


在下文中一共展示了Price::importPrice方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

<?php

include "models/function.php";
$param = "price";
if (isset($_POST['go'])) {
    DB::updatePM("UPDATE price SET kol='0'");
    $results = Price::importPrice($_FILES);
    foreach ($results as $result) {
        $res_tmp = DB::selectParam($param, "nomer", $result['nomer']);
        if (!$res_tmp) {
            $search[] = array("nomer" => $result['nomer']);
        }
        $arrUpdate = DB::updatePM("UPDATE price SET kol='{$result['kol']}' WHERE nomer = '{$result['nomer']}'");
    }
}
require_once 'view/tpl_top.php';
?>
<div class="app app-header-fixed  ">
	<?php 
include "view/header.php";
$active_d = "class=\"active\"";
include "view/nav.php";
?>
	<!-- content -->
	<div id="content" class="app-content" role="main">
		<div class="app-content-body ">
			<div class="hbox hbox-auto-xs hbox-auto-sm">
				<div class="col">
					<div class="bg-light lter b-b wrapper-md wrapper-md__i">
						<h1 class="m-n font-thin h3 inline">Обновление прайс листа</h1>
					</div>
開發者ID:Torredo,項目名稱:autozip,代碼行數:31,代碼來源:update.php

示例2: array_pop

include "models/function.php";
$param = "provider";
if (isset($_POST["go"])) {
    if ($_POST["go"] == "save") {
        array_pop($_POST);
        DB::insert(DB::insertSql($param, $_POST), $_POST);
        header("Location: pricelist.php");
    } else {
        $id = array_pop($_POST);
        DB::update(DB::updateSql($param, $_POST), $_POST, $id);
        header("Location: pricelist.php");
    }
}
if (isset($_POST["update"])) {
    IncludeClass::inc(array('Price'));
    Price::importPrice($_FILES, $_POST["update"]);
    header("Location: pricelist.php");
}
if (isset($_GET["delete"])) {
    Delete::del($_GET["title"], $_GET["delete"]);
    header("Location: pricelist.php");
}
$records = DB::select($param);
require_once 'view/tpl_top.php';
?>
<div class="app app-header-fixed">
    <?php 
include "view/tpl_popup_provider.php";
include "view/header.php";
$active_h = "class=\"active\"";
include "view/nav.php";
開發者ID:Torredo,項目名稱:glzn,代碼行數:31,代碼來源:pricelist.php


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