[xoops-cvslog 1853] CVS update: xoops2jp/html/modules/user/admin/forms

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 1月 19日 (木) 21:07:26 JST


Index: xoops2jp/html/modules/user/admin/forms/AvatarAdminEditForm.class.php
diff -u /dev/null xoops2jp/html/modules/user/admin/forms/AvatarAdminEditForm.class.php:1.1.2.1
--- /dev/null	Thu Jan 19 21:07:26 2006
+++ xoops2jp/html/modules/user/admin/forms/AvatarAdminEditForm.class.php	Thu Jan 19 21:07:26 2006
@@ -0,0 +1,88 @@
+<?php
+
+require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php";
+
+/**
+ * This class is generated by makeActionForm tool.
+ */
+class AvatarAdminEditForm extends XCube_ActionForm
+{
+	var $mOldFileName = null;
+	var $_mIsNew = false;
+	var $mFormFile = null;
+	
+	function getTokenName()
+	{
+		return "module.user.AvatarAdminEditForm.TOKEN";
+	}
+
+	function prepare()
+	{
+		//
+		// Set form properties
+		//
+		$this->mFormProperties['avatar_id'] =& new XCube_IntProperty('avatar_id');
+		$this->mFormProperties['avatar_file'] =& new XCube_FileProperty('avatar_file');
+		$this->mFormProperties['avatar_name'] =& new XCube_StringProperty('avatar_name');
+		$this->mFormProperties['avatar_display'] =& new XCube_BoolProperty('avatar_display');
+		$this->mFormProperties['avatar_weight'] =& new XCube_IntProperty('avatar_weight');
+
+		//
+		// Set field properties
+		//
+		$this->mFieldProperties['avatar_id'] =& new XCube_FieldProperty($this);
+		$this->mFieldProperties['avatar_id']->setDependsByArray(array('required'));
+		$this->mFieldProperties['avatar_id']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_AVATAR_ID);
+
+		$this->mFieldProperties['avatar_file'] =& new XCube_FieldProperty($this);
+		$this->mFieldProperties['avatar_file']->setDependsByArray(array('required','extension'));
+		$this->mFieldProperties['avatar_file']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_AVATAR_FILE);
+		$this->mFieldProperties['avatar_file']->addMessage('extension', _AD_USER_ERROR_AVATAR_EXTENSION, _AD_USER_LANG_AVATAR_FILE);
+		$this->mFieldProperties['avatar_file']->addVar('extension', "gif,png,jpg");
+
+		$this->mFieldProperties['avatar_name'] =& new XCube_FieldProperty($this);
+		$this->mFieldProperties['avatar_name']->setDependsByArray(array('required','maxlength'));
+		$this->mFieldProperties['avatar_name']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_AVATAR_NAME, '100');
+		$this->mFieldProperties['avatar_name']->addMessage('maxlength', _AD_USER_ERROR_MAXLENGTH, _AD_USER_LANG_AVATAR_NAME, '100');
+		$this->mFieldProperties['avatar_name']->addVar('maxlength', 100);
+
+		$this->mFieldProperties['avatar_weight'] =& new XCube_FieldProperty($this);
+		$this->mFieldProperties['avatar_weight']->setDependsByArray(array('required'));
+		$this->mFieldProperties['avatar_weight']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_AVATAR_WEIGHT);
+	}
+
+	function validateRank_image()
+	{
+		if ($this->_mIsNew && $this->get('avatar_file') == null) {
+			$this->addErrorMessage(_AD_USER_ERROR_IMAGE_REQUIRED);
+		}
+	}
+	
+	function load(&$obj)
+	{
+		$this->set('avatar_id', $obj->get('avatar_id'));
+		$this->set('avatar_name', $obj->get('avatar_name'));
+		$this->set('avatar_display', $obj->get('avatar_display'));
+		$this->set('avatar_weight', $obj->get('avatar_weight'));
+		
+		$this->_mIsNew = $obj->isNew();
+		$this->mOldFileName = $obj->get('rank_image');
+	}
+
+	function update(&$obj)
+	{
+		$obj->set('avatar_id', $this->get('avatar_id'));
+		$obj->set('avatar_name', $this->get('avatar_name'));
+		$obj->set('avatar_display', $this->get('avatar_display'));
+		$obj->set('avatar_weight', $this->get('avatar_weight'));
+	
+		$this->mFormFile = $this->get('avatar_file');
+		if ($this->mFormFile != null) {
+			$this->mFormFile->setRandomToBodyName('savt');
+			$obj->setVar('avatar_file', $this->mFormFile->getFileName());
+			$obj->setVar('avatar_mimetype', $this->mFormFile->getContentType());
+		}
+	}
+}
+
+?>
Index: xoops2jp/html/modules/user/admin/forms/GroupAdminDeleteForm.class.php
diff -u /dev/null xoops2jp/html/modules/user/admin/forms/GroupAdminDeleteForm.class.php:1.1.2.1
--- /dev/null	Thu Jan 19 21:07:26 2006
+++ xoops2jp/html/modules/user/admin/forms/GroupAdminDeleteForm.class.php	Thu Jan 19 21:07:26 2006
@@ -0,0 +1,41 @@
+<?php
+
+require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php";
+
+/**
+ * This class is generated by makeActionForm tool.
+ */
+class GroupAdminDeleteForm extends XCube_ActionForm
+{
+	function getTokenName()
+	{
+		return "module.user.GroupAdminDeleteForm.TOKEN";
+	}
+
+	function prepare()
+	{
+		//
+		// Set form properties
+		//
+		$this->mFormProperties['groupid'] =& new XCube_IntProperty('groupid');
+
+		//
+		// Set field properties
+		//
+		$this->mFieldProperties['groupid'] =& new XCube_FieldProperty($this);
+		$this->mFieldProperties['groupid']->setDependsByArray(array('required'));
+		$this->mFieldProperties['groupid']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_GROUPID);
+	}
+
+	function load(&$obj)
+	{
+		$this->setVar('groupid', $obj->get('groupid'));
+	}
+
+	function update(&$obj)
+	{
+		$obj->setVar('groupid', $this->get('groupid'));
+	}
+}
+
+?>
Index: xoops2jp/html/modules/user/admin/forms/AvatarAdminDeleteForm.class.php
diff -u /dev/null xoops2jp/html/modules/user/admin/forms/AvatarAdminDeleteForm.class.php:1.1.2.1
--- /dev/null	Thu Jan 19 21:07:26 2006
+++ xoops2jp/html/modules/user/admin/forms/AvatarAdminDeleteForm.class.php	Thu Jan 19 21:07:26 2006
@@ -0,0 +1,41 @@
+<?php
+
+require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php";
+
+/**
+ * This class is generated by makeActionForm tool.
+ */
+class AvatarAdminDeleteForm extends XCube_ActionForm
+{
+	function getTokenName()
+	{
+		return "module.user.AvatarAdminDeleteForm.TOKEN";
+	}
+
+	function prepare()
+	{
+		//
+		// Set form properties
+		//
+		$this->mFormProperties['avatar_id'] =& new XCube_IntProperty('avatar_id');
+
+		//
+		// Set field properties
+		//
+		$this->mFieldProperties['avatar_id'] =& new XCube_FieldProperty($this);
+		$this->mFieldProperties['avatar_id']->setDependsByArray(array('required'));
+		$this->mFieldProperties['avatar_id']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_AVATAR_ID);
+	}
+
+	function load(&$obj)
+	{
+		$this->setVar('avatar_id', $obj->get('avatar_id'));
+	}
+
+	function update(&$obj)
+	{
+		$obj->setVar('avatar_id', $this->get('avatar_id'));
+	}
+}
+
+?>
Index: xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php
diff -u /dev/null xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php:1.1.2.1
--- /dev/null	Thu Jan 19 21:07:26 2006
+++ xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php	Thu Jan 19 21:07:26 2006
@@ -0,0 +1,46 @@
+<?php
+
+require_once XOOPS_MODULE_PATH . "/user/class/AbstractFilterForm.class.php";
+
+define('GROUP_SORT_KEY_DEFAULT', 0);
+define('GROUP_SORT_KEY_GROUPID', 1);
+define('GROUP_SORT_KEY_NAME', 2);
+define('GROUP_SORT_KEY_DESCRIPTION', 3);
+define('GROUP_SORT_KEY_GROUP_TYPE', 4);
+define('GROUP_SORT_KEY_MAXVALUE', 4);
+
+class User_GroupFilterForm extends User_AbstractFilterForm
+{
+	var $mSort = 0;
+	var $_mSortKeys = array(
+		GROUP_SORT_KEY_DEFAULT => 'groupid',
+		GROUP_SORT_KEY_GROUPID => 'groupid',
+		GROUP_SORT_KEY_NAME => 'name',
+		GROUP_SORT_KEY_DESCRIPTION => 'description',
+		GROUP_SORT_KEY_GROUP_TYPE => 'group_type'
+	);
+	var $_mCriteria = null;
+
+	function fetch()
+	{
+		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+	
+		if ($this->mSort > GROUP_SORT_KEY_MAXVALUE) {
+			$this->mSort = GROUP_SORT_KEY_DEFAULT;
+		}
+	
+		if (isset($_REQUEST['groupid'])) {
+			$this->_mCriteria->add(new Criteria('groupid', array(XOBJ_DTYPE_INT, xoops_getrequest('groupid'))));
+		}
+	
+		if (isset($_REQUEST['name'])) {
+			$this->_mCriteria->add(new Criteria('name', array(XOBJ_DTYPE_STRING, xoops_getrequest('name'))));
+		}
+	
+		if (isset($_REQUEST['group_type'])) {
+			$this->_mCriteria->add(new Criteria('group_type', array(XOBJ_DTYPE_STRING, xoops_getrequest('group_type'))));
+		}
+	}
+}
+
+?>
Index: xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php
diff -u /dev/null xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php:1.1.2.1
--- /dev/null	Thu Jan 19 21:07:26 2006
+++ xoops2jp/html/modules/user/admin/forms/AvatarFilterForm.class.php	Thu Jan 19 21:07:26 2006
@@ -0,0 +1,74 @@
+<?php
+
+require_once XOOPS_MODULE_PATH . "/user/class/AbstractFilterForm.class.php";
+
+define('AVATAR_SORT_KEY_DEFAULT', 0);
+define('AVATAR_SORT_KEY_AVATAR_ID', 1);
+define('AVATAR_SORT_KEY_AVATAR_FILE', 2);
+define('AVATAR_SORT_KEY_AVATAR_NAME', 3);
+define('AVATAR_SORT_KEY_AVATAR_MIMETYPE', 4);
+define('AVATAR_SORT_KEY_AVATAR_CREATED', 5);
+define('AVATAR_SORT_KEY_AVATAR_DISPLAY', 6);
+define('AVATAR_SORT_KEY_AVATAR_WEIGHT', 7);
+define('AVATAR_SORT_KEY_AVATAR_TYPE', 8);
+define('AVATAR_SORT_KEY_MAXVALUE', 8);
+
+class User_AvatarFilterForm extends User_AbstractFilterForm
+{
+	var $mSort = 0;
+	var $_mSortKeys = array(
+		AVATAR_SORT_KEY_DEFAULT => 'avatar_id',
+		AVATAR_SORT_KEY_AVATAR_ID => 'avatar_id',
+		AVATAR_SORT_KEY_AVATAR_FILE => 'avatar_file',
+		AVATAR_SORT_KEY_AVATAR_NAME => 'avatar_name',
+		AVATAR_SORT_KEY_AVATAR_MIMETYPE => 'avatar_mimetype',
+		AVATAR_SORT_KEY_AVATAR_CREATED => 'avatar_created',
+		AVATAR_SORT_KEY_AVATAR_DISPLAY => 'avatar_display',
+		AVATAR_SORT_KEY_AVATAR_WEIGHT => 'avatar_weight',
+		AVATAR_SORT_KEY_AVATAR_TYPE => 'avatar_type'
+	);
+	var $_mCriteria = null;
+
+	function fetch()
+	{
+		$this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+	
+		if ($this->mSort > AVATAR_SORT_KEY_MAXVALUE) {
+			$this->mSort = AVATAR_SORT_KEY_DEFAULT;
+		}
+	
+		if (isset($_REQUEST['avatar_id'])) {
+			$this->_mCriteria->add(new Criteria('avatar_id', array(XOBJ_DTYPE_INT, xoops_getrequest('avatar_id'))));
+		}
+	
+		if (isset($_REQUEST['avatar_file'])) {
+			$this->_mCriteria->add(new Criteria('avatar_file', array(XOBJ_DTYPE_STRING, xoops_getrequest('avatar_file'))));
+		}
+	
+		if (isset($_REQUEST['avatar_name'])) {
+			$this->_mCriteria->add(new Criteria('avatar_name', array(XOBJ_DTYPE_STRING, xoops_getrequest('avatar_name'))));
+		}
+	
+		if (isset($_REQUEST['avatar_mimetype'])) {
+			$this->_mCriteria->add(new Criteria('avatar_mimetype', array(XOBJ_DTYPE_STRING, xoops_getrequest('avatar_mimetype'))));
+		}
+	
+		if (isset($_REQUEST['avatar_created'])) {
+			$this->_mCriteria->add(new Criteria('avatar_created', array(XOBJ_DTYPE_INT, xoops_getrequest('avatar_created'))));
+		}
+	
+		if (isset($_REQUEST['avatar_display'])) {
+			$this->_mCriteria->add(new Criteria('avatar_display', array(XOBJ_DTYPE_BOOL, xoops_getrequest('avatar_display'))));
+		}
+	
+		if (isset($_REQUEST['avatar_weight'])) {
+			$this->_mCriteria->add(new Criteria('avatar_weight', array(XOBJ_DTYPE_INT, xoops_getrequest('avatar_weight'))));
+		}
+	
+		if (isset($_REQUEST['avatar_type'])) {
+			$this->_mCriteria->add(new Criteria('avatar_type', array(XOBJ_DTYPE_STRING, xoops_getrequest('avatar_type'))));
+		}
+	}
+}
+
+?>


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