本文整理匯總了PHP中Info::getInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP Info::getInfo方法的具體用法?PHP Info::getInfo怎麽用?PHP Info::getInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Info
的用法示例。
在下文中一共展示了Info::getInfo方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Info
$result['shelfID'] = $books[$i]['shelfID'];
$deliver[] = $result;
} else {
j_die($error['only_one_action_allowed']);
}
} else {
//Book shall be lended
//Check if user has been set
if ($user === -1) {
j_die($error['no_user_rfid']);
}
if ($res['type'] !== "deliver") {
$res['type'] = 'lend';
require ROOT . 'admin/info.class.php';
$info = new Info("books", $books[$i]['bookID']);
$result = $info->getInfo();
$result['RFID'] = $books[$i]['rfid'];
$result['shelfID'] = $books[$i]['shelfID'];
$lend[] = array('user' => $user, 'date' => $date, 'book' => $result);
} else {
j_die($error['only_one_action_allowed']);
}
}
}
//Lend shiet
for ($i = 0; $i < count($lend); $i++) {
$insert_user_book = "INSERT INTO lib_User_Book (userID, outDate, bookRFID, deliver_deadline) VALUES \n ('" . $lend[$i]['user'] . "', '" . $lend[$i]['date'] . "', '" . $lend[$i]['book']['RFID'] . "', '" . $deliver_deadline . "')";
$insert_user_book_qry = $conn->query($insert_user_book);
if ($insert_user_book_qry === TRUE) {
//Success
$res['status'][] = array('book_info' => get_book_info($lend[$i]['book'], $deliver_deadline), 'error' => $error['lend_success']);
示例2: Info
echo DEPENDENCIES_LOC;
?>
imgs/cross.png" /></a>
</div>
<div id="footnotes" class="bottom_right">
<img src="<?php
echo DEPENDENCIES_LOC;
?>
imgs/soke_p.png" />
</div>
<?php
} else {
if (isset($_GET['book'])) {
require ROOT . 'admin/info.class.php';
$info = new Info("books", $_GET['book']);
$i = $info->getInfo();
$author = $i['author'];
if (count(explode(",", $author)) > 1) {
$author = explode(",", $author)[1] . " " . explode(",", $author)[0];
}
?>
<style>
body{
background-color: #e3ba26;
}
h2{
margin-bottom: 5px;
line-height: 36px;
}
#text{
margin-top: 140px;
示例3: Info
}
}
echo '</tr>';
}
echo '</tbody></table>';
} else {
echo 'Ukjent.';
}
}
} else {
if ($index_a[0] == "info") {
//Book
if (isset($index_a[1]) && isset($index_a[2])) {
require 'info.class.php';
$information = new Info($index_a[1], $index_a[2]);
$info = $information->getInfo();
if ($info != false) {
print_info($info);
} else {
echo $info->error;
}
} else {
echo "Mangler data :/";
}
} else {
if ($index_a[0] == "create") {
if (isset($index_a[1])) {
$fields = array('book' => array('verifyer' => 'title'), 'user' => array('verifyer' => 'firstname'), 'shelf' => array('verifyer' => 'name'));
if (isset($fields[$index_a[1]])) {
if (isset($_POST[$fields[$index_a[1]]['verifyer']])) {
//Fix the birth