本文整理汇总了PHP中item::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP item::getName方法的具体用法?PHP item::getName怎么用?PHP item::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类item
的用法示例。
在下文中一共展示了item::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$som_vyrobok = "";
//nacitanie priznaku vo tovar je vyrobkom (vyrobok sa sklada z jedneho alebo viacerych tovarov)
if ($tovar->zistiCiSomVyrobok()) {
$som_vyrobok = "(výrobok)";
}
//---------EDITOVANIE vypisanie begin ---------------------
if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "edituj_tovar" && $_REQUEST["tovar_id"] == $vysl["id"]) {
//vypisanie fixnych parametrov
echo "<tr>";
echo "<form>";
echo "<td>";
$nazov = "sklad_id";
$pole = vsetky_sklady();
$vybrana_polozka = $aktivny_sklad->getId();
generuj_dropdown_box($nazov, $pole, $vybrana_polozka);
echo " <input type='text' name='meno' value='" . $tovar->getName() . "' />" . $som_vyrobok;
echo "</td>";
echo "<td><input type='text' name='pocet' value='" . $tovar->getCount() . "' disabled /></td>";
echo "<td><input type='text' name='min_stav' value='" . $tovar->getMinStav() . "'/></td>";
if ($organizacia->fixny_parameter("description")) {
echo "<td><input type='text' name='popis' value='" . $tovar->getPopis() . "' /></td>";
}
if ($organizacia->fixny_parameter("kod")) {
echo "<td><input type='text' name='kod' value='" . $tovar->getRegistracnyKod() . "' /></td>";
}
//vypisanie volitelnych parametrov
if (count($array_volitelne_parametre) > 0) {
//vypisovat budeme len ked uy mame nejake volitelne parametre definovane
foreach ($array_volitelne_parametre as $kluc => $parameter) {
//nacitanie parametrov z datab
$query2 = $database->select("SELECT hodnota FROM tovar_volitelne_parametre WHERE tovar_id = '" . $vysl["id"] . "' " . "AND parameter_tovaru_id = '" . $kluc . "'");
示例2: isset
//ano som vzrobok, idem ho zobrazit
$som_vyrobok = "(výrobok)";
//vypisanie fixnych parametrov
$aktualny_pocet = isset($_SESSION["zoznam_poloziek_vyrobka"][$vysl["id"]]) ? $_SESSION["zoznam_poloziek_vyrobka"][$vysl["id"]] : "";
//kvoli deklaracie premennej, aby nevypisoval hlasnu o nedeklarovani
echo "<tr>";
echo "<form>";
echo "<td><input type='submit' name='submit' value='Zaraď do výrobky'></td>";
echo "<td><b>" . $aktualny_pocet . "</b></td>";
echo "<td><input type='text' name='pocet' value='' size='4'></td>";
//hodnota je z aktualnej prijemky
echo "<input type='hidden' name='item_id' value='" . $vysl["id"] . "'>";
echo "<input type='hidden' name='action' value='aktualizuj_tovar_vyrobky_proceed'>";
echo "<input type='hidden' name='pageaction' value='vyrob_tovar'>";
echo "</form>";
echo "<td>" . $tovar->getName() . $som_vyrobok . "</td>";
echo "<td>" . $vysl["count"] . "</td>";
if ($organizacia->fixny_parameter("description")) {
echo "<td>" . $vysl["popis"] . "</td>";
}
if ($organizacia->fixny_parameter("kod")) {
echo "<td>" . $vysl["kod"] . "</td>";
}
//vypisanie volitelnych parametrov
if (count($array_volitelne_parametre) > 0) {
//vypisovat budeme len ked uy mame nejake volitelne parametre definovane
foreach ($array_volitelne_parametre as $kluc => $parameter) {
//nacitanie parametrov z datab
$query2 = $database->select("SELECT hodnota FROM tovar_volitelne_parametre WHERE tovar_id = '" . $vysl["id"] . "' " . "AND parameter_tovaru_id = '" . $kluc . "'");
$vysl2 = $database->fetch_array($query2);
echo "<td>" . $vysl2["hodnota"] . "</td>";