18 require_once dirname(__FILE__).
'/../../payment_gateway/payment_gateway_edit_fns.inc';
45 $bodycopy_asset =& $asset->getBodycopy(
'display_format');
48 echo
'<div style="padding:1ex;">';
49 echo get_asset_tag_line($bodycopy_asset->id,
'contents');
68 $write_access = $asset->writeAccess(
'menu');
70 $bodycopy =& $asset->getBodycopy(
'display_format');
71 $bodycopy_edit_fns =& $bodycopy->getEditFns();
74 $bodycopy_edit_fns->paintBodycopy($bodycopy, $o, $bodycopy->getPrefix());
94 if (!$asset->writeAccess(
'menu'))
return FALSE;
96 $bodycopy =& $asset->getBodycopy(
'display_format');
97 $bodycopy_edit_fns =& $bodycopy->getEditFns();
99 $status = $bodycopy_edit_fns->processBodycopy($bodycopy, $o, $bodycopy->getPrefix());
118 $current_path = $asset->attr(
'datacash_api_path');
120 if ($asset->writeAccess(
'attributes')) {
121 text_box($prefix.
'_datacash_api_path', $current_path, 80);
123 if (trim($current_path) ==
'') {
124 echo
'<b>[Empty]</b>';
126 echo
'<b>'.$current_path.
'</b>';
130 if (!is_file($current_path)) {
131 ?><br /><span
class=
"sq-backend-warning"><?php echo translate(
'path_to_not_valid',
'Datacash PHP API'); ?></span><?php
133 include_once $current_path;
134 if (!class_exists(
'DataCash_Document')) {
135 ?><br /><span
class=
"sq-backend-warning"><?php echo translate(
'datacash_api_no_required_class'); ?></span><?php
136 }
else if (!method_exists(
'DataCash_Document',
'readDocumentFromString')) {
137 ?><br /><span
class=
"sq-backend-warning"><?php echo translate(
'datacash_api_no_required_method'); ?></span><?php
158 if (!$asset->writeAccess(
'attributes'))
return FALSE;
159 if (!isset($_POST[$prefix.
'_datacash_api_path']))
return FALSE;
161 return $asset->setAttrValue(
'datacash_api_path', trim($_POST[$prefix.
'_datacash_api_path']));
178 $current_path = $asset->attr(
'cardinfo_dir_path');
180 if ($asset->writeAccess(
'attributes')) {
181 text_box($prefix.
'_cardinfo_dir_path', $current_path, 80);
183 if (trim($current_path) ==
'') {
184 echo
'<b>[Empty]</b>';
186 echo
'<b>'.$current_path.
'</b>';
190 if (!is_dir($current_path)) {
191 ?><br /><span
class=
"sq-backend-warning"><?php echo translate(
'path_to_not_valid',
'Datacash CardInfo Directory'); ?></span><?php
192 }
else if (!is_file($current_path.
'/CardInfo1.bin') || !is_file($current_path.
'/CardInfo2.bin')) {
193 ?><br /><span
class=
"sq-backend-warning"><?php echo translate(
'datacash_cardinfo_dir_no_required_files'); ?></span><?php
213 if (!$asset->writeAccess(
'attributes'))
return FALSE;
214 if (!isset($_POST[$prefix.
'_cardinfo_dir_path']))
return FALSE;
216 return $asset->setAttrValue(
'cardinfo_dir_path', trim($_POST[$prefix.
'_cardinfo_dir_path']));