Ran PHPCBF on PHP files

This commit is contained in:
Joshua Ramon Enslin 2019-08-27 00:31:46 +02:00 committed by Stefan Rohde-Enslin
parent f7140573e1
commit 4abb415054
16 changed files with 857 additions and 954 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/csv
/translation-importer

File diff suppressed because one or more lines are too long

View File

@ -1,46 +1,43 @@
<?php
ob_start();
include_once ('inc/zeichen.php');
$filename=$_GET['fnam'];
$csv_datei = 'csv/'.$filename;
require_once 'inc/zeichen.php';
$filename = $_GET['fnam'];
$csv_datei = 'csv/' . $filename;
mkdir("xml",0777);
mkdir("xml", 0777);
$fp = fopen ( $csv_datei, 'r' );
$y = 0;
while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
{
$y++;
//echo '<b>Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).'</b><br>';
$zieldatei = 'xml/'.$y.'.xml';
if (!$handle = fopen($zieldatei, 'w'))
{
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent='<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"; // normal
$somecontent=$somecontent.'<record>'."\n";
$y++;
//echo '<b>Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).'</b><br>';
$zieldatei = 'xml/' . $y . '.xml';
if (!$handle = fopen($zieldatei, 'w')) {
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent = '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n"; // normal
$somecontent = $somecontent . '<record>' . "\n";
for ( $x = 0; $x < count ( $zeile ); $x++ )
{
$inhalt[$y][$x]=$zeile[$x];
//echo '<b>'.$inhalt[1][$x].'</b> --> '.$zeile[$x].'<br>';
if ($inhalt[$y][$x]=='') $inhalt[$y][$x]='ERSATZ';
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.(($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
for ($x = 0; $x < count ( $zeile ); $x++)
{
$inhalt[$y][$x] = $zeile[$x];
//echo '<b>'.$inhalt[1][$x].'</b> --> '.$zeile[$x].'<br>';
if ($inhalt[$y][$x] == '') $inhalt[$y][$x] = 'ERSATZ';
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.(($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
}
$somecontent=$somecontent.'</record>';
//if ($y>1)
//{
if (fwrite($handle, $somecontent) === FALSE)
{
echo "Cannot write to file ($filename)";exit;
}
// echo "Success, wrote to file ($filename)<br><br>";
//}
fclose($handle);
$somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . transform($inhalt[$y][$x]) . '</' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //normaleinstellung
}
$somecontent = $somecontent . '</record>';
//if ($y>1)
//{
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";exit;
}
// echo "Success, wrote to file ($filename)<br><br>";
//}
fclose($handle);
}
fclose($fp);
echo ($y-1).' files created';
echo ($y - 1) . ' files created';
echo '<br><a href="zipit.php"><img src="img/go.gif"> Download as zip</a>';
?>

View File

@ -1,12 +1,12 @@
<?php
ob_start();
error_reporting(E_ALL);
ini_set('display_errors',1);
ini_set('display_errors', 1);
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'; // für ungarn sonst weg //////////////////////
include ('inc/zeichen.php');
$filename=$_GET['fnam'];
$csv_datei = 'csv/'.$filename;
require 'inc/zeichen.php';
$filename = $_GET['fnam'];
$csv_datei = 'csv/' . $filename;
if (!file_exists("xml")) {
mkdir("xml", 0700);
@ -16,39 +16,36 @@ $fp = fopen ( $csv_datei, 'r' );
$y = 0;
while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
{
$y++;
//echo '<b>Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).'</b><br>';
$zieldatei = 'xml/'.$y.'.xml';
if (!$handle = fopen($zieldatei, 'w'))
{
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent='<?xml version="1.0" encoding="UTF-8"?>'."\n"; // für Ungarn ///////////////////////////////////
/*$somecontent='<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"; // normal */
$somecontent=$somecontent.'<record>'."\n";
$y++;
//echo '<b>Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).'</b><br>';
$zieldatei = 'xml/' . $y . '.xml';
if (!$handle = fopen($zieldatei, 'w')) {
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent = '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; // für Ungarn ///////////////////////////////////
/*$somecontent='<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"; // normal */
$somecontent = $somecontent . '<record>' . "\n";
for ( $x = 0; $x < count ( $zeile ); $x++ )
{
$inhalt[$y][$x]=$zeile[$x];
//echo '<b>'.$inhalt[1][$x].'</b> --> '.$zeile[$x].'<br>';
if ($inhalt[$y][$x]=='') $inhalt[$y][$x]='ERSATZ';
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.(($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
for ($x = 0; $x < count ( $zeile ); $x++)
{
$inhalt[$y][$x] = $zeile[$x];
//echo '<b>'.$inhalt[1][$x].'</b> --> '.$zeile[$x].'<br>';
if ($inhalt[$y][$x] == '') $inhalt[$y][$x] = 'ERSATZ';
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
$somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '</' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
}
$somecontent=$somecontent.'</record>';
//if ($y>1)
//{
if (fwrite($handle, $somecontent) === FALSE)
{
echo "Cannot write to file ($filename)";exit;
}
// echo "Success, wrote to file ($filename)<br><br>";
//}
fclose($handle);
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
}
$somecontent = $somecontent . '</record>';
//if ($y>1)
//{
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";exit;
}
// echo "Success, wrote to file ($filename)<br><br>";
//}
fclose($handle);
}
fclose($fp);
echo ($y-1).' files created';
echo ($y - 1) . ' files created';
echo '<br><a href="zipit.php"><img src="img/go.gif"> Download as zip</a>';
?>

View File

@ -1,49 +1,46 @@
<?php
ob_start();
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'; // für ungarn sonst weg //////////////////////
include ('inc/zeichen.php');
$filename=$_GET['fnam'];
$csv_datei = 'csv/'.$filename;
require 'inc/zeichen.php';
$filename = $_GET['fnam'];
$csv_datei = 'csv/' . $filename;
mkdir("xml",0777);
mkdir("xml", 0777);
$fp = fopen ( $csv_datei, 'r' );
$y = 0;
while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
//while ( $zeile = fgetcsv ( $fp, 100000, ',' ) )
{
$y++;
//echo '<b>Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).'</b><br>';
$zieldatei = 'xml/'.$y.'.xml';
if (!$handle = fopen($zieldatei, 'w'))
{
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent='<?xml version="1.0" encoding="UTF-8"?>'."\n"; // für Ungarn ///////////////////////////////////
/*$somecontent='<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"; // normal */
$somecontent=$somecontent.'<record>'."\n";
$y++;
//echo '<b>Zeile='.$y.' Anzahl in Zeile: '.count ( $zeile ).'</b><br>';
$zieldatei = 'xml/' . $y . '.xml';
if (!$handle = fopen($zieldatei, 'w')) {
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent = '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; // für Ungarn ///////////////////////////////////
/*$somecontent='<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"; // normal */
$somecontent = $somecontent . '<record>' . "\n";
for ( $x = 0; $x < count ( $zeile ); $x++ )
{
$inhalt[$y][$x]=$zeile[$x];
//echo '<b>'.$inhalt[1][$x].'</b> --> '.$zeile[$x].'<br>';
if ($inhalt[$y][$x]=='') $inhalt[$y][$x]='ERSATZ';
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.(($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
for ($x = 0; $x < count ( $zeile ); $x++)
{
$inhalt[$y][$x] = $zeile[$x];
//echo '<b>'.$inhalt[1][$x].'</b> --> '.$zeile[$x].'<br>';
if ($inhalt[$y][$x] == '') $inhalt[$y][$x] = 'ERSATZ';
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.utf8_decode(transform($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; // für utf8
$somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '</' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //für ungarn sonst weg //////////////////////////////////////////////////////////////
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
}
echo $y.'<br>';
$somecontent=$somecontent.'</record>';
//if ($y>1)
//{
if (fwrite($handle, $somecontent) === FALSE)
{
echo "Cannot write to file ($filename)";exit;
}
// echo "Success, wrote to file ($filename)<br><br>";
//}
fclose($handle);
//$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
}
echo $y . '<br>';
$somecontent = $somecontent . '</record>';
//if ($y>1)
//{
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";exit;
}
// echo "Success, wrote to file ($filename)<br><br>";
//}
fclose($handle);
}
fclose($fp);
echo '<a href="zipit.php">download as zip</a>';
?>

View File

@ -1,37 +1,34 @@
<?PHP
ob_start();
include_once ('inc/zeichen.php');
$filename=$_GET['fnam'];
$csv_datei = 'csv/'.$filename;
require_once 'inc/zeichen.php';
$filename = $_GET['fnam'];
$csv_datei = 'csv/' . $filename;
mkdir("xml",0777);
mkdir("xml", 0777);
$fp = fopen ( $csv_datei, 'r' );
$y = 0;
while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
{
$y++;
$zieldatei = 'xml/'.$y.'.xml';
if (!$handle = fopen($zieldatei, 'w'))
{
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent='<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"; // normal
$somecontent=$somecontent.'<record>'."\n";
$y++;
$zieldatei = 'xml/' . $y . '.xml';
if (!$handle = fopen($zieldatei, 'w')) {
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent = '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n"; // normal
$somecontent = $somecontent . '<record>' . "\n";
for ( $x = 0; $x < count ( $zeile ); $x++ )
{
$inhalt[$y][$x]=$zeile[$x];
//if ($inhalt[$y][$x]=='') $inhalt[$y][$x]='ERSATZ';
$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.transform($inhalt[$y][$x]).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //normaleinstellung
}
$somecontent=$somecontent.'</record>';
if (fwrite($handle, $somecontent) === FALSE)
{
echo "Cannot write to file ($filename)";exit;
}
fclose($handle);
for ($x = 0; $x < count ( $zeile ); $x++)
{
$inhalt[$y][$x] = $zeile[$x];
//if ($inhalt[$y][$x]=='') $inhalt[$y][$x]='ERSATZ';
$somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . transform($inhalt[$y][$x]) . '</' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //normaleinstellung
}
$somecontent = $somecontent . '</record>';
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";exit;
}
fclose($handle);
}
fclose($fp);
echo ($y-1).' files created';
echo ($y - 1) . ' files created';
echo '<br><a href="zipit.php"><img src="img/go.gif"> Download as zip</a>';
?>

View File

@ -3,40 +3,37 @@
//ini_set('display_errors',1);
ob_start();
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'; // für ungarn sonst weg //////////////////////
include ('inc/zeichen.php');
$filename=$_GET['fnam'];
$csv_datei = 'csv/'.$filename;
require 'inc/zeichen.php';
$filename = $_GET['fnam'];
$csv_datei = 'csv/' . $filename;
mkdir("xml",0777);
mkdir("xml", 0777);
$fp = fopen ( $csv_datei, 'r' );
$y = 0;
while ( $zeile = fgetcsv ( $fp, 100000, ';' ) )
{
$y++;
$zieldatei = 'xml/'.$y.'.xml';
if (!$handle = fopen($zieldatei, 'w'))
{
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent='<?xml version="1.0" encoding="UTF-8"?>'."\n"; // für Ungarn ///////////////////////////////////
$somecontent=$somecontent.'<record>'."\n";
$y++;
$zieldatei = 'xml/' . $y . '.xml';
if (!$handle = fopen($zieldatei, 'w')) {
echo "Cannot open file ($zieldatei)";exit;
}
$somecontent = '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; // für Ungarn ///////////////////////////////////
$somecontent = $somecontent . '<record>' . "\n";
for ( $x = 0; $x < count ( $zeile ); $x++ )
{
$inhalt[$y][$x]=$zeile[$x];
$inhalt[$y][$x] = preg_replace('/[\x00-\x1F\x7F]/u', '', $inhalt[$y][$x]);
$inhalt[$y][$x] = str_replace('>',']',str_replace('<','[',$inhalt[$y][$x]));
//if ($y!=1) $inhalt[$y][$x] = '<![CDATA['.$inhalt[$y][$x].']]>';
$somecontent=$somecontent.'<'.tagify(transform($inhalt[1][$x])).'>'.(($inhalt[$y][$x])).'</'.tagify(transform($inhalt[1][$x])).'>'."\n"; //für ungarn sonst weg }
}
$somecontent=$somecontent.'</record>';
if (fwrite($handle, $somecontent) === FALSE)
{
echo "Cannot write to file ($filename)";exit;
}
fclose($handle);
for ($x = 0; $x < count ( $zeile ); $x++)
{
$inhalt[$y][$x] = $zeile[$x];
$inhalt[$y][$x] = preg_replace('/[\x00-\x1F\x7F]/u', '', $inhalt[$y][$x]);
$inhalt[$y][$x] = str_replace('>', ']', str_replace('<', '[', $inhalt[$y][$x]));
//if ($y!=1) $inhalt[$y][$x] = '<![CDATA['.$inhalt[$y][$x].']]>';
$somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '</' . tagify(transform($inhalt[1][$x])) . '>' . "\n"; //für ungarn sonst weg }
}
$somecontent = $somecontent . '</record>';
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";exit;
}
fclose($handle);
}
fclose($fp);
echo ($y-1).' files created';
echo ($y - 1) . ' files created';
echo '<br><a href="zipit.php"><img src="img/go.gif"> Download as zip</a>';
?>

229
index.php
View File

@ -1,6 +1,6 @@
<?PHP
error_reporting(E_ALL);
ini_set('display_errors',1);
ini_set('display_errors', 1);
?>
<head>
<script language="javascript" type="text/javascript">
@ -37,97 +37,154 @@ echo '<input type="submit" value="Upload" />';
echo '</form>';
echo '</div>';
echo '<div class="main_fieldlist">';
include('values/all_fields.php');
require 'values/all_fields.php';
echo '<p>Currently approved tags (column names) for md:import:</p>';
//echo '<table>';
//echo '<th>Name</th><th>Mandatory</th><th>Allowed</th><th>Remarks</th><th>Dependencies</th>';
$categories=array('basic','other object title','detailed description','inscription','material_technique separate','separate dimensions','comparable objects','closer location','categorisation', 'object administration', 'object history', 'worth', 'state', 'location', 'rights (object)', 'remarks', 'links', 'literature', 'object_group', 'tags', 'events: related place', 'events: related actor', 'events: related time', 'images', 'resources', 'events: production', 'events: finding', 'events: publication', 'events: template creation', 'events: depiction_who', 'events: depiction_place', 'events: use', 'events: writing', 'events: colleting', 'events: painting', 'events: taking', 'events: receiving', 'events: printing plate production', 'events: sending', 'events: issuing', 'events: signing', 'events: type description', 'events:drawing', 'events: copying', 'events: has lived', 'events: commissioned', 'events: printed', 'events: spoken', 'events: sung', 'events: decor designed', 'events: form designed', 'events: modelled', 'events: signed', 'events: mentioning', 'events: burying', 'events: intellectual creation', 'events: painting on', 'events: illustrated' );
$cat_counter=0;
for ($i=0;$i<count($allowed);$i++)
$categories = array('basic','other object title','detailed description','inscription','material_technique separate','separate dimensions','comparable objects','closer location','categorisation', 'object administration', 'object history', 'worth', 'state', 'location', 'rights (object)', 'remarks', 'links', 'literature', 'object_group', 'tags', 'events: related place', 'events: related actor', 'events: related time', 'images', 'resources', 'events: production', 'events: finding', 'events: publication', 'events: template creation', 'events: depiction_who', 'events: depiction_place', 'events: use', 'events: writing', 'events: colleting', 'events: painting', 'events: taking', 'events: receiving', 'events: printing plate production', 'events: sending', 'events: issuing', 'events: signing', 'events: type description', 'events:drawing', 'events: copying', 'events: has lived', 'events: commissioned', 'events: printed', 'events: spoken', 'events: sung', 'events: decor designed', 'events: form designed', 'events: modelled', 'events: signed', 'events: mentioning', 'events: burying', 'events: intellectual creation', 'events: painting on', 'events: illustrated' );
$cat_counter = 0;
for ($i = 0; $i < count($allowed); $i++)
{
//echo '<tr>';
if ($i==0) {echo '<br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==10) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==12) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==15) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==18) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==20) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==36) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==39) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==41) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==47) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==53) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==57) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==65) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==67) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==75) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==78) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==82) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==86) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==108) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==123) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==133) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==137) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==141) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==145) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==215) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==233) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==247) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==261) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==275) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==289) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==293) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;} /**/
if ($i==297) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==311) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==325) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==339) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==353) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==367) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==381) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==395) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==409) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==423) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==437) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==451) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==465) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==479) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==489) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==503) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==517) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==531) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==545) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==559) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==573) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==587) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==601) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==615) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==629) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==643) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
if ($i==657) {echo '<br/><br/><b>'.$categories[$cat_counter].'</b><br/>';$cat_counter++;}
/*
*/
echo '<span class="couponcode" style="display:inline-block;padding:3px;border:1px solid #666666;border-radius:2px;margin:2px;';
if ($allowed[$i][1]=='y') echo 'background-color:#eeee99;'; else echo 'background-color:#eeeeee;';
echo '">';
echo '<span class="coupontooltip">';
echo '<p style="text-align:center;padding:0px;margin:0px;line-height:18px;">'.$allowed[$i][0].'</p><hr>';
if (isset($allowed[$i][1])) echo '<p>Mandatory: '.$allowed[$i][1]."</p>";
if (isset($allowed[$i][5])) echo '<p class="hint" style="background-color:black;">'.$allowed[$i][5].'</p>';
if (isset($allowed[$i][2])) echo '<p>Format: '.$allowed[$i][2]."</p>";
if (isset($allowed[$i][3])) echo '<p>Allowed values: '.$allowed[$i][3]."</p>";
if (isset($allowed[$i][4])) echo '<p>Dependencies: '.$allowed[$i][4]."</p>";
echo '</span>';
echo '<a';
echo '>'.$allowed[$i][0].'</a>';
echo '</span>';
// echo '<td>'.$allowed[$i][1].'</td>';
// echo '<td>'.$allowed[$i][2].'</td>';
// echo '<td>'.$allowed[$i][3].'</td>';
// echo '<td>'.$allowed[$i][4].'</td>';
//echo '</tr>';
//echo '<tr>';
if ($i == 0) {echo '<br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 10) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 12) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 15) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 18) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 20) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 36) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 39) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 41) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 47) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 53) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 57) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 65) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 67) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 75) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 78) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 82) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 86) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 108) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 123) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 133) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 137) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 141) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 145) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 215) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 233) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 247) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 261) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 275) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 289) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 293) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
} /**/
if ($i == 297) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 311) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 325) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 339) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 353) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 367) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 381) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 395) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 409) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 423) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 437) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 451) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 465) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 479) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 489) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 503) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 517) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 531) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 545) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 559) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 573) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 587) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 601) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 615) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 629) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 643) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
if ($i == 657) {echo '<br/><br/><b>' . $categories[$cat_counter] . '</b><br/>';$cat_counter++;
}
/*
*/
echo '<span class="couponcode" style="display:inline-block;padding:3px;border:1px solid #666666;border-radius:2px;margin:2px;';
if ($allowed[$i][1] == 'y') echo 'background-color:#eeee99;'; else echo 'background-color:#eeeeee;';
echo '">';
echo '<span class="coupontooltip">';
echo '<p style="text-align:center;padding:0px;margin:0px;line-height:18px;">' . $allowed[$i][0] . '</p><hr>';
if (isset($allowed[$i][1])) echo '<p>Mandatory: ' . $allowed[$i][1] . "</p>";
if (isset($allowed[$i][5])) echo '<p class="hint" style="background-color:black;">' . $allowed[$i][5] . '</p>';
if (isset($allowed[$i][2])) echo '<p>Format: ' . $allowed[$i][2] . "</p>";
if (isset($allowed[$i][3])) echo '<p>Allowed values: ' . $allowed[$i][3] . "</p>";
if (isset($allowed[$i][4])) echo '<p>Dependencies: ' . $allowed[$i][4] . "</p>";
echo '</span>';
echo '<a';
echo '>' . $allowed[$i][0] . '</a>';
echo '</span>';
// echo '<td>'.$allowed[$i][1].'</td>';
// echo '<td>'.$allowed[$i][2].'</td>';
// echo '<td>'.$allowed[$i][3].'</td>';
// echo '<td>'.$allowed[$i][4].'</td>';
//echo '</tr>';
}
//echo '</table>';
//print_r($allowed);
echo '</div>';
echo '</div>';
?>

