* @version 0.2b (20090704) */ if (! defined('PHPMYADMIN')) { exit; } /** * */ if (isset($plugin_list)) { $plugin_list['php_array'] = array( 'text' => 'strPhpArray', 'extension' => 'php', 'mime_type' => 'text/plain', 'options' => array( array( 'type' => 'hidden', 'name' => 'data', ), ), 'options_text' => 'strOptions', ); } else { /** * Set of functions used to build exports of tables */ /** * Outputs comment * * @param string Text of comment * * @return bool Whether it suceeded */ function PMA_exportComment($text) { PMA_exportOutputHandler('// ' . $text . $GLOBALS['crlf']); return true; } /** * Outputs export footer * * @return bool Whether it suceeded * * @access public */ function PMA_exportFooter() { return true; } /** * Outputs export header * * @return bool Whether it suceeded * * @access public */ function PMA_exportHeader() { PMA_exportOutputHandler( '= $columns_cnt); $column = $columns[$i]; if (is_null($record[$i])) { $buffer .= "'".$column."'=>null".(!$isLastLine?',':''); } elseif (is_numeric($record[$i])) { $buffer .= "'".$column."'=>".$record[$i] . (!$isLastLine?',':''); } else { $buffer .= "'".$column."'=>'".addslashes($record[$i]) . "'" . (!$isLastLine?',':''); } } $buffer .= ')'; } $buffer .= $crlf.');'.$crlf; if (!PMA_exportOutputHandler($buffer)) { return FALSE; } PMA_DBI_free_result($result); return true; } }