case "edit": $pay = new Payment(); SingleDB::getInstance()->updatePayment($_POST['ind'], $pay); case "show": printShow($tplCommon); break; case "buy": $pay = new Payment(); $checker = new PaymentChecker($pay); if ($checker->isCorrect()) { SingleDB::getInstance()->insertPayment($pay); } else { $default = false; $payArray["order"] = $pay->order; $payArray["cost"] = $pay->cost; $payArray["rubSel"] = $pay->currency == 1 ? "selected" : ""; $payArray["usdSel"] = $pay->currency == 2 ? "selected" : ""; $payArray["number"] = $pay->card_num; $payArray["holder"] = $pay->card_holder; $payArray["month"] = $pay->card_expMonth; $payArray["year"] = $pay->card_expYear; $payArray["cvv"] = $pay->card_cvv; } default: $payArray["submitAct"] = "buy"; if ($default) { $payArray["rubSel"] = "selected"; } printDefault($tplCommon, $payArray, $checker); break; }
} else { echo "File not found\n"; } } else { echo "Usage: -i <phar_file>\n"; } } elseif (strtolower($argv[1]) == "-v") { //PharTools Version command echo "EvolSoft website: http://www.evolsoft.tk\n"; echo "PharTools website: http://phartools.evolsoft.tk\n"; echo "GitHub: https://github.com/EvolSoft/PharTools\n"; } else { printDefault(); } } else { printDefault(); } function printDefault() { echo "Usage:\n"; echo "-c <source_path|source_file> <destination_phar> [options] Creates a phar file\n"; echo "-e <phar_file> [extract_path] Extracts a phar file\n"; echo "-i <phar_file> Shows info about a phar file\n"; echo "-v Get PharTools version\n"; } function strbool($bool) { return $bool ? 'true' : 'false'; } function metadataToString(array $metadata) {