Skip to content

Commit

Permalink
formatting update
Browse files Browse the repository at this point in the history
  • Loading branch information
detain committed Jul 28, 2022
1 parent c386fff commit 8da7b6b
Show file tree
Hide file tree
Showing 7 changed files with 2,017 additions and 2,015 deletions.
1 change: 1 addition & 0 deletions bin/list_certs.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

include __DIR__.'/../../../../include/functions.inc.php';
function_requirements('class.GlobalSign');
$ssl = new \Detain\MyAdminGlobalSign\GlobalSign(GLOBALSIGN_USERNAME, GLOBALSIGN_PASSWORD);
Expand Down
26 changes: 13 additions & 13 deletions bin/make_cert.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
$sid = $GLOBALS['tf']->session->sessionid;
*/
if (file_exists(__DIR__.'/.make_cert.last')) {
include __DIR__.'/.make_cert.last';
include __DIR__.'/.make_cert.last';
}
$vars = ['fqdn' => 'Fully Qualified Domain Name', 'email' => 'Email Address', 'city' => 'City', 'state' => 'State (Full State Not Abbreviation)', 'country' => 'Country (2 Letters)', 'company' => 'Company', department => 'Department'];
$fout = "<?php\n";
foreach ($vars as $var => $description) {
if (isset($settings[$var])) {
fwrite(STDOUT, "$description [" . $settings[$var] . ']? ');
$t = trim(fgets(STDIN));
if ($t == '') {
$t = $settings[$var];
}
} else {
fwrite(STDOUT, "$description? ");
$t = trim(fgets(STDIN));
}
$fout .= "\$settings['{$var}'] = '{$t}';\n";
eval('$'.$var.' = "$t";');
if (isset($settings[$var])) {
fwrite(STDOUT, "$description [" . $settings[$var] . ']? ');
$t = trim(fgets(STDIN));
if ($t == '') {
$t = $settings[$var];
}
} else {
fwrite(STDOUT, "$description? ");
$t = trim(fgets(STDIN));
}
$fout .= "\$settings['{$var}'] = '{$t}';\n";
eval('$'.$var.' = "$t";');
}
$fout .= "?>\n";
$fd = fopen(__DIR__.'/.make_cert.last', 'wb');
Expand Down
8 changes: 4 additions & 4 deletions bin/parse_ssl_extra.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
$db2 = clone $db;
$result = $db->query('select * from ssl_certs where ssl_id=' .intval($_SERVER['argv'][1]));
while ($db->next_record(MYSQL_ASSOC)) {
echo 'Got Unparsed '.$db->Record['ssl_extra'].PHP_EOL;
$extra = myadmin_unstringify($db->Record['ssl_extra']);
print_r($extra);
// $updates[] = "ssl_extra='" .$db->real_escape($extra)."'";
echo 'Got Unparsed '.$db->Record['ssl_extra'].PHP_EOL;
$extra = myadmin_unstringify($db->Record['ssl_extra']);
print_r($extra);
// $updates[] = "ssl_extra='" .$db->real_escape($extra)."'";
// echo "updates:".print_r($updates,true).PHP_EOL;
// $db2->query("update ssl_certs set " . implode(', ', $updates) . " where ssl_id=" . $db->Record['ssl_id'], __LINE__, __FILE__);
}
Loading

0 comments on commit 8da7b6b

Please sign in to comment.