Commit 8dea36c362e40811f3bf6a48aa111acb33c3ca84
1 parent
a113c178
(#2813) refactored and tidied
incorporated addWebsite link git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2517 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
53 additions
and
42 deletions
presentation/lookAndFeel/knowledgeTree/administration/websitemanagement/addWebsiteBL.php
| ... | ... | @@ -20,6 +20,7 @@ if (checkSession()) { |
| 20 | 20 | require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); |
| 21 | 21 | require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); |
| 22 | 22 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 23 | + require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | |
| 23 | 24 | |
| 24 | 25 | $oPatternCustom = & new PatternCustom(); |
| 25 | 26 | $oPatternCustom->setHtml(getPage()); | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/websitemanagement/addWebsiteUI.inc
| ... | ... | @@ -32,7 +32,8 @@ function getPage() { |
| 32 | 32 | $sToRender .= "</tr>\n"; |
| 33 | 33 | $sToRender .= "<tr>\n"; |
| 34 | 34 | $sToRender .= "</tr>\n"; |
| 35 | - $sToRender .= "<td></td><td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/add.gif\" value=\"Submit\" border=\"0\"/></td>\n"; | |
| 35 | + $sToRender .= "<td></td><td align = right><input type=\"image\" src =\"$default->graphicsUrl/widgets/add.gif\" value=\"Submit\" border=\"0\"/>"; | |
| 36 | + $sToRender .= getCancelButton("listWebsites") . "</td>\n"; | |
| 36 | 37 | $sToRender .= "</table>\n"; |
| 37 | 38 | |
| 38 | 39 | return $sToRender; |
| ... | ... | @@ -55,14 +56,4 @@ function getAddPageFail() { |
| 55 | 56 | |
| 56 | 57 | return $sToRender; |
| 57 | 58 | } |
| 58 | - | |
| 59 | -// gets the cancel button when a website is selected | |
| 60 | -function getCancelButton($oWebsite) { | |
| 61 | - global $default; | |
| 62 | - if (!isset($oWebsite)) { | |
| 63 | - return "<td align = right><a href=\"$default->rootUrl/control.php?action=websiteManagement\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" value=\"cancel\" /></a></td>\n"; | |
| 64 | - } else { | |
| 65 | - return "<td align = right><a href=\"$default->rootUrl/control.php?action=editLink\"><img src =\"$default->graphicsUrl/widgets/cancel.gif\" border = \"0\" /></a></td>\n"; | |
| 66 | - } | |
| 67 | -} | |
| 68 | 59 | ?> |
| 69 | 60 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/websitemanagement/listWebsitesBL.php
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | -* BL information for listing Documemnt Fields | |
| 3 | +* BL information for viewing a Discussion | |
| 4 | 4 | * |
| 5 | 5 | * @author Omar Rahbeeni |
| 6 | 6 | * @date 19 May 2003 |
| ... | ... | @@ -9,44 +9,21 @@ |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | require_once("../../../../../config/dmsDefaults.php"); |
| 12 | -require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 13 | -require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 14 | -require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 15 | 12 | require_once("$default->fileSystemRoot/lib/users/User.inc"); |
| 16 | 13 | require_once("$default->fileSystemRoot/lib/security/permission.inc"); |
| 17 | 14 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); |
| 18 | 15 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternTableSqlQuery.inc"); |
| 19 | -require_once("$default->fileSystemRoot/lib/visualpatterns/PatternBrowsableSearchResults.inc"); | |
| 20 | 16 | require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); |
| 21 | 17 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 18 | +require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/administration/adminUI.inc"); | |
| 19 | +require_once("listWebsitesUI.inc"); | |
| 22 | 20 | |
| 23 | -if(checkSession()) { | |
| 24 | - $oPatternCustom = & new PatternCustom(); | |
| 25 | - | |
| 26 | - $sQuery = "SELECT id as WebsiteID, web_site_name as WebsiteName, web_site_url WebsiteURL, web_master_id as WebmasterID, " . | |
| 27 | - "'Edit', 'Delete' " . | |
| 28 | - "FROM " . $default->owl_web_sites_table . " " . | |
| 29 | - "ORDER BY web_site_name"; | |
| 30 | - | |
| 31 | - $aColumns = array("WebsiteName", "WebsiteURL", "Edit", "Delete"); | |
| 32 | - $aColumnNames = array("Link Name","URL", "Edit", "Delete"); | |
| 33 | - $aColumnTypes = array(1,1,3,3); | |
| 34 | - $aDBColumnArray = array("WebsiteID"); | |
| 35 | - $aQueryStringVariableNames = array("fWebSiteID"); | |
| 36 | - | |
| 37 | - $aHyperLinkURL = array( 2=> "$default->rootUrl/control.php?action=editWebSite", | |
| 38 | - 3=> "$default->rootUrl/control.php?action=removeWebSite"); | |
| 39 | - | |
| 40 | - | |
| 41 | - $oSearchResults = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnNames, "100%", $aHyperLinkURL,$aDBColumnArray,$aQueryStringVariableNames); | |
| 42 | - $oSearchResults->setDisplayColumnHeadings(true); | |
| 43 | - $htmlTables = $oSearchResults->render() ; | |
| 44 | - | |
| 45 | - $oPatternCustom->addHtml(renderHeading("Website Management")); | |
| 46 | - $oPatternCustom->addHtml($htmlTables); | |
| 47 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 21 | +if (checkSession()) { | |
| 22 | + $oPatternCustom = & new PatternCustom(); | |
| 23 | + $oPatternCustom->setHtml(getPage($fGroupID)); | |
| 24 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 48 | 25 | $main->setCentralPayload($oPatternCustom); |
| 49 | 26 | $main->setFormAction($_SERVER['PHP_SELF']); |
| 50 | - $main->render(); | |
| 27 | + $main->render(); | |
| 51 | 28 | } |
| 52 | 29 | ?> |
| 53 | 30 | \ No newline at end of file | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/websitemanagement/listWebsitesUI.inc
0 → 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* Presentation information for adding a unit | |
| 4 | +* | |
| 5 | +* @author Omar Rahbeeni | |
| 6 | +* @date 19 May 2003 | |
| 7 | +* @package presentation.lookAndFeel.knowledgeTree. | |
| 8 | +* | |
| 9 | +*/ | |
| 10 | +function getWebsites() { | |
| 11 | + global $default; | |
| 12 | + $sQuery = "SELECT id as WebsiteID, web_site_name as WebsiteName, web_site_url WebsiteURL, web_master_id as WebmasterID, " . | |
| 13 | + "'Edit', 'Delete' " . | |
| 14 | + "FROM " . $default->owl_web_sites_table . " " . | |
| 15 | + "ORDER BY web_site_name"; | |
| 16 | + | |
| 17 | + $aColumns = array("WebsiteName", "WebsiteURL", "Edit", "Delete"); | |
| 18 | + $aColumnNames = array("Link Name","URL", "Edit", "Delete"); | |
| 19 | + $aColumnTypes = array(1,1,3,3); | |
| 20 | + $aDBColumnArray = array("WebsiteID"); | |
| 21 | + $aQueryStringVariableNames = array("fWebSiteID"); | |
| 22 | + | |
| 23 | + $aHyperLinkURL = array( 2=> "$default->rootUrl/control.php?action=editWebSite", | |
| 24 | + 3=> "$default->rootUrl/control.php?action=removeWebSite"); | |
| 25 | + | |
| 26 | + | |
| 27 | + $oSearchResults = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnNames, "100%", $aHyperLinkURL,$aDBColumnArray,$aQueryStringVariableNames); | |
| 28 | + $oSearchResults->setDisplayColumnHeadings(true); | |
| 29 | + | |
| 30 | + return $oSearchResults->render() ; | |
| 31 | +} | |
| 32 | + | |
| 33 | +function getPage() { | |
| 34 | + global $default; | |
| 35 | + $sToRender .= renderHeading("Current System Websites"); | |
| 36 | + | |
| 37 | + // add user link | |
| 38 | + $sToRender .= getAddLink("addWebsite", "Add A Website"); | |
| 39 | + $sToRender .= getWebsites(); | |
| 40 | + return $sToRender; | |
| 41 | +} | |
| 42 | +?> | |
| 0 | 43 | \ No newline at end of file | ... | ... |