View File

@ -1,5 +1,5 @@
<?PHP
$semikoma=$_GET['semikoma'];
$semikoma = $_GET['semikoma'];
echo '<link rel="stylesheet" type="text/css" href="css/main.css">';
echo '<div class="title">';
echo 'museum-digital CSV to XML converter';
@ -8,10 +8,9 @@ echo '<div class="maincontent">';
echo '<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">';
echo '<tr>';
echo '<td width="50%">';
echo 'Please wait ... (transforming)<hr>';
include('csv_laden_iso.php');
echo '</td>';
echo 'Please wait ... (transforming)<hr>';
require 'csv_laden_iso.php';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
?>

View File

@ -4,12 +4,12 @@ echo '<div class="title">';
echo 'museum-digital CSV to XML converter';
echo '</div>';
echo '<div class="maincontent">';
$semikoma=$_GET['semikoma'];
$semikoma = $_GET['semikoma'];
echo '<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%" style="border-bottom:1px solid #000000;padding-bottom:3px;margin-bottom:5px;">';
echo '<tr>';
echo '<td width="80%">';
echo 'Please wait ... (checking validity)';
echo '</td>';
echo 'Please wait ... (checking validity)';
echo '</td>';
echo '<td style="text-align:right;padding-top:0px;padding-bottom:0px;">';
echo '<form action="index.php" style="margin:0px;padding:0px;">';
echo '<input type="submit" value="Reload" />';
@ -17,6 +17,5 @@ echo '</form>';
echo '</td>';
echo '</tr>';
echo '</table>';
include('csv_check.php');
require 'csv_check.php';
echo '</div>';
?>

