} if ($_POST['submit2'] || $_POST['submit3']) { //$redir = '1; URL=specific.php?oid='.$ooid; $redir = "specificadmin.php?oid={$ooid}&acct={$uacct}&cid={$usid}&mas={$masid}"; //$mesg = "Saving your opportunity, please wait a moment... If automatic redirection would not work, please <a href=\"specific.php?oid=$ooid\">click here to proceed</a>."; } } elseif (is_numeric($_POST['o_location']) && $_POST['spec'] && $_POST['spec'] != '---') { // no ooid = assume it was the create opp form // o_name, o_location, spec $opp = new Opportunity($db, 0, $_POST['o_location'], $usid, $uacct); $opp->o_name = $_POST['o_name']; $opp->specialty = $_POST['spec']; //$opp->save(); $db->query("update opportunities set specialty = '{$opp->spec}', o_name = " . chknul(addslashes($opp->o_name)) . " where oid = {$opp->oid}"); $ooid = $opp->oid; $opp->specswap(); } } // no master override yet, may be later if (!$ooid) { // list all what we have here if ($oopdate === "yes") { $sql = "update opportunities set o_datemod=now(), avail_date=now() where status= 1 and o_uid = {$usid}"; $result = $db->query($sql); // ignore result $mesg = $db->affected_rows ? 'Jobs were refreshed successfully' : 'Nothing to Refresh'; if (!$result) { throw new Exception(DEBUG ? "{$db->error}: {$sql}" : 'Can not refresh opportunities', __LINE__); } } if ($_GET["sort"] != '') {