function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $db; global $config; if (is_array($vars['product_id'])) { $p = $db->get_payment($payment_id); $price_count = 0; foreach ($p['data'][0]['BASKET_PRICES'] as $pp) { if ($pp) { $price_count++; } } if ($price_count > 1) { return "Only 1 paid product can be selected"; } $product_id = $vars['product_id'][0]; } $product =& get_product($product_id); $vars = array('email' => $this->config['business'], 'amount' => $price, 'ordernumber' => $payment_id, 'description' => $product->config['title'], 'returnurl' => sprintf("%s/thanks.php?member_id=%d&product_id=%d&payment_id=%d", $config['root_url'], $member_id, $product_id, $payment_id)); //encode and send $vars1 = array(); foreach ($vars as $kk => $vv) { $v = urlencode($vv); $k = urlencode($kk); $vars1[] = "{$k}={$v}"; } $vars = join('&', $vars1); if ($this->config['testing']) { html_redirect("https://demo.nochex.com/nochex.dll/checkout?{$vars}"); } else { html_redirect("https://www.nochex.com/nochex.dll/checkout?{$vars}"); } exit; }
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db; $products = $product_id; $orig_product_id = $product_id; if (is_array($product_id)) { $product_id = $product_id[0]; } $product =& get_product($product_id); if (count($orig_product_id) > 1) { $product->config['title'] = $config['multi_title']; } $member = $db->get_user($member_id); if (preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d$/', $product->config['start_date'])) { $begin_date = $product->config['start_date']; } else { $begin_date = date('Y-m-d'); } if (true || $product->config['is_recurring']) { // only subscriptions (for reason of Trials), if not recurring will use cycles == 1 $vars = array("_ipn_act" => "_ipn_subscription", "fid" => "", "itestmode" => $this->config['testmode'] ? "on" : "off", "notifyURL" => $config['root_url'] . "/plugins/payment/safepay/ipn.php", "returnURL" => sprintf("%s/thanks.php?member_id=%d&product_id=%d", $config['root_url'], $member_id, $product_id), "cancelURL" => $config['root_url'] . "/cancel.php", "notifyEml" => $this->config['notifyEml'], "iowner" => $this->config['owner'], "ireceiver" => $this->config['owner'], "iamount" => sprintf('%.2f', $price), "itemName" => $product->config['title'], "itemNum" => "1", "idescr" => $product->config['description'], "cycleLength" => $product->config['expire_days'] ? get_date_day_diff(time(), strtotime($product->get_expire($begin_date, 'expire_days'))) : '0', "cycles" => $product->config['is_recurring'] ? "0" : "1", "trialPeriod" => $product->config['trial1_days'] ? get_date_day_diff(time(), strtotime($product->get_expire($begin_date, 'trial1_days'))) : '0', "trialCycles" => "1", "trialAmount" => $product->config['trial1_price'], "idelivery" => "1", "iquantity" => "1", "imultiplyPurchase" => "n", "custom1" => $payment_id, "custom2" => "", "custom3" => "", "custom4" => "", "custom5" => "", "colortheme" => ""); } else { // DISABLED! (no Trials support here) $vars = array("_ipn_act" => "_ipn_payment", "fid" => "", "itestmode" => $this->config['testmode'] ? "on" : "off", "notifyURL" => $config['root_url'] . "/plugins/payment/safepay/ipn.php", "returnURL" => sprintf("%s/thanks.php?member_id=%d&product_id=%d", $config['root_url'], $member_id, $product_id), "cancelURL" => $config['root_url'] . "/cancel.php", "notifyEml" => $this->config['notifyEml'], "iowner" => $this->config['owner'], "ireceiver" => $this->config['owner'], "iamount" => sprintf('%.2f', $price), "itemName" => $product->config['title'], "itemNum" => "1", "idescr" => $product->config['description'], "idelivery" => "1", "iquantity" => "1", "imultiplyPurchase" => "n", "custom1" => $payment_id, "custom2" => "", "custom3" => "", "custom4" => "", "custom5" => "", "colortheme" => ""); } $vars1 = array(); foreach ($vars as $kk => $vv) { $v = urlencode($vv); $k = urlencode($kk); $vars1[] = "{$k}={$v}"; } $vars = join('&', $vars1); html_redirect("https://www.safepaysolutions.com/index.php?{$vars}", '', 'Please wait', 'Please wait'); exit; }
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db; $product = $db->get_product($product_id); $price = 0 + $price; $vars = array('url' => urlencode($config['root_url'] . "/plugins/payment/webmoney/thanks.php"), 'purse' => $this->config['purse'], 'amount' => $price, 'method' => 'GET', 'desc' => urlencode($payment_id . ": " . $product['title']), 'mode' => $this->config['testing'] ? 'test' : ''); $pm = $db->get_payment($payment_id); $pm['data']['wm_vars'] = $vars; $db->update_payment($pm['payment_id'], $pm); $db->log_error("WebMoney SENT: " . webmoney_get_dump($vars)); $url = "https://light.wmtransfer.com/pci.aspx"; switch ($this->config['interface']) { case 'rus': $url = "https://light.webmoney.ru/pci.aspx"; break; case 'eng': $url = "https://light.wmtransfer.com/pci.aspx"; break; case 'keeper': $url = "wmk:paylink"; $vars['url'] = "<" . $vars['url'] . ">"; break; } $vars1 = array(); foreach ($vars as $kk => $vv) { $vars1[] = "{$kk}={$vv}"; } $vars = join('&', $vars1); //header("Location: $url?$vars"); html_redirect($url . "?" . $vars, 0, 'Please wait', 'Please wait'); exit; }
function show_archive() { global $db, $t, $vars, $config; global $all_count, $count, $start; if ($_SESSION['_amember_id']) { $member_id = $_SESSION['_amember_id']; } else { $member_id = -1; } // is guest if ($config['archive_for_browsing'] != '1' && !$_SESSION['_amember_id']) { $redirect = $config['root_url'] . "/newsletter.php"; html_redirect("{$redirect}", 0, 'Redirect', _TPL_REDIRECT_CLICKHERE); exit; } if ($vars['archive_id']) { $a =& $db->get_newsletter($vars['archive_id'], $member_id); $t->assign('a', $a); $t->display('newsletter_archive_more.html'); } else { //$db->delete_old_newsletters(); $all_count = $db->get_archive_list_c($vars['thread_id'], $member_id); $count = 20; $al =& $db->get_archive_list($start, $count, $vars['thread_id'], $member_id); $t->assign('al', $al); $t->display('newsletter_archive.html'); } }
function error_report_show($redirect_page, $err_no) { if (stristr($redirect_page, '?')) { $concat = '&'; } else { $concat = '?'; } $page = $redirect_page . $concat . "failed=true&error={$err_no}"; html_redirect($page); exit; }
function delete_signature($sig_id) { global $dbEmailSig; $sql = "DELETE FROM `{$dbEmailSig}` WHERE id = {$sig_id}"; mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } journal(CFG_LOGGING_NORMAL, 'Global Signature deleted', "A global signature was deleted", CFG_JOURNAL_ADMIN, 0); html_redirect("edit_global_signature.php"); exit; }
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config; $product =& get_product($product_id); $c_product_id = $product->config['fastspring_id']; if (!$c_product_id) { fatal_error("FastSpring Product ID empty for Product# {$product_id}"); } $url = "https://sites.fastspring.com/" . $this->config['company'] . "/instant/" . $c_product_id . "?referrer=" . $payment_id; if ($this->config['testmode']) { $url .= "&mode=test&member=new&sessionOption=new"; } html_redirect($url, $print_header = 0, $title = 'Please wait', $text = 'Please wait'); }
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db; $p = $db->get_payment($payment_id); $pr = $db->get_product($p['product_id']); $u = $db->get_user($member_id); $url = $pr['anylink_url']; foreach ($u as $k => $v) { $url = str_replace('{$member.' . $k . '}', $v, $url); } $url = str_replace('{$payment_id}', $payment_id, $url); if ($url == '') { fatal_error(sprintf(_PLUG_PAY_ANYLINK_REDIR_ERROR, $p[product_id])); } html_redirect("{$url}", 0, _PLUG_PAY_REDIRECT_WAIT, _PLUG_PAY_REDIRECT_REDIRECT); exit; }
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config, $db; $products = $product_id; $orig_product_id = $product_id; if (is_array($product_id)) { $product_id = $product_id[0]; } $product =& get_product($product_id); if (count($orig_product_id) > 1) { $product->config['title'] = $config['multi_title']; } $member = $db->get_user($member_id); $vars = array('payee_email' => $this->config['business'], 'payer_email' => $member['email'], 'transaction_ref' => $payment_id, 'return_URL' => sprintf("%s/thanks.php?member_id=%d&product_id=%d", $config['root_url'], $member_id, $product_id), 'cancel_URL' => $config['root_url'] . "/cancel.php", 'notify_URL' => $config['root_url'] . "/plugins/payment/stormpay/ipn.php", 'amount' => sprintf('%.2f', $price), 'product_name' => $product->config['title'], 'generic' => 1, 'require_IPN' => 1); $vars1 = array(); foreach ($vars as $kk => $vv) { $v = urlencode($vv); $k = urlencode($kk); $vars1[] = "{$k}={$v}"; } $vars = join('&', $vars1); html_redirect("https://www.stormpay.com/stormpay/handle_gen.php?{$vars}", '', 'Please wait', 'Please wait'); exit; }
function do_payment($payment_id, $member_id, $product_id, $price, $begin_date, $expire_date, &$vars) { global $config; global $db; $product =& get_product($product_id); $varsx = array('vpc_Version' => '1', 'vpc_Command' => 'pay', 'vpc_MerchTxnRef' => $payment_id, 'vpc_AccessCode' => $this->config['access_code'], 'vpc_Merchant' => $this->config['merchant_id'], 'vpc_OrderInfo' => $payment_id, 'vpc_Amount' => intval($price * 100), 'vpc_Locale' => 'en', 'vpc_ReturnURL' => $config['root_url'] . "/plugins/payment/migs_r/thanks.php"); $securehash = $this->config['secure_secret']; ksort($varsx); foreach ($varsx as $k => $v) { $securehash .= $v; } $securehash = strtoupper(md5($securehash)); $varsx['vpc_SecureHash'] = $securehash; $vars1 = array(); foreach ($varsx as $kk => $vv) { $v = urlencode($vv); $k = urlencode($kk); $vars1[] = "{$kk}={$vv}"; } $varsx = join('&', $vars1); html_redirect("https://migs.mastercard.com.au/vpcpay?" . $varsx, '', 'Please wait', 'Please wait'); //header("Location: https://migs.mastercard.com.au/vpcpay?".$varsx); exit; }
require_once "bug_group_action_page.php"; exit; } include "./api/include_api.php"; auth_authenticate_user(); $page = basename(__FILE__); $action_page = 'test_action.php'; $detail_page = 'bug_detail_page.php'; $bug_update_url = 'bug_detail_update_page.php'; $num = 0; $bg_color = ''; $project_properties = session_get_project_properties(); $project_name = $project_properties['project_name']; $project_id = $project_properties['project_id']; if (isset($_POST['filter_jump']) && $_POST['filter_jump'] != '') { html_redirect("{$detail_page}?bug_id={$_POST['filter_jump']}"); } else { $filter_jump = ""; } $s_display_options = session_set_display_options("bug", $_POST); $order_by = $s_display_options['order_by']; $order_dir = $s_display_options['order_dir']; $page_number = $s_display_options['page_number']; $filter_per_page = $s_display_options['filter']['per_page']; $filter_bug_status = $s_display_options['filter']['status']; $filter_bug_category = $s_display_options['filter']['category']; $filter_bug_component = $s_display_options['filter']['component']; $filter_reported_by = $s_display_options['filter']['reported_by']; $filter_assigned_to = $s_display_options['filter']['assigned_to']; $filter_assigned_to_dev = $s_display_options['filter']['assigned_to_developer']; $filter_found_in_rel = $s_display_options['filter']['found_in_release'];
if ($type == 'free') { decrement_free_incidents(contact_siteid($contactid)); plugin_do('incident_created_site'); } else { // decrement contract incident by incrementing the number of incidents used increment_incidents_used($maintid); plugin_do('incident_created_contract'); } $html .= "<h3>{$strIncident}: {$incidentid}</h3>"; $html .= "<p align='center'>"; $html .= sprintf($strIncidentLoggedEngineer, $incidentid); $html .= "</p>\n"; $suggested_user = suggest_reassign_userid($incidentid); trigger('TRIGGER_INCIDENT_CREATED', array('incidentid' => $incidentid, 'sendemail' => $send_email)); if ($CONFIG['auto_assign_incidents']) { html_redirect("incident_add.php?action=reassign&userid={$suggested_user}&incidentid={$incidentid}"); exit; } else { echo $html; } // List Engineers // We need a user type 'engineer' so we don't just list everybody // Status zero means account disabled $sql = "SELECT * FROM `{$dbUsers}` WHERE status!=0 ORDER BY realname"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING); } echo "<h3>{$strUsers}</h3>\n <table align='center'>\n <tr>\n <th> </th>\n <th>{$strName}</th>\n <th>{$strTelephone}</th>\n <th>{$strStatus}</th>\n <th>{$strMessage}</th>\n <th colspan='5'>{$strIncidentsinQueue}</th>\n <th>{$strAccepting}</th>\n </tr>"; echo "<tr>\n <th colspan='5'></th>\n <th align='center'>{$strActionNeeded} / {$strOther}</th>"; echo "<th align='center'>" . priority_icon(4) . "</th>";
$direction = 'lr'; } $redirect = cleanvar($_REQUEST['redirect']); switch ($action) { case 'addlink': // Insert the link if ($direction == 'lr') { $sql = "INSERT INTO `{$dbLinks}` "; } $sql .= "(linktype, origcolref, linkcolref, userid) "; $sql .= "VALUES ('{$linktypeid}', '{$origref}', '{$linkref}', '{$sit[2]}')"; mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_ERROR); } html_redirect($redirect); break; case '': default: include APPLICATION_INCPATH . 'htmlheader.inc.php'; // Find out what kind of link we are to make $sql = "SELECT * FROM `{$dbLinkTypes}` WHERE id='{$linktypeid}'"; $result = mysql_query($sql); while ($linktype = mysql_fetch_object($result)) { if ($direction == 'lr') { echo "<h2>Link {$linktype->lrname}</h2>"; } elseif ($direction == 'rl') { echo "<h2>Link {$linktype->rlname}</h2>"; } echo "<p align='center'>Make a {$linktype} link for origtab {$origtab}, origref {$origref}</p>"; // FIMXE i18n
header("Location: {$CONFIG['application_webpath']}noaccess.php?id=79"); exit; } else { $status = update_contract_balance($contractid, $reason, $amount, $sourceservice); if ($status) { html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", TRUE, $strSuccessfullyUpdated); } else { html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", FALSE, $strUpdateFailed); } } break; case 'transfer': if (user_permission($sit[2], 79) == FALSE) { header("Location: {$CONFIG['application_webpath']}noaccess.php?id=79"); exit; } else { $status = update_contract_balance($contractid, $reason, $amount * -1, $sourceservice); if ($status) { $status = update_contract_balance($contractid, $reason, $amount, $destinationservice); if ($status) { html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", TRUE); } else { html_redirect("{$CONFIG['application_webpath']}contract_details.php?id={$contractid}", FALSE); } exit; } html_redirect('main.php', FALSE, $strFailed); exit; } break; }
function html_print_operation_successful($page_title, $redirect_page) { global $db; $s_project_properties = session_get_project_properties(); $project_name = $s_project_properties['project_name']; html_window_title(); html_print_body(); html_page_title($project_name . " - " . lang_get($page_title)); html_page_header($db, $project_name); html_print_menu(); print "<div class=operation-successful>" . lang_get('operation_successful') . "</div>"; html_print_footer(); html_redirect($redirect_page); exit; }
$sql .= "AND linktype = 5 "; $sql .= "AND l.linkcolref = f.id "; if ($result = @mysql_query($sql)) { while ($row = mysql_fetch_object($result)) { $file = $path . $row->linkcolref . "-" . $row->filename; if (file_exists($file)) { $del = unlink($file); if (!$del) { trigger_error("Deleting attachment failed", E_USER_ERROR); $deleted = FALSE; } } } } if ($deleted_files) { // We delete using ID and timestamp to make sure we dont' delete the wrong update by accident $sql = "DELETE FROM `{$dbUpdates}` WHERE id='{$updateid}' AND timestamp='{$timestamp}'"; // We might in theory have more than one ... mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } $sql = "DELETE FROM `{$dbTempIncoming}` WHERE id='{$tempid}'"; mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } } journal(CFG_LOGGING_NORMAL, 'Incident Log Entry Deleted', "Incident Log Entry {$updateid} was deleted from Incident {$incidentid}", CFG_JOURNAL_INCIDENTS, $incidentid); html_redirect("holding_queue.php");
function update_subscriptions() { global $config, $_product_id, $t, $db, $vars; $_amember_id = $_SESSION['_amember_id']; $member_id = intval($_amember_id); $db->delete_member_threads($member_id); if (!$vars['unsubscribe']) { $q = $db->query($s = "\n UPDATE {$db->config['prefix']}members\n SET unsubscribed=0\n WHERE member_id={$member_id}\n "); $db->add_member_threads($member_id, $vars['threads']); } else { $q = $db->query($s = "\n UPDATE {$db->config['prefix']}members\n SET unsubscribed=1\n WHERE member_id={$member_id}\n "); } // // Begin Mod for aMail Plugin... // $newmember = $db->get_user($member_id); $oldmember = $newmember; $oldmember['unsubscribed'] = $newmember['unsubscribed'] ? 0 : 1; plugin_subscription_updated($member_id, $oldmember, $newmember); // // End Mod for aMail Plugin // html_redirect("member.php", false, _TPL_NEWSLETTER_INFO_SAVED, _TPL_NEWSLETTER_INFO_UPDATED); exit; }
trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } } if ($target != 'none') { // Reset the slaemail sent column, so that email reminders can be sent if the new sla target goes out $sql = "UPDATE `{$dbIncidents}` SET slaemail='0', slanotice='0' WHERE id='{$id}' LIMIT 1"; mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } } if (!$result) { include APPLICATION_INCPATH . 'incident_html_top.inc.php'; echo "<p class='error'>{$strUpdateIncidentFailed}</p>\n"; include APPLICATION_INCPATH . 'incident_html_bottom.inc.php'; } else { if ($draftid != -1 and !empty($draftid)) { $sql = "DELETE FROM `{$dbDrafts}` WHERE id = {$draftid}"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_ERROR); } } journal(CFG_LOGGING_MAX, 'Incident Updated', "Incident {$id} Updated", CFG_JOURNAL_SUPPORT, $id); html_redirect("incident_details.php?id={$id}"); } } } } } include APPLICATION_INCPATH . 'incident_html_bottom.inc.php';
// Approve billable incidents require 'core.php'; require_once APPLICATION_LIBPATH . 'functions.inc.php'; include_once APPLICATION_LIBPATH . 'billing.inc.php'; // This page requires authentication require_once APPLICATION_LIBPATH . 'auth.inc.php'; $transactiond = cleanvar($_REQUEST['transactionid']); $title = $strBilling; include APPLICATION_INCPATH . 'htmlheader.inc.php'; $sql = "SELECT * FROM `{$GLOBALS['dbTransactions']}` WHERE transactionid = {$transactiond}"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("Error getting transaction " . mysql_error()); } if (mysql_num_rows($result) > 0) { $obj = mysql_fetch_object($result); if ($obj->transactionstatus == BILLING_AWAITINGAPPROVAL) { // function update_contract_balance($contractid, $description, $amount, $serviceid='', $transactionid='', $totalunits=0, $totalbillableunits=0, $totalrefunds=0) $r = update_contract_balance('', '', $obj->amount, $obj->serviceid, $obj->transactionid); if ($r) { html_redirect("billable_incidents.php", TRUE, "{$strTransactionApproved}"); } else { html_redirect("billable_incidents.php", FALSE, "{$strFailedtoApproveTransactID} {$transactiond}"); } } else { html_redirect("billable_incidents.php", FALSE, "{$strTransactionXnotAwaitingApproval}", $transactiond); } } else { html_redirect("billable_incidents.php", FALSE, "{$strNoTransactionsFoundWithID} {$transactiond}"); } include APPLICATION_INCPATH . 'htmlfooter.inc.php';
$incidentid = $id; $title = $strClose; // No submit detected show closure form if (empty($_REQUEST['process'])) { $sql = "SELECT owner FROM `{$dbIncidents}` WHERE id = '{$incidentid}'"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_WARNING); } list($owner) = mysql_fetch_row($result); if ($owner == 0) { html_redirect("incident_details.php?id={$incidentid}", FALSE, $strCallMustBeAssignedBeforeClosure); exit; } if (count(open_activities_for_incident($incidentid)) > 0) { html_redirect("incident_details.php?id={$incidentid}", FALSE, $strMustCompleteActivitiesBeforeClosure); exit; } include APPLICATION_INCPATH . 'incident_html_top.inc.php'; ?> <script type="text/javascript"> <!-- function enablekb() { // INL 28Nov07 Yes I know a lot of this javascript is horrible // it's old and I'm tired and can't be bothered right now // the newer stuff at the bottom is pretty and uses prototype.js // syntax if (document.closeform.kbtitle.disabled==true) { // Enable KB
$_SESSION['formdata']['role_edit'] = $_REQUEST; if (empty($rolename)) { $errors++; $_SESSION['formerrors']['role_edit']['rolename'] = sprintf($strFieldMustNotBeBlank, $strName); } $sql = "SELECT * FROM `{$dbRoles}` WHERE rolename = '{$rolename}' AND id != {$roleid}"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } if (mysql_num_rows($result) > 0) { $errors++; $_SESSION['formerrors']['role_edit']['duplicaterole'] = "{$strADuplicateAlreadyExists}</p>\n"; } if ($errors == 0) { clear_form_data('role_add'); clear_form_errors('role_add'); $sql = "UPDATE `{$dbRoles}` SET rolename = '{$rolename}', description = '{$description}' WHERE id = {$roleid}"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } if (mysql_affected_rows() > 0) { html_redirect("role.php?roleid={$roleid}", TRUE); } else { html_redirect($_SESSION['PHP_SELF'], FALSE); } } else { html_redirect($_SESSION['PHP_SELF'], FALSE); } }
print "</tr>" . NEWLINE; print "</table>" . NEWLINE; print "</form>" . NEWLINE; print "</td>" . NEWLINE; print "</tr>" . NEWLINE; print "</table>" . NEWLINE; print "</div>" . NEWLINE; # Not all get data is set } else { print "<div class='error'>" . ERROR_NO_DATA . "</div>" . NEWLINE; } html_print_footer(); # User submitted the form, check which option was selected } elseif ($_POST['confirm'] == lang_get('no')) { # User does not want to delete record html_redirect($_POST['confirm_r_page']); } elseif ($_POST['confirm'] == 'Yes') { switch ($_POST['confirm_f']) { case "delete_release": admin_release_delete($_POST['confirm_id']); $delete_successful = true; break; case "delete_build": admin_build_delete($_POST['confirm_id']); $delete_successful = true; break; case "delete_testset": admin_testset_delete($_POST['confirm_id']); $delete_successful = true; break; case "remove_user_from_project":
function results_delete_test_run($id) { global $db; $ts_tbl = TEST_RESULTS_TBL; $vr_tbl = VERIFY_RESULTS_TBL; $f_ts_test_run_id = TEST_RESULTS_TS_UNIQUE_RUN_ID; $f_vr_test_run_id = VERIFY_RESULTS_TS_UNIQUE_RUN_ID; $redirect_page = "results_test_run_page.php"; $q1 = "DELETE FROM {$ts_tbl} WHERE {$f_ts_test_run_id} ='{$id}'"; db_query($db, $q1); $q3 = "DELETE FROM {$vr_tbl} WHERE {$f_vr_test_run_id} ='{$id}'"; db_query($db, $q3); html_redirect($redirect_page); }
$errors = 0; // check for blank name if ($name == '') { $errors++; $_SESSION['formerrors']['add_product']['name'] = sprintf($strFieldMustNotBeBlank, $strProduct); } if ($vendor == '' or $vendor == "0") { $errors++; $_SESSION['formerrors']['add_product']['vendor'] = sprintf($strFieldMustNotBeBlank, $strVendor); } // add product if no errors if ($errors == 0) { $sql = "INSERT INTO `{$dbProducts}` (name, vendorid, description) VALUES ('{$name}', '{$vendor}', '{$description}')"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } if (!$result) { echo "<p class='error'>" . sprintf($strAddXfailed, $strProduct) . "\n"; } else { $id = mysql_insert_id(); journal(CFG_LOGGING_NORMAL, 'Product Added', "Product {$id} was added", CFG_JOURNAL_PRODUCTS, $id); html_redirect("products.php"); } clear_form_errors('add_product'); clear_form_data('add_product'); } else { include APPLICATION_INCPATH . 'htmlheader.inc.php'; html_redirect("product_add.php", FALSE); } }
if (empty($tag)) { $errors++; $_SESSION['formerrors']['add_servicelevel']['tag'] = sprintf($strFieldMustNotBeBlank, $strTag); } if (empty($engineerPeriod) and $timed == 'yes') { $errors++; $_SESSION['formerrors']['add_servicelevel']['engineerPeriod'] = sprintf($strFieldMustNotBeBlank, $strBillingEngineerPeriod); } if (empty($customerPeriod) and $timed == 'yes') { $errors++; $_SESSION['formerrors']['add_servicelevel']['customerPeriod'] = sprintf($strFieldMustNotBeBlank, $strBillingCustomerPeriod); } if ($errors >= 1) { // show error message if errors include APPLICATION_INCPATH . 'htmlheader.inc.php'; html_redirect($_SERVER['PHP_SELF'], FALSE); } else { // FIXME as temporary measure until we've completely stopped using ID's, fill in the id field // Find highest ID number used, and set the new ID to be one more $sql = "SELECT id FROM `{$dbServiceLevels}` ORDER BY id DESC LIMIT 1"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING); } list($newslid) = mysql_fetch_row($result); $newslid++; // Insert low $sql = "INSERT INTO `{$dbServiceLevels}` (id, tag, priority, initial_response_mins, prob_determ_mins, action_plan_mins, resolution_days, review_days, timed, allow_reopen) VALUES ("; $sql .= "'{$newslid}', '{$tag}', '1', "; $sql .= "'{$low_initial_response_mins}', "; $sql .= "'{$low_prob_determ_mins}', ";
$destination_filepath = $CONFIG['ftp_path'] . $file_name; // check the source file exists if (!file_exists($filepath)) { trigger_error("Source file cannot be found: {$filepath}", E_USER_WARNING); } // set passive mode if required if (!ftp_pasv($conn_id, $CONFIG['ftp_pasv'])) { trigger_error("Problem setting passive ftp mode", E_USER_WARNING); } // upload the file $upload = ftp_put($conn_id, "{$destination_filepath}", "{$filepath}", FTP_BINARY); // close the FTP stream ftp_close($conn_id); // check upload status if (!$upload) { trigger_error($strUploadFailed, E_USER_ERROR); } else { // store file details in database // important: path must be blank for public files (all go in same dir) $sql = "INSERT INTO `{$dbFiles}` (filename, size, userid, shortdescription, longdescription, path, filedate, expiry, fileversion) "; $sql .= "VALUES ('{$file_name}', '{$filesize}', '" . $sit[2] . "', '{$shortdescription}', '{$longdescription}', '{$CONFIG['ftp_path']}', '{$now}', '{$expirydate}' ,'{$fileversion}')"; mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } journal(CFG_LOGGING_NORMAL, 'FTP File Uploaded', sprintf($strFTPFileXUploaded, $filename), CFG_JOURNAL_OTHER, 0); html_redirect('ftp_upload_file.php'); echo "<code>{$ftp_url}</code>"; } } }
$addition_errors_string .= user_alert($strAdditionFail, E_USER_WARNING); } // Add service $sql = "INSERT INTO `{$dbService}` (contractid, startdate, enddate, creditamount, unitrate, incidentrate, foc) "; $sql .= "VALUES ('{$maintid}', '{$startdate}', '{$enddate}', '{$amount}', '{$unitrate}', '{$incidentrate}', '{$foc}')"; mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_affected_rows() < 1) { trigger_error("Insert failed", E_USER_ERROR); } $serviceid = mysql_insert_id(); update_contract_balance($maintid, $strNewContract, $amount, $serviceid); if ($addition_errors == 1) { // show addition error message include APPLICATION_INCPATH . 'htmlheader.inc.php'; echo $addition_errors_string; include APPLICATION_INCPATH . 'htmlfooter.inc.php'; } else { // show success message trigger('TRIGGER_NEW_CONTRACT', array('contractid' => $maintid, 'userid' => $sit[2])); html_redirect("contract_details.php?id={$maintid}"); } clear_form_data('add_contract'); } else { // show error message if errors include APPLICATION_INCPATH . 'htmlheader.inc.php'; html_redirect("contract_add.php", FALSE); } }
<?php # --------------------------------------------------------------------- # rth is a requirement, test, and bugtracking system # Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details #---------------------------------------------------------------------- # ------------------------------------ # Logout Page # # $RCSfile: logout.php,v $ $Revision: 1.1.1.1 $ # ------------------------------------ include "./api/include_api.php"; ################################################################################## # Destroy the session and reload the login page # ################################################################################## session_end(); ################################################################################## # Destroy the cookie login information # ################################################################################## util_set_cookie(USER_COOKIE_NAME, ""); util_set_cookie(PWD_COOKIE_NAME, ""); html_redirect('login.php'); # ------------------------------------ # $Log: logout.php,v $ # Revision 1.1.1.1 2005/11/30 23:00:57 gth2 # importing initial version - gth # # ------------------------------------
/** * The ProcessCheckoutRedirect function receives a synchronous Google * Checkout response to a Checkout API request. The <checkout-redirect> * response identifies the URL to which you should redirect your customer * so that the customer can complete an order using Google Checkout. * * @param $xml_response synchronous response XML message */ function ProcessCheckoutRedirect($dom_data_root, $sn) { //$this->SendNotificationAcknowledgment($sn); // Identify the URL to which the customer should be redirected $redirect_url = $dom_data_root['redirect-url']; $redirect_url = str_replace("shoppingcartshoppingcart", "shoppingcart&shoppingcart", $redirect_url); html_redirect($redirect_url, '', 'Please wait', 'Please wait'); exit; }
switch ($action) { case 'save': $vendorname = cleanvar($_REQUEST['name']); $vendorid = cleanvar($_REQUEST['vendorid']); // check for blank name if ($vendorname == '') { $errors = 1; $errors_string .= "<p class='error'>" . sprintf($strFieldMustNotBeBlank, $strVendorName) . "</p>\n"; } if ($errors == 0) { $sql = "UPDATE `{$dbVendors}` SET name = '{$vendorname}' WHERE id = '{$vendorid}'"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_ERROR); } html_redirect("main.php"); } else { include APPLICATION_INCPATH . 'htmlheader.inc.php'; echo $errors_string; include APPLICATION_INCPATH . 'htmlfooter.inc.php'; } break; case 'edit': $vendorid = cleanvar($_REQUEST['vendorid']); $vendorname = cleanvar($_REQUEST['vendorname']); include APPLICATION_INCPATH . 'htmlheader.inc.php'; echo "<h2>{$strEditVendor} {$vendorname}</h2>"; echo "<form action='{$_SERVER['PHP_SELF']}' name'editvendor'>"; echo "<table align='center'>"; echo "<tr><th>{$strVendorName}:</th><td><input maxlength='50' name='name' size='30' value='{$vendorname}'/></td></tr>"; echo "</table>";