function test() { $oper = new Operations(); $table_name = "my_table"; $googleFile = "google_sees"; $userFile = "user_sees"; // $oper->createTable($table_name); // $oper->loadComparisonTask($userFile, $googleFile, $table_name); $result = $oper->processing($table_name); print var_dump($result); $id = $result["id"]; $label = 'Yes'; $oper->processed($table_name, $label, $id); print $oper->countRows($table_name); }
//$table_name = "search_sample_list_600_1"; // $table_name = "search_sample_list_600_combined"; //$table_name = "effective_abusive_linux"; //$table_name = "search_hot_24_month"; //$table_name = "detect_spammy_ad"; //$table_name = "detect_hot_ad"; //$table_name = "detect_hot_search"; $table_name = "detect_spammy_search"; } // echo $userFile . $googleFile . $table_name; $oper = new Operations(); // POST Handler if (isset($_POST["submit"])) { $action = $_POST["submit"]; if ($action == "submit") { $oper->processed($table_name, $_POST["response"], $_POST["id"], $_POST["url"], $_POST["user"]); } else { if ($action == "exit") { $oper->processed($table_name, "TODO", $_POST["id"]); } else { if ($action == "label and skip url") { $oper->processed($table_name, $_POST["response"], $_POST["id"], $_POST["url"], $_POST["user"]); $oper->skipUrl($table_name, $_POST["response"], $_POST["url"]); } } } } // check whether there is more to show $count = $oper->countRows($table_name); if ($count == -1) { $oper->createTableAndLoadComparisonTask($userFile, $googleFile, $table_name);