Beispiel #1
0
 function createObject()
 {
     if (EComm::isEnabledGlobally()) {
         return new ECommInit();
     }
     return new AppInit();
 }
Beispiel #2
0
 function createObject()
 {
     $_S =& new AppSettings();
     if (EComm::isEnabledGlobally()) {
         return new ECommUser();
     }
     return new User();
 }
Beispiel #3
0
 function &getTypeInfo($withPreprocessing = FALSE)
 {
     $typ = $this->get_class() . "_typ";
     global ${$typ};
     if (!isset(${$typ})) {
         $parent = gget_parent_class($this);
         $typ = $parent . "_typ";
         global ${$typ};
         if (!isset(${$typ})) {
             $obj = new $parent();
             $typ = gget_parent_class($obj) . "_typ";
             global ${$typ};
             if (!isset(${$typ})) {
                 if ($t = gget_parent_class($obj)) {
                     $obj = new $t();
                     $typ = gget_parent_class($obj) . "_typ";
                     global ${$typ};
                 }
                 if (!isset(${$typ})) {
                     $dummy = 0;
                     return $dummy;
                 }
             }
         }
     }
     if ($withPreprocessing) {
         // TypeInfo "preprocessing":
         // Ezekre hivatkozhatunk a feltetelek kiertekelesenel:
         global $gorumroll, $gorumuser, $gorumrecognised, $scriptName, $whatComp, $wRep, $printView, $clientView, $gorumevent, $gLight;
         $_S =& new AppSettings();
         $_EC = EComm::createObject();
         if (class_exists("ECommSettings")) {
             $_ES =& new ECommSettings();
         }
         hasAdminRights($isAdm);
         // vegignezzuk a typeinfot, hogy vannak-e benne felteteles elemek definialva
         $attrs =& ${$typ}["attributes"];
         foreach ($attrs as $attr => $attrInfo) {
             // ha egy elozo getTypeInfo hivas mar beallitott kelteteles mezoket,
             // akkor azokat eloszor toroljuk:
             if (isset($attrInfo["conditional_indexes"])) {
                 foreach ($attrInfo["conditional_indexes"] as $key) {
                     unset($attrs[$attr][$key]);
                 }
             }
             if (isset($attrInfo["conditions"])) {
                 // vegigmegyunk a felteteleken:
                 foreach ($attrInfo["conditions"] as $cond => $tag) {
                     //echo "$attr $cond: ";
                     $cond = addcslashes($cond, '"');
                     eval("\$cond = ({$cond});");
                     //echo $cond ? "true" : "false";echo "<br>";
                     if ($cond) {
                         // egy feltetelhez tobb tag is tartozhat:
                         if (is_array($tag)) {
                             // mindet betesszuk a typeinfoba:
                             foreach ($tag as $key => $tagitem) {
                                 if (is_int($key)) {
                                     $attrs[$attr][] = $tagitem;
                                     end($attrs[$attr]);
                                     $attrs[$attr]["conditional_indexes"][] = key($attrs[$attr]);
                                 } else {
                                     $attrs[$attr][$key] = $tagitem;
                                     $attrs[$attr]["conditional_indexes"][] = $key;
                                 }
                             }
                         } else {
                             $attrs[$attr][] = $tag;
                             end($attrs[$attr]);
                             $attrs[$attr]["conditional_indexes"][] = key($attrs[$attr]);
                         }
                     }
                 }
             }
         }
         if (isset(${$typ}["conditions"])) {
             // ha egy elozo getTypeInfo hivas mar beallitott kelteteles mezoket,
             // akkor azokat eloszor toroljuk:
             if (isset(${$typ}["conditional_indexes"])) {
                 foreach (${$typ}["conditional_indexes"] as $key) {
                     unset(${$typ}[$key]);
                 }
             }
             // vegigmegyunk a felteteleken:
             foreach (${$typ}["conditions"] as $cond => $tag) {
                 $cond = addcslashes($cond, '"');
                 eval("\$cond = ({$cond});");
                 if ($cond) {
                     // egy feltetelhez tobb tag is tartozhat:
                     if (is_array($tag)) {
                         // mindet betesszuk a typeinfoba:
                         foreach ($tag as $key => $tagitem) {
                             if (is_int($key)) {
                                 ${$typ}[] = $tagitem;
                                 end(${$typ});
                                 ${$typ}["conditional_indexes"][] = key(${$typ});
                             } else {
                                 ${$typ}[$key] = $tagitem;
                                 ${$typ}["conditional_indexes"][] = $key;
                             }
                         }
                     } else {
                         ${$typ}[] = $tag;
                         end(${$typ});
                         ${$typ}["conditional_indexes"][] = key(${$typ});
                     }
                 }
             }
         }
     }
     return ${$typ};
 }
