?? process.php
字號:
<?php/* * ITMS ValleyData source file version 1.0 May 11, 2001 * * Shows information about all processes user has access to * * * Internet Task Management System: An online system used for recording information about and assigning tasks and processes. * Copyright (C) 2001 ValleyData Programming Group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * See file named "gpl.txt" included with source code or * visit http://www.gnu.org/copyleft/gpl.txt on the internet. */$title="Processes";include("header.php");print("<IMG SRC=\"images/current_processes.jpg\" WIDTH=\"400\" HEIGHT=\"41\" BORDER=\"0\" ALT=\"Current Processes:\">");db_open();db_use();$query = "SELECT * FROM processes WHERE group_owned = '0' AND owner = '$user_id' ORDER BY title";$result = db_query($query); // display processes you have access to$table_separator_string = "table-separator-even";$row_separator_num_private = 0;while($row = db_fetch_row($result)){ $row_separator_num_private++; if($row_separator_num_private % 2 == 0) $table_separator_string = "table-separator-even"; else $table_separator_string = "table-separator-odd"; $pid = $row["PID"]; $tasks_private = get_tasks_in_process($pid); $task_size = count($tasks_private); $tasks_string = ""; $curr = 0; foreach($tasks_private as $task) { $curr++; if($task_size == $curr) $tasks_string .= $task["TITLE"]; else $tasks_string .= $task["TITLE"] . ", "; } $process_rows_private .= "<tr class=\"$table_separator_string\">\n" . //Added Columns below for Process Assign, Edit, and Delete Shortcuts - Matt Palmerlee 5/20/2003 "<td><a href=\"process_assign2.php?process=" . $pid . "\"><IMG SRC=\"images/assign.jpg\" WIDTH=\"25\" HEIGHT=\"25\" BORDER=\"0\" ALT=\"Assign Process\"></a></td>". "<td><a href=\"process_edit.php?edit_process_id=" . $pid . "\"><IMG SRC=\"images/edit.jpg\" WIDTH=\"25\" HEIGHT=\"25\" BORDER=\"0\" ALT=\"Edit Process\"></a></td>" . "<td><a href=\"process_delete.php?delete_process_id=" . $pid . "\"><IMG SRC=\"images/delete.jpg\" WIDTH=\"25\" HEIGHT=\"25\" BORDER=\"0\" ALT=\"Delete Process\"></a></td></td>" . "<td>" . $row["TITLE"] . "</td>\n<td>" . nl2br($row["DEFAULT_INFO"]) . "</td>\n<td>" . $tasks_string . "</td>\n" . "</td>\n</tr>\n";}$query = "SELECT * FROM user_groups, processes " ."WHERE user_groups.user_id = '$user_id' AND processes.group_owned = '1' AND processes.owner = user_groups.gid "."ORDER BY title";$result = db_query($query); // get all the processes user has access to$table_separator_string = "table-separator-even";$row_separator_num_group = 0;while($row = db_fetch_row($result)){ $row_separator_num_group++; if($row_separator_num_group % 2 == 0) $table_separator_string = "table-separator-even"; else $table_separator_string = "table-separator-odd"; $pid = $row["PID"]; $tasks_group = get_tasks_in_process($pid); $tasks_string = ""; $task_size = count($tasks_group); $tasks_string = ""; $curr = 0; foreach($tasks_group as $task) { $curr++; if($task_size == $curr) $tasks_string .= $task["TITLE"]; else $tasks_string .= $task["TITLE"] . ", "; } $process_owner = get_group_name($row["GID"]); //Added Columns below for Process Assign, Edit, and Delete Shortcuts - Matt Palmerlee 5/20/2003 $process_rows_group .= "<tr class=\"$table_separator_string\">\n" . "<td><a href=\"process_assign2.php?process=" . $pid . "\"><IMG SRC=\"images/assign.jpg\" WIDTH=\"25\" HEIGHT=\"25\" BORDER=\"0\" ALT=\"Assign Process\"></a></td>". "<td><a href=\"process_edit.php?edit_process_id=" . $pid . "\"><IMG SRC=\"images/edit.jpg\" WIDTH=\"25\" HEIGHT=\"25\" BORDER=\"0\" ALT=\"Edit Process\"></a></td>" . "<td><a href=\"process_delete.php?delete_process_id=" . $pid . "\"><IMG SRC=\"images/delete.jpg\" WIDTH=\"25\" HEIGHT=\"25\" BORDER=\"0\" ALT=\"Delete Process\"></a></td></td>" . "<td>" . $row["TITLE"] . "</td>\n<td>" . nl2br($row["DEFAULT_INFO"]) . "</td>\n<td>$process_owner</td>\n<td>" . $tasks_string . "</td>\n" . "</td>\n</tr>\n";}?><H3>Private Processes:</H3><table border="0"><tr class="table-header"><td>Name</td><td>Description</td><td>Tasks in Process</td></tr><?phpif($row_separator_num_private != 0) print($process_rows_private);else print("<tr class=\"$table_separator_string\"><td colspan=\"3\">No Private Processes</td></tr>\n");?></table><H3>Group Processes:</H3><table border="0"><tr class="table-header"><td>Name</td><td>Description</td><td>Owned By</td><td>Tasks in Process</td></tr><?phpif($row_separator_num_group != 0) print($process_rows_group);else print("<tr class=\"$table_separator_string\"><td colspan=\"4\">No Group Processes</td></tr>\n");?></table><p><?php include("footer.php"); ?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -