Fix for the Open in New Window in Patient/Client->Patients search gui, take 2.
[openemr.git] / phpmyadmin / libraries / import / README
blob890a5da4a91b3d384d0487c96f03261981e27221
1 This directory holds import plugins for phpMyAdmin. Plugin should
2 basically look like following code. Official plugins need to have str*
3 messages with their definition in language files, if you build some
4 plugins for your use, you can use directly texts in plugin.
6 <?php
7 /* $Id$ */
8 // vim: expandtab sw=4 ts=4 sts=4 ft=php:
10 /* Demo import plugin for phpMyAdmin */
12 if (isset($plugin_list)) {
13     $plugin_list['name'] = array(           // set name of your plugin
14         'text' => 'strName',                // text to be displayed as choice
15         'extension' => '',                  // extension this plugin can handle
16         'options' => array(                 // array of options for your plugin (optional)
17             array('type' => '', 'name' => '', 'text' => ''), // type: bool or text, name: form element name, text: description in GUI, size: size of text element (optional). len: maximal size of input (optional)
18         ),
19         'options_text' => 'strNameImportOptions', // text to describe plugin options (must be set if options are used)
20         );
21 } else {
22 /* We do not define function when plugin is just queried for information above */
23     $buffer = '';
24     while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
25         $data = PMA_importGetNextChunk();
26         if ($data === FALSE) {
27             // subtract data we didn't handle yet and stop processing
28             $offset -= strlen($buffer);
29             break;
30         } elseif ($data === TRUE) {
31             // Handle rest of buffer
32         } else {
33             // Append new data to buffer
34             $buffer .= $data;
35         }
36         // PARSE $buffer here, post sql queries using:
37         PMA_importRunQuery($sql, $verbose_sql_with_comments);
38     } // End of import loop
39     // Commit any possible data in buffers
40     PMA_importRunQuery();