Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Tuesday, October 13, 2026

Diff for phpMyEdit/phpMyEditSetup.php between version 1.53 and 1.54

version 1.53, 2017/05/23 13:52:15 version 1.54, 2025/07/08 07:04:40
Line 19 
Line 19 
  * http://platon.sk/projects/phpMyEdit/   * http://platon.sk/projects/phpMyEdit/
  */   */
   
 /* $Platon: phpMyEdit/phpMyEditSetup.php,v 1.52 2014-10-06 03:12:33 nepto Exp $ */  /* $Platon: phpMyEdit/phpMyEditSetup.php,v 1.53 2017/05/23 13:52:15 igor Exp $ */
   
 ?>  ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  <!DOCTYPE html>
             "http://www.w3.org/TR/html4/loose.dtd">  
 <html>  <html>
 <head>  <head>
         <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">          <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
           <meta name="viewport" content="width=device-width, initial-scale=1">
         <title>phpMyEdit Setup</title>          <title>phpMyEdit Setup</title>
         <style type="text/css">          <style type="text/css">
         <!--          <!--
Line 54 
Line 54 
   
 <?php  <?php
   
   if (version_compare(PHP_VERSION, '5.6.0') < 0) {
           die('Your version of PHP is too old. At least 5.6.0 is required.');
   }
   define('PHP56', version_compare(PHP_VERSION, '5.6.0') >= 0 && version_compare(PHP_VERSION, '7.0.0') < 0);
   define('PHP70', version_compare(PHP_VERSION, '7.0.0') >= 0 && version_compare(PHP_VERSION, '8.0.0') < 0);
   define('PHP80', version_compare(PHP_VERSION, '8.0.0') >= 0);
   
 if (! defined('PHP_EOL')) {  if (! defined('PHP_EOL')) {
         define('PHP_EOL', strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? "\r\n"          define('PHP_EOL', (strtoupper(substr(PHP_OS, 0, 3) == 'WIN') ? "\r\n"
                         : strtoupper(substr(PHP_OS, 0, 3) == 'MAC') ? "\r" : "\n");                          : (strtoupper(substr(PHP_OS, 0, 3) == 'MAC') ? "\r" : "\n")));
 }  }
   
 $hn  = @$_POST['hn'];  $hn  = @$_POST['hn'];
Line 122  function check_constraints($tb,$fd)
Line 129  function check_constraints($tb,$fd)
   $row = mysqli_fetch_array($fds,  MYSQLI_NUM);    $row = mysqli_fetch_array($fds,  MYSQLI_NUM);
   $tableDef = preg_split('/\n/', $row[1]);    $tableDef = preg_split('/\n/', $row[1]);
   $constraint_arg="";    $constraint_arg="";
   while (list($key,$val) = each($tableDef)) {    foreach ($tableDef as $key => $val) {
     $words=preg_split("/[\s'`()]+/", $val);      $words=preg_split("/[\s'`()]+/", $val);
     if ($words[1] == "CONSTRAINT" && $words[6]=="REFERENCES") {      if ($words[1] == "CONSTRAINT" && $words[6]=="REFERENCES") {
       if ($words[5]==$fd) {        if ($words[5]==$fd) {
Line 209  function convert_mysqli_type($mysqli_typ
Line 216  function convert_mysqli_type($mysqli_typ
   
   
 $self = basename($_SERVER['PHP_SELF']);  $self = basename($_SERVER['PHP_SELF']);
 $dbl  = @mysqli_connect('p:'.$hn, $un, $pw, strlen($ssl) ? MYSQL_CLIENT_SSL : null);  if (!empty($hn)) {
           if (PHP56) {
                   $dbl  = @mysqli_connect('p:'.$hn, $un, $pw, strlen($ssl) ? MYSQL_CLIENT_SSL : null);
           } else {
                   $dbl  = @mysqli_connect('p:'.$hn, $un, $pw);
           }
   } else {
           $dbl = false;
   }
   
 if ((!$dbl) or empty($submit)) {  if ((!$dbl) or empty($submit)) {
         echo '<h1>Please log in to your MySQL database</h1>';          echo '<h1>Please log in to your MySQL database</h1>';
Line 307  if ((!$dbl) or empty($submit)) {
Line 322  if ((!$dbl) or empty($submit)) {
 //              <tr><td><input type="radio" name="id" value="">  //              <tr><td><input type="radio" name="id" value="">
 //              <td><i>None</i></td><td><i>No id field required</i></td></tr>  //              <td><i>None</i></td><td><i>No id field required</i></td></tr>
         @mysqli_select_db($dbl, $db);          @mysqli_select_db($dbl, $db);
         $tb_desc = @mysqli_query("DESCRIBE $tb");          $tb_desc = @mysqli_query($dbl, "DESCRIBE $tb");
         $fds     = mysqli_query($dbl, 'SHOW COLUMNS FROM '.$db.'.'.$tb);          $fds     = mysqli_query($dbl, 'SHOW COLUMNS FROM '.$db.'.'.$tb);
         for ($j = 0; ($finfo = mysqli_fetch_array($fds, MYSQLI_ASSOC)) != false; $j++) {          for ($j = 0; ($finfo = mysqli_fetch_array($fds, MYSQLI_ASSOC)) != false; $j++) {
                 $checked = stristr($finfo['Key'], 'primary_key') ? ' checked' : '';                  $checked = stristr($finfo['Key'], 'primary_key') ? ' checked' : '';
Line 449  if ((!$dbl) or empty($submit)) {
Line 464  if ((!$dbl) or empty($submit)) {
 */  */
   
 /* Field definitions  /* Field definitions
   
 Fields will be displayed left to right on the screen in the order in which they  Fields will be displayed left to right on the screen in the order in which they
 appear in generated list. Here are some most used field options documented.  appear in generated list. Here are some most used field options documented.
   
Line 581  END;
Line 596  END;
   
         if ($HTMLissues) {          if ($HTMLissues) {
                 $buffer = <<<END                  $buffer = <<<END
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  <!DOCTYPE html>
                 "http://www.w3.org/TR/html4/loose.dtd">  
 <html>  <html>
 <head>  <head>
           <meta http-equiv="Content-Language" content="en-us">
           <meta name="GENERATOR" content="phpMyEdit">
           <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
         <title>$pageTitle</title>          <title>$pageTitle</title>
 $css_directive  $css_directive
Line 618  END;
Line 635  END;
   
 </body>  </body>
 </html>  </html>
   

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top