--- a/admin/importAusbudget.php
+++ b/admin/importAusbudget.php
@@ -1,1 +1,51 @@
+tagName) || $Node->tagName == null) {
+ return $Text . $Node->textContent;
+ }
+ $Node = $Node->firstChild;
+ if (isset($Node) && $Node != null) {
+ $Text = getTextFromNode($Node, $Text);
+ }
+ while (isset($Node->nextSibling) && $Node->nextSibling != null) {
+ $Text = getTextFromNode($Node->nextSibling, $Text);
+ $Node = $Node->nextSibling;
+ }
+ return $Text;
+}
+
+$dir = "./ausbudget/";
+$dhandle = opendir("./ausbudget/");
+// define an array to hold the files
+$files = array();
+if ($dhandle) {
+ // loop through all of the files
+ while (false !== ($fname = readdir($dhandle))) {
+ if (($fname != '.') && ($fname != '..')) {
+ echo "$fname
";
+ $html = phpQuery::newDocumentHTML(file_get_contents($dir . $fname));
+ phpQuery::selectDocument($html);
+ foreach (pq('table')->elements as $table) {
+ echo "loltable";
+ //echo $table->ownerDocument->saveXML($table);
+ foreach (pq('tr')->elements as $row) {
+ echo "lolrow";
+ $rowText = getTextFromNode($row);
+ if (strpos($rowText,"Twitter") === false) {
+ echo "".pq("td:first",$row)->text()."
";
+ echo pq("td",$row)->text() . "
";
+ }
+ }
+ }
+ }
+ break;
+ }
+}
+?>
+