[xoops-cvslog 2638] CVS update: xoops2jp/html/modules/base/class

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 4月 5日 (水) 19:58:39 JST


Index: xoops2jp/html/modules/base/class/newblocks.php
diff -u /dev/null xoops2jp/html/modules/base/class/newblocks.php:1.1.2.1
--- /dev/null	Wed Apr  5 19:58:39 2006
+++ xoops2jp/html/modules/base/class/newblocks.php	Wed Apr  5 19:58:39 2006
@@ -0,0 +1,47 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+class BaseNewblocksObject extends XoopsSimpleObject
+{
+	var $mModule = null;
+	
+	function BaseNewblocksObject()
+	{
+		$this->initVar('bid', XOBJ_DTYPE_INT, '', true);
+		$this->initVar('mid', XOBJ_DTYPE_INT, '0', true);
+		$this->initVar('func_num', XOBJ_DTYPE_INT, '0', true);
+		$this->initVar('options', XOBJ_DTYPE_STRING, '', true, 255);
+		$this->initVar('name', XOBJ_DTYPE_STRING, '', true, 150);
+		$this->initVar('title', XOBJ_DTYPE_STRING, '', true, 255);
+		$this->initVar('content', XOBJ_DTYPE_TEXT, '', true);
+		$this->initVar('side', XOBJ_DTYPE_INT, '0', true);
+		$this->initVar('weight', XOBJ_DTYPE_INT, '0', true);
+		$this->initVar('visible', XOBJ_DTYPE_BOOL, '0', true);
+		$this->initVar('block_type', XOBJ_DTYPE_STRING, '', true, 1);
+		$this->initVar('c_type', XOBJ_DTYPE_STRING, '', true, 1);
+		$this->initVar('isactive', XOBJ_DTYPE_BOOL, '0', true);
+		$this->initVar('dirname', XOBJ_DTYPE_STRING, '', true, 50);
+		$this->initVar('func_file', XOBJ_DTYPE_STRING, '', true, 50);
+		$this->initVar('show_func', XOBJ_DTYPE_STRING, '', true, 50);
+		$this->initVar('edit_func', XOBJ_DTYPE_STRING, '', true, 50);
+		$this->initVar('template', XOBJ_DTYPE_STRING, '', true, 50);
+		$this->initVar('bcachetime', XOBJ_DTYPE_INT, '0', true);
+		$this->initVar('last_modified', XOBJ_DTYPE_INT, '0', true);
+	}
+	
+	function loadModule()
+	{
+		$handler =& xoops_gethandler('module');
+		$this->mModule =& $handler->get($this->get('mid'));
+	}
+}
+
+class BaseNewblocksHandler extends XoopsObjectGenericHandler
+{
+	var $mTable = "newblocks";
+	var $mPrimary = "bid";
+	var $mClass = "BaseNewblocksObject";
+}
+
+?>
Index: xoops2jp/html/modules/base/class/columnside.php
diff -u /dev/null xoops2jp/html/modules/base/class/columnside.php:1.1.2.1
--- /dev/null	Wed Apr  5 19:58:39 2006
+++ xoops2jp/html/modules/base/class/columnside.php	Wed Apr  5 19:58:39 2006
@@ -0,0 +1,81 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
+require_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
+
+class BaseColumnsideObject extends XoopsSimpleObject
+{
+	function BaseColumnsideObject()
+	{
+		$this->initVar('id', XOBJ_DTYPE_INT, '', true);
+		$this->initVar('name', XOBJ_DTYPE_STRING, '', true, 255);
+	}
+}
+
+class BaseColumnsideHandler extends XoopsObjectHandler
+{
+	var $_mResults = array();
+	
+	function BaseColumnsideHandler(&$db)
+	{
+		$t_arr = array (
+				0 => _AD_BASE_LANG_SIDE_BLOCK_LEFT,
+				1 => _AD_BASE_LANG_SIDE_BLOCK_RIGHT,
+				3 => _AD_BASE_LANG_CENTER_BLOCK_LEFT,
+				4 => _AD_BASE_LANG_CENTER_BLOCK_RIGHT,
+				5 => _AD_BASE_LANG_CENTER_BLOCK_CENTER
+			);
+			
+		foreach ($t_arr as $id => $name) {
+			$this->_mResults[$id] =& $this->create();
+			$this->_mResults[$id]->setVar('id', $id);
+			$this->_mResults[$id]->setVar('name', $name);
+		}
+	}
+	
+	function &create()
+	{
+		$ret =& new BaseColumnsideObject();
+		return $ret;
+	}
+	
+	function get($id)
+	{
+		if (isset($this->_mResults[$id])) {
+			return $this->_mResults[$id];
+		}
+		
+		$ret = null;
+		return $ret;
+	}
+	
+	function &getObjects($criteria = null, $id_as_key = false)
+	{
+		if ($id_as_key) {
+			return $this->_mResults;
+		}
+		else {
+			$ret = array();
+		
+			foreach (array_keys($this->_mResults) as $key) {
+				$ret[] =& $this->_mResults[$key];
+			}
+			
+			return $ret;
+		}
+	}
+	
+	function insert(&$obj)
+	{
+		return false;
+	}
+
+	function delete(&$obj)
+	{
+		return false;
+	}
+}
+
+?>


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る