echo "\n\t\t<form action=\"db.php\" method=\"GET\">\n\t\t<input type=\"hidden\" name=\"command\" value=\"edit\">\n\t\t<input type=\"hidden\" name=\"id\" value=\"{$start_id}\">\n\t\t"; echo "\n\t\t<input type=\"submit\" value=\"" . GLOBALMSG_RECORD_EDIT . "\">\n\t\t</form>\n\t\t"; break; case "update": update_data($start_id, $start_data, $payment_data); break; case "delete": if (isset($_GET['deleteconfirm'])) { $deleteconfirm = $_GET['deleteconfirm']; } elseif (isset($_POST['deleteconfirm'])) { $deleteconfirm = $_POST['deleteconfirm']; } if ($deleteconfirm) { $delete = $_SESSION["delete"]; unset($_SESSION["delete"]); delete_rows($delete); } else { if (isset($_GET['delete'])) { $delete = $_GET['delete']; } elseif (isset($_POST['delete'])) { $delete = $_POST['delete']; } if (is_array($delete)) { echo "\n\t\t\t\t" . GLOBALMSG_RECORDS_DELETE_CONFIRM . "<br><br>\n"; $_SESSION["delete"] = $delete; for (reset($delete); list($key, $value) = each($delete);) { $description = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], "account_mgmt_main", "description", $key); echo "<LI>" . $description . "</LI>"; } echo "\n\t\t\t\t<table><tr><td>\n\t\t\t\t<form action=\"db.php\" method=\"GET\">\n\t\t\t\t<input type=\"hidden\" name=\"command\" value=\"delete\">\n"; echo "\n\t\t\t\t<input type=\"hidden\" name=\"deleteconfirm\" value=\"1\">\n\t\t\t\t<input type=\"submit\" value=\"" . ucfirst(phr('YES')) . "\">\n\t\t\t\t</form></td>\n\t\t\t\t<td><form action=\"index.php\" method=\"GET\">\n\t\t\t\t<input type=\"submit\" value=\"" . ucfirst(phr('NO')) . "\">\n\t\t\t\t</form>\n\t\t\t\t</td></tr></table>\n\t\t\t\t";
function partition_dynamics($game_names, $server_cfg, $con, $log_file) { //Month to Partition map $partition_drop_map = array('p001', 'p002', 'p003', 'p004', 'p005', 'p006', 'p001', 'p002', 'p003', 'p004', 'p005', 'p006'); //Current month to retention month p_tag map. $cursor_retain_months = array(11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); $month_index = date('m') - 1; $array_drop_index = $month_index - 2; //If array drop index is negative go to the end of array if ($array_drop_index < 0) { $array_drop_index = 12 + $array_drop_index; } $partition_drop_array_games = $partition_drop_map[$array_drop_index]; foreach ($game_names as $game) { $db = "zprf_" . $game; report_partitions_state($db, $con, $log_file); $cursor_retain = $cursor_retain_months[$month_index]; $cursor_delete = 0 - $cursor_retain; //Deleting rows in the ratio 1:4 delete_rows($cursor_delete, $db, $con, $log_file); //Doing an alter table crunch_space($db, $con, $log_file); //Fetching the retention time from game_cfg file $game_cfg = load_game_config($game); $retention_time = $game_cfg["xhprof_retention_time"]; //Maximum retention time = 4 months //If retention time not specified setting the default retention time as 4 months if ($retention_time == NULL or $retention_time > 4) { $retention_time = 4; } $partition_drop_index = $month_index - $retention_time - 1; if ($partition_drop_index < 0) { $partition_drop_index = 12 + $partition_drop_index; } $partition_drop = $partition_drop_map[$partition_drop_index]; $rs = new RightScale($server_cfg, load_game_config($game)); $array_ids = $rs->get_arrays_to_serve(); drop_partition_data($partition_drop, $partition_drop_array_games, $array_ids, $db, $con, $log_file); } }
function delete_bond($isins) { delete_rows('creso_obbligazioni', 'isin', $isins); }
} if(isset($_GET['add_rows_to_rt'])) { add_rows_to_rt(intval($_GET['id']),cor_data_for_SQL($_GET['type_row']),intval($_GET['num']),intval($_GET['control_num'])); exit; } if(isset($_GET['make_rows_changes_in_rt'])) { if($_GET['action'] == 'delete') { if(trim($_GET['id_nums_str']) != '') { delete_rows(cor_data_for_SQL($_GET['id_nums_str']),(int)$_GET['control_num']); header('Location:?'.addOrReplaceGetOnURL('','make_rows_changes_in_rt&action&id_nums_str&control_num')); exit; } } // make_rows_changes_in_rt(cor_data_for_SQL($_GET['action']),intval($_GET['num'])); exit; } ob_start(); $query = "SELECT*FROM `".CALCULATE_TBL."` WHERE `client_id` = '".$client_id."'