$year ";
// $label = "";
$label = "";
$day=date("z",$datum)+1; // ???
$week=1;
$sikday = $day;
$listtype = "Node";
$ptype = "";
$tmpp[2] = "";
$tmpp[3] = "";
$counts = 0;
$workdir[0][0] = "";
$workdir[1][0] = "";
$workdir[2][0] = "";
$workdir[3][0] = "";
$workdir[4][0] = "";
$workdir[0][1] = "";
$workdir[1][1] = "";
$workdir[2][1] = "";
$workdir[3][1] = "";
$workdir[4][1] = "";
// if dir doesnt exist, include list dir
if ($code_criterion==3) {
// fidonews
$tmpp[0]=sprintf("fidonews/%04d",$year);
$tmpp[1]="";
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // fidonews dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "Fidonews";
$workdir[$counts][2] = "";
$workdir[$counts][3] = 3;
}
} elseif ($code_criterion<2) {
$tmpp[0]=sprintf("nodelist/%04d",$year);
$tmpp[1]=sprintf("nodelist/%04d/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "Nodelist";
$workdir[$counts][2] = "";
$workdir[$counts][3] = 1;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "Nodediff";
$workdir[$counts][2] = "";
$workdir[$counts][3] = 2;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "Nodelist";
$workdir[$counts][2] = "";
$workdir[$counts][3] = 1;
}
} elseif ($zone_criterion==20) {
// z2pnt
$tmpp[0]=sprintf("pntlist/z2/%04d/poss",$year);
$tmpp[1]=sprintf("pntlist/z2/%04d/poss/diff",$year);
$tmpp[2]=sprintf("pntlist/z2/%04d/boss",$year);
$tmpp[3]=sprintf("pntlist/z2/%04d/boss/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "Z2 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 21;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "Z2 Pointdiff";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 22;
}
} else {
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // BOSS dir exists
// do nothing
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "Z2 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 21;
}
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "Z2 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 26;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "Z2 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 27;
}
//} else {
// $counts++;
// $workdir[$counts][0] = $tmpp[2];
// $workdir[$counts][1] = "Z2 Pointlist";
// $workdir[$counts][2] = "Boss";
// $workdir[$counts][3] = 26;
}
} elseif ($zone_criterion==30) {
// r24
// formats: Boss, Fake
$tmpp[0]=sprintf("pntlist/r24/%04d/boss",$year);
$tmpp[1]=sprintf("pntlist/r24/%04d/boss/diff",$year);
$tmpp[2]=sprintf("pntlist/r24/%04d/fake",$year);
$tmpp[3]=sprintf("pntlist/r24/%04d/fake/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R24 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 31;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R24 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 32;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R24 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 31;
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "R24 Pointlist";
$workdir[$counts][2] = "Fakenet";
$workdir[$counts][3] = 33;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "R24 Pointdiff";
$workdir[$counts][2] = "Fakenet";
$workdir[$counts][3] = 34;
}
}
} elseif ($zone_criterion==40) {
// r28
// formats: Fidouser, Boss
$tmpp[0]=sprintf("pntlist/r28/%04d/boss",$year);
$tmpp[1]=sprintf("pntlist/r28/%04d/boss/diff",$year);
$tmpp[2]=sprintf("pntlist/r28/%04d/fidouser",$year);
$tmpp[3]=sprintf("pntlist/r28/%04d/fidouser/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R28 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 41;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R28 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 42;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R28 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 41;
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "R28 Pointlist";
$workdir[$counts][2] = "Fidouser";
$workdir[$counts][3] = 43;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "R28 Pointdiff";
$workdir[$counts][2] = "Fidouser";
$workdir[$counts][3] = 44;
}
}
} elseif ($zone_criterion==50) {
// r31
// formats: V7, Boss
$tmpp[0]=sprintf("pntlist/r31/%04d/boss",$year);
$tmpp[1]=sprintf("pntlist/r31/%04d/boss/diff",$year);
$tmpp[2]=sprintf("pntlist/r31/%04d/v7",$year);
$tmpp[3]=sprintf("pntlist/r31/%04d/v7/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R31 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 51;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R31 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 52;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R31 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 51;
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "R31 Pointlist";
$workdir[$counts][2] = "Points,V7";
$workdir[$counts][3] = 53;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "R31 Pointdiff";
$workdir[$counts][2] = "Points,V7";
$workdir[$counts][3] = 54;
}
}
} elseif ($zone_criterion==55) {
// r22
// formats: Poss
$tmpp[0]=sprintf("pntlist/r22/%04d/poss",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R22 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 56;
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R22 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 56;
}
} elseif ($zone_criterion==60) {
// r23
// formats: Boss, Fake
$tmpp[0]=sprintf("pntlist/r23/%04d/boss",$year);
$tmpp[1]=sprintf("pntlist/r23/%04d/boss/diff",$year);
$tmpp[2]=sprintf("pntlist/r23/%04d/fake",$year);
$tmpp[3]=sprintf("pntlist/r23/%04d/fake/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R23 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 61;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R23 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 62;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R23 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 61;
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "R23 Pointlist";
$workdir[$counts][2] = "Fakenet";
$workdir[$counts][3] = 63;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "R23 Pointdiff";
$workdir[$counts][2] = "Fakenet";
$workdir[$counts][3] = 64;
}
}
} elseif ($zone_criterion==70) {
// r34
// formats: Boss, Fake
$tmpp[0]=sprintf("pntlist/r34/%04d/boss",$year);
$tmpp[1]=sprintf("pntlist/r34/%04d/boss/diff",$year);
$tmpp[2]=sprintf("pntlist/r34/%04d/fake",$year);
$tmpp[3]=sprintf("pntlist/r34/%04d/fake/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R34 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 71;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R34 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 72;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R34 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 71;
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "R34 Pointlist";
$workdir[$counts][2] = "Fakenet";
$workdir[$counts][3] = 73;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "R34 Pointdiff";
$workdir[$counts][2] = "Fakenet";
$workdir[$counts][3] = 74;
}
}
} elseif ($zone_criterion==75) {
// r45
// formats: Poss
$tmpp[0]=sprintf("pntlist/r45/%04d/poss",$year);
$tmpp[1]=sprintf("pntlist/r45/%04d/poss/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R45 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 76;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R45 Pointdiff";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 77;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R45 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 76;
}
} elseif ($zone_criterion==80) {
// r46
// formats: Poss
$tmpp[0]=sprintf("pntlist/r46/%04d/poss",$year);
$tmpp[1]=sprintf("pntlist/r46/%04d/poss/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R46 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 81;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R46 Pointdiff";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 82;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R46 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 81;
}
} elseif ($zone_criterion==85) {
// r48
// formats: Boss
$tmpp[0]=sprintf("pntlist/r48/%04d/boss",$year);
$tmpp[1]=sprintf("pntlist/r48/%04d/boss/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R48 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 86;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R48 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 87;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R48 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 86;
}
} elseif ($zone_criterion==90) {
// r50
// formats: Poss, Boss
if ($year < 2008) {
$tmpp[0]=sprintf("pntlist/r50/%04d/poss",$year);
$tmpp[1]=sprintf("pntlist/r50/%04d/poss/diff",$year);
$tmpp[2]=sprintf("pntlist/r50/%04d/boss",$year);
$tmpp[3]=sprintf("pntlist/r50/%04d/boss/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R50 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 91;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R50 Pointdiff";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 92;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R50 Pointlist";
$workdir[$counts][2] = "Poss";
$workdir[$counts][3] = 91;
}
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "R50 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 93;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "R50 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 94;
}
}
} elseif ($zone_criterion==100) {
// r29
// formats: Boss, V7
$tmpp[0]=sprintf("pntlist/r29/%04d/boss",$year);
$tmpp[1]=sprintf("pntlist/r29/%04d/boss/diff",$year);
$tmpp[2]=sprintf("pntlist/r29/%04d/v7",$year);
$tmpp[3]=sprintf("pntlist/r29/%04d/v7/diff",$year);
$tmpd=$basepath2.$basepath.$tmpp[0];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R29 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 101;
$tmpd=$basepath2.$basepath.$tmpp[1];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[1];
$workdir[$counts][1] = "R29 Pointdiff";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 102;
}
} else {
$counts++;
$workdir[$counts][0] = $tmpp[0];
$workdir[$counts][1] = "R29 Pointlist";
$workdir[$counts][2] = "Boss";
$workdir[$counts][3] = 101;
}
$tmpd=$basepath2.$basepath.$tmpp[2];
if (is_dir($tmpd)) { // Nodelist dir exists
$counts++;
$workdir[$counts][0] = $tmpp[2];
$workdir[$counts][1] = "R29 Pointlist";
$workdir[$counts][2] = "Points,V7";
$workdir[$counts][3] = 103;
$tmpd=$basepath2.$basepath.$tmpp[3];
if (is_dir($tmpd)) { // Nodediff dir exists
$counts++;
$workdir[$counts][0] = $tmpp[3];
$workdir[$counts][1] = "R29 Pointdiff";
$workdir[$counts][2] = "Points,V7";
$workdir[$counts][3] = 104;
}
}
} // end code_criterion 3
// $tmpp=$basepath2.$basepath.$tmpp;
// for i = 1 to counts
// check directorys to list
// nodelist/nodediff?
// pointlist format 1, format 1 diff?, format 2, format 2 diff? (upto 4)
for ($j=1; $j <= $counts; $j++) {
$tmpd = $workdir[$j][0];
$listtype = $workdir[$j][1];
$ptype = $workdir[$j][2];
$slct = $workdir[$j][3];
// Reset
$datum = $sikdatum;
$year=date("Y",$datum);
$tyr = $year;
$fidoyear=($tyr - 1984)+1;
// echo "$year ";
$day=date("z",$datum)+1; // ???
$week=1;
// $sikday = $day;
if ($slct==3) {
$listtype.=" [".$fidoyear."]";
}
if ($j==1) {
echo " |