示例#1
0
         $get_incidents_result = get_incidents();
         display_incidents($get_incidents_result, $php_self);
     } else {
         rm_line_form($_GET['idx'], $php_self);
     }
     break;
 case "show_incident_details":
     show_incident_details($_GET['idx'], $php_self, $allow_edit);
     break;
 case "view_crewmembers_incidents":
     $get_incidents_result = get_incidents($_GET['crewmember_id']);
     view_crewmembers_incidents($get_incidents_result, $_GET['crewmember_id'], $php_self);
     break;
 case "edit_line":
     if (isset($_POST['status']) && $_POST['status'] == "edit") {
         edit_line($_POST['idx'], $php_self);
         edit_line_form($_POST['idx'], $php_self);
     } else {
         edit_line_form($_GET['idx'], $php_self);
     }
     break;
 case "delete_attached_file":
     if (isset($_POST['file_id']) && $_POST['file_id'] != "") {
         delete_attached_file($_POST['file_id']);
     }
     edit_line_form($_GET['idx'], $php_self);
     break;
 case "get_incidents":
 default:
     $get_incidents_result = get_incidents();
     display_incidents($get_incidents_result, $php_self);
示例#2
0
文件: looklist.php 项目: Br3nda/wrms
    echo "<tr><td colspan=99><H3>No codes found</h3></td></tr>";
} else {
    for ($i = 0; $i < pg_NumRows($result); $i++) {
        $lookup = pg_Fetch_Object($result, $i);
        // Note these tags aren't terminated until below...
        printf("<tr class=row%1d%s>\n", $i % 2, "{$action}" == "edit" && "{$lookup_code}" == "{$lookup->lookup_code}" ? " valign=top" : "");
        $maxdesc = max($maxdesc, strlen($lookup->lookup_desc));
        if ("{$action}" == "edit" && "{$lookup_code}" == "{$lookup->lookup_code}") {
            edit_line();
        } else {
            echo "<td class=sml>{$lookup->lookup_seq}&nbsp;</td>";
            echo "<td class=sml>{$lookup->lookup_code}&nbsp;</td>";
            echo "<td class=sml>{$lookup->lookup_desc}&nbsp;</td>";
            echo "<td class=sml>{$lookup->lookup_misc}&nbsp;</td>\n";
            echo "<td align=center class=sml><font size=1>\n";
            echo "<a class=submit href=\"{$look_href}&lookup_code=" . rawurlencode($lookup->lookup_code) . "&action=edit\">Edit</a> \n";
            echo "<a class=submit href=\"{$look_href}&lookup_code=" . rawurlencode($lookup->lookup_code) . "&action=delete\">Delete</a>";
            echo "</font></td>";
        }
        echo "</tr>\n";
    }
}
if (!$edited) {
    echo "<tr valign=top>\n";
    edit_line();
    echo "</tr>\n";
}
echo "</table>\n";
?>