';
// main data
$str .= $lang['xs_import_list_filename'] . $header['filename'] . '
';
$str .= $lang['xs_import_list_template'] . $header['template'] . '
';
$str .= $lang['xs_import_list_comment'] . $header['comment'] . '
';
$str .= $lang['xs_import_list_styles'] . implode(', ', $header['styles']) . '
';
ksort($list_data);
$str .= '
' . str_replace('{NUM}', count($list_data), $lang['xs_import_list_files']) . '
';
$str .= '
';
foreach($list_data as $var => $value)
{
$str .= '' . htmlspecialchars($value['filename']) . ' | ';
if($value['size'] > 0)
{
$ext = strtolower(substr($var, strlen($var) - 4));
if(xs_in_array($ext, $text_types) || xs_in_array($ext, $img_types))
{
$str .= '[' . $lang['xs_import_view_lc'] . '] ';
}
$str .= '[' . $lang['xs_import_download_lc'] . '] ';
}
$str .= str_replace('{NUM}', $value['size'], $lang['xs_import_file_size']) . ' |
';
}
$str .= '
';
$str .= '
';
xs_message($lang['Information'], $str);
}
$str = '';
if(!$write_local)
{
//
// Generate actions list
//
$actions = array();
// chdir to template directory
$actions[] = array(
'command' => 'chdir',
'dir' => 'templates'
);
// create directory with template name
$actions[] = array(
'command' => 'mkdir',
'dir' => $header['template'],
'ignore' => true
);
// change directory
$actions[] = array(
'command' => 'chdir',
'dir' => $header['template']
);
// create all directories and upload all files
$actions[] = array(
'command' => 'exec',
'list' => generate_actions_dirs()
);
$ftp_log = array();
$ftp_error = '';
$res = ftp_myexec($actions);
/* echo ""; */
// remove temporary files
for($i=0; $i