37 $this->
setName(
$multi ? str_replace(
'[]',
'', $name) : $name);
46 !defined(
'RM_FRAME_APPS_CREATED') ? define(
'RM_FRAME_APPS_CREATED', 1) :
'';
52 if ($value==0 || $value==1){
54 $this->
multi = $value;
61 return $this->
type = $value;
73 return $this->cols = $value;
104 $this->selectedSubPages = $subs;
108 $module_handler =& xoops_gethandler(
'module');
109 $criteria =
new CriteriaCompo(
new Criteria(
'hasmain', 1));
110 $criteria->add(
new Criteria(
'isactive', 1));
111 if($this->
subpages) $criteria->add(
new Criteria(
'dirname',
'system'),
'OR');
115 foreach ($module_handler->getList($criteria, $this->dirnames) as $k => $v){
121 RMTemplate::get()->add_local_script(
'modules_field.js',
'rmcommon',
'include');
123 $rtn =
'<div class="modules_field">';
128 $rtn .=
"<div class=\"mod_item\">";
131 $rtn .=
"<label id=\"modlabel-$k\" class='field_module_names'><input type='checkbox' value='$k' name='".$name.
"' id='".$this->
id().
"-$k'".(is_array($this->
selected) ? (in_array($k, $this->
selected) ?
" checked='checked'" :
'') :
'').
" /> $v</label>";
133 $rtn .=
"<label id=\"modlabel-$k\" class=\"field_module_names\"><input type='radio' value='$k' name='".$this->getName().
"' id='".$this->
id().
"-$k'".(!empty($this->
selected) ? ($k == $this->
selected ?
" checked='checked'" :
'') :
'').
" /> $v</label>";
140 if($app->dirname()==
'system'){
142 'home-page' =>
__(
'Home Page',
'rmcommon'),
143 'user' =>
__(
'User page',
'dtransport'),
144 'profile' =>
__(
'User profile page',
'rmcommon'),
145 'register' =>
__(
'Users registration',
'rmcommon'),
146 'edit-user' =>
__(
'Edit user',
'rmcommon'),
147 'readpm' =>
__(
'Read PM',
'rmcommon'),
148 'pm' =>
__(
'Private messages',
'rmcomon')
156 $rtn.=
"<div id=\"subpages-".$k.
"\" class=\"subpages_container\">
157 <div class='sp_title'><span id=\"close-$k\"></span>".
__(
'Inner pages',
'rmcommon').
"</div>";
163 $rtn.=
"<div class=\"sub_item\"><label><input type='checkbox' name='".$name.
"[subpages][$page]' id='subpages[$k][$page]' value='$page'".(is_array(
$subpages) && @in_array(
$page,
$selected[$k]) ?
" checked='checked'" :
'').
" onclick=\"checkSubpageClick('subpages[$k][$page]', $k);\" /> $caption</label></div>";
179 $name = $this->
getName().
"[$k]";
180 $rtn =
"<select name='".$name.
"' id='".$this->
id().
"' size='$this->cols' multiple='multiple'>";
182 $rtn .=
"<option value='$k'".(is_array($this->
selected) ? (in_array($k, $this->
selected) ?
" selected='selected'" :
'') :
'').
">$v</option>";
186 $rtn =
"<select name='".$this->getName().
"' id='".$this->
getName().
"'>";
188 $rtn .=
"<option value='$k'".(!empty($this->
selected) ? ($k==$this->
selected ?
" selected='selected'" :
'') :
'').
">$v</option>";