jb-data.de/ilo_new.php
2025-08-11 22:23:30 +02:00

40 lines
No EOL
1.2 KiB
PHP

<?php
/*
error_reporting(E_ALL); ini_set('display_errors',0);
$kw_aktuell = (int)date('W');
$jahr = (int)date('Y');
require('lib/config.php');
require('lib/mysql.class.php');
$GLOBALS['mysql'] = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
mysqli_set_charset($GLOBALS['mysql'], 'utf8');
header("Content-Type: text/html; charset=utf-8");
$url='ilox.xls';
$xml = simplexml_load_file($url);
//----------------------------------------------------------------------------------------------------------------
for ($i = 0; $i <= 1000; $i++ ) {
if (strlen($xml->pod[$i]->belegnr)<2) { echo 'Abbruch in Zeile: '.$i.'</br>'; break; }
$temp=' '; $temp=$xml->pod[$i]->belegnr; echo "in bearbeitung: ".$temp; echo "</br>";
$scandaten = $GLOBALS['mysql']->query_single("SELECT * FROM ilonexs WHERE label='".$temp."'");
if($scandaten['num_rows']==0) {
$GLOBALS['mysql']->insert("INSERT INTO ilonexs (label) VALUES('".$temp."')");
echo "Label erstellt: ".$temp; echo "</br>";
}
}
//----------------------------------------------------------------------------------------------------------------
//echo "<pre>"; print_r($xmldata); echo "</pre>";
//echo "<pre>"; print_r($output); echo "</pre>";
*/
?>