コード例 #1
0
}
// Admin logout
if ($do == "logout") {
    admin_logout();
}
$smarty->assign('username_post', htmlspecialchars(get_var('username')));
$smarty->assign('password_post', htmlspecialchars(get_var('password')));
$smarty->assign('login_post', get_var('login'));
// Check if logged in as admin
admin_check_login($error);
//session_write_close();
// Various admin checks
$result = $db->execute("\n\t\tSELECT arrowchat_themes.folder \n\t\tFROM arrowchat_themes\n\t\tWHERE arrowchat_themes.default = 1\n\t");
$row = $db->fetch_array($result);
$theme = $row['folder'];
$write = check_config_file();
$install = check_install_folder();
//*********Smarty Variables************
// Check if features are disabled to display message
$feature_disabled = "";
if ($chatrooms_on != 1 and $do == "chatroomsettings") {
    $feature_disabled = "Chatrooms";
}
if ($notifications_on != 1 and $do == "notificationsettings") {
    $feature_disabled = "Notifications";
}
if ($applications_on != 1 and $do == "appsettings") {
    $feature_disabled = "Applications";
}
if (!isset($_COOKIE['arrowchat_update_checked'])) {
    // Check if ArrowChat version is up-to-date
コード例 #2
0
$t_where[] = "config/{$config_file_namepart}";
// current_working_directory/config
if (($x = getenv('HOME')) !== false) {
    $t_where[] = "{$x}/{$config_file_namepart}";
}
// HOME
if ($x !== false) {
    $t_where[] = "{$x}/config/{$config_file_namepart}";
}
// HOME/config
$t_where[] = "/usr/local/YAK/yakpro-mtm/{$config_file_namepart}";
// /usr/local/YAK/yakpro-mtm
$t_where[] = "{$yakpro_po_dirname}/yakpro-mtm.cnf";
// source_code_directory/default_conf_filename
foreach ($t_where as $dummy => $where) {
    if (check_config_file($where)) {
        $config_filename = $where;
        break;
    }
}
$conf = new Config();
if ($force_conf_silent) {
    $conf->silent = true;
}
if ($config_filename == '') {
    fprintf(STDERR, "Warning:No config file found... using default values!%s", PHP_EOL);
} else {
    $config_filename = realpath($config_filename);
    if (!$conf->silent) {
        fprintf(STDERR, "Info:\tUsing [%s] Config File...%s", $config_filename, PHP_EOL);
    }
コード例 #3
0
        array_push($output, check_database_accessibility());
        break;
    case 'http_connectivity':
        array_push($output, check_http_connectivity());
        break;
    case 'https_connectivity':
        array_push($output, check_https_connectivity());
        break;
    case 'fulfillment_url_availability':
        array_push($output, check_fulfillment_url_availability());
        break;
    case 'cross_domain_access':
        array_push($output, check_cross_domain_access());
        break;
    case 'all':
        array_push($output, check_php_modules());
        array_push($output, check_config_file());
        array_push($output, check_database_accessibility());
        array_push($output, check_http_connectivity());
        array_push($output, check_https_connectivity());
        array_push($output, check_fulfillment_url_availability());
        array_push($output, check_cross_domain_access());
        break;
    default:
        $error = new Output('Checking post parameter:');
        $error->add_error_message('Invalid post value.');
        array_push($output, $error->get_results());
        break;
}
print_r(json_encode($output));
return;
コード例 #4
0
ファイル: single_job_setup.php プロジェクト: CalvinZhu/boinc
            error("Couldn't create dir: {$app_dir}");
        }
        $file = "{$app_dir}/{$app_name}" . "_1." . $i;
        if (!copy($wrapper_filename, $file)) {
            error("Couldn't copy {$wrapper_filename} to {$file}");
        }
        chmod($file, 0750);
        echo "- type 'bin/update_versions', and answer 'y' to all questions.\n";
    }
}
// make sure daemons are in the config file
//
function check_config_file()
{
    global $app_name, $platform;
    $config = file_get_contents('config.xml');
    if (!strstr($config, "single_job_assimilator")) {
        echo "- Add the following to the <daemons> section of config.xml:\n\n    <daemon>\n      <cmd>single_job_assimilator -app {$app_name}</cmd>\n      <output>single_job_assimilator_{$platform}.out</output>\n      <pid>single_job_assimilator_{$platform}.pid</pid>\n    </daemon>\n    <daemon>\n      <cmd>sample_trivial_validator -app {$app_name}</cmd>\n      <output>sample_trivial_validator_{$platform}.out</output>\n      <pid>sample_trivial_validator_{$platform}.pid</pid>\n    </daemon>\nThen restart your project by typing\nbin/stop\nbin/start\n    ";
    }
}
if ($argc != 2) {
    usage();
}
$boinc_samples_dir = $argv[1];
check_wrapper_exists();
get_includes();
add_application();
add_apps_dir();
create_app_dir();
check_config_file();
コード例 #5
0
ファイル: startup.php プロジェクト: urueedi/kazoo-provision
if ($model == "Yealink53i") {
    $model = "Yealink6753i";
}
if ($model == "Yealink55i") {
    $model = "Yealink6755i";
}
if ($model == "Yealink57i") {
    $model = "Yealink6757i";
}
if ($model == "Yealink39i") {
    $model = "Yealink6739i";
}
if (!$extension) {
    $extension = get_provision_state($mac);
}
$phone = check_config_file($mac);
if ($extension) {
    $userdata = get_userdata_from_sip($extension);
}
if ($debug) {
    error_log($_SERVER['SCRIPT_NAME'] . " INFO-1: mac=" . $mac . " ext=" . $extension . " ext=" . $username . " name={$name} pass={$password} model=" . $phone['model'] . " type=" . $phone['type'] . " lang=" . $language . " ip=" . $ip . " did=" . $did . " mobilecid=" . $mobilecid . "\n", 3, "/tmp/yealink_startup.log");
}
if ($prov_mode == 'none') {
    change_language($extension);
    $output = "<YealinkIPPhoneTextScreen LockIn=\"no\" destroyOnExit=\"yes\">\n";
    $output .= "<Title>" . _("Error Mode") . "</Title>\n";
    if ($_SERVER['SCRIPT_NAME'] == "/" . $amp_conf['AMPPROVWEBPATH'] . "/yealink/logout.php") {
        $output .= "<Text>" . _("Logout disallow") . ": {$prov_mode}</Text>\n";
    } elseif ($_SERVER['SCRIPT_NAME'] == "/" . $amp_conf['AMPPROVWEBPATH'] . "/yealink/startup.php") {
        $output .= "<Text>" . _("Login disallow") . ": {$prov_mode}</Text>\n";
    }