Beispiel #1
0
function runTypeBaseline($userid, $command)
{
    $run = runCheck($command);
    switch ($userid) {
        case 35:
            switch ($run) {
                case "reg":
                    return "Reg";
                    break;
                case "minireg":
                    return "MiniReg";
                    break;
                default:
                    return $run;
                    break;
            }
            break;
        case 30:
            switch ($run) {
                case "Smoke":
                    return "Smoke";
                    break;
                default:
                    return "Nothing";
                    break;
            }
            break;
        default:
            return "NoSmokeReg";
            break;
    }
}
Beispiel #2
0
            if (count($validation_errors) > 0) {
                // $errors  = '<div id="errorMsgs">';
                $errors .= '<p>' . $mod_strings['LBL_SITECFG_FIX_ERRORS'] . '</p><ul>';
                foreach ($validation_errors as $error) {
                    $errors .= '<li class="error">' . $error . '</li>';
                }
                $errors .= '</ul>';
                //</div>';
            }
        }
        echo $errors;
        return;
    }
    if (isset($_REQUEST['checkInstallSystem']) && $_REQUEST['checkInstallSystem']) {
        require_once 'install/installSystemCheck.php';
        echo runCheck($install_script, $mod_strings);
        return;
    }
    //if this is a DB Settings check, then just run the check and return,
    //this is an ajax call and there is no need for further processing
    if (isset($_REQUEST['checkDBSettings']) && $_REQUEST['checkDBSettings']) {
        require_once 'install/checkDBSettings.php';
        echo checkDBSettings();
        return;
    }
}
//maintaining the install_type if earlier set to custom
if (isset($_REQUEST['install_type']) && $_REQUEST['install_type'] == 'custom') {
    $_SESSION['install_type'] = $_REQUEST['install_type'];
}
//set the default settings into session
Beispiel #3
0
                    $tl = $ln;
                }
            }
            if (strpos($lines[$il], 'a href="') !== FALSE) {
                preg_match_all('#<a\\s.*?(?:href=[\'"](.*?)[\'"]).*?>#is', $lines[$il], $matches1);
                //http://stackoverflow.com/a/18898628
                $out[$x]['link'] = $matches1[1][0];
            }
            if (strpos($lines[$il], 'src="') !== FALSE) {
                preg_match_all('#<img\\s.*?(?:src=[\'"](.*?)[\'"]).*?>#is', $lines[$il], $matches2);
                //http://stackoverflow.com/a/18898628
                $out[$x]['image'] = $matches2[1][0];
            }
            $out[$x]['title'] = trim(strip_tags($lines[$tl]));
            $x2 = $tl + 1;
            $out[$x]['text'] = NULL;
            while ($x2 < count($lines)) {
                $out[$x]['text'] .= trim(strip_tags($lines[$x2]));
                $x2++;
            }
            $out[$x]['text'] = trim($out[$x]['text']);
            $out[$x]['date'] = 'Not yet collected';
            $x++;
        }
    }
    return $out;
}
$ourArr = runCheck('http://www.nottinghamshire.police.uk/appeals');
$ourArr = array_merge($ourArr, runCheck('http://www.nottinghamshire.police.uk/appeals?page=0,1'));
$ourArr = array_merge($ourArr, runCheck('http://www.nottinghamshire.police.uk/appeals?page=0,2'));
echo json_encode($ourArr, JSON_PRETTY_PRINT);