if (isset($idfInputs['timestep'])) { if (isDivisorOf($idfInputs['timestep'], 60)) { //valid } else { //invalid $idfInputs['timestep'] = 1; } } //Get city and state from the location, format: "city, state" $commaPos = strpos($location, ","); $city = substr($location, 0, $commaPos); $state = substr($location, $commaPos + 2); //Generate base model checkTypes($idfInputs); include 'paramGen.php'; $baseModel = generateModel($city, $state, $climate, $idfInputs); //Create energy spreadsheet if user entered values $uDataArray = array(); $energyFilledOut = completedInput($energyUsages); $gasFilledOut = completedInput($gasUsages); /* case 1: files only are provided combine files if they are compatible case 2: input only is provided combine both inputs case 3: files and input are provided combine if compatible, otherwise keep file compatible - both contain the same number of rows */ $dateTimeNeeded = true;
function ganerateFile($validation) { $data_result = array(); $DBName = (string) $this->db->database; $Sql = "SHOW TABLES FROM {$DBName}"; $TblName = $this->db->query($Sql); $Tbls = $TblName->result_array(); foreach ($Tbls as $Tbl) { //Get Table Name $Tbl = $Tbl['Tables_in_' . $DBName]; $data_result[$Tbl] = array(); //Create File ========================= generateModel($this->db, $Tbl); generateController($this->db, $Tbl, $validation); ////Create File ========================= } return $data_result; }