include("./functions.php");
require_once './Mobile_Detect.php'; $detect = new Mobile_Detect;
$remoteRoot = "//www.mobicoo.com/";
// $remoteRoot = "//te.developer2.xyz/";
$remoteRootAll = "https:{$remoteRoot}";// mobicoo olduğunda https eklenmeli
// $localRoot = "/siteler/json_project_test/";
$localRoot = "//{$_SERVER['SERVER_NAME']}/";
define("ROOT_DIR", "{$localRoot}", true);
define("REMOTE_ROOT", "{$remoteRoot}", true);
//echo "
ROOT_DIR: " . ROOT_DIR;
define("DOMAIN", "asepaslanmaz.com", true);
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
//echo "
ABSPATH: " . ABSPATH;
$domainEncode = base64_encode(DOMAIN);
// echo "domainEncode: {$domainEncode}";
//echo "
***********JSON data Start************";
$jsonUploadRoot = "{$remoteRootAll}";
$jsonUploadDir = "{$jsonUploadRoot}web_files/{$domainEncode}/data.json";
$jsonUploadLocalDir = "./pw-includes/web_files/data.json";
$jsonDataRead = new jsonDataReadRemote($jsonUploadDir);
//$jsonDataRead = new jsonDataReadRemote($jsonUploadLocalDir);
$jsonBakimModu = $jsonDataRead -> jsonVeriCek('bakimModu');
/** Bu kısım daha sonra açılacak */
//$jsonBakimModu = 1;
// echo "
jsonDataBakimModu: {$jsonBakimModu}";
if(($jsonBakimModu == 1 || !is_file($jsonUploadLocalDir)) && 1==2):
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $jsonUploadDir);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$sonuc = curl_exec($ch);
curl_close($ch);
file_put_contents($jsonUploadLocalDir, $sonuc);
/**/
$jsonDataRead = new jsonDataRead($jsonUploadLocalDir);
else:
$jsonDataRead = new jsonDataRead($jsonUploadDir);
endif;
/**
* templatePage değeri ile;
* --> json dosyasında yer alan ve listeleyebileceğim sayfaların bilgileri saklanıyor
*/
$templatePage = $jsonDataRead -> templatePage;
$templatePageName = $jsonDataRead -> templatePageName;
// echo "
templatePage: ";print_r($templatePage);
// echo "
templatePageName: ";print_r($templatePageName);
$jsonDataDomain = $jsonDataRead -> jsonVeriCek('domain');
// echo "
jsonDataDomain: {$jsonDataDomain}";
$tema = "tema{$jsonDataRead -> jsonVeriCek('tema')}";
$tema = "tema46";
//echo "
jsonDataTema: {$tema}";
$versiyon = "versiyon{$jsonDataRead -> jsonVeriCek('versiyon')}";
$versiyon = "versiyon48";
//echo "
jsonDataVersiyon: {$versiyon}";
$langNames = $jsonDataRead -> langNames;
$defaultLang = $jsonDataRead -> defaultLang;
$defaultLangName = $langNames[$defaultLang];
// echo "
defaultLangName: ";print_r($defaultLangName);
define("DEFAULT_LANG", "{$defaultLangName}", true);
$dil = $jsonDataRead -> jsonVeriCek('dil');
// echo "
langReturn: ";print_r($dil);
define("TEMA", "{$tema}", true);
define("VERSIYON", "{$versiyon}", true);
define("TARGET_DIR", ROOT_DIR . "pw-content/" . TEMA ."/". VERSIYON ."/", true);
//echo "
TARGET_DIR: " . TARGET_DIR ;
define("TARGET_DIR_ALL", ABSPATH . "pw-content/" . TEMA ."/". VERSIYON ."/", true);
//echo "
TARGET_DIR_ALL: " . TARGET_DIR_ALL ;
//echo "
***********JSON data End************
";
$tagTemplateAll = getTagTemplate();
$tag = $tagTemplateAll['tag'];
$tagTemplate = $tagTemplateAll['tagTemplate'];
$tagTemplatePage = $tagTemplateAll['page'];
$rootPage = $tagTemplateAll['rootPage'];
$langChar = $tagTemplateAll['langChar'];
$requestUri = $tagTemplateAll['requestUri'];
define("LANG_CHAR", "{$langChar}", true);
// echo "
tagTemplateAll: ";print_r($tagTemplateAll);
// echo "
langControl: ".langControl($langChar)." | langChar: ".LANG_CHAR;
$seo_uzaklik = TARGET_DIR;
$link_uzaklik = ROOT_DIR;
$root_uzaklik = ROOT_DIR;
if(isset($dil[$langChar]))
define("LANG", $dil[$langChar], true);
else
define("LANG", $dil[DEFAULT_LANG], true);
$langId = LANG;
// echo "
tag: {$tag} | template: {$tagTemplate} | page: {$tagTemplatePage} | rootPage: {$rootPage} | langId: {$langId} | langChar: {$langChar} | url: {$requestUri}";
$PW_Query = new PW_Query($tag, $tagTemplate, $tagTemplatePage, $jsonDataRead);
//////////////////////////////////////////// Kullaniciya ozel parametreler //////////////////////////////////////////////
define("sliderDataInterval", "2000", true);
//////////////////////////////////////////// Kullaniciya ozel parametreler //////////////////////////////////////////////
getTemplate();
?>