本文整理汇总了PHP中updatenotify_process函数的典型用法代码示例。如果您正苦于以下问题:PHP updatenotify_process函数的具体用法?PHP updatenotify_process怎么用?PHP updatenotify_process使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updatenotify_process函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Services"), gettext("iSCSI Target"), gettext("Target"));
$pconfig['enable'] = isset($config['iscsitarget']['enable']);
if ($_POST) {
$pconfig = $_POST;
//$config['iscsitarget']['enable'] = $_POST['enable'] ? true : false;
if (isset($_POST['apply']) && $_POST['apply']) {
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("iscsitarget_extent", "iscsitargetextent_process_updatenotification");
$retval |= updatenotify_process("iscsitarget_target", "iscsitargettarget_process_updatenotification");
config_lock();
$retval |= rc_update_reload_service("iscsi_target");
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
if (get_hast_role() != 'secondary') {
$savemsg .= "<br>";
$savemsg .= sprintf(gettext("The reloading request has been sent to the daemon. You can see the result by <a href=\"%s\">Log</a>."), "diag_log.php?log=2");
}
updatenotify_delete("iscsitarget_extent");
updatenotify_delete("iscsitarget_target");
}
}
}
示例2: array
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Services"), gettext("FTP"), gettext("Modules"));
$pconfig['mod_ban_enable'] = isset($config['ftpd']['mod_ban']['enable']);
if ($_POST) {
$pconfig = $_POST;
$config['ftpd']['mod_ban']['enable'] = isset($_POST['mod_ban_enable']) ? true : false;
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("ftpd_mod_ban", "ftpd_mod_ban_process_updatenotification");
config_lock();
$retval |= rc_update_service("proftpd");
config_unlock();
}
$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") {
示例3: TORT
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Disks"), gettext("Software RAID"), gettext("RAID 0/1/5"), gettext("Management"));
if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
// Process notifications
$retval = updatenotify_process("raid_gvinum", "gvinum_process_updatenotification");
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("raid_gvinum");
}
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") {
示例4: array
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Services"), gettext("Rsync"), gettext("Server"), gettext("Modules"));
if ($_POST) {
$pconfig = $_POST;
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("rsyncd", "rsyncd_process_updatenotification");
config_lock();
$retval |= rc_update_service("rsyncd");
$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");
示例5: array
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Disks"), gettext("Software RAID"), gettext("RAID1"), gettext("Management"));
if ($_POST) {
$pconfig = $_POST;
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
// Process notifications
$retval = updatenotify_process("raid_gmirror", "gmirror_process_updatenotification");
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("raid_gmirror");
}
header("Location: disks_raid_gmirror.php");
exit;
}
}
if (!isset($config['gmirror']['vdisk']) || !is_array($config['gmirror']['vdisk'])) {
$config['gmirror']['vdisk'] = array();
}
array_sort_key($config['gmirror']['vdisk'], "name");
$a_raid =& $config['gmirror']['vdisk'];
if (isset($_GET['act']) && $_GET['act'] === "del") {
示例6: DAMAGES
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Network"), gettext("Static routes"));
if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("routes", "routes_process_updatenotification");
$retval |= rc_start_service("routing");
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("routes");
}
}
}
if (!is_array($config['staticroutes']['route'])) {
$config['staticroutes']['route'] = array();
}
array_sort_key($config['staticroutes']['route'], "network");
$a_routes =& $config['staticroutes']['route'];
if ($_GET['act'] === "del") {
updatenotify_set("routes", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
示例7: DAMAGES
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Disks"), gettext("Management"));
if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("device", "diskmanagement_process_updatenotification");
config_lock();
$retval |= rc_update_service("ataidle");
$retval |= rc_update_service("smartd");
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("device");
}
header("Location: disks_manage.php");
exit;
}
if ($_POST['disks_rescan']) {
$do_action = true;
$disks_rescan = true;
示例8: isset
}
}
if (empty($input_errors)) {
$config['smartd']['enable'] = isset($_POST['enable']) ? true : false;
$config['smartd']['interval'] = $_POST['interval'];
$config['smartd']['powermode'] = $_POST['powermode'];
$config['smartd']['temp']['diff'] = $_POST['temp_diff'];
$config['smartd']['temp']['info'] = $_POST['temp_info'];
$config['smartd']['temp']['crit'] = $_POST['temp_crit'];
$config['smartd']['email']['enable'] = isset($_POST['email_enable']) ? true : false;
$config['smartd']['email']['to'] = !empty($_POST['email_to']) ? $_POST['email_to'] : "";
$config['smartd']['email']['testemail'] = isset($_POST['email_testemail']) ? true : false;
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("smartssd", "smartssd_process_updatenotification");
config_lock();
$retval |= rc_update_service("smartd");
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("smartssd");
}
}
}
if (!isset($config['disks']['disk']) || !is_array($config['disks']['disk'])) {
$config['disks']['disk'] = array();
}
if (!isset($config['smartd']['selftest']) || !is_array($config['smartd']['selftest'])) {
$config['smartd']['selftest'] = array();
示例9: array
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("loader.conf"));
if ($_POST) {
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
touch($d_sysrebootreqd_path);
}
$retval |= updatenotify_process("loaderconf", "loaderconf_process_updatenotification");
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("loaderconf");
}
}
}
if (!isset($config['system']['loaderconf']['param']) || !is_array($config['system']['loaderconf']['param'])) {
$config['system']['loaderconf']['param'] = array();
}
array_sort_key($config['system']['loaderconf']['param'], "name");
$loader_param_list =& $config['system']['loaderconf']['param'];
if (isset($_GET['act']) && $_GET['act'] === "del") {
if ($_GET['id'] === "all") {
foreach ($loader_param_list as $param_key => $param_value) {
updatenotify_set("loaderconf", UPDATENOTIFY_MODE_DIRTY, $loader_param_list[$param_key]['uuid']);
示例10: array
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Access"), gettext("Users"));
if ($_POST) {
$pconfig = $_POST;
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("userdb_user", "userdbuser_process_updatenotification");
config_lock();
$retval |= rc_exec_service("userdb");
$retval |= rc_exec_service("websrv_htpasswd");
$retval |= rc_exec_service("fmperm");
if (isset($config['samba']['enable'])) {
$retval |= rc_exec_service("passdb");
$retval |= rc_update_service("samba");
}
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("userdb_user");
}
}
示例11: array
require "auth.inc";
require "guiconfig.inc";
require "zfs.inc";
$pgtitle = array(gettext("Disks"), gettext("ZFS"), gettext("Volumes"), gettext("Volume"));
if (!isset($config['zfs']['volumes']['volume']) || !is_array($config['zfs']['volumes']['volume'])) {
$config['zfs']['volumes']['volume'] = array();
}
array_sort_key($config['zfs']['volumes']['volume'], "name");
$a_volume =& $config['zfs']['volumes']['volume'];
if ($_POST) {
$pconfig = $_POST;
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
// Process notifications
$retval |= updatenotify_process("zfsvolume", "zfsvolume_process_updatenotification");
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("zfsvolume");
}
header("Location: disks_zfs_volume.php");
exit;
}
}
if (isset($_GET['act']) && $_GET['act'] === "del") {
updatenotify_set("zfsvolume", UPDATENOTIFY_MODE_DIRTY, $_GET['uuid']);
header("Location: disks_zfs_volume.php");
exit;
}
function get_volsize($pool, $name)
示例12: array
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("sysctl.conf"));
if ($_POST) {
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("sysctl", "sysctl_process_updatenotification");
config_lock();
$retval |= rc_update_service("sysctl");
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("sysctl");
}
}
}
if (!isset($config['system']['sysctl']['param']) || !is_array($config['system']['sysctl']['param'])) {
$config['system']['sysctl']['param'] = array();
}
array_sort_key($config['system']['sysctl']['param'], "name");
$a_sysctlvar =& $config['system']['sysctl']['param'];
示例13: array
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("rc.conf"));
if ($_POST) {
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("rcconf", "rcconf_process_updatenotification");
config_lock();
$retval |= rc_exec_service("rcconf");
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("rcconf");
}
}
}
if (!isset($config['system']['rcconf']['param']) || !is_array($config['system']['rcconf']['param'])) {
$config['system']['rcconf']['param'] = array();
}
array_sort_key($config['system']['rcconf']['param'], "name");
$a_rcvar =& $config['system']['rcconf']['param'];
示例14: array
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the NAS4Free Project.
*/
require "auth.inc";
require "guiconfig.inc";
$pgtitle = array(gettext("Services"), gettext("Rsync"), gettext("Client"));
if ($_POST) {
$pconfig = $_POST;
if (isset($_POST['apply']) && $_POST['apply']) {
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("rsyncclient", "rsyncclient_process_updatenotification");
config_lock();
$retval |= rc_exec_service("rsync_client");
$retval |= rc_update_service("cron");
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("rsyncclient");
}
}
}
if (!isset($config['rsync']) || !is_array($config['rsync'])) {
$config['rsync'] = array();
if (!isset($config['rsync']['rsyncclient']) || !is_array($config['rsync']['rsyncclient'])) {
$config['rsync']['rsyncclient'] = array();
示例15: write_config
}
write_config();
header("Location: system_firewall.php");
exit;
}
} else {
$errormsg = sprintf("%s %s", gettext("Failed to upload file."), $g_file_upload_error[$_FILES['rulesfile']['error']]);
}
} else {
if ($_POST) {
$pconfig = $_POST;
$config['system']['firewall']['enable'] = $_POST['enable'] ? true : false;
write_config();
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
$retval |= updatenotify_process("firewall", "firewall_process_updatenotification");
config_lock();
$retval |= rc_update_service("ipfw");
config_unlock();
}
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
updatenotify_delete("firewall");
}
}
}
}
if (!is_array($config['system']['firewall']['rule'])) {
$config['system']['firewall']['rule'] = array();
}
array_sort_key($config['system']['firewall']['rule'], "ruleno");