本文整理匯總了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>
示例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";