本文整理汇总了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";