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


PHP pfSenseHeader函数代码示例

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


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

示例1: exit

        $raid['desc'] = "Software graid5 RAID 5";
        $raid['fullname'] = "/dev/raid5/{$raid['name']}";
        if (isset($id) && $a_raid[$id]) {
            $a_raid[$id] = $raid;
        } else {
            $a_raid[] = $raid;
        }
        $fd = @fopen("{$d_raidconfdirty_path}", "a");
        if (!$fd) {
            echo "ERR Could not save RAID configuration.\n";
            exit(0);
        }
        fwrite($fd, "{$raid['name']}\n");
        fclose($fd);
        write_config();
        pfSenseHeader("disks_raid_graid5.php");
        exit;
    }
}
include "head.inc";
/* put your custom HTML head content here        */
/* using some of the $pfSenseHead function calls */
echo $pfSenseHead->getHTML();
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
<?php 
include "fbegin.inc";
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:disks_raid_graid5_edit.php

示例2: parse_package_templates

            }
            parse_package_templates();
            /* if start_command is defined, restart w/ this */
            if ($pkg['start_command'] != "") {
                exec($pkg['start_command'] . ">/dev/null 2&>1");
            }
            /* if restart_command is defined, restart w/ this */
            if ($pkg['restart_command'] != "") {
                exec($pkg['restart_command'] . ">/dev/null 2&>1");
            }
            if ($pkg['aftersaveredirect'] != "") {
                pfSenseHeader($pkg['aftersaveredirect']);
            } elseif (!$pkg['adddeleteeditpagefields']) {
                pfSenseHeader("pkg_edit.php?xml={$xml}&amp;id=0");
            } elseif (!$pkg['preoutput']) {
                pfSenseHeader("pkg.php?xml=" . $xml);
            }
            exit;
        } else {
            $get_from_post = true;
        }
    } elseif (!$input_errors) {
        exit;
    }
}
// Turn an embedded table into a bootstrap class table. This is for backward compatibility.
// We remove any table attributes in the XML and replace them with Bootstrap table classes
function bootstrapTable($text)
{
    $t = strpos($text, '<table') + strlen('<table');
    // Find the <table tag
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:pkg_edit.php

示例3: pfSenseHeader

if ($_GET['act'] == "delgroup") {
    if (!$a_group[$_GET['id']]) {
        pfSenseHeader("system_groupmanager.php");
        exit;
    }
    conf_mount_rw();
    local_group_del($a_group[$_GET['id']]);
    conf_mount_ro();
    $groupdeleted = $a_group[$_GET['id']]['name'];
    unset($a_group[$_GET['id']]);
    write_config();
    $savemsg = gettext("Group") . " {$groupdeleted} " . gettext("successfully deleted") . "<br />";
}
if ($_GET['act'] == "delpriv") {
    if (!$a_group[$_GET['id']]) {
        pfSenseHeader("system_groupmanager.php");
        exit;
    }
    $privdeleted = $priv_list[$a_group[$id]['priv'][$_GET['privid']]]['name'];
    unset($a_group[$id]['priv'][$_GET['privid']]);
    if (is_array($a_group[$id]['member'])) {
        foreach ($a_group[$id]['member'] as $uid) {
            $user = getUserEntryByUID($uid);
            if ($user) {
                local_user_set($user);
            }
        }
    }
    write_config();
    $_GET['act'] = "edit";
    $savemsg = gettext("Privilege") . " {$privdeleted} " . gettext("successfully deleted") . "<br />";
开发者ID:wcchandler,项目名称:pfsense,代码行数:31,代码来源:system_groupmanager.php

示例4: l2tp_users_sort

            $secretent = $a_secret[$id];
        }
        $secretent['name'] = $_POST['usernamefld'];
        $secretent['ip'] = $_POST['ip'];
        if ($_POST['passwordfld']) {
            $secretent['password'] = $_POST['passwordfld'];
        }
        if (isset($id) && $a_secret[$id]) {
            $a_secret[$id] = $secretent;
        } else {
            $a_secret[] = $secretent;
        }
        l2tp_users_sort();
        write_config();
        $retval = vpn_l2tp_configure();
        pfSenseHeader("vpn_l2tp_users.php");
        exit;
    }
}
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
<?php 
include "fbegin.inc";
?>

