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


PHP FormHandler::getValue方法代码示例

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


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

示例1: callPluginFunction

        $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 />";
                    }
                }
            }
        }
        /* Secondary groups management */
        if ($FH->isUpdated("secondary")) {
            $old = getUserSecondaryGroups($uid);
            $new = $FH->getValue('secondary');
            foreach (array_diff($old, $new) as $group) {
                del_member($group, $uid);
开发者ID:pulse-project,项目名称:pulse,代码行数:31,代码来源:edit.php

示例2: FormHandler

    $FH = new FormHandler("editAliasFH", array());
}
if ($_GET["action"] == "add") {
    $mode = "add";
    $title = _T("Add a virtual alias", "mail");
} else {
    $mode = "edit";
    $title = _T("Edit virtual alias", "mail");
    $sidemenu->forceActiveItem("index");
    $alias = $_GET['alias'];
    $FH->setArr(getVAlias($alias));
}
if ($_POST) {
    if ($mode == "add") {
        if ($FH->isUpdated("mailalias")) {
            addVAlias($FH->getValue("mailalias"));
            $alias = $FH->getValue("mailalias");
            $result .= _T("The virtual alias has been created.", "mail") . "<br />";
        } else {
            $error .= _T("The alias name is required.", "mail");
            setFormError("mailalias");
        }
    } else {
        if ($FH->isUpdated("mailalias")) {
            changeVAliasName($alias, $FH->getValue("mailalias"));
            $alias = $FH->getValue("mailalias");
            $result .= _T("Virtual alias name updated.", "mail") . "<br />";
        }
    }
    if (!$error && !isXMLRPCError()) {
        if ($FH->isUpdated("users")) {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:edit.php

示例3: getFailoverConfig

    } else {
        $error .= _T("Failed to update the failover configuration.") . "<br />";
    }
}
// get current configuration
$failoverConfig = getFailoverConfig();
$FH->setArr($failoverConfig);
// default values
$show = false;
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 {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:servicedhcpfailover.php

示例4: getPPolicyAttributesKeys

         if (!isXMLRPCError()) {
             $result .= _T(sprintf("Password policy %s created.", $name), "ppolicy") . "<br />";
         } else {
             $error .= _T(sprintf("Failed to create %s password policy.", $name), "ppolicy") . "<br />";
         }
     } else {
         $error .= _T(sprintf("Password policy %s already exists.", $name), "ppolicy") . "<br />";
     }
 }
 if (!$error && !isXMLRPCError()) {
     $ppolicyattr = getPPolicyAttributesKeys();
     $update = "";
     foreach ($ppolicyattr as $attr => $info) {
         /* foreach supported attributes */
         if ($FH->isUpdated($attr) && $info[1] == "bool") {
             if ($FH->getValue($attr) == "on") {
                 $value = "TRUE";
             }
             if ($FH->getValue($attr) == "off") {
                 $value = "FALSE";
             }
             setPPolicyAttribute($attr, $value, $name);
             $update .= "<li>" . $info[0] . "</li>";
         } else {
             if ($FH->isUpdated($attr)) {
                 setPPolicyAttribute($attr, $FH->getValue($attr), $name);
                 $update .= "<li>" . $info[0] . "</li>";
             }
         }
     }
     if ($update) {
开发者ID:sebastiendu,项目名称:mmc,代码行数:31,代码来源:edit.php


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