@@ -251,7 +251,7 @@ |
||
| 251 | 251 | |
| 252 | 252 | echo '<p>', sprintf($lang['strconfdropoperator'], $misc->printVal($_REQUEST['operator'])), "</p>\n"; |
| 253 | 253 | |
| 254 | - echo '<form action="'.SUBFOLDER."/src/views/operators.php\" method=\"post\">\n"; |
|
| 254 | + echo '<form action="' . SUBFOLDER . "/src/views/operators.php\" method=\"post\">\n"; |
|
| 255 | 255 | echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; |
| 256 | 256 | echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 257 | 257 | echo '<input type="hidden" name="operator" value="', htmlspecialchars($_REQUEST['operator']), "\" />\n"; |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | return $this->doTree(); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - $this->printHeader($lang['strtables'].' - '.$_REQUEST['table'].' - '.$lang['strconstraints'], |
|
| 26 | - '<script src="'.SUBFOLDER.'/js/indexes.js" type="text/javascript"></script>', true, 'header_select2.twig'); |
|
| 25 | + $this->printHeader($lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $lang['strconstraints'], |
|
| 26 | + '<script src="' . SUBFOLDER . '/js/indexes.js" type="text/javascript"></script>', true, 'header_select2.twig'); |
|
| 27 | 27 | |
| 28 | 28 | if ($action == 'add_unique_key' || $action == 'save_add_unique_key' |
| 29 | 29 | || $action == 'add_primary_key' || $action == 'save_add_primary_key' |
@@ -113,10 +113,10 @@ discard block |
||
| 113 | 113 | $lang = $this->lang; |
| 114 | 114 | $data = $misc->getDatabaseAccessor(); |
| 115 | 115 | |
| 116 | - $cnPre = function (&$rowdata) use ($data) { |
|
| 116 | + $cnPre = function(&$rowdata) use ($data) { |
|
| 117 | 117 | if (is_null($rowdata->fields['consrc'])) { |
| 118 | 118 | $atts = $data->getAttributeNames($_REQUEST['table'], explode(' ', $rowdata->fields['indkey'])); |
| 119 | - $rowdata->fields['+definition'] = ($rowdata->fields['contype'] == 'u' ? 'UNIQUE (' : 'PRIMARY KEY (').implode(',', $atts).')'; |
|
| 119 | + $rowdata->fields['+definition'] = ($rowdata->fields['contype'] == 'u' ? 'UNIQUE (' : 'PRIMARY KEY (') . implode(',', $atts) . ')'; |
|
| 120 | 120 | } else { |
| 121 | 121 | $rowdata->fields['+definition'] = $rowdata->fields['consrc']; |
| 122 | 122 | } |
@@ -319,9 +319,9 @@ discard block |
||
| 319 | 319 | echo "<table>\n"; |
| 320 | 320 | echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strfktarget']}</th></tr>"; |
| 321 | 321 | echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\"> </th><th class=data>{$lang['strfkcolumnlist']}</th></tr>\n"; |
| 322 | - echo '<tr><td class="data1">'.$selColumns->fetch()."</td>\n"; |
|
| 323 | - echo '<td class="data1" style="text-align: center">'.$buttonRemove->fetch().$buttonAdd->fetch().'</td>'; |
|
| 324 | - echo '<td class="data1">'.$selIndex->fetch()."</td></tr>\n"; |
|
| 322 | + echo '<tr><td class="data1">' . $selColumns->fetch() . "</td>\n"; |
|
| 323 | + echo '<td class="data1" style="text-align: center">' . $buttonRemove->fetch() . $buttonAdd->fetch() . '</td>'; |
|
| 324 | + echo '<td class="data1">' . $selIndex->fetch() . "</td></tr>\n"; |
|
| 325 | 325 | echo "<tr><th class=\"data\" colspan=\"3\">{$lang['stractions']}</th></tr>"; |
| 326 | 326 | echo '<tr>'; |
| 327 | 327 | echo "<td class=\"data1\" colspan=\"3\">\n"; |
@@ -438,9 +438,9 @@ discard block |
||
| 438 | 438 | echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strname']}</th></tr>\n"; |
| 439 | 439 | echo "<tr><td class=\"data1\" colspan=\"3\"><input type=\"text\" name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" /></td></tr>\n"; |
| 440 | 440 | echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\"> </th><th class=\"data required\">{$lang['strfkcolumnlist']}</th></tr>\n"; |
| 441 | - echo '<tr><td class="data1">'.$selColumns->fetch()."</td>\n"; |
|
| 442 | - echo '<td class="data1" style="text-align: center">'.$buttonRemove->fetch().$buttonAdd->fetch()."</td>\n"; |
|
| 443 | - echo '<td class=data1>'.$selIndex->fetch()."</td></tr>\n"; |
|
| 441 | + echo '<tr><td class="data1">' . $selColumns->fetch() . "</td>\n"; |
|
| 442 | + echo '<td class="data1" style="text-align: center">' . $buttonRemove->fetch() . $buttonAdd->fetch() . "</td>\n"; |
|
| 443 | + echo '<td class=data1>' . $selIndex->fetch() . "</td></tr>\n"; |
|
| 444 | 444 | echo "<tr><th class=\"data\" colspan=\"3\">{$lang['strfktarget']}</th></tr>"; |
| 445 | 445 | echo '<tr>'; |
| 446 | 446 | echo '<td class="data1" colspan="3"><select class="select2" name="target">'; |
@@ -546,9 +546,9 @@ discard block |
||
| 546 | 546 | echo '<td class="data1" colspan="3"><input type="text" name="name" value="', htmlspecialchars($_POST['name']), |
| 547 | 547 | "\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" /></td></tr>"; |
| 548 | 548 | echo "<tr><th class=\"data\">{$lang['strtablecolumnlist']}</th><th class=\"data\"> </th><th class=\"data required\">{$lang['strindexcolumnlist']}</th></tr>\n"; |
| 549 | - echo '<tr><td class="data1">'.$selColumns->fetch()."</td>\n"; |
|
| 550 | - echo '<td class="data1" style="text-align: center">'.$buttonRemove->fetch().$buttonAdd->fetch().'</td>'; |
|
| 551 | - echo '<td class=data1>'.$selIndex->fetch()."</td></tr>\n"; |
|
| 549 | + echo '<tr><td class="data1">' . $selColumns->fetch() . "</td>\n"; |
|
| 550 | + echo '<td class="data1" style="text-align: center">' . $buttonRemove->fetch() . $buttonAdd->fetch() . '</td>'; |
|
| 551 | + echo '<td class=data1>' . $selIndex->fetch() . "</td></tr>\n"; |
|
| 552 | 552 | |
| 553 | 553 | // Tablespace (if there are any) |
| 554 | 554 | if ($data->hasTablespaces() && $tablespaces->recordCount() > 0) { |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | $this->printTitle($lang['straddcheck'], 'pg.constraint.check'); |
| 638 | 638 | $this->printMsg($msg); |
| 639 | 639 | |
| 640 | - echo '<form action="'.SUBFOLDER."/src/views/constraints.php\" method=\"post\">\n"; |
|
| 640 | + echo '<form action="' . SUBFOLDER . "/src/views/constraints.php\" method=\"post\">\n"; |
|
| 641 | 641 | echo "<table>\n"; |
| 642 | 642 | echo "<tr><th class=\"data\">{$lang['strname']}</th>\n"; |
| 643 | 643 | echo "<th class=\"data required\">{$lang['strdefinition']}</th></tr>\n"; |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | echo '<p>', sprintf($lang['strconfdropconstraint'], $misc->printVal($_REQUEST['constraint']), |
| 688 | 688 | $misc->printVal($_REQUEST['table'])), "</p>\n"; |
| 689 | 689 | |
| 690 | - echo '<form action="'.SUBFOLDER."/src/views/constraints.php\" method=\"post\">\n"; |
|
| 690 | + echo '<form action="' . SUBFOLDER . "/src/views/constraints.php\" method=\"post\">\n"; |
|
| 691 | 691 | echo "<input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 692 | 692 | echo '<input type="hidden" name="table" value="', htmlspecialchars($_REQUEST['table']), "\" />\n"; |
| 693 | 693 | echo '<input type="hidden" name="constraint" value="', htmlspecialchars($_REQUEST['constraint']), "\" />\n"; |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | 'server' => [ |
| 92 | 92 | 'title' => $lang['strserver'], |
| 93 | 93 | 'field' => Decorator::field('desc'), |
| 94 | - 'url' => SUBFOLDER.'/redirect/server?', |
|
| 94 | + 'url' => SUBFOLDER . '/redirect/server?', |
|
| 95 | 95 | 'vars' => ['server' => 'id'], |
| 96 | 96 | ], |
| 97 | 97 | 'host' => [ |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | ], |
| 127 | 127 | ]; |
| 128 | 128 | |
| 129 | - $svPre = function (&$rowdata) use ($actions) { |
|
| 129 | + $svPre = function(&$rowdata) use ($actions) { |
|
| 130 | 130 | $actions['logout']['disable'] = empty($rowdata->fields['username']); |
| 131 | 131 | |
| 132 | 132 | return $actions; |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | $lang = $this->lang; |
| 91 | 91 | $data = $misc->getDatabaseAccessor(); |
| 92 | 92 | |
| 93 | - $renderRoleConnLimit = function ($val) use ($lang) { |
|
| 93 | + $renderRoleConnLimit = function($val) use ($lang) { |
|
| 94 | 94 | return $val == '-1' ? $lang['strnolimit'] : htmlspecialchars($val); |
| 95 | 95 | }; |
| 96 | 96 | |
| 97 | - $renderRoleExpires = function ($val) use ($lang) { |
|
| 97 | + $renderRoleExpires = function($val) use ($lang) { |
|
| 98 | 98 | return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val); |
| 99 | 99 | }; |
| 100 | 100 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'role' => [ |
| 109 | 109 | 'title' => $lang['strrole'], |
| 110 | 110 | 'field' => Decorator::field('rolname'), |
| 111 | - 'url' => SUBFOLDER."/redirect/role?action=properties&{$misc->href}&", |
|
| 111 | + 'url' => SUBFOLDER . "/redirect/role?action=properties&{$misc->href}&", |
|
| 112 | 112 | 'vars' => ['rolename' => 'rolname'], |
| 113 | 113 | ], |
| 114 | 114 | 'superuser' => [ |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $this->printTitle($lang['strcreaterole'], 'pg.role.create'); |
| 246 | 246 | $this->printMsg($msg); |
| 247 | 247 | |
| 248 | - echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n"; |
|
| 248 | + echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n"; |
|
| 249 | 249 | echo "<table>\n"; |
| 250 | 250 | echo "\t<tr>\n\t\t<th class=\"data left required\" style=\"width: 130px\">{$lang['strname']}</th>\n"; |
| 251 | 251 | echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formRolename\" value=\"", htmlspecialchars($_POST['formRolename']), "\" /></td>\n\t</tr>\n"; |
@@ -417,10 +417,10 @@ discard block |
||
| 417 | 417 | $_POST['formPassword'] = ''; |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | - echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n"; |
|
| 420 | + echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n"; |
|
| 421 | 421 | echo "<table>\n"; |
| 422 | 422 | echo "\t<tr>\n\t\t<th class=\"data left\" style=\"width: 130px\">{$lang['strname']}</th>\n"; |
| 423 | - echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"".htmlspecialchars($_POST['formNewRoleName']).'" />' : $misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>\n"; |
|
| 423 | + echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . htmlspecialchars($_POST['formNewRoleName']) . '" />' : $misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>\n"; |
|
| 424 | 424 | echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strpassword']}</th>\n"; |
| 425 | 425 | echo "\t\t<td class=\"data1\"><input type=\"password\" size=\"15\" name=\"formPassword\" value=\"", htmlspecialchars($_POST['formPassword']), "\" /></td>\n\t</tr>\n"; |
| 426 | 426 | echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strconfirm']}</th>\n"; |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | |
| 603 | 603 | echo '<p>', sprintf($lang['strconfdroprole'], $misc->printVal($_REQUEST['rolename'])), "</p>\n"; |
| 604 | 604 | |
| 605 | - echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n"; |
|
| 605 | + echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n"; |
|
| 606 | 606 | echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 607 | 607 | echo '<input type="hidden" name="rolename" value="', htmlspecialchars($_REQUEST['rolename']), "\" />\n"; |
| 608 | 608 | echo $misc->form; |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | $_POST['confirm'] = ''; |
| 831 | 831 | } |
| 832 | 832 | |
| 833 | - echo '<form action="'.SUBFOLDER."/src/views/roles.php\" method=\"post\">\n"; |
|
| 833 | + echo '<form action="' . SUBFOLDER . "/src/views/roles.php\" method=\"post\">\n"; |
|
| 834 | 834 | echo "<table>\n"; |
| 835 | 835 | echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strpassword']}</th>\n"; |
| 836 | 836 | echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"", |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | // Display domain info |
| 278 | - echo '<form action="'.SUBFOLDER."/src/views/domains.php\" method=\"post\">\n"; |
|
| 278 | + echo '<form action="' . SUBFOLDER . "/src/views/domains.php\" method=\"post\">\n"; |
|
| 279 | 279 | echo "<table>\n"; |
| 280 | 280 | echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$lang['strname']}</th>\n"; |
| 281 | 281 | echo '<td class="data1">', $misc->printVal($domaindata->fields['domname']), "</td></tr>\n"; |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | $this->printTitle($lang['straddcheck'], 'pg.constraint.check'); |
| 331 | 331 | $this->printMsg($msg); |
| 332 | 332 | |
| 333 | - echo '<form action="'.SUBFOLDER."/src/views/domains.php\" method=\"post\">\n"; |
|
| 333 | + echo '<form action="' . SUBFOLDER . "/src/views/domains.php\" method=\"post\">\n"; |
|
| 334 | 334 | echo "<table>\n"; |
| 335 | 335 | echo "<tr><th class=\"data\">{$lang['strname']}</th>\n"; |
| 336 | 336 | echo "<th class=\"data required\">{$lang['strdefinition']}</th></tr>\n"; |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | |
| 381 | 381 | echo '<p>', sprintf($lang['strconfdropconstraint'], $misc->printVal($_REQUEST['constraint']), |
| 382 | 382 | $misc->printVal($_REQUEST['domain'])), "</p>\n"; |
| 383 | - echo '<form action="'.SUBFOLDER."/src/views/domains.php\" method=\"post\">\n"; |
|
| 383 | + echo '<form action="' . SUBFOLDER . "/src/views/domains.php\" method=\"post\">\n"; |
|
| 384 | 384 | echo "<input type=\"hidden\" name=\"action\" value=\"drop_con\" />\n"; |
| 385 | 385 | echo '<input type="hidden" name="domain" value="', htmlspecialchars($_REQUEST['domain']), "\" />\n"; |
| 386 | 386 | echo '<input type="hidden" name="constraint" value="', htmlspecialchars($_REQUEST['constraint']), "\" />\n"; |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | $this->printTitle($lang['strdrop'], 'pg.domain.drop'); |
| 547 | 547 | |
| 548 | 548 | echo '<p>', sprintf($lang['strconfdropdomain'], $misc->printVal($_REQUEST['domain'])), "</p>\n"; |
| 549 | - echo '<form action="'.SUBFOLDER."/src/views/domains.php\" method=\"post\">\n"; |
|
| 549 | + echo '<form action="' . SUBFOLDER . "/src/views/domains.php\" method=\"post\">\n"; |
|
| 550 | 550 | echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /><label for=\"cascade\">{$lang['strcascade']}</label></p>\n"; |
| 551 | 551 | echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 552 | 552 | echo '<input type="hidden" name="domain" value="', htmlspecialchars($_REQUEST['domain']), "\" />\n"; |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | $this->printTitle($lang['strcreatedomain'], 'pg.domain.create'); |
| 605 | 605 | $this->printMsg($msg); |
| 606 | 606 | |
| 607 | - echo '<form action="'.SUBFOLDER."/src/views/domains.php\" method=\"post\">\n"; |
|
| 607 | + echo '<form action="' . SUBFOLDER . "/src/views/domains.php\" method=\"post\">\n"; |
|
| 608 | 608 | echo "<table>\n"; |
| 609 | 609 | echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$lang['strname']}</th>\n"; |
| 610 | 610 | echo "<td class=\"data1\"><input name=\"domname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $lang = $this->lang; |
| 83 | 83 | $data = $misc->getDatabaseAccessor(); |
| 84 | 84 | |
| 85 | - $renderUseExpires = function ($val) use ($lang) { |
|
| 85 | + $renderUseExpires = function($val) use ($lang) { |
|
| 86 | 86 | return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val); |
| 87 | 87 | }; |
| 88 | 88 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | $_POST['confirm'] = ''; |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | - echo '<form action="'.SUBFOLDER."/src/views/users.php\" method=\"post\">\n"; |
|
| 247 | + echo '<form action="' . SUBFOLDER . "/src/views/users.php\" method=\"post\">\n"; |
|
| 248 | 248 | echo "<table>\n"; |
| 249 | 249 | echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strpassword']}</th>\n"; |
| 250 | 250 | echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"", |
@@ -317,10 +317,10 @@ discard block |
||
| 317 | 317 | $_POST['formPassword'] = ''; |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | - echo '<form action="'.SUBFOLDER."/src/views/users.php\" method=\"post\">\n"; |
|
| 320 | + echo '<form action="' . SUBFOLDER . "/src/views/users.php\" method=\"post\">\n"; |
|
| 321 | 321 | echo "<table>\n"; |
| 322 | 322 | echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strusername']}</th>\n"; |
| 323 | - echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"newname\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"".htmlspecialchars($_POST['newname']).'" />' : $misc->printVal($userdata->fields['usename'])), "</td>\n\t</tr>\n"; |
|
| 323 | + echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"newname\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . htmlspecialchars($_POST['newname']) . '" />' : $misc->printVal($userdata->fields['usename'])), "</td>\n\t</tr>\n"; |
|
| 324 | 324 | echo "\t<tr>\n\t\t<th class=\"data left\"><label for=\"formSuper\">{$lang['strsuper']}</label></th>\n"; |
| 325 | 325 | echo "\t\t<td class=\"data1\"><input type=\"checkbox\" id=\"formSuper\" name=\"formSuper\"", |
| 326 | 326 | (isset($_POST['formSuper'])) ? ' checked="checked"' : '', " /></td>\n\t</tr>\n"; |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | |
| 392 | 392 | echo '<p>', sprintf($lang['strconfdropuser'], $misc->printVal($_REQUEST['username'])), "</p>\n"; |
| 393 | 393 | |
| 394 | - echo '<form action="'.SUBFOLDER."/src/views/users.php\" method=\"post\">\n"; |
|
| 394 | + echo '<form action="' . SUBFOLDER . "/src/views/users.php\" method=\"post\">\n"; |
|
| 395 | 395 | echo "<p><input type=\"hidden\" name=\"action\" value=\"drop\" />\n"; |
| 396 | 396 | echo '<input type="hidden" name="username" value="', htmlspecialchars($_REQUEST['username']), "\" />\n"; |
| 397 | 397 | echo $misc->form; |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | $this->printTitle($lang['strcreateuser'], 'pg.user.create'); |
| 439 | 439 | $this->printMsg($msg); |
| 440 | 440 | |
| 441 | - echo '<form action="'.SUBFOLDER."/src/views/users.php\" method=\"post\">\n"; |
|
| 441 | + echo '<form action="' . SUBFOLDER . "/src/views/users.php\" method=\"post\">\n"; |
|
| 442 | 442 | echo "<table>\n"; |
| 443 | 443 | echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strusername']}</th>\n"; |
| 444 | 444 | echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formUsername\" value=\"", htmlspecialchars($_POST['formUsername']), "\" /></td>\n\t</tr>\n"; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $data = $misc->getDatabaseAccessor(); |
| 30 | 30 | |
| 31 | - $this->printHeader('M '.$lang['strviews']); |
|
| 31 | + $this->printHeader('M ' . $lang['strviews']); |
|
| 32 | 32 | $this->printBody(); |
| 33 | 33 | |
| 34 | 34 | switch ($action) { |
@@ -111,9 +111,9 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | $columns = [ |
| 113 | 113 | 'matview' => [ |
| 114 | - 'title' => 'M '.$lang['strview'], |
|
| 114 | + 'title' => 'M ' . $lang['strview'], |
|
| 115 | 115 | 'field' => Decorator::field('relname'), |
| 116 | - 'url' => SUBFOLDER."/redirect/matview?{$misc->href}&", |
|
| 116 | + 'url' => SUBFOLDER . "/redirect/matview?{$misc->href}&", |
|
| 117 | 117 | 'vars' => ['matview' => 'relname'], |
| 118 | 118 | ], |
| 119 | 119 | 'owner' => [ |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | |
| 302 | 302 | $attrs = $data->getTableAttributes($_REQUEST['matview']); |
| 303 | 303 | |
| 304 | - echo '<form action="'.SUBFOLDER.'/src/views/'.$this->script.'" method="post" id="selectform">'; |
|
| 304 | + echo '<form action="' . SUBFOLDER . '/src/views/' . $this->script . '" method="post" id="selectform">'; |
|
| 305 | 305 | echo "\n"; |
| 306 | 306 | |
| 307 | 307 | if ($attrs->recordCount() > 0) { |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | $this->printTrail('getTrail'); |
| 435 | 435 | $this->printTitle($lang['strdrop'], 'pg.matview.drop'); |
| 436 | 436 | |
| 437 | - echo '<form action="'.SUBFOLDER."/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 437 | + echo '<form action="' . SUBFOLDER . "/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 438 | 438 | |
| 439 | 439 | //If multi drop |
| 440 | 440 | if (isset($_REQUEST['ma'])) { |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | } |
| 555 | 555 | asort($arrFields); |
| 556 | 556 | |
| 557 | - echo '<form action="'.SUBFOLDER."/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 557 | + echo '<form action="' . SUBFOLDER . "/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 558 | 558 | echo "<table>\n"; |
| 559 | 559 | echo "<tr><th class=\"data\">{$lang['strviewname']}</th></tr>"; |
| 560 | 560 | echo "<tr>\n<td class=\"data1\">\n"; |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create_wiz\" />\n"; |
| 634 | 634 | |
| 635 | 635 | foreach ($arrSelTables as $curTable) { |
| 636 | - echo '<input type="hidden" name="formTables[]" value="'.htmlspecialchars(serialize($curTable))."\" />\n"; |
|
| 636 | + echo '<input type="hidden" name="formTables[]" value="' . htmlspecialchars(serialize($curTable)) . "\" />\n"; |
|
| 637 | 637 | } |
| 638 | 638 | |
| 639 | 639 | echo $misc->form; |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | $this->printTitle($lang['strcreateviewwiz'], 'pg.matview.create'); |
| 660 | 660 | $this->printMsg($msg); |
| 661 | 661 | |
| 662 | - echo '<form action="'.SUBFOLDER."/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 662 | + echo '<form action="' . SUBFOLDER . "/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 663 | 663 | echo "<table>\n"; |
| 664 | 664 | echo "<tr><th class=\"data\">{$lang['strtables']}</th></tr>"; |
| 665 | 665 | echo "<tr>\n<td class=\"data1\">\n"; |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | $arrTmp = []; |
| 670 | 670 | $arrTmp['schemaname'] = $tables->fields['nspname']; |
| 671 | 671 | $arrTmp['tablename'] = $tables->fields['relname']; |
| 672 | - $arrTables[$tables->fields['nspname'].'.'.$tables->fields['relname']] = serialize($arrTmp); |
|
| 672 | + $arrTables[$tables->fields['nspname'] . '.' . $tables->fields['relname']] = serialize($arrTmp); |
|
| 673 | 673 | $tables->moveNext(); |
| 674 | 674 | } |
| 675 | 675 | echo \PHPPgAdmin\XHtml\HTMLController::printCombo($arrTables, 'formTables[]', false, '', true); |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | $this->printTitle($lang['strcreateview'], 'pg.matview.create'); |
| 713 | 713 | $this->printMsg($msg); |
| 714 | 714 | |
| 715 | - echo '<form action="'.SUBFOLDER."/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 715 | + echo '<form action="' . SUBFOLDER . "/src/views/materializedviews.php\" method=\"post\">\n"; |
|
| 716 | 716 | echo "<table style=\"width: 100%\">\n"; |
| 717 | 717 | echo "\t<tr>\n\t\t<th class=\"data left required\">{$lang['strname']}</th>\n"; |
| 718 | 718 | echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | |
| 837 | 837 | // Make sure for multi-column foreign keys that we use a table alias tables joined to more than once |
| 838 | 838 | // This can (and should be) more optimized for multi-column foreign keys |
| 839 | - $adj_tbl2 = in_array($tbl2, $arrUsedTbls) ? "$tbl2 AS alias_ppa_".mktime() : $tbl2; |
|
| 839 | + $adj_tbl2 = in_array($tbl2, $arrUsedTbls) ? "$tbl2 AS alias_ppa_" . mktime() : $tbl2; |
|
| 840 | 840 | |
| 841 | 841 | $linkFields .= strlen($linkFields) ? "{$curLink['operator']} $adj_tbl2 ON (\"{$arrLeftLink['schemaname']}\".\"{$arrLeftLink['tablename']}\".\"{$arrLeftLink['fieldname']}\" = \"{$arrRightLink['schemaname']}\".\"{$arrRightLink['tablename']}\".\"{$arrRightLink['fieldname']}\") " |
| 842 | 842 | : "$tbl1 {$curLink['operator']} $adj_tbl2 ON (\"{$arrLeftLink['schemaname']}\".\"{$arrLeftLink['tablename']}\".\"{$arrLeftLink['fieldname']}\" = \"{$arrRightLink['schemaname']}\".\"{$arrRightLink['tablename']}\".\"{$arrRightLink['fieldname']}\") "; |
@@ -882,7 +882,7 @@ discard block |
||
| 882 | 882 | |
| 883 | 883 | //add where from additional conditions |
| 884 | 884 | if (strlen($addConditions)) { |
| 885 | - $viewQuery .= ' WHERE '.$addConditions; |
|
| 885 | + $viewQuery .= ' WHERE ' . $addConditions; |
|
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | $status = $data->createView($_POST['formView'], $viewQuery, false, $_POST['formComment']); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $default_html = $this->printTabs($misc->getNavTabs('popup'), 'sql', false); |
| 70 | 70 | |
| 71 | - $default_html .= '<form action="'.SUBFOLDER.'/src/views/sql.php" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="detail">'; |
|
| 71 | + $default_html .= '<form action="' . SUBFOLDER . '/src/views/sql.php" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="detail">'; |
|
| 72 | 72 | $default_html .= "\n"; |
| 73 | 73 | $default_html .= $this->_printConnection('sql'); |
| 74 | 74 | |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | $default_html .= '<label>'; |
| 79 | 79 | $default_html .= $this->misc->printHelp($lang['strsearchpath'], 'pg.schema.search_path', false); |
| 80 | 80 | |
| 81 | - $default_html .= ': <input type="text" name="search_path" size="50" value="'.$search_path.'" />'; |
|
| 81 | + $default_html .= ': <input type="text" name="search_path" size="50" value="' . $search_path . '" />'; |
|
| 82 | 82 | $default_html .= "</label>\n"; |
| 83 | 83 | $default_html .= "</div>\n"; |
| 84 | 84 | |
| 85 | 85 | $default_html .= '<div id="queryedition" style="padding:1%;width:98%;float:left;">'; |
| 86 | 86 | $default_html .= "\n"; |
| 87 | - $default_html .= '<textarea style="width:98%;" rows="10" cols="50" name="query" id="query" resizable="true">'.$sqlquery.'</textarea>'; |
|
| 87 | + $default_html .= '<textarea style="width:98%;" rows="10" cols="50" name="query" id="query" resizable="true">' . $sqlquery . '</textarea>'; |
|
| 88 | 88 | $default_html .= "\n"; |
| 89 | 89 | $default_html .= "</div>\n"; |
| 90 | 90 | |
@@ -94,20 +94,20 @@ discard block |
||
| 94 | 94 | $max_size = $misc->inisizeToBytes(ini_get('upload_max_filesize')); |
| 95 | 95 | if (is_float($max_size) && $max_size > 0) { |
| 96 | 96 | $default_html .= '<p>'; |
| 97 | - $default_html .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.$max_size.'" />'; |
|
| 97 | + $default_html .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . $max_size . '" />'; |
|
| 98 | 98 | $default_html .= "\n"; |
| 99 | - $default_html .= '<label for="script">'.$lang['struploadscript'].'</label>'; |
|
| 99 | + $default_html .= '<label for="script">' . $lang['struploadscript'] . '</label>'; |
|
| 100 | 100 | $default_html .= ' <input id="script" name="script" type="file" /></p>'; |
| 101 | 101 | $default_html .= "</p>\n"; |
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | $checked = (isset($_REQUEST['paginate']) ? ' checked="checked"' : ''); |
| 105 | 105 | $default_html .= '<p>'; |
| 106 | - $default_html .= '<label for="paginate"><input type="checkbox" id="paginate" name="paginate"'.$checked.' /> '.$lang['strpaginate'].'</label>'; |
|
| 106 | + $default_html .= '<label for="paginate"><input type="checkbox" id="paginate" name="paginate"' . $checked . ' /> ' . $lang['strpaginate'] . '</label>'; |
|
| 107 | 107 | $default_html .= "</p>\n"; |
| 108 | - $default_html .= '<p><input type="submit" name="execute" accesskey="r" value="'.$lang['strexecute'].'" />'; |
|
| 108 | + $default_html .= '<p><input type="submit" name="execute" accesskey="r" value="' . $lang['strexecute'] . '" />'; |
|
| 109 | 109 | $default_html .= "\n"; |
| 110 | - $default_html .= '<input type="reset" accesskey="q" value="'.$lang['strreset'].'" /></p>'; |
|
| 110 | + $default_html .= '<input type="reset" accesskey="q" value="' . $lang['strreset'] . '" /></p>'; |
|
| 111 | 111 | $default_html .= "\n"; |
| 112 | 112 | $default_html .= '</form>'; |
| 113 | 113 | $default_html .= "\n"; |
@@ -130,8 +130,8 @@ discard block |
||
| 130 | 130 | // The javascript action on the select box reloads the |
| 131 | 131 | // popup whenever the server or database is changed. |
| 132 | 132 | // This ensures that the correct page encoding is used. |
| 133 | - $onchange = "onchange=\"location.href='".SUBFOLDER.'/sqledit/'. |
|
| 134 | - urlencode($action)."?server=' + encodeURI(server.options[server.selectedIndex].value) + '&database=' + encodeURI(database.options[database.selectedIndex].value) + "; |
|
| 133 | + $onchange = "onchange=\"location.href='" . SUBFOLDER . '/sqledit/' . |
|
| 134 | + urlencode($action) . "?server=' + encodeURI(server.options[server.selectedIndex].value) + '&database=' + encodeURI(database.options[database.selectedIndex].value) + "; |
|
| 135 | 135 | |
| 136 | 136 | // The exact URL to reload to is different between SQL and Find mode, however. |
| 137 | 137 | if ($action == 'find') { |
@@ -165,29 +165,29 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | $default_html .= "<form action=\"database.php\" method=\"post\" target=\"detail\">\n"; |
| 167 | 167 | $default_html .= $this->_printConnection('find'); |
| 168 | - $default_html .= '<p><input class="focusme" name="term" value="'.htmlspecialchars($_REQUEST['term'])."\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" />\n"; |
|
| 168 | + $default_html .= '<p><input class="focusme" name="term" value="' . htmlspecialchars($_REQUEST['term']) . "\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" />\n"; |
|
| 169 | 169 | |
| 170 | 170 | // Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities |
| 171 | 171 | $default_html .= "<select name=\"filter\">\n"; |
| 172 | - $default_html .= "\t<option value=\"\"".($_REQUEST['filter'] == '' ? ' selected="selected" ' : '').">{$lang['strallobjects']}</option>\n"; |
|
| 173 | - $default_html .= "\t<option value=\"SCHEMA\"".($_REQUEST['filter'] == 'SCHEMA' ? ' selected="selected" ' : '').">{$lang['strschemas']}</option>\n"; |
|
| 174 | - $default_html .= "\t<option value=\"TABLE\"".($_REQUEST['filter'] == 'TABLE' ? ' selected="selected" ' : '').">{$lang['strtables']}</option>\n"; |
|
| 175 | - $default_html .= "\t<option value=\"VIEW\"".($_REQUEST['filter'] == 'VIEW' ? ' selected="selected" ' : '').">{$lang['strviews']}</option>\n"; |
|
| 176 | - $default_html .= "\t<option value=\"SEQUENCE\"".($_REQUEST['filter'] == 'SEQUENCE' ? ' selected="selected" ' : '').">{$lang['strsequences']}</option>\n"; |
|
| 177 | - $default_html .= "\t<option value=\"COLUMN\"".($_REQUEST['filter'] == 'COLUMN' ? ' selected="selected" ' : '').">{$lang['strcolumns']}</option>\n"; |
|
| 178 | - $default_html .= "\t<option value=\"RULE\"".($_REQUEST['filter'] == 'RULE' ? ' selected="selected" ' : '').">{$lang['strrules']}</option>\n"; |
|
| 179 | - $default_html .= "\t<option value=\"INDEX\"".($_REQUEST['filter'] == 'INDEX' ? ' selected="selected" ' : '').">{$lang['strindexes']}</option>\n"; |
|
| 180 | - $default_html .= "\t<option value=\"TRIGGER\"".($_REQUEST['filter'] == 'TRIGGER' ? ' selected="selected" ' : '').">{$lang['strtriggers']}</option>\n"; |
|
| 181 | - $default_html .= "\t<option value=\"CONSTRAINT\"".($_REQUEST['filter'] == 'CONSTRAINT' ? ' selected="selected" ' : '').">{$lang['strconstraints']}</option>\n"; |
|
| 182 | - $default_html .= "\t<option value=\"FUNCTION\"".($_REQUEST['filter'] == 'FUNCTION' ? ' selected="selected" ' : '').">{$lang['strfunctions']}</option>\n"; |
|
| 183 | - $default_html .= "\t<option value=\"DOMAIN\"".($_REQUEST['filter'] == 'DOMAIN' ? ' selected="selected" ' : '').">{$lang['strdomains']}</option>\n"; |
|
| 172 | + $default_html .= "\t<option value=\"\"" . ($_REQUEST['filter'] == '' ? ' selected="selected" ' : '') . ">{$lang['strallobjects']}</option>\n"; |
|
| 173 | + $default_html .= "\t<option value=\"SCHEMA\"" . ($_REQUEST['filter'] == 'SCHEMA' ? ' selected="selected" ' : '') . ">{$lang['strschemas']}</option>\n"; |
|
| 174 | + $default_html .= "\t<option value=\"TABLE\"" . ($_REQUEST['filter'] == 'TABLE' ? ' selected="selected" ' : '') . ">{$lang['strtables']}</option>\n"; |
|
| 175 | + $default_html .= "\t<option value=\"VIEW\"" . ($_REQUEST['filter'] == 'VIEW' ? ' selected="selected" ' : '') . ">{$lang['strviews']}</option>\n"; |
|
| 176 | + $default_html .= "\t<option value=\"SEQUENCE\"" . ($_REQUEST['filter'] == 'SEQUENCE' ? ' selected="selected" ' : '') . ">{$lang['strsequences']}</option>\n"; |
|
| 177 | + $default_html .= "\t<option value=\"COLUMN\"" . ($_REQUEST['filter'] == 'COLUMN' ? ' selected="selected" ' : '') . ">{$lang['strcolumns']}</option>\n"; |
|
| 178 | + $default_html .= "\t<option value=\"RULE\"" . ($_REQUEST['filter'] == 'RULE' ? ' selected="selected" ' : '') . ">{$lang['strrules']}</option>\n"; |
|
| 179 | + $default_html .= "\t<option value=\"INDEX\"" . ($_REQUEST['filter'] == 'INDEX' ? ' selected="selected" ' : '') . ">{$lang['strindexes']}</option>\n"; |
|
| 180 | + $default_html .= "\t<option value=\"TRIGGER\"" . ($_REQUEST['filter'] == 'TRIGGER' ? ' selected="selected" ' : '') . ">{$lang['strtriggers']}</option>\n"; |
|
| 181 | + $default_html .= "\t<option value=\"CONSTRAINT\"" . ($_REQUEST['filter'] == 'CONSTRAINT' ? ' selected="selected" ' : '') . ">{$lang['strconstraints']}</option>\n"; |
|
| 182 | + $default_html .= "\t<option value=\"FUNCTION\"" . ($_REQUEST['filter'] == 'FUNCTION' ? ' selected="selected" ' : '') . ">{$lang['strfunctions']}</option>\n"; |
|
| 183 | + $default_html .= "\t<option value=\"DOMAIN\"" . ($_REQUEST['filter'] == 'DOMAIN' ? ' selected="selected" ' : '') . ">{$lang['strdomains']}</option>\n"; |
|
| 184 | 184 | if ($conf['show_advanced']) { |
| 185 | - $default_html .= "\t<option value=\"AGGREGATE\"".($_REQUEST['filter'] == 'AGGREGATE' ? ' selected="selected" ' : '').">{$lang['straggregates']}</option>\n"; |
|
| 186 | - $default_html .= "\t<option value=\"TYPE\"".($_REQUEST['filter'] == 'TYPE' ? ' selected="selected" ' : '').">{$lang['strtypes']}</option>\n"; |
|
| 187 | - $default_html .= "\t<option value=\"OPERATOR\"".($_REQUEST['filter'] == 'OPERATOR' ? ' selected="selected" ' : '').">{$lang['stroperators']}</option>\n"; |
|
| 188 | - $default_html .= "\t<option value=\"OPCLASS\"".($_REQUEST['filter'] == 'OPCLASS' ? ' selected="selected" ' : '').">{$lang['stropclasses']}</option>\n"; |
|
| 189 | - $default_html .= "\t<option value=\"CONVERSION\"".($_REQUEST['filter'] == 'CONVERSION' ? ' selected="selected" ' : '').">{$lang['strconversions']}</option>\n"; |
|
| 190 | - $default_html .= "\t<option value=\"LANGUAGE\"".($_REQUEST['filter'] == 'LANGUAGE' ? ' selected="selected" ' : '').">{$lang['strlanguages']}</option>\n"; |
|
| 185 | + $default_html .= "\t<option value=\"AGGREGATE\"" . ($_REQUEST['filter'] == 'AGGREGATE' ? ' selected="selected" ' : '') . ">{$lang['straggregates']}</option>\n"; |
|
| 186 | + $default_html .= "\t<option value=\"TYPE\"" . ($_REQUEST['filter'] == 'TYPE' ? ' selected="selected" ' : '') . ">{$lang['strtypes']}</option>\n"; |
|
| 187 | + $default_html .= "\t<option value=\"OPERATOR\"" . ($_REQUEST['filter'] == 'OPERATOR' ? ' selected="selected" ' : '') . ">{$lang['stroperators']}</option>\n"; |
|
| 188 | + $default_html .= "\t<option value=\"OPCLASS\"" . ($_REQUEST['filter'] == 'OPCLASS' ? ' selected="selected" ' : '') . ">{$lang['stropclasses']}</option>\n"; |
|
| 189 | + $default_html .= "\t<option value=\"CONVERSION\"" . ($_REQUEST['filter'] == 'CONVERSION' ? ' selected="selected" ' : '') . ">{$lang['strconversions']}</option>\n"; |
|
| 190 | + $default_html .= "\t<option value=\"LANGUAGE\"" . ($_REQUEST['filter'] == 'LANGUAGE' ? ' selected="selected" ' : '') . ">{$lang['strlanguages']}</option>\n"; |
|
| 191 | 191 | } |
| 192 | 192 | $default_html .= "</select>\n"; |
| 193 | 193 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | 'function' => [ |
| 93 | 93 | 'title' => $lang['strfunction'], |
| 94 | 94 | 'field' => Decorator::field('proproto'), |
| 95 | - 'url' => SUBFOLDER."/redirect/function?action=properties&{$misc->href}&", |
|
| 95 | + 'url' => SUBFOLDER . "/redirect/function?action=properties&{$misc->href}&", |
|
| 96 | 96 | 'vars' => ['function' => 'proproto', 'function_oid' => 'prooid'], |
| 97 | 97 | ], |
| 98 | 98 | 'returns' => [ |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | } |
| 388 | 388 | if (isset($names_arr[$i]) && $names_arr[$i] != '') { |
| 389 | 389 | $data->fieldClean($names_arr[$i]); |
| 390 | - $args .= '"'.$names_arr[$i].'" '; |
|
| 390 | + $args .= '"' . $names_arr[$i] . '" '; |
|
| 391 | 391 | } |
| 392 | 392 | $args .= $args_arr[$i]; |
| 393 | 393 | } |
@@ -395,8 +395,8 @@ discard block |
||
| 395 | 395 | $args = $fndata->fields['proarguments']; |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | - $func_full = $fndata->fields['proname'].'('.$fndata->fields['proarguments'].')'; |
|
| 399 | - echo '<form action="'.SUBFOLDER."/src/views/functions.php\" method=\"post\">\n"; |
|
| 398 | + $func_full = $fndata->fields['proname'] . '(' . $fndata->fields['proarguments'] . ')'; |
|
| 399 | + echo '<form action="' . SUBFOLDER . "/src/views/functions.php\" method=\"post\">\n"; |
|
| 400 | 400 | echo "<table style=\"width: 90%\">\n"; |
| 401 | 401 | echo "<tr>\n"; |
| 402 | 402 | echo "<th class=\"data required\">{$lang['strschema']}</th>\n"; |
@@ -477,8 +477,8 @@ discard block |
||
| 477 | 477 | // Display function cost options |
| 478 | 478 | if ($data->hasFunctionCosting()) { |
| 479 | 479 | echo "<tr><th class=\"data required\" colspan=\"5\">{$lang['strfunctioncosting']}</th></tr>\n"; |
| 480 | - echo "<td class=\"data1\" colspan=\"2\">{$lang['strexecutioncost']}: <input name=\"formCost\" size=\"16\" value=\"". |
|
| 481 | - htmlspecialchars($_POST['formCost']).'" /></td>'; |
|
| 480 | + echo "<td class=\"data1\" colspan=\"2\">{$lang['strexecutioncost']}: <input name=\"formCost\" size=\"16\" value=\"" . |
|
| 481 | + htmlspecialchars($_POST['formCost']) . '" /></td>'; |
|
| 482 | 482 | echo "<td class=\"data1\" colspan=\"2\">{$lang['strresultrows']}: <input name=\"formRows\" size=\"16\" value=\"", |
| 483 | 483 | htmlspecialchars($_POST['formRows']), '"', (!$fndata->fields['proretset']) ? 'disabled' : '', '/></td>'; |
| 484 | 484 | } |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | } |
| 584 | 584 | if (isset($names_arr[$i]) && $names_arr[$i] != '') { |
| 585 | 585 | $data->fieldClean($names_arr[$i]); |
| 586 | - $args .= '"'.$names_arr[$i].'" '; |
|
| 586 | + $args .= '"' . $names_arr[$i] . '" '; |
|
| 587 | 587 | } |
| 588 | 588 | $args .= $args_arr[$i]; |
| 589 | 589 | } |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | $funcdata->fields['proretset'] = $data->phpBool($funcdata->fields['proretset']); |
| 600 | - $func_full = $funcdata->fields['proname'].'('.$funcdata->fields['proarguments'].')'; |
|
| 600 | + $func_full = $funcdata->fields['proname'] . '(' . $funcdata->fields['proarguments'] . ')'; |
|
| 601 | 601 | echo "<table style=\"width: 90%\">\n"; |
| 602 | 602 | echo "<tr><th class=\"data\">{$lang['strfunction']}</th>\n"; |
| 603 | 603 | echo "<th class=\"data\">{$lang['strarguments']}</th>\n"; |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | $this->printTrail('schema'); |
| 734 | 734 | $this->printTitle($lang['strdrop'], 'pg.function.drop'); |
| 735 | 735 | |
| 736 | - echo '<form action="'.SUBFOLDER."/src/views/functions.php\" method=\"post\">\n"; |
|
| 736 | + echo '<form action="' . SUBFOLDER . "/src/views/functions.php\" method=\"post\">\n"; |
|
| 737 | 737 | |
| 738 | 738 | //If multi drop |
| 739 | 739 | if (isset($_REQUEST['ma'])) { |
@@ -880,16 +880,16 @@ discard block |
||
| 880 | 880 | $szSelected = ' selected="selected"'; |
| 881 | 881 | } |
| 882 | 882 | /* this variable is include in the JS code bellow, so we need to ENT_QUOTES */ |
| 883 | - $szTypes .= '<option value="'.htmlspecialchars($types->fields['typname'], ENT_QUOTES)."\"{$szSelected}>"; |
|
| 884 | - $szTypes .= htmlspecialchars($types->fields['typname'], ENT_QUOTES).'</option>'; |
|
| 883 | + $szTypes .= '<option value="' . htmlspecialchars($types->fields['typname'], ENT_QUOTES) . "\"{$szSelected}>"; |
|
| 884 | + $szTypes .= htmlspecialchars($types->fields['typname'], ENT_QUOTES) . '</option>'; |
|
| 885 | 885 | $types->moveNext(); |
| 886 | 886 | } |
| 887 | 887 | |
| 888 | - $szFunctionName = "<td class=\"data1\"><input name=\"formFunction\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"". |
|
| 889 | - htmlspecialchars($_POST['formFunction']).'" /></td>'; |
|
| 888 | + $szFunctionName = "<td class=\"data1\"><input name=\"formFunction\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"" . |
|
| 889 | + htmlspecialchars($_POST['formFunction']) . '" /></td>'; |
|
| 890 | 890 | |
| 891 | - $szArguments = '<td class="data1"><input name="formArguments" style="width:100%;" size="16" value="'. |
|
| 892 | - htmlspecialchars($_POST['formArguments']).'" /></td>'; |
|
| 891 | + $szArguments = '<td class="data1"><input name="formArguments" style="width:100%;" size="16" value="' . |
|
| 892 | + htmlspecialchars($_POST['formArguments']) . '" /></td>'; |
|
| 893 | 893 | |
| 894 | 894 | $szSetOfSelected = ''; |
| 895 | 895 | $szNotSetOfSelected = ''; |
@@ -904,7 +904,7 @@ discard block |
||
| 904 | 904 | $szReturns .= "<option value=\"SETOF\"{$szSetOfSelected}>SETOF</option>"; |
| 905 | 905 | $szReturns .= '</select>'; |
| 906 | 906 | |
| 907 | - $szReturns .= '<select name="formReturns">'.$szTypes.'</select>'; |
|
| 907 | + $szReturns .= '<select name="formReturns">' . $szTypes . '</select>'; |
|
| 908 | 908 | |
| 909 | 909 | // Create string array type selector |
| 910 | 910 | |
@@ -924,7 +924,7 @@ discard block |
||
| 924 | 924 | // Create string for language |
| 925 | 925 | $szLanguage = '<td class="data1">'; |
| 926 | 926 | if ($fnlang == 'c' || $fnlang == 'internal') { |
| 927 | - $szLanguage .= $_POST['formLanguage']."\n"; |
|
| 927 | + $szLanguage .= $_POST['formLanguage'] . "\n"; |
|
| 928 | 928 | $szLanguage .= "<input type=\"hidden\" name=\"formLanguage\" value=\"{$_POST['formLanguage']}\" />\n"; |
| 929 | 929 | } else { |
| 930 | 930 | $szLanguage .= "<select name=\"formLanguage\">\n"; |
@@ -934,8 +934,8 @@ discard block |
||
| 934 | 934 | $szSelected = ' selected="selected"'; |
| 935 | 935 | } |
| 936 | 936 | if (strtolower($langs->fields['lanname']) != 'c' && strtolower($langs->fields['lanname']) != 'internal') { |
| 937 | - $szLanguage .= '<option value="'.htmlspecialchars($langs->fields['lanname'])."\"{$szSelected}>\n". |
|
| 938 | - $misc->printVal($langs->fields['lanname']).'</option>'; |
|
| 937 | + $szLanguage .= '<option value="' . htmlspecialchars($langs->fields['lanname']) . "\"{$szSelected}>\n" . |
|
| 938 | + $misc->printVal($langs->fields['lanname']) . '</option>'; |
|
| 939 | 939 | } |
| 940 | 940 | |
| 941 | 941 | $langs->moveNext(); |
@@ -967,7 +967,7 @@ discard block |
||
| 967 | 967 | } |
| 968 | 968 | $szJSAddTR = "<tr id=\"parent_add_tr\" onclick=\"addArg();\" onmouseover=\"this.style.cursor='pointer'\">\n<td style=\"text-align: right\" colspan=\"6\" class=\"data3\"><table><tr><td class=\"data3\"><img src=\"{$szImgPath}/AddArguments.png\" alt=\"Add Argument\" /></td><td class=\"data3\"><span style=\"font-size: 8pt\">{$lang['strargadd']}</span></td></tr></table></td>\n</tr>\n"; |
| 969 | 969 | |
| 970 | - echo '<script src="'.SUBFOLDER."/js/functions.js\" type=\"text/javascript\"></script> |
|
| 970 | + echo '<script src="' . SUBFOLDER . "/js/functions.js\" type=\"text/javascript\"></script> |
|
| 971 | 971 | <script type=\"text/javascript\"> |
| 972 | 972 | //<![CDATA[ |
| 973 | 973 | var g_types_select = '<select name=\"formArgType[]\">{$szTypes}</select>{$szArgReturns}'; |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | //]]> |
| 985 | 985 | </script> |
| 986 | 986 | "; |
| 987 | - echo '<form action="'.SUBFOLDER."/src/views//views/functions.php\" method=\"post\">\n"; |
|
| 987 | + echo '<form action="' . SUBFOLDER . "/src/views//views/functions.php\" method=\"post\">\n"; |
|
| 988 | 988 | echo "<table><tbody id=\"args_table\">\n"; |
| 989 | 989 | echo "<tr><th class=\"data required\">{$lang['strname']}</th>\n"; |
| 990 | 990 | echo "<th class=\"data required\" colspan=\"2\">{$lang['strreturns']}</th>\n"; |
@@ -1027,10 +1027,10 @@ discard block |
||
| 1027 | 1027 | // Display function cost options |
| 1028 | 1028 | if ($data->hasFunctionCosting()) { |
| 1029 | 1029 | echo "<tr><th class=\"data required\" colspan=\"4\">{$lang['strfunctioncosting']}</th></tr>\n"; |
| 1030 | - echo "<td class=\"data1\" colspan=\"2\">{$lang['strexecutioncost']}: <input name=\"formCost\" size=\"16\" value=\"". |
|
| 1031 | - htmlspecialchars($_POST['formCost']).'" /></td>'; |
|
| 1032 | - echo "<td class=\"data1\" colspan=\"2\">{$lang['strresultrows']}: <input name=\"formRows\" size=\"16\" value=\"". |
|
| 1033 | - htmlspecialchars($_POST['formRows']).'" /></td>'; |
|
| 1030 | + echo "<td class=\"data1\" colspan=\"2\">{$lang['strexecutioncost']}: <input name=\"formCost\" size=\"16\" value=\"" . |
|
| 1031 | + htmlspecialchars($_POST['formCost']) . '" /></td>'; |
|
| 1032 | + echo "<td class=\"data1\" colspan=\"2\">{$lang['strresultrows']}: <input name=\"formRows\" size=\"16\" value=\"" . |
|
| 1033 | + htmlspecialchars($_POST['formRows']) . '" /></td>'; |
|
| 1034 | 1034 | } |
| 1035 | 1035 | |
| 1036 | 1036 | // Display function properties |
@@ -1082,12 +1082,12 @@ discard block |
||
| 1082 | 1082 | |
| 1083 | 1083 | $szJS = ''; |
| 1084 | 1084 | |
| 1085 | - echo '<script src="'.SUBFOLDER.'/js/functions.js" type="text/javascript"></script>'; |
|
| 1086 | - echo '<script type="text/javascript">'.$this->buildJSData().'</script>'; |
|
| 1085 | + echo '<script src="' . SUBFOLDER . '/js/functions.js" type="text/javascript"></script>'; |
|
| 1086 | + echo '<script type="text/javascript">' . $this->buildJSData() . '</script>'; |
|
| 1087 | 1087 | if (!empty($_POST['formArgName'])) { |
| 1088 | 1088 | $szJS = $this->buildJSRows($this->buildFunctionArguments($_POST)); |
| 1089 | 1089 | } else { |
| 1090 | - $szJS = '<script type="text/javascript" src="'.SUBFOLDER.'/js/functions.js">noArgsRebuild(addArg());</script>'; |
|
| 1090 | + $szJS = '<script type="text/javascript" src="' . SUBFOLDER . '/js/functions.js">noArgsRebuild(addArg());</script>'; |
|
| 1091 | 1091 | } |
| 1092 | 1092 | |
| 1093 | 1093 | $cost = (isset($_POST['formCost'])) ? $_POST['formCost'] : null; |
@@ -1108,7 +1108,7 @@ discard block |
||
| 1108 | 1108 | } else { |
| 1109 | 1109 | // Append array symbol to type if chosen |
| 1110 | 1110 | $status = $data->createFunction($_POST['formFunction'], empty($_POST['nojs']) ? $this->buildFunctionArguments($_POST) : $_POST['formArguments'], |
| 1111 | - $_POST['formReturns'].$_POST['formArray'], $def, $_POST['formLanguage'], |
|
| 1111 | + $_POST['formReturns'] . $_POST['formArray'], $def, $_POST['formLanguage'], |
|
| 1112 | 1112 | $_POST['formProperties'], $_POST['formSetOf'] == 'SETOF', |
| 1113 | 1113 | $cost, $rows, $_POST['formComment'], false); |
| 1114 | 1114 | if ($status == 0) { |
@@ -1127,7 +1127,7 @@ discard block |
||
| 1127 | 1127 | if (isset($_POST['formArgName'])) { |
| 1128 | 1128 | $arrayArgs = []; |
| 1129 | 1129 | foreach ($arrayVars['formArgName'] as $pK => $pV) { |
| 1130 | - $arrayArgs[] = $arrayVars['formArgModes'][$pK].' '.trim($pV).' '.trim($arrayVars['formArgType'][$pK]).$arrayVars['formArgArray'][$pK]; |
|
| 1130 | + $arrayArgs[] = $arrayVars['formArgModes'][$pK] . ' ' . trim($pV) . ' ' . trim($arrayVars['formArgType'][$pK]) . $arrayVars['formArgArray'][$pK]; |
|
| 1131 | 1131 | } |
| 1132 | 1132 | |
| 1133 | 1133 | return implode(',', $arrayArgs); |
@@ -1182,7 +1182,7 @@ discard block |
||
| 1182 | 1182 | $szTypes = ''; |
| 1183 | 1183 | |
| 1184 | 1184 | while (!$arrayTypes->EOF) { |
| 1185 | - $arrayPTypes[] = "'".$arrayTypes->fields['typname']."'"; |
|
| 1185 | + $arrayPTypes[] = "'" . $arrayTypes->fields['typname'] . "'"; |
|
| 1186 | 1186 | $arrayTypes->moveNext(); |
| 1187 | 1187 | } |
| 1188 | 1188 | |
@@ -1190,9 +1190,9 @@ discard block |
||
| 1190 | 1190 | $arrayPModes[] = "'{$pV}'"; |
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | - $szTypes = 'g_main_types = new Array('.implode(',', $arrayPTypes).');'; |
|
| 1194 | - $szModes = 'g_main_modes = new Array('.implode(',', $arrayPModes).');'; |
|
| 1193 | + $szTypes = 'g_main_types = new Array(' . implode(',', $arrayPTypes) . ');'; |
|
| 1194 | + $szModes = 'g_main_modes = new Array(' . implode(',', $arrayPModes) . ');'; |
|
| 1195 | 1195 | |
| 1196 | - return $szTypes.$szModes; |
|
| 1196 | + return $szTypes . $szModes; |
|
| 1197 | 1197 | } |
| 1198 | 1198 | } |