<?php 
开发者ID:mtisza,项目名称:pfsense,代码行数:31,代码来源:vpn_l2tp_users_edit.php

示例5: array

    $config['openvpn']['openvpn-csc'] = array();
}
$a_csc =& $config['openvpn']['openvpn-csc'];
if (is_numericint($_GET['id'])) {
    $id = $_GET['id'];
}
if (isset($_POST['id']) && is_numericint($_POST['id'])) {
    $id = $_POST['id'];
}
$act = $_GET['act'];
if (isset($_POST['act'])) {
    $act = $_POST['act'];
}
if ($_GET['act'] == "del") {
    if (!$a_csc[$id]) {
        pfSenseHeader("vpn_openvpn_csc.php");
        exit;
    }
    openvpn_delete_csc($a_csc[$id]);
    unset($a_csc[$id]);
    write_config();
    $savemsg = gettext("Client Specific Override successfully deleted");
}
if ($_GET['act'] == "edit") {
    if (isset($id) && $a_csc[$id]) {
        $pconfig['server_list'] = explode(",", $a_csc[$id]['server_list']);
        $pconfig['custom_options'] = $a_csc[$id]['custom_options'];
        $pconfig['disable'] = isset($a_csc[$id]['disable']);
        $pconfig['common_name'] = $a_csc[$id]['common_name'];
        $pconfig['block'] = $a_csc[$id]['block'];
        $pconfig['description'] = $a_csc[$id]['description'];
开发者ID:ajiwo,项目名称:pfsense,代码行数:31,代码来源:vpn_openvpn_csc.php

示例6: input_errors2Ajax

    }
    /* if this is an AJAX caller then handle via JSON */
    if (isAjax() && is_array($input_errors)) {
        input_errors2Ajax($input_errors);
        exit;
    }
    if (!$input_errors) {
        /* No errors detected, so update the config */
    }
}
if ($_GET['act'] == "del") {
    if ($a_disk_conf[$_GET['id']]) {
        unset($a_disk_conf[$_GET['id']]);
        write_config();
        touch($d_diskdirty_path);
        pfSenseHeader("disks_manage.php");
        exit;
    }
}
/* if ajax is calling, give them an update message */
if (isAjax()) {
    print_info_box_np($savemsg);
}
include "head.inc";
/* put your custom HTML head content here        */
/* using some of the $pfSenseHead function calls */
echo $pfSenseHead->getHTML();
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:disks_manage.php

示例7: unset

     $config['notifications']['smtp']['authentication_mechanism'] = $_POST['smtpauthmech'];
     $config['notifications']['smtp']['fromaddress'] = $_POST['smtpfromaddress'];
     if ($_POST['disable_smtp'] == "yes") {
         $config['notifications']['smtp']['disable'] = true;
     } else {
         unset($config['notifications']['smtp']['disable']);
     }
     // System Sounds
     if ($_POST['disablebeep'] == "yes") {
         $config['system']['disablebeep'] = true;
     } else {
         unset($config['system']['disablebeep']);
     }
     if (!$input_errors) {
         write_config();
         pfSenseHeader("system_advanced_notifications.php");
         return;
     }
 }
 if (isset($_POST['test-growl'])) {
     // Send test message via growl
     if ($config['notifications']['growl']['ipaddress'] && ($config['notifications']['growl']['password'] = $_POST['password'])) {
         unlink_if_exists($g['vardb_path'] . "/growlnotices_lastmsg.txt");
         register_via_growl();
         notify_via_growl(sprintf(gettext("This is a test message from %s.  It is safe to ignore this message."), $g['product_name']), true);
     }
 }
 if (isset($_POST['test-smtp'])) {
     // Send test message via smtp
     if (file_exists("/var/db/notices_lastmsg.txt")) {
         unlink("/var/db/notices_lastmsg.txt");
开发者ID:sjourdois,项目名称:pfsense,代码行数:31,代码来源:system_advanced_notifications.php

示例8: get_std_save_message

        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            if (file_exists($d_raidconfdirty_path)) {
                unlink($d_raidconfdirty_path);
            }
        }
    }
}
if ($_GET['act'] == "del") {
    if ($a_raid[$_GET['id']]) {
        $raidname = $a_raid[$_GET['id']]['name'];
        disks_raid_gvinum_delete($raidname);
        unset($a_raid[$_GET['id']]);
        write_config();
        touch($d_raidconfdirty_path);
        pfSenseHeader("disks_raid_gvinum.php");
        exit;
    }
}
include "head.inc";
/* put your custom HTML head content here        */
/* using some of the $pfSenseHead function calls */
echo $pfSenseHead->getHTML();
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
<?php 
include "fbegin.inc";
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:disks_raid_gvinum.php

