dlaczego w kodzie:
{ $getFolderRow = $_GET['fr']; }
przy adresie get: http://www.bleble.vx/costam.php?fr=1
kiedy dam na sztywno [1] wszystko jest ok, ale kiedy dam [$getFolderRow], wywala
Trying to get property of non-object
{ $getFolderRow = $_GET['fr']; }
for ($i = 0; $i < $countCats; $i++) { if ($i == $getFolderRow) { } }
$findCatTitle = ''; for ($i = 0; $i < $countCats; $i++) { if ($i == $getFolderRow) { $findCatTitle = $customer -> catalogs -> catalog[$i] -> title; } } exit; if ($findCatTitle == $getFolderTitle)...
$xmlPath = './db/customers.xml'; $changeLogDB = $dataBase -> changeLog; $ip = $dataBase -> ip; foreach ($dataBase -> customer as $customer) { if ( ($customer -> name == $getCustomerName) && ($customer -> settings -> id == $getID) ) { $customerName = $customer -> name; $customerFolder = $customer -> folder; $settings[] = $customer -> settings; $catalogs[] = $customer -> catalogs; // Sprawdzamy, czy nie trzeba dodać nowego katalogu klienta { $getFolder = $_GET['f']; $getFolderName = $_GET['fn']; if (($getFolder == 'add') && ($getFolderName == 'new')) { // Dodajemy katalog i pierwszy main oraz link $dataBase -> changeLog = $nowDateTime; $dataBase -> ip = $yourIP; $i = $countCats + 1; $dataBase -> customer -> settings -> changeLog = $nowDateTime; $newCatalog = $dataBase -> customer -> catalogs -> addChild('catalog'); $newCatalog -> addChild('title', 'Tytuł nowego katalogu'); $newCatalog -> addChild('file', ''); $newMain = $newCatalog -> addChild('main'); $newMain -> addChild('title', 'Tytuł nowego działu'); $newMain -> addChild('page', '0'); $newLink = $newMain -> addChild('link'); $newLink -> addChild('title', 'Tytuł nowego linku'); $newLink -> addChild('page', '0'); $dataBase -> asXML($xmlPath); // Zmieniamy strukturę pliku, upiększamy i zapisujemy go function formatXml($simpleXMLElement) { $xmlDocument = new DOMDocument('1.0', 'utf-8'); $xmlDocument -> preserveWhiteSpace = false; $xmlDocument -> formatOutput = true; $xmlDocument -> loadXML($simpleXMLElement -> asXML()); return $xmlDocument -> saveXML(); } // Alertujemy co się wydarzyło $alertPath = './index.php?page=edit&id='.$getID.'&c='.$getCustomerName; $alertType = 'alert-success'; $alertMessageStrong = 'Sukces!'; $alertMessage = 'Nowy katalog został dodany.'; echo "<script>document.location.href = \"".$alertPath."&at=".$alertType."&ams=".$alertMessageStrong."&am=".$alertMessage."\";</script>"; exit; } // Usuwanie katalogu z plikami i odnośnikami if ($getFolder == 'del') { { $getFolderRow = (int)$_GET['fr']; $getFolderTitle = $_GET['ft']; // Nadpisujemy czas zmiany pliku bazy danych $dataBase -> changeLog = $nowDateTime; $dataBase -> ip = $yourIP; $customer -> settings -> changeLog = $nowDateTime; $dataBase -> asXML($xmlPath); $findCatTitle = $customer -> catalogs -> catalog[$getFolderRow] -> title; if ($findCatTitle == $getFolderTitle) {...