예제 #1
0
            echo "<p class='error'>{$strCheckEnteredData}</p>";
            echo "<ul class='error'>";
            foreach ($error as $err) {
                echo "<li>{$err}</li>";
            }
            echo "</ul>";
            include APPLICATION_INCPATH . 'htmlfooter.inc.php';
        } else {
            $sql = "INSERT INTO `{$dbNotes}` (userid, bodytext, link, refid) ";
            $sql .= "VALUES ('{$sit[2]}', '{$bodytext}', '{$link}', '{$refid}')";
            mysql_query($sql);
            if (mysql_error()) {
                trigger_error(mysql_error(), E_USER_ERROR);
            }
            if (mysql_affected_rows() < 1) {
                trigger_error("Note insert failed", E_USER_ERROR);
            }
            $sql = "UPDATE `{$dbTasks}` SET lastupdated=NOW() WHERE id={$refid}";
            mysql_query($sql);
            if (mysql_error()) {
                trigger_error(mysql_error(), E_USER_ERROR);
            }
            html_redirect($rpath);
        }
        break;
    case '':
    default:
        include APPLICATION_INCPATH . 'htmlheader.inc.php';
        echo add_note_form(0, 0);
        include APPLICATION_INCPATH . 'htmlfooter.inc.php';
}
예제 #2
0
        //         echo "<p><strong>{$strReverseLinks}</strong>:</p>";
        //         echo show_links('tasks', $task->id, 0, '', 'rl');
        //
        //         echo "</div>";
        //
        //         echo show_create_links('tasks', $task->id);
        //
        echo "</div>";
        // Notes
        echo "<div style='width: 48%; float: right; border: 1px solid #CCCCFF;'>";
        echo add_note_form(NOTE_TASK, $taskid);
        echo show_notes(NOTE_TASK, $taskid);
        echo "</div>";
    } elseif ($mode == 'incident') {
        echo "<div style='width: 48%; margin-left: auto; margin-right: auto;border: 1px solid #CCCCFF;'>";
        echo add_note_form(NOTE_TASK, $taskid);
        echo show_notes(NOTE_TASK, $taskid, FALSE);
        echo "</div>";
    }
} else {
    echo user_alert($strNoMatchingTask, E_USER_WARNING);
}
if ($mode != 'incident') {
    echo "</div>";
}
echo "<div style='clear:both; padding-top: 20px;'>";
if ($mode != 'incident') {
    echo "<p align='center'><a href='tasks.php'>{$strTaskList}</a></p>";
} else {
    echo "<p align='center'><a href=task_edit.php?id={$taskid}&amp;action=markcomplete&amp;incident={$incidentid}>{$strMarkComplete}</a> | <a href='tasks.php?incident={$id}'>{$strActivityList}</a></p>";
}