Commit 395d15d2c77809ac48630e4476ecf04872c3dc10
1 parent
51259e32
reformatted
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1503 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
91 additions
and
122 deletions
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/addUserToGroupBL.php
| ... | ... | @@ -10,63 +10,47 @@ |
| 10 | 10 | require_once("../../../../../config/dmsDefaults.php"); |
| 11 | 11 | |
| 12 | 12 | if (checkSession()) { |
| 13 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 15 | - require_once("addUserToGroupUI.inc"); | |
| 16 | - require_once("$default->fileSystemRoot/lib/groups/Group.inc"); | |
| 17 | - require_once("$default->fileSystemRoot/lib/users/User.inc"); | |
| 18 | - require_once("$default->fileSystemRoot/lib/groups/GroupUserLink.inc"); | |
| 19 | - require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 20 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 21 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 22 | - require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 23 | - require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 24 | - require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 25 | - | |
| 26 | - | |
| 27 | - $oPatternCustom = & new PatternCustom(); | |
| 28 | - | |
| 29 | - if(!isset($fUserSet)){ | |
| 30 | - // build first page | |
| 31 | - | |
| 32 | - $oPatternCustom->setHtml(getPage(null,null)); | |
| 33 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1"); | |
| 34 | - | |
| 35 | - }else{ | |
| 36 | - | |
| 37 | - // do a check to see both drop downs selected | |
| 38 | - if($fUserID == -1 Or $fGroupID ==-1){ | |
| 39 | - | |
| 40 | - $oPatternCustom->setHtml(getPageNotSelected()); | |
| 41 | - | |
| 42 | - | |
| 43 | - }else{ | |
| 44 | - | |
| 45 | - $oPatternCustom->setHtml(getPage($fUserID,$fGroupID)); | |
| 46 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1&fUserAssign=1"); | |
| 47 | - | |
| 48 | - } | |
| 49 | - } | |
| 50 | - | |
| 51 | - if (isset($fUserAssign)){ | |
| 52 | - | |
| 53 | - // else add to db and then goto page succes | |
| 54 | - $oUserGroup = new GroupUserLink($fGroupID,$fUserID); | |
| 55 | - | |
| 56 | - if($oUserGroup->create()){ | |
| 57 | - | |
| 58 | - $oPatternCustom->setHtml(getPageSuccess()); | |
| 59 | - }else{ | |
| 60 | - $oPatternCustom->setHtml(getPageFail()); | |
| 61 | - } | |
| 62 | - | |
| 63 | - | |
| 64 | - | |
| 65 | - } | |
| 66 | - | |
| 67 | - // render page | |
| 68 | - $main->setCentralPayload($oPatternCustom); | |
| 69 | - $main->render(); | |
| 70 | - | |
| 13 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 15 | + require_once("addUserToGroupUI.inc"); | |
| 16 | + require_once("$default->fileSystemRoot/lib/groups/Group.inc"); | |
| 17 | + require_once("$default->fileSystemRoot/lib/users/User.inc"); | |
| 18 | + require_once("$default->fileSystemRoot/lib/groups/GroupUserLink.inc"); | |
| 19 | + require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 20 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 21 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 22 | + require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 23 | + require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 24 | + require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 25 | + | |
| 26 | + | |
| 27 | + $oPatternCustom = & new PatternCustom(); | |
| 28 | + | |
| 29 | + if(!isset($fUserSet)) { | |
| 30 | + // build first page | |
| 31 | + $oPatternCustom->setHtml(getPage(null,null)); | |
| 32 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1"); | |
| 33 | + } else { | |
| 34 | + // do a check to see both drop downs selected | |
| 35 | + if($fUserID == -1 Or $fGroupID ==-1) { | |
| 36 | + $oPatternCustom->setHtml(getPageNotSelected()); | |
| 37 | + } else { | |
| 38 | + $oPatternCustom->setHtml(getPage($fUserID,$fGroupID)); | |
| 39 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1&fUserAssign=1"); | |
| 40 | + } | |
| 41 | + } | |
| 42 | + | |
| 43 | + if (isset($fUserAssign)) { | |
| 44 | + // else add to db and then goto page succes | |
| 45 | + $oUserGroup = new GroupUserLink($fGroupID,$fUserID); | |
| 46 | + if($oUserGroup->create()) { | |
| 47 | + $oPatternCustom->setHtml(getPageSuccess()); | |
| 48 | + } else { | |
| 49 | + $oPatternCustom->setHtml(getPageFail()); | |
| 50 | + } | |
| 51 | + } | |
| 52 | + // render page | |
| 53 | + $main->setCentralPayload($oPatternCustom); | |
| 54 | + $main->render(); | |
| 71 | 55 | } |
| 72 | 56 | ?> | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/removeUserFromGroupBL.php
| ... | ... | @@ -10,69 +10,54 @@ |
| 10 | 10 | require_once("../../../../../config/dmsDefaults.php"); |
| 11 | 11 | |
| 12 | 12 | if (checkSession()) { |
| 13 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 15 | - require_once("removeUserFromGroupUI.inc"); | |
| 16 | - require_once("$default->fileSystemRoot/lib/groups/Group.inc"); | |
| 17 | - require_once("$default->fileSystemRoot/lib/users/User.inc"); | |
| 18 | - require_once("$default->fileSystemRoot/lib/groups/GroupUserLink.inc"); | |
| 19 | - require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 20 | - require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 21 | - require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 22 | - require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 23 | - require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 24 | - require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 25 | - | |
| 26 | - | |
| 27 | - $oPatternCustom = & new PatternCustom(); | |
| 28 | - | |
| 29 | - | |
| 30 | - if(isset($fUserSet)){ | |
| 31 | - | |
| 32 | - // do a check to see both drop downs selected | |
| 33 | - if($fUserID == -1){ | |
| 34 | - $oPatternCustom->setHtml(getPageNotSelected()); | |
| 35 | - | |
| 36 | - }else{ $faGroupID = GroupUserLink::getGroups($fUserID); | |
| 37 | - | |
| 38 | - $oPatternCustom->setHtml(getGroupPage($fUserID,$faGroupID)); | |
| 39 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1&fGroupSet=1"); | |
| 40 | - } | |
| 41 | - | |
| 42 | - }else{ | |
| 43 | - | |
| 44 | - // build first page | |
| 45 | - | |
| 46 | - $oPatternCustom->setHtml(getPage(null,null)); | |
| 47 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1"); | |
| 48 | - | |
| 49 | - } | |
| 50 | - | |
| 51 | - if(isset($fGroupSet)) | |
| 52 | - { | |
| 53 | - $oPatternCustom->setHtml(getDeleteConfirmedPage($fUserID,$fGroupID)); | |
| 54 | - $main->setFormAction($_SERVER["PHP_SELF"] . "?fDeleteConfirmed=1&fGroupID=$fGroupID"); | |
| 55 | - } | |
| 56 | - | |
| 57 | - if (isset($fDeleteConfirmed)){ | |
| 58 | - | |
| 59 | - // else add to db and then goto page succes | |
| 60 | - $oUserGroup = new GroupUserLink($fGroupID, $fUserID); | |
| 61 | - | |
| 62 | - $oUserGroup->setUserGroupID($fGroupID,$fUserID); | |
| 63 | - | |
| 64 | - if($oUserGroup->delete()){ | |
| 65 | - $oPatternCustom->setHtml(getPageSuccess()); | |
| 66 | - }else{ | |
| 67 | - $oPatternCustom->setHtml(getPageFail()); | |
| 68 | - } | |
| 69 | - | |
| 70 | - | |
| 71 | - } | |
| 72 | - | |
| 73 | - // render page | |
| 74 | - $main->setCentralPayload($oPatternCustom); | |
| 75 | - $main->render(); | |
| 76 | - | |
| 13 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListBox.inc"); | |
| 14 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCreate.inc"); | |
| 15 | + require_once("removeUserFromGroupUI.inc"); | |
| 16 | + require_once("$default->fileSystemRoot/lib/groups/Group.inc"); | |
| 17 | + require_once("$default->fileSystemRoot/lib/users/User.inc"); | |
| 18 | + require_once("$default->fileSystemRoot/lib/groups/GroupUserLink.inc"); | |
| 19 | + require_once("$default->fileSystemRoot/lib/security/permission.inc"); | |
| 20 | + require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | |
| 21 | + require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc"); | |
| 22 | + require_once("$default->fileSystemRoot/lib/foldermanagement/Folder.inc"); | |
| 23 | + require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc"); | |
| 24 | + require_once("$default->fileSystemRoot/presentation/Html.inc"); | |
| 25 | + | |
| 26 | + $oPatternCustom = & new PatternCustom(); | |
| 27 | + | |
| 28 | + if(isset($fUserSet)) { | |
| 29 | + // do a check to see both drop downs selected | |
| 30 | + if($fUserID == -1) { | |
| 31 | + $oPatternCustom->setHtml(getPageNotSelected()); | |
| 32 | + } else { | |
| 33 | + $faGroupID = GroupUserLink::getGroups($fUserID); | |
| 34 | + $oPatternCustom->setHtml(getGroupPage($fUserID,$faGroupID)); | |
| 35 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1&fGroupSet=1"); | |
| 36 | + } | |
| 37 | + } else { | |
| 38 | + // build first page | |
| 39 | + $oPatternCustom->setHtml(getPage(null,null)); | |
| 40 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fUserSet=1"); | |
| 41 | + } | |
| 42 | + | |
| 43 | + if(isset($fGroupSet)) { | |
| 44 | + $oPatternCustom->setHtml(getDeleteConfirmedPage($fUserID,$fGroupID)); | |
| 45 | + $main->setFormAction($_SERVER["PHP_SELF"] . "?fDeleteConfirmed=1&fGroupID=$fGroupID"); | |
| 46 | + } | |
| 47 | + | |
| 48 | + if (isset($fDeleteConfirmed)) { | |
| 49 | + // else add to db and then goto page succes | |
| 50 | + $oUserGroup = new GroupUserLink($fGroupID, $fUserID); | |
| 51 | + $oUserGroup->setUserGroupID($fGroupID,$fUserID); | |
| 52 | + if($oUserGroup->delete()) { | |
| 53 | + $oPatternCustom->setHtml(getPageSuccess()); | |
| 54 | + } else { | |
| 55 | + $oPatternCustom->setHtml(getPageFail()); | |
| 56 | + } | |
| 57 | + } | |
| 58 | + | |
| 59 | + // render page | |
| 60 | + $main->setCentralPayload($oPatternCustom); | |
| 61 | + $main->render(); | |
| 77 | 62 | } |
| 78 | 63 | ?> | ... | ... |