} // fallthrough intentional // fallthrough intentional default: $seenspace = false; $squashedstring .= $mystring[$i]; } } } return $squashedstring; } /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// $mypage = page::standard(); if (!$Administrator) { $mypage->title_body('Not Permitted'); $mypage->leaf('p', 'You are not permitted to view this page. Please click <a href="index.php">here</a> to return to the Main Page.'); $mypage->finish(); } $mypage->title_body('SQL squasher'); $mypage->leaf('h3', 'SQL squasher'); if (isset($_POST['sqltosquash'])) { $mypage->leaf('p', htmlspecialchars(squash($_POST['sqltosquash'])), 'style="font-family: monospace;"'); } $mypage->opennode('form', 'action="sql_squash.php" method="POST"'); $mypage->leaf('textarea', '', 'rows=16 cols=80 name="sqltosquash"'); $mypage->opennode('p'); $mypage->emptyleaf('input', 'type="submit" value="Go"'); $mypage->text('Or, click <a href="index.php">here</a> to return to the Main Page.'); $mypage->finish();
public function summary() { $ret = parent::summary(); $ret['input'] = squash($this->input); $ret['output'] = squash($this->output); $ret['result_type'] = $this->result_type; $ret['chunk_boundary'] = $this->chunk_boundary; $ret['iterable'] = $this->iterable; return $ret; }
public function summary() { return ['kind' => 'METHOD', 'input' => squash($this->args), 'output' => squash($this->resultType), 'deterministic' => $this->deterministic]; }
$page_top->opennode('tbody', 'class="table_monospace_font"'); for ($i = 0; $i < $num_files; $i++) { $procedures_in_this_file = array(); $num_procedures_in_this_file = preg_match_all('/CREATE PROCEDURE "(.+?)".+?^END>>>>>$/ims', $files[$i], $procedures_in_this_file, PREG_SET_ORDER); $page_top->opennode('tr'); $page_top->leaf('td', $file_names[$i], 'style="font-family: monospace;"'); $page_top->leaf('td', $num_procedures_in_this_file); $page_top->closenode(); for ($j = 0; $j < $num_procedures_in_this_file; $j++) { $procedure_treated[] = false; $procedure_files[] = $i; $procedure_names[] = $procedures_in_this_file[$j][1]; if ($change_every_procedure) { $changes[] = $procedures_in_this_file[$j][1]; } $procedures[] = in_array($procedures_in_this_file[$j][1], $changes) ? squash(substr($procedures_in_this_file[$j][0], 0, -5)) : null; } } $num_procedures = count($procedure_names); $page_top->closenode(2); // tbody, table $page_top->leaf('p', 'Total ' . $num_procedures . ' procedures found in files.'); } else { $num_procedures = 0; $page_top->leaf('p', 'Detected no procedures files!', 'style="font-weight: bold; color: #FF0000;"'); } if (count(array_unique($procedure_names)) != count($procedure_names)) { $mypage->title_body('Duplicate procedure names'); $mypage->leaf('p', 'Duplicate procedure names in files. Please review files and ensure all procedure names are unique.'); $mypage->finish(); }