@@ -63,14 +63,14 @@ discard block |
||
| 63 | 63 | $lang = $this->lang; |
| 64 | 64 | $data = $misc->getDatabaseAccessor(); |
| 65 | 65 | |
| 66 | - $onchange = "onchange=\"location.href='".SUBFOLDER."/src/views/history.php?server=' + encodeURI(server.options[server.selectedIndex].value) + '&database=' + encodeURI(database.options[database.selectedIndex].value) + '&'\""; |
|
| 66 | + $onchange = "onchange=\"location.href='" . SUBFOLDER . "/src/views/history.php?server=' + encodeURI(server.options[server.selectedIndex].value) + '&database=' + encodeURI(database.options[database.selectedIndex].value) + '&'\""; |
|
| 67 | 67 | |
| 68 | 68 | $this->printHeader($lang['strhistory'], $this->scripts, true, 'header.twig'); |
| 69 | 69 | |
| 70 | 70 | // Bring to the front always |
| 71 | 71 | echo "<body onload=\"window.focus();\">\n"; |
| 72 | 72 | |
| 73 | - echo '<form action="'.SUBFOLDER."/src/views/history.php\" method=\"post\">\n"; |
|
| 73 | + echo '<form action="' . SUBFOLDER . "/src/views/history.php\" method=\"post\">\n"; |
|
| 74 | 74 | $misc->printConnection($onchange); |
| 75 | 75 | echo '</form><br />'; |
| 76 | 76 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | echo "<p>{$lang['strconfdelhistory']}</p>\n"; |
| 201 | 201 | |
| 202 | 202 | echo '<pre>', htmlentities($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']][$qid]['query'], ENT_QUOTES, 'UTF-8'), '</pre>'; |
| 203 | - echo '<form action="'.SUBFOLDER."/src/views/history.php\" method=\"post\">\n"; |
|
| 203 | + echo '<form action="' . SUBFOLDER . "/src/views/history.php\" method=\"post\">\n"; |
|
| 204 | 204 | echo "<input type=\"hidden\" name=\"action\" value=\"delhistory\" />\n"; |
| 205 | 205 | echo "<input type=\"hidden\" name=\"queryid\" value=\"$qid\" />\n"; |
| 206 | 206 | echo $misc->form; |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | echo "<h3>{$lang['strclearhistory']}</h3>\n"; |
| 229 | 229 | echo "<p>{$lang['strconfclearhistory']}</p>\n"; |
| 230 | 230 | |
| 231 | - echo '<form action="'.SUBFOLDER."/src/views/history.php\" method=\"post\">\n"; |
|
| 231 | + echo '<form action="' . SUBFOLDER . "/src/views/history.php\" method=\"post\">\n"; |
|
| 232 | 232 | echo "<input type=\"hidden\" name=\"action\" value=\"clearhistory\" />\n"; |
| 233 | 233 | echo $misc->form; |
| 234 | 234 | echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" />\n"; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $this->printTrail('schema'); |
| 30 | 30 | $this->printTitle($lang['strclusterindex'], 'pg.index.cluster'); |
| 31 | 31 | |
| 32 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 32 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 33 | 33 | foreach ($_REQUEST['ma'] as $v) { |
| 34 | 34 | $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); |
| 35 | 35 | echo '<p>', sprintf($lang['strconfclustertable'], $misc->printVal($a['table'])), "</p>\n"; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $this->printTrail($type); |
| 41 | 41 | $this->printTitle($lang['strclusterindex'], 'pg.index.cluster'); |
| 42 | 42 | |
| 43 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 43 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 44 | 44 | |
| 45 | 45 | if ($type == 'table') { |
| 46 | 46 | echo '<p>', sprintf($lang['strconfclustertable'], $misc->printVal($_REQUEST['object'])), "</p>\n"; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $this->printTrail('schema'); |
| 119 | 119 | $this->printTitle($lang['strreindex'], 'pg.reindex'); |
| 120 | 120 | |
| 121 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 121 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 122 | 122 | foreach ($_REQUEST['ma'] as $v) { |
| 123 | 123 | $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); |
| 124 | 124 | echo '<p>', sprintf($lang['strconfreindextable'], $misc->printVal($a['table'])), "</p>\n"; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $this->printTrail($type); |
| 130 | 130 | $this->printTitle($lang['strreindex'], 'pg.reindex'); |
| 131 | 131 | |
| 132 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 132 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 133 | 133 | |
| 134 | 134 | if ($type == 'table') { |
| 135 | 135 | echo '<p>', sprintf($lang['strconfreindextable'], $misc->printVal($_REQUEST['object'])), "</p>\n"; |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $this->printTrail('schema'); |
| 204 | 204 | $this->printTitle($lang['stranalyze'], 'pg.analyze'); |
| 205 | 205 | |
| 206 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 206 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 207 | 207 | foreach ($_REQUEST['ma'] as $v) { |
| 208 | 208 | $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); |
| 209 | 209 | \Kint::dump($a); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $this->printTrail($type); |
| 216 | 216 | $this->printTitle($lang['stranalyze'], 'pg.analyze'); |
| 217 | 217 | |
| 218 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 218 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 219 | 219 | |
| 220 | 220 | if ($type == 'table') { |
| 221 | 221 | echo '<p>', sprintf($lang['strconfanalyzetable'], $misc->printVal($_REQUEST['object'])), "</p>\n"; |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | $this->printTrail('schema'); |
| 285 | 285 | $this->printTitle($lang['strvacuum'], 'pg.vacuum'); |
| 286 | 286 | |
| 287 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 287 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 288 | 288 | foreach ($_REQUEST['ma'] as $v) { |
| 289 | 289 | $a = unserialize(htmlspecialchars_decode($v, ENT_QUOTES)); |
| 290 | 290 | echo '<p>', sprintf($lang['strconfvacuumtable'], $misc->printVal($a['table'])), "</p>\n"; |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | $this->printTrail($type); |
| 296 | 296 | $this->printTitle($lang['strvacuum'], 'pg.vacuum'); |
| 297 | 297 | |
| 298 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 298 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 299 | 299 | |
| 300 | 300 | if ($type == 'table') { |
| 301 | 301 | echo '<p>', sprintf($lang['strconfvacuumtable'], $misc->printVal($_REQUEST['object'])), "</p>\n"; |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | $old_val['autovacuum_vacuum_cost_limit'] = ''; |
| 412 | 412 | } |
| 413 | 413 | |
| 414 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 414 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 415 | 415 | echo $misc->form; |
| 416 | 416 | echo "<input type=\"hidden\" name=\"action\" value=\"editautovac\" />\n"; |
| 417 | 417 | echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), "\" />\n"; |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | echo "<input type=\"submit\" name=\"yes\" value=\"{$lang['stryes']}\" />\n"; |
| 498 | 498 | echo "</form>\n"; |
| 499 | 499 | |
| 500 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 500 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 501 | 501 | echo "<input type=\"hidden\" name=\"action\" value=\"admin\" />\n"; |
| 502 | 502 | echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), "\" />\n"; |
| 503 | 503 | echo $misc->form; |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | echo "<table style=\"width: 50%\">\n"; |
| 544 | 544 | echo "<tr>\n"; |
| 545 | 545 | echo '<th class="data">'; |
| 546 | - $this->misc->printHelp($lang['strvacuum'], 'pg.admin.vacuum')."</th>\n"; |
|
| 546 | + $this->misc->printHelp($lang['strvacuum'], 'pg.admin.vacuum') . "</th>\n"; |
|
| 547 | 547 | echo '</th>'; |
| 548 | 548 | echo '<th class="data">'; |
| 549 | 549 | $this->misc->printHelp($lang['stranalyze'], 'pg.admin.analyze'); |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | // Vacuum |
| 562 | 562 | echo "<tr class=\"row1\">\n"; |
| 563 | 563 | echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; |
| 564 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 564 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 565 | 565 | |
| 566 | 566 | echo "<p><input type=\"hidden\" name=\"action\" value=\"confirm_vacuum\" />\n"; |
| 567 | 567 | echo $misc->form; |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | |
| 576 | 576 | // Analyze |
| 577 | 577 | echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; |
| 578 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 578 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 579 | 579 | echo "<p><input type=\"hidden\" name=\"action\" value=\"confirm_analyze\" />\n"; |
| 580 | 580 | echo $misc->form; |
| 581 | 581 | if ($type == 'table') { |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | if ($data->hasRecluster()) { |
| 591 | 591 | $disabled = ''; |
| 592 | 592 | echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; |
| 593 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 593 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 594 | 594 | echo $misc->form; |
| 595 | 595 | if ($type == 'table') { |
| 596 | 596 | echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['object']), "\" />\n"; |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | |
| 609 | 609 | // Reindex |
| 610 | 610 | echo "<td style=\"text-align: center; vertical-align: bottom\">\n"; |
| 611 | - echo '<form action="'.SUBFOLDER."/src/views/{$script}\" method=\"post\">\n"; |
|
| 611 | + echo '<form action="' . SUBFOLDER . "/src/views/{$script}\" method=\"post\">\n"; |
|
| 612 | 612 | echo "<p><input type=\"hidden\" name=\"action\" value=\"confirm_reindex\" />\n"; |
| 613 | 613 | echo $misc->form; |
| 614 | 614 | if ($type == 'table') { |
@@ -633,12 +633,12 @@ discard block |
||
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | echo "<br /><br /><h2>{$lang['strvacuumpertable']}</h2>"; |
| 636 | - echo '<p>'.(($defaults['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff']).'</p>'; |
|
| 636 | + echo '<p>' . (($defaults['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff']) . '</p>'; |
|
| 637 | 637 | echo "<p class=\"message\">{$lang['strnotdefaultinred']}</p>"; |
| 638 | 638 | |
| 639 | - $enlight = function ($f, $p) { |
|
| 639 | + $enlight = function($f, $p) { |
|
| 640 | 640 | if (isset($f[$p[0]]) and ($f[$p[0]] != $p[1])) { |
| 641 | - return '<span style="color:#F33;font-weight:bold">'.htmlspecialchars($f[$p[0]]).'</span>'; |
|
| 641 | + return '<span style="color:#F33;font-weight:bold">' . htmlspecialchars($f[$p[0]]) . '</span>'; |
|
| 642 | 642 | } |
| 643 | 643 | |
| 644 | 644 | return htmlspecialchars($p[1]); |
@@ -648,13 +648,13 @@ discard block |
||
| 648 | 648 | 'namespace' => [ |
| 649 | 649 | 'title' => $lang['strschema'], |
| 650 | 650 | 'field' => Decorator::field('nspname'), |
| 651 | - 'url' => SUBFOLDER."/redirect/schema?{$misc->href}&", |
|
| 651 | + 'url' => SUBFOLDER . "/redirect/schema?{$misc->href}&", |
|
| 652 | 652 | 'vars' => ['schema' => 'nspname'], |
| 653 | 653 | ], |
| 654 | 654 | 'relname' => [ |
| 655 | 655 | 'title' => $lang['strtable'], |
| 656 | 656 | 'field' => Decorator::field('relname'), |
| 657 | - 'url' => SUBFOLDER."/redirect/table?{$misc->href}&", |
|
| 657 | + 'url' => SUBFOLDER . "/redirect/table?{$misc->href}&", |
|
| 658 | 658 | 'vars' => ['table' => 'relname', 'schema' => 'nspname'], |
| 659 | 659 | ], |
| 660 | 660 | 'autovacuum_enabled' => [ |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $lang = $this->lang; |
| 46 | 46 | $data = $misc->getDatabaseAccessor(); |
| 47 | 47 | |
| 48 | - $renderCastContext = function ($val) use ($lang) { |
|
| 48 | + $renderCastContext = function($val) use ($lang) { |
|
| 49 | 49 | switch ($val) { |
| 50 | 50 | case 'e':return $lang['strno']; |
| 51 | 51 | case 'a':return $lang['strinassignment']; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | 'aggrname' => [ |
| 90 | 90 | 'title' => $lang['strname'], |
| 91 | 91 | 'field' => Decorator::field('proname'), |
| 92 | - 'url' => SUBFOLDER."/redirect/aggregate?action=properties&{$misc->href}&", |
|
| 92 | + 'url' => SUBFOLDER . "/redirect/aggregate?action=properties&{$misc->href}&", |
|
| 93 | 93 | 'vars' => ['aggrname' => 'proname', 'aggrtype' => 'proargtypes'], |
| 94 | 94 | ], |
| 95 | 95 | 'aggrtype' => [ |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $this->printTitle($lang['strcreateaggregate'], 'pg.aggregate.create'); |
| 282 | 282 | $this->printMsg($msg); |
| 283 | 283 | |
| 284 | - echo '<form action="'.SUBFOLDER."/src/views/aggregates.php\" method=\"post\">\n"; |
|
| 284 | + echo '<form action="' . SUBFOLDER . "/src/views/aggregates.php\" method=\"post\">\n"; |
|
| 285 | 285 | echo "<table>\n"; |
| 286 | 286 | echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n"; |
| 287 | 287 | echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | $this->printTitle($lang['stralter'], 'pg.aggregate.alter'); |
| 360 | 360 | $this->printMsg($msg); |
| 361 | 361 | |
| 362 | - echo '<form action="'.SUBFOLDER."/src/views/aggregates.php\" method=\"post\">\n"; |
|
| 362 | + echo '<form action="' . SUBFOLDER . "/src/views/aggregates.php\" method=\"post\">\n"; |
|
| 363 | 363 | $aggrdata = $data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']); |
| 364 | 364 | if ($aggrdata->recordCount() > 0) { |
| 365 | 365 | // Output table header |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | |
| 409 | 409 | echo '<p>', sprintf($lang['strconfdropaggregate'], htmlspecialchars($_REQUEST['aggrname'])), "</p>\n"; |
| 410 | 410 | |
| 411 | - echo '<form action="'.SUBFOLDER."/src/views/aggregates.php\" method=\"post\">\n"; |
|
| 411 | + echo '<form action="' . SUBFOLDER . "/src/views/aggregates.php\" method=\"post\">\n"; |
|
| 412 | 412 | echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; |
| 413 | 413 | echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 414 | 414 | echo '<input type="hidden" name="aggrname" value="', htmlspecialchars($_REQUEST['aggrname']), "\" />\n"; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $login_html .= $this->printMsg($msg, false); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - $login_html .= '<form id="login_form" method="post" name="login_form" action="'.SUBFOLDER.'/redirect/server?server='.htmlspecialchars($server_id).'">'; |
|
| 82 | + $login_html .= '<form id="login_form" method="post" name="login_form" action="' . SUBFOLDER . '/redirect/server?server=' . htmlspecialchars($server_id) . '">'; |
|
| 83 | 83 | |
| 84 | 84 | $md5_server = md5($server_id); |
| 85 | 85 | // Pass request vars through form (is this a security risk???) |
@@ -91,33 +91,33 @@ discard block |
||
| 91 | 91 | $key = explode('?', $key)[1]; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - $login_html .= '<input type="hidden" name="'.htmlspecialchars($key).'" value="'.htmlspecialchars($val).'" />'."\n"; |
|
| 94 | + $login_html .= '<input type="hidden" name="' . htmlspecialchars($key) . '" value="' . htmlspecialchars($val) . '" />' . "\n"; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - $login_html .= '<input type="hidden" name="loginServer" value="'.htmlspecialchars($server_id).'" />'; |
|
| 97 | + $login_html .= '<input type="hidden" name="loginServer" value="' . htmlspecialchars($server_id) . '" />'; |
|
| 98 | 98 | $login_html .= '<table class="navbar" border="0" cellpadding="5" cellspacing="3">'; |
| 99 | 99 | $login_html .= '<tr>'; |
| 100 | - $login_html .= '<td>'.$lang['strusername'].'</td>'; |
|
| 100 | + $login_html .= '<td>' . $lang['strusername'] . '</td>'; |
|
| 101 | 101 | $loginusername = isset($_POST['loginUsername']) ? htmlspecialchars($_POST['loginUsername']) : ''; |
| 102 | 102 | |
| 103 | - $login_html .= '<td><input type="text" name="loginUsername" value="'.$loginusername.'" size="24" /></td>'; |
|
| 103 | + $login_html .= '<td><input type="text" name="loginUsername" value="' . $loginusername . '" size="24" /></td>'; |
|
| 104 | 104 | $login_html .= '</tr>'; |
| 105 | 105 | $login_html .= '<tr>'; |
| 106 | - $login_html .= '<td>'.$lang['strpassword'].'</td>'; |
|
| 107 | - $login_html .= '<td><input id="loginPassword" type="password" name="loginPassword_'.$md5_server.'" size="24" /></td>'; |
|
| 106 | + $login_html .= '<td>' . $lang['strpassword'] . '</td>'; |
|
| 107 | + $login_html .= '<td><input id="loginPassword" type="password" name="loginPassword_' . $md5_server . '" size="24" /></td>'; |
|
| 108 | 108 | $login_html .= '</tr>'; |
| 109 | 109 | $login_html .= '</table>'; |
| 110 | 110 | if (count($conf['servers']) > 1) { |
| 111 | 111 | $checked = isset($_POST['loginShared']) ? 'checked="checked"' : ''; |
| 112 | - $login_html .= '<p><input type="checkbox" id="loginShared" name="loginShared" '.$checked.' />'; |
|
| 113 | - $login_html .= '<label for="loginShared">'.$lang['strtrycred'].'</label></p>'; |
|
| 112 | + $login_html .= '<p><input type="checkbox" id="loginShared" name="loginShared" ' . $checked . ' />'; |
|
| 113 | + $login_html .= '<label for="loginShared">' . $lang['strtrycred'] . '</label></p>'; |
|
| 114 | 114 | } |
| 115 | - $login_html .= '<p><input type="submit" name="loginSubmit" value="'.$lang['strlogin'].'" /></p>'; |
|
| 115 | + $login_html .= '<p><input type="submit" name="loginSubmit" value="' . $lang['strlogin'] . '" /></p>'; |
|
| 116 | 116 | $login_html .= '</form>'; |
| 117 | 117 | |
| 118 | 118 | $login_html .= '<script type="text/javascript">'; |
| 119 | 119 | $login_html .= ' var uname = document.login_form.loginUsername;'; |
| 120 | - $login_html .= ' var pword = document.login_form.loginPassword_'.$md5_server.';'; |
|
| 120 | + $login_html .= ' var pword = document.login_form.loginPassword_' . $md5_server . ';'; |
|
| 121 | 121 | $login_html .= ' if (uname.value == "") {'; |
| 122 | 122 | $login_html .= ' uname.focus();'; |
| 123 | 123 | $login_html .= ' } else {'; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | return $this->doTree(); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - $this->printHeader($lang['strindexes'], '<script src="'.SUBFOLDER.'/js/indexes.js" type="text/javascript"></script>'); |
|
| 25 | + $this->printHeader($lang['strindexes'], '<script src="' . SUBFOLDER . '/js/indexes.js" type="text/javascript"></script>'); |
|
| 26 | 26 | |
| 27 | 27 | if ($action == 'create_index' || $action == 'save_create_index') { |
| 28 | 28 | echo '<body onload="init();">'; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $lang = $this->lang; |
| 83 | 83 | $data = $misc->getDatabaseAccessor(); |
| 84 | 84 | |
| 85 | - $indPre = function (&$rowdata, $actions) use ($data, $lang) { |
|
| 85 | + $indPre = function(&$rowdata, $actions) use ($data, $lang) { |
|
| 86 | 86 | if ($data->phpBool($rowdata->fields['indisprimary'])) { |
| 87 | 87 | $rowdata->fields['+constraints'] = $lang['strprimarykey']; |
| 88 | 88 | $actions['drop']['disable'] = true; |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | |
| 219 | 219 | $reqvars = $misc->getRequestVars($subject); |
| 220 | 220 | |
| 221 | - $getIcon = function ($f) { |
|
| 221 | + $getIcon = function($f) { |
|
| 222 | 222 | if ($f['indisprimary'] == 't') { |
| 223 | 223 | return 'PrimaryKey'; |
| 224 | 224 | } |
@@ -255,25 +255,25 @@ discard block |
||
| 255 | 255 | $this->printTrail('index'); |
| 256 | 256 | $this->printTitle($lang['strclusterindex'], 'pg.index.cluster'); |
| 257 | 257 | |
| 258 | - echo '<p>', sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), '</p>'."\n"; |
|
| 258 | + echo '<p>', sprintf($lang['strconfcluster'], $misc->printVal($_REQUEST['index'])), '</p>' . "\n"; |
|
| 259 | 259 | |
| 260 | - echo '<form action="'.SUBFOLDER.'/src/views/indexes.php" method="post">'."\n"; |
|
| 260 | + echo '<form action="' . SUBFOLDER . '/src/views/indexes.php" method="post">' . "\n"; |
|
| 261 | 261 | echo '<p><input type="checkbox" id="analyze" name="analyze"', (isset($_REQUEST['analyze']) ? ' checked="checked"' : ''), ' />'; |
| 262 | - echo "<label for=\"analyze\">{$lang['stranalyze']}</label></p>"."\n"; |
|
| 263 | - echo '<input type="hidden" name="action" value="cluster_index" />'."\n"; |
|
| 264 | - echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />'."\n"; |
|
| 265 | - echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />'."\n"; |
|
| 262 | + echo "<label for=\"analyze\">{$lang['stranalyze']}</label></p>" . "\n"; |
|
| 263 | + echo '<input type="hidden" name="action" value="cluster_index" />' . "\n"; |
|
| 264 | + echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), '" />' . "\n"; |
|
| 265 | + echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />' . "\n"; |
|
| 266 | 266 | echo $misc->form; |
| 267 | - echo "<input type=\"submit\" name=\"cluster\" value=\"{$lang['strclusterindex']}\" />"."\n"; |
|
| 268 | - echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />"."\n"; |
|
| 269 | - echo '</form>'."\n"; |
|
| 267 | + echo "<input type=\"submit\" name=\"cluster\" value=\"{$lang['strclusterindex']}\" />" . "\n"; |
|
| 268 | + echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />" . "\n"; |
|
| 269 | + echo '</form>' . "\n"; |
|
| 270 | 270 | } else { |
| 271 | 271 | $status = $data->clusterIndex($_POST['table'], $_POST['index']); |
| 272 | 272 | if ($status == 0) { |
| 273 | 273 | if (isset($_POST['analyze'])) { |
| 274 | 274 | $status = $data->analyzeDB($_POST['table']); |
| 275 | 275 | if ($status == 0) { |
| 276 | - $this->doDefault($lang['strclusteredgood'].' '.$lang['stranalyzegood']); |
|
| 276 | + $this->doDefault($lang['strclusteredgood'] . ' ' . $lang['stranalyzegood']); |
|
| 277 | 277 | } else { |
| 278 | 278 | $this->doDefault($lang['stranalyzebad']); |
| 279 | 279 | } |
@@ -368,54 +368,54 @@ discard block |
||
| 368 | 368 | $buttonRemove->set_attribute('onclick', 'buttonPressed(this);'); |
| 369 | 369 | $buttonRemove->set_attribute('type', 'button'); |
| 370 | 370 | |
| 371 | - echo '<form onsubmit="doSelectAll();" name="formIndex" action="indexes.php" method="post">'."\n"; |
|
| 371 | + echo '<form onsubmit="doSelectAll();" name="formIndex" action="indexes.php" method="post">' . "\n"; |
|
| 372 | 372 | |
| 373 | - echo '<table>'."\n"; |
|
| 374 | - echo '<tr><th class="data required" colspan="3">'.$lang['strindexname'].'</th></tr>'; |
|
| 373 | + echo '<table>' . "\n"; |
|
| 374 | + echo '<tr><th class="data required" colspan="3">' . $lang['strindexname'] . '</th></tr>'; |
|
| 375 | 375 | echo '<tr>'; |
| 376 | 376 | echo '<td class="data1" colspan="3">'; |
| 377 | - echo '<input type="text" name="formIndexName" size="32" maxlength="'.$data->_maxNameLen.'" value="'.htmlspecialchars($_POST['formIndexName']).'" />'; |
|
| 377 | + echo '<input type="text" name="formIndexName" size="32" maxlength="' . $data->_maxNameLen . '" value="' . htmlspecialchars($_POST['formIndexName']) . '" />'; |
|
| 378 | 378 | echo '</td></tr>'; |
| 379 | - echo '<tr><th class="data">'.$lang['strtablecolumnlist'].'</th><th class="data"> </th>'; |
|
| 380 | - echo '<th class="data required">'.$lang['strindexcolumnlist'].'</th></tr>'."\n"; |
|
| 381 | - echo '<tr><td class="data1">'.$selColumns->fetch().'</td>'."\n"; |
|
| 382 | - echo '<td class="data1">'.$buttonRemove->fetch().$buttonAdd->fetch().'</td>'; |
|
| 383 | - echo '<td class="data1">'.$selIndex->fetch().'</td></tr>'."\n"; |
|
| 384 | - echo '</table>'."\n"; |
|
| 385 | - |
|
| 386 | - echo '<table> '."\n"; |
|
| 379 | + echo '<tr><th class="data">' . $lang['strtablecolumnlist'] . '</th><th class="data"> </th>'; |
|
| 380 | + echo '<th class="data required">' . $lang['strindexcolumnlist'] . '</th></tr>' . "\n"; |
|
| 381 | + echo '<tr><td class="data1">' . $selColumns->fetch() . '</td>' . "\n"; |
|
| 382 | + echo '<td class="data1">' . $buttonRemove->fetch() . $buttonAdd->fetch() . '</td>'; |
|
| 383 | + echo '<td class="data1">' . $selIndex->fetch() . '</td></tr>' . "\n"; |
|
| 384 | + echo '</table>' . "\n"; |
|
| 385 | + |
|
| 386 | + echo '<table> ' . "\n"; |
|
| 387 | 387 | echo '<tr>'; |
| 388 | - echo '<th class="data left required" scope="row">'.$lang['strindextype'].'</th>'; |
|
| 388 | + echo '<th class="data left required" scope="row">' . $lang['strindextype'] . '</th>'; |
|
| 389 | 389 | echo '<td class="data1"><select name="formIndexType">'; |
| 390 | 390 | foreach ($data->typIndexes as $v) { |
| 391 | 391 | echo '<option value="', htmlspecialchars($v), '"', |
| 392 | - ($v == $_POST['formIndexType']) ? ' selected="selected"' : '', '>', htmlspecialchars($v), '</option>'."\n"; |
|
| 392 | + ($v == $_POST['formIndexType']) ? ' selected="selected"' : '', '>', htmlspecialchars($v), '</option>' . "\n"; |
|
| 393 | 393 | } |
| 394 | - echo '</select></td></tr>'."\n"; |
|
| 394 | + echo '</select></td></tr>' . "\n"; |
|
| 395 | 395 | echo '<tr>'; |
| 396 | 396 | echo "<th class=\"data left\" scope=\"row\"><label for=\"formUnique\">{$lang['strunique']}</label></th>"; |
| 397 | 397 | echo '<td class="data1"><input type="checkbox" id="formUnique" name="formUnique"', (isset($_POST['formUnique']) ? 'checked="checked"' : ''), ' /></td>'; |
| 398 | 398 | echo '</tr>'; |
| 399 | 399 | echo '<tr>'; |
| 400 | 400 | echo "<th class=\"data left\" scope=\"row\">{$lang['strwhere']}</th>"; |
| 401 | - echo '<td class="data1">(<input name="formWhere" size="32" maxlength="'.$data->_maxNameLen.'" value="'.htmlspecialchars($_POST['formWhere']).'" />)</td>'; |
|
| 401 | + echo '<td class="data1">(<input name="formWhere" size="32" maxlength="' . $data->_maxNameLen . '" value="' . htmlspecialchars($_POST['formWhere']) . '" />)</td>'; |
|
| 402 | 402 | echo '</tr>'; |
| 403 | 403 | |
| 404 | 404 | // Tablespace (if there are any) |
| 405 | 405 | if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { |
| 406 | - echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strtablespace']}</th>"."\n"; |
|
| 407 | - echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"formSpc\">"."\n"; |
|
| 406 | + echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strtablespace']}</th>" . "\n"; |
|
| 407 | + echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"formSpc\">" . "\n"; |
|
| 408 | 408 | // Always offer the default (empty) option |
| 409 | 409 | echo "\t\t\t\t<option value=\"\"", |
| 410 | - ($_POST['formSpc'] == '') ? ' selected="selected"' : '', '></option>'."\n"; |
|
| 410 | + ($_POST['formSpc'] == '') ? ' selected="selected"' : '', '></option>' . "\n"; |
|
| 411 | 411 | // Display all other tablespaces |
| 412 | 412 | while (!$tablespaces->EOF) { |
| 413 | 413 | $spcname = htmlspecialchars($tablespaces->fields['spcname']); |
| 414 | 414 | echo "\t\t\t\t<option value=\"{$spcname}\"", |
| 415 | - ($spcname == $_POST['formSpc']) ? ' selected="selected"' : '', ">{$spcname}</option>"."\n"; |
|
| 415 | + ($spcname == $_POST['formSpc']) ? ' selected="selected"' : '', ">{$spcname}</option>" . "\n"; |
|
| 416 | 416 | $tablespaces->moveNext(); |
| 417 | 417 | } |
| 418 | - echo "\t\t\t</select>\n\t\t</td>\n\t</tr>"."\n"; |
|
| 418 | + echo "\t\t\t</select>\n\t\t</td>\n\t</tr>" . "\n"; |
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | if ($data->hasConcurrentIndexBuild()) { |
@@ -427,13 +427,13 @@ discard block |
||
| 427 | 427 | |
| 428 | 428 | echo '</table>'; |
| 429 | 429 | |
| 430 | - echo '<p><input type="hidden" name="action" value="save_create_index" />'."\n"; |
|
| 430 | + echo '<p><input type="hidden" name="action" value="save_create_index" />' . "\n"; |
|
| 431 | 431 | echo $misc->form; |
| 432 | - echo '<input type="hidden" name="subject" value="', htmlspecialchars($subject), '" />'."\n"; |
|
| 433 | - echo '<input type="hidden" name="'.$subject.'" value="', htmlspecialchars($object), '" />'."\n"; |
|
| 434 | - echo "<input type=\"submit\" value=\"{$lang['strcreate']}\" />"."\n"; |
|
| 435 | - echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>"."\n"; |
|
| 436 | - echo '</form>'."\n"; |
|
| 432 | + echo '<input type="hidden" name="subject" value="', htmlspecialchars($subject), '" />' . "\n"; |
|
| 433 | + echo '<input type="hidden" name="' . $subject . '" value="', htmlspecialchars($object), '" />' . "\n"; |
|
| 434 | + echo "<input type=\"submit\" value=\"{$lang['strcreate']}\" />" . "\n"; |
|
| 435 | + echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" /></p>" . "\n"; |
|
| 436 | + echo '</form>' . "\n"; |
|
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | /** |
@@ -501,17 +501,17 @@ discard block |
||
| 501 | 501 | $this->printTrail('index'); |
| 502 | 502 | $this->printTitle($lang['strdrop'], 'pg.index.drop'); |
| 503 | 503 | |
| 504 | - echo '<p>', sprintf($lang['strconfdropindex'], $misc->printVal($_REQUEST['index'])), '</p>'."\n"; |
|
| 504 | + echo '<p>', sprintf($lang['strconfdropindex'], $misc->printVal($_REQUEST['index'])), '</p>' . "\n"; |
|
| 505 | 505 | |
| 506 | - echo '<form action="'.SUBFOLDER.'/src/views/indexes.php" method="post">'."\n"; |
|
| 507 | - echo '<input type="hidden" name="action" value="drop_index" />'."\n"; |
|
| 508 | - echo '<input type="hidden" name="table" value="', htmlspecialchars($object), '" />'."\n"; |
|
| 509 | - echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />'."\n"; |
|
| 506 | + echo '<form action="' . SUBFOLDER . '/src/views/indexes.php" method="post">' . "\n"; |
|
| 507 | + echo '<input type="hidden" name="action" value="drop_index" />' . "\n"; |
|
| 508 | + echo '<input type="hidden" name="table" value="', htmlspecialchars($object), '" />' . "\n"; |
|
| 509 | + echo '<input type="hidden" name="index" value="', htmlspecialchars($_REQUEST['index']), '" />' . "\n"; |
|
| 510 | 510 | echo $misc->form; |
| 511 | - echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>"."\n"; |
|
| 512 | - echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />"."\n"; |
|
| 513 | - echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />"."\n"; |
|
| 514 | - echo '</form>'."\n"; |
|
| 511 | + echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>" . "\n"; |
|
| 512 | + echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />" . "\n"; |
|
| 513 | + echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />" . "\n"; |
|
| 514 | + echo '</form>' . "\n"; |
|
| 515 | 515 | } else { |
| 516 | 516 | $status = $data->dropIndex($_POST['index'], isset($_POST['cascade'])); |
| 517 | 517 | if ($status == 0) { |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $_POST['comment'] = ($data->hasSharedComments()) ? $tablespace->fields['spccomment'] : ''; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - echo '<form action="'.SUBFOLDER."/src/views/tablespaces.php\" method=\"post\">\n"; |
|
| 193 | + echo '<form action="' . SUBFOLDER . "/src/views/tablespaces.php\" method=\"post\">\n"; |
|
| 194 | 194 | echo $misc->form; |
| 195 | 195 | echo "<table>\n"; |
| 196 | 196 | echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n"; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | echo '<p>', sprintf($lang['strconfdroptablespace'], $misc->printVal($_REQUEST['tablespace'])), "</p>\n"; |
| 269 | 269 | |
| 270 | - echo '<form action="'.SUBFOLDER."/src/views/tablespaces.php\" method=\"post\">\n"; |
|
| 270 | + echo '<form action="' . SUBFOLDER . "/src/views/tablespaces.php\" method=\"post\">\n"; |
|
| 271 | 271 | echo $misc->form; |
| 272 | 272 | echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 273 | 273 | echo '<input type="hidden" name="tablespace" value="', htmlspecialchars($_REQUEST['tablespace']), "\" />\n"; |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $this->printTitle($lang['strcreatetablespace'], 'pg.tablespace.create'); |
| 320 | 320 | $this->printMsg($msg); |
| 321 | 321 | |
| 322 | - echo '<form action="'.SUBFOLDER."/src/views/tablespaces.php\" method=\"post\">\n"; |
|
| 322 | + echo '<form action="' . SUBFOLDER . "/src/views/tablespaces.php\" method=\"post\">\n"; |
|
| 323 | 323 | echo $misc->form; |
| 324 | 324 | echo "<table>\n"; |
| 325 | 325 | echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n"; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @param $parser |
| 37 | 37 | * @param $cdata |
| 38 | 38 | */ |
| 39 | - $_charHandler = function ($parser, $cdata) use (&$state, &$curr_col_val) { |
|
| 39 | + $_charHandler = function($parser, $cdata) use (&$state, &$curr_col_val) { |
|
| 40 | 40 | if ($state == 'COLUMN') { |
| 41 | 41 | $curr_col_val .= $cdata; |
| 42 | 42 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @param $name |
| 50 | 50 | * @param $attrs |
| 51 | 51 | */ |
| 52 | - $_startElement = function ($parser, $name, $attrs) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null) { |
|
| 52 | + $_startElement = function($parser, $name, $attrs) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null) { |
|
| 53 | 53 | switch ($name) { |
| 54 | 54 | case 'DATA': |
| 55 | 55 | if ($state != 'XML') { |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | * @param $parser |
| 113 | 113 | * @param $name |
| 114 | 114 | */ |
| 115 | - $_endElement = function ($parser, $name) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null, &$curr_col_val) { |
|
| 115 | + $_endElement = function($parser, $name) use ($data, $misc, &$state, &$curr_col_name, &$curr_col_null, &$curr_col_val) { |
|
| 116 | 116 | switch ($name) { |
| 117 | 117 | case 'DATA': |
| 118 | 118 | $state = 'READ_DATA'; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | // Different header if we're view rules or table rules |
| 26 | - $this->printHeader($_REQUEST[$_REQUEST['subject']].' - '.$lang['strrules']); |
|
| 26 | + $this->printHeader($_REQUEST[$_REQUEST['subject']] . ' - ' . $lang['strrules']); |
|
| 27 | 27 | $this->printBody(); |
| 28 | 28 | |
| 29 | 29 | switch ($action) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $this->printTitle($lang['strcreaterule'], 'pg.rule.create'); |
| 183 | 183 | $this->printMsg($msg); |
| 184 | 184 | |
| 185 | - echo '<form action="'.SUBFOLDER."/src/views/rules.php\" method=\"post\">\n"; |
|
| 185 | + echo '<form action="' . SUBFOLDER . "/src/views/rules.php\" method=\"post\">\n"; |
|
| 186 | 186 | echo "<table>\n"; |
| 187 | 187 | echo "<tr><th class=\"data left required\">{$lang['strname']}</th>\n"; |
| 188 | 188 | echo "<td class=\"data1\"><input name=\"name\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"", |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | echo '<p>', sprintf($lang['strconfdroprule'], $misc->printVal($_REQUEST['rule']), |
| 251 | 251 | $misc->printVal($_REQUEST[$_REQUEST['reltype']])), "</p>\n"; |
| 252 | 252 | |
| 253 | - echo '<form action="'.SUBFOLDER."/src/views/rules.php\" method=\"post\">\n"; |
|
| 253 | + echo '<form action="' . SUBFOLDER . "/src/views/rules.php\" method=\"post\">\n"; |
|
| 254 | 254 | echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 255 | 255 | echo '<input type="hidden" name="subject" value="', htmlspecialchars($_REQUEST['reltype']), "\" />\n"; |
| 256 | 256 | echo '<input type="hidden" name="', htmlspecialchars($_REQUEST['reltype']), |