예제 #1
0
 function __construct()
 {
     parent::__construct();
     $this->customize();
     $bps = $this->getMyBPSData();
     if (Session::isPluginLoaded("mAdressBuch")) {
         $CAB = mAdressBuchGUI::getCurrent($this, false, true);
         if ($CAB == "-2") {
             $this->addAssocV3("type", "=", "default", "AND", "1");
             $AC = anyC::get("AdressBuch");
             $AC->addAssocV3("AdressBuchUserID", "=", Session::currentUser()->getID());
             $AC->addAssocV3("AdressBuchTyp", "=", "2");
             while ($AB = $AC->getNextEntry()) {
                 $this->addAssocV3("type", "=", "AB" . $AB->getID(), "OR", "1");
             }
         }
         if ($CAB == "0") {
             $this->addAssocV3("type", "=", "default");
         }
         if ($CAB > 0) {
             $AB = new AdressBuch($CAB);
             if ($AB->A("AdressBuchTyp") == "1" or $AB->A("AdressBuchTyp") == "3" or $AB->A("AdressBuchTyp") == "2" and $AB->A("AdressBuchUserID") == Session::currentUser()->getID()) {
                 $this->addAssocV3("type", "=", "AB" . $bps["AdressBuch"]);
             }
         }
     }
     /*if($bps == -1 OR !isset($bps["AdressBuch"]) OR $bps["AdressBuch"] == 0) $this->addAssocV3("type","=","default");
     		else {
     			$AB = new AdressBuch($bps["AdressBuch"]);
     			if($AB->A("AdressBuchTyp") == "1" OR $AB->A("AdressBuchTyp") == "3" OR
     				($AB->A("AdressBuchTyp") == "2" AND $AB->A("AdressBuchUserID") == Session::currentUser()->getID()))
     				$this->addAssocV3("type","=","AB".$bps["AdressBuch"]);
     		}*/
     $this->gui = new HTMLGUI();
     if ($bps != -1 and isset($bps["selectionMode"]) and (strpos($bps["selectionMode"], "Vertrag") !== false or strpos($bps["selectionMode"], "Bestellung") !== false or strpos($bps["selectionMode"], "CloudKunde") !== false or strpos($bps["selectionMode"], "Einsatzort") !== false)) {
         $this->gui = new HTMLGUI2();
         $this->gui->setDisplaySide("right");
     }
 }