} $out = ''; foreach ($method->getParameters() as $idx => $param) { $out .= '${' . ($idx + 2) . ':$' . $param->name . '},'; } return $method->name . '(' . substr($out, 0, -1) . ')${' . ($idx + 3) . '}'; } function createDisplayText($method) { if (empty($method->getParameters())) { return $method->name . '()'; } $out = array(); foreach ($method->getParameters() as $idx => $param) { $className = $param->getClass() ? $param->getClass()->getShortName() . ' ' : ''; $out[] = $className . '$' . $param->name; } return $method->name . '(' . implode($out, ', ') . ')'; } $methods = $properties = $constants = array(); foreach ($reflected->getMethods() as $method) { $methods[] = array('name' => createDisplayText($method), 'visibility' => visibility($method), 'snippet' => createSnippet($method), 'isStatic' => $method->isStatic(), 'type' => 'method'); } foreach ($reflected->getProperties() as $property) { $properties[] = array('name' => $property->name, 'visibility' => visibility($property), 'snippet' => $property->name . '${2}', 'isStatic' => $property->isStatic(), 'type' => 'property'); } foreach ($reflected->getConstants() as $name => $value) { $constants[] = array('name' => $name, 'type' => 'constant', 'snippet' => $name . '${2}'); } echo json_encode(array_merge($properties, $constants, $methods)); echo PHP_EOL;
} //_______Clech for errors_________ if ($error_count == 0) { $mysl_details = '<?php' . "\n" . '$config["hostname"] = "' . $database_host . '";' . "\n" . '$config["dbusername"] = "******";' . "\n" . '$config["dbpassword"] = "******";' . "\n" . '$config["dbname"] = "' . $database_name . '";' . "\n" . '?>'; $myFile = BASE_PATH . '/classes/mysql.inc.php'; @unlink($myFile); $fh = @fopen($myFile, 'wb'); @fwrite($fh, $mysl_details); @fclose($fh); if (!is_file($myFile)) { $notifications = 1; $notice = 'Error! Unable to create file - /classes/mysql.inc.php'; //error writing mysql.inc.php } else { //_________it worked - show details page___________ $visibility = visibility('details', $_SESSION['prescan_error']); //get the default settings $result = $dbase->SelectRecordLoop("SELECT * FROM general_settings"); //set the ffmpeg as found earlier $ffmpeg = $_SESSION['ffmpeg'] == '' ? '' : $_SESSION['ffmpeg']; $flvtool2 = $_SESSION['flvtool2'] == '' ? '' : $_SESSION['flvtool2']; $mencoder = $_SESSION['mencoder'] == '' ? '' : $_SESSION['mencoder']; $admin_username = '******'; $admin_email = ''; } } else { $notifications = 1; $notice = "Error! - Unable to connect to your Mysql database"; } } else { $error = $dbase->last_error;
$city = $_GET["city"]; $googleUrl .= $_GET["city"]; $googleUrl .= ","; } if (!empty($_GET["state"])) { $state = $_GET["state"]; $googleUrl .= $_GET["state"]; } if (!empty($_GET["degree"])) { $degree = $_GET["degree"]; } $temperature_unit = temperature($degree); $dewPoint_unit = temperature($degree); $windSpeed_unit = windSpeed($degree); $pressure_unit = pressure($degree); $visibility_unit = visibility($degree); $xml = simplexml_load_file($googleUrl) or die("Error: Cannot create object"); $status = $xml->status; $weather_data = new stdClass(); $weather_data->data = new stdClass(); $weather_data->data->units = new stdClass(); $weather_data->data->currently = new stdClass(); $weather_data->data->hourly = new stdClass(); $weather_data->data->daily = new stdClass(); if (strcmp($status, "OK") == 0) { $weather_data->hasError = false; $lat = $xml->result->geometry->location->lat; $lng = $xml->result->geometry->location->lng; $weather_data->data->lat = $lat; $weather_data->data->lng = $lng; $weather_data->data->units->temperature_unit = $temperature_unit;
include_once BASE_PATH . '/siteadmin/configbuilder.php'; $myFile = BASE_PATH . '/classes/settings.php'; @unlink($myFile); $fh = @fopen($myFile, 'wb'); //or $file = false; @fwrite($fh, $final) or $file = false; @fclose($fh); if (!is_file($myFile)) { $notifications = 1; $notice = "Error! - Unable to create settings file: {$myFile}"; } } //______________________________________________We have finished__________________________________________ if ($proceed) { setupRec(1); $visibility = visibility('finished', $_SESSION['prescan_error']); } } } else { //__________Show initial page_____________ $result = $dbase->SelectRecordLoop("SELECT * FROM general_settings"); $admin_username = '******'; $admin_email = ''; if (!$dbase->result_status) { $notifications = 1; $notice = "Mysql Error! - {$mysql_error}"; } } } else { //__________unable to connect to database_____________ $notifications = 1;
if ($_GET['step'] == 2) { //___Get Referrer url & add it to sessions____ if ($_SERVER['HTTP_REFERER'] == '') { $install_domain = siteBaseUrl(); $install_domain = str_replace('index.php?step=2', '', $install_domain); //just incase page refreshed } else { $install_domain = str_replace('setup/', '', $_SERVER['HTTP_REFERER']); $install_domain = str_replace('index.php?step=2', '', $install_domain); //just incase page refreshed } $_SESSION['install_url'] = $install_domain; //error array $error_array = array(); //___Set Welcome Visibility_____ $visibility = visibility('prechecks'); //____________________________________________________Check PHP Version_________________________________________________ $check_php = checksPHP(); //default if ($check_php['failed']) { $display_icon_php = 'Var-Check-Unknown'; $display_notes_php = 'Unable to check this item'; } else { $display_icon_php = 'Var-Check-Pass'; $display_notes_php = $check_php['results']; } //v5.3 now supported if ($check_php['is_53_above']) { $php_5_3 = true; } //ready warbing for 5.2.5
//check if dir's are already chmod $errors = 0; foreach ($dir_paths as $key => $value) { if (!is_writable(BASE_PATH . $value)) { $errors += 1; ${$key} = 'Var-Check-Fail'; //set css } else { ${$key} = 'Var-Check-Pass'; //set css } } if ($errors > 0) { if ($notifications != 1) { $notifications = 1; $notice = "Error! - Some files and folders are not CHMOD correctly"; } $visibility = visibility('chmod_ftp', $_SESSION['prescan_error']); } else { $visibility = visibility('chmod_passed', $_SESSION['prescan_error']); } //____visibility items put in vars)_____ foreach ($visibility as $key => $value) { ${$key} = $value; } //____Display View________________________ $TBS = new clsTinyButStrong(); $TBS->NoErr = true; $TBS->LoadTemplate(MAIN_TEMPLATE); $TBS->Render = TBS_OUTPUT; $TBS->Show();