Example #1
0
$back = $_SERVER["HTTP_REFERER"];
$page = $_REQUEST["page"];
$id = $checked['id'];
$lang = $checked['lang'];
$action = $_POST["action"];
$xml = $localPath["xml"] . $checked["id"] . ".xml";
$xmlSave = 'xml/' . $checked['lang'] . '/' . $checked["id"] . ".xml";
$admPath = substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], 'htmlarea.php'));
if (file_exists($xml)) {
    $xml = getDoc($xml);
    if (strpos($xml, '<content>') > 0) {
        $startTag = "<content>";
        $endTag = "</content>";
        // retira marcas CDATA
        $xml = str_replace(array('<![CDATA[', ']]>'), '', $xml);
        $textarea = trim(stripFromText($xml, $startTag, $endTag));
        $textarea = html_entity_decode($textarea);
    } else {
        $textarea = "";
    }
}
$messageArray = array("es" => array("title" => "Administración: Biblioteca Virtual en Salud", "available" => "Disponible", "unavailable" => "Indisponible", "exit" => "Salir", "save" => "Graba"), "pt" => array("title" => "Administração: Biblioteca Virtual em Saúde", "available" => "Disponível", "unavailable" => "Indisponível", "exit" => "Sai", "save" => "Grava"), "en" => array("title" => "Administration: Virtual Health Library", "available" => "Available", "unavailable" => "Unavailable", "exit" => "Exit", "save" => "Save"));
$message = $messageArray[$lang];
//die($textarea);
?>
<html>
  <head>
    <title>BVS-Site Admin</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <script type="text/javascript" src="../bvs-mod/FCKeditor/fckeditor.js"></script>
Example #2
0
    $endposlen = strlen($endpostext);
    $endpos = strpos($haystack, $endpostext, $startpos);
    return substr($haystack, $startpos + $startposlen, $endpos - ($startpos + $startposlen));
}
$back = $_SERVER["HTTP_REFERER"];
$id = $_REQUEST["id"];
$page = $_REQUEST["page"];
$xmlSave = $def['DATABASE_PATH'] . "xml/" . $checked['lang'] . "/" . $id . ".xml";
if ($id == "" || $lang == "") {
    die("error: missing parameter id or lang");
}
if (file_exists($xmlSave)) {
    $xml = getDoc($xmlSave);
    if (strpos($xml, '<url>') > 0) {
        // retira marcas CDATA
        $buffer = trim(stripFromText($xml, "<url>", "</url>"));
    } else {
        $buffer = "";
    }
} else {
    $buffer = "";
}
$messageArray = array("es" => array("title" => "Administración: Biblioteca Virtual en Salud", "available" => "Disponible", "unavailable" => "Indisponible", "exit" => "Salir", "save" => "Graba", "url" => "Localizacion del servicio ", "service" => "Servicio "), "pt" => array("title" => "Administração: Biblioteca Virtual em Saúde", "available" => "Disponível", "unavailable" => "Indisponível", "exit" => "Sai", "save" => "Grava", "url" => "Localização do serviço ", "service" => "Serviço "), "en" => array("title" => "Administration: Virtual Health Library", "available" => "Available", "unavailable" => "Unavailable", "exit" => "Exit", "save" => "Save", "url" => "Service link", "service" => "Service "));
$message = $messageArray[$lang];
?>
<html>
  <head>
    <title>BVS-Site Admin</title>
	<link rel="stylesheet" href="../css/admin/adm.css" type="text/css" />
  </head>