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


PHP FormHandler::getPostValue方法代码示例

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


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

示例1: _parseEditMachineForm

function _parseEditMachineForm()
{
    $FH = new FormHandler("editMachineFH", $_POST);
    $name = $FH->getPostValue("name");
    $description = $FH->getPostValue("description");
    $enabled = $FH->getPostValue("shareEnabled") == "on" ? True : "";
    return array($name, $description, $enabled);
}
开发者ID:psyray,项目名称:mmc,代码行数:8,代码来源:edit.php

示例2: callPluginFunction

        break;
    case "edit":
        $mode = "edit";
        $title = _("Edit user");
        $activeItem = "index";
        $uid = $_GET["user"];
        $FH->setArr(getDetailedUser($uid));
        break;
    default:
        $mode = false;
        break;
}
$redirect = false;
// if data is sent
if ($_POST) {
    $uid = $FH->getPostValue('uid');
    /* Check sent data */
    $ret = callPluginFunction("verifInfo", array($FH, $mode));
    if (!$error && !isXMLRPCError()) {
        /* Add or edit user attributes */
        $ret = callPluginFunction("changeUser", array($FH, $mode));
        /* Primary group management */
        if ($FH->isUpdated("primary")) {
            $primaryGroup = getUserPrimaryGroup($uid);
            if ($FH->getValue("primary") != $primaryGroup) {
                /* Update the primary group */
                $ret = callPluginFunction("changeUserPrimaryGroup", array($uid, $FH->getValue("primary"), $primaryGroup));
                foreach ($ret as $plugin => $err) {
                    if ($err != 0 && $err != NULL) {
                        $result .= sprintf(_("Failed to change primary group in %s plugin"), $plugin) . "<br />";
                    }
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:edit.php

示例3: delFailoverConfig

if (isset($failoverConfig['secondary'])) {
    $show = true;
}
if ($_POST) {
    $result = "";
    $error = "";
    if ($FH->isUpdated("dhcp_failover") and $FH->getValue("dhcp_failover") == "off") {
        delFailoverConfig();
        delSecondaryServer();
        if (!isXMLRPCError()) {
            $result .= _T("Failover configuration disabled.") . "<br />";
        } else {
            $error .= _T("Failed to disable the failover configuration.") . "<br />";
        }
    }
    if ($FH->getPostValue("dhcp_failover") == "on") {
        if ($FH->isUpdated("secondary")) {
            updateSecondaryServer($FH->getValue("secondary"));
            if (!isXMLRPCError()) {
                $result .= _T(sprintf("%s set as the secondary DHCP server.", $FH->getValue("secondary"))) . "<br />";
                updateFailoverConfig($FH);
            } else {
                $error .= _T(sprintf("Failed to set %s as the secondary DHCP server.", $FH->getValue("secondary"))) . "<br />";
            }
        } else {
            if ($FH->isUpdated("secondaryIp") or $FH->isUpdated("primaryIp") or $FH->isUpdated("primaryPort") or $FH->isUpdated("secondaryPort") or $FH->isUpdated("delay") or $FH->isUpdated("update") or $FH->isUpdated("balance") or $FH->isUpdated("mclt") or $FH->isUpdated("split")) {
                updateFailoverConfig($FH);
            }
        }
    }
    // prepare the result popup
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:servicedhcpfailover.php

示例4: _parseForm

function _parseForm()
{
    $FH = new FormHandler("editSambaShareFH", $_POST);
    $shareName = $FH->getPostValue("shareName");
    $sharePath = $FH->getPostValue("sharePath");
    $shareDescription = $FH->getPostValue("shareDescription");
    $shareEnabled = $FH->getPostValue("shareEnabled") == "on" ? True : "";
    $shareGuest = $FH->getPostValue("shareGuest") == "on" ? True : "";
    $shareGroup = $FH->getPostValue($_POST["groupgroupsselected"]);
    $shareUser = $FH->getPostValue($_POST["userusersselected"]);
    if (!$shareGroup) {
        $shareGroup = array();
    } else {
        if ($shareGroup and !is_array($shareGroup)) {
            $shareGroup = array($shareGroup);
        }
    }
    if (!$shareUser) {
        $shareUser = array();
    } else {
        if ($shareUser and !is_array($shareUser)) {
            $shareUser = array($shareUser);
        }
    }
    return array($shareName, $sharePath, $shareDescription, $shareEnabled, $shareGuest, $shareGroup, $shareUser);
}
开发者ID:psyray,项目名称:mmc,代码行数:26,代码来源:edit.php

示例5: ValidatingForm

$p->setSideMenu($sidemenu);
$p->display();
$f = new ValidatingForm();
$f->push(new Table());
$f->add(new TrFormElement(_T("Alias name"), new MailInputTpl("mailalias")), array("value" => $FH->getArrayOrPostValue("mailalias"), "required" => true));
$checked = "checked";
if ($FH->getArrayOrPostValue("mailenable") != 'on' && $FH->getArrayOrPostValue("mailenable") != 'OK') {
    $checked = "";
}
$f->add(new TrFormElement(_T("Enabled", "mail"), new CheckboxTpl("mailenable")), array("value" => $checked));
/* LDAP Users */
$users = get_users();
$usersTpl = new MembersTpl("users");
$usersTpl->setTitle(_T("Alias users", "mail"), _T("All users", "mail"));
// get the alias users
if ($FH->getPostValue("users")) {
    $alias_users = $FH->getPostValue("users");
} else {
    if ($mode == 'edit') {
        $alias_users = getVAliasUsers($alias);
    } else {
        $alias_users = array();
    }
}
$member = array();
foreach ($alias_users as $user) {
    $member[$user] = $user;
}
// get all users
$available = array();
foreach ($users as $user) {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:edit.php

示例6: FormHandler

    $FH = new FormHandler("editPPolicyFH", $_POST);
} else {
    $FH = new FormHandler("editPPolicyFH", array());
}
if ($_GET["action"] == "addppolicy") {
    $mode = "add";
    $title = _T("Add a password policy", "ppolicy");
} else {
    $mode = "edit";
    $title = _T("Edit password policy", "ppolicy");
    $sidemenu->forceActiveItem("indexppolicy");
    $ppolicy = $_GET['ppolicy'];
    $FH->setArr(getAllPPolicyAttributes($ppolicy));
}
if ($_POST) {
    $name = $FH->getPostValue("cn");
    $desc = $FH->getPostValue("description");
    // Some sanity checks...
    if ($FH->isUpdated("pwdMaxAge") or $FH->isUpdated("pwdMinAge")) {
        $max = $FH->getPostValue("pwdMaxAge");
        $min = $FH->getPostValue("pwdMinAge");
        if ($min && $max && $min > $max) {
            $error .= _T('"Maximum age" must be greater than "Minimum age".', 'ppolicy') . "<br />";
            setFormError("pwdMinAge");
        }
    }
    if ($mode == "add") {
        if (!checkPPolicy($name)) {
            addPPolicy($name, $desc);
            if (!isXMLRPCError()) {
                $result .= _T(sprintf("Password policy %s created.", $name), "ppolicy") . "<br />";
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:edit.php


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