update
This commit is contained in:
83
Admin/controller/IndexController.php
Normal file
83
Admin/controller/IndexController.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Strona glowna
|
||||
*
|
||||
*/
|
||||
class IndexController extends MainController implements ControllerInterface {
|
||||
|
||||
/**
|
||||
* strona glowna
|
||||
*
|
||||
*/
|
||||
public function IndexAction($param) {
|
||||
$kat = '../temp/compile';
|
||||
$katalog = opendir($kat);
|
||||
while ($plik = readdir($katalog)) {
|
||||
if ($plik != '.' AND $plik != '..') {
|
||||
unlink($kat . '/' . $plik);
|
||||
}
|
||||
}
|
||||
$this->AddRedirect(URL_MAIN . '/Structure/', 0);
|
||||
//$this->AddRedirect(URL_MAIN . '/Calc/', 0);
|
||||
}
|
||||
|
||||
public function TestAction($param) {
|
||||
|
||||
}
|
||||
|
||||
public function ParserXmlAction($param) {
|
||||
|
||||
//ini_set($varname, $newvalue)
|
||||
$xml = simplexml_load_file(PATH_STATIC_CONTENT . "/sklepy_stacjonarne.xml");
|
||||
Utils::ArrayDisplay($xml);
|
||||
//$arrayXml = XML2Array::createArray($xml->channel);
|
||||
$k = 0;
|
||||
// foreach ($xml->channel->item as $key => $entry) {
|
||||
// //Utils::ArrayDisplay($entry);
|
||||
// $htmlString[$k]['content'] = (string) $entry->children('content', true)->encoded;
|
||||
// $htmlString[$k]['title'] = (string) $entry->title;
|
||||
// $date = $entry->pubDate;
|
||||
// $htmlString[$k]['pubDate'] = (string) $entry->children('wp', true)->post_date;
|
||||
// $htmlString[$k]['autor'] = (string) $entry->children('dc', true)->creator;
|
||||
//
|
||||
// $content = (string) $entry->children('content', true)->encoded;
|
||||
// $arrayContent = explode("<!--more-->", $content);
|
||||
// Utils::ArrayDisplay($arrayContent);
|
||||
// $htmlString[$k]['shortnote'] = nl2br($arrayContent[0]);
|
||||
// if (isset($arrayContent[1])) {
|
||||
// $htmlString[$k]['content'] = nl2br($arrayContent[1]);
|
||||
// } else {
|
||||
// $htmlString[$k]['content'] = "";
|
||||
// }
|
||||
//
|
||||
//
|
||||
// $k++;
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Metoda wspolna
|
||||
*
|
||||
*/
|
||||
public function preDispatch($param) {
|
||||
$this->smarty->assign('titleAdmin', 'Panel Administracyjny');
|
||||
// $this->RunShared('Auth');
|
||||
// $this->RunShared('Auth', array());
|
||||
// $this->smarty->assign("menuSelected", "");
|
||||
// $this->smarty->assign('activeTab', 'index');
|
||||
// $this->AddScript("formAction.js");
|
||||
// $this->Run($param);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function postDispatch($param) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user