update v1.0.7.9.1 R.C.
This commit is contained in:
@@ -182,7 +182,7 @@ class MailController extends Controller
|
|||||||
$form_data = null;
|
$form_data = null;
|
||||||
$team_assign = null;
|
$team_assign = null;
|
||||||
$ticket_status = null;
|
$ticket_status = null;
|
||||||
$result = $this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response);
|
$result = $this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail->getAttachments());
|
||||||
|
|
||||||
if ($result[1] == true) {
|
if ($result[1] == true) {
|
||||||
$ticket_table = Tickets::where('ticket_number', '=', $result[0])->first();
|
$ticket_table = Tickets::where('ticket_number', '=', $result[0])->first();
|
||||||
|
@@ -316,8 +316,10 @@ class TicketController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// this param is used for inline attachments via email
|
||||||
|
$inline_attachment = null;
|
||||||
//create user
|
//create user
|
||||||
if ($this->create_user($email, $fullname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source->id, $headers, $help->department, $assignto, $form_data, $auto_response, $status)) {
|
if ($this->create_user($email, $fullname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source->id, $headers, $help->department, $assignto, $form_data, $auto_response, $status, $inline_attachment)) {
|
||||||
return Redirect('newticket')->with('success', Lang::get('lang.Ticket-created-successfully'));
|
return Redirect('newticket')->with('success', Lang::get('lang.Ticket-created-successfully'));
|
||||||
} else {
|
} else {
|
||||||
return Redirect('newticket')->with('fails', 'fails');
|
return Redirect('newticket')->with('fails', 'fails');
|
||||||
@@ -647,7 +649,7 @@ class TicketController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type bool
|
* @return type bool
|
||||||
*/
|
*/
|
||||||
public function create_user($emailadd, $username, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $auto_response, $status)
|
public function create_user($emailadd, $username, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $auto_response, $status, $mail_data)
|
||||||
{
|
{
|
||||||
// define global variables
|
// define global variables
|
||||||
$email;
|
$email;
|
||||||
@@ -721,7 +723,7 @@ class TicketController extends Controller
|
|||||||
$body2 = null;
|
$body2 = null;
|
||||||
try {
|
try {
|
||||||
if ($auto_response == 0) {
|
if ($auto_response == 0) {
|
||||||
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['name' => $username, 'email' => $emailadd], $message = ['subject' => $updated_subject, 'scenario' => 'create-ticket'], $template_variables = ['user' => $user->first_name, 'ticket_number' => $ticket_number2, 'department_sign' => '']);
|
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['name' => $username, 'email' => $emailadd], $message = ['subject' => $updated_subject, 'scenario' => 'create-ticket'], $template_variables = ['user' => $username, 'ticket_number' => $ticket_number2, 'department_sign' => '']);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
}
|
}
|
||||||
@@ -770,7 +772,7 @@ class TicketController extends Controller
|
|||||||
$emails_to_be_sent = array_unique($set_mails, SORT_REGULAR);
|
$emails_to_be_sent = array_unique($set_mails, SORT_REGULAR);
|
||||||
foreach ($emails_to_be_sent as $email_data) {
|
foreach ($emails_to_be_sent as $email_data) {
|
||||||
try {
|
try {
|
||||||
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['user' => $email_data['to_user'], 'email' => $email_data['to_email']], $message = ['subject' => $updated_subject, 'body' => $body, 'scenario' => $mail], $template_variables = ['ticket_agent_name' => $email_data['to_user_name'], 'ticket_client_name' => $username, 'ticket_client_email' => $emailadd, 'user' => $email_data['to_user_name'], 'ticket_number' => $ticket_number2, 'email_address' => $emailadd, 'name' => $ticket_creator]);
|
$this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticketdata->dept_id), $to = ['user' => $email_data['to_user'], 'email' => $email_data['to_email']], $message = ['subject' => $updated_subject, 'body' => $body, 'scenario' => $mail, 'add_embedded_image' => $mail_data], $template_variables = ['ticket_agent_name' => $email_data['to_user_name'], 'ticket_client_name' => $username, 'ticket_client_email' => $emailadd, 'user' => $email_data['to_user_name'], 'ticket_number' => $ticket_number2, 'email_address' => $emailadd, 'name' => $ticket_creator]);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,7 @@ class TicketWorkflowController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type response
|
* @return type response
|
||||||
*/
|
*/
|
||||||
public function workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response)
|
public function workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail)
|
||||||
{
|
{
|
||||||
$contact_details = ['email' => $fromaddress, 'email_name' => $fromname, 'subject' => $subject, 'message' => $body];
|
$contact_details = ['email' => $fromaddress, 'email_name' => $fromname, 'subject' => $subject, 'message' => $body];
|
||||||
$ticket_settings_details = ['help_topic' => $helptopic, 'sla' => $sla, 'priority' => $priority, 'source' => $source, 'dept' => $dept, 'assign' => $assign, 'team' => $team_assign, 'status' => $ticket_status, 'reject' => false];
|
$ticket_settings_details = ['help_topic' => $helptopic, 'sla' => $sla, 'priority' => $priority, 'source' => $source, 'dept' => $dept, 'assign' => $assign, 'team' => $team_assign, 'status' => $ticket_status, 'reject' => false];
|
||||||
@@ -169,7 +169,7 @@ class TicketWorkflowController extends Controller
|
|||||||
if ($ticket_settings_details['reject'] == true) {
|
if ($ticket_settings_details['reject'] == true) {
|
||||||
return ['0' => false, '1' => false];
|
return ['0' => false, '1' => false];
|
||||||
} else {
|
} else {
|
||||||
$create_ticket = $this->TicketController->create_user($contact_details['email'], $contact_details['email_name'], $contact_details['subject'], $contact_details['message'], $phone, $phonecode, $mobile_number, $ticket_settings_details['help_topic'], $ticket_settings_details['sla'], $ticket_settings_details['priority'], $source, $collaborator, $ticket_settings_details['dept'], $ticket_settings_details['assign'], $form_data, $auto_response, $ticket_settings_details['status']);
|
$create_ticket = $this->TicketController->create_user($contact_details['email'], $contact_details['email_name'], $contact_details['subject'], $contact_details['message'], $phone, $phonecode, $mobile_number, $ticket_settings_details['help_topic'], $ticket_settings_details['sla'], $ticket_settings_details['priority'], $source, $collaborator, $ticket_settings_details['dept'], $ticket_settings_details['assign'], $form_data, $auto_response, $ticket_settings_details['status'], $mail);
|
||||||
|
|
||||||
return $create_ticket;
|
return $create_ticket;
|
||||||
}
|
}
|
||||||
|
@@ -83,9 +83,10 @@ class ClientTicketController extends Controller
|
|||||||
$team_assign = null;
|
$team_assign = null;
|
||||||
$ticket_status = null;
|
$ticket_status = null;
|
||||||
$auto_response = 0;
|
$auto_response = 0;
|
||||||
|
|
||||||
|
$inline_attachment = null;
|
||||||
|
|
||||||
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response);
|
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $inline_attachment);
|
||||||
|
|
||||||
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Client\helpdesk;
|
|||||||
// controllers
|
// controllers
|
||||||
use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController;
|
use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Controllers\Common\FileuploadController;
|
||||||
// requests
|
// requests
|
||||||
use App\Http\Requests\helpdesk\ClientRequest;
|
use App\Http\Requests\helpdesk\ClientRequest;
|
||||||
use App\Model\helpdesk\Agent\Department;
|
use App\Model\helpdesk\Agent\Department;
|
||||||
@@ -70,8 +71,11 @@ class FormController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$phonecode = '';
|
$phonecode = '';
|
||||||
}
|
}
|
||||||
|
$fileupload = new FileuploadController();
|
||||||
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes'))->with('phonecode', $phonecode);
|
$fileupload = $fileupload->file_upload_max_size();
|
||||||
|
$max_size_in_bytes = $fileupload[0];
|
||||||
|
$max_size_in_actual = $fileupload[1];
|
||||||
|
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'max_size_in_bytes', 'max_size_in_actual'))->with('phonecode', $phonecode);
|
||||||
} else {
|
} else {
|
||||||
return \Redirect::route('home');
|
return \Redirect::route('home');
|
||||||
}
|
}
|
||||||
@@ -189,7 +193,13 @@ class FormController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result = $this->TicketWorkflowController->workflow($email, $name, $subject, $details, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $department, $assignto, $team_assign, $status, $form_extras, $auto_response);
|
// this param is used for inline attachments via email
|
||||||
|
if(empty($attachments)) {
|
||||||
|
$inline_attachment = $attachments;
|
||||||
|
} else {
|
||||||
|
$inline_attachment = null;
|
||||||
|
}
|
||||||
|
$result = $this->TicketWorkflowController->workflow($email, $name, $subject, $details, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $department, $assignto, $team_assign, $status, $form_extras, $auto_response, $inline_attachment);
|
||||||
|
|
||||||
if ($result[1] == 1) {
|
if ($result[1] == 1) {
|
||||||
$ticketId = Tickets::where('ticket_number', '=', $result[0])->first();
|
$ticketId = Tickets::where('ticket_number', '=', $result[0])->first();
|
||||||
|
@@ -9,9 +9,9 @@ class FileuploadController extends Controller
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
// checking authentication
|
// checking authentication
|
||||||
$this->middleware('auth');
|
// $this->middleware('auth');
|
||||||
// checking if role is agent
|
// checking if role is agent
|
||||||
$this->middleware('role.agent');
|
// $this->middleware('role.agent');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a file size limit in bytes based on the PHP upload_max_filesize
|
// Returns a file size limit in bytes based on the PHP upload_max_filesize
|
||||||
|
@@ -84,6 +84,13 @@ class PhpMailController extends Controller
|
|||||||
$attachment = null;
|
$attachment = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Inline Attachments
|
||||||
|
if (isset($message['add_embedded_image'])) {
|
||||||
|
$add_embedded_images = $message['add_embedded_image'];
|
||||||
|
} else {
|
||||||
|
$add_embedded_images = null;
|
||||||
|
}
|
||||||
|
|
||||||
// template variables
|
// template variables
|
||||||
if (Auth::user()) {
|
if (Auth::user()) {
|
||||||
$agent = Auth::user()->user_name;
|
$agent = Auth::user()->user_name;
|
||||||
@@ -265,6 +272,40 @@ class PhpMailController extends Controller
|
|||||||
$mail->addAttachment($file_path, $file_name);
|
$mail->addAttachment($file_path, $file_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// inline images embedded as attachments
|
||||||
|
if ($add_embedded_images != null) {
|
||||||
|
// dd($add_embedded_images);
|
||||||
|
foreach ($add_embedded_images as $add_embedded_image) {
|
||||||
|
if(isset($add_embedded_image->id)) {
|
||||||
|
$cid = $add_embedded_image->id;
|
||||||
|
} else {
|
||||||
|
$cid = null;
|
||||||
|
}
|
||||||
|
if(isset($add_embedded_image->name)) {
|
||||||
|
$file_name = $add_embedded_image->name;
|
||||||
|
} else {
|
||||||
|
$file_name = null;
|
||||||
|
}
|
||||||
|
if(isset($add_embedded_image->filePath)) {
|
||||||
|
$file_path = $add_embedded_image->filePath;
|
||||||
|
} else {
|
||||||
|
$file_path = null;
|
||||||
|
}
|
||||||
|
if(isset($add_embedded_image->disposition)) {
|
||||||
|
if($add_embedded_image->disposition == 'INLINE') {
|
||||||
|
$mail->AddEmbeddedImage($file_path, $cid, $file_name);
|
||||||
|
} else {
|
||||||
|
$mail->addAttachment($file_path, $file_name);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$file_path = $add_embedded_image->getRealPath();
|
||||||
|
$file_name = $add_embedded_image->getClientOriginalName();
|
||||||
|
$mail->addAttachment($file_path, $file_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$mail->CharSet = 'utf8';
|
$mail->CharSet = 'utf8';
|
||||||
$mail->Subject = $subject;
|
$mail->Subject = $subject;
|
||||||
if ($template == 'ticket-reply-agent') {
|
if ($template == 'ticket-reply-agent') {
|
||||||
|
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Model\helpdesk\Ticket;
|
namespace App\Model\helpdesk\Ticket;
|
||||||
|
|
||||||
use App\BaseModel;
|
//use App\BaseModel;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class Ticket_Thread extends BaseModel
|
class Ticket_Thread extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'ticket_thread';
|
protected $table = 'ticket_thread';
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
7
nbproject/project.properties
Normal file
7
nbproject/project.properties
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
include.path=${php.global.include.path}
|
||||||
|
php.version=PHP_55
|
||||||
|
source.encoding=UTF-8
|
||||||
|
src.dir=.
|
||||||
|
tags.asp=false
|
||||||
|
tags.short=false
|
||||||
|
web.root=.
|
9
nbproject/project.xml
Normal file
9
nbproject/project.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
|
<type>org.netbeans.modules.php.project</type>
|
||||||
|
<configuration>
|
||||||
|
<data xmlns="http://www.netbeans.org/ns/php-project/1">
|
||||||
|
<name>faveo helpdesk master</name>
|
||||||
|
</data>
|
||||||
|
</configuration>
|
||||||
|
</project>
|
@@ -1394,5 +1394,12 @@ return [
|
|||||||
'use_subject' => 'Use Subject',
|
'use_subject' => 'Use Subject',
|
||||||
'reopen' => 'Reopen',
|
'reopen' => 'Reopen',
|
||||||
'invalid_attempt' => 'Invalid Attempt',
|
'invalid_attempt' => 'Invalid Attempt',
|
||||||
|
|
||||||
|
/**--------------------------------------------------------------------------------------------
|
||||||
|
* Attachment Updated
|
||||||
|
* --------------------------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
'unable_to_load_file_type' => 'Unable to load file type',
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@@ -75,7 +75,6 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where(
|
|||||||
if ($rating_value == null) {
|
if ($rating_value == null) {
|
||||||
$avg_rating = '0';
|
$avg_rating = '0';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$avg_rate = explode('.', $rating_value);
|
$avg_rate = explode('.', $rating_value);
|
||||||
$avg_rating = $avg_rate[0];
|
$avg_rating = $avg_rate[0];
|
||||||
}
|
}
|
||||||
@@ -109,7 +108,6 @@ if ($thread->title != "") {
|
|||||||
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
|
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
|
||||||
<?php
|
<?php
|
||||||
Event::fire(new \App\Events\TicketBoxHeader($user->id));
|
Event::fire(new \App\Events\TicketBoxHeader($user->id));
|
||||||
|
|
||||||
if ($group->can_edit_ticket == 1) {
|
if ($group->can_edit_ticket == 1) {
|
||||||
?>
|
?>
|
||||||
<button type="button" class="btn btn-default" id="Edit_Ticket" data-toggle="modal" data-target="#Edit"><i class="fa fa-edit" style="color:green;"> </i> {!! Lang::get('lang.edit') !!}</button>
|
<button type="button" class="btn btn-default" id="Edit_Ticket" data-toggle="modal" data-target="#Edit"><i class="fa fa-edit" style="color:green;"> </i> {!! Lang::get('lang.edit') !!}</button>
|
||||||
@@ -444,7 +442,7 @@ if ($thread->title != "") {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- internal note -->
|
<!-- internal note -->
|
||||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}" id="internal_content_class">
|
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>{!! Lang::get('lang.internal_note') !!}:<span class="text-red"> *</span></label>
|
<label>{!! Lang::get('lang.internal_note') !!}:<span class="text-red"> *</span></label>
|
||||||
</div>
|
</div>
|
||||||
@@ -491,7 +489,7 @@ if ($thread->title != "") {
|
|||||||
<?php echo $conversations->setPath(url('/thread/' . $tickets->id))->render(); ?>
|
<?php echo $conversations->setPath(url('/thread/' . $tickets->id))->render(); ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="col-md-12" >
|
<div class="col-md-12">
|
||||||
<link rel="stylesheet" type="text/css" href="{{asset("lb-faveo/css/faveo-css.css")}}">
|
<link rel="stylesheet" type="text/css" href="{{asset("lb-faveo/css/faveo-css.css")}}">
|
||||||
<link href="{{asset("lb-faveo/css/jquery.rating.css")}}" rel="stylesheet" type="text/css" />
|
<link href="{{asset("lb-faveo/css/jquery.rating.css")}}" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
@@ -507,7 +505,6 @@ if ($thread->title != "") {
|
|||||||
<?php
|
<?php
|
||||||
$ConvDate1 = $conversation->created_at;
|
$ConvDate1 = $conversation->created_at;
|
||||||
$ConvDate = explode(' ', $ConvDate1);
|
$ConvDate = explode(' ', $ConvDate1);
|
||||||
|
|
||||||
$date = $ConvDate[0];
|
$date = $ConvDate[0];
|
||||||
$time = $ConvDate[1];
|
$time = $ConvDate[1];
|
||||||
$time = substr($time, 0, -3);
|
$time = substr($time, 0, -3);
|
||||||
@@ -521,7 +518,7 @@ if ($thread->title != "") {
|
|||||||
}
|
}
|
||||||
if($conversation->user_id != null) {
|
if($conversation->user_id != null) {
|
||||||
$role = App\User::where('id', '=', $conversation->user_id)->first();
|
$role = App\User::where('id', '=', $conversation->user_id)->first();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -555,36 +552,40 @@ if ($thread->title != "") {
|
|||||||
// echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> ";
|
// echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> ";
|
||||||
$body = $conversation->body;
|
$body = $conversation->body;
|
||||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
|
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
|
||||||
// $i = 0;
|
|
||||||
foreach ($attachments as $attachment) {
|
|
||||||
// $i++;
|
|
||||||
if ($attachment->type == 'jpg' || $attachment->type == 'png') {
|
|
||||||
$image = @imagecreatefromstring($attachment->file);
|
|
||||||
ob_start();
|
|
||||||
imagejpeg($image, null, 80);
|
|
||||||
$data = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
$var = '<img style="max-width:200px;max-height:200px;" src="data:image/' . $attachment->type . ';base64,' . base64_encode($data) . '" />';
|
|
||||||
// echo $var;
|
|
||||||
// echo $attachment->name;
|
|
||||||
// $body = explode($attachment->name, $body);
|
|
||||||
$body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body);
|
|
||||||
|
|
||||||
$string = $body;
|
foreach ($attachments as $attachment) {
|
||||||
$start = "<head>";
|
if ($attachment->type == 'jpg' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||||
$end = "</head>";
|
if($attachment->size > 0) {
|
||||||
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
$image = @imagecreatefromstring($attachment->file);
|
||||||
|
if($image == false) {
|
||||||
|
} else {
|
||||||
|
ob_start();
|
||||||
|
imagejpeg($image, null, 80);
|
||||||
|
$data = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
$var = '<img style="max-width:200px;max-height:200px;" src="data:image/' . $attachment->type . ';base64,' . base64_encode($data) . '" />';
|
||||||
|
// echo $var;
|
||||||
|
// echo $attachment->name;
|
||||||
|
// $body = explode($attachment->name, $body);
|
||||||
|
$body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body);
|
||||||
|
$string = $body;
|
||||||
|
$start = "<head>";
|
||||||
|
$end = "</head>";
|
||||||
|
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$ini = strpos($string, $start);
|
||||||
|
$ini += strlen($start);
|
||||||
|
$len = strpos($string, $end, $ini) - $ini;
|
||||||
|
$parsed = substr($string, $ini, $len);
|
||||||
|
$body2 = $parsed;
|
||||||
|
$body = str_replace($body2, " ", $body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$ini = strpos($string, $start);
|
|
||||||
$ini += strlen($start);
|
|
||||||
$len = strpos($string, $end, $ini) - $ini;
|
|
||||||
$parsed = substr($string, $ini, $len);
|
|
||||||
$body2 = $parsed;
|
|
||||||
$body = str_replace($body2, " ", $body);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// echo $body;
|
// echo $body;
|
||||||
// $body = explode($attachment->file, $body);
|
// $body = explode($attachment->file, $body);
|
||||||
@@ -619,9 +620,6 @@ if ($thread->title != "") {
|
|||||||
?>
|
?>
|
||||||
<div class="timeline-item">
|
<div class="timeline-item">
|
||||||
<span style="color:#fff;"><div class="pull-right"> <table><tbody>
|
<span style="color:#fff;"><div class="pull-right"> <table><tbody>
|
||||||
@if($role)
|
|
||||||
@if($role->role != null)
|
|
||||||
@if($role->role != 'user' && $conversation->is_internal != 1)
|
|
||||||
@foreach($ratings as $rating)
|
@foreach($ratings as $rating)
|
||||||
@if($rating->rating_area == 'Comment Area')
|
@if($rating->rating_area == 'Comment Area')
|
||||||
<?php
|
<?php
|
||||||
@@ -634,17 +632,14 @@ if ($thread->title != "") {
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th><div class="ticketratingtitle" style="color:#3c8dbc;" >{!! $rating->name !!} </div></th> 
|
<th><div class="ticketratingtitle" style="color:#3c8dbc;" >{!! $rating->name !!} </div></th> 
|
||||||
<td style="button:disabled;">
|
<td style="button:disabled;">
|
||||||
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
|
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
|
||||||
<input type="radio" class="star star-rating-readonly" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
<input type="radio" class="star star-rating-readonly" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endforeach
|
||||||
@endif
|
|
||||||
</tbody></table></div>
|
</tbody></table></div>
|
||||||
</span>
|
</span>
|
||||||
<h3 class="timeline-header">
|
<h3 class="timeline-header">
|
||||||
@@ -723,24 +718,32 @@ if ($thread->title != "") {
|
|||||||
<ul class='mailbox-attachments clearfix'>
|
<ul class='mailbox-attachments clearfix'>
|
||||||
<?php
|
<?php
|
||||||
foreach ($attachments as $attachment) {
|
foreach ($attachments as $attachment) {
|
||||||
$size = $attachment->size;
|
|
||||||
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
$size = $attachment->size;
|
||||||
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
||||||
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
||||||
if ($attachment->poster == 'ATTACHMENT') {
|
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
||||||
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
if ($attachment->poster == 'ATTACHMENT') {
|
||||||
$image = @imagecreatefromstring($attachment->file);
|
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||||
ob_start();
|
$image = @imagecreatefromstring($attachment->file);
|
||||||
imagejpeg($image, null, 80);
|
|
||||||
$data = ob_get_contents();
|
if($image == false) {
|
||||||
ob_end_clean();
|
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||||
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||||
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
} else {
|
||||||
} else {
|
ob_start();
|
||||||
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
imagejpeg($image, null, 80);
|
||||||
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
$data = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||||
|
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||||
|
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1083,7 +1086,6 @@ if ($thread->title != "") {
|
|||||||
<div class="tab-pane active" id="ahah">
|
<div class="tab-pane active" id="ahah">
|
||||||
<div class="modal-body" id="def">
|
<div class="modal-body" id="def">
|
||||||
<div class="callout callout-info" id="hide1234" ><i class="icon fa fa-info"> </i> {!! Lang::get('lang.search_existing_users_or_add_new_users') !!}</div>
|
<div class="callout callout-info" id="hide1234" ><i class="icon fa fa-info"> </i> {!! Lang::get('lang.search_existing_users_or_add_new_users') !!}</div>
|
||||||
<div id="here"></div>
|
|
||||||
<div id="show7" style="display:none;">
|
<div id="show7" style="display:none;">
|
||||||
<div class="row col-md-12">
|
<div class="row col-md-12">
|
||||||
<div class="col-xs-5">
|
<div class="col-xs-5">
|
||||||
@@ -1095,7 +1097,7 @@ if ($thread->title != "") {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="here"></div>
|
||||||
{!! Form::model($tickets->id, ['id'=>'search-user','method' => 'PATCH'] )!!}
|
{!! Form::model($tickets->id, ['id'=>'search-user','method' => 'PATCH'] )!!}
|
||||||
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
|
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
|
||||||
<input type="text" class="form-control" name="search" id="tags" placeholder="{!! Lang::get('lang.search_by_email') !!}">
|
<input type="text" class="form-control" name="search" id="tags" placeholder="{!! Lang::get('lang.search_by_email') !!}">
|
||||||
@@ -1309,7 +1311,6 @@ if ($thread->title != "") {
|
|||||||
// $('#cand').wysihtml5();
|
// $('#cand').wysihtml5();
|
||||||
var wysihtml5Editor = $('#reply_content').wysihtml5().data("wysihtml5").editor;
|
var wysihtml5Editor = $('#reply_content').wysihtml5().data("wysihtml5").editor;
|
||||||
$('#select').on('change', function (e) {
|
$('#select').on('change', function (e) {
|
||||||
|
|
||||||
//alert('hello2');
|
//alert('hello2');
|
||||||
var $_token = $('#token').val();
|
var $_token = $('#token').val();
|
||||||
var data = $('#select').val();
|
var data = $('#select').val();
|
||||||
@@ -1323,7 +1324,6 @@ if ($thread->title != "") {
|
|||||||
dataType : 'json',
|
dataType : 'json',
|
||||||
data : ({data}),
|
data : ({data}),
|
||||||
success : function(response) {
|
success : function(response) {
|
||||||
|
|
||||||
// alert(response);
|
// alert(response);
|
||||||
wysihtml5Editor.setValue(response, true);
|
wysihtml5Editor.setValue(response, true);
|
||||||
console.log(wysihtml5Editor.getValue());
|
console.log(wysihtml5Editor.getValue());
|
||||||
@@ -1348,7 +1348,6 @@ if ($thread->title != "") {
|
|||||||
$("#loader").show();
|
$("#loader").show();
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
|
|
||||||
$("#refresh").load("../thread/{{$tickets->id}} #refresh");
|
$("#refresh").load("../thread/{{$tickets->id}} #refresh");
|
||||||
$("#refresh").show();
|
$("#refresh").show();
|
||||||
$("#loader").hide();
|
$("#loader").hide();
|
||||||
@@ -1362,7 +1361,6 @@ if ($thread->title != "") {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
//Initialize Select2 Elements
|
//Initialize Select2 Elements
|
||||||
$(".select2").select2();
|
$(".select2").select2();
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
@@ -1397,9 +1395,12 @@ if ($thread->title != "") {
|
|||||||
var message = "{!! Lang::get('lang.your_ticket_have_been_closed') !!}";
|
var message = "{!! Lang::get('lang.your_ticket_have_been_closed') !!}";
|
||||||
$("#alert11").show();
|
$("#alert11").show();
|
||||||
$('#message-success1').html(message);
|
$('#message-success1').html(message);
|
||||||
setTimeout(function() {
|
setInterval(function(){
|
||||||
window.location = document.referrer;
|
$("#alert11").hide();
|
||||||
}, 500);
|
setTimeout(function() {
|
||||||
|
window.location = document.referrer;
|
||||||
|
}, 500);
|
||||||
|
}, 2000);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
@@ -1508,13 +1509,11 @@ if ($thread->title != "") {
|
|||||||
// $('#t1').hide();
|
// $('#t1').hide();
|
||||||
// $('#t2').show();
|
// $('#t2').show();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// comment a ticket
|
// comment a ticket
|
||||||
// $('#aa').click(function() {
|
// $('#aa').click(function() {
|
||||||
// $('#t1').show();
|
// $('#t1').show();
|
||||||
// $('#t2').hide();
|
// $('#t2').hide();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// Edit a ticket
|
// Edit a ticket
|
||||||
$('#form').on('submit', function() {
|
$('#form').on('submit', function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -1575,7 +1574,6 @@ if ($thread->title != "") {
|
|||||||
// var message = "Success";
|
// var message = "Success";
|
||||||
// $('#message-success1').html(message);
|
// $('#message-success1').html(message);
|
||||||
// setInterval(function(){$("#alert11").hide(); },4000);
|
// setInterval(function(){$("#alert11").hide(); },4000);
|
||||||
|
|
||||||
var message = "Success!";
|
var message = "Success!";
|
||||||
$("#alert11").show();
|
$("#alert11").show();
|
||||||
$('#message-success1').html(message);
|
$('#message-success1').html(message);
|
||||||
@@ -1677,19 +1675,6 @@ if ($thread->title != "") {
|
|||||||
});
|
});
|
||||||
// Internal Note
|
// Internal Note
|
||||||
$('#form2').on('submit', function() {
|
$('#form2').on('submit', function() {
|
||||||
var internal_content = document.getElementById('InternalContent').value;
|
|
||||||
if(internal_content) {
|
|
||||||
$("#internal_content_class").removeClass('has-error');
|
|
||||||
$("#alert23").hide();
|
|
||||||
} else {
|
|
||||||
var message = "<li>{!! Lang::get('lang.internal_content_is_a_required_field') !!}</li>";
|
|
||||||
$("#internal_content_class").addClass('has-error');
|
|
||||||
$("#alert23").show();
|
|
||||||
$('#message-danger2').html(message);
|
|
||||||
$("#show3").hide();
|
|
||||||
$("#t1").show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "../internal/note/{{ $tickets->id }}",
|
url: "../internal/note/{{ $tickets->id }}",
|
||||||
@@ -1700,7 +1685,6 @@ if ($thread->title != "") {
|
|||||||
$("#show5").show();
|
$("#show5").show();
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
|
||||||
if (response == 1)
|
if (response == 1)
|
||||||
{
|
{
|
||||||
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
|
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
|
||||||
@@ -1716,16 +1700,6 @@ if ($thread->title != "") {
|
|||||||
var div1 = document.getElementById('newtextarea1');
|
var div1 = document.getElementById('newtextarea1');
|
||||||
div1.innerHTML = div1.innerHTML + '<textarea style="width:98%;height:200px;" name="InternalContent" class="form-control" id="InternalContent"/></textarea>';
|
div1.innerHTML = div1.innerHTML + '<textarea style="width:98%;height:200px;" name="InternalContent" class="form-control" id="InternalContent"/></textarea>';
|
||||||
var wysihtml5Editor = $('textarea').wysihtml5().data("wysihtml5").editor;
|
var wysihtml5Editor = $('textarea').wysihtml5().data("wysihtml5").editor;
|
||||||
setInterval(function(){
|
|
||||||
var head= document.getElementsByTagName('head')[0];
|
|
||||||
var script= document.createElement('script');
|
|
||||||
script.type= 'text/javascript';
|
|
||||||
script.src= '{{asset("lb-faveo/js/jquery.rating.pack.js")}}';
|
|
||||||
head.appendChild(script);
|
|
||||||
// $('.rating-cancel').hide();
|
|
||||||
// $(".star-rating-control").attr("disabled", "disabled").off('hover');
|
|
||||||
// $(".star-rating-control").addClass("disabled")
|
|
||||||
}, 4000);
|
|
||||||
} else {
|
} else {
|
||||||
// alert('fail');
|
// alert('fail');
|
||||||
var message = "{!! Lang::get('lang.for_some_reason_your_message_was_not_posted_please_try_again_later') !!}";
|
var message = "{!! Lang::get('lang.for_some_reason_your_message_was_not_posted_please_try_again_later') !!}";
|
||||||
@@ -1782,10 +1756,10 @@ if ($thread->title != "") {
|
|||||||
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#form3').on('submit', function() {
|
$('#form3').on('submit', function() {
|
||||||
var fd = new FormData(document.getElementById("form3"));
|
var fd = new FormData(document.getElementById("form3"));
|
||||||
var reply_content = document.getElementById('reply_content').value;
|
var reply_content = document.getElementById("reply_content").value;
|
||||||
|
|
||||||
if(reply_content) {
|
if(reply_content) {
|
||||||
$("#reply_content_class").removeClass('has-error');
|
$("#reply_content_class").removeClass('has-error');
|
||||||
$("#alert23").hide();
|
$("#alert23").hide();
|
||||||
@@ -1841,9 +1815,9 @@ if ($thread->title != "") {
|
|||||||
// $(".star-rating-control").attr("disabled", "disabled").off('hover');
|
// $(".star-rating-control").attr("disabled", "disabled").off('hover');
|
||||||
// $(".star-rating-control").addClass("disabled")
|
// $(".star-rating-control").addClass("disabled")
|
||||||
}, 4000);
|
}, 4000);
|
||||||
|
$( "#clear-file" ).trigger( "click" );
|
||||||
} else {
|
} else {
|
||||||
// alert('fail');
|
// alert('fail');
|
||||||
// $( "#dismis4" ).trigger( "click" );
|
|
||||||
var message = "{!! Lang::get('lang.for_some_reason_your_reply_was_not_posted_please_try_again_later') !!}";
|
var message = "{!! Lang::get('lang.for_some_reason_your_reply_was_not_posted_please_try_again_later') !!}";
|
||||||
$("#alert23").show();
|
$("#alert23").show();
|
||||||
$('#message-danger2').html(message);
|
$('#message-danger2').html(message);
|
||||||
@@ -1865,7 +1839,6 @@ if ($thread->title != "") {
|
|||||||
type: "GET",
|
type: "GET",
|
||||||
url: "../ticket/surrender/{{ $tickets->id }}",
|
url: "../ticket/surrender/{{ $tickets->id }}",
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
|
||||||
if (response == 1)
|
if (response == 1)
|
||||||
{
|
{
|
||||||
// alert('ticket has been un assigned');
|
// alert('ticket has been un assigned');
|
||||||
@@ -1897,9 +1870,8 @@ if ($thread->title != "") {
|
|||||||
dataType: "html",
|
dataType: "html",
|
||||||
data: $(this).serialize(),
|
data: $(this).serialize(),
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$('#here').html("");
|
$('#show7').show();
|
||||||
$('#show7').show();
|
$('#hide1234').hide();
|
||||||
$('#hide1234').hide();
|
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
$('#show7').hide();
|
$('#show7').hide();
|
||||||
@@ -1912,7 +1884,7 @@ if ($thread->title != "") {
|
|||||||
// if(link) {
|
// if(link) {
|
||||||
// link.click();
|
// link.click();
|
||||||
// }
|
// }
|
||||||
// $('#cc-close').trigger('click');
|
$('#cc-close').trigger('click');
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1979,7 +1951,6 @@ if ($thread->title != "") {
|
|||||||
type: 'GET',
|
type: 'GET',
|
||||||
data: $(this).serialize(),
|
data: $(this).serialize(),
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
|
||||||
$('#select-merge-tickts').html(data);
|
$('#select-merge-tickts').html(data);
|
||||||
}
|
}
|
||||||
// return false;
|
// return false;
|
||||||
@@ -2057,15 +2028,12 @@ if ($thread->title != "") {
|
|||||||
$("#recepients").load("../thread/{{$tickets->id}} #recepients");
|
$("#recepients").load("../thread/{{$tickets->id}} #recepients");
|
||||||
};
|
};
|
||||||
// $('#here2').html(response);
|
// $('#here2').html(response);
|
||||||
|
|
||||||
// $("#surrender22").load("../thread/{{$tickets->id}} #surrender22");
|
// $("#surrender22").load("../thread/{{$tickets->id}} #surrender22");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
var Vardata = "";
|
var Vardata = "";
|
||||||
var count = 0;
|
var count = 0;
|
||||||
$(".select2").on('select2:select', function(){
|
$(".select2").on('select2:select', function(){
|
||||||
@@ -2101,7 +2069,6 @@ echo $ticket_data->title;
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
var locktime = '<?php echo $var->collision_avoid; ?>' * 60 * 1000;
|
var locktime = '<?php echo $var->collision_avoid; ?>' * 60 * 1000;
|
||||||
var ltf = '<?php echo $var->lock_ticket_frequency;?>';
|
var ltf = '<?php echo $var->lock_ticket_frequency;?>';
|
||||||
@@ -2129,7 +2096,6 @@ echo $ticket_data->title;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(this).data("prevType", e.type);
|
$(this).data("prevType", e.type);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2180,9 +2146,7 @@ echo $ticket_data->title;
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
$('h5').html('<span class="stars">' + parseFloat($('input[name=amount]').val()) + '</span>');
|
$('h5').html('<span class="stars">' + parseFloat($('input[name=amount]').val()) + '</span>');
|
||||||
$('span.stars').stars();
|
$('span.stars').stars();
|
||||||
$('h4').html('<span class="stars2">' + parseFloat($('input[name=amt]').val()) + '</span>');
|
$('h4').html('<span class="stars2">' + parseFloat($('input[name=amt]').val()) + '</span>');
|
||||||
|
@@ -189,33 +189,40 @@ foreach ($conversations as $conversation) {
|
|||||||
$body = $conversation->body;
|
$body = $conversation->body;
|
||||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
|
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
|
||||||
foreach ($attachments as $attachment) {
|
foreach ($attachments as $attachment) {
|
||||||
if ($attachment->type == 'pdf') {
|
// $i++;
|
||||||
|
try {
|
||||||
} elseif ($attachment->type == 'docx') {
|
if ($attachment->type == 'jpg' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||||
|
if($attachment->size > 0) {
|
||||||
} else {
|
$image = @imagecreatefromstring($attachment->file);
|
||||||
$image = @imagecreatefromstring($attachment->file);
|
if($image == false) {
|
||||||
ob_start();
|
} else {
|
||||||
imagejpeg($image, null, 80);
|
ob_start();
|
||||||
$data = ob_get_contents();
|
imagejpeg($image, null, 80);
|
||||||
ob_end_clean();
|
$data = ob_get_contents();
|
||||||
$var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
|
ob_end_clean();
|
||||||
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
|
$var = '<img style="max-width:200px;max-height:200px;" src="data:image/' . $attachment->type . ';base64,' . base64_encode($data) . '" />';
|
||||||
|
|
||||||
$string = $body;
|
$body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body);
|
||||||
$start = "<head>";
|
$string = $body;
|
||||||
$end = "</head>";
|
$start = "<head>";
|
||||||
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
$end = "</head>";
|
||||||
|
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
||||||
} else {
|
|
||||||
$ini = strpos($string, $start);
|
} else {
|
||||||
$ini += strlen($start);
|
$ini = strpos($string, $start);
|
||||||
$len = strpos($string, $end, $ini) - $ini;
|
$ini += strlen($start);
|
||||||
$parsed = substr($string, $ini, $len);
|
$len = strpos($string, $end, $ini) - $ini;
|
||||||
$body2 = $parsed;
|
$parsed = substr($string, $ini, $len);
|
||||||
$body = str_replace($body2, " ", $body);
|
$body2 = $parsed;
|
||||||
}
|
$body = str_replace($body2, " ", $body);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
} catch(\Exception $e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$string = $body;
|
$string = $body;
|
||||||
@@ -299,24 +306,29 @@ foreach ($conversations as $conversation) {
|
|||||||
<ul class='mailbox-attachments clearfix'>
|
<ul class='mailbox-attachments clearfix'>
|
||||||
<?php
|
<?php
|
||||||
foreach ($attachments as $attachment) {
|
foreach ($attachments as $attachment) {
|
||||||
$size = $attachment->size;
|
$size = $attachment->size;
|
||||||
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
||||||
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
||||||
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
||||||
if ($attachment->poster == 'ATTACHMENT') {
|
if ($attachment->poster == 'ATTACHMENT') {
|
||||||
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||||
$image = @imagecreatefromstring($attachment->file);
|
$image = @imagecreatefromstring($attachment->file);
|
||||||
ob_start();
|
if($image == false) {
|
||||||
imagejpeg($image, null, 80);
|
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||||
$data = ob_get_contents();
|
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||||
ob_end_clean();
|
} else {
|
||||||
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
ob_start();
|
||||||
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
imagejpeg($image, null, 80);
|
||||||
} else {
|
$data = ob_get_contents();
|
||||||
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
ob_end_clean();
|
||||||
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||||
|
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||||
|
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@@ -88,6 +88,51 @@ class = "active"
|
|||||||
<h4>{!! Lang::get('lang.ticket') !!} </h4>
|
<h4>{!! Lang::get('lang.ticket') !!} </h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="row col-md-12">
|
<div class="row col-md-12">
|
||||||
|
|
||||||
|
|
||||||
|
@if(Auth::user())
|
||||||
|
|
||||||
|
{!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!}
|
||||||
|
|
||||||
|
@else
|
||||||
|
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
|
||||||
|
{!! Form::label('Name',Lang::get('lang.name')) !!}<span class="text-red"> *</span>
|
||||||
|
{!! Form::text('Name',null,['class' => 'form-control']) !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@if(Auth::user())
|
||||||
|
|
||||||
|
{!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!}
|
||||||
|
|
||||||
|
@else
|
||||||
|
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
|
||||||
|
{!! Form::label('Email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
||||||
|
{!! Form::text('Email',null,['class' => 'form-control']) !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@if(!Auth::user())
|
||||||
|
|
||||||
|
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
||||||
|
{!! Form::label('Code',Lang::get('lang.country-code')) !!}
|
||||||
|
{!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
||||||
|
{!! Form::label('Mobile',Lang::get('lang.mobile_number')) !!}
|
||||||
|
{!! Form::text('Mobile',null,['class' => 'form-control']) !!}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
||||||
|
{!! Form::label('Phone',Lang::get('lang.phone')) !!}
|
||||||
|
{!! Form::text('Phone',null,['class' => 'form-control']) !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
|
<div class="col-md-12 form-group {{ $errors->has('help_topic') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!}
|
{!! Form::label('help_topic', Lang::get('lang.choose_a_help_topic')) !!}
|
||||||
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
|
{!! $errors->first('help_topic', '<spam class="help-block">:message</spam>') !!}
|
||||||
@@ -110,50 +155,6 @@ class = "active"
|
|||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(Auth::user())
|
|
||||||
|
|
||||||
{!! Form::hidden('Name',Auth::user()->user_name,['class' => 'form-control']) !!}
|
|
||||||
|
|
||||||
@else
|
|
||||||
<div class="col-md-12 form-group {{ $errors->has('Name') ? 'has-error' : '' }}">
|
|
||||||
{!! Form::label('Name',Lang::get('lang.name')) !!}<span class="text-red"> *</span>
|
|
||||||
{!! Form::text('Name',null,['class' => 'form-control']) !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@if(Auth::user())
|
|
||||||
|
|
||||||
{!! Form::hidden('Email',Auth::user()->email,['class' => 'form-control']) !!}
|
|
||||||
|
|
||||||
@else
|
|
||||||
<div class="col-md-12 form-group {{ $errors->has('Email') ? 'has-error' : '' }}">
|
|
||||||
{!! Form::label('Email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
|
||||||
{!! Form::text('Email',null,['class' => 'form-control']) !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@if(!Auth::user())
|
|
||||||
|
|
||||||
<div class="col-md-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
|
||||||
{!! Form::label('Code',Lang::get('lang.country-code')) !!}
|
|
||||||
{!! Form::text('Code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
|
||||||
{!! Form::label('Mobile',Lang::get('lang.mobile_number')) !!}
|
|
||||||
{!! Form::text('Mobile',null,['class' => 'form-control']) !!}
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5 form-group {{ $errors->has('Phone') ? 'has-error' : '' }}">
|
|
||||||
{!! Form::label('Phone',Lang::get('lang.phone')) !!}
|
|
||||||
{!! Form::text('Phone',null,['class' => 'form-control']) !!}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
|
<div class="col-md-12 form-group {{ $errors->has('Subject') ? 'has-error' : '' }}">
|
||||||
{!! Form::label('Subject',Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
|
{!! Form::label('Subject',Lang::get('lang.subject')) !!}<span class="text-red"> *</span>
|
||||||
{!! Form::text('Subject',null,['class' => 'form-control']) !!}
|
{!! Form::text('Subject',null,['class' => 'form-control']) !!}
|
||||||
@@ -163,14 +164,18 @@ class = "active"
|
|||||||
{!! Form::textarea('Details',null,['class' => 'form-control']) !!}
|
{!! Form::textarea('Details',null,['class' => 'form-control']) !!}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 form-group">
|
<div class="col-md-12 form-group">
|
||||||
<div class="btn btn-default btn-file"><i class="fa fa-paperclip"> </i> {!! Lang::get('lang.attachment') !!}<input type="file" name="attachment[]" multiple/></div><br/>
|
<div class="btn btn-default btn-file"><i class="fa fa-paperclip"> </i> {!! Lang::get('lang.attachment') !!}<input type="file" name="attachment[]" id="attachment" multiple/></div><br/>
|
||||||
{!! Lang::get('lang.max') !!}. 10MB
|
<div id='file_details'></div><div id='total-size'></div>
|
||||||
|
{!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!}
|
||||||
|
<div>
|
||||||
|
<a id='clear-file' onClick='clearAll()' style='display:none; cursor:pointer;'><i class='fa fa-close'></i>Clear all</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{-- Event fire --}}
|
{{-- Event fire --}}
|
||||||
<?php Event::fire(new App\Events\ClientTicketForm()); ?>
|
<?php Event::fire(new App\Events\ClientTicketForm()); ?>
|
||||||
<div class="col-md-12" id="response"> </div>
|
<div class="col-md-12" id="response"> </div>
|
||||||
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
||||||
<div class="col-md-12 form-group">{!! Form::submit(Lang::get('lang.Send'),['class'=>'form-group btn btn-info pull-left', 'onclick' => 'this.disabled=true;this.value="Sending, please wait...";this.form.submit();'])!!}</div></div>
|
<div class="col-md-12 form-group">{!! Form::submit(Lang::get('lang.Send'),['id' => 'submitbtn' ,'class'=>'form-group btn btn-info pull-left', 'onclick' => 'this.disabled=true;this.value="Sending, please wait...";this.form.submit();'])!!}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12" id="response"> </div>
|
<div class="col-md-12" id="response"> </div>
|
||||||
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
|
||||||
@@ -183,22 +188,87 @@ class = "active"
|
|||||||
|====================================================
|
|====================================================
|
||||||
-->
|
-->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#selectid').on('change', function() {
|
function clearAll() {
|
||||||
var value = $('#selectid').val();
|
$("#file_details").html("");
|
||||||
$.ajax({
|
$("#total-size").html("");
|
||||||
url: "postform/" + value,
|
$("#attachment").val('');
|
||||||
type: "post",
|
$("#clear-file").hide();
|
||||||
data: value,
|
$("#submitbtn").removeClass('disabled');
|
||||||
success: function(data) {
|
}
|
||||||
$('#response').html(data);
|
|
||||||
var wysihtml5Editor = $('#unique-textarea').wysihtml5().data("wysihtml5").editor;
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
var helpTopic = $("#selectid").val();
|
||||||
|
send(helpTopic);
|
||||||
|
$("#selectid").on("change", function() {
|
||||||
|
helpTopic = $("#selectid").val();
|
||||||
|
send(helpTopic);
|
||||||
|
});
|
||||||
|
function send(helpTopic) {
|
||||||
|
$.ajax({
|
||||||
|
url: "{{url('/get-helptopic-form')}}",
|
||||||
|
data: {'helptopic': helpTopic},
|
||||||
|
type: "GET",
|
||||||
|
dataType: "html",
|
||||||
|
success: function(response) {
|
||||||
|
$("#response").html(response);
|
||||||
|
},
|
||||||
|
error: function(response) {
|
||||||
|
$("#response").html(response);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
//Add text editor
|
//Add text editor
|
||||||
$("textarea").wysihtml5();
|
$("textarea").wysihtml5();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Ticket attachment
|
||||||
|
$('#attachment').change(function() {
|
||||||
|
input = document.getElementById('attachment');
|
||||||
|
if (!input) {
|
||||||
|
alert("Um, couldn't find the fileinput element.");
|
||||||
|
} else if (!input.files) {
|
||||||
|
alert("This browser doesn't seem to support the `files` property of file inputs.");
|
||||||
|
} else if (!input.files[0]) {
|
||||||
|
} else {
|
||||||
|
$("#file_details").html("");
|
||||||
|
var total_size = 0;
|
||||||
|
for (i = 0; i < input.files.length; i++) {
|
||||||
|
file = input.files[i];
|
||||||
|
var supported_size = "{!! $max_size_in_bytes !!}";
|
||||||
|
var supported_actual_size = "{!! $max_size_in_actual !!}";
|
||||||
|
if (file.size < supported_size) {
|
||||||
|
$("#file_details").append("<tr> <td> " + file.name + " </td><td> " + formatBytes(file.size) + "</td> </tr>");
|
||||||
|
} else {
|
||||||
|
$("#file_details").append("<tr style='color:red;'> <td> " + file.name + " </td><td> " + formatBytes(file.size) + "</td> </tr>");
|
||||||
|
}
|
||||||
|
total_size += parseInt(file.size);
|
||||||
|
}
|
||||||
|
if (total_size > supported_size) {
|
||||||
|
$("#total-size").append("<span style='color:red'>Your total file upload size is greater than " + supported_actual_size + "</span>");
|
||||||
|
$("#submitbtn").addClass('disabled');
|
||||||
|
$("#clear-file").show();
|
||||||
|
} else {
|
||||||
|
$("#total-size").html("");
|
||||||
|
$("#submitbtn").removeClass('disabled');
|
||||||
|
$("#clear-file").show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function formatBytes(bytes, decimals) {
|
||||||
|
if (bytes == 0)
|
||||||
|
return '0 Byte';
|
||||||
|
var k = 1000;
|
||||||
|
var dm = decimals + 1 || 3;
|
||||||
|
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||||
|
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||||
|
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@stop
|
@stop
|
@@ -146,7 +146,7 @@ class Mailbox {
|
|||||||
* @return array mailsIds (or empty array)
|
* @return array mailsIds (or empty array)
|
||||||
*/
|
*/
|
||||||
public function searchMailbox($criteria = 'ALL') {
|
public function searchMailbox($criteria = 'ALL') {
|
||||||
$mailsIds = imap_search($this->getImapStream(), 'ALL', SE_UID, $this->serverEncoding);
|
$mailsIds = imap_search($this->getImapStream(), $criteria, SE_UID, $this->serverEncoding);
|
||||||
return $mailsIds ? $mailsIds : array();
|
return $mailsIds ? $mailsIds : array();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user