当前位置: 首页>>代码示例>>PHP>>正文


PHP Schedule::find_by_ticket_id方法代码示例

本文整理汇总了PHP中Schedule::find_by_ticket_id方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::find_by_ticket_id方法的具体用法?PHP Schedule::find_by_ticket_id怎么用?PHP Schedule::find_by_ticket_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Schedule的用法示例。


在下文中一共展示了Schedule::find_by_ticket_id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: closeTicket

 /**
  * method to close a ticket
  * 
  */
 public function closeTicket()
 {
     if (isset($_REQUEST['id']) && !empty($_REQUEST["id"])) {
         $partTicket = Ticket::find_by_id($_REQUEST["id"]);
         $partTicket->status = "Closed";
         $theUser = Employee::find_by_id($_SESSION['emp_ident']);
         $cemail = !empty($_REQUEST['cemail']) ? explode(",", $_REQUEST['cemail']) : "";
         // print_r($partTicket);
         array_push($cemail, $partTicket->contact_email, $theUser->emp_email);
         $client = Client::find_by_id($partTicket->client_id);
         array_push($cemail, $client->email);
         $partTicket->datemodified = date("Y-m-d H:i:s");
         $msg = "Your Complaint ticket status has been closed<br />";
         $subject = "Robert Johnson Holdings(Technical Support) Ticket #'" . $partTicket->id . "' Close";
         //print_r($cemail);
         //mail("amedora09@gmail.com","Robert Johnson Holdings, Technical Support" , "all good");
         if ($partTicket->update()) {
             $schedule = Schedule::find_by_ticket_id($_REQUEST["id"]);
             if ($schedule) {
                 $schedule->status = "Closed";
                 $schedule->update();
             }
             $this->sendMail("Customer", $subject, $msg, $cemail);
             return true;
         } else {
             return false;
         }
     }
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:33,代码来源:support_model.php

示例2: detail

 /**
  * this the detail listing 
  * for support session between 
  * customer and administrator
  */
 public function detail($id = "")
 {
     @$this->loadModel("Support");
     $datum = $this->model->getData();
     $replyData = $this->model->getTicketData($id);
     //$this->view->state = $datum['state'];
     $uri = new Url("");
     $ticket = $replyData['ticket'];
     $replies = $replyData["replies"];
     //$this->view->employee =   Employee::find_by_sql("SELECT * FROM employee WHERE emp_dept='5'");
     $this->view->country = $datum['country'];
     $this->view->ticket = $replyData['ticket'];
     //$this->view->mymenu = $this->model->getById($id);
     $pgdetail = "";
     /**
      * hhhhhh
      */
     if ($ticket) {
         /**
          * Load ticket buttons
          */
         $pgdetail .= "<div class='row'><input type='hidden' name='cid' id='cid' value='{$ticket->prod_id}' />\n     \t<div class='large-12 columns'><div class='btn-group'><a href='" . $uri->link("support/ticketlist") . "'class='btn btn-info button'  >&laquo; Back</a>";
         if ($ticket->status != "Closed") {
             //if status is not closed
             /*Check if a technician has been assigned*/
             if (Schedule::find_by_ticket_id($ticket->id)) {
                 /*If exist do not display assign task button*/
                 $pgdetail .= "<a href='#' id='dh' class='btn btn-primary button'> Reply </a><a href='#' id='close' class='btn btn-danger button' >Close Ticket </a>";
             } else {
                 $pgdetail .= "<a href='#' id='dh' class='btn btn-primary button'> Reply </a><a href='#' id='close' class='btn btn-danger button' >Close Ticket </a><a href='#' data-reveal-id='myModal5' class='btn btn-info button'>Assign Task to Employee</a>";
             }
         }
         $pgdetail .= "</div>\n     </div></div>\n         </div> <!--closing to reload close -->\n         <div id='hideme'><form action='" . $uri->link("support/doCreateAdminReply/" . $ticket->id . "") . "' method='post' enctype='multipart/form-data' name='frmEmp5' id='frmEmp5'>\n\t     <fieldset><div id='transalert'></div>\n   \t       \n\t            <div class='row'>\n                    <div class='large-12 columns'>\n                    <input type='hidden'  name='cname' id='cname' value='Customer Support Robert Johnson Holdings'  />\n                            <input type='hidden' id='disid' name='disid' value='" . $ticket->id . "' />\n                            \n                            \n                            <div>Enter emails to copy here separate with commas</div>\n\t                      <input type='text' id='cemail' name='cemail' />\n\t\t                    <input type='hidden'   name='email' id='email'  />\n\t\t                    <div id='tm2'></div>\n                            <div>Response</div>\n\t                      <textarea  name='issue' id='issue' ></textarea></td>\n                  \n\t\t                <a class='btn btn-info' id='replysave' >Send Reply </a>\n                    </div>\n\t\t                    \n\t\t                  \n\t\t                    \n          </fieldset>\n           </form></div>";
         /**
          * form close
          */
         $pgdetail .= "<div id='granddiv'><div id='divclose'><div class='row'>\n     \t<div class='ticketdetailscontainer'>\n        <div class='large-3 columns'>\n            <div class='internalpadding'>\n                Submitted\n                <div class='detail'>" . $ticket->datecreated . "</div>\n            </div>\n        </div>\n        <div class='large-3 columns'>\n            <div class='internalpadding'>\n                Department\n                <div class='detail'>{$ticket->department}</div>\n            </div>\n        </div>\n        <div class='large-3 columns'>\n            <div class='internalpadding'>\n                Priority\n                <div class='detail'>{$ticket->priority}</div>\n            </div>\n        </div>\n        <div class='large-3 columns'>\n            <div class='internalpadding'>\n                Status\n                <div class='detail'>";
         $pgdetail .= $ticket->status == "Open" ? "<span style='color:#779500'>Open</span>" : "<span style='color:#f00'>{$ticket->status}</span>";
         $pgdetail .= "</div>\n            </div>\n        </div>\n        \n        <div class='clear'></div>\n    <br clear='all' />\n                </div>\n  \t </div><!-- Erred Close of grand div -->";
     }
     $pgdetail .= "\n           <div class='ticketmsgs'>\n           ";
     if ($replies) {
         foreach ($replies as $reply) {
             if ($reply->sender_type == "Client") {
                 $pgdetail .= "<div class='clientheader'>\n                    <div style='float:right;'>{$reply->datecreated}</div>\n                                {$reply->sender_name} || Client\n                    </div>\n                    <div class='clientmsg'>\n                                {$reply->message}\n                   </div>";
             } else {
                 $pgdetail .= "<div class='adminheader'>\n                    <div style='float:right;'>{$reply->datecreated}</div>\n                            {$reply->sender_name} || Staff\n                    </div>\n                    \n                    <div class='adminmsg'>\n\n                        {$reply->message}\n                                             \n                        <div class='clear'></div>\n                    </div>";
             }
         }
     }
     $pgdetail .= "</div></div>";
     $this->view->myReplyData = $pgdetail;
     $this->view->render("support/detail");
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:59,代码来源:support.php

示例3:

        $prod = Cproduct::find_by_terminal_id($pending->terminal_id);
        echo "<td>";
        if (empty($pending->location)) {
            echo $prod->install_address . ", " . $prod->install_city;
        } else {
            echo $pending->location;
        }
        echo " </td>";
        echo "<td>";
        //$pending->client_name
        $myclient = Client::find_by_id($pending->client_id);
        if ($myclient) {
            echo $myclient->name;
        }
        echo "</td><td>";
        $schedule = Schedule::find_by_ticket_id($pending->id);
        //print_r($schedule);
        if ($schedule) {
            $myengineer = Employee::find_by_id($schedule->emp_id);
            echo $myengineer ? $myengineer->emp_lname . " " . $myengineer->emp_fname : "";
        }
        echo " </td><td>{$pending->issue}</td><td>";
        if ($pending->status == 'Open') {
            echo "<span class='label bg-red' style='padding:5px'>{$pending->status}";
        } else {
            echo "<span class='label bg-blue' style='padding:5px'>Pending";
        }
        echo "</td><td>{$pending->datemodified} </td><td><a href='" . $uri->link("support/detail/" . $pending->id . "") . "'>View</a></td><td>\n                <select sid='{$pending->id}' class='cschedule2'><option values=''>--Select--</option><option values='0'>Open</option><option values='1'>Closed</option><option values='2'>In Progress</option></select></td></tr>";
    }
}
?>
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:31,代码来源:index.php


注:本文中的Schedule::find_by_ticket_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。