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


PHP get_std_save_message函数代码示例

本文整理汇总了PHP中get_std_save_message函数的典型用法代码示例。如果您正苦于以下问题:PHP get_std_save_message函数的具体用法?PHP get_std_save_message怎么用?PHP get_std_save_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: dhcpv6_apply_changes

function dhcpv6_apply_changes($dhcpdv6_enable_changed)
{
    $retval = 0;
    $retvaldhcp = 0;
    $retvaldns = 0;
    /* Stop DHCPv6 so we can cleanup leases */
    killbypid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid");
    // dhcp_clean_leases();
    /* dnsmasq_configure calls dhcpd_configure */
    /* no need to restart dhcpd twice */
    if (isset($config['dnsmasq']['enable']) && isset($config['dnsmasq']['regdhcpstatic'])) {
        $retvaldns = services_dnsmasq_configure();
        if ($retvaldns == 0) {
            clear_subsystem_dirty('hosts');
            clear_subsystem_dirty('staticmaps');
        }
    } else {
        if (isset($config['unbound']['enable']) && isset($config['unbound']['regdhcpstatic'])) {
            $retvaldns = services_unbound_configure();
            if ($retvaldns == 0) {
                clear_subsystem_dirty('unbound');
                clear_subsystem_dirty('staticmaps');
            }
        } else {
            $retvaldhcp = services_dhcpd_configure();
            if ($retvaldhcp == 0) {
                clear_subsystem_dirty('staticmaps');
            }
        }
    }
    if ($dhcpdv6_enable_changed) {
        $retvalfc = filter_configure();
    }
    if ($retvaldhcp == 1 || $retvaldns == 1 || $retvalfc == 1) {
        $retval = 1;
    }
    return get_std_save_message($retval);
}
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:38,代码来源:services_dhcpv6.php

示例2: explode

    $pconfig['active_interface'] = explode(",", $a_unboundcfg['active_interface']);
}
if (empty($a_unboundcfg['outgoing_interface'])) {
    $pconfig['outgoing_interface'] = array();
} else {
    $pconfig['outgoing_interface'] = explode(",", $a_unboundcfg['outgoing_interface']);
}
if (empty($a_unboundcfg['system_domain_local_zone_type'])) {
    $pconfig['system_domain_local_zone_type'] = "transparent";
} else {
    $pconfig['system_domain_local_zone_type'] = $a_unboundcfg['system_domain_local_zone_type'];
}
if ($_POST) {
    if ($_POST['apply']) {
        $retval = services_unbound_configure();
        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            clear_subsystem_dirty('unbound');
        }
        /* Update resolv.conf in case the interface bindings exclude localhost. */
        system_resolvconf_generate();
        /* Start or restart dhcpleases when it's necessary */
        system_dhcpleases_configure();
    } else {
        $pconfig = $_POST;
        unset($input_errors);
        if (isset($pconfig['enable']) && isset($config['dnsmasq']['enable'])) {
            if ($pconfig['port'] == $config['dnsmasq']['port']) {
                $input_errors[] = gettext("The DNS Forwarder is enabled using this port. Choose a non-conflicting port, or disable the DNS Forwarder.");
            }
        }
开发者ID:dirkx,项目名称:pfsense,代码行数:31,代码来源:services_unbound.php

示例3: clear_subsystem_dirty

                clear_subsystem_dirty('unbound');
            }
        } else {
            $retvaldhcp = services_dhcpd_configure();
            if ($retvaldhcp == 0) {
                clear_subsystem_dirty('staticmaps');
            }
        }
    }
    if ($dhcpd_enable_changed) {
        $retvalfc = filter_configure();
    }
    if ($retvaldhcp == 1 || $retvaldns == 1 || $retvalfc == 1) {
        $retval = 1;
    }
    $savemsg = get_std_save_message();
}
if ($act == "delpool") {
    if ($a_pools[$_GET['id']]) {
        unset($a_pools[$_GET['id']]);
        write_config();
        header("Location: services_dhcp.php?if={$if}");
        exit;
    }
}
if ($act == "del") {
    if ($a_maps[$_GET['id']]) {
        unset($a_maps[$_GET['id']]);
        write_config();
        if (isset($config['dhcpd'][$if]['enable'])) {
            mark_subsystem_dirty('staticmaps');
开发者ID:karawan,项目名称:core,代码行数:31,代码来源:services_dhcp.php

示例4: unset

        } else {
            unset($config['system']['disablesegmentationoffloading']);
        }
        if ($_POST['disablelargereceiveoffloading'] == "yes") {
            $config['system']['disablelargereceiveoffloading'] = true;
        } else {
            unset($config['system']['disablelargereceiveoffloading']);
        }
        setup_microcode();
        // Write out configuration (config.xml)
        write_config();
        // Set preferred protocol
        prefer_ipv4_or_ipv6();
        $retval = filter_configure();
        if (stristr($retval, "error") != true) {
            $savemsg = get_std_save_message(gettext($retval));
            $class = 'success';
        } else {
            $savemsg = gettext($retval);
            $class = 'warning';
        }
    }
}
$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Networking"));
include "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg, $class);
}
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:system_advanced_network.php

示例5: print_input_errors

?>
</span></a></li>
			</ul>
		</td>
	</tr>
	<tr>
		<td class="tabcont">
			<form action="interfaces_vlan.php" method="post">
				<?php 
if (!empty($input_errors)) {
    print_input_errors($input_errors);
}
?>
				<?php 
if (file_exists($d_sysrebootreqd_path)) {
    print_info_box(get_std_save_message(0));
}
?>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="20%" class="listhdrlr"><?php 
echo gettext("Virtual interface");
?>
</td>
						<td width="20%" class="listhdrr"><?php 
echo gettext("Physical interface");
?>
</td>
						<td width="5%" class="listhdrr"><?php 
echo gettext("VLAN tag");
?>
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:interfaces_vlan.php

示例6: gettext

            if (!isset($_POST['path_check']) && strpos($config['onebuttoninstaller']['storage_path'], "/mnt/") === false) {
                $input_errors[] = gettext("The common directory for all extensions MUST be set to a directory below <b>'/mnt/'</b> to prevent to loose the extensions after a reboot on embedded systems!");
            } else {
                if (!is_dir($config['onebuttoninstaller']['storage_path'])) {
                    mkdir($config['onebuttoninstaller']['storage_path'], 0775, true);
                }
                change_perms($_POST['storage_path']);
                $config['onebuttoninstaller']['path_check'] = isset($_POST['path_check']) ? true : false;
                $config['onebuttoninstaller']['re_install'] = isset($_POST['re_install']) ? true : false;
                $config['onebuttoninstaller']['auto_update'] = isset($_POST['auto_update']) ? true : false;
                $config['onebuttoninstaller']['show_beta'] = isset($_POST['show_beta']) ? true : false;
                $savemsg .= get_std_save_message(write_config()) . " ";
                require_once "{$config['onebuttoninstaller']['rootfolder']}onebuttoninstaller-start.php";
            }
        } else {
            $savemsg .= get_std_save_message(write_config()) . " ";
        }
    }
    // end of empty input_errors
}
$pconfig['enable'] = isset($config['onebuttoninstaller']['enable']) ? true : false;
$pconfig['storage_path'] = !empty($config['onebuttoninstaller']['storage_path']) ? $config['onebuttoninstaller']['storage_path'] : $g['media_path'];
$pconfig['path_check'] = isset($config['onebuttoninstaller']['path_check']) ? true : false;
$pconfig['re_install'] = isset($config['onebuttoninstaller']['re_install']) ? true : false;
$pconfig['auto_update'] = isset($config['onebuttoninstaller']['auto_update']) ? true : false;
$pconfig['show_beta'] = isset($config['onebuttoninstaller']['show_beta']) ? true : false;
$return_val = mwexec("fetch -o {$config['onebuttoninstaller']['rootfolder']}log/version.txt https://raw.github.com/crestAT/nas4free-onebuttoninstaller/master/onebuttoninstaller/version.txt", false);
if ($return_val == 0) {
    $server_version = exec("cat {$config['onebuttoninstaller']['rootfolder']}log/version.txt");
    if ($server_version != $config['onebuttoninstaller']['version']) {
        $savemsg .= sprintf(gettext("New extension version %s available, push '%s' button to install the new version!"), $server_version, gettext("Maintenance"));
开发者ID:crestAT,项目名称:nas4free-onebuttoninstaller,代码行数:31,代码来源:onebuttoninstaller-config.php

示例7: sprintf

    $min = 0;
    $a_timehour[sprintf("%02.2d%02.2d", $hour, $min)] = sprintf("%02.2d:%02.2d", $hour, $min);
}
$a_lifetime = array("0" => gettext("infinity"), "1w" => sprintf(gettext("%d week"), 1), "2w" => sprintf(gettext("%d weeks"), 2), "30d" => sprintf(gettext("%d days"), 30), "60d" => sprintf(gettext("%d days"), 60), "90d" => sprintf(gettext("%d days"), 90), "180d" => sprintf(gettext("%d days"), 180), "1y" => sprintf(gettext("%d year"), 1), "2y" => sprintf(gettext("%d years"), 2));
if ($_POST) {
    $pconfig = $_POST;
    if (isset($_POST['apply']) && $_POST['apply']) {
        $ret = array("output" => array(), "retval" => 0);
        if (!file_exists($d_sysrebootreqd_path)) {
            // Process notifications
            $ret = zfs_updatenotify_process("zfsautosnapshot", "zfsautosnapshot_process_updatenotification");
            config_lock();
            $ret['retval'] |= rc_update_service("autosnapshot");
            config_unlock();
        }
        $savemsg = get_std_save_message($ret['retval']);
        if ($ret['retval'] == 0) {
            updatenotify_delete("zfsautosnapshot");
            header("Location: disks_zfs_snapshot_auto.php");
            exit;
        }
        updatenotify_delete("zfsautosnapshot");
        $errormsg = implode("\n", $ret['output']);
    }
}
if (isset($_GET['act']) && $_GET['act'] === "del") {
    $autosnapshot = array();
    $autosnapshot['uuid'] = $_GET['uuid'];
    updatenotify_set("zfsautosnapshot", UPDATENOTIFY_MODE_DIRTY, serialize($autosnapshot));
    header("Location: disks_zfs_snapshot_auto.php");
    exit;
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:disks_zfs_snapshot_auto.php


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