Пример #1
0
            $operators[] = intval($_POST[$key]);
        }
    }
    if (isset($_POST['submit']) && count($operators) > 0) {
        include "../functions/functions.work.php";
        create_work($data_id, $process_id, $column_id, $operators, $mcgi, false, $reference);
    }
    if (isset($_POST['submit_compare'])) {
        $compare = array();
        foreach ($_POST as $key => $val) {
            if (substr($key, 0, 3) == 'cid') {
                $compare[] = intval($_POST[$key]);
            }
        }
        include "../functions/functions.work.php";
        create_work($data_id, 11, $column_id, array('NULL'), false, $compare);
    }
}
xhtml_head(T_("Mark columns to be coded"), true, array("../css/table.css"), array("../js/display.js"));
$data_id = 0;
if (isset($_GET['data_id'])) {
    $data_id = intval($_GET['data_id']);
}
//Select a data file to mark
$sql = "SELECT data_id as value,description, CASE WHEN data_id = '{$data_id}' THEN 'selected=\\'selected\\'' ELSE '' END AS selected\r\n\tFROM data";
print "<div>" . T_("Select data file: ");
display_chooser($db->GetAll($sql), 'data_id', 'data_id');
print "</div>";
if ($data_id != 0) {
    $column_id = 0;
    if (isset($_GET['column_id'])) {
Пример #2
0
     create_note(filter_input(INPUT_POST, 'note', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'achievement_id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "create_relation":
     create_relation(filter_input(INPUT_POST, 'a', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'b', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "create_requirement":
     create_requirement(filter_input(INPUT_POST, 'required_for', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'required_by', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "create_tag":
     create_tag(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT), filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING));
     break;
 case "create_todo":
     create_todo(filter_input(INPUT_POST, 'achievement_id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "create_work":
     create_work(filter_input(INPUT_POST, 'action_id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "deactivate_achievement":
     deactivate_achievement(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "does_username_already_exist":
     echo json_encode(does_username_already_exist(filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING)));
     break;
 case "remove_achievement":
     remove_achievement(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "delete_action":
     delete_action(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));
     break;
 case "delete_note":
     delete_note(filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT));