This commit is contained in:
2026-05-15 18:33:51 +02:00
parent 3601be572f
commit c980004309
8442 changed files with 783630 additions and 1 deletions

View File

@@ -0,0 +1,86 @@
<?php
class FileController extends MainController implements ControllerInterface
{
/**
* (non-PHPdoc)
* @see class/ControllerInterface#IndexAction($param)
*/
public function IndexAction($param) {
$data = array();
$data['lang']= $param['lang'] ;
$data['mf_file.publication']= 1 ;
$date = Utils::GetNowDate();
$data[' '] = array('value' => " mf_file.date_publication <= '$date' " ,'condition' => '');
$dalData = MfFileDAL::GetDalDataObj();
$dalData->setCondition($data);
//$dalData->setLimit(10);
$dalData->setSortBy('title');
$arrayFile = MfFileDAL::GetResult($dalData);
$arrayFileType = Utils::GetArrayList('mf_file_type', 'id_mf_file_type', 'name');
$arrayFileByCategory = array();
foreach ($arrayFileType as $idCategory => $categoryName) {
foreach ($arrayFile as $file) {
if ($idCategory == $file->GetType()) {
$arrayFileByCategory[$categoryName][] = $file;
}
}
}
// Utils::ArrayDisplay($param['urlParam']);
// Utils::ArrayDisplay(Router::GenerateUrl('PlikiLabel'));
//$this->RunShared('FormDownload', $param);
if (SessionProxy::IsSetValue('sendFormInfo')) {
$this->addRedirectInfo( Dictionary::Translate('message_sent'),null, Router::GenerateUrl('PlikiLabel'),array(),0);
}
$this->smarty->assign('arrayFileByCategory', $arrayFileByCategory);
$this->smarty->assign('arrayFileType', $arrayFileType);
$this->smarty->assign('arrayFile', $arrayFile);
}
public function IndexModuleAction($param) {
//Utils::ArrayDisplay($param);
$lang = SessionProxy::GetValue('lang');
$dalData = MfFileDAL::GetDalDataObj();
$dalData->setCondition(array('lang' => $lang, 'mf_file.publication' => 1, 'id_structure' => $param['idStructure']));
$dalData->setSortBy('weight');
$arrayFile = MfFileDAL::GetResult($dalData);
$this->smarty->assign('arrayFile', $arrayFile);
//Utils::ArrayDisplay($arrayFile);
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function preDispatch($param) {
$this->smarty->assign('lang', $param['lang']);
$this->Run($param);
//$this->AddTitle('');
// $this->RunShared('Banner', $param);
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function postDispatch($param) {
}
}

View File

@@ -0,0 +1,62 @@
<?php
class ImageController extends MainController implements ControllerInterface
{
/**
* (non-PHPdoc)
* @see class/ControllerInterface#IndexAction($param)
*/
public function IndexAction($param) {
}
public function IndexModuleAction($param) {
$objArticle = SimpleArticle_MfArticleDAL::GetById($param['idContent'], $param['lang']);
//$this->AddTitle($objArticle->GetTitle());
//Utils::ArrayDisplay($objArticle);
$arrayImage = $objArticle->getArrayImage();
//Utils::ArrayDisplay($arrayImage);
$this->smarty->assign('arrayImage', $arrayImage);
$this->smarty->assign('objArticle', $objArticle);
//Utils::ArrayDisplay($param);
}
public function ViewModuleAction($param) {
$objArticle = SimpleArticle_MfArticleDAL::GetById($param['idContent'], $param['lang']);
//$this->AddTitle($objArticle->GetTitle());
//Utils::ArrayDisplay($objArticle);
$arrayImage = $objArticle->getArrayImage();
//Utils::ArrayDisplay($arrayImage);
$this->smarty->assign('arrayImage', $arrayImage);
$this->smarty->assign('objArticle', $objArticle);
//Utils::ArrayDisplay($param);
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function preDispatch($param) {
$this->smarty->assign('lang', $param['lang']);
$this->Run($param);
//$this->AddTitle('');
// $this->RunShared('Banner', $param);
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function postDispatch($param) {
}
}

View File

@@ -0,0 +1,298 @@
<?php
/**
* $Id: IndexController.php 1254 2008-09-09 08:39:51Z lule $
* Modul strony glownej
*
*/
class IndexController extends MainController implements ControllerInterface {
/**
* Strona glowna
*
*/
public function IndexAction($param) {
$this->smarty->assign('showNews', false);
$dalData = MfHomeSiteDAL::GetDalDataObj();
$dalData->setCondition(array('lang' => $param['lang']));
$dalData->addCondition('location', $param['idLocation']);
$dalData->setLimit(6);
$arrayObjHome = MfHomeSiteDAL::GetResult($dalData);
$this->smarty->assign('arrayObjHome', $arrayObjHome);
//Utils::arrayDisplay($arrayObjHome);
$this->smarty->assign('objBox1', $arrayObjHome[0]);
$this->smarty->assign('objBox2', $arrayObjHome[1]);
$this->smarty->assign('objBox3', $arrayObjHome[2]);
$this->smarty->assign('objBox4', $arrayObjHome[3]);
$this->smarty->assign('objBox5', $arrayObjHome[4]);
$this->smarty->assign('objBox6', $arrayObjHome[5]);
// $showNews = true;
//
$dalDataHome = MfArticleBoxDAL::GetDalDataObj();
$dalDataHome->setCondition(array('lang' => $param['lang'], 'publication' => 1));
$dalDataHome->setSortBy('weight');
$arrayObj = MfArticleBoxDAL::GetResult($dalDataHome);
$this->smarty->assign('arrayObjHomeArticle', $arrayObj);
//Utils::ArrayDisplay($arrayObj);
//
// $arrayIdLang = array('pl' => 1, 'en' => 2);
// $lang = $param['lang'];
// if (isset($arrayIdLang[$param['lang']])) {
// $id = $arrayIdLang[$param['lang']];
// $obj = MfArticleBoxDAL::GetById($id);
// $this->smarty->assign('objArticleSG', $obj);
// } else {
// $obj = MfArticleBoxDAL::GetEmptyObj();
// $this->smarty->assign('objArticleSG', $obj);
// }
}
public function AjaxFormAction($param) {
$this->SetAjaxRender();
$type = Request::GetPost('type');
$dalData = MfParametersDAL::GetDalDataObj();
$dalData->addCondition('type', $type);
$dalData->addCondition('publication', 1);
$dalData->setSortBy('sort');
$arrayObjParameters = MfParametersDAL::GetResult($dalData);
//Utils::ArrayDisplay($arrayObjParameters);
//===grupowanie====
$arrayParam = array();
$arrayGroupParam = array();
foreach ($arrayObjParameters as $objParam) {
$idLink = $objParam->GetLinkId();
$arrayGroupParam[$objParam->GetLinkId()][] = $objParam;
}
$this->smarty->assign('arrayObjParameters', $arrayObjParameters);
$this->smarty->assign('arrayGroupParam', $arrayGroupParam);
$this->smarty->assign('type', $type);
}
public function SearchAction($param) {
//Art
$search = trim(Request::GetPost('search'));
$arraySearch = explode(' ', $search);
$dalDataArt = SimpleArticle_MfArticleDAL::GetDalDataObj();
if (count($arraySearch) > 0) {
$where = ' ( ';
foreach ($arraySearch as $key => $search) {
$where .= $key == 0 ? '' : ' OR ';
$where .= ' mf_article_description.title LIKE "%' . Utils::AddSlashes($search) . '%" ';
$where .= ' OR mf_article_description.description LIKE "%' . Utils::AddSlashes($search) . '%" ';
}
$where .= ' ) ';
//Utils::ArrayDisplay($where);
$dalDataArt->addCondition(' ', $where, ' ');
}
$dalDataArt->setJoin(array('SimpleArticle_MfArticleDescription' => ' LEFT JOIN mf_article_description ON mf_article.id_mf_article=mf_article_description.id_mf_article'));
$arrayObjArt = SimpleArticle_MfArticleDAL::GetResult($dalDataArt);
$arrayObjArtStr = array();
foreach ($arrayObjArt as $objArt) {
$dalDataStr = StructureDAL::GetDalDataObj();
$dalDataStr->addCondition('id_content', $objArt->GetId());
$obStr = StructureDAL::GetResult($dalDataStr);
if (isset($obStr[0])) {
$objArt->setStructure($obStr[0]);
$arrayObjArtStr[] = $objArt;
}
}
$this->smarty->assign('arrayObjArtStr', $arrayObjArtStr);
//Utils::ArrayDisplay($arrayObjArtStr);
}
/**
* Wysyłka
*
* @param array $param
*/
public function AjaxSendMessageAction($param) {
header('Content-Type: text/html; charset=utf-8');
$this->SetAjaxRender();
$this->smarty->assign('error', '');
$this->smarty->assign('wrongPhone', '');
$this->smarty->assign('wrongEmail', '');
$this->smarty->assign('success', '');
//Utils::ArrayDisplay($_POST);
$validator = new Validator($_POST);
$errorList = '';
$error = '';
$empty = '';
$wrongEmail = '';
$wrongPhone = '';
if (!$validator->IsEmpty('name', '')) {
$empty = " Podpis </ br>";
}
if (!$validator->IsEmpty('temat', '')) {
$empty = " Temat </ br>";
}
if (!$validator->IsEmpty('email', '')) {
$empty .= " Email ";
} else {
if (!$validator->IsEmailAddress('email', '')) {
$wrongEmail = " Podany adres email jest niepoprawny.";
$this->smarty->assign('wrongEmail', $wrongEmail);
}
}
// if (!$validator->CheckCaptcha('captcha', '')) {
// $empty .= " Treść Captcha </ br>";
// }
if ($empty) {
$errorList = true;
}
//Utils::ArrayDisplay($empty);
//Utils::ArrayDisplay($errorList);
if ($errorList) {
$this->smarty->assign('error', "Wymagane pola muszą być wypełnione.");
} elseif ($wrongEmail) {
} elseif ($wrongPhone) {
} else {
$this->smarty->assign('content', $_POST['content']);
$this->smarty->assign('email', $_POST['email']);
$this->smarty->assign('temat', $_POST['temat']);
$this->smarty->assign('name', $_POST['name']);
//$this->smarty->assign('typ', $_POST['typ']);
//$this->smarty->assign('city', $_POST['city']);
$txtmessage = $this->smarty->fetch('partial/Index/MailTxt.tpl');
$mail = new PHPMailer();
$mail->CharSet = "utf-8";
$mail->Subject = FROM_NAME_MAIL . " - " . $_POST['temat'];
$mail->SMTPAuth = true;
$mail->Mailer = 'smtp';
$mail->Host = HOST_MAIL;
$mail->Port = 25;
$mail->From = FROM_MAIL;
$mail->FromName = FROM_NAME_MAIL;
$mail->Username = USER_MAIL;
$mail->Password = PASS_MAIL;
$mail->IsHTML(true);
//$mail -> AddAddress(FORM_MAIL, FROM_NAME_MAIL);
$mail->AddBCC("maciek@formix.pl", "BOK - Mediaflex");
$mail->Body = $txtmessage;
$mail->Send();
$this->smarty->assign('success', 'Wiadomość została wysłana');
}
}
/**
* Wyswietlanie obrazka captcha
*/
public function CaptchaAction() {
//$this->disableTemplates = true;
$this->SetAjaxRender();
include(PATH_CORE . '/plugins/Captcha.php');
$word = rand(2, 9) . rand(2, 9) . rand(2, 9) . rand(2, 9) . rand(2, 9);
setcookie(CAPTCHA_COOKIE_NAME, (md5(strtolower($word) . CAPTCHA_SEED)));
//session_start();
//$_SESSION['captcha'] = $word;
$image = confirm($word);
$this->content = $image;
//die();
}
public function AjaxRegisterCaptchaCheckAction($param) {
$this->setAjaxRender();
$data = array('captcha' => Request::GetGet('captcha', true));
$validator = new Validator($data);
$validator->CheckCaptcha('captcha', '');
$errors = $validator->GetErrorList();
$this->content = empty($errors) ? "true" : "false";
}
public function NewsletterAction($param) {
//$this->setAjaxRender();
if (isset($_POST['send'])) {
$dalData = MfSubscriptionDAL::GetDalDataObj();
$objSubscripton = new MfSubscription();
$objSubscripton->setEmail($_POST['email_newsletter']);
$objSubscripton->setDateAdd(Utils::GetNowDate());
$dalData->setObj($objSubscripton);
MfSubscriptionDAL::Save($objSubscripton);
$this->addRedirectInfo(Dictionary::Translate('Email has been added'), null, $_POST['urlFrom'], 0);
} else {
// $this->addRedirectInfo(Dictionary::Translate('message_sent'), null, $_POST['urlFrom'], 0);
}
}
public function SubsiteAction($param) {
try {
$dalData = StructureDAL::GetDalDataObj();
$dalData->setCondition(array('mf_structure.lang' => $param['lang'], 'mf_structure.publication' => '1', 'id_parent' => $param['idStructure']));
$dalData->setSortBy('sort');
$dalData->setJoin(array('SimpleArticle_MfArticleDescription' => ' LEFT JOIN mf_article_description ON mf_article_description.id_mf_article=mf_structure.id_content'));
$arrayObjSubsite = StructureDAL::GetResult($dalData);
$this->smarty->assign('arrayObjSubsite', $arrayObjSubsite);
//Utils::ArrayDisplay($arrayObjSubsite);
} catch (Exception $e) {
Utils::ArrayDisplay($e);
}
}
public function PlayerAction($param) {
$this->SetAjaxRender();
}
public function MapsAction($param) {
//$this->SetAjaxRender();
}
public function TestAction($param) {
Utils::ArrayDisplay('test');
$this->smarty->assign('indexSG', false);
//$this->SetAjaxRender();
}
/**
* Czesc wspolna wszystkich podstron
*
*/
public function PreDispatch($param) {
//$this->AddScript('swfobject.js');
$this->smarty->assign('lang', $param['lang']);
$this->smarty->assign('indexSG', true);
$this->Run($param);
$this->RunShared('MenuBox', $param);
//$this->RunShared('TagCloudBox', $param);
//$this->RunShared('News', $param);
//$this->RunShared('CustomerBox', $param);
//$this->RunShared('LinksBox', $param);
}
public function PostDispatch($param) {
}
}
?>

View File

@@ -0,0 +1,105 @@
<?php
/**
* Mapy moduł
*
*/
class MapsController extends MainController implements ControllerInterface {
/**
* Strona glowna
*
*/
public function IndexAction($param) {
}
/*
* Moduł Mapy -
*
* np. sklepów, oddziałów, itp.
*/
public function IndexModuleAction($param) {
$dalData = FkMapsDAL::GetDalDataObj();
// $dalData->setCondition($data);
$dalData->addCondition('publication', 1);
$dalData->setSortBy('weight');
//$dalData->setLimit(6);
$arrayMaps = FkMapsDAL::GetResult($dalData);
$arrayMapsByType = array();
foreach ($arrayMaps as $objMaps) {
if ($objMaps->GetType() == 1) {
$arrayMapsByType[1][] = $objMaps;
} else {
$arrayMapsByType[2][] = $objMaps;
}
}
Utils::ArrayDisplay($arrayMapsByType);
$count = count($arrayMaps);
// Utils::ArrayDisplay($count);
$mapsListJs = "{
'type': 'FeatureCollection',
'features': [
";
foreach ($arrayMaps as $key => $objMaps) {
$mapsListJs .= "{"
. "
'type': 'Feature',
'geometry': {
'type': 'Point',
'coordinates': [".$objMaps->GetLng().", ".$objMaps->GetLat()."]
},
'properties': {
'name': '".$objMaps->GetName()."',
'address': '".$objMaps->GetAddress()."',
'city': '".$objMaps->GetCity()."',
'country': 'Polska'
}
}";
if ($key+1 != $count) {
$mapsListJs .= ",
";
}
// Utils::ArrayDisplay($key+1 ." = ". $count);
}
$mapsListJs .= "]};";
// Utils::ArrayDisplay($mapsListJs);
$this->smarty->assign('mapsListJs', $mapsListJs);
}
/**
* Czesc wspolna wszystkich podstron
*
*/
public function PreDispatch($param) {
//$this->AddScript('swfobject.js');
$this->smarty->assign('lang', $param['lang']);
$this->smarty->assign('indexSG', true);
$this->Run($param);
$this->RunShared('MenuBox', $param);
//$this->RunShared('TagCloudBox', $param);
//$this->RunShared('News', $param);
//$this->RunShared('CustomerBox', $param);
//$this->RunShared('LinksBox', $param);
}
public function PostDispatch($param) {
}
}
?>

View File

@@ -0,0 +1,158 @@
<?php
/**
* Przykładowe moduły
*
*/
class ModuleController extends MainController implements ControllerInterface {
/**
* Strona glowna
*
*/
public function IndexAction($param) {
}
/*
* Moduł Timeline
*
* np. Nagrody, Historia, itp.
*/
public function TimelineAction($param) {
}
/*
* Moduł Mapy -
*
* np. sklepów, oddziałów, itp.
*/
public function MapsAction($param) {
// Utils::ArrayDisplay($param);
$dalData = FkMapsDAL::GetDalDataObj();
$dalData->addCondition('publication', 1);
$dalData->setSortBy('weight');
//$dalData->setLimit(6);
// $arrayMaps = FkMapsDAL::GetResult($dalData);
$arrayMaps = FkMapsDAL::GetResult($dalData);
$arrayMapsByType = array();
foreach ($arrayMaps as $objMaps) {
if ($objMaps->GetType() == 1) {
$arrayMapsByType[1][] = $objMaps;
} else {
$arrayMapsByType[2][] = $objMaps;
}
}
// Utils::ArrayDisplay($arrayMapsByType);
// $arrayJsByType = array();
// foreach ($arrayMapsByType as $keyType => $arrayMaps) {
$count = count($arrayMaps);
// Utils::ArrayDisplay($count);
$mapsListJs = "{
'type': 'FeatureCollection',
'features': [
";
foreach ($arrayMaps as $key => $objMaps) {
$mapsListJs .= "{"
. "
'type': 'Feature',
'geometry': {
'type': 'Point',
'coordinates': [" . $objMaps->GetLng() . ", " . $objMaps->GetLat() . "]
},
'properties': {
'id': '" . $objMaps->GetId() . "',
'name': '" . $objMaps->GetName() . "',
'address': '" . $objMaps->GetAddress() . "',
'city': '" . $objMaps->GetCity() . "',
'type': '" . $objMaps->GetType() . "',
'description': '" . $objMaps->GetDescription() . "',
'description': '" . $objMaps->GetDescription() . "',
'googleCor': '" . $objMaps->GetLat() . ", " . $objMaps->GetLng() . "',
'country': 'Polska'
}
}";
if ($key + 1 != $count) {
$mapsListJs .= ",
";
}
// Utils::ArrayDisplay($key+1 ." = ". $count);
}
$mapsListJs .= "]};";
// $arrayJsByType[$keyType][] = $mapsListJs;
// }
//Utils::ArrayDisplay($arrayJsByType);
// $this->smarty->assign('arrayJsHean', $arrayJsByType[1]);
// $this->smarty->assign('arrayJsHebe', $arrayJsByType[2]);
// $url =
// Utils::ArrayDisplay(URL_MAIN);
$this->smarty->assign('url', URL_MAIN."/".$param['lang']."/ModuleMaps");
$this->smarty->assign('mapsListJs', $mapsListJs);
}
public function AjaxMapsListAction($param) {
$this->SetAjaxRender();
$dalData = FkMapsDAL::GetDalDataObj();
// $dalData->setCondition($data);
$dalData->addCondition('publication', 1);
$dalData->setSortBy('weight');
$search= trim(Request::GetPost('search'));
$arraySearch = explode(' ', $search);
if (count($arraySearch) > 0) {
$where = ' ( ';
foreach ($arraySearch as $key => $search) {
$where .= $key == 0 ? '' : ' OR ';
$where .= ' city LIKE "%'.addslashes($search).'%" ';
}
$where .= ' ) ';
$dalData->addCondition(' ', $where, ' ');
}
//$dalData->setLimit(6);
// $arrayMaps = FkMapsDAL::GetResult($dalData);
$arrayMaps = FkMapsDAL::GetResult($dalData);
// Utils::ArrayDisplay($objMaps);
$this->smarty->assign('arrayObj', $arrayMaps);
}
/**
* Czesc wspolna wszystkich podstron
*
*/
public function PreDispatch($param) {
//$this->AddScript('swfobject.js');
$this->smarty->assign('lang', $param['lang']);
$this->smarty->assign('indexSG', true);
$this->Run($param);
$this->RunShared('MenuBox', $param);
//$this->RunShared('TagCloudBox', $param);
//$this->RunShared('News', $param);
//$this->RunShared('CustomerBox', $param);
//$this->RunShared('LinksBox', $param);
}
public function PostDispatch($param) {
}
}
?>

View File

@@ -0,0 +1,118 @@
<?php
class ProductController extends ModuleController implements ControllerInterface
{
/**
* (non-PHPdoc)
* @see class/ControllerInterface#IndexAction($param)
*/
public function IndexAction($param) {
//Utils::ArrayDisplay($param);
$idCategory = $param['idCategory'];
$this->smarty->assign('idCategory', $idCategory);
$idsProduct = MfProductLinkDAL::GetIdStringDestinaion('mf_product_category', 'mf_product',$idCategory, $param['lang']);
$dalData = MfProductDAL::GetDalDataObj();
$dalData->setJoin(array('MfProductDescription' => ' LEFT JOIN mf_product_description ON mf_product.id_mf_product=mf_product_description.id_mf_product'));
$dalData->setCondition(array('lang' => $param['lang']));
//Utils::ArrayDisplay('ss'.$idsProduct);
$dalData->addCondition(' ', 'mf_product.id_mf_product IN ('.$idsProduct.') ', ' ');
$arrayObj = MfProductDAL::GetResult($dalData);
$this->smarty->assign('arrayObj', $arrayObj);
$this->smarty->assign('urlProductDetailLabel', $param['urlDetailLabel']);
}
public function ViewAction($param) {
$idCategory = $param['idCategory'];
$this->smarty->assign('idCategory', $idCategory);
//====Attribute======================================================
$idsAttribute = MfProductLinkDAL::GetIdStringDestinaion('mf_product_category', 'mf_product_attribute', $idCategory, $param['lang']);
$dalData = MfProductAttributeDAL::GetDalDataObj();
$dalData->setCondition(array('lang' => $param['lang']));
$dalData->addCondition(' ', 'mf_product_attribute.id_mf_product_attribute IN ('.$idsAttribute.') ', ' ');
$dalData->setJoin(array('MfProductAttributeDescription' => ' LEFT JOIN mf_product_attribute_description ON mf_product_attribute.id_mf_product_attribute=mf_product_attribute_description.id_mf_product_attribute'));
$arrayObjAttribute = MfProductAttributeDAL::GetResult($dalData);
//--------------------------------------------------------------------
//====Attribute=Value=================================================
$dalDataValue = MfProductAttributeValueDAL::GetDalDataObj();
$dalDataValue->setCondition(array('lang' => $param['lang'], 'id_mf_product' => $param['id']));
$dalDataValue->addCondition(' ', 'id_mf_product_attribute IN ('.$idsAttribute.') ', ' ');
$arrayObjAttributeValue = MfProductAttributeValueDAL::GetResult($dalDataValue);
//Utils::ArrayDisplay($dalDataValue);
//Utils::ArrayDisplay($arrayObjAttributeValue);
$arrayObjAttributeValueTmp = array();
foreach ($arrayObjAttributeValue as $attrValKey => $objAttributValue ) {
$arrayObjAttributeValueTmp[$objAttributValue->getIdMfProductAttribute()] = $objAttributValue;
}
$arrayObjAttributeValue = $arrayObjAttributeValueTmp;
foreach ($arrayObjAttribute as $attrKey => $objAttribut ) {
if (key_exists($objAttribut->getId(), $arrayObjAttributeValue)) {
$arrayObjAttribute[$attrKey]->setValue($arrayObjAttributeValue[$objAttribut->getId()]->getValue());
}
}
//---------------------------------------------------------------------
//=====Product=========================================================
$dalData = MfProductAttributeDAL::GetDalDataObj();
$dalData->setCondition(array('lang' => $param['lang']));
$dalData->addCondition(' ', 'mf_product_attribute.id_mf_product_attribute IN ('.$idsAttribute.') ', ' ');
$dalData->setJoin(array('MfProductAttributeDescription' => ' LEFT JOIN mf_product_attribute_description ON mf_product_attribute.id_mf_product_attribute=mf_product_attribute_description.id_mf_product_attribute'));
$objProduct = MfProductDAL::GetById($param['id'], $param['lang']);
$this->smarty->assign('arrayObjAttribute', $arrayObjAttribute);
$this->smarty->assign('idProduct', $param['id']);
$this->smarty->assign('objProduct', $objProduct);
$this->addScript('jQuery/jquery.jcarousel.min.js');
$this->addScript('jQuery/jquery.lightbox-0.5.js');
$this->addScript('gallery.js');
$this->AddCSS('jquery.lightbox-0.5.css');
$this->AddCSS('skin.css');
$this->smarty->assign('showGallery', true);
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function preDispatch($param) {
$this->smarty->assign('lang', $param['lang']);
$this->Run($param);
//$this->AddTitle('');
// $this->RunShared('Banner', $param);
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function postDispatch($param) {
}
}
?>

View File

@@ -0,0 +1,83 @@
<?php
class SearchController extends MainController implements ControllerInterface
{
/**
* (non-PHPdoc)
* @see class/ControllerInterface#IndexAction($param)
*/
public function IndexAction($param) {
//Utils::ArrayDisplay($param);
//Utils::ArrayDisplay($_POST);
if (Request::GetPost('search')) {
//Art
$search= trim(Request::GetPost('search'));
$arraySearch = explode(' ', $search);
$dalDataArt = SimpleArticle_MfArticleDAL::GetDalDataObj();
if (count($arraySearch) > 0) {
$where = ' ( ';
foreach ($arraySearch as $key => $search) {
$where .= $key == 0 ? '' : ' OR ';
$where .= ' mf_article_description.title LIKE "%'.Utils::AddSlashes($search).'%" ';
$where .= ' OR mf_article_description.description LIKE "%'.Utils::AddSlashes($search).'%" ';
}
$where .= ' ) ';
//Utils::ArrayDisplay($where);
$dalDataArt->addCondition('mf_article_description.lang', $param['lang']);
$dalDataArt->addCondition('mf_article_description.publication', 1);
$dalDataArt->addCondition(' ', $where, ' ');
}
$dalDataArt->setJoin(array('SimpleArticle_MfArticleDescription' => ' LEFT JOIN mf_article_description ON mf_article.id_mf_article=mf_article_description.id_mf_article'));
$arrayObjArt = SimpleArticle_MfArticleDAL::GetResult($dalDataArt);
$arrayObjArtStr = array();
foreach ($arrayObjArt as $objArt) {
$dalDataStr = StructureDAL::GetDalDataObj();
$dalDataStr->addCondition('id_content', $objArt->GetId());
$obStr = StructureDAL::GetResult($dalDataStr);
if (isset($obStr[0])) {
$objArt->setStructure($obStr[0]);
$arrayObjArtStr[] = $objArt;
}
}
$this->smarty->assign('arrayObjArtStr', $arrayObjArtStr);
$this->smarty->assign('search', Request::GetPost('search'));
} else {
$this->smarty->assign('arrayObjArtStr', array());
}
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function preDispatch($param) {
$this->smarty->assign('lang', $param['lang']);
$this->smarty->assign('showGallery', true);
$this->Run($param);
//$this->AddTitle('');
// $this->RunShared('Banner', $param);
}
/**
*
* @param unknown_type $param
* @return unknown_type
*/
public function postDispatch($param) {
}
}
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
<?php
/**
*
* Modul testowy soap
*
*/
class SoapController extends MainController implements ControllerInterface {
/**
* Strona glowna
*
*/
public function IndexAction($param) {
//$result = SoapCommunication::getTest();
//$result = SoapCommunication::getLogin();
$soapComm = new SoapCommunication();
$result = SoapCommunication::getProductList();
Utils::ArrayDisplay('jeah!');
Utils::ArrayDisplay($result);
}
/**
* Czesc wspolna wszystkich podstron
*
*/
public function PreDispatch($param) {
//$this->AddScript('swfobject.js');
$this->smarty->assign('lang', $param['lang']);
$this->Run($param);
}
public function PostDispatch($param) {
}
}
?>

View File

@@ -0,0 +1,47 @@
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of TranslateController
*
* @author krun
*/
class TranslateController extends MainController implements ControllerInterface {
public function IndexAction($param) {
}
public function JsAction($param) {
$this->setAjaxRender();
Dictionary::Init($param['lang']);
//Utils::ArrayDisplay(Dictionary::$allLangs);
$lang = Dictionary::$allLangs[Router::$curLang];
foreach ($lang as $k => &$v) {
$v = str_replace("\n", " ", $v);
$v = str_replace("\r", " ", $v);
$v = str_replace("\t", " ", $v);
$v = str_replace(" ", " ", $v);
$v = str_replace(" ", " ", $v);
$v = str_replace(" ", " ", $v);
$v = str_replace("'", "\'", $v);
}
$this->smarty->assign('lang', $lang);
// Utils::ArrayDisplay($lang);
}
public function PreDispatch($param) {
}
public function PostDispatch($param){
}
}
?>