当前位置: 首页>>代码示例>>PHP>>正文


PHP validate::KOD方法代码示例

本文整理汇总了PHP中validate::KOD方法的典型用法代码示例。如果您正苦于以下问题:PHP validate::KOD方法的具体用法?PHP validate::KOD怎么用?PHP validate::KOD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在validate的用法示例。


在下文中一共展示了validate::KOD方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dodaj_lista

    static function dodaj_lista($kod, $wlasne, $znalezione = array())
    {
        validate::KOD($kod, FALSE);
        echo '<p>KOD: <input type="text" name="kod" value="' . $kod . '" readonly="readonly" /></p>

';
        $i = 0;
        ?>

<table>
<tr> <th>Autor</th> <th>Tytuł</th> <th>Wydanie</th> <th>Miejsce</th> <th>Rok</th> <th>Wydawnictwo</th> <th>Język</th> <th>ISBN</th> <th>ISSN</th> <th>Zapisz</th> </tr>
<?php 
        if (!empty($wlasne)) {
            ?>
<tr> <th colspan="10">Zasoby własne</th> </tr>

<?php 
            foreach ($wlasne as $value) {
                echo '<tr> <form action="add_book.php" method="post">
';
                foreach (self::$pola as $v) {
                    echo '<td> <input type="text" name="' . $v . '" value="' . htmlspecialchars($value[$v]) . '" /> </td>
';
                }
                echo '<td> <input type="hidden" name="id" value="' . $kod . '" readonly="readonly" /> <input type="submit" value="Zapisz" /> </td>
</form> </tr>
';
            }
        }
        foreach ($znalezione as $nazwa => $dane) {
            echo '<tr> <th colspan="10">' . $nazwa . '</th> </tr>';
            foreach ($dane as $value) {
                echo '<tr> <form action="add_book.php" method="post">
';
                foreach (self::$pola as $v) {
                    echo '<td> <input type="text" name="' . $v . '" value="' . htmlspecialchars($value[$v]) . '" /> </td>
';
                }
                echo '<td> <input type="hidden" name="id" value="' . $kod . '" readonly="readonly" /> <input type="submit" value="Zapisz" /> </td>
</form> </tr>
';
            }
        }
        ?>

<tr> <th colspan="10">Dodaj własną</th> </tr>

<?php 
        echo '<tr> <form action="add_book.php" method="post">
';
        foreach (self::$pola as $v) {
            echo '<td> <input type="text" name="' . $v . '" /> </td>
';
        }
        echo '<td> <input type="hidden" name="id" value="' . $kod . '" readonly="readonly" /> <input type="submit" value="Zapisz" /> </td>
</form> </tr>

</table>
';
    }
开发者ID:Alambos,项目名称:books,代码行数:60,代码来源:gotowe.php

示例2: znajdz

 static function znajdz($KOD, $ISBN, $dir = 'covers')
 {
     if (strlen($KOD) <= 8 && ctype_digit($KOD)) {
         validate::KOD($KOD);
         if (file_exists('./' . $dir . '/own/' . $KOD)) {
             return './' . $dir . '/own/' . $KOD;
         }
     }
     if (strlen($ISBN) == 13) {
         validate::EAN($ISBN);
         if (substr($ISBN, 0, 3) == '978') {
             $ISBN10 = convert::ISBN13_to_ISBN10($ISBN);
         } else {
             $ISBN10 = $ISBN;
         }
         if (file_exists('./' . $dir . '/own/' . $ISBN)) {
             return './' . $dir . '/own/' . $ISBN;
         }
         if (self::librarything($ISBN, $dir) !== FALSE) {
             return './' . $dir . '/' . $ISBN;
         }
     }
     return FALSE;
 }
开发者ID:Alambos,项目名称:books,代码行数:24,代码来源:okladki.php

示例3: trim

<?php

