diff --git a/themew2.php b/themew2.php index 2c0cb00..5a39bb0 100644 --- a/themew2.php +++ b/themew2.php @@ -8,7 +8,7 @@ require 'dspcnt.php'; $xml=simplexml_load_file("data/website".$b.".xml") or die("Error: Cannot create object"); - $page = $xml->xpath('/website/page'); + $page = $xml->xpath("/website/page[name!='']"); function ic_html($pname) { if (strpos(" ".$pname,chr(0xef))==1) $rt = ''.substr($pname,0,3).' '.substr($pname,4); @@ -41,9 +41,9 @@ function ic_html($pname) {
name)>2) - echo "" . ic_html($page[$i-1]->name) . ""; + $i=1; + foreach ($page as $item) { + echo "" . ic_html($item->name) . ""; } ?> @@ -64,17 +64,16 @@ function ic_html($pname) {

title) ?>

name)>2) { - echo "
"; - echo "

".$page[$i-1]->name.".

"; - echo "
"; - } - if(strlen($page[$i-1]->image)>4) - echo "\n"; - echo trim($page[$i-1]->contents); + $i=1; + foreach ($page as $item) { + echo "
"; + echo "

".$item->name.".

"; + echo "
"; + if(strlen($item->image)>4) + echo "\n"; + echo trim($item->contents); echo "
"; - if($page[$i-1]['type']=="comments") { + if($item['type']=="comments") { ?>
HTML Comment Box is loading comments...
@@ -82,7 +81,7 @@ function ic_html($pname) {
@@ -117,7 +116,7 @@ function ic_html($pname) { echo "Missing Name or Contact Info."; echo "
"; } - } + } } ?> diff --git a/themew3.php b/themew3.php index 15bdc5d..c9868bf 100644 --- a/themew3.php +++ b/themew3.php @@ -8,7 +8,7 @@ require 'dspcnt.php'; $xml=simplexml_load_file("data/website".$b.".xml") or die("Error: Cannot create object"); - $page = $xml->xpath('/website/page'); + $page = $xml->xpath("/website/page[name!='' and position()<=4]"); function ic_html($pname) { if (strpos(" ".$pname,chr(0xef))==1) $rt = ''.substr($pname,0,3).' '.substr($pname,4); @@ -38,12 +38,11 @@ function ic_html($pname) {
name)>2) { - echo ""; - } + $i=1; + foreach ($page as $item) { + echo "
"; + echo "" . ic_html($item->name) . ""; + echo "
"; } ?>
@@ -60,21 +59,19 @@ function ic_html($pname) {
image)>4) - echo "\n"; - } + $img = $xml->xpath("/website/page/image[string-length()!=0]"); + foreach ($img as $item) + echo "\n"; ?>
name)>2) { - echo "
"; - echo trim($page[$i-1]->contents); - echo "
"; - } - if($page[$i-1]['type']=="comments") { + $i=1; + foreach ($page as $item) { + echo "
"; + echo trim($item->contents); + echo "
"; + if($item['type']=="comments") { ?>
HTML Comment Box is loading comments...
@@ -82,7 +79,7 @@ function ic_html($pname) {
diff --git a/themew4.php b/themew4.php index 45eb62b..be47fe9 100644 --- a/themew4.php +++ b/themew4.php @@ -8,7 +8,7 @@ require 'dspcnt.php'; $xml=simplexml_load_file("data/website".$b.".xml") or die("Error: Cannot create object"); - $page = $xml->xpath('/website/page'); + $page = $xml->xpath("/website/page[name!='']"); function ic_html($pname) { if (strpos(" ".$pname,chr(0xef))==1) $rt = ''.substr($pname,0,3).' '.strtoupper(substr($pname,4)); @@ -60,11 +60,9 @@ function ic_strip($pname) {
name)>2) { - echo "" . ic_html($page[$i-1]->name) . ""; - } - } + $i=1; + foreach ($page as $item) + echo "" . ic_html($item->name) . ""; ?>
@@ -79,11 +77,9 @@ function ic_strip($pname) { @@ -106,27 +102,27 @@ function ic_strip($pname) { name)>2) { - echo "
"; - echo trim($page[$i-1]->contents); - echo "
"; - } - if($page[$i-1]['type']=="comments") { + $i=1; + foreach ($page as $item) { + if($item['type']=="page") { + echo "
"; + echo trim($item->contents); + echo "
"; + } + if($item['type']=="comments") { // begin htmlcommentbox.com --> - echo "
"; + echo "
"; echo "
"; ?> HTML Comment Box is loading comments...
"; - echo trim($page[$i-1]->contents); + echo "
"; + echo trim($item->contents); ?>
@@ -161,7 +157,7 @@ function ic_strip($pname) { echo "Missing Name or Contact Info."; echo "
"; } - } + } } ?>
diff --git a/themew5.php b/themew5.php index 65252d9..bc1b15f 100644 --- a/themew5.php +++ b/themew5.php @@ -8,7 +8,7 @@ require 'dspcnt.php'; $xml=simplexml_load_file("data/website".$b.".xml") or die("Error: Cannot create object"); - $page = $xml->xpath('/website/page'); + $page = $xml->xpath("/website/page[name!='' and position()<=4]"); function icon($pname) { if (strpos(" ".$pname,chr(0xef))==1) $rt = substr($pname,0,3); @@ -53,12 +53,11 @@ function ic_strip($pname) {

name) ?>

name)>2) { + $i=0; + foreach ($page as $item) + if(++$i!=1) echo "" - . icon($page[$i-1]->name) . "

" . ic_strip($page[$i-1]->name) . "

"; - } - } + . icon($item->name) . "

" . ic_strip($item->name) . "

"; ?> @@ -66,12 +65,10 @@ function ic_strip($pname) {
name)>2) { - echo "" - . ic_strip($page[$i-1]->name) . ""; - } - } + $i=1; + foreach ($page as $item) + echo "" + . ic_strip($item->name) . ""; ?>
@@ -87,66 +84,68 @@ function ic_strip($pname) { name)>2) { - echo "
"; - echo trim($page[$i-1]->contents); - echo "
"; - } - if($page[$i-1]['type']=="comments") { + $i=0; + foreach ($page as $item) { + if (++$i!=1) { + if($item['type']=="page") { + echo "
"; + echo trim($item->contents); + echo "
"; + } + if($item['type']=="comments") { - // begin htmlcommentbox.com --> - echo "
"; - echo "
"; -?> HTML Comment Box is loading comments...
- - - + echo "
"; + echo "
"; + ?> HTML Comment Box is loading comments...
+ + + "; - echo trim($page[$i-1]->contents); -?>
-
- -

- - -

-

- - -

-

- - -

-

- - -

- - -"; - echo "Contact information submitted. We will contact you as soon as possible."; - echo "
"; - } else { - echo "
"; - echo "Missing Name or Contact Info."; - echo "
"; - } -?> -
-
- "; + echo trim($item->contents); + ?>
+
+
+

+ + +

+

+ + +

+

+ + +

+

+ + +

+ +
+ "; + echo "Contact information submitted. We will contact you as soon as possible."; + echo "
"; + } else { + echo "
"; + echo "Missing Name or Contact Info."; + echo "
"; + } + ?> +
+ + diff --git a/themew6.php b/themew6.php index 0c28701..a6f1353 100644 --- a/themew6.php +++ b/themew6.php @@ -8,7 +8,7 @@ require 'dspcnt.php'; $xml=simplexml_load_file("data/website".$b.".xml") or die("Error: Cannot create object"); - $page = $xml->xpath('/website/page'); + $page = $xml->xpath("/website/page[name!='' and position()<=3]"); function ic_html($pname) { if (strpos(" ".$pname,chr(0xef))==1) $rt = ''.substr($pname,0,3).' '.substr($pname,4); @@ -36,10 +36,9 @@ function ic_html($pname) {
name)>2) - echo "" . ic_html($page[$i-1]->name) . ""; - } + $i=1; + foreach ($page as $item) + echo "" . ic_html($item->name) . ""; ?>
@@ -57,44 +56,43 @@ function ic_html($pname) {
name)>2) { - echo "
"; - echo "

".$page[$i-1]->name."

"; - echo trim($page[$i-1]->contents); - if($page[$i-1]['type']=="comments") { + $i=1; + foreach ($page as $item) { + echo "
"; + echo "

".$item->name."

"; + echo trim($item->contents); + if($item['type']=="comments") { - // begin htmlcommentbox.com --> - echo "
"; - ?> HTML Comment Box is loading comments...
- - -
- - - - - -
+ // begin htmlcommentbox.com --> + echo "
"; +?> HTML Comment Box is loading comments...
+ + +
+ + + + + +
"; - echo "Contact information submitted. We will contact you as soon as possible."; - echo "
"; - } else { - echo "
"; - echo "Missing Name or Contact Info."; - echo "
"; - } - } - echo "
"; - } + if ($name!="") + if(sendDb($name,$phone,$email,$message)) { + echo "
"; + echo "Contact information submitted. We will contact you as soon as possible."; + echo "
"; + } else { + echo "
"; + echo "Missing Name or Contact Info."; + echo "
"; + } + } + echo "
"; } ?> diff --git a/themew7.php b/themew7.php index 7f42056..ce4f46d 100644 --- a/themew7.php +++ b/themew7.php @@ -8,7 +8,7 @@ require 'dspcnt.php'; $xml=simplexml_load_file("data/website".$b.".xml") or die("Error: Cannot create object"); - $page = $xml->xpath('/website/page'); + $page = $xml->xpath("/website/page[name!='']"); function ic_html($pname) { if (strpos(" ".$pname,chr(0xef))==1) $rt = ''.substr($pname,0,3).' '.strtoupper(substr($pname,4)); @@ -104,10 +104,9 @@ function ic_strip($pname) { HOME name)>2) - echo "" . ic_html($page[$i-1]->name) . ""; - } + $i=1; + foreach ($page as $item) + echo "" . ic_html($item->name) . ""; ?> @@ -117,10 +116,9 @@ function ic_strip($pname) { @@ -133,55 +131,54 @@ function ic_strip($pname) { name)>2) { - if(($i > 1) && (strlen($page[$i-1]->image)>4)) { - echo "
"; - echo "
"; - echo "".ic_strip($page[$i-1]->name).""; - echo "
"; - echo "
"; - } - echo "
"; - echo trim($page[$i-1]->contents); - if($page[$i-1]['type']=="comments") { - - // begin htmlcommentbox.com --> - echo "
"; - ?> HTML Comment Box is loading comments...
- - -
-
-
-

-

-

-

-

-
+ $i=0; + foreach ($page as $item) { + if((++$i>1) && (strlen($item->image)>4)) { + echo "
"; + echo "
"; + echo "".ic_strip($item->name).""; + echo "
"; + echo "
"; + } + echo "
"; + echo trim($item->contents); + if($item['type']=="comments") { + + // begin htmlcommentbox.com --> + echo "
"; +?> HTML Comment Box is loading comments...
+ + +
+
+
+

+

+

+

+

+
"; - echo "Contact information submitted. We will contact you as soon as possible."; - echo "
"; - } else { - echo "
"; - echo "Missing Name or Contact Info."; - echo "
"; - }?> -
-
"; + echo "Contact information submitted. We will contact you as soon as possible."; + echo "
"; + } else { + echo "
"; + echo "Missing Name or Contact Info."; + echo "
"; + } + } ?> +
+
"; } - } ?>