17 require_once SQ_INCLUDE_PATH.
'/asset_edit/asset_edit_fns.inc';
18 require_once SQ_DATA_PATH.
'/private/conf/import_tools_manager.inc';
44 unset($this->static_screens[
'settings']);
45 unset($this->static_screens[
'preview']);
46 unset($this->static_screens[
'lookupValues']);
47 unset($this->static_screens[
'metadata']);
48 unset($this->static_screens[
'metadataSchemas']);
49 unset($this->static_screens[
'workflow']);
50 unset($this->static_screens[
'tagging']);
51 unset($this->static_screens[
'dependants']);
52 unset($this->static_screens[
'linking']);
53 unset($this->static_screens[
'roles']);
54 unset($this->static_screens[
'permissions']);
55 unset($this->static_screens[
'layouts']);
73 echo STRUCTURED_FILE_IMPORT_DIR;
89 $write_access = $asset->writeAccess(
'attributes');
90 $heading_defaults = $asset->attr(
'heading_defaults');
91 $o->openField(
'Heading Selection Defaults');
93 $tick =
'<img src="'.sq_web_path(
'lib').
'/web/images/tick.gif" alt="Yes" style="position: relative; right: 0px;"/>';
94 $cross =
'<img src="'.sq_web_path(
'lib').
'/web/images/cross.gif" alt="Yes" />';
96 <table
class=
"sq-backend-table" style=
"width: 300px;">
98 <th
class=
"sq-backend-table-header">Heading Style</th>
99 <th
class=
"sq-backend-table-header" style=
"width: 120px;">Use
for structure?</th>
102 for ($i = 1; $i <= 6; $i++) {
103 $h_string =
'h'.strval($i);
106 <td
class=
"sq-backend-table-cell"><?php echo strtoupper($h_string); ?></td>
107 <td
class=
"sq-backend-table-cell" style=
"text-align: center;">
110 check_box($prefix.
'_headings['.$h_string.
']',
'1', in_array($h_string, $heading_defaults));
112 echo (in_array($h_string, $heading_defaults)) ? $tick : $cross;
139 if ($asset->writeAccess(
'attributes')) {
140 $keys = array_keys($_POST[$prefix.
'_headings']);
141 $asset->setAttrValue(
'heading_defaults', $keys);
159 $write_access = $asset->writeAccess(
'attributes');
160 $o->openField(translate(
'import_tools_new_html_file_select'));
162 file_upload(
'structured_file_import_html_upload', $extras=
'');
163 echo
' ';
164 check_box(
'structured_file_import_html_upload_overwrite');
165 label(translate(
'import_tools_overwrite_existing'),
'structured_file_import_html_upload_overwrite');
184 $write_access = $asset->writeAccess(
'attributes');
186 $html_upload = get_file_upload_info(
'structured_file_import_html_upload');
187 $max_size = $asset->attr(
'max_file_size');
188 if ($html_upload === FALSE) {
189 trigger_error(
'Error Uploading HTML File', E_USER_WARNING);
191 if (!empty($html_upload)) {
192 $import_dir = STRUCTURED_FILE_IMPORT_DIR;
193 $compatible_types = $asset->attr(
'valid_file_types');
194 $overwrite = isset($_POST[
'structured_file_import_html_upload_overwrite']);
195 commit_file_upload(
'structured_file_import_html_upload', $import_dir, $overwrite, $max_size, TRUE, $compatible_types);
215 $write_access = $asset->writeAccess(
'attributes');
216 $allowed_import_type = $asset->attr(
'allowed_import_type');
220 $o->openField(translate(
'import_tools_manager_allowed_import_type'));
221 combo_box($prefix.
'_allowed_import_type', Array(
'Server and Local' =>
'Server and Local',
'Server Only' =>
'Server Only',
'Local Only' =>
'Local Only'), FALSE, $allowed_import_type, 0);
224 $o->openField(translate(
'import_tools_manager_server_import_dir'));
225 echo BULK_FILE_IMPORT_DIR;
226 $o->note(translate(
'import_tools_manager_server_import_dir_msg'));
230 $o->openField(translate(
'import_tools_manager_allowed_import_type'));
231 echo $allowed_import_type;
234 $o->openField(translate(
'import_tools_manager_server_import_dir'));
235 echo BULK_FILE_IMPORT_DIR;
236 $o->note(translate(
'import_tools_manager_server_import_dir_msg'));
240 return $write_access;
257 $write_access = $asset->writeAccess(
'attributes');
259 $allowed_import_type = array_get_index($_POST, $prefix.
'_allowed_import_type',
'');
261 $asset->setAttrValue(
'allowed_import_type', $allowed_import_type);
264 return $write_access;
281 $write_access = $asset->writeAccess(
'attributes');
282 $server_export_dir = $asset->attr(
'cms_file_export_dir');
283 $server_export_name = $asset->attr(
'cms_file_export_name');
286 $o->openField(translate(
'import_tools_manager_server_export_name'));
287 text_box($prefix.
'_server_export_filename', $server_export_name,
'50',
'', FALSE);
288 $o->note(translate(
'import_tools_manager_server_export_name_msg'));
291 $o->openField(translate(
'import_tools_manager_server_export_dir'));
292 text_box($prefix.
'_server_export_directory', $server_export_dir,
'50',
'', FALSE);
293 $o->note(translate(
'import_tools_manager_server_export_dir_msg'));
296 $o->openField(translate(
'import_tools_manager_server_export_name'));
297 echo $server_export_name;
298 $o->note(translate(
'import_tools_manager_server_export_name_msg'));
301 $o->openField(translate(
'import_tools_manager_server_export_dir'));
302 echo $server_export_dir;
303 $o->note(translate(
'import_tools_manager_server_export_dir_msg'));
307 return $write_access;
324 $write_access = $asset->writeAccess(
'attributes');
326 $server_export_dir = array_get_index($_POST, $prefix.
'_server_export_directory',
'');
327 $server_export_name = array_get_index($_POST, $prefix.
'_server_export_filename',
'');
329 $asset->setAttrValue(
'cms_file_export_dir', $server_export_dir);
330 $asset->setAttrValue(
'cms_file_export_name', $server_export_name);
333 return $write_access;