4 |
* $Id$ |
* $Id$ |
5 |
* |
* |
6 |
* $Log$ |
* $Log$ |
7 |
|
* Revision 1.10 2005/08/11 14:12:24 jonen |
8 |
|
* + bugfix |
9 |
|
* + added function to get allowed writeable entries for a TerminalOwner |
10 |
|
* |
11 |
|
* Revision 1.9 2004/08/31 14:22:03 jonen |
12 |
|
* added removing of 'template' hash-value, needed to recognize empty hash-refs |
13 |
|
* |
14 |
|
* Revision 1.8 2003/12/14 01:52:26 jonen |
15 |
|
* implemented 'SELECT' mode for selecting existing object-refereneces as child-nodes |
16 |
|
* |
17 |
* Revision 1.7 2003/07/02 12:32:27 jonen |
* Revision 1.7 2003/07/02 12:32:27 jonen |
18 |
* fixed bugs |
* fixed bugs |
19 |
* |
* |
64 |
//print "item: " . Dumper($item); |
//print "item: " . Dumper($item); |
65 |
//print "options: " . Dumper($options); |
//print "options: " . Dumper($options); |
66 |
if( is_array($item) ) { |
if( is_array($item) ) { |
67 |
|
//print "is_array($item)<br>"; |
68 |
//$cur_row_index = $this->_datasource->get_cur_data_index(); |
//$cur_row_index = $this->_datasource->get_cur_data_index(); |
69 |
//$parent_guid = $this->_datasource->_data[$cur_row_index]['guid']; |
//$parent_guid = $this->_datasource->_data[$cur_row_index]['guid']; |
70 |
// build list for selection form |
// build list for selection form |
117 |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
118 |
$container->add(_HTML_SPACE, html_a( $url_short, $key . " add new"), html_br()); |
$container->add(_HTML_SPACE, html_a( $url_short, $key . " add new"), html_br()); |
119 |
|
|
120 |
|
if($item[tmp]) { unset($item[tmp]); } |
121 |
|
if($item[0] == "_REF") { unset($item[0]); } |
122 |
|
|
123 |
if(count($item) != 0) { |
if(count($item) != 0) { |
124 |
foreach($item as $key => $value) { |
foreach($item as $key => $value) { |
125 |
$link_meta = php::untwingle_reference($value, $options); |
$link_meta = php::untwingle_reference($value, $options); |
164 |
|
|
165 |
// debug |
// debug |
166 |
//$options = $this->_options['decode_args']; |
//$options = $this->_options['decode_args']; |
167 |
//print "item: $item<br/>"; |
//print "item(expr): " . Dumper($item); |
168 |
|
//print "options(expr): " . Dumper($options); |
169 |
|
|
170 |
if($item == "_REF") { |
if($item == "_REF") { |
171 |
$link_vars_create = array( |
$link_vars_create = array( |
182 |
} |
} |
183 |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
184 |
$item = html_a( $url_short, " create"); |
$item = html_a( $url_short, " create"); |
185 |
|
} elseif($item == "_REF_SELECT") { |
186 |
|
$link_vars_create = array( |
187 |
|
'ecdid' => $options[label], |
188 |
|
'ecdm' => $options[parent_guid], |
189 |
|
'ecdmx' => $options[parent_class], |
190 |
|
'ecmod' => "select", |
191 |
|
'ecat' => 'list' |
192 |
|
); |
193 |
|
foreach($hidden_elements as $label => $value) { |
194 |
|
if(!$link_vars_create[$label]) { |
195 |
|
$link_vars_create[$label] = $value; |
196 |
|
} |
197 |
|
} |
198 |
|
$url_short = url::short($_SERVER["PHP_SELF"], $link_vars_create); |
199 |
|
$item = html_a( $url_short, " select"); |
200 |
} else { |
} else { |
201 |
// resolve 'o_{guid}_{classname}' - encoded string |
// resolve 'o_{guid}_{classname}' - encoded string |
202 |
$link_meta = php::untwingle_reference($item); |
$link_meta = php::untwingle_reference($item); |
|
//print Dumper($link_meta); |
|
203 |
|
|
204 |
if (!is_array($link_meta)) { |
if (!is_array($link_meta)) { |
205 |
//return $item; |
//return $item; |
236 |
} |
} |
237 |
|
|
238 |
|
|
239 |
|
function getWriteableEntries($userclass) { |
240 |
|
if($userclass == 'TerminalOwner') { |
241 |
|
$we = array( |
242 |
|
'password', |
243 |
|
'question', |
244 |
|
'answer', |
245 |
|
'phone', |
246 |
|
'mobile', |
247 |
|
'address1', |
248 |
|
'address2', |
249 |
|
'state', |
250 |
|
'city', |
251 |
|
'zip', |
252 |
|
'fax', |
253 |
|
); |
254 |
|
} |
255 |
|
return $we; |
256 |
|
} |
257 |
|
|
258 |
} |
} |
259 |
|
|