18 require_once SQ_INCLUDE_PATH.
'/asset_edit/asset_edit_fns.inc';
41 parent::__construct();
58 $am = $GLOBALS[
'SQ_SYSTEM']->am;
59 $admin_access = $asset->writeAccess(
'attributes');
60 $prefix = $asset->getPrefix();
61 $enabled_function_list = $asset->attr(
'function_list');
62 $function_list = $asset->getFunctionList();
64 <table
class=
"sq-backend-table">
66 <td
class=
"sq-backend-table-header">
67 <?php echo translate(
'operations'); ?>
69 <td
class=
"sq-backend-table-header">
70 <?php echo translate(
'enabled'); ?>
74 foreach ($function_list as $func_name => $default) {
76 if (array_key_exists($func_name, $enabled_function_list)) {
77 if (isset($enabled_function_list[$func_name]) && $enabled_function_list[$func_name]) {
83 <td
class=
"sq-backend-table-cell">
84 <span name=
"<?php echo $prefix.'_'.$func_name ?>" id=
"<?php echo $prefix.'_'.$func_name ?>"><?php echo $func_name ?></span>
86 <td align=
"left" class=
"sq-backend-table-cell">
89 check_box($prefix.
'_enable['.$func_name.
']',
'1', $switch);
93 <img src=
"<?php echo sq_web_path('lib'); ?>/web/images/<?php echo ($switch) ? 'tick' : 'cross'; ?>.gif" width=
"15" height=
"15" />
122 $write_access = $asset->writeAccess(
'attributes');
123 $prefix = $asset->getPrefix();
127 if (isset($_POST[$prefix.
'_enable']) && !empty($_POST[$prefix.
'_enable'])) {
128 $save_func_list = Array();
129 foreach ($_POST[$prefix.
'_enable'] as $funcname => $enabled) {
130 if (empty($funcname))
continue;
133 $save_func_list[$funcname] = $enabled;
136 if (!empty($save_func_list)) {
138 $GLOBALS[
'SQ_SYSTEM']->setRunLevel(SQ_RUN_LEVEL_FORCED);
139 $asset->setAttrValue(
'function_list', $save_func_list);
140 $GLOBALS[
'SQ_SYSTEM']->restoreRunLevel();
144 $empty_function_list = Array();
146 $asset->setAttrValue(
'function_list', $empty_function_list);
147 $asset->saveAttributes();
151 $parents = $GLOBALS[
'SQ_SYSTEM']->am->getParents($asset->id,
'soap_server');
152 foreach ($parents as $parent_id => $type_code) {
153 $parent = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($parent_id);
154 $parent->generateWSDL();