function pstart_nocache() { pstart(); header("Cache-Control: no-store, no-cache, must-revalidate," . " post-check=0, pre-check=0"); header("Pragma: no-cache"); header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); }
<?php require "common.php"; pstart(); $arg_edit_split = 0 + @$_REQUEST['edit_split']; $arg_delete = 0 + @$_REQUEST['delete']; $arg_set_splits = 0 + @$_REQUEST['set_splits']; $arg_update_trans = 0 + @$_REQUEST['update_trans']; $arg_tid = 0 + @$_REQUEST['tid']; $arg_split_id = 0 + @$_REQUEST['split_id']; if ($arg_update_trans == 1) { $arg_name2 = trim(@$_REQUEST['name2']); $q = query("select 0 from trans where tid = ?", $arg_tid); if (fetch($q) == NULL) { query("insert into trans (tid) values (?)", $arg_tid); } query("update trans set name2 = ?" . " where tid = ?", array($arg_name2, $arg_tid)); flash("Updated"); $t = sprintf("trans.php?tid=%d", $arg_tid); redirect($t); } if ($arg_set_splits == 1) { $arg_set_splits_checkbox = 0 + @$_REQUEST['set_splits_checkbox']; $arg_tag_id = 0 + @$_REQUEST['tag_id']; $arg_name2 = trim(@$_REQUEST['name2']); if ($arg_set_splits_checkbox != 1) { flash("You must click the checkbox to set these transactions"); $t = sprintf("trans.php?tid=%d", $arg_tid); redirect($t); } $tids = explode(",", @$_REQUEST['tids']);
function pstart_nocache() { global $pstart_args; $pstart_args->nocache = 1; pstart(); }