include './includes/std.php';
require_once 'includes/generate_html.php';
require_once 'includes/generate_codabar.php';
echo GENERATE_STYLE;
echo '<table cellspacing="0">
<tr>';
$column = 0;
$row = 0;
for ($i = $_POST['from']; $i < $_POST['from'] + 44; $i++) {
    $i = trim($i);
    if (!ctype_digit($i) or empty($i) or strlen($i) > 8) {
        continue;
    }
    validate::KOD($i);
    while (true) {
        if (!$_POST['no_' . $row . '_' . $column]) {
            break;
        } else {
            echo '<td></td>';
            column($column, $row);
            continue;
        }
    }
    $kod = str_pad($i, 8, '0', STR_PAD_LEFT);
    echo '<td style="padding-left: ' . margin($column % 4) . 'mm;">
<img src="data:image/gif;base64,' . base64_encode(kod($kod)) . '" alt=""><br>' . $kod . '
</td>
';
    column($column, $row);
开发者ID:Alambos,项目名称:books,代码行数:31,代码来源:generate_page.php

示例4: ibd

<?php

include './includes/std.php';
validate::KOD($_POST['kod'], FALSE);
$ibd = new ibd();
switch (validate::type($_POST['isn'])) {
    case 'ISBN':
        $szukaj1 = ksiazki::szukaj_ISBN($_POST['isn']);
        $szukaj2 = $ibd->szukaj_ISBN($_POST['isn']);
        break;
    case 'ISSN':
        $szukaj1 = ksiazki::szukaj_ISSN($_POST['isn']);
        $szukaj2 = $ibd->szukaj_ISSN($_POST['isn']);
        break;
}
$i = 0;
$title = 'Dodawanie książki';
include './design/top.php';
?>

<h3> Krok 2 - wybierz żądaną książkę </h3>

<?php 
gotowe::dodaj_lista($_POST['kod'], $szukaj1, $szukaj2);
include './design/bottom.php';
开发者ID:Alambos,项目名称:books,代码行数:25,代码来源:add_isbn.php

示例5:

<?php

include './includes/std.php';
validate::KOD($_GET['kod']);
$title = 'Historia wypożyczeń książki';
include './design/top.php';
gotowe::informacje($_GET['kod']);
gotowe::historia($_GET['kod']);
include './design/bottom.php';
开发者ID:Alambos,项目名称:books,代码行数:9,代码来源:borrow_history.php

示例6: explode

include './includes/std.php';
validate::MSC($_POST['regal'], $_POST['polka'], $_POST['rzad']);
$kody = explode("\n", $_POST['kody']);
$and = array('OR' => NULL);
foreach ($kody as $kod) {
    $kod = trim($kod);
    if (($pos = strpos($kod, '-')) !== FALSE) {
        $from = trim(substr($kod, 0, $pos));
        $to = trim(substr($kod, $pos + 1));
        validate::KOD($from);
        validate::KOD($to);
        for ($from = (int) $from; $from <= $to; $from++) {
            $and['id'][] = $from;
        }
    } elseif ($kod != '') {
        validate::KOD($kod);
        $and['id'][] = (int) $kod;
    }
}
ksiazki::miejsce($_POST['regal'], $_POST['polka'], $_POST['rzad'], $and);
$title = 'Położenie książki';
include 'design/top.php';
echo '<p>Ustalono położenie następujących książek:</p>

<ul>
';
foreach ($and['id'] as $kod) {
    echo '<li>' . $kod . '</li>' . "\n";
}
echo '</ul>';
include 'design/bottom.php';
开发者ID:Alambos,项目名称:books,代码行数:31,代码来源:place_set.php

示例7: ibd

<?php

include './includes/std.php';
validate::KOD($_POST['kod']);
list(, $szukaj1) = ksiazki::szukaj_info($_POST);
$ibd = new ibd();
$szukaj2 = $ibd->szukaj_info($_POST['tytul'], $_POST['autor'], $_POST['wydawnictwo']);
$i = 0;
$title = 'Dodawanie książki';
include './design/top.php';
?>

<h3> Krok 2 - wybierz żądaną książkę </h3>

<?php 
gotowe::dodaj_lista($_POST['kod'], $szukaj1, $szukaj2);
?>

<?php 
include './design/bottom.php';
开发者ID:Alambos,项目名称:books,代码行数:20,代码来源:add_search.php

示例8: szukaj_KOD

 static function szukaj_KOD($kod)
 {
     validate::KOD($kod, TRUE);
     return self::cache_get($kod);
 }
开发者ID:Alambos,项目名称:books,代码行数:5,代码来源:ksiazki.php


注:本文中的validate::KOD方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。