|
|
|
@ -3,7 +3,7 @@ ob_start();
|
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
|
|
|
|
|
|
include ('inc/zeichen.php');
|
|
|
|
|
require 'inc/zeichen.php';
|
|
|
|
|
$filename = $_GET['fnam'];
|
|
|
|
|
$csv_datei = 'csv/' . $filename;
|
|
|
|
|
|
|
|
|
@ -34,8 +34,7 @@ for ( $x = 0; $x < count ( $zeile ); $x++ )
|
|
|
|
|
{
|
|
|
|
|
$zeile[$x] = str_replace("\xEF\xBB\xBF", "", $zeile[$x]);
|
|
|
|
|
$inhalt[$y][$x] = $zeile[$x];
|
|
|
|
|
if (!in_array($inhalt[1][$x], $allowed))
|
|
|
|
|
{
|
|
|
|
|
if (!in_array($inhalt[1][$x], $allowed)) {
|
|
|
|
|
echo '<br><i style="font-style:normal;color:#990000;">ERROR in column ' . $x . ' created by value: ' . $inhalt[1][$x] . '</i>';
|
|
|
|
|
$error = $error + 1;
|
|
|
|
|
}
|
|
|
|
@ -48,16 +47,17 @@ if ($error != 0) echo '<br><b style="color:#990000;">Not allowed tags found !</b
|
|
|
|
|
//// Check #2
|
|
|
|
|
echo '<br><br>2: Not allowed multiple use of tags (column names)?';
|
|
|
|
|
$compare = array_unique($zeile);
|
|
|
|
|
|
|
|
|
|
function identical_values($arrayA, $arrayB)
|
|
|
|
|
{
|
|
|
|
|
sort( $arrayA );
|
|
|
|
|
sort( $arrayB );
|
|
|
|
|
return $arrayA == $arrayB;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$result = identical_values($zeile, $compare);
|
|
|
|
|
if ($result==false)
|
|
|
|
|
{
|
|
|
|
|
if ($result == false) {
|
|
|
|
|
echo '<br><b style="color:#990000;">There are dublicate column names !</b>';
|
|
|
|
|
$error = $error + 1;
|
|
|
|
|
}
|
|
|
|
@ -85,15 +85,17 @@ fclose($fp);
|
|
|
|
|
echo '<br><br>3: Mandatory tags available and always filled in?';
|
|
|
|
|
unset($inv_array);
|
|
|
|
|
$inv_error = 0;
|
|
|
|
|
|
|
|
|
|
function get_duplicates($array)
|
|
|
|
|
{
|
|
|
|
|
return array_unique( array_diff_assoc( $array, array_unique( $array ) ) );
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$mandatory = array('inventory_number','object_type','object_title','object_description');
|
|
|
|
|
for ($i = 0; $i < count ($mandatory); $i++)
|
|
|
|
|
{
|
|
|
|
|
if (!in_array($mandatory[$i],$erstezeile))
|
|
|
|
|
{
|
|
|
|
|
if (!in_array($mandatory[$i], $erstezeile)) {
|
|
|
|
|
echo '<br><i style="font-style:normal;color:#990000;">Mandatory: Column <b>' . $mandatory[$i] . '</b> missing</i>';
|
|
|
|
|
$error = $error + 1;
|
|
|
|
|
$inv_error = $inv_error + 1;
|
|
|
|
@ -103,14 +105,12 @@ for ($i=0;$i<count ($mandatory);$i++)
|
|
|
|
|
$spaltenr = array_search($mandatory[$i], $erstezeile);
|
|
|
|
|
for ($j = 0; $j < $y; $j++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j+1][$spaltenr]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j + 1][$spaltenr] == '') {
|
|
|
|
|
echo '<br><i style="font-style:normal;color:#990000;">Missing value for <b>' . $mandatory[$i] . '</b> in row ' . ($j + 1) . '</i>';
|
|
|
|
|
$error = $error + 1;
|
|
|
|
|
$inv_error = $inv_error + 1;
|
|
|
|
|
}
|
|
|
|
|
if ($mandatory[$i]=='inventory_number')
|
|
|
|
|
{
|
|
|
|
|
if ($mandatory[$i] == 'inventory_number') {
|
|
|
|
|
$inv_array[] = $inhalt[$j + 1][$spaltenr];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -121,12 +121,10 @@ if ($inv_error==0) echo '<br><i style="font-style:normal;color:#009900;">All man
|
|
|
|
|
|
|
|
|
|
///// Check #4
|
|
|
|
|
echo '<br><br>4: Inventory_number unique ?';
|
|
|
|
|
if (in_array('inventory_number',$erstezeile))
|
|
|
|
|
{
|
|
|
|
|
if (in_array('inventory_number', $erstezeile)) {
|
|
|
|
|
$doppelte_inv = get_duplicates($inv_array);
|
|
|
|
|
$doppelte_inv = array_values($doppelte_inv);
|
|
|
|
|
if (count($doppelte_inv)>0)
|
|
|
|
|
{
|
|
|
|
|
if (count($doppelte_inv) > 0) {
|
|
|
|
|
for ($i = 0; $i < count($doppelte_inv); $i++)
|
|
|
|
|
{
|
|
|
|
|
echo '<br><i style="font-style:normal;color:#990000;">Multiple use of inventory_number <b>' . $doppelte_inv[$i] . '</b></i>';
|
|
|
|
@ -143,75 +141,55 @@ else
|
|
|
|
|
|
|
|
|
|
///// Check #5
|
|
|
|
|
echo '<br><br>5: Dependent colums observed ?<br>';
|
|
|
|
|
if (array_search('object_other_title',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_other_title_kind_of',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_other_title', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('object_other_title_kind_of', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of object_other_title, object_other_title_kind_of is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('object_other_title_kind_of',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_other_title',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_other_title_kind_of', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('object_other_title', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of object_other_title, object_other_title_kind_of is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('other_object_title',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('other_object_title_in',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('other_object_title', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('other_object_title_in', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of other_object_title, other_object_title_in is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('other_object_title_in',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('other_object_title',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('other_object_title_in', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('other_object_title', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of other_object_title, other_object_title_in is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (array_search('detailed_description',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('detailed_description_md',$erstezeile)===false or array_search('detailed_description_extern',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('detailed_description', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('detailed_description_md', $erstezeile) === false or array_search('detailed_description_extern', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of detailed_description, detailed_description_md, detailed_description_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('detailed_description_md',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('detailed_description',$erstezeile)===false or array_search('detailed_description_extern',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('detailed_description_md', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('detailed_description', $erstezeile) === false or array_search('detailed_description_extern', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of detailed_description, detailed_description_md, detailed_description_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('detailed_description_extern',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('detailed_description',$erstezeile)===false or array_search('detailed_description_md',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('detailed_description_extern', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('detailed_description', $erstezeile) === false or array_search('detailed_description_md', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of detailed_description, detailed_description_md, detailed_description_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// dependency of colums: inscription. If one of inscription or inscription_md or inscription_extern is given - all three are necessary
|
|
|
|
|
if (array_search('inscription',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('inscription_md',$erstezeile)===false or array_search('inscription_extern',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('inscription', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('inscription_md', $erstezeile) === false or array_search('inscription_extern', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of inscription, inscription_md, inscription_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('inscription_md',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('inscription',$erstezeile)===false or array_search('inscription_extern',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('inscription_md', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('inscription', $erstezeile) === false or array_search('inscription_extern', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of inscription, inscription_md, inscription_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('inscription_extern',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('inscription',$erstezeile)===false or array_search('inscription_md',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('inscription_extern', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('inscription', $erstezeile) === false or array_search('inscription_md', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of inscription, inscription_md, inscription_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -219,24 +197,18 @@ if (array_search('inscription_extern',$erstezeile)!==false)
|
|
|
|
|
// dependency of colums: object_group1 to 5. If one of object_group_name1 or object_group_description1 or object_group_show1 is given - all three are necessary
|
|
|
|
|
for ($og = 1; $og < 6; $og++)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_group_name'.$og,$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_group_description'.$og,$erstezeile)===false or array_search('object_group_show'.$og,$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_group_name' . $og, $erstezeile) !== false) {
|
|
|
|
|
if (array_search('object_group_description' . $og, $erstezeile) === false or array_search('object_group_show' . $og, $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of object_group_name' . $og . ', object_group_description' . $og . ', object_group_show' . $og . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('object_group_description'.$og,$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_group_name'.$og,$erstezeile)===false or array_search('object_group_show'.$og,$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_group_description' . $og, $erstezeile) !== false) {
|
|
|
|
|
if (array_search('object_group_name' . $og, $erstezeile) === false or array_search('object_group_show' . $og, $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of object_group_name' . $og . ', object_group_description' . $og . ', object_group_show' . $og . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('object_group_show'.$og,$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_group_name'.$og,$erstezeile)===false or array_search('object_group_description'.$og,$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('object_group_show' . $og, $erstezeile) !== false) {
|
|
|
|
|
if (array_search('object_group_name' . $og, $erstezeile) === false or array_search('object_group_description' . $og, $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of object_group_name' . $og . ', object_group_description' . $og . ', object_group_show' . $og . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -245,246 +217,182 @@ for ($og=1;$og<6;$og++)
|
|
|
|
|
// dependency of colums: images. If one of image_name1 or image_rights1 or image_visible1 is given - all three are necessary
|
|
|
|
|
for ($im = 1; $im < 29; $im++)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('image_name'.$im,$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('image_rights'.$im,$erstezeile)===false or array_search('image_visible'.$im,$erstezeile)===false or array_search('image_main'.$im,$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
$depencymessage[]='One column of image_name'.$im.', image_rights'.$im.', image_visible'.$im.', image_main'.$im.' is missing'; }
|
|
|
|
|
if (array_search('image_name' . $im, $erstezeile) !== false) {
|
|
|
|
|
if (array_search('image_rights' . $im, $erstezeile) === false or array_search('image_visible' . $im, $erstezeile) === false or array_search('image_main' . $im, $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of image_name' . $im . ', image_rights' . $im . ', image_visible' . $im . ', image_main' . $im . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
if (array_search('image_rights'.$im,$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('image_name'.$im,$erstezeile)===false or array_search('image_visible'.$im,$erstezeile)===false or array_search('image_main'.$im,$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
$depencymessage[]='One column of image_name'.$im.', image_rights'.$im.', image_visible'.$im.', image_main'.$im.' is missing'; }
|
|
|
|
|
}
|
|
|
|
|
if (array_search('image_visible'.$im,$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('image_name'.$im,$erstezeile)===false or array_search('image_rights'.$im,$erstezeile)===false or array_search('image_main'.$im,$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
$depencymessage[]='One column of image_name'.$im.', image_rights'.$im.', image_visible'.$im.', image_main'.$im.' is missing'; }
|
|
|
|
|
if (array_search('image_rights' . $im, $erstezeile) !== false) {
|
|
|
|
|
if (array_search('image_name' . $im, $erstezeile) === false or array_search('image_visible' . $im, $erstezeile) === false or array_search('image_main' . $im, $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of image_name' . $im . ', image_rights' . $im . ', image_visible' . $im . ', image_main' . $im . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
if (array_search('image_main'.$im,$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('image_name'.$im,$erstezeile)===false or array_search('image_rights'.$im,$erstezeile)===false or array_search('image_visible'.$im,$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (array_search('image_visible' . $im, $erstezeile) !== false) {
|
|
|
|
|
if (array_search('image_name' . $im, $erstezeile) === false or array_search('image_rights' . $im, $erstezeile) === false or array_search('image_main' . $im, $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of image_name' . $im . ', image_rights' . $im . ', image_visible' . $im . ', image_main' . $im . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('image_main' . $im, $erstezeile) !== false) {
|
|
|
|
|
if (array_search('image_name' . $im, $erstezeile) === false or array_search('image_rights' . $im, $erstezeile) === false or array_search('image_visible' . $im, $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of image_name' . $im . ', image_rights' . $im . ', image_visible' . $im . ', image_main' . $im . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dependency of colums: comparable_objects_other_museums. If one of comparable_objects_other_museums or comparable_objects_other_museums_show_md or comparable_objects_other_museums_show_extern is given - all three are necessary
|
|
|
|
|
if (array_search('comparable_objects_other_museums',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('comparable_objects_other_museums_show_md',$erstezeile)===false or array_search('comparable_objects_other_museums_show_extern',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('comparable_objects_other_museums', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('comparable_objects_other_museums_show_md', $erstezeile) === false or array_search('comparable_objects_other_museums_show_extern', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of comparable_objects_other_museums, comparable_objects_other_museums_show_md, comparable_objects_other_museums_show_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('comparable_objects_other_museums_show_md',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('comparable_objects_other_museums',$erstezeile)===false or array_search('comparable_objects_other_museums_show_extern',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('comparable_objects_other_museums_show_md', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('comparable_objects_other_museums', $erstezeile) === false or array_search('comparable_objects_other_museums_show_extern', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of comparable_objects_other_museums, comparable_objects_other_museums_show_md, comparable_objects_other_museums_show_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('comparable_objects_other_museums_show_extern',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('comparable_objects_other_museums',$erstezeile)===false or array_search('comparable_objects_other_museums_show_md',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('comparable_objects_other_museums_show_extern', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('comparable_objects_other_museums', $erstezeile) === false or array_search('comparable_objects_other_museums_show_md', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of comparable_objects_other_museums, comparable_objects_other_museums_show_md, comparable_objects_other_museums_show_extern is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (array_search('dimensions_separate_length_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_length_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_length_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_length_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_length_value, dimensions_separate_length_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_length_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_length_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_length_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_length_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_length_value, dimensions_separate_length_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_width_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_width_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_width_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_width_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_width_value, dimensions_separate_width_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_width_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_width_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_width_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_width_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_width_value, dimensions_separate_width_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_height_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_height_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_height_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_height_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_height_value, dimensions_separate_height_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_height_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_height_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_height_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_height_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_height_value, dimensions_separate_height_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_diameter_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_diameter_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_diameter_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_diameter_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_diameter_value, dimensions_separate_diameter_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_diameter_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_diameter_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_diameter_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_diameter_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_diameter_value, dimensions_separate_diameter_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_wall_thickness_value, dimensions_separate_wall_thickness_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_wall_thickness_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_wall_thickness_value, dimensions_separate_wall_thickness_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_weight_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_weight_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_weight_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_weight_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_weight_value, dimensions_separate_weight_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('dimensions_separate_weight_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_weight_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('dimensions_separate_weight_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('dimensions_separate_weight_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of dimensions_separate_weight_value, dimensions_separate_weight_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('closer_location',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('closer_location_as',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('closer_location', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('closer_location_as', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of closer_location, closer_location_as is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('closer_location_as',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('closer_location',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('closer_location_as', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('closer_location', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of closer_location, closer_location_as is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('bought_for',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('bought_for_currency',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('bought_for', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('bought_for_currency', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of bought_for, bought_for_currency is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('bought_for_currency',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('bought_for',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('bought_for_currency', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('bought_for', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of bought_for, bought_for_currency is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('worth_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('worth_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of worth_value, worth_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('worth_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('worth_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of worth_value, worth_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('worth_insurance_value',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_insurance_unit',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_insurance_value', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('worth_insurance_unit', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of worth_insurance_value, worth_insurance_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('worth_insurance_unit',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_insurance_value',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('worth_insurance_unit', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('worth_insurance_value', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of worth_insurance_value, worth_insurance_unit is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('link_url1',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_show1',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_url1', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('link_show1', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of link_url1, link_show1 is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('link_show1',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_url1',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_show1', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('link_url1', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of link_url1, link_show1 is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('link_url2',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_show2',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_url2', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('link_show2', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of link_url2, link_show2 is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search('link_show2',$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_url2',$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('link_show2', $erstezeile) !== false) {
|
|
|
|
|
if (array_search('link_url2', $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of link_url2, link_show2 is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for ($i = 0; $i < count($eventpart); $i++)
|
|
|
|
|
{
|
|
|
|
|
if (array_search($eventpart[$i],$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search($eventpartsure[$i],$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search($eventpart[$i], $erstezeile) !== false) {
|
|
|
|
|
if (array_search($eventpartsure[$i], $erstezeile) === false) {
|
|
|
|
|
echo $eventpart[$i];
|
|
|
|
|
$depencymessage[] = 'One column of ' . $eventpart[$i] . ', ' . $eventpartsure[$i] . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (array_search($eventpartsure[$i],$erstezeile)!==false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search($eventpart[$i],$erstezeile)===false)
|
|
|
|
|
{
|
|
|
|
|
if (array_search($eventpartsure[$i], $erstezeile) !== false) {
|
|
|
|
|
if (array_search($eventpart[$i], $erstezeile) === false) {
|
|
|
|
|
$depencymessage[] = 'One column of ' . $eventpart[$i] . ', ' . $eventpartsure[$i] . ' is missing';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($depencymessage) and $depencymessage!='')
|
|
|
|
|
{
|
|
|
|
|
if (isset($depencymessage) and $depencymessage != '') {
|
|
|
|
|
echo '<b style="color:#990000;">Dependent columns were not observed !</b>';
|
|
|
|
|
for ($i = 0; $i < count ($depencymessage); $i++)
|
|
|
|
|
{
|
|
|
|
@ -502,12 +410,10 @@ echo '<br><br>6: Dependency of content observed?';
|
|
|
|
|
$depcon_error = 0;
|
|
|
|
|
for ($l = 0; $l < count($crosscheck1); $l++)
|
|
|
|
|
{
|
|
|
|
|
if (in_array($crosscheck1[$l],$erstezeile))
|
|
|
|
|
{
|
|
|
|
|
if (in_array($crosscheck1[$l], $erstezeile)) {
|
|
|
|
|
for ($j = 1; $j < ($y + 1); $j++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search($crosscheck2[$l],$erstezeile)]!=='' and $inhalt[$j][array_search($crosscheck1[$l],$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search($crosscheck2[$l], $erstezeile)] !== '' and $inhalt[$j][array_search($crosscheck1[$l], $erstezeile)] == '') {
|
|
|
|
|
echo '<br>Tag <b>' . $crosscheck2[$l] . '</b> given but no entry for <b>' . $crosscheck1[$l] . '</b> (row ' . $j . ')';
|
|
|
|
|
$depcon_error = $depcon_error + 1;
|
|
|
|
|
}
|
|
|
|
@ -516,35 +422,29 @@ for ($l=0;$l<count($crosscheck1);$l++)
|
|
|
|
|
}
|
|
|
|
|
for ($l = 0; $l < count($eventpart); $l++)
|
|
|
|
|
{
|
|
|
|
|
if (in_array($eventpart[$l],$erstezeile))
|
|
|
|
|
{
|
|
|
|
|
if (in_array($eventpart[$l], $erstezeile)) {
|
|
|
|
|
for ($j = 1; $j < ($y + 1); $j++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search($eventpartsure[$l],$erstezeile)]!=='' and $inhalt[$j][array_search($eventpart[$l],$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search($eventpartsure[$l], $erstezeile)] !== '' and $inhalt[$j][array_search($eventpart[$l], $erstezeile)] == '') {
|
|
|
|
|
echo '<br>Tag <b>' . $eventpartsure[$l] . '</b> given but no entry for <b>' . $eventpart[$l] . '</b> (row ' . $j . ')';
|
|
|
|
|
$depcon_error = $depcon_error + 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (in_array('dimensions_separate_show_md',$erstezeile))
|
|
|
|
|
{
|
|
|
|
|
if (in_array('dimensions_separate_show_md', $erstezeile)) {
|
|
|
|
|
for ($j = 1; $j < ($y + 1); $j++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search('dimensions_separate_show_md',$erstezeile)]!=='' and ($inhalt[$j][array_search('dimensions_separate_length_value',$erstezeile)]=='') and $inhalt[$j][array_search('dimensions_separate_width_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_heigt_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_weight_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_diameter_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_wall_thickness_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search('dimensions_separate_show_md', $erstezeile)] !== '' and ($inhalt[$j][array_search('dimensions_separate_length_value', $erstezeile)] == '') and $inhalt[$j][array_search('dimensions_separate_width_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_heigt_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_weight_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_diameter_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_wall_thickness_value', $erstezeile)] == '') {
|
|
|
|
|
echo '<br>Tag <b>dimensions_separate_show_md</b> given but no separate values available (row ' . $j . ')';
|
|
|
|
|
$depcon_error = $depcon_error + 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (in_array('dimensions_separate_show_extern',$erstezeile))
|
|
|
|
|
{
|
|
|
|
|
if (in_array('dimensions_separate_show_extern', $erstezeile)) {
|
|
|
|
|
for ($j = 1; $j < ($y + 1); $j++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search('dimensions_separate_show_extern',$erstezeile)]!=='' and ($inhalt[$j][array_search('dimensions_separate_length_value',$erstezeile)]=='') and $inhalt[$j][array_search('dimensions_separate_width_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_heigt_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_weight_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_diameter_value',$erstezeile)]=='' and $inhalt[$j][array_search('dimensions_separate_wall_thickness_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$j][array_search('dimensions_separate_show_extern', $erstezeile)] !== '' and ($inhalt[$j][array_search('dimensions_separate_length_value', $erstezeile)] == '') and $inhalt[$j][array_search('dimensions_separate_width_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_heigt_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_weight_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_diameter_value', $erstezeile)] == '' and $inhalt[$j][array_search('dimensions_separate_wall_thickness_value', $erstezeile)] == '') {
|
|
|
|
|
echo '<br>Tag <b>dimensions_separate_show_extern</b> given but no separate values available (row ' . $j . ')';
|
|
|
|
|
$depcon_error = $depcon_error + 1;
|
|
|
|
|
}
|
|
|
|
@ -579,131 +479,107 @@ for ($i=1;$i<=$y;$i++)
|
|
|
|
|
{
|
|
|
|
|
for ($j = 0; $j < count ($inhalt[$i]); $j++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j]=='object_other_title_kind_of' and !$inhalt[$i][array_search('object_other_title',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'object_other_title_kind_of' and !$inhalt[$i][array_search('object_other_title', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_object_other_title_kind_of)) $errormessage[] = 'Not allowed value in column <b>object_other_title_kind_of</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='other_object_title_in' and !$inhalt[$i][array_search('other_object_title',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'other_object_title_in' and !$inhalt[$i][array_search('other_object_title', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_other_object_title_in)) $errormessage[] = 'Not allowed value in column <b>other_object_title_in</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='closer_location_as' and !$inhalt[$i][array_search('closer_location',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'closer_location_as' and !$inhalt[$i][array_search('closer_location', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_closer_location_as)) $errormessage[] = 'Not allowed value in column <b>closer_location_as</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='inclusion_kind_of')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'inclusion_kind_of') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_inclusion_kind_of)) $errormessage[] = 'Not allowed value in column <b>inclusion_kind_of</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='bought_for_currency' and !$inhalt[$i][array_search('bought_for',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'bought_for_currency' and !$inhalt[$i][array_search('bought_for', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_currency)) $errormessage[] = 'Not allowed value in column <b>bought_for_currency</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='worth_unit' and !$inhalt[$i][array_search('worth_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'worth_unit' and !$inhalt[$i][array_search('worth_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_currency)) $errormessage[] = 'Not allowed value in column <b>worth_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='worth_insurance_unit' and !$inhalt[$i][array_search('worth_insurance_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'worth_insurance_unit' and !$inhalt[$i][array_search('worth_insurance_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_currency)) $errormessage[] = 'Not allowed value in column <b>worth_insurance_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='detailed_description_md' and !$inhalt[$i][array_search('detailed_description',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'detailed_description_md' and !$inhalt[$i][array_search('detailed_description', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>detailed_description_md</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='detailed_description_extern' and !$inhalt[$i][array_search('detailed_description',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'detailed_description_extern' and !$inhalt[$i][array_search('detailed_description', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>detailed_description_extern</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='inscription_md' and !$inhalt[$i][array_search('inscription',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'inscription_md' and !$inhalt[$i][array_search('inscription', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>inscription_md</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='inscription_extern' and !$inhalt[$i][array_search('inscription',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'inscription_extern' and !$inhalt[$i][array_search('inscription', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>inscription_extern</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_length_unit' and !$inhalt[$i][array_search('dimensions_separate_length_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_length_unit' and !$inhalt[$i][array_search('dimensions_separate_length_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_measurements)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_length_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_width_unit' and !$inhalt[$i][array_search('dimensions_separate_width_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_width_unit' and !$inhalt[$i][array_search('dimensions_separate_width_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_measurements)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_width_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_height_unit' and !$inhalt[$i][array_search('dimensions_separate_height_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_height_unit' and !$inhalt[$i][array_search('dimensions_separate_height_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_measurements)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_height_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_diameter_unit' and !$inhalt[$i][array_search('dimensions_separate_diameter_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_diameter_unit' and !$inhalt[$i][array_search('dimensions_separate_diameter_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_measurements)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_diameter_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_wall_thickness_unit' and !$inhalt[$i][array_search('dimensions_separate_wall_thickness_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_wall_thickness_unit' and !$inhalt[$i][array_search('dimensions_separate_wall_thickness_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_measurements)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_wall_thickness_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_weight_unit' and !$inhalt[$i][array_search('dimensions_separate_weight_value',$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_weight_unit' and !$inhalt[$i][array_search('dimensions_separate_weight_value', $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_weight)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_weight_unit</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_show_md')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_show_md') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_show_md</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='dimensions_separate_show_extern')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'dimensions_separate_show_extern') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if (!in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>dimensions_separate_show_extern</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
for ($og = 1; $og < 6; $og++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j]=='object_group_show'.$og and !$inhalt[$i][array_search('object_group_name'.$og,$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'object_group_show' . $og and !$inhalt[$i][array_search('object_group_name' . $og, $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if ($i > 1 and !in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>object_group_show' . $og . '</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($im = 1; $im < 29; $im++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j]=='image_visible'.$im and !$inhalt[$i][array_search('image_name'.$im,$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'image_visible' . $im and !$inhalt[$i][array_search('image_name' . $im, $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if ($i > 1 and !in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>image_visible' . $im . '</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='image_main'.$im and !$inhalt[$i][array_search('image_name'.$im,$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'image_main' . $im and !$inhalt[$i][array_search('image_name' . $im, $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if ($i > 1 and !in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>image_main' . $im . '</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
if ($inhalt[1][$j]=='image_rights'.$im and !$inhalt[$i][array_search('image_name'.$im,$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == 'image_rights' . $im and !$inhalt[$i][array_search('image_name' . $im, $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if ($i > 1 and !in_array($inhalt[$i][$j], $allowed_image_rights)) $errormessage[] = 'Not allowed value in column <b>image_rights' . $im . '</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for ($k = 0; $k < count($eventpartsure); $k++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j]==$eventpartsure[$k] and !$inhalt[$i][array_search($eventpart[$k],$erstezeile)]=='')
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[1][$j] == $eventpartsure[$k] and !$inhalt[$i][array_search($eventpart[$k], $erstezeile)] == '') {
|
|
|
|
|
if ($inhalt[$i][$j] != '') $showvalue = '<b style="color:#990000">' . $inhalt[$i][$j] . '</b>'; else $showvalue = '<b style="color:#990000">[empty]</b>';
|
|
|
|
|
if ($i > 1 and !in_array($inhalt[$i][$j], $allowed_yesno)) $errormessage[] = 'Not allowed value in column <b>' . $eventpartsure[$k] . '</b>: ' . $showvalue . ' (row ' . $i . ')';
|
|
|
|
|
}
|
|
|
|
@ -711,8 +587,7 @@ for ($i=1;$i<=$y;$i++)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($errormessage) and $errormessage!='')
|
|
|
|
|
{
|
|
|
|
|
if (isset($errormessage) and $errormessage != '') {
|
|
|
|
|
echo '<b style="color:#990000;">Columns with controlled values contain invalid values !</b>';
|
|
|
|
|
for ($i = 0; $i < count ($errormessage); $i++)
|
|
|
|
|
{
|
|
|
|
@ -731,18 +606,17 @@ echo '<br><br>8: Main image or main resource given?<br>';
|
|
|
|
|
$hasanyimage = 0;
|
|
|
|
|
for ($im = 1; $im < 29; $im++)
|
|
|
|
|
{
|
|
|
|
|
if (array_search('image_name'.$im,$erstezeile)!='') {$imagemain[$im]['name']=array_search('image_name'.$im,$erstezeile);$hasanyimage++;}
|
|
|
|
|
if (array_search('image_name' . $im, $erstezeile) != '') {$imagemain[$im]['name'] = array_search('image_name' . $im, $erstezeile);$hasanyimage++;
|
|
|
|
|
}
|
|
|
|
|
if (array_search('image_visible' . $im, $erstezeile) != '') $imagemain[$im]['visible'] = array_search('image_visible' . $im, $erstezeile);
|
|
|
|
|
if (array_search('image_main' . $im, $erstezeile) != '') $imagemain[$im]['main'] = array_search('image_main' . $im, $erstezeile);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($hasanyimage > 0)
|
|
|
|
|
{
|
|
|
|
|
if ($hasanyimage > 0) {
|
|
|
|
|
$imagemain = array_values($imagemain);
|
|
|
|
|
for ($i = 1; $i <= $y; $i++)
|
|
|
|
|
{
|
|
|
|
|
if ($i>1)
|
|
|
|
|
{
|
|
|
|
|
if ($i > 1) {
|
|
|
|
|
$maimg[$i] = 0;
|
|
|
|
|
//check if in a row any image_name is given
|
|
|
|
|
$hatimg[$i] = 0;
|
|
|
|
@ -750,18 +624,16 @@ if ($hasanyimage > 0)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$i][$imagemain[$im]['name']] != '') $hatimg[$i]++;
|
|
|
|
|
}
|
|
|
|
|
if ($hatimg[$i]>0)
|
|
|
|
|
{
|
|
|
|
|
if ($hatimg[$i] > 0) {
|
|
|
|
|
// first check: how many main-images?
|
|
|
|
|
for ($im = 0; $im < count($imagemain); $im++)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$i][$imagemain[$im]['main']] == 'y') {$maimg[$i]++;$merk=$im;}
|
|
|
|
|
if ($inhalt[$i][$imagemain[$im]['main']] == 'y') {$maimg[$i]++;$merk = $im;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if there is exacly one main-image, is it visible?
|
|
|
|
|
if ($maimg[$i]==1)
|
|
|
|
|
{
|
|
|
|
|
if ($inhalt[$i][$imagemain[$merk]['visible']] =='n')
|
|
|
|
|
{
|
|
|
|
|
if ($maimg[$i] == 1) {
|
|
|
|
|
if ($inhalt[$i][$imagemain[$merk]['visible']] == 'n') {
|
|
|
|
|
$errormessage[] = '<b style="font-weight:normal;color:#990000">Main image in row ' . $i . ' is not visible</b>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -771,8 +643,7 @@ if ($hasanyimage > 0)
|
|
|
|
|
if ($i > 1 and $maimg[$i] > 1 and $hatimg[$i] > 0) $errormessage[] = '<b style="font-weight:normal;color:#990000">There are ' . $maimg[$i] . ' main images given in row ' . $i . '</b>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($errormessage) and $errormessage!='')
|
|
|
|
|
{
|
|
|
|
|
if (isset($errormessage) and $errormessage != '') {
|
|
|
|
|
echo '<b style="color:#990000;">There is not one main image for each object !</b>';
|
|
|
|
|
for ($i = 0; $i < count ($errormessage); $i++)
|
|
|
|
|
{
|
|
|
|
@ -791,8 +662,7 @@ else
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<hr>';
|
|
|
|
|
if ($error+$depcon_error>0)
|
|
|
|
|
{
|
|
|
|
|
if ($error + $depcon_error > 0) {
|
|
|
|
|
echo 'Error(s) found: ' . ($error + $depcon_error);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -800,4 +670,3 @@ else
|
|
|
|
|
echo '<a href="index5.php?fnam=' . $_GET['fnam'] . '"><img src="img/go.gif"> Create XML for md:import (iso 8859-1)</a><br>';
|
|
|
|
|
echo '<a href="index6.php?fnam=' . $_GET['fnam'] . '"><img src="img/go.gif"> Create XML for md:import (utf8)</a><br>';
|
|
|
|
|
}
|
|
|
|
|
?>
|