Example #1
0
    $continent = $_GET['selectcontinent'];
} else {
    $continent = $_GET['hiddencontinent'];
}
//echo $continent;
// Declaration des variable des fontions appelées
$getContinentByName = getContinentByName($pdo);
$nbCountriesByContinent = nbCountriesByContinent($pdo, $continent);
$nbPopulationByContinent = nbPopulationByContinent($pdo, $continent);
$totalAreaGlobal = totalAreaGlobal($pdo);
$totalAreaByContinent = totalAreaByContinent($pdo, $continent);
$areaRatio = round($totalAreaByContinent * 100 / $totalAreaGlobal, 2);
$mostpeopleIn = mostpeopleIn($pdo, $continent);
$averageLifeByContinent = averageLifeByContinent($pdo, $continent);
$AverageLife = round(AverageLife($pdo, $continent), 2);
$getCountryByName = getCountryByName($pdo, $continent);
$getCapitalbyCountry = getCapitalbyCountry($pdo, $codeCountry);
$getMostInhabitedcityByCountry = getMostInhabitedcityByCountry($pdo, $codeCountry);
$getNumberOfCity = count(getNumberOfCity($pdo, $codeCountry));
$OfficialLanguage = OfficialLanguage($pdo, $codeCountry);
$UnOfficialLanguage = UnOfficialLanguage($pdo, $codeCountry);
$GNP = GNP($pdo, $codeCountry);
//echo $areaRatio;
//echo '<pre>';
//print_r($totalAreaByContinent);
//echo '</pre>';
?>

<!DOCTYPE html>
<html>
<head>
Example #2
0
	public function setStateByName($stateName, $countryName = '')
	{
		if (!$countryName) {
			$countryName = $this->getCountryName();
		}

		$countryId = getCountryByName($countryName);
		$state = getStateInfoByName($stateName);
		if (!$state) {
			$this->state = array(
				'id' => 0,
				'iso2' => '',
				'name' => $stateName
			);
			$this->invalidateCachedTotals();
		}
		if ($state['statecountry'] == $countryId && $state['stateid'] != $this->state['id']) {
			$this->state = array(
				'id' => $state['stateid'],
				'name' => $state['statename'],
				'iso2' => $state['stateabbrv']
			);
			$this->invalidateCachedTotals();
		}
		return $this;
	}
Example #3
0
	public function convertMiscTaxSettings()
	{
		if($this->getPreUpgradeConfig('PricesIncludeTax') === null) {
			return true;
		}

		if($this->getPreUpgradeConfig('PricesIncludeTax')) {
			$GLOBALS['ISC_NEW_CFG']['taxEnteredWithPrices'] = TAX_PRICES_ENTERED_INCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayCatalog'] = TAX_PRICES_DISPLAY_INCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayProducts'] = TAX_PRICES_DISPLAY_INCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayCart'] = TAX_PRICES_DISPLAY_INCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayOrders'] = TAX_PRICES_DISPLAY_INCLUSIVE;
		}
		else {
			$GLOBALS['ISC_NEW_CFG']['taxEnteredWithPrices'] = TAX_PRICES_ENTERED_EXCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayCatalog'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayProducts'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayCart'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
			$GLOBALS['ISC_NEW_CFG']['taxDefaultTaxDisplayOrders'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
		}

		$GLOBALS['ISC_NEW_CFG']['taxDefaultCountry'] = getCountryByName(getConfig('CompanyCountry'));
		$GLOBALS['ISC_NEW_CFG']['taxDefaultState'] = getStateByName(getConfig('CompanyState'), $GLOBALS['ISC_NEW_CFG']['taxDefaultCountry']);
		$GLOBALS['ISC_NEW_CFG']['taxDefaultZipCode'] = getConfig('CompanyZip');

		$messages = array();
		if(!getClass('ISC_ADMIN_SETTINGS')->commitSettings($messages)) {
			foreach($messages as $message) {
				$this->setError($message);
			}
			return false;
		}

		return true;
	}