app = $app; $shop = $this->app->Secure->GetGET("shop"); $this->shop=$shop; $form = $this->app->Secure->GetPOST("form"); $formget = $this->app->Secure->GetGET("form"); $this->actNavID = $form[actNavID]; if(isset($form[btnSave])) $this->SaveNav(); $this->SetVar(); // Button methods if(isset($formget[btnNew])) $this->NewNav(); if(isset($formget[btnDel])) $this->DelNav(); if(isset($form[btnLeft])) $this->PosLeft(); if(isset($form[btnRight])) $this->PosRight(); if(isset($form[btnUp])) $this->PosUp(); if(isset($form[btnDown])) $this->PosDown(); $this->ArrNav = $this->GetArrNav(); if((!empty($this->ArrNav)?count($this->ArrNav):0)>0)if($this->actNavID=="") $this->actNavID = key($this->ArrNav); $this->SetVar(); $this->ArrowButton(); } function GetArrNav() { $form = $this->app->Secure->GetPOST("form"); foreach($this->app->DB->SelectArr("SELECT id FROM shopnavigation WHERE parent='0' AND shop='".$this->shop."' ORDER BY position") as $compoint){ $ArrNav[$compoint[id]]=""; foreach($this->app->DB->SelectArr("SELECT id FROM shopnavigation WHERE parent='".$compoint[id]."' AND shop='".$this->shop."' ORDER BY position") as $firstnav){ $ArrNav[$compoint[id]][$firstnav[id]]=""; foreach($this->app->DB->SelectArr("SELECT id FROM shopnavigation WHERE parent='".$firstnav[id]."' AND shop='".$this->shop."' ORDER BY position") as $secnav){ $ArrNav[$compoint[id]][$firstnav[id]][$secnav[id]]=""; foreach($this->app->DB->SelectArr("SELECT id FROM shopnavigation WHERE parent='".$secnav[id]."' AND shop='".$this->shop."' ORDER BY position") as $thirdnav){ $ArrNav[$compoint[id]][$firstnav[id]][$secnav[id]][$thirdnav[id]]=""; } } } } return $ArrNav; } function GetSelectNav($id="",$mode="nav") { $form = $this->app->Secure->GetPOST("form"); $return =""; $homenum=1; $firstnavnum=1; $secnavnum=1; $thirdnavnum=1; $ArrNav = $this->GetArrNav(); if(is_array($ArrNav)){ foreach(array_keys($ArrNav) as $home){ $return .= $this->GetOptionNav($home,1,$id,$homenum,$mode); if(is_array($ArrNav[$home])){ foreach(array_keys($ArrNav[$home]) as $firstnav){ $return .= $this->GetOptionNav($firstnav,2,$id,$homenum.'.'.$firstnavnum,$mode); if(is_array($ArrNav[$home][$firstnav])){ foreach(array_keys($ArrNav[$home][$firstnav]) as $secnav){ $return .= $this->GetOptionNav($secnav,3,$id,$homenum.'.'.$firstnavnum.'.'.$secnavnum,$mode); if(is_array($ArrNav[$home][$firstnav][$secnav])){ foreach(array_keys($ArrNav[$home][$firstnav][$secnav]) as $thirdnav){ $return .= $this->GetOptionNav($thirdnav,4,$id,$homenum.'.'.$firstnavnum.'.'.$secnavnum.'.'.$thirdnavnum,$mode); $thirdnavnum++; } } $secnavnum++;$thirdnavnum=1; } } $firstnavnum++;$secnavnum=1;$thirdnavnum=1; } } $homenum++;$firstnavnum=1;$secnavnum=1;$thirdnavnum=1; } } return $return; } function GetOptionNav($id,$deep,$actID,$dot="",$mode="nav") { $form = $this->app->Secure->GetPOST("form"); switch($deep){ case 1: $color="#FFCC99"; break; case 2: $color="#fffacd"; break; case 3: $color="#e6e6fa"; break; case 4: $color="#b0c4de"; break; default: $color="#FFFFFF"; } //check if side is saved with pass //if($this->CheckNavSecure($id))$secure = "(Passwort Bereich)"; if($mode=='page'){ $pageid = $this->app->DB->Select("SELECT plugin FROM shopnavigation WHERE id='".$id."' AND shop='".$this->shop."' LIMIT 1"); if($pageid==$actID) $selected = "selected"; if(is_numeric($pageid)){ $pagedescription = $this->app->DB->Select("SELECT description FROM page WHERE id='".$pageid."' LIMIT 1"); return "