@@ -38,47 +38,47 @@ |
||
| 38 | 38 | $op = ''; |
| 39 | 39 | } |
| 40 | 40 | switch ($op) { |
| 41 | - case 'conf_opt': |
|
| 42 | - echo _AM_PROCESS_EFFECTUE . '<br>'; |
|
| 43 | - $r = $xoopsDB->queryF('SHOW TABLES'); |
|
| 44 | - while (false !== ($row = $xoopsDB->fetchRow($r))) { |
|
| 45 | - $table[] = $row[0]; |
|
| 46 | - } |
|
| 47 | - if (0 == count($table)) { |
|
| 48 | - $ok = 0; |
|
| 49 | - $message = _AM_PASOK_PASTABLE; |
|
| 50 | - break; |
|
| 51 | - } |
|
| 41 | + case 'conf_opt': |
|
| 42 | + echo _AM_PROCESS_EFFECTUE . '<br>'; |
|
| 43 | + $r = $xoopsDB->queryF('SHOW TABLES'); |
|
| 44 | + while (false !== ($row = $xoopsDB->fetchRow($r))) { |
|
| 45 | + $table[] = $row[0]; |
|
| 46 | + } |
|
| 47 | + if (0 == count($table)) { |
|
| 48 | + $ok = 0; |
|
| 49 | + $message = _AM_PASOK_PASTABLE; |
|
| 50 | + break; |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - if (1 == count($table)) { |
|
| 54 | - $xoopsDB->queryF('LOCK TABLES `' . $table[0] . '` WRITE'); |
|
| 55 | - } elseif (count($table) > 1) { |
|
| 56 | - $xoopsDB->queryF('LOCK TABLES `' . implode('` WRITE, `', $table) . '` WRITE'); |
|
| 57 | - } else { |
|
| 58 | - $ok = 0; |
|
| 59 | - $message = _AM_ERROR_UNKNOWN; |
|
| 60 | - break; |
|
| 61 | - } |
|
| 62 | - echo _AM_LOCK_BDD . '<br>'; |
|
| 63 | - $t1 = time(); |
|
| 64 | - foreach ($table as $val) { |
|
| 65 | - $b1 = time(); |
|
| 66 | - if ($xoopsDB->query('OPTIMIZE TABLE `' . $val . '`')) { |
|
| 67 | - $b2 = time(); |
|
| 68 | - $table_time = $b2 - $b1; |
|
| 69 | - echo _AM_OPTIMIZE . ' ' . $val . ' OK (' . _AM_TEMPS_ECOULE . ' : ' . format_time($table_time) . ')<br>'; |
|
| 53 | + if (1 == count($table)) { |
|
| 54 | + $xoopsDB->queryF('LOCK TABLES `' . $table[0] . '` WRITE'); |
|
| 55 | + } elseif (count($table) > 1) { |
|
| 56 | + $xoopsDB->queryF('LOCK TABLES `' . implode('` WRITE, `', $table) . '` WRITE'); |
|
| 57 | + } else { |
|
| 58 | + $ok = 0; |
|
| 59 | + $message = _AM_ERROR_UNKNOWN; |
|
| 60 | + break; |
|
| 61 | + } |
|
| 62 | + echo _AM_LOCK_BDD . '<br>'; |
|
| 63 | + $t1 = time(); |
|
| 64 | + foreach ($table as $val) { |
|
| 65 | + $b1 = time(); |
|
| 66 | + if ($xoopsDB->query('OPTIMIZE TABLE `' . $val . '`')) { |
|
| 67 | + $b2 = time(); |
|
| 68 | + $table_time = $b2 - $b1; |
|
| 69 | + echo _AM_OPTIMIZE . ' ' . $val . ' OK (' . _AM_TEMPS_ECOULE . ' : ' . format_time($table_time) . ')<br>'; |
|
| 70 | + } |
|
| 70 | 71 | } |
| 71 | - } |
|
| 72 | - $xoopsDB->queryF('UNLOCK TABLES'); |
|
| 73 | - echo _AM_UNLOCK_BDD . '<br>'; |
|
| 74 | - $t2 = time(); |
|
| 75 | - $total_time = $t2 - $t1; |
|
| 76 | - echo _AM_TEMPS_TOT . ' : ' . format_time($total_time) . '<br>'; |
|
| 77 | - echo '<p style="text-align: center;"><a href="index.php">' . _AM_RETURNTOSTART . '</a></p>'; |
|
| 78 | - break; |
|
| 79 | - default: |
|
| 80 | - $ok = 1; |
|
| 81 | - xoops_confirm(['op' => 'conf_opt', 'ok' => 1], XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/optimizer.php', _AM_OPT_WARNING . '<br>' . _AM_PRECISION . '<br>' . _AM_VERIF_SUR . '<br><a href="index.php">' . _AM_RETURNTOSTART . '</a>'); |
|
| 72 | + $xoopsDB->queryF('UNLOCK TABLES'); |
|
| 73 | + echo _AM_UNLOCK_BDD . '<br>'; |
|
| 74 | + $t2 = time(); |
|
| 75 | + $total_time = $t2 - $t1; |
|
| 76 | + echo _AM_TEMPS_TOT . ' : ' . format_time($total_time) . '<br>'; |
|
| 77 | + echo '<p style="text-align: center;"><a href="index.php">' . _AM_RETURNTOSTART . '</a></p>'; |
|
| 78 | + break; |
|
| 79 | + default: |
|
| 80 | + $ok = 1; |
|
| 81 | + xoops_confirm(['op' => 'conf_opt', 'ok' => 1], XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/optimizer.php', _AM_OPT_WARNING . '<br>' . _AM_PRECISION . '<br>' . _AM_VERIF_SUR . '<br><a href="index.php">' . _AM_RETURNTOSTART . '</a>'); |
|
| 82 | 82 | } |
| 83 | 83 | if (1 != $ok) { |
| 84 | 84 | echo $message; |
@@ -10,17 +10,17 @@ |
||
| 10 | 10 | ******************************************************* |
| 11 | 11 | */ |
| 12 | 12 | echo '<div class="adminfooter">' |
| 13 | - . "\n" |
|
| 14 | - . '<div style="text-align: center;">' |
|
| 15 | - . "\n" |
|
| 16 | - . ' <a href="https://www.xoops.org" rel="external"><img src="' |
|
| 17 | - . $pathIcon32 |
|
| 18 | - . '/xoopsmicrobutton.gif" alt="XOOPS" title="XOOPS"></a>' |
|
| 19 | - . "\n" |
|
| 20 | - . ' </div>' |
|
| 21 | - . "\n" |
|
| 22 | - . ' <div class="center smallsmall italic pad5"> this module maintained by <a href="https://store.chg-web.com" rel="external">Cedric MONTUY CHG-WEB</a>' |
|
| 23 | - . "\n" |
|
| 24 | - . '</div>'; |
|
| 13 | + . "\n" |
|
| 14 | + . '<div style="text-align: center;">' |
|
| 15 | + . "\n" |
|
| 16 | + . ' <a href="https://www.xoops.org" rel="external"><img src="' |
|
| 17 | + . $pathIcon32 |
|
| 18 | + . '/xoopsmicrobutton.gif" alt="XOOPS" title="XOOPS"></a>' |
|
| 19 | + . "\n" |
|
| 20 | + . ' </div>' |
|
| 21 | + . "\n" |
|
| 22 | + . ' <div class="center smallsmall italic pad5"> this module maintained by <a href="https://store.chg-web.com" rel="external">Cedric MONTUY CHG-WEB</a>' |
|
| 23 | + . "\n" |
|
| 24 | + . '</div>'; |
|
| 25 | 25 | |
| 26 | 26 | xoops_cp_footer(); |
@@ -71,18 +71,18 @@ |
||
| 71 | 71 | 'bannerfinish', |
| 72 | 72 | ]; |
| 73 | 73 | $footer = '<div class="adminfooter">' |
| 74 | - . "\n" |
|
| 75 | - . '<div style="text-align: center;">' |
|
| 76 | - . "\n" |
|
| 77 | - . ' <a href="https://www.xoops.org" rel="external"><img src="' |
|
| 78 | - . $pathIcon32 |
|
| 79 | - . '/xoopsmicrobutton.gif" alt="XOOPS" title="XOOPS"></a>' |
|
| 80 | - . "\n" |
|
| 81 | - . ' </div>' |
|
| 82 | - . "\n" |
|
| 83 | - . ' <div class="center smallsmall italic pad5"> this module is maintained by <a href="https://store.chg-web.com" rel="external">Cedric MONTUY CHG-WEB</a>' |
|
| 84 | - . "\n" |
|
| 85 | - . '</div>'; |
|
| 74 | + . "\n" |
|
| 75 | + . '<div style="text-align: center;">' |
|
| 76 | + . "\n" |
|
| 77 | + . ' <a href="https://www.xoops.org" rel="external"><img src="' |
|
| 78 | + . $pathIcon32 |
|
| 79 | + . '/xoopsmicrobutton.gif" alt="XOOPS" title="XOOPS"></a>' |
|
| 80 | + . "\n" |
|
| 81 | + . ' </div>' |
|
| 82 | + . "\n" |
|
| 83 | + . ' <div class="center smallsmall italic pad5"> this module is maintained by <a href="https://store.chg-web.com" rel="external">Cedric MONTUY CHG-WEB</a>' |
|
| 84 | + . "\n" |
|
| 85 | + . '</div>'; |
|
| 86 | 86 | |
| 87 | 87 | // Whether the os php is running on is windows or not |
| 88 | 88 | if (!defined('PMA_IS_WINDOWS')) { |
@@ -51,14 +51,14 @@ |
||
| 51 | 51 | $checkall = Request::getString('checkall', '', 'GET'); |
| 52 | 52 | |
| 53 | 53 | $tr_comp = '<tr><td class="odd"><strong>' |
| 54 | - . _AM_COMPRESSION |
|
| 55 | - . '</strong></td>' |
|
| 56 | - . '<td><input type="radio" id="gzip" name="file_compression" value="gzip" checked>' |
|
| 57 | - . '<label for="gz">gzip</label> ' |
|
| 58 | - . '<input type="radio" id="zip" name="file_compression" value="zip">' |
|
| 59 | - . '<label for="sql">zip</label>  ' |
|
| 60 | - . '<input type="radio" id="plain" name="file_compression" value="none">' |
|
| 61 | - . '<label for="sql">text</label>  </td></tr>'; |
|
| 54 | + . _AM_COMPRESSION |
|
| 55 | + . '</strong></td>' |
|
| 56 | + . '<td><input type="radio" id="gzip" name="file_compression" value="gzip" checked>' |
|
| 57 | + . '<label for="gz">gzip</label> ' |
|
| 58 | + . '<input type="radio" id="zip" name="file_compression" value="zip">' |
|
| 59 | + . '<label for="sql">zip</label>  ' |
|
| 60 | + . '<input type="radio" id="plain" name="file_compression" value="none">' |
|
| 61 | + . '<label for="sql">text</label>  </td></tr>'; |
|
| 62 | 62 | $tr_strd = '<tr><td class="odd" style="width:30%;"><strong>' . _AM_DETAILSTOBACKUP . '</strong></td>' . '<td><input type="checkbox" name="structure" checked> ' . _AM_TABLESTRUCTURE . ' ' . '<input type="checkbox" name="data" checked> ' . _AM_TABLEDATA . ' </td></tr>'; |
| 63 | 63 | |
| 64 | 64 | // Handle URL actions |
@@ -109,9 +109,9 @@ |
||
| 109 | 109 | $ctrldir = implode('', $this->ctrl_dir); |
| 110 | 110 | |
| 111 | 111 | return $data . $ctrldir . $this->eof_ctrl_dir . pack('v', count($this->ctrl_dir)) . // total # of entries "on this disk" |
| 112 | - pack('v', count($this->ctrl_dir)) . // total # of entries overall |
|
| 113 | - pack('V', strlen($ctrldir)) . // size of central dir |
|
| 114 | - pack('V', strlen($data)) . // offset to start of central dir |
|
| 115 | - "\x00\x00"; // .zip file comment length |
|
| 112 | + pack('v', count($this->ctrl_dir)) . // total # of entries overall |
|
| 113 | + pack('V', strlen($ctrldir)) . // size of central dir |
|
| 114 | + pack('V', strlen($data)) . // offset to start of central dir |
|
| 115 | + "\x00\x00"; // .zip file comment length |
|
| 116 | 116 | } // end of the 'file()' method |
| 117 | 117 | } // end of the 'zipfile' class |