本文整理汇总了PHP中Brand::getBrand方法的典型用法代码示例。如果您正苦于以下问题:PHP Brand::getBrand方法的具体用法?PHP Brand::getBrand怎么用?PHP Brand::getBrand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brand
的用法示例。
在下文中一共展示了Brand::getBrand方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
echo "<script>window.location='../../'</script>";
}
});
$app->post('/brands/updateImage', function () use($brand, $app) {
if (isset($_SESSION['app']) && isset($_COOKIE['app'])) {
$brand->updateImage();
} else {
echo "<script>window.location='../../'</script>";
}
});
// GET
$app->get('/brands', function () use($brand) {
$brand->getBrands();
});
$app->get('/brands/:id', function ($id) use($brand) {
$brand->getBrand($id);
});
$app->delete('/brands/:id', function ($id) use($brand) {
if (isset($_SESSION['app']) && isset($_COOKIE['app'])) {
$brand->delete($id);
} else {
echo "<script>window.location='../../'</script>";
}
});
// $app->post('/brands', function() use($brand, $app) {
// $request = $app->request();
// $body = $request->getBody();
// $data = json_decode($body);
// $brand->insert($data);
// });
$app->put('/brands/:id', function ($id) use($brand, $app) {
示例2: addLogo
$Brand->setLogoURL($_POST["txtLogoURL_Old"]);
}
if (isset($_POST["chkStatus"])) {
$Brand->setStatus($_POST["chkStatus"]);
} else {
$Brand->setStatus(0);
}
$Brand->update();
addLogo($Brand);
$update = true;
}
}
} else {
if (isset($_GET["BraID"]) && isset($_GET["control"])) {
$control->setValue($_GET["control"]);
$Brand = Brand::getBrand($_GET["BraID"]);
if ($Brand != null) {
if ($control == Controls::Update) {
echo "<script> \$(function () { \$(window).load(function(){ \$('#modalBra').modal( { backdrop: 'static', keyboard: false }, 'show');}); });</script>";
} else {
if ($control == Controls::Delete) {
$Brand->delete();
$path = '../assets/images/logoBrands/' . $Brand->getBraID();
if (file_exists($path)) {
File::removeDirectoryAllFiles($path);
}
$delete = true;
}
}
} else {
require_once '../helper/Utils.php';
示例3: Device
$p->setCatPro($c);
$flag = 1;
}
if (isset($_GET["DeviceID"]) && !empty($_GET["DeviceID"])) {
$devID = $_GET["DeviceID"];
$c->setDevice(new Device($devID));
require_once 'entities/Device.php';
$device = Device::getDevice($devID);
$p->setCatPro($c);
$flag = 2;
}
if (isset($_GET["BraID"]) && !empty($_GET["BraID"])) {
$braID = $_GET["BraID"];
$c->setBrand(new Brand($braID));
require_once 'entities/Brand.php';
$bra = Brand::getBrand($braID);
$p->setCatPro($c);
$flag = 3;
}
if ($flag != 0) {
$ListPro = $p->loadLimit($rowsPerPage, $offset, "CatProID");
$numberOfRows = $p->countRecords();
?>
<form id="addToCart-form" method="post" action=""><input type="hidden" id="txtProID" name="txtProID"/></form>
<!--PRODUCTS-->
<div class="box clearfix">
<ol class="breadcrumb box-top">
<li><a href="index.php"><i class="fa fa-home"></i></a></li>
<?php
if ($flag == 1) {
echo '<li><a href="productsByCat.php?DeviceID=' . $c->getDevice()->getDeviceID() . '">' . $c->getDevice()->getDeviceName() . '</a></li>';