Exemplo n.º 1
0
function format_single($records, $loggedin_user)
{
    $out = '';
    foreach ($records as $rec) {
        // Display the title
        $out .= '<h2>' . get_basic_info($rec, $loggedin_user) . '</h2>';
        $out .= run_plugins('detail_above', $rec, $loggedin_user);
        // Display the main bulk of the record
        $out .= get_detail($rec, $loggedin_user);
        $out .= run_plugins('detail_below', $rec, $loggedin_user);
    }
    $ret = array('data' => $out, 'content_type' => 'text/html');
    return $ret;
}
Exemplo n.º 2
0
                        $config['system']['group'][$gidx]['member'] = array();
                    }
                    $config['system']['group'][$gidx]['member'][] = $userent['uid'];
                    break;
                }
            }
            $a_user[] = $userent;
        }
        /* Add user to groups so PHP can see the memberships properly or else the user's shell account does not get proper permissions (if applicable) See #5152. */
        local_user_set_groups($userent, $_POST['groups']);
        local_user_set($userent);
        /* Add user to groups again to ensure they are set everywhere, otherwise the user may not appear to be a member of the group. See commit:5372d26d9d25d751d16865ed9d46869d3b0ec5e1. */
        local_user_set_groups($userent, $_POST['groups']);
        write_config();
        if (is_dir("/etc/inc/privhooks")) {
            run_plugins("/etc/inc/privhooks");
        }
        conf_mount_ro();
        pfSenseHeader("system_usermanager.php");
    }
}
function build_priv_table()
{
    global $a_user, $id;
    $privhtml = '<div class="table-responsive">';
    $privhtml .= '<table class="table table-striped table-hover table-condensed">';
    $privhtml .= '<thead>';
    $privhtml .= '<tr>';
    $privhtml .= '<th>' . gettext('Inherited from') . '</th>';
    $privhtml .= '<th>' . gettext('Name') . '</th>';
    $privhtml .= '<th>' . gettext('Description') . '</th>';
Exemplo n.º 3
0
                 if ($sigchk == 2) {
                     $sig_warning = "Imaj dijital olarak imzalanmamış!";
                 } else {
                     if ($sigchk == 3 || $sigchk == 4) {
                         $sig_warning = "Imaj imza belirlemede hata ile karşılaşıldı!";
                     }
                 }
             }
             if (!verify_gzip_file("{$g['upload_path']}/firmware.tgz")) {
                 $input_errors[] = "Imaj dosyası bozuk!";
                 unlink("{$g['upload_path']}/firmware.tgz");
             }
         }
     }
 }
 run_plugins("/usr/local/pkg/firmware_upgrade");
 /* Check for input errors, firmware locks, warnings, then check for firmware if sig_override is set */
 if (!$input_errors && !file_exists($d_firmwarelock_path) && (!$sig_warning || $_POST['sig_override'])) {
     if (file_exists("{$g['upload_path']}/firmware.tgz")) {
         /* fire up the update script in the background */
         touch($d_firmwarelock_path);
         $savemsg = "Güncelleme yüklendi. Birazdan otomatik olarak yeniden başlatılacaktır.";
         if (stristr($_FILES['ulfile']['name'], "nanobsd") or $_POST['isnano'] == "yes") {
             mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade {$g['upload_path']}/firmware.tgz");
         } else {
             if (stristr($_FILES['ulfile']['name'], "bdiff")) {
                 mwexec_bg("/etc/rc.firmware delta_update {$g['upload_path']}/firmware.tgz");
             } else {
                 mwexec_bg("/etc/rc.firmware pfSenseupgrade {$g['upload_path']}/firmware.tgz");
             }
         }