From: Alan Jack Pippin Date: Fri, 10 Feb 2006 03:46:00 +0000 (-0700) Subject: Created new ward directory viewing application. X-Git-Tag: release_0_1_0~58 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/%7Blink_activity%7D?a=commitdiff_plain;h=b026755252fca1785c3162702e392cc0ef2c2a89;p=eq%2F.git Created new ward directory viewing application. --- diff --git a/inc/class.eq.inc.php b/inc/class.eq.inc.php index 8f62c1b..f3d124f 100644 --- a/inc/class.eq.inc.php +++ b/inc/class.eq.inc.php @@ -1727,9 +1727,35 @@ class eq function dir_view() { - $this->t->set_file(array('form' => 'dir_view.tpl')); + $this->t->set_file(array('dir_view_t' => 'dir_view.tpl')); + $this->t->set_block('dir_view_t','dir_list','list'); - $this->t->pfp('out','form'); + $sql = "SELECT * FROM eq_parent where valid=1 ORDER BY name ASC"; + $this->db->query($sql,__LINE__,__FILE__); + $i=0; + while ($this->db->next_record()) + { + $parent[$i]['id'] = $this->db->f('parent'); + $parent[$i]['name'] = $this->db->f('name'); + $parent[$i]['phone'] = $this->db->f('phone'); + $parent[$i]['address'] = $this->db->f('address'); + $i++; + } + + for ($i=0; $i < count($parent); $i++) + { + $name = $parent[$i]['name']; + $phone = $parent[$i]['phone']; + $address = $parent[$i]['address']; + $this->t->set_var('name', $name); + $this->t->set_var('address', $address); + $this->t->set_var('phone', $phone); + $tr_color = $this->nextmatchs->alternate_row_color($tr_color); + $this->t->set_var('tr_color',$tr_color); + $this->t->fp('list','dir_list',True); + //print "$phone $name $address
"; + } + $this->t->pfp('out','dir_view_t'); $this->save_sessiondata(); } diff --git a/templates/default/dir_view.tpl b/templates/default/dir_view.tpl index ac4cb50..99b1543 100644 --- a/templates/default/dir_view.tpl +++ b/templates/default/dir_view.tpl @@ -1,14 +1,24 @@
-
- - - + + +
Online Ward Directory
Online Ward Directory
-

- - +
+
+ + + + + + + + + + + +
PhoneNameAddress
{phone}{name}{address}