示例9: get_std_save_message

        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            if (file_exists($d_raidconfdirty_path)) {
                unlink($d_raidconfdirty_path);
            }
        }
    }
}
if ($_GET['act'] == "del") {
    if ($a_raid[$_GET['id']]) {
        $raidname = $a_raid[$_GET['id']]['name'];
        disks_raid_gmirror_delete($raidname);
        unset($a_raid[$_GET['id']]);
        write_config();
        touch($d_raidconfdirty_path);
        pfSenseHeader("disks_raid_gmirror.php");
        exit;
    }
}
include "head.inc";
/* put your custom HTML head content here        */
/* using some of the $pfSenseHead function calls */
echo $pfSenseHead->getHTML();
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
<?php 
include "fbegin.inc";
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:disks_raid_gmirror.php

示例10: array

                $a_acls[$id]['aclid'] = $id;
            }
            if (isset($id) && $a_acls[$id]) {
                $a_acls[$id]['aclid'] = $pconfig['aclid'];
                $a_acls[$id]['aclname'] = $pconfig['aclname'];
                $a_acls[$id]['aclaction'] = $pconfig['aclaction'];
                $a_acls[$id]['description'] = $pconfig['description'];
                $a_acls[$id]['row'] = array();
                foreach ($networkacl as $acl) {
                    $a_acls[$id]['row'][] = $acl;
                }
                write_config();
                mark_subsystem_dirty("unbound");
                //unbound_reconfigure();
            }
            pfSenseHeader("/unbound_acls.php");
            exit;
        }
        if ($pconfig['apply']) {
            clear_subsystem_dirty("unbound");
            $retval = 0;
            $retval = unbound_reconfigure();
            $savemsg = get_std_save_message($retval);
        }
    }
}
$pgtitle = "Services: Unbound DNS Forwarder: Access Lists";
include "head.inc";
?>

<script type="text/javascript" src="/javascript/row_helper.js">
开发者ID:nagyrobi,项目名称:pfsense-packages,代码行数:31,代码来源:unbound_acls.php

示例11: input_errors2Ajax

    if (isAjax() && is_array($error_bucket)) {
        input_errors2Ajax(NULL, $error_bucket);
        exit;
    }
    if (!$input_errors) {
        /* TODO: This logic needs to be tested! */
        if ($_POST['browseable'] == gettext("No")) {
            $freenas_config['samba']['hidemount'] = array_merge($freenas_config['samba']['hidemount'], array($freenas_config['mounts']['mount'][$id]['sharename']));
        } else {
            if (is_array($freenas_config['samba']['hidemount']) && in_array($freenas_config['mounts']['mount'][$id]['sharename'], $freenas_config['samba']['hidemount'])) {
                $freenas_config['samba']['hidemount'] = array_diff($freenas_config['samba']['hidemount'], array($freenas_config['mounts']['mount'][$id]['sharename']));
            }
        }
        touch($d_smbshareconfdirty_path);
        write_config();
        pfSenseHeader("services_samba_share.php");
        exit;
    }
}
include "head.inc";
/* put your custom HTML head content here        */
/* using some of the $pfSenseHead function calls */
echo $pfSenseHead->getHTML();
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
<?php 
include "fbegin.inc";
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:services_samba_share_edit.php

示例12: explode

    /* input validation */
    $reqdfields = explode(" ", "session_timeout");
    $reqdfieldsn = explode(",", "Session Timeout");
    do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
    if ($_POST['session_timeout'] != "" && !is_numeric($_POST['session_timeout'])) {
        $input_errors[] = gettext("Session timeout must be an integer with value 0 or greater.");
    }
    /* if this is an AJAX caller then handle via JSON */
    if (isAjax() && is_array($input_errors)) {
        input_errors2Ajax($input_errors);
        exit;
    }
    if (!$input_errors) {
        $pconfig['session_timeout'] = $_POST['session_timeout'];
        write_config();
        pfSenseHeader("system_usermanager_settings.php");
    }
}
include "head.inc";
echo $pfSenseHead->getHTML();
?>

<body link="#000000" vlink="#000000" alink="#000000" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
<?php 
include "fbegin.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
开发者ID:nagyrobi,项目名称:pfsense-packages,代码行数:31,代码来源:system_usermanager_settings.php

示例13: array

    }
    if (!$input_errors) {
        if (!is_array($pconfig['sysprivs'])) {
            $pconfig['sysprivs'] = array();
        }
        if (!count($a_user['priv'])) {
            $a_user['priv'] = $pconfig['sysprivs'];
        } else {
            $a_user['priv'] = array_merge($a_user['priv'], $pconfig['sysprivs']);
        }
        $a_user['priv'] = sort_user_privs($a_user['priv']);
        local_user_set($a_user);
        $retval = write_config();
        $savemsg = get_std_save_message($retval);
        conf_mount_ro();
        pfSenseHeader("system_usermanager.php?act=edit&id={$userid}");
        exit;
    }
    conf_mount_ro();
}
/* if ajax is calling, give them an update message */
if (isAjax()) {
    print_info_box_np($savemsg);
}
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
开发者ID:OptimWIFI,项目名称:pfsense,代码行数:31,代码来源:system_usermanager_addprivs.php

示例14: array

    POSSIBILITY OF SUCH DAMAGE.
*/
/* ========================================================================== */
$pgtitle = array(gettext("Diagnostics"), gettext("System logs"), gettext("Daemon"));
require_once "freenas_config.inc";
require_once "guiconfig.inc";
require_once "freenas_guiconfig.inc";
require_once "freenas_functions.inc";
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
    $nentries = 50;
}
if ($_POST['clear']) {
    exec("/usr/sbin/clog -i -s 262144 /var/log/daemon.log");
    /* redirect to avoid reposting form data on refresh */
    pfSenseHeader("diag_fn_logs_daemon.php");
    exit;
}
/* if ajax is calling, give them an update message */
if (isAjax()) {
    print_info_box_np($savemsg);
}
include "head.inc";
/* put your custom HTML head content here        */
/* using some of the $pfSenseHead function calls */
echo $pfSenseHead->getHTML();
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC" onload="<?php 
echo $jsevents["body"]["onload"];
?>
">
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:diag_fn_logs_daemon.php

示例15: array

}

$id = $_GET['id'];
if (isset($_POST['id']))
	$id = $_POST['id'];

$act = $_GET['act'];
if (isset($_POST['act']))
	$act = $_POST['act'];

$error = false;

if(($act == "skconf") || ($act == "skzipconf")) {
	$srvid = $_GET['srvid'];
	if (($srvid === false) || ($config['openvpn']['openvpn-server'][$srvid]['mode'] != "p2p_shared_key")) {
		pfSenseHeader("vpn_openvpn_export.php");
		exit;
	}

	if (empty($_GET['useaddr'])) {
		$error = true;
		$input_errors[] = "You need to specify an IP or hostname.";
	} else
		$useaddr = $_GET['useaddr'];

	$proxy = "";
	if (!empty($_GET['proxy_addr']) || !empty($_GET['proxy_port'])) {
		$proxy = array();
		if (empty($_GET['proxy_addr'])) {
			$error = true;
			$input_errors[] = "You need to specify an address for the proxy port.";
开发者ID:nagyrobi,项目名称:pfsense-packages,代码行数:31,代码来源:vpn_openvpn_export_shared.php


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