Пример #1
0
function db_send_query($sql)
{
    #echo("Sending query: " . enc_html($sql) . "<br>\n");
    $result = mysql_query($sql, $GLOBALS['wfpl_db_handle']);
    if (!$result) {
        die(enc_html('DATABASE ERROR: ' . mysql_error($GLOBALS['wfpl_db_handle']) . ' in the following query: ' . $sql));
    }
    return $result;
}
Пример #2
0
         } else {
             $cmp = -1;
         }
         if ($timetolive-- <= 0) {
             echo "Error 12";
             exit(0);
         }
         //Notfall-Abbruch um Endlosschleife zuvermeiden
     } while ($cmp > 0);
 }
 //echo "<td>FOUND: $lisa_compare_field with $bbsplan_compare_field</td>";
 if (strtolower($lisa_compare_field) == strtolower($bbsplan_compare_field)) {
     //Feld darf nicht leer sein
     if ($lisa_compare_field != "") {
         //$tbl.="<tr><td>$i</td><td>$lisa_compare_field </td><td>$bbsplan_compare_field</td></tr>";
         $tbl .= "<tr><td>{$i}</td><td>" . enc_html($lisa_val["picfile"]) . "</td><td>" . enc_html($bbsplan_val["picfile"]) . "</td><td><input type='checkbox' name='ok[]' value='{$i}' checked></td></tr>\n";
         //Array Keys der übereinstimmenden speichern
         $match = array();
         $match["lisa"] = $lisa_val;
         $match["bbsplan"] = $bbsplan_val;
         $match["checked"] = 0;
         //Übernehmen aber als nicht geprüft markieren
         $matches_found[$i] = $match;
         $i++;
         //Anzahl Matches erhöhen
         //Gefundene Einträge merken um diese später zu entfernen
         $lisa_key_delete[] = $lisa_val["nr"];
         $bbsplan_key_delete[] = $bbsplan_val["nr"];
     }
 }
 //else{
Пример #3
0
//====== Menü/Verzeichnisse ausgeben
echo "<br><br>";
function buttonpath($source, $path)
{
    return "<form action='matching_source.php' method='POST' >\n\t\t\t\t\t<input type='hidden' name='source' value='{$source}'>\n\t\t\t\t\t<input type='hidden' name='path' value='{$path}'>\n\t\t\t\t\t<input type='submit' name='chdir' value='ausw&auml;hlen'>\n\t\t\t\t</form>";
}
function buttondelete($source, $path, $dirname)
{
    return "<form action='matching_source.php' method='POST' >\n\t\t\t\t\t<input type='hidden' name='source' value='{$source}'>\n\t\t\t\t\t<input type='hidden' name='path' value='{$path}'>\n\t\t\t\t\t<input type='hidden' name='dirname' value='{$dirname}'>\n\t\t\t\t\t<input type='submit' name='delete' value='l&ouml;schen'>\n\t\t\t\t</form>";
}
echo "<table border='1'>";
$directory = opendir($path);
echo "<tr><td>Hauptordner</td><td colspan='2'>" . buttonpath($source, $_SESSION["lisa_path"] . "/" . $_SESSION["settings"]["images_matching"]) . "</td>";
echo "<tr><td>Eine Ebende zurück</td><td colspan='2'>" . buttonpath($source, prepath($path)) . "</td>";
echo "<tr><td>\n\t\t\t\t\t<form action='matching_source.php' method='POST'>\n\t\t\t\t\t\t<input type='text' name='dirname'>\n\t\t\t\t\t\t<input type='hidden' name='source' value='{$source}'>\n\t\t\t\t\t\t<input type='hidden' name='path' value='{$path}'>\n\t\t\t\t</td>\n\t\t\t\t<td colspan='2'>\n\t\t\t\t\t\t<input type='submit' name='createdir' value='Ordner erstellen'>\n\t\t\t\t\t</form>\n\t\t\t\t</td>";
while ($file = readdir($directory)) {
    $extention = pathinfo($file, PATHINFO_EXTENSION);
    if ($file != "." && $file != ".." && is_dir($path . "/" . $file)) {
        echo "<tr><td>" . enc_html($path . "/" . $file) . "</td><td>" . buttonpath($source, $path . "/" . $file) . "</td><td>" . buttondelete($source, $path, $file) . "</td>";
    } else {
        if ($extention == "zip") {
            echo "<tr><td>" . enc_html($path . "/" . $file) . "</td><td> &nbsp; </td><td>" . buttondelete($source, $path, $file) . "</td>";
        }
    }
}
closedir($directory);
echo "</table>";
echo "<br><h2>Neue ZIP-Datei mit Bildern hochladen</h2><br>\n\t\t<form action='matching_source.php' method='post' enctype='multipart/form-data'>\n\t\t\t<input type='hidden' name='source' value='{$source}'>\n\t\t\t<input type='hidden' name='path' value='{$path}'>\n\t\t\t<input type='hidden' name='path' value='{$path}'>\n\t\t\t<table border='0'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<label for='file'>Filename:</label>\n\t\t\t\t\t\t<input type='file' name='file' id='file'>\n\t\t\t\t\t\t<input type='submit' name='submit' value='Submit'>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\tDateinamen-Kodierung ZIP-Datei:\n\t\t\t\t\t\t<input type='text' name='zipencsource' value='{$zipencsource}'>\n\t\t\t\t\t</td>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\tDateinamen-Kodierung Server-Datei-System:\n\t\t\t\t\t\t<input type='text' name='zipenctarget' value='{$zipenctarget}'>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\tMögliche Kodierungen u.a.: auto oder CP850,CP437,UTF-8,ISO-8859-1\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</form>";
echo "<a href='matching_index.php'> Zur&uuml;ck </a>";
$body = "<br>IP:" . $_SERVER["REMOTE_ADDR"] . "<br>";
echo create_footer("{$body}");
Пример #4
0
            $birthday_month = "<td bgcolor='#00FF00'>OK</td>";
        } else {
            $birthday_month = "<td bgcolor='#FF0000'>Error</td>";
            $different++;
        }
        if ($match["lisa"]["birthday_year"] == $match["bbsplan"]["birthday_year"]) {
            $birthday_year = "<td bgcolor='#00FF00'>OK</td>";
        } else {
            $birthday_year = "<td bgcolor='#FF0000'>Error</td>";
            $different++;
        }
        if ($match["lisa"]["class"] == $match["bbsplan"]["class"]) {
            $class = "<td bgcolor='#00FF00'>OK</td>";
        } else {
            $class = "<td bgcolor='#FF0000'>Error</td>";
            $different++;
        }
        echo "<tr><td>{$different}</td><td>" . enc_html($match["lisa"]["picfile"]) . "</td><td>" . enc_html($match["bbsplan"]["picfile"]) . "</td>{$checked} {$lastname} {$givenname} {$birthday_day}  {$birthday_month}  {$birthday_year}  {$class}</tr>\n";
    }
    echo "<tr><td colspan='10'> <input type='submit' name='checked' value='Speichere Aktivierungen'></td></tr>";
    echo "</form>";
    echo "</table>";
} else {
    echo "<br>Keine Matches gefunden!<br>\n";
}
echo "<a href='matching_index.php'> Zur&uuml;ck </a>";
?>



Пример #5
0
function enc_htmlnbsp($str)
{
    $str = enc_html($str);
    $str = str_replace(' ', '&nbsp;', $str);
    return $str;
}