PHP Classes

File: data.php

Recommend this page to a friend!
  Classes of Tom Schaefer   QXML   data.php   Download  
File: data.php
Role: Auxiliary script
Content type: text/plain
Description: data file using complex node array
Class: QXML
XML <> Array (preserve attrib.), JSON, etc.
Author: By
Last change: - removing errors (replacing Set::insert by QSet::set)
Date: 16 years ago
Size: 9,993 bytes
 

Contents

Class file image Download
<?php

$caption
= "Vacation";

$nodes = array();

$nodes = QSet::set($nodes, "@attributes.dateformat", "yyyy-mm-dd");
$nodes = QSet::set($nodes, "@attributes.hoverCapBorderColor", "2222ff");
$nodes = QSet::set($nodes, "@attributes.hoverCapBgColor", "e1f5ff");
$nodes = QSet::set($nodes, "@attributes.ganttWidthPercent", 60);
$nodes = QSet::set($nodes, "@attributes.ganttLineAlpha", 80);
$nodes = QSet::set($nodes, "@attributes.canvasBorderColor", "024455");
$nodes = QSet::set($nodes, "@attributes.canvasBorderThickness", 0);
$nodes = QSet::set($nodes, "@attributes.gridBorderColor", "4567aa");
$nodes = QSet::set($nodes, "@attributes.gridBorderAlpha", 20);

$nodes = QSet::set($nodes, "categories.0.@attributes.bgColor", "4567aa");

$nodes = QSet::set($nodes, "categories.0.category.@attributes.start", "2008-01-01");
$nodes = QSet::set($nodes, "categories.0.category.@attributes.end", "2008-12-31");
$nodes = QSet::set($nodes, "categories.0.category.@attributes.align", "center");
$nodes = QSet::set($nodes, "categories.0.category.@attributes.fontColor", "ffffff");
$nodes = QSet::set($nodes, "categories.0.category.@attributes.isBold", 1);
$nodes = QSet::set($nodes, "categories.0.category.@attributes.fontSize", 14);
$nodes = QSet::set($nodes, "categories.0.category.@attributes.name", $caption);

$nodes = QSet::set($nodes, "categories.1.@attributes.bgColor", "4567aa");

$nodes = QSet::set($nodes, "categories.1.category.@attributes.start", "2008-01-01");
$nodes = QSet::set($nodes, "categories.1.category.@attributes.end", "2008-12-31");
$nodes = QSet::set($nodes, "categories.1.category.@attributes.align", "center");
$nodes = QSet::set($nodes, "categories.1.category.@attributes.font", "Verdana");
$nodes = QSet::set($nodes, "categories.1.category.@attributes.fontColor", "ffffff");
$nodes = QSet::set($nodes, "categories.1.category.@attributes.isBold", 1);
$nodes = QSet::set($nodes, "categories.1.category.@attributes.fontSize", 11);
$nodes = QSet::set($nodes, "categories.1.category.@attributes.name", "Months");

$nodes = QSet::set($nodes, "categories.2.@attributes.bgColor", "4567aa");
$nodes = QSet::set($nodes, "categories.2.@attributes.fontColor", "ff0000");

for(
$i=0;$i<12;$i++){
   
$nodes = QSet::set($nodes, "categories.2.category.".$i.".@attributes.start", "2008-".str_pad($i,2,"0", STR_PAD_LEFT)."-01");
   
$nodes = QSet::set($nodes, "categories.2.category.".$i.".@attributes.end", "2008-".str_pad($i,2,"0", STR_PAD_LEFT)."-".date("d", mktime(0,0,0,$i+2,0,"2008")));
   
$nodes = QSet::set($nodes, "categories.2.category.".$i.".@attributes.align", "center");
   
$nodes = QSet::set($nodes, "categories.2.category.".$i.".@attributes.isBold", 1);
   
$nodes = QSet::set($nodes, "categories.2.category.".$i.".@attributes.name", $months[$i]);
}

$nodes = QSet::set($nodes, "processes.0.@attributes.fontColor", "ffffff");
$nodes = QSet::set($nodes, "processes.0.@attributes.fontSize", 10);
$nodes = QSet::set($nodes, "processes.0.@attributes.isBold", 1);
$nodes = QSet::set($nodes, "processes.0.@attributes.isAnimated", 1);
$nodes = QSet::set($nodes, "processes.0.@attributes.bgColor", "4567aa");
$nodes = QSet::set($nodes, "processes.0.@attributes.headerVAlign", "right");
$nodes = QSet::set($nodes, "processes.0.@attributes.headerbgColor", "4567aa");
$nodes = QSet::set($nodes, "processes.0.@attributes.headerFontColor", "ffffff");
$nodes = QSet::set($nodes, "processes.0.@attributes.headerFontSize", 16);
$nodes = QSet::set($nodes, "processes.0.@attributes.width", 80);
$nodes = QSet::set($nodes, "processes.0.@attributes.align", "left");
$nodes = QSet::set($nodes, "processes.0.@attributes.headerText", "Aufgaben");

$nodes = QSet::set($nodes, "processes.0.process.0.@attributes.Name", "Schreiben");
$nodes = QSet::set($nodes, "processes.0.process.0.@attributes.id", 1);
$nodes = QSet::set($nodes, "processes.0.process.1.@attributes.Name", "Unterzeichnen");
$nodes = QSet::set($nodes, "processes.0.process.1.@attributes.id", 2);
$nodes = QSet::set($nodes, "processes.0.process.2.@attributes.Name", "Finanz");
$nodes = QSet::set($nodes, "processes.0.process.2.@attributes.id", 3);
$nodes = QSet::set($nodes, "processes.0.process.3.@attributes.Name", "Rechte");
$nodes = QSet::set($nodes, "processes.0.process.3.@attributes.id", 4);
$nodes = QSet::set($nodes, "processes.0.process.4.@attributes.Name", "Versiegeln");
$nodes = QSet::set($nodes, "processes.0.process.4.@attributes.id", 5);
$nodes = QSet::set($nodes, "processes.0.process.5.@attributes.Name", "Terrasse");
$nodes = QSet::set($nodes, "processes.0.process.5.@attributes.id", 6);
$nodes = QSet::set($nodes, "processes.0.process.6.@attributes.Name", "Inspektion");
$nodes = QSet::set($nodes, "processes.0.process.6.@attributes.id", 7);
$nodes = QSet::set($nodes, "processes.0.process.7.@attributes.Name", "Holzarbeiten");
$nodes = QSet::set($nodes, "processes.0.process.7.@attributes.id", 8);
$nodes = QSet::set($nodes, "processes.0.process.8.@attributes.Name", "Innen");
$nodes = QSet::set($nodes, "processes.0.process.8.@attributes.id", 9);
$nodes = QSet::set($nodes, "processes.0.process.9.@attributes.Name", "Schichten");
$nodes = QSet::set($nodes, "processes.0.process.9.@attributes.id", 10);

$nodes = QSet::set($nodes, "dataTable.@attributes.showProcessName", 1);
$nodes = QSet::set($nodes, "dataTable.@attributes.nameAlign", "left");
$nodes = QSet::set($nodes, "dataTable.@attributes.fontColor", "000000");
$nodes = QSet::set($nodes, "dataTable.@attributes.fontSize", 10);
$nodes = QSet::set($nodes, "dataTable.@attributes.isBold", 1);
$nodes = QSet::set($nodes, "dataTable.@attributes.headerBgColor", "00ffff");
$nodes = QSet::set($nodes, "dataTable.@attributes.headerFontColor", "4567aa");
$nodes = QSet::set($nodes, "dataTable.@attributes.headerFontSize", 11);
$nodes = QSet::set($nodes, "dataTable.@attributes.vAlign", "right");
$nodes = QSet::set($nodes, "dataTable.@attributes.align", "left");

$nodes = QSet::set($nodes, "dataTable.dataColumn.0.@attributes.width", 70);
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.@attributes.headerfontcolor", "ffffff");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.@attributes.headerBgColor", "4567aa");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.@attributes.bgColor", "eeeeee");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.@attributes.headerColor", "ffffff");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.@attributes.headerText", "Start");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.@attributes.isBold", 0);

$nodes = QSet::set($nodes, "dataTable.dataColumn.0.text.0.@attributes.label", "2008-01-21");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.text.1.@attributes.label", "2008-02-02");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.text.2.@attributes.label", "2008-03-14");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.text.3.@attributes.label", "2008-04-01");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.text.4.@attributes.label", "2008-05-07");

$nodes = QSet::set($nodes, "dataTable.dataColumn.1.@attributes.width", 70);
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.@attributes.headerfontcolor", "ffffff");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.@attributes.headerBgColor", "4567aa");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.@attributes.bgColor", "eeeeee");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.@attributes.headerColor", "ffffff");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.@attributes.headerText", "Start");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.@attributes.isBold", 0);

$nodes = QSet::set($nodes, "dataTable.dataColumn.1.text.0.@attributes.label", "2008-01-21");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.text.1.@attributes.label", "2008-02-02");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.text.2.@attributes.label", "2008-03-14");
$nodes = QSet::set($nodes, "dataTable.dataColumn.1.text.3.@attributes.label", "2008-04-01");
$nodes = QSet::set($nodes, "dataTable.dataColumn.0.text.4.@attributes.label", "2008-05-07");

$nodes = QSet::set($nodes, "tasks.@attributes.width", 10);
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.name", "Planned");
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.processId", 1);
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.start", "2008-02-09");
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.end", "2008-02-19");
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.id", "1-1");
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.color", "4567aa");
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.height", "5");
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.topPadding", "5");
$nodes = QSet::set($nodes, "tasks.0.task.0.@attributes.animation", "0");

$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.name", "Planned");
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.processId", 2);
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.start", "2008-02-09");
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.end", "2008-02-19");
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.id", "1-1");
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.color", "4567aa");
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.height", "5");
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.topPadding", "5");
$nodes = QSet::set($nodes, "tasks.0.task.1.@attributes.animation", "0");

$nodes = QSet::set($nodes, "connectors", "");
$nodes = QSet::set($nodes, "connectors.0.connectors.0.@attributes.fromTaskId", 1);
$nodes = QSet::set($nodes, "connectors.0.connectors.0.@attributes.toTaskId", 2);
$nodes = QSet::set($nodes, "connectors.0.connectors.0.@attributes.color", "4567aa");
$nodes = QSet::set($nodes, "connectors.0.connectors.0.@attributes.thickness", 2);
$nodes = QSet::set($nodes, "connectors.0.connectors.0.@attributes.fromTaskConnectStart", 1);

?>