Пример #1
0
 function GenerateXmlUrl()
 {
     $this->_IsisScriptUrl = $this->GenerateIsisScriptUrl();
     $xmlFromIsisScript = wxis_exe($this->_IsisScriptUrl);
     $this->_request->getRequestValue("pid", $pid);
     $this->_request->getRequestValue("t", $textLang);
     $this->_request->getRequestValue("file", $xmlFile);
     if ($this->_script == 'sci_arttext' || $this->_script == 'sci_abstract') {
         $server = $this->_def->getKeyValue("SERVER_SCIELO");
         $services = $this->_def->getSection("FULLTEXT_SERVICES");
         $services_xml = array();
         foreach ($services as $id => $service) {
             $service = str_replace('PARAM_PID', $pid, $service);
             $service = str_replace('PARAM_SERVER', $server, $service);
             $service = str_replace('CURRENT_URL', urlencode("http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']), $service);
             //$services_xml[count($services_xml)] = $this->callService($service, $id);
             $services_xml[count($services_xml)] = $this->getURLService($service, $id);
         }
         if (count($services_xml) > 0) {
             $xmlList[] = $this->XML_XSL->concatXML($services_xml, "fulltext-service-list");
         }
         require_once "classes/XMLFromIsisScript.php";
         $xmlIsisScript = new XMLFromIsisScript($xmlFromIsisScript);
         $xmlFromIsisScript = $xmlIsisScript->getXml();
         $this->_special_xsl = $xmlIsisScript->getSpecialXSL();
     }
     $xmlList[] = $xmlFromIsisScript;
     $xmlScieloOrg = '';
     if (strpos($this->_IsisScriptUrl, 'script=sci_verify') == false) {
         $elements = array("SCIELO_REGIONAL_DOMAIN" => "SCIELO_REGIONAL_DOMAIN", "toolbox" => "show_toolbox", "requests" => "show_requests", "show_article_references" => "show_article_references", "loginURL" => "login_url", "logoutURL" => "logout_url", "show_login" => "show_login", "show_send_by_email" => "show_send_by_email", "show_cited_scielo" => "show_cited_scielo", "show_cited_google" => "show_cited_google", "show_similar_in_scielo" => "show_similar_in_scielo", "show_similar_in_google" => "show_similar_in_google", "google_last_process" => "google_last_process", "show_datasus" => "show_datasus", "MIMETEX" => "mimetex", "SCRIPT_TOP_TEN" => "SCRIPT_TOP_TEN", "SCRIPT_ARTICLES_PER_MONTH" => "SCRIPT_ARTICLES_PER_MONTH", "services_log" => "ENABLE_SERVICES_LOG");
         foreach ($elements as $k => $v) {
             $xmlScieloOrg .= "<{$k}>" . $this->_def->getKeyValue($v) . "</{$k}>";
         }
         $xmlScieloOrg .= $this->userInfo();
         $xmlScieloOrg = "<varScieloOrg>" . $xmlScieloOrg . "</varScieloOrg>";
     }
     if (count($xmlList) > 1) {
         $xml = $this->XML_XSL->concatXML($xmlList, "root");
     } else {
         $xml = $this->XML_XSL->insertProcessingInstruction($xmlList[0]);
     }
     $xml = str_replace("<CONTROLINFO>", "<CONTROLINFO>" . $xmlScieloOrg, $xml);
     return $xml;
 }
Пример #2
0
 function GenerateXmlUrl()
 {
     $this->_IsisScriptUrl = $this->GenerateIsisScriptUrl();
     $xmlFromIsisScript = wxis_exe($this->_IsisScriptUrl);
     /*
      *Resgatando o valor de siglum
      */
     $str1 = strpos($xmlFromIsisScript, "<SIGLUM>");
     $str2 = strpos($xmlFromIsisScript, "</SIGLUM>");
     $strResultSiglum = substr($xmlFromIsisScript, $str1 + 8, $str2 - $str1 - 8);
     $this->_request->getRequestValue("pid", $pid);
     $this->_request->getRequestValue("t", $textLang);
     $this->_request->getRequestValue("file", $xmlFile);
     /*
      *Resgatando o count do comment e verificando o comment
      */
     $show_comments = $this->_def->getKeyValue("show_comments");
     if ($show_comments != 0) {
         $xml_comments = file_get_contents("xml/allow_comment.xml");
         $issn_comments = substr($_REQUEST["pid"], 1, 9);
         $flag = 0;
         if (strpos($xml_comments, $issn_comments)) {
             $flag = 1;
         }
         if ($flag == 1) {
             if ($this->_script == 'sci_arttext' || $this->_script == 'sci_abstract') {
                 $BlogDAO = new wpBlogDAO();
                 $commentCount = $BlogDAO->getCountCommentByPid($pid, $strResultSiglum);
                 $BlogDAO->fechaConexao();
             }
         }
     }
     if ($this->_script == 'sci_arttext_pr' || $this->_script == 'sci_arttext' || $this->_script == 'sci_abstract') {
         $server = $this->_def->getKeyValue("SERVER_SCIELO");
         $services = $this->_def->getSection("FULLTEXT_SERVICES");
         $services_xml = array();
         foreach ($services as $id => $service) {
             $service = str_replace('PARAM_PID', $pid, $service);
             $service = str_replace('PARAM_SERVER', $server, $service);
             $service = str_replace('CURRENT_URL', urlencode("http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']), $service);
             //$services_xml[count($services_xml)] = $this->callService($service, $id);
             $services_xml[count($services_xml)] = $this->getURLService($service, $id);
         }
         if (count($services_xml) > 0) {
             $xmlList[] = $this->XML_XSL->concatXML($services_xml, "fulltext-service-list");
         }
         require_once "classes/XMLFromIsisScript.php";
         $xmlIsisScript = new XMLFromIsisScript($xmlFromIsisScript);
         if ($this->_script == 'sci_arttext' && strlen($this->_def->getKeyValue("REPLACE_TEXT_BY_PDF_LINK")) > 0) {
             $xmlIsisScript->setPdfLink(str_replace('sci_arttext', 'sci_pdf', "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']), $this->_def->getKeyValue("REPLACE_TEXT_BY_PDF_LINK"));
         }
         $xmlFromIsisScript = $xmlIsisScript->getXml();
         if ($this->_script != 'sci_arttext_pr') {
             $this->_special_xsl = $xmlIsisScript->getSpecialXSL();
         }
     }
     $xmlList[] = $xmlFromIsisScript;
     $xmlScieloOrg = '';
     if (strpos($this->_IsisScriptUrl, 'script=sci_verify') == false) {
         $elements = array("SCIELO_REGIONAL_DOMAIN" => "SCIELO_REGIONAL_DOMAIN", "toolbox" => "show_toolbox", "requests" => "show_requests", "show_article_references" => "show_article_references", "loginURL" => "login_url", "logoutURL" => "logout_url", "show_login" => "show_login", "show_article_wltranslation" => "show_article_wltranslation", "show_send_by_email" => "show_send_by_email", "show_cited_scielo" => "show_cited_scielo", "show_cited_google" => "show_cited_google", "show_similar_in_scielo" => "show_similar_in_scielo", "show_similar_in_google" => "show_similar_in_google", "google_last_process" => "google_last_process", "services_comments" => "show_comments", "show_datasus" => "show_datasus", "MIMETEX" => "mimetex", "SCRIPT_TOP_TEN" => "SCRIPT_TOP_TEN", "SCRIPT_ARTICLES_PER_MONTH" => "SCRIPT_ARTICLES_PER_MONTH", "services_log" => "ENABLE_SERVICES_LOG", "show_scimago" => "show_scimago", "show_semantic_hl" => "show_semantic_hl", "show_fapesp_projects" => "show_fapesp_projects", "show_clinical_trials" => "show_clinical_trials", "show_home_journal_evaluation" => "show_home_journal_evaluation", "show_home_scieloorg" => "show_home_scieloorg", "show_home_help" => "show_home_help", "show_home_about" => "show_home_about", "show_home_scielo_news" => "show_home_scielo_news", "show_home_scielo_team" => "show_home_scielo_team", "show_home_scielo_signature" => "show_home_scielo_signature", "show_group_article" => "show_group_article", "show_group_indicators" => "show_group_indicators", "show_group_related_links" => "show_group_related_links", "show_group_services" => "show_group_services", "show_group_bookmark" => "show_group_bookmark", "show_meta_citation_reference" => "show_meta_citation_reference", "show_ubio" => "show_ubio", "journal_manager" => "journal_manager", "show_new_article_link" => "show_new_article_link", "show_issues_sorted_by_pubdate" => "show_issues_sorted_by_pubdate");
         foreach ($elements as $k => $v) {
             $xmlScieloOrg .= "<{$k}>" . $this->_def->getKeyValue($v) . "</{$k}>";
         }
         $xmlScieloOrg .= "<refferer>http://" . htmlentities($_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]) . "</refferer>";
         $xmlScieloOrg .= $this->userInfo();
         if ($_REQUEST['script'] == 'sci_serial' and $this->_def->getKeyValue("show_scimago") == 1) {
             $xmlScieloOrg .= "<scimago_status>online</scimago_status>";
         } else {
             $xmlScieloOrg .= "<scimago_status>offline</scimago_status>";
         }
         $xmlScieloOrg .= "<url_login>" . base64_encode("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]) . "</url_login>";
         $xmlScieloOrg .= "<commentCount>" . $commentCount . "</commentCount>";
         $xmlScieloOrg = "<varScieloOrg>" . $xmlScieloOrg . "</varScieloOrg>";
     }
     if (count($xmlList) > 1) {
         $xml = $this->XML_XSL->concatXML($xmlList, "root");
     } else {
         $xml = $this->XML_XSL->insertProcessingInstruction($xmlList[0]);
     }
     $xml = str_replace("<CONTROLINFO>", "<CONTROLINFO>" . $xmlScieloOrg, $xml);
     return $xml;
 }