View File

@ -1,7 +1,7 @@
<?PHP
//error_reporting(E_ALL);
//ini_set('display_errors',1);
$semikoma=$_GET['semikoma'];
$semikoma = $_GET['semikoma'];
echo '<link rel="stylesheet" type="text/css" href="css/main.css">';
echo '<div class="title">';
echo 'museum-digital CSV to XML converter';
@ -10,10 +10,9 @@ echo '<div class="maincontent">';
echo '<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">';
echo '<tr>';
echo '<td width="50%">';
echo 'Please wait ... (transforming)<hr>';
include('csv_laden_utf.php');
echo '</td>';
echo 'Please wait ... (transforming)<hr>';
require 'csv_laden_utf.php';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
?>

View File

@ -4,14 +4,13 @@ echo '<div class="title">';
echo 'museum-digital CSV to XML converter';
echo '</div>';
echo '<div class="maincontent">';
$semikoma=$_GET['semikoma'];
$semikoma = $_GET['semikoma'];
echo '<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">';
echo '<tr>';
echo '<td width="50%">';
echo 'Please wait ... (transforming)<hr>';
include('csv_laden.php');
echo '</td>';
echo 'Please wait ... (transforming)<hr>';
require 'csv_laden.php';
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
?>

View File

@ -4,12 +4,12 @@ echo '<div class="title">';
echo 'museum-digital CSV to XML converter';
echo '</div>';
echo '<div class="maincontent">';
$semikoma=$_GET['semikoma'];
$semikoma = $_GET['semikoma'];
echo '<table border="0" cellpadding="0" cellspacing="0" summary="" width="100%">';
echo '<tr>';
echo '<td width="50%">';
echo 'Please wait ... (transforming)<hr>';
include('csv_laden_hu.php');
require 'csv_laden_hu.php';
echo '</td>';
echo '</tr>';
echo '</table>';

View File

@ -5,36 +5,32 @@ echo 'museum-digital CSV to XML converter';
echo '</div>';
echo '<div class="maincontent">';
$target = "csv/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$target = $target . basename( $_FILES['uploaded']['name']);
$targetpart = basename( $_FILES['uploaded']['name']);
$ok=1;
$semikoma=$_POST['deli'];
$ok = 1;
$semikoma = $_POST['deli'];
//This is our size condition
if ($uploaded_size > 40000000)
{
echo "Your file is too large.<br>";
$ok=0;
if ($uploaded_size > 40000000) {
echo "Your file is too large.<br>";
$ok = 0;
}
//Here we check that $ok was not set to 0 by an error
if ($ok==0)
{
echo "Sorry your file was not uploaded";
if ($ok == 0) {
echo "Sorry your file was not uploaded";
}
else
{
//If everything is ok we try to upload it
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file <b>". basename( $_FILES['uploaded']['name']). "</b> has been uploaded<hr>";
echo '<a href="index2.php?fnam='.basename( $_FILES['uploaded']['name']).'"><img src="img/go.gif"> Create XML (iso8859)</a><br>';
echo '<a href="index4.php?fnam='.basename( $_FILES['uploaded']['name']).'"><img src="img/go.gif"> Create XML (utf-8)</a><br>';
echo '<a href="index3.php?fnam='.basename( $_FILES['uploaded']['name']).'"><img src="img/go.gif"> Check validity for museum-digital import</a>';
}
else
{
echo "Sorry, there was a problem uploading your file.";
}
//If everything is ok we try to upload it
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {
echo "The file <b>" . basename( $_FILES['uploaded']['name']) . "</b> has been uploaded<hr>";
echo '<a href="index2.php?fnam=' . basename( $_FILES['uploaded']['name']) . '"><img src="img/go.gif"> Create XML (iso8859)</a><br>';
echo '<a href="index4.php?fnam=' . basename( $_FILES['uploaded']['name']) . '"><img src="img/go.gif"> Create XML (utf-8)</a><br>';
echo '<a href="index3.php?fnam=' . basename( $_FILES['uploaded']['name']) . '"><img src="img/go.gif"> Check validity for museum-digital import</a>';
}
else
{
echo "Sorry, there was a problem uploading your file.";
}
}
echo '</div>';
?>

View File

@ -7,7 +7,7 @@
4: dependent fields
5: remarks
*/
$allowed=array(
$allowed = array(
array ('inventory_number','y','text/utf8','freetext','none','Only unique values allowed'),
array ('institution_name','n','text/utf8','freetext','none','If name of institution is given it has to be exactly the same as already known in museum-digital'),
array ('collection_name1','n','text/utf8','freetext','none','Use if object belongs to a collection. If collection is already in museum-digital, please use exactly the same name'),
@ -692,4 +692,3 @@ array ('illustrated_annotation2', 'n', ''),
);
?>

View File

@ -1,26 +1,26 @@
<?PHP
include_once("inc/zip.php");
require_once "inc/zip.php";
$fileTime = date("D, d M Y H:i:s T");
$fileDir='xml/';
$fileDir = 'xml/';
$zip = new Zip();
//$zip->setComment("Example Zip file.\nCreated on " . date('l jS \of F Y h:i:s A'));
//$zip->addFile("Hello World!", "hello.txt");
if ($handle = opendir($fileDir)) {
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
if (strpos($file, ".xml") !== false) {
$pathData = pathinfo($fileDir . $file);
$fileName = $pathData['filename'];
if ($file!='1.xml')
$zip->addFile(file_get_contents($fileDir . $file), $file, filectime($fileDir . $file));
}
}
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
if (strpos($file, ".xml") !== false) {
$pathData = pathinfo($fileDir . $file);
$fileName = $pathData['filename'];
if ($file != '1.xml')
$zip->addFile(file_get_contents($fileDir . $file), $file, filectime($fileDir . $file));
}
}
}
if (ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off');
ini_set('zlib.output_compression', 'Off');
}
$zip->finalize(); // Not scrictly necessary, the next line will call it anyway.
@ -35,23 +35,23 @@ header("Connection: close");
header("Content-Type: application/zip");
header('Content-Disposition: attachment; filename="csv_xml.zip";' );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ". $length);
header("Content-Length: " . $length);
echo $zipData;
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object);
}
}
reset($objects);
rmdir($dir);
}
}
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir . "/" . $object) == "dir") rrmdir($dir . "/" . $object); else unlink($dir . "/" . $object);
}
}
reset($objects);
rmdir($dir);
}
$dir_name='xml';
}
$dir_name = 'xml';
rrmdir($dir_name);
?>