Beispiel #1
0
flush();
$smarty->assign("success_product", $success_product);
$inventprofiedlarr = array("订单编号" => 'subject', "标题" => 'productname', "价格" => 'listprice', "购买数量" => 'quantity', "商品属性" => 'comment');
$inventprofiedlkeysarr = array_keys($inventprofiedlarr);
$success_inventproduct = 0;
$fail_inventproduct = 0;
$titlearr = array();
foreach ($rows2 as $key => $val) {
    if ($key > 0) {
        foreach ($val as $k => $v) {
            $title = trim($titlearr[$k]);
            if (in_array($title, $inventprofiedlkeysarr)) {
                $focus_imppro->column_fields[$inventprofiedlarr[$title]] = preg_replace('/\'/', '', $v);
            }
        }
        $return4 = $focus_imppro->saveInventPro();
        if ($return4 == '1') {
            $success_inventproduct++;
        } elseif ($return4 == '2') {
            $fail_inventproduct++;
        }
    } else {
        $titlearr = $val;
    }
}
$smarty->assign("success_inventproduct", $success_inventproduct);
$smarty->assign("fail_inventproduct", $fail_inventproduct);
//require_once ('getBuyNums.php');
$smarty->display("ImportStepXin2.tpl");
?>
Beispiel #2
0
        $titlearr = $val;
    }
    $key1 = $key + 1;
    echo "<script language=\"JavaScript\">\n\tupdateProgress2(\"当前进度:第'" . $key1 . "'条\", " . min($width, intval($progress2)) . ");\n\t</script>";
    flush();
    $progress2 += $pix2;
}
echo "<script language=\"JavaScript\">\nupdateProgress2(\"操作完成!\", " . $width . ");\n</script>";
flush();
$smarty->assign("success_product", $success_product);
$inventprofiedlarr = array("订单编号" => 'oid', "标题" => 'productname', "价格" => 'listprice', "购买数量" => 'quantity', "商品属性" => 'comment', "备注" => 'comment2');
$inventprofiedlkeysarr = array_keys($inventprofiedlarr);
$titlearr = array();
foreach ($rows2 as $key => $val) {
    if ($key > 0) {
        foreach ($val as $k => $v) {
            $title = trim($titlearr[$k]);
            if (in_array($title, $inventprofiedlkeysarr)) {
                $focus_imppro->column_fields[$inventprofiedlarr[$title]] = $v;
            }
        }
        $focus_imppro->saveInventPro();
    } else {
        $titlearr = $val;
    }
}
require_once 'getBuyNums.php';
$smarty->display("ImportStepNew2.tpl");
?>