OSDN Git Service

add ACS webapp, sql, htdocs
[acs/acs.git] / webapp / modules / Community / views / JoinCommunityInputView.class.php
diff --git a/webapp/modules/Community/views/JoinCommunityInputView.class.php b/webapp/modules/Community/views/JoinCommunityInputView.class.php
new file mode 100644 (file)
index 0000000..595e61b
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+// $Id: JoinCommunityInputView.class.php,v 1.1 2006/01/06 09:51:35 w-ota Exp $
+
+class JoinCommunityInputView extends BaseView
+{
+       function execute() {
+               $context = $this->getContext();
+               $controller = $context->getController();
+               $request =  $context->getRequest();
+               $user = $context->getUser();
+               $acs_user_info_row = $user->getAttribute('acs_user_info_row');
+
+               // get
+               $community_row = $request->getAttribute('community_row');
+               $is_admission_required = $request->getAttribute('is_admission_required');
+
+               // URL
+               $action_url = $this->getControllerPath('Community', 'JoinCommunity') . '&community_id=' . $community_row['community_id'];
+               $back_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
+               // ¥³¥ß¥å¥Ë¥Æ¥£¥È¥Ã¥×¥Ú¡¼¥¸¤ÎURL
+               $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
+
+               // ¥Æ¥ó¥×¥ì¡¼¥È
+               if ($is_admission_required) {
+                       // ¾µÇ§¤¬É¬Í×
+               $this->setScreenId("0001");
+                       $this->setTemplate('JoinCommunity_admission.tpl.php');
+               } else {
+                       // ¼«Í³»²²Ã
+               $this->setScreenId("0001");
+                       $this->setTemplate('JoinCommunity.tpl.php');
+               }
+
+               // set
+               $this->setAttribute('community_row', $community_row);
+               $this->setAttribute('is_admission_required', $is_admission_required);
+               $this->setAttribute('back_url', $back_url);
+               $this->setAttribute('action_url', $action_url);
+               $this->setAttribute('community_top_page_url', $community_top_page_url);
+
+               return parent::execute();
+       }
+}
+
+?>