Beispiel #4
0
 function modifyForm()
 {
     global $gorumroll, $lll;
     $_EC = EComm::createObject();
     $this->id = $gorumroll->rollid;
     LocationHistory::saveGorumCategory($this->getCid());
     $this->activateVariableFields();
     //csak emiatt kellett feluldefinialn
     $this->initClassVars();
     if (!Roll::isPreviousFormSubmitInvalid()) {
         $ret = $this->load();
         if ($ret) {
             $txt = $lll["not_found_in_db"];
             handleError($txt);
         }
         $old =& $this;
     } else {
         G::load($old, $this->id, "item");
     }
     $this->hasObjectRights($hasRight, "modify", TRUE);
     if (isset($this->expirationTime) && !$this->expirationTime->isEmpty()) {
         $this->expiration = round($this->expirationTime->getDayDiff());
         if ($this->expirationTime->isPast()) {
             $this->expiration = "-{$this->expiration}";
         }
     }
     $this->addDeletePictureStuff();
     $this->addDeleteMediaStuff();
     $_EC->confirmRules($this->cid, $old);
     $this->cName = $this->getCatName();
     $this->catPermaLink = $this->getCatPermaLink();
     $this->generForm();
 }
Beispiel #5
0
 function ecommerceEnabled()
 {
     global $gorumuser, $gorumrecognised, $gorumroll;
     if (!EComm::isEnabledGlobally()) {
         return FALSE;
     }
     hasAdminRights($isAdm);
     return isset($this->ecommerceEnabled) && ($this->ecommerceEnabled == Settings_ecommEnabled || $this->ecommerceEnabled == Settings_ecommTestMode && ($isAdm || $gorumrecognised && $gorumuser->name == "ecommtest" || isset($gorumroll) && $gorumroll->list == "purchase" && ($gorumroll->method == "silent_post" || $gorumroll->method == "relay_response")));
 }
Beispiel #6
0
include NOAH_APP . "/settings.php";
include NOAH_APP . "/globalstat.php";
include NOAH_APP . "/customfieldcontainer.php";
include NOAH_APP . "/user.php";
include NOAH_APP . "/category.php";
include NOAH_APP . "/item.php";
//include(NOAH_APP . "/fieldcolumn.php");
include NOAH_APP . "/customfield.php";
include NOAH_APP . "/userfield.php";
include NOAH_APP . "/itemfield.php";
include NOAH_APP . "/init.php";
include NOAH_APP . "/search.php";
include NOAH_APP . "/itemsearch.php";
include NOAH_APP . "/usersearch.php";
include NOAH_APP . "/checkconf.php";
include NOAH_APP . "/cronjob.php";
include NOAH_APP . "/fieldset.php";
include NOAH_APP . "/controlpanel.php";
include NOAH_APP . "/customlist.php";
include NOAH_APP . "/overlay.php";
include NOAH_APP . "/ecomm.php";
if (EComm::isEnabledGlobally()) {
    include ECOMM_DIR . "/constants.php";
}
global $_FP;
if ($firePHP) {
    include GORUM_DIR . "/firephp/FirePHP.class.php";
    $_FP = FirePHP::getInstance(TRUE);
} else {
    $_FP = 0;
}