本文整理汇总了PHP中validate::MSC方法的典型用法代码示例。如果您正苦于以下问题:PHP validate::MSC方法的具体用法?PHP validate::MSC怎么用?PHP validate::MSC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validate
的用法示例。
在下文中一共展示了validate::MSC方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
include './includes/std.php';
require_once 'includes/generate_html.php';
require_once 'includes/generate_code39.php';
echo GENERATE_STYLE;
echo '<table cellspacing="0">
<tr>';
$column = 0;
$row = 0;
foreach (explode("\n", $_POST['kody']) as $i) {
$i = trim($i);
if (empty($i)) {
continue;
}
$i = explode('/', $i);
validate::MSC($i[0], $i[1], $i[2]);
$i = $i[0] . '/' . $i[1] . '/' . $i[2];
while (true) {
if (!$_POST['no_' . $row . '_' . $column]) {
break;
} else {
echo '<td></td>';
column($column, $row);
continue;
}
}
echo '<td style="padding-left: ' . margin($column % 4) . 'mm;">
<img src="data:image/gif;base64,' . base64_encode(kod(str_replace('/', '$I', $i))) . '" alt=""><br>' . $i . '
</td>
';
column($column, $row);
示例2: explode
<?php
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";
}