本文整理汇总了PHP中Printer::getPrinterInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Printer::getPrinterInfo方法的具体用法?PHP Printer::getPrinterInfo怎么用?PHP Printer::getPrinterInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Printer
的用法示例。
在下文中一共展示了Printer::getPrinterInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sanitizeString
<?php
// Example 26-9: members.php
require_once 'header.php';
if (!$loggedin) {
die;
}
echo "<div class='main'>";
if (isset($_GET['view'])) {
$view = sanitizeString($_GET['view']);
$printer = new Printer();
$printer->getPrinterInfo($view);
echo "<li> Стикер № - <b>" . $printer->row['PRINTER_NUMBER'] . "</b></li>";
echo "<li> Имя принтера - " . $printer->row['PRINTER_NAME'] . "</li>";
echo "<li> Производитель - " . $printer->row['PRINTER_MANUFATURER'] . "</li>";
echo "<li> Модель - " . $printer->row['PRINTER_MODEL'] . "</li>";
echo "<li> Серийный № - " . $printer->row['PRINTER_SERIAL'] . "</li>";
echo "<li> Отпечатано - <b>" . $printer->row['PRINTER_PCOUNT'] . "</b></li>";
echo "<li> Стоимость отпечатка - " . $printer->row['PRINTER_PAGE_COST'] . "</li>";
echo "<li> Последнее изменение - " . $printer->row['DATE_PRINTER_LAST_EDIT'] . "</li>";
echo "<li> Баланс принтера - <b>" . $printer->row['PRINTER_BALANCE'] . "</b></li>";
echo "<li> <a href='counters.php?byprinter=" . $printer->row['PRINTER_NUMBER'] . "'>[Данные счетчиков]</a> </li>";
echo "</br></div>";
require_once "footer.php";
die;
} elseif (isset($_GET['edit'])) {
$edit = sanitizeString($_GET['edit']);
if (!isset($_POST['printernum'])) {
$printer = new Printer();
$printer->initFromDB($edit);
} else {
$printer = new Printer();