function parse_parsedinclude($filename) { // check current level if ($this->level > 3) { return; // max. depth reached (avoid endless loop) } global $skinid; $skin = new SKIN($skinid); $file = $this->getIncludeFileName($filename); if (!$skin->isValid && !file_exists($file)) { return; } $contents = $skin->getContent($filename); if (!$contents) { if (!file_exists($file)) { return; } $contents = file_get_contents($file); if (empty($contents)) { return; } } $this->level = $this->level + 1; // parse file contents $this->parser->parse($contents); $this->level = $this->level - 1; }
/** * Returns a template */ function _getSkinPart($blogid, $username, $password, $type) { // 1. login $mem = new MEMBER(); if (!$mem->login($username, $password)) { return _error(1, "Could not log in"); } // 2. check if allowed if (!BLOG::existsID($blogid)) { return _error(2, "No such blog ({$blogid})"); } if (!$mem->teamRights($blogid)) { return _error(3, "Not a team member"); } // 3. return skin part $blog = new BLOG($blogid); $skin = new SKIN($blog->getDefaultSkin()); return new xmlrpcresp(new xmlrpcval($skin->getContent($type), "string")); }