• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP updatenotify_set函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: array

    $reqdfieldsn = array(gettext("Old password"), gettext("Password"), gettext("Password (confirmed)"));
    $reqdfieldst = explode(" ", "password password password");
    do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
    do_input_validation_type($_POST, $reqdfields, $reqdfieldsn, $reqdfieldst, $input_errors);
    // Validate old password.
    if ($_POST['password_old'] !== $a_user[$cnid]['password']) {
        $input_errors[] = gettext("The old password is not correct.");
    }
    // Validate new password.
    if ($_POST['password_new'] !== $_POST['password_confirm']) {
        $input_errors[] = gettext("The confimed password does not match. Please ensure the passwords match exactly.");
    }
    if (empty($input_errors)) {
        $a_user[$cnid]['password'] = $_POST['password_new'];
        write_config();
        updatenotify_set("userdb_user", UPDATENOTIFY_MODE_MODIFIED, $a_user[$cnid]['uuid']);
        // Write syslog entry and send an email to the administrator
        $message = sprintf("The user %s has changed his password via user portal.", Session::getUserName());
        write_log($message);
        if (0 == @email_validate_settings()) {
            $subject = sprintf(gettext("Notification email from host: %s"), system_get_hostname());
            @email_send($config['system']['email']['from'], $subject, $message, $error);
        }
        $savemsg = gettext("The administrator has been notified to apply your changes.");
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabcont">
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:userportal_system_password.php


示例2: header

        }
        header("Location: disks_raid_gvinum.php");
        exit;
    }
}
if (!is_array($config['gvinum']['vdisk'])) {
    $config['gvinum']['vdisk'] = array();
}
array_sort_key($config['gvinum']['vdisk'], "name");
$a_raid =& $config['gvinum']['vdisk'];
if ($_GET['act'] === "del") {
    unset($errormsg);
    if ($a_raid[$_GET['id']]) {
        // Check if disk is mounted.
        if (0 == disks_ismounted_ex($a_raid[$_GET['id']]['devicespecialfile'], "devicespecialfile")) {
            updatenotify_set("raid_gvinum", UPDATENOTIFY_MODE_DIRTY, $a_raid[$_GET['id']]['uuid']);
            header("Location: disks_raid_gvinum.php");
            exit;
        } else {
            $errormsg = sprintf(gettext("The RAID volume is currently mounted! Remove the <a href='%s'>mount point</a> first before proceeding."), "disks_mount.php");
        }
    }
}
function gvinum_process_updatenotification($mode, $data)
{
    global $config;
    $retval = 0;
    switch ($mode) {
        case UPDATENOTIFY_MODE_NEW:
            $retval |= disks_raid_gvinum_configure($data);
            break;
开发者ID:ZenaVault,项目名称:FreeNAS-Source,代码行数:31,代码来源:disks_raid_gvinum.php


示例3: do_input_validation_type

    do_input_validation_type($_POST, $reqdfields, $reqdfieldsn, $reqdfieldst, $input_errors);
    if (empty($input_errors)) {
        $iscsiinit = array();
        $iscsiinit['uuid'] = $_POST['uuid'];
        $iscsiinit['name'] = $_POST['name'];
        $iscsiinit['targetname'] = $_POST['targetname'];
        $iscsiinit['targetaddress'] = $_POST['targetaddress'];
        $iscsiinit['initiatorname'] = $_POST['initiatorname'];
        if (isset($uuid) && FALSE !== $cnid) {
            $a_iscsiinit[$cnid] = $iscsiinit;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_iscsiinit[] = $iscsiinit;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("iscsiinitiator", $mode, $iscsiinit['uuid']);
        write_config();
        header("Location: disks_manage_iscsi.php");
        exit;
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
    <td class="tabnavtbl">
      <ul id="tabnav">
      	<li class="tabinact"><a href="disks_manage.php"><span><?php 
echo gettext("Management");
?>
</span></a></li>
开发者ID:sdoney,项目名称:nas4free,代码行数:31,代码来源:disks_manage_iscsi_edit.php


示例4: get_std_save_message

    $savemsg = get_std_save_message($retval);
    if ($retval == 0) {
        updatenotify_delete("ftpd_mod_ban");
    }
}
if (!isset($config['ftpd']['mod_ban']['rule']) || !is_array($config['ftpd']['mod_ban']['rule'])) {
    $config['ftpd']['mod_ban']['rule'] = array();
}
$a_rule =& $config['ftpd']['mod_ban']['rule'];
if (isset($_GET['act']) && $_GET['act'] === "del") {
    if ($_GET['uuid'] === "all") {
        foreach ($a_rule as $rulek => $rulev) {
            updatenotify_set("ftpd_mod_ban", UPDATENOTIFY_MODE_DIRTY, $a_rule[$rulek]['uuid']);
        }
    } else {
        updatenotify_set("ftpd_mod_ban", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
    }
    header("Location: services_ftp_mod.php");
    exit;
}
function ftpd_mod_ban_process_updatenotification($mode, $data)
{
    global $config;
    $retval = 0;
    switch ($mode) {
        case UPDATENOTIFY_MODE_NEW:
        case UPDATENOTIFY_MODE_MODIFIED:
            break;
        case UPDATENOTIFY_MODE_DIRTY:
            if (is_array($config['ftpd']['mod_ban']['rule'])) {
                $index = array_search_ex($data, $config['ftpd']['mod_ban']['rule'], "uuid");
开发者ID:sdoney,项目名称:nas4free,代码行数:31,代码来源:services_ftp_mod.php


示例5: array

        }
    }
    if (empty($input_errors)) {
        $host = array();
        $host['uuid'] = $_POST['uuid'];
        $host['name'] = $_POST['name'];
        $host['address'] = $_POST['address'];
        $host['descr'] = $_POST['descr'];
        if (isset($uuid) && FALSE !== $cnid) {
            $a_hosts[$cnid] = $host;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_hosts[] = $host;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("hosts", $mode, $host['uuid']);
        write_config();
        header("Location: system_hosts.php");
        exit;
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="tabcont">
      <form action="system_hosts_edit.php" method="post" name="iform" id="iform">
      	<?php 
if (!empty($input_errors)) {
    print_input_errors($input_errors);
}
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:system_hosts_edit.php


示例6: updatenotify_set

        $raid['type'] = 1;
        $raid['device'] = $_POST['device'];
        $raid['desc'] = "Software gmirror RAID 1";
        $raid['devicespecialfile'] = "/dev/mirror/{$raid['name']}";
        if (isset($id) && $a_raid[$id]) {
            $a_raid[$id] = $raid;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_raid[] = $raid;
            if ($_POST['init']) {
                $mode = UPDATENOTIFY_MODE_NEW;
            } else {
                $mode = UPDATENOTIFY_MODE_MODIFIED;
            }
        }
        updatenotify_set("raid_gmirror", $mode, $raid['uuid']);
        write_config();
        header("Location: disks_raid_gmirror.php");
        exit;
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
		<td class="tabnavtbl">
		  <ul id="tabnav">
				<li class="tabinact"><a href="disks_raid_gconcat.php"><span><?php 
echo gettext("JBOD");
?>
</span></a></li>
开发者ID:ZenaVault,项目名称:FreeNAS-Source,代码行数:31,代码来源:disks_raid_gmirror_edit.php


示例7: array

    }
    if (!$input_errors) {
        $route = array();
        $route['uuid'] = $_POST['uuid'];
        $route['interface'] = $_POST['interface'];
        $route['network'] = $osn;
        $route['gateway'] = $_POST['gateway'];
        $route['descr'] = $_POST['descr'];
        if (isset($uuid) && FALSE !== $cnid) {
            $a_routes[$cnid] = $route;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_routes[] = $route;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("routes", $mode, $route['uuid']);
        write_config();
        header("Location: system_routes.php");
        exit;
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="tabcont">
      <form action="system_routes_edit.php" method="post" name="iform" id="iform">
      	<?php 
if ($input_errors) {
    print_input_errors($input_errors);
}
开发者ID:ZenaVault,项目名称:FreeNAS-Source,代码行数:31,代码来源:system_routes_edit.php


示例8: do_input_validation_type

    do_input_validation_type($_POST, $reqdfields, $reqdfieldsn, $reqdfieldst, $input_errors);
    if (empty($input_errors)) {
        $param = array();
        $param['enable'] = isset($_POST['enable']) ? true : false;
        $param['uuid'] = $_POST['uuid'];
        $param['name'] = $pconfig['name'];
        $param['value'] = $pconfig['value'];
        $param['comment'] = $pconfig['comment'];
        if (isset($uuid) && FALSE !== $index) {
            $loader_param_list[$index] = $param;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $loader_param_list[] = $param;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("loaderconf", $mode, $param['uuid']);
        write_config();
        header("Location: system_loaderconf.php");
        exit;
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
    <td class="tabnavtbl">
      <ul id="tabnav">
      	<li class="tabinact"><a href="system_advanced.php"><span><?php 
echo gettext("Advanced");
?>
</span></a></li>
开发者ID:sdoney,项目名称:nas4free,代码行数:31,代码来源:system_loaderconf_edit.php


示例9: array

    }
    if ($_POST['disks_rescan']) {
        $do_action = true;
        $disks_rescan = true;
    }
}
if (!isset($do_action)) {
    $do_action = false;
}
if (!is_array($config['disks']['disk'])) {
    $config['disks']['disk'] = array();
}
array_sort_key($config['disks']['disk'], "name");
$a_disk_conf =& $config['disks']['disk'];
if ($_GET['act'] === "del") {
    updatenotify_set("device", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
    header("Location: disks_manage.php");
    exit;
}
function diskmanagement_process_updatenotification($mode, $data)
{
    global $config;
    $retval = 0;
    switch ($mode) {
        case UPDATENOTIFY_MODE_NEW:
        case UPDATENOTIFY_MODE_MODIFIED:
            break;
        case UPDATENOTIFY_MODE_DIRTY:
            if (is_array($config['disks']['disk'])) {
                $index = array_search_ex($data, $config['disks']['disk'], "uuid");
                if (false !== $index) {
开发者ID:ZenaVault,项目名称:FreeNAS-Source,代码行数:31,代码来源:disks_manage.php


示例10: array

                            $cfg['geli']['vdisk'][$index]['fstype'] = 'zfs';
                        }
                    }
                }
            }
        }
        if (isset($_GET['zfs']['autosnapshots'])) {
            $pconfig['zfs']['autosnapshots'] = $_GET['zfs']['autosnapshots'];
        }
        if (isset($_POST['leave_autosnapshots'])) {
            $cfg['zfs']['autosnapshots'] = !empty($config['zfs']['autosnapshots']) ? $config['zfs']['autosnapshots'] : array();
        }
        $config['zfs'] = $cfg['zfs'];
        $config['disks'] = $cfg['disks'];
        $config['geli'] = $cfg['geli'];
        updatenotify_set('zfs_import_config', UPDATENOTIFY_MODE_UNKNOWN, true);
        write_config();
        header('Location: disks_zfs_config_current.php');
        exit;
    }
}
$health = true;
if (!empty($zfs['extra']) && !empty($zfs['extra']['pools']) && !empty($zfs['extra']['pools']['pool'])) {
    $health &= (bool) (!array_search_ex('DEGRADED', $zfs['extra']['pools']['pool'], 'health'));
    $health &= (bool) (!array_search_ex('FAULTED', $zfs['extra']['pools']['pool'], 'health'));
}
if (!$health) {
    $message_box_type = 'warning';
    $message_box_text = gettext('Your ZFS system is not healthy.');
    $message_box_text .= ' ';
    $message_box_text .= gettext('It is not recommanded to import non healthy pools nor virtual devices that are part of a non healthy pool.');
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:disks_zfs_config_sync.php


示例11: array

        }
    }
    if (empty($input_errors)) {
        $iscsitarget_ag = array();
        $iscsitarget_ag['uuid'] = $_POST['uuid'];
        $iscsitarget_ag['tag'] = $_POST['tag'];
        $iscsitarget_ag['comment'] = $_POST['comment'];
        $iscsitarget_ag['agauth'] = $auths;
        if (isset($uuid) && FALSE !== $cnid) {
            $a_iscsitarget_ag[$cnid] = $iscsitarget_ag;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_iscsitarget_ag[] = $iscsitarget_ag;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("iscsitarget_ag", $mode, $iscsitarget_ag['uuid']);
        write_config();
        header("Location: services_iscsitarget_ag.php");
        exit;
    }
}
function expand_ipv6addr($v6addr)
{
    if (strlen($v6addr) == 0) {
        return null;
    }
    $v6str = $v6addr;
    // IPv4 mapped address
    $pos = strpos($v6str, ".");
    if ($pos !== false) {
        $pos = strrpos($v6str, ":");
开发者ID:sdoney,项目名称:nas4free,代码行数:31,代码来源:services_iscsitarget_ag_edit.php


示例12: array

    if (empty($input_errors)) {
        $vdevice = array();
        $vdevice['uuid'] = $_POST['uuid'];
        $vdevice['name'] = $_POST['name'];
        $vdevice['type'] = $_POST['type'];
        $vdevice['device'] = $_POST['device'];
        $vdevice['aft4k'] = isset($_POST['aft4k']);
        $vdevice['desc'] = $_POST['desc'];
        if (isset($uuid) && FALSE !== $cnid) {
            $mode = UPDATENOTIFY_MODE_MODIFIED;
            $a_vdevice[$cnid] = $vdevice;
        } else {
            $mode = UPDATENOTIFY_MODE_NEW;
            $a_vdevice[] = $vdevice;
        }
        updatenotify_set("zfsvdev", $mode, $vdevice['uuid']);
        write_config();
        header("Location: disks_zfs_zpool_vdevice.php");
        exit;
    }
}
include "fbegin.inc";
?>
<script type="text/javascript">
<!--
function enable_change(enable_change) {
	document.iform.name.disabled = !enable_change;
	document.iform.type.disabled = !enable_change;
	document.iform.device.disabled = !enable_change;
	document.iform.aft4k.disabled = !enable_change;
}
开发者ID:BillTheBest,项目名称:OpenNAS,代码行数:31,代码来源:disks_zfs_zpool_vdevice_edit.php


示例13: array

            }
        }
    }
}
if (!is_array($config['system']['firewall']['rule'])) {
    $config['system']['firewall']['rule'] = array();
}
array_sort_key($config['system']['firewall']['rule'], "ruleno");
$a_rule =& $config['system']['firewall']['rule'];
if ($_GET['act'] === "del") {
    if ($_GET['uuid'] === "all") {
        foreach ($a_rule as $rulek => $rulev) {
            updatenotify_set("firewall", UPDATENOTIFY_MODE_DIRTY, $a_rule[$rulek]['uuid']);
        }
    } else {
        updatenotify_set("firewall", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
    }
    header("Location: system_firewall.php");
    exit;
}
function firewall_process_updatenotification($mode, $data)
{
    global $config;
    $retval = 0;
    switch ($mode) {
        case UPDATENOTIFY_MODE_NEW:
        case UPDATENOTIFY_MODE_MODIFIED:
            break;
        case UPDATENOTIFY_MODE_DIRTY:
            $cnid = array_search_ex($data, $config['system']['firewall']['rule'], "uuid");
            if (false !== $cnid) {
开发者ID:ZenaVault,项目名称:FreeNAS-Source,代码行数:31,代码来源:system_firewall.php


示例14: array

        }
    }
}
if (!isset($config['system']['hosts']) || !is_array($config['system']['hosts'])) {
    $config['system']['hosts'] = array();
}
if (!isset($config['system']['hostsacl']['rule']) || !is_array($config['system']['hostsacl']['rule'])) {
    $config['system']['hostsacl']['rule'] = array();
}
array_sort_key($config['system']['hosts'], "name");
$a_hosts = $config['system']['hosts'];
if (is_array($config['system']['hostsacl']['rule'])) {
    $pconfig['hostsacl'] = implode("\n", $config['system']['hostsacl']['rule']);
}
if (isset($_GET['act']) && $_GET['act'] === "del") {
    updatenotify_set("hosts", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
    header("Location: system_hosts.php");
    exit;
}
function hosts_process_updatenotification($mode, $data)
{
    global $config;
    $retval = 0;
    switch ($mode) {
        case UPDATENOTIFY_MODE_NEW:
        case UPDATENOTIFY_MODE_MODIFIED:
            break;
        case UPDATENOTIFY_MODE_DIRTY:
            $cnid = array_search_ex($data, $config['system']['hosts'], "uuid");
            if (FALSE !== $cnid) {
                unset($config['system']['hosts'][$cnid]);
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:system_hosts.php


示例15: isset

        $pooldata['uuid'] = $_POST['uuid'];
        $pooldata['name'] = $_POST['name'];
        $pooldata['vdevice'] = $_POST['vdevice'];
        $pooldata['root'] = $_POST['root'];
        $pooldata['mountpoint'] = $_POST['mountpoint'];
        $pooldata['force'] = isset($_POST['force']) ? true : false;
        $pooldata['hastpool'] = !empty($hastpool) ? true : false;
        $pooldata['desc'] = $_POST['desc'];
        if (isset($uuid) && FALSE !== $cnid) {
            $mode = UPDATENOTIFY_MODE_MODIFIED;
            $a_pool[$cnid] = $pooldata;
        } else {
            $mode = UPDATENOTIFY_MODE_NEW;
            $a_pool[] = $pooldata;
        }
        updatenotify_set("zfszpool", $mode, $pooldata['uuid']);
        write_config();
        header("Location: disks_zfs_zpool.php");
        exit;
    }
}
include "fbegin.inc";
?>
<script type="text/javascript">
<!--
function enable_change(enable_change) {
	document.iform.name.disabled = !enable_change;
	document.iform.vdevice.disabled = !enable_change;
	document.iform.root.disabled = !enable_change;
	//document.iform.mountpoint.disabled = !enable_change;
	document.iform.force.disabled = !enable_change;
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:disks_zfs_zpool_edit.php


示例16: do_input_validation_type

    do_input_validation_type($_POST, $reqdfields, $reqdfieldsn, $reqdfieldst, $input_errors);
    if (empty($input_errors)) {
        $param = array();
        $param['enable'] = isset($_POST['enable']) ? true : false;
        $param['uuid'] = $_POST['uuid'];
        $param['name'] = $pconfig['name'];
        $param['value'] = $pconfig['value'];
        $param['comment'] = $pconfig['comment'];
        if (isset($uuid) && FALSE !== $cnid) {
            $a_rcvar[$cnid] = $param;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_rcvar[] = $param;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("rcconf", $mode, $param['uuid']);
        write_config();
        header("Location: system_rcconf.php");
        exit;
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
    <td class="tabnavtbl">
      <ul id="tabnav">
      	<li class="tabinact"><a href="system_advanced.php"><span><?php 
echo gettext("Advanced");
?>
</span></a></li>
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:system_rcconf_edit.php


示例17: updatenotify_set

        $selftest['day'] = !empty($_POST['day']) ? $_POST['day'] : null;
        $selftest['month'] = !empty($_POST['month']) ? $_POST['month'] : null;
        $selftest['weekday'] = !empty($_POST['weekday']) ? $_POST['weekday'] : null;
        $selftest['all_hours'] = $_POST['all_hours'];
        $selftest['all_days'] = $_POST['all_days'];
        $selftest['all_months'] = $_POST['all_months'];
        $selftest['all_weekdays'] = $_POST['all_weekdays'];
        $selftest['desc'] = $_POST['desc'];
        if (isset($uuid) && FALSE !== $cnid) {
            $a_selftest[$cnid] = $selftest;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_selftest[] = $selftest;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("smartssd", $mode, $selftest['uuid']);
        write_config();
        header("Location: disks_manage_smart.php");
        exit;
    }
}
include "fbegin.inc";
?>
<script type="text/javascript">
<!--
function set_selected(name) {
	document.getElementsByName(name)[1].checked = true;
}

function enable_change(enable_change) {
	document.iform.disk.disabled = !enable_change;
开发者ID:sdoney,项目名称:nas4free,代码行数:31,代码来源:disks_manage_smart_edit.php


示例18: rc_update_service

            $retval |= rc_update_service("mdnsresponder");
            config_unlock();
        }
        $savemsg = get_std_save_message($retval);
        if ($retval == 0) {
            updatenotify_delete("rsyncd");
        }
    }
}
if (!isset($config['rsyncd']['module']) || !is_array($config['rsyncd']['module'])) {
    $config['rsyncd']['module'] = array();
}
array_sort_key($config['rsyncd']['module'], "name");
$a_module =& $config['rsyncd']['module'];
if (isset($_GET['act']) && $_GET['act'] === "del") {
    updatenotify_set("rsyncd", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
    header("Location: services_rsyncd_module.php");
    exit;
}
function rsyncd_process_updatenotification($mode, $data)
{
    global $config;
    $retval = 0;
    switch ($mode) {
        case UPDATENOTIFY_MODE_NEW:
        case UPDATENOTIFY_MODE_MODIFIED:
            break;
        case UPDATENOTIFY_MODE_DIRTY:
            $cnid = array_search_ex($data, $config['rsyncd']['module'], "uuid");
            if (FALSE !== $cnid) {
                unset($config['rsyncd']['module'][$cnid]);
开发者ID:sdoney,项目名称:nas4free,代码行数:31,代码来源:services_rsyncd_module.php


示例19: isset

        $disks['controller'] = $a_phy_disk[$devname]['controller'];
        $disks['controller_id'] = $a_phy_disk[$devname]['controller_id'];
        $disks['controller_desc'] = $a_phy_disk[$devname]['controller_desc'];
        $disks['smart']['devicefilepath'] = $a_phy_disk[$devname]['smart']['devicefilepath'];
        $disks['smart']['devicetype'] = $a_phy_disk[$devname]['smart']['devicetype'];
        $disks['smart']['devicetypearg'] = $a_phy_disk[$devname]['smart']['devicetypearg'];
        $disks['smart']['enable'] = isset($_POST['smart_enable']) ? true : false;
        $disks['smart']['extraoptions'] = $_POST['smart_extraoptions'];
        if (isset($uuid) && FALSE !== $cnid) {
            $a_disk[$cnid] = $disks;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_disk[] = $disks;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("device", $mode, $disks['uuid']);
        write_config();
        header("Location: disks_manage.php");
        exit;
    }
}
include "fbegin.inc";
?>
<script type="text/javascript">
<!--
function enable_change(enable_change) {
	document.iform.name.disabled = !enable_change;
	document.iform.fstype.disabled = !enable_change;
}

function smart_enable_change() {
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:disks_manage_edit.php


示例20: updatenotify_set

        $rule['src'] = $_POST['src'];
        $rule['srcport'] = $_POST['srcport'];
        $rule['dst'] = $_POST['dst'];
        $rule['dstport'] = $_POST['dstport'];
        $rule['direction'] = $_POST['direction'];
        $rule['if'] = $_POST['if'];
        $rule['extraoptions'] = $_POST['extraoptions'];
        $rule['desc'] = $_POST['desc'];
        if (isset($uuid) && FALSE !== $cnid) {
            $a_rule[$cnid] = $rule;
            $mode = UPDATENOTIFY_MODE_MODIFIED;
        } else {
            $a_rule[] = $rule;
            $mode = UPDATENOTIFY_MODE_NEW;
        }
        updatenotify_set("firewall", $mode, $rule['uuid']);
        write_config();
        header("Location: system_firewall.php");
        exit;
    }
}
// Get next rule number.
function get_next_rulenumber()
{
    global $config;
    // Set starting rule number
    $ruleno = 100;
    $a_rules = $config['system']['firewall']['rule'];
    if (false !== array_search_ex(strval($ruleno), $a_rules, "ruleno")) {
        do {
            $ruleno += 100;
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:system_firewall_edit.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP updatepost函数代码示例发布时间:2022-05-23
下一篇:
PHP updatenotify_process函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap