OSDN Git Service

add ACS webapp, sql, htdocs
[acs/acs.git] / webapp / lib / class / ACSDone.class.php
diff --git a/webapp/lib/class/ACSDone.class.php b/webapp/lib/class/ACSDone.class.php
new file mode 100644 (file)
index 0000000..8aae3d9
--- /dev/null
@@ -0,0 +1,158 @@
+<?php
+/**
+ * ACS Done
+ *
+ * Common ¥â¥¸¥å¡¼¥ë¤Î Done ¥¢¥¯¥·¥ç¥ó¤ËÅϤ¹¥ª¥Ö¥¸¥§¥¯¥È
+ * É½¼¨¤µ¤»¤¿¤¤ÆâÍƤòÊÝ»ý¤¹¤ë
+ *
+ * ¡ã»ÈÍÑÊýË¡¡ä
+ * -------------------------------------------------------------------
+ * require_once(ACS_CLASS_DIR . 'ACSDone.class.php');
+ *
+ * $done_obj = new ACSDone();
+ *
+ * $done_obj->set_title('¥¿¥¤¥È¥ë');
+ * $done_obj->set_message('¥á¥Ã¥»¡¼¥¸');
+ *
+ * // ¥ê¥ó¥¯¤ÏɬÍפÊʬ¤À¤±¡¢add_link ¤¹¤ë
+ * $done_obj->add_link('¥ê¥ó¥¯Àè̾£±', 'link1_url');
+ * $done_obj->add_link('¥ê¥ó¥¯Àè̾£²', 'link2_url');
+ *
+ * $request->setAttribute('done_obj', $done_obj);
+ * -------------------------------------------------------------------
+ *
+ * @author  kuwayama
+ * @version $Revision: 1.1 $ $Date: 2006/01/06 07:55:08 $
+ */
+class ACSDone
+{
+       /* ¥¿¥¤¥È¥ë */
+       var $title;
+
+       /* ¥á¥Ã¥»¡¼¥¸ */
+       var $message;
+
+       /* ¥ê¥ó¥¯ */
+       var $donelink_obj_array = array();
+
+
+       /**
+        * ¥¿¥¤¥È¥ë¥»¥Ã¥È
+        *
+        * @param $title
+        */
+       function set_title ($title) {
+               $this->title = $title;
+       }
+
+       /**
+        * ¥¿¥¤¥È¥ë¥²¥Ã¥È
+        *
+        * @return ¥¿¥¤¥È¥ë
+        */
+       function get_title () {
+               return $this->title;
+       }
+
+       /**
+        * ¥á¥Ã¥»¡¼¥¸¥»¥Ã¥È
+        *
+        * @param $message
+        */
+       function set_message ($message) {
+               $this->message = $message;
+       }
+
+       /**
+        * ¥á¥Ã¥»¡¼¥¸¥²¥Ã¥È
+        *
+        * @return ¥á¥Ã¥»¡¼¥¸
+        */
+       function get_message () {
+               return $this->message;
+       }
+
+       /**
+        * ¥ê¥ó¥¯¥»¥Ã¥È
+        *
+        * @param $link_name
+        * @param $link_url
+        */
+       function add_link ($link_name, $link_url) {
+               $donelink_obj = new ACSDoneLink();
+
+               $donelink_obj->set_link_name($link_name);
+               $donelink_obj->set_url($link_url);
+
+               array_push($this->donelink_obj_array, $donelink_obj);
+       }
+
+       /**
+        * ¥ê¥ó¥¯¥²¥Ã¥È
+        *
+        * @return ¥ê¥ó¥¯¤ÎÇÛÎó
+        */
+       function get_link_row_array () {
+               $link_row_array = array();
+               foreach ($this->donelink_obj_array as $donelink_obj) {
+                       $link_row = array();
+
+                       $link_row['link_name'] = $donelink_obj->get_link_name();
+                       $link_row['url']  = $donelink_obj->get_url();
+
+                       array_push($link_row_array, $link_row);
+               }
+               return $link_row_array;
+       }
+}
+
+/**
+ * ACS DoneLink
+ *
+ * Done¥¯¥é¥¹¤ÇÊÝ»ý¤¹¤ë¥ê¥ó¥¯¤Î¥ª¥Ö¥¸¥§¥¯¥È
+ * ¥ê¥ó¥¯Àè̾¤ÈURL¤òÊÝ»ý¤¹¤ë
+ *
+ * @author  kuwayama
+ * @version $Revision: 1.1 $ $Date: 2006/01/06 07:55:08 $
+ */
+class ACSDoneLink
+{
+       /* ¥ê¥ó¥¯Àè̾ */
+       var $link_name;
+
+       /* ¥ê¥ó¥¯Àè URL */
+       var $url;
+
+       /**
+        * ¥ê¥ó¥¯Àè̾¥»¥Ã¥È
+        *
+        * @param ¥ê¥ó¥¯Àè
+        */
+       function set_link_name ($link_name) {
+               $this->link_name = $link_name;
+       }
+
+       /**
+        * ¥ê¥ó¥¯Àè̾¥²¥Ã¥È
+        */
+       function get_link_name () {
+               return $this->link_name;
+       }
+
+       /**
+        * ¥ê¥ó¥¯Àè URL ¥»¥Ã¥È
+        *
+        * @param ¥ê¥ó¥¯Àè
+        */
+       function set_url ($url) {
+               $this->url = $url;
+       }
+
+       /**
+        * ¥ê¥ó¥¯Àè URL ¥²¥Ã¥È
+        */
+       function get_url () {
+               return $this->url;
+       }
+}
+?>