function order_cancelled($secret, $order_no) { if ($error = check_secret($secret)) { return $error; } $db = new Database(); $order = $db->get_row_by_key('orders', 'id', $order_no); if ($order['status'] == 'new') { $db->update_by_key('orders', 'id', $order_no, array('status' => 'cancelled')); } else { if ($order['status'] == 'shipped') { $db->update_by_key('orders', 'id', $order_no, array('status' => 'refunded')); $new_order = array('id' => $order['id'] . '-r', 'affiliate' => $order['affiliate'], 'affiliate_data' => $order['affiliate_data'], 'status' => 'refund', 'customer_email' => $order['customer_email'], 'customer_name' => $order['customer_name'], 'total' => -$order['total'], 'commission' => -$order['commission']); $db->insert('orders', $new_order); } } }
clean_up_secrets(); if (isset($_GET['dl'])) { if (in_array($_GET['dl'], $icondesc, true)) { write_img_png($_GET['dl']); } else { if (in_array($_GET['dl'], $flagdesc, true)) { write_img_png($_GET['dl']); } else { if ($_GET['dl'] == "human_check") { draw_human_checker(create_secret()); } } } } if (isset($_POST['action'])) { if (check_secret($_POST['check'])) { send_the_main_page('verify'); die; } else { send_the_main_page('badsecret'); die; } } send_the_main_page(); die; function send_the_submit_form() { html_spacer(); html_title("BUNDLE INFORMATION"); html_spacer(); echo "<div id=\"git-submit\">\n";