Exemplo n.º 1
0
#
# Part of the package phpcrawl
#
# Copyright (C) 2004 Uwe Hunfeld (phpcrawl@cuab.de)
#
# A visual HTML-interface for setting up an testing the phpcrawler-class.
#
# GNU General Public License
########################################################################
include "phpcrawl_testinterface.func.php";
include "phpcrawl_testinterface.conf.php";
// Login (http-auth)
auth_login($cfg_authUsername, $cfg_authPassword);
set_time_limit(0);
if (get_magic_quotes_gpc() == true) {
    stripSlashesRec($_POST);
}
// Workaround, convert array $_POST["val"] to "plain" array $val
// Same with output-array ans misc-array
$val =& $_POST["val"];
$output =& $_POST["output"];
$misc =& $_POST["misc"];
// Save current setup (array $val)
if (isset($_POST["action"]) && $_POST["action"] == "save_setup") {
    // Convert the setup-coment
    $misc["comment"] = htmlentities($misc["comment"], ENT_QUOTES);
    $setuparray_combined["setup"] =& $val;
    $setuparray_combined["output"] =& $output;
    $setuparray_combined["misc"] =& $misc;
    $rw_error_message = save_setup($cfg_setupSaveDir, $_POST["save_setup_filename"], $setuparray_combined);
    if (!$rw_error_message) {
Exemplo n.º 2
0
    font-weight: bold;
  }
 
 </style>
 
 <script language="javascript">
 self.focus();
 </script>
</head>

<body>

<?php 
// Setup the crawler
if (get_magic_quotes_gpc() == true) {
    stripSlashesRec($_POST["val"]);
}
$crawler =& new phpcrawlSetup($_POST["val"], $_POST["output"]);
// $val is the posted setup-array,
// $output the posted output-array
if (isset($_POST["misc"]["force_flush"]) && $_POST["misc"]["force_flush"] == "1") {
    $crawler->force_output_flushing = true;
}
$setup_error = $crawler->setupCrawler();
?>

<div id="container">
  
  <div id="head">
    PHPCrawl Testinterface Output
    (using version: <?php