Subversion Repositories oidplus

Rev

Rev 1086 | Rev 1173 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1086 Rev 1116
Line 23... Line 23...
23
\defined('INSIDE_OIDPLUS') or die;
23
\defined('INSIDE_OIDPLUS') or die;
24
// phpcs:enable PSR1.Files.SideEffects
24
// phpcs:enable PSR1.Files.SideEffects
25
 
25
 
26
class OIDplusDatabasePluginODBC extends OIDplusDatabasePlugin {
26
class OIDplusDatabasePluginODBC extends OIDplusDatabasePlugin {
27
 
27
 
-
 
28
        /**
-
 
29
         * @return string
-
 
30
         */
28
        public static function id(): string {
31
        public static function id(): string {
29
                return "ODBC";
32
                return "ODBC";
30
        }
33
        }
31
 
34
 
-
 
35
        /**
-
 
36
         * @return OIDplusDatabaseConnection
-
 
37
         */
32
        public static function newConnection(): OIDplusDatabaseConnection {
38
        public static function newConnection(): OIDplusDatabaseConnection {
33
                return new OIDplusDatabaseConnectionODBC();
39
                return new OIDplusDatabaseConnectionODBC();
34
        }
40
        }
35
 
41
 
-
 
42
        /**
-
 
43
         * @return string
-
 
44
         */
36
        public static function setupHTML(): string {
45
        public static function setupHTML(): string {
37
                return '<div id="DBPLUGIN_PARAMS_ODBC">'.
46
                return '<div id="DBPLUGIN_PARAMS_ODBC">'.
38
                       '        <p>'._L('ODBC DSN').' (<a href="https://www.connectionstrings.com/" target="_blank">'._L('examples').'</a>):<br><input id="odbc_dsn" type="text" value="DRIVER={SQL Server};SERVER=localhost\instancename;DATABASE=oidplus;CHARSET=UTF8" onkeypress="rebuild()" onkeyup="rebuild()" style="width:600px">  <span id="odbc_dsn_warn"></span>'.
47
                       '        <p>'._L('ODBC DSN').' (<a href="https://www.connectionstrings.com/" target="_blank">'._L('examples').'</a>):<br><input id="odbc_dsn" type="text" value="DRIVER={SQL Server};SERVER=localhost\instancename;DATABASE=oidplus;CHARSET=UTF8" onkeypress="rebuild()" onkeyup="rebuild()" style="width:600px">  <span id="odbc_dsn_warn"></span>'.
39
                       '        <br><font size="-1">'._L('Example for SQL Server').': <i>DRIVER={SQL Server};SERVER=localhost\instancename;DATABASE=oidplus;CHARSET=UTF8</i></font></p>'.
48
                       '        <br><font size="-1">'._L('Example for SQL Server').': <i>DRIVER={SQL Server};SERVER=localhost\instancename;DATABASE=oidplus;CHARSET=UTF8</i></font></p>'.
40
                       '        <!-- '._L('Note: You should use the driver "ODBC Driver XX for SQL Server" instead, since it is the latest generation').' -->'.
49
                       '        <!-- '._L('Note: You should use the driver "ODBC Driver XX for SQL Server" instead, since it is the latest generation').' -->'.