Index: branches/RC/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r10974 -r11045 --- branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 10974) +++ branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 11045) @@ -944,17 +944,17 @@ $filename= ereg_replace("dump","",$filename); $filename= ereg_replace($ext,"",$filename); return $filename; - } - + } + function PrintPHPinfo($params) { ob_start(); - + phpinfo(); $php_info .= ob_get_contents(); - + ob_end_clean(); - + $php_info = str_replace(" width=\"600\"", " width=\"100%\" align=\"center\"", $php_info); $php_info = str_replace("", "", $php_info); $php_info = str_replace("", "", $php_info); @@ -964,9 +964,9 @@ $php_info = str_replace("", "", $php_info); $offset = strpos($php_info, "Application->GetVar('sql_rows')); $ret = ''; $block = $params['render_as']; foreach ($a_data AS $a_row) - { + { foreach ($a_row AS $col => $value) { - $ret .= $this->Application->ParseBlock(Array('name'=>$block, 'value'=>$col)); + $ret .= $this->Application->ParseBlock(Array('name'=>$block, 'value'=>$col)); } - break; + break; } return $ret; } - + function PrintSqlRows($params) { $a_data = unserialize($this->Application->GetVar('sql_rows')); $ret = ''; $block = $params['render_as']; foreach ($a_data AS $a_row) - { + { $cells = ''; foreach ($a_row AS $col => $value) { $cells .= ''.$value.''; } - $ret .= $this->Application->ParseBlock(Array('name'=>$block, 'cells'=>$cells)); + $ret .= $this->Application->ParseBlock(Array('name'=>$block, 'cells'=>$cells)); } return $ret; } + + function PrintImportSources($params) + { + $sql = "SELECT * + FROM ".TABLE_PREFIX."ImportScripts + WHERE Status = 1 AND Type = 'CSV'"; + $rows = $this->Conn->Query($sql); + + $block_params = $this->prepareTagParams($params); + $block_params['name'] = $params['render_as']; + + foreach ($rows as $row) { + $block_params['script_id'] = $row['ImportId']; + $block_params['script_module'] = $row['Module']; + $block_params['script_name'] = $row['Name']; + $block_params['script_prefix'] = $row['Prefix']; + $ret .= $this->Application->ParseBlock($block_params); + } + + return $ret; + } } - + ?> \ No newline at end of file Index: branches/RC/core/admin_templates/tools/import2.tpl =================================================================== diff -u -N -r10912 -r11045 --- branches/RC/core/admin_templates/tools/import2.tpl (.../import2.tpl) (revision 10912) +++ branches/RC/core/admin_templates/tools/import2.tpl (.../import2.tpl) (revision 11045) @@ -49,20 +49,23 @@ ) ); a_toolbar.Render(); a_toolbar.DisableButton('next'); - - + + function ImportRedirect(import_id) { - if (import_id == 1) { - location.href = ''; - return; - } - if (import_id == 6) { - location.href = ''; - return; - } + + + + + if (import_id == ) { + location.href = ''; + return; + } + + + } - + function ChoiseMade(form, radio_name) { // checks if user has selected enabled radio button @@ -75,10 +78,10 @@ if(frm[i].type == 'radio' && frm[i].name == radio_name) if(frm[i].checked == true) return frm[i].value; - - return false; + + return false; } - } + } @@ -96,8 +99,11 @@ "> -
-
+ + " value="" onclick="a_toolbar.EnableButton('next')" type="radio">
+
+ +