本文整理汇总了PHP中Items::getItems方法的典型用法代码示例。如果您正苦于以下问题:PHP Items::getItems方法的具体用法?PHP Items::getItems怎么用?PHP Items::getItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Items
的用法示例。
在下文中一共展示了Items::getItems方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertItems
public function insertItems(Items $items)
{
$con = self::openConnection();
$affected = 0;
mysqli_begin_transaction($con);
$stm = mysqli_stmt_init($con);
$sql = "INSERT INTO category VALUES (?, ?, ?)";
mysqli_stmt_prepare($stm, $sql);
foreach ($items->getItems() as $item) {
$code = $item->getCode();
$name = $item->getName();
$parent = $item->getParent() == null ? null : $item->getParent()->getCode();
mysqli_stmt_bind_param($stm, 'sss', $code, $name, $parent);
mysqli_stmt_execute($stm);
if (mysqli_affected_rows($con) == 1) {
$affected++;
}
}
if ($affected > 0) {
mysqli_commit($con);
} else {
mysqli_rollback($con);
}
return $affected;
}
示例2: insertItems
public function insertItems(Items $items)
{
$con = self::openConnection();
$affected = 0;
mysqli_begin_transaction($con);
$stm = mysqli_stmt_init($con);
$sql = "INSERT INTO product VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
mysqli_stmt_prepare($stm, $sql);
foreach ($items->getItems() as $item) {
$code = $item->getCode();
$articul = $item->getArticul();
$name = $item->getName();
$bmuID = $item->getBasicMeasurementUnit() == null ? null : $item->getBasicMeasurementUnit()->getId();
$price = $item->getPrice();
$curID = $item->getCurrency() == null ? null : $item->getCurrency()->getId();
$muID = $item->getMeasurementUnit() == null ? null : $item->getMeasurementUnit()->getId();
$parent = $item->getParent() == null ? null : $item->getParent()->getCode();
mysqli_stmt_bind_param($stm, 'sssdddds', $code, $articul, $name, $bmuID, $price, $curID, $muID, $parent);
mysqli_stmt_execute($stm);
if (mysqli_affected_rows($con) == 1) {
$affected++;
}
}
if ($affected > 0) {
mysqli_commit($con);
} else {
mysqli_rollback($con);
}
return $affected;
}
示例3: paginated
function paginated()
{
$items = Items::getItems();
$curPage = isset($this->params[0]) ? $this->params[0] : 0;
$p = new Pagination($items, $curPage);
$p->before(APP_URL . '/mymodule/paginated')->after('/anything/else/')->startAtOne();
$this->_view->pagination = $p;
$this->_view->items = $items;
$this->template('content', 'paginatedExemple.phtml');
$this->show('main.tpl');
}
示例4: Items
set_time_limit(1800);
//Time limit of half an hour! (Which is pretty high...)
ini_set('memory_limit', '256M');
/*
Activiteiten en excursies 2.11.*
Eten en drinken 3.1.* en 3.2.*
Uit in Amsterdam 2.1.3, 3.3.1, 3.3.2, 4.3.5
Musea en galleries 2.1.6 en 2.2.4
Tentoonstellingen 2.3.14
Attracties en bezienswaardigheden 2.1.* en 2.2.*
Festivals 2.4
Theater 2.9.*
Shoppen in Amsterdam 4.6.*
Evenementen 2.3.* en 2.4.*
*/
$items = new Items();
$items->setDebug(false);
$items->setOutput("Evenementen");
$items->setTypeStart("2.3.");
$items->setAppend(false);
$items->getItems();
$items->saveToCSV();
$items->saveToXML(false);
$items = new Items();
$items->setDebug(false);
$items->setOutput("Evenementen");
$items->setTypeStart("2.4.");
$items->setAppend(true);
$items->getItems();
$items->saveToCSV();
$items->saveToXML(true);
示例5: Items
<?php
$access_item["/"] = true;
if (isset($read_access) && $read_access) {
return;
}
include_once $_SERVER["FRAMEWORK_PATH"] . "/config/init.php";
$action = $page->actions();
$IC = new Items();
$qnas = $IC->getItems(array("itemtype" => "qna", "extend" => true));
$page->pageTitle("the Janitor @ " . SITE_URL);
?>
<? $page->header(array("type" => "janitor")) ?>
<div class="scene front">
<h1><?php
echo SITE_NAME;
?>
</h1>
<h2>Janitor</h2>
<p>
Stopknappen er bygget på <a href="http://janitor.parentnode.dk" target="_blank">Janitor</a>
- og Janitor er bygget til Stopknappen.
</p>
<?php
echo $JML->listUserTodos();
?>
示例6: Items
<?php
$IC = new Items();
$page_item = $IC->getItem(array("tags" => "page:front", "extend" => array("user" => true, "mediae" => true, "tags" => true)));
if ($page_item) {
$this->sharingMetaData($page_item);
}
$post_items = $IC->getItems(array("itemtype" => "post", "tags" => "on:frontpage", "status" => 1, "extend" => array("tags" => true, "readstate" => true, "user" => true, "mediae" => true)));
?>
<div class="scene front i:front">
<div class="intro">
<!--
// ny dansk tekst
jeg tror
vi har sovet længe nok
nu
er det på tide
at vågne og indse
at midlet
er blevet en tyran
og målet er glemt
i stakken af regninger
vi har så travlt
at stilstand er tryghed
og tryghed er en luksus
som koster os alt