本文整理汇总了PHP中do_input_validation_type函数的典型用法代码示例。如果您正苦于以下问题:PHP do_input_validation_type函数的具体用法?PHP do_input_validation_type怎么用?PHP do_input_validation_type使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_input_validation_type函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
$pconfig['bpath'] = "";
$pconfig['bremoteaddr'] = "";
}
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
if (isset($_POST['Cancel']) && $_POST['Cancel']) {
header("Location: services_hast_resource.php");
exit;
}
// Input validation.
$reqdfields = explode(" ", "name aname bname apath bpath aremoteaddr bremoteaddr");
$reqdfieldsn = array(gettext("Resource name"), gettext("Node Name"), gettext("Node Name"), gettext("Path"), gettext("Path"), gettext("Node B IP address"), gettext("Node A IP address"));
$reqdfieldst = explode(" ", "alias string string string string string string");
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
do_input_validation_type($_POST, $reqdfields, $reqdfieldsn, $reqdfieldst, $input_errors);
if (empty($input_errors)) {
$resource = array();
$resource['uuid'] = $_POST['uuid'];
$resource['name'] = $_POST['name'];
$resource['aname'] = $_POST['aname'];
$resource['apath'] = $_POST['apath'];
$resource['aremoteaddr'] = $_POST['aremoteaddr'];
$resource['bname'] = $_POST['bname'];
$resource['bpath'] = $_POST['bpath'];
$resource['bremoteaddr'] = $_POST['bremoteaddr'];
unset($resource['auxparam']);
foreach (explode("\n", $_POST['auxparam']) as $auxparam) {
$auxparam = trim($auxparam, "\t\n\r");
if (!empty($auxparam)) {
$resource['auxparam'][] = $auxparam;
示例2: isset
$disks = $_POST['disks'];
$type = $_POST['type'];
$minspace = $_POST['minspace'];
$notinitmbr = isset($_POST['notinitmbr']) ? true : false;
$aft4k = isset($_POST['aft4k']) ? true : false;
$zfsgpt = isset($_POST['zfsgpt']) ? true : false;
$volumelabels = explode(" ", trim($_POST['volumelabels']));
// Input validation.
$reqdfields = explode(" ", "disks type");
$reqdfieldsn = array(gettext("Disk"), gettext("Type"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
foreach ($volumelabels as $volumelabel) {
$reqdfields = explode(" ", "volumelabel");
$reqdfieldsn = array(gettext("Volume label"));
$reqdfieldst = explode(" ", "alias");
do_input_validation_type(array('volumelabel' => $volumelabel), $reqdfields, $reqdfieldsn, $reqdfieldst, $input_errors);
}
if (count($volumelabels) > 1 && count($volumelabels) > count($disks)) {
$input_errors[] = gettext("Wrong number of argument for Volume label");
}
if (empty($input_errors)) {
$do_format = array();
if (count($disks) > 0) {
foreach ($disks as $key => $disk) {
$do_format[$key] = true;
// Check whether disk is mounted.
if (disks_ismounted_ex($disk, "devicespecialfile")) {
$errormsg = sprintf(gettext("The disk is currently mounted! <a href='%s'>Unmount</a> this disk first before proceeding."), "disks_mount_tools.php?disk={$disk}&action=umount");
$do_format[$key] = false;
}
// Check if user tries to format the OS disk.