** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with Open Source ACH. If not, see <http://www.gnu.org/licenses/>. //////////////////////////////////////////////////////////////////////////////// */ include "code/includes.php"; $active_hypothesis = new Hypothesis(); $active_hypothesis->populateFromId($_REQUEST['hypothesis_id']); $active_project = new Project(); $active_project->populateFromId($_REQUEST['project_id']); foreach ($_REQUEST as $field => $value) { $active_hypothesis->{$field} = addslashes($value); } $active_hypothesis->id = $_REQUEST['hypothesis_id']; $active_hypothesis->update(); setStatusMessage("Updated!"); ?> <html> <head> <title>Updating...</title> <meta http-equiv=Refresh content="0; url=project/<?php echo $_REQUEST['project_id']; ?> /hypothesis/<?php echo $_REQUEST['hypothesis_id']; ?> "> </head>
if (is_numeric($evidence) && is_numeric($hypothesis)) { mysql_do("INSERT INTO ratings (evidence_id, hypothesis_id, rating, user_id) VALUES ('{$evidence}', '{$hypothesis}', '{$value}', '{$active_user->id}')"); } $value = ""; } if (substr($field, 0, 9) == "cred_edit") { $evidence = substr($field, 10); mysql_do("DELETE FROM credibility WHERE evidence_id='{$evidence}' AND user_id='{$active_user->id}'"); if (is_numeric($evidence)) { $weight = $_REQUEST['cred_weight_edit_' . $evidence]; mysql_do("INSERT INTO credibility (evidence_id, value, weight, user_id) VALUES ('{$evidence}', '{$value}', '{$weight}', '{$active_user->id}')"); } $value = ""; } } setStatusMessage("Done!"); ?> <html> <head> <title>Updating...</title> <meta http-equiv=Refresh content="0; url=project/<?php echo $_REQUEST['project_id']; ?> "> </head> <body>
} elseif ($_GET['action'] == 'getAllUsers') { getAllUsers(); } elseif ($_GET['action'] == 'editMessage') { editMessage($_SESSION['user']['id'], $_POST['message'], $_POST['content']); } elseif ($_GET['action'] == 'getAllEmoticons') { getAllEmoticons(); } elseif ($_GET['action'] == 'getAllImages') { getAllImages(); } elseif ($_GET['action'] == 'getTopic') { getTopic(); } elseif ($_GET['action'] == 'getOnlineUsers') { getOnlineUsers(); } elseif ($_GET['action'] == 'setProfilePicture') { setUserImage($_SESSION['user']['id'], $_POST['image']); } elseif ($_GET['action'] == 'setStatusMessage') { setStatusMessage($_SESSION['user']['id'], $_POST['statusMessage']); } elseif ($_GET['action'] == 'setDisplayName') { setDisplayName($_SESSION['user']['id'], $_POST['displayName']); } elseif ($_GET['action'] == 'setHighPriorityUserInformation') { setHighPriorityUserInformation($_SESSION['user']['id'], $_POST['status'], $_POST['isTyping']); } elseif ($_GET['action'] == 'setLowPriorityUserInformation') { setLowPriorityUserInformation($_SESSION['user']['id'], $_POST['statusMessage'], $_POST['imageId']); } elseif ($_GET['action'] == 'searchMessages') { searchMessages($_POST['string'], $_POST['caseSensitive'], (int) $_POST['userId']); } elseif ($_GET['action'] == 'setTopic') { setTopic($_POST['topic'], $_SESSION['user']['id']); } elseif ($_GET['action'] == 'setChatName') { setChatName($_POST['chatName'], $_SESSION['user']['id']); } elseif ($_GET['action'] == 'setChatImage') { setChatImage($_POST['image'], $_SESSION['user']['id']); } elseif ($_GET['action'] == 'getChatImage') {
include "code/includes.php"; $active_evidence = new Evidence(); foreach ($_REQUEST as $field => $value) { $active_evidence->{$field} = addslashes($value); } $active_evidence->user_id = $active_user->id; $active_evidence->insertNew(); $cred = $_REQUEST['credibility']; if ($cred == "credible") { mysql_do("INSERT INTO credibility (value, evidence_id, user_id, weight) VALUES ('y', '{$active_evidence->id}', '{$active_user->id}', '1')"); } else { if ($cred == "suspect") { mysql_do("INSERT INTO credibility (value, evidence_id, user_id, weight) VALUES ('n', '{$active_evidence->id}', '{$active_user->id}', '1')"); } } setStatusMessage("Added!"); ?> <html> <head> <title>Updating...</title> <meta http-equiv=Refresh content="0; url=project/<?php echo $active_evidence->project_id; ?> "> </head> <body>