本文整理汇总了PHP中Supplier::setSuppid方法的典型用法代码示例。如果您正苦于以下问题:PHP Supplier::setSuppid方法的具体用法?PHP Supplier::setSuppid怎么用?PHP Supplier::setSuppid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Supplier
的用法示例。
在下文中一共展示了Supplier::setSuppid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// print "<br>$sqltext";
$q = $db->select($sqltext, array($_GET['id']), 'i');
$r = $q[0];
$addsid = $r->addsid;
if (isset($_GET['remove']) && $_GET['remove'] == "y" && isset($_GET['id']) && is_numeric($_GET['id'])) {
// db_delete("supplier", $_GET['id'],'supplierid');
header("Location: /suppliers/");
exit;
}
// Check if we have Form Data to process
if (isset($_GET['go']) && $_GET['go'] == "y") {
// Update Address table
$addsid = db_updateAddress($_POST, $addsid);
# Update DB
$supplierUpdate = new Supplier();
$supplierUpdate->setSuppid($_GET['id']);
$supplierUpdate->setCo_name($_POST['co_name']);
$supplierUpdate->setContact($_POST['contact']);
$supplierUpdate->setColour($_POST['colour']);
$supplierUpdate->updateDB();
header("Location: /suppliers/");
exit;
}
// Define elements for the HTML Header include
$pagetitle = "Edit supplier";
$pagescript = array("/js/picker.js");
$pagestyle = array();
include "../tmpl/header.php";
?>
<h1>Edit Supplier</h1>
示例2: header
include "/srv/athenace/lib/shared/functions_form.php";
if (!is_numeric($_GET['id'])) {
header("Location: /suppliers/?id=notFound");
exit;
}
if (isset($_GET['go']) && $_GET['go'] == "y") {
$supplierDelete = new Supplier();
$supplierDelete->setSuppid($_GET['id']);
$supplierDelete->deleteFromDB();
header("Location: /supplier/?ItemDeleted=y");
exit;
}
include "../tmpl/header.php";
$supplier = new Supplier();
// Load DB data into object
$supplier->setSuppid($_GET['id']);
$supplier->loadSupplier();
$all = $supplier->getAll();
if (isset($all)) {
?>
<div class="panel panel-info">
<div class="panel-heading">
<strong>Viewing <?php
echo $supplier->getSuppid();
?>
</strong>
</div>
<div class="panel-body">
<?php
foreach ($all as $key => $value) {