home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / dotproject / modules / ticketsmith / reattachticket.php < prev    next >
Encoding:
PHP Script  |  2003-07-15  |  681 b   |  23 lines

  1. <?php
  2. //update task
  3. $newparent = dpGetParam( $_GET, 'newparent', 0);
  4. $ticket = dpgetparam( $_GET, 'ticket', 0 );
  5.  
  6. $sql1 = "update tickets set parent = $newparent,
  7.   assignment = 9999,
  8.   type = 'Client Followup'
  9.   where ticket = $ticket";
  10.  
  11. header("Location: index.php?m=ticketsmith");
  12. if (isset($newparent) && isset($ticket) && $newparent != 0 && $ticket != 0) {
  13.   // error_log("Updating ticket - $sql1");
  14.   mysql_query($sql1);
  15.   // error_log( mysql_error());
  16.   $sql2 = "update tickets set activity = '" . time() . "' where ticket = $newparent";
  17.   // error_log($sql2);
  18.   mysql_query($sql2);
  19.   // error_log($mysql_error());
  20. }
  21. // else error_log( "Ticket has not been reassigned");
  22. ?>
  23.