コード例 #1
0
     echo "&nbsp<a href=\"" . $sess->self_url() . $extra . "\">Back to Tickets.</a><br>\n";
     page_close();
     exit;
 case "Save":
     if ($id) {
         $submit = "Edit";
     } else {
         $submit = "Add";
     }
 case "Add":
 case "Edit":
     if (isset($auth)) {
         if (!$f->validate()) {
             $cmd = $submit;
             echo "<h2>{$cmd} Support Tickets</h2>\n";
             $f->display();
             page_close();
             exit;
         } else {
             $Location = $_POST["SrchLocation"];
             echo "Saving..{$Location}..";
             if ($Status == 'Closed') {
                 $Closed = date("Y-m-d H:i:s");
             }
             $f->save_values();
             if (!$id) {
                 $db->query("SELECT LAST_INSERT_ID();");
                 $db->next_record();
                 $TicketNo = $db->f(0);
             } else {
                 $TicketNo = $id;
コード例 #2
0
         }
     }
 case "Edit":
     echo "<font class=bigTextBold>{$cmd} Support Comments <a href=SupportTickets.php>Back to Support Tickets List</a></font>\n";
     echo "<table cellspacing=10><tr><td valign=top>";
     $cmd = "View";
     if ($ContactID) {
         $mf = new my_userinfoform();
         $mf->find_values($ContactID);
         $mf->freeze();
         $mf->display();
     }
     echo "</td><td>\n";
     $cmd = "View";
     $st->freeze();
     $st->display();
     echo "</td></tr></table>";
     $cmd = $origcmd;
     printf("<table>\n");
     $db->query("select * from SupportComments where TicketNo='" . $TicketNo . "'");
     while ($db->next_record()) {
         $send = " <a href=" . $sess->url("/SupportComments.php") . $sess->add_query(array("cmd" => "Send", "id" => $db->f(0))) . ">send</a>";
         if (empty($Mobile) and empty($Mail)) {
             $send = "";
         }
         printf("<tr><td>%s</td><td>%s:</td><td>%s</td><td>%s</td><td>{$send}</td>" . "</tr>\n", $db->f("TimeStamp"), $db->f("ByUser"), $db->f("UserName"), stripslashes($db->f("Comment")));
     }
     echo "</table>";
     $f->display();
     break;
 default: