Commit c079590ca1a21a69030f5085adb3f1071186cfba

Authored by rob
1 parent d94aca47

Visual pattern example


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@67 c91229c3-7414-0410-bfa2-8a42b809f60b
config/owl.php
@@ -16,15 +16,15 @@ @@ -16,15 +16,15 @@
16 */ 16 */
17 17
18 // Some urls 18 // Some urls
19 -$default->owl_root_url = "/intranet"; 19 +$default->owl_root_url = "";
20 $default->owl_graphics_url = $default->owl_root_url . "/graphics"; 20 $default->owl_graphics_url = $default->owl_root_url . "/graphics";
21 21
22 // Directory where owl is located 22 // Directory where owl is located
23 -$default->owl_fs_root = "/var/www/html/intranet"; 23 +$default->owl_fs_root = "C:/Projects/MRC/Devel/owl";
24 $default->owl_LangDir = $default->owl_fs_root . "/locale"; 24 $default->owl_LangDir = $default->owl_fs_root . "/locale";
25 25
26 // Directory where The Documents Directory is On Disc 26 // Directory where The Documents Directory is On Disc
27 -$default->owl_FileDir = "/var/www/html/intranet"; 27 +$default->owl_FileDir = "C:/Projects/MRC/Devel/";
28 //$default->owl_FileDir = "/tmp"; 28 //$default->owl_FileDir = "/tmp";
29 29
30 // Set to true to use the file system to store documents, false only uses the database 30 // Set to true to use the file system to store documents, false only uses the database
@@ -57,7 +57,7 @@ $default->owl_use_fs = true; @@ -57,7 +57,7 @@ $default->owl_use_fs = true;
57 // Spanish 57 // Spanish
58 58
59 $default->owl_lang = "NewEnglish"; 59 $default->owl_lang = "NewEnglish";
60 -$default->owl_notify_link = "http://$SERVER_NAME$default->owl_root_url/"; 60 +$default->owl_notify_link = "http://$_SERVER[SERVER_NAME]$default->owl_root_url/";
61 61
62 // Table with user info 62 // Table with user info
63 $default->owl_users_table = "users"; 63 $default->owl_users_table = "users";
@@ -95,10 +95,10 @@ require("$default->owl_fs_root/phplib/db_mysql.inc"); @@ -95,10 +95,10 @@ require("$default->owl_fs_root/phplib/db_mysql.inc");
95 95
96 //begin WES change 96 //begin WES change
97 // Database info 97 // Database info
98 -$default->owl_db_user = "root";  
99 -$default->owl_db_pass = "";  
100 -$default->owl_db_host = "localhost";  
101 -$default->owl_db_name = "intranet"; 98 +$default->owl_db_user = "rob";
  99 +$default->owl_db_pass = "rob";
  100 +$default->owl_db_host = "";
  101 +$default->owl_db_name = "owl";
102 102
103 // logo file that must reside inside lang/graphics directory 103 // logo file that must reside inside lang/graphics directory
104 $default->logo = "owl.gif"; 104 $default->logo = "owl.gif";
locale/NewEnglish/language.inc
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 15
16 */ 16 */
17 17
18 -$lang_logout = "<IMG SRC='$default->owl_root_url/locale/$language/graphics/btn_logout.gif' BORDER=0>"; 18 +$lang_logout = "<IMG SRC='$default->owl_root_url/locale/NewEnglish/graphics/btn_logout.gif' BORDER=0>";
19 //$lang_logout = "(Logout)"; 19 //$lang_logout = "(Logout)";
20 $lang_login = "Login"; 20 $lang_login = "Login";
21 $lang_successlogout = "You have sucessfully logged out"; 21 $lang_successlogout = "You have sucessfully logged out";
@@ -183,7 +183,7 @@ $lang_notif_msg = &quot;THIS IS AN AUTOMATED MESSAGE FROM OWL Intranet\n\nFin @@ -183,7 +183,7 @@ $lang_notif_msg = &quot;THIS IS AN AUTOMATED MESSAGE FROM OWL Intranet\n\nFin
183 183
184 // Diego Bugfix 184 // Diego Bugfix
185 //$lang_admin = "Admin"; 185 //$lang_admin = "Admin";
186 -$lang_admin = "<BR><IMG SRC='$default->owl_root_url/locale/$language/graphics/btn_admin.gif' BORDER=0><BR>"; 186 +$lang_admin = "<BR><IMG SRC='$default->owl_root_url/locale/NewEnglish/graphics/btn_admin.gif' BORDER=0><BR>";
187 $lang_user = "User"; 187 $lang_user = "User";
188 $lang_search = "Search"; 188 $lang_search = "Search";
189 $lang_search_results_for = "Search results for"; 189 $lang_search_results_for = "Search results for";
test.php 0 → 100644
  1 +<?php
  2 +require_once ("./lib/visualpatterns/PatternMainPage.inc");
  3 +require_once ("./lib/visualpatterns/PatternImage.inc");
  4 +require_once ("./lib/visualpatterns/PatternTableLinks.inc");
  5 +require_once ("./lib/visualpatterns/PatternTableSqlQuery.inc");
  6 +
  7 +/* North west image */
  8 +$img = new PatternImage("file://C:/temp/test/al.jpg");
  9 +
  10 +/* build the top menu of links */
  11 +$aTopMenuLinks = array(0=>"www.google.com",1=>"www.yahoo.com",2=>"www.msn.com");
  12 +$aTopMenuText = array(0=>"google",1=>"yahoo",2=>"msn");
  13 +$oPatternTableLinks = new PatternTableLinks($aTopMenuLinks, $aTopMenuText, 3, 1);
  14 +
  15 +/* build the central grid for paging through results */
  16 +$aCentralPageColumns = array(0=>"name",1=>"parent",2=>"security");
  17 +$aColumnTypes = array(0=>1,1=>2,2=>1);
  18 +$oTableSqlQuery = & new PatternTableSqlQuery("Folders", $aCentralPageColumns, $aColumnTypes);
  19 +($HTTP_GET_VARS["fStartIndex"]) ? $oTableSqlQuery->setStartIndex($HTTP_GET_VARS["fStartIndex"]) : $oTableSqlQuery->setStartIndex(0);
  20 +$oTableSqlQuery->setLinkType(1);
  21 +
  22 +
  23 +
  24 +/* get a page */
  25 +$tmp = new PatternMainPage();
  26 +
  27 +/* put the page together */
  28 +$tmp->setNorthWestPayload($img);
  29 +$tmp->setNorthPayload($oPatternTableLinks);
  30 +$tmp->setCentralPayload($oTableSqlQuery);
  31 +$tmp->setFormAction("Navigate.inc");
  32 +$tmp->render();
  33 +
  34 +
  35 +
  36 +?>