updated version 1.0.3

This commit is contained in:
sujitprasad
2015-12-09 16:20:35 +05:30
parent 94f4c49254
commit 561a4a2e49
54 changed files with 2500 additions and 185 deletions

View File

@@ -1,17 +1,19 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes…
#RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Handle Front Controller…
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

1
code/.gitignore vendored
View File

@@ -1,2 +1,3 @@
/vendor
/node_modules
.env

View File

@@ -0,0 +1,27 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class ClientTicketForm extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,28 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class ClientTicketFormPost extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class FaveoAfterReply extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class FormRegisterEvent extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class LoginEvent extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class PostRegisterEvent extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class ReadMailEvent extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class TicketBoxHeader extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class TicketDetailTable extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,30 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class TimeLineFormEvent extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,31 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class Timeline extends Event {
use SerializesModels;
public $para1;
public $para2;
public $para3;
public $para4;
public $para5;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($para1='',$para2='',$para3='',$para4='',$para5='')
{
$this->para1 = $para1;
$this->para2 = $para2;
$this->para3 = $para3;
$this->para4 = $para4;
$this->para5 = $para5;
}
}

View File

@@ -0,0 +1,21 @@
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class TopNavEvent extends Event {
use SerializesModels;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct()
{
//
}
}

View File

@@ -0,0 +1,92 @@
<?php namespace App\Http\Controllers\Agent\helpdesk;
// controllers
use App\Http\Controllers\Controller;
// models
use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\Ticket\Ticket_Collaborator;
use App\Model\helpdesk\Email\Emails;
use App\User;
// classes
use DB;
use View;
use Auth;
/**
* DashboardController
*
* @package Controllers
* @subpackage Controller
* @author Ladybird <info@ladybirdweb.com>
*/
class DashboardController extends Controller {
/**
* Create a new controller instance.
* constructor to check
* 1. authentication
* 2. user roles
* 3. roles must be agent
* @return void
*/
public function __construct() {
$this->middleware('auth');
$this->middleware('role.agent');
}
/**
* Show the form for creating a new resource.
* @return type Response
*/
public function index() {
try {
if(Auth::user()->role == "user"){
return \Redirect::route('home');
}
return View::make('themes.default1.agent.helpdesk.dashboard.dashboard');
} catch (Exception $e) {
return view('404');
}
}
/**
* ChartData
* @return type
*/
public function ChartData()
{
$date2 = strtotime(Date('Y-m-d'));
$date3 = Date('Y-m-d');
$format = 'Y-m-d';
$date1 = strtotime(Date($format,strtotime('-1 month'. $date3)));
$return = "";
$last = "";
for ( $i = $date1; $i <= $date2; $i = $i + 86400 ) {
$thisDate = date( 'Y-m-d', $i );
$created = \DB::table('tickets')->select('created_at')->where('created_at','LIKE','%'.$thisDate.'%')->count();
$closed = \DB::table('tickets')->select('closed_at')->where('closed_at','LIKE','%'.$thisDate.'%')->count();
$reopened = \DB::table('tickets')->select('reopened_at')->where('reopened_at','LIKE','%'.$thisDate.'%')->count();
$value = ['date' => $thisDate, 'open' => $created, 'closed' => $closed, 'reopened' => $reopened];
$array = array_map('htmlentities',$value);
$json = html_entity_decode(json_encode($array));
$return .= $json.',';
}
$last = rtrim($return,',');
return '['.$last.']';
// $ticketlist = DB::table('tickets')
// ->select(DB::raw('MONTH(updated_at) as month'),DB::raw('SUM(CASE WHEN status = 3 THEN 1 ELSE 0 END) as closed'),DB::raw('SUM(CASE WHEN status = 2 THEN 1 ELSE 0 END) as reopened'),DB::raw('SUM(CASE WHEN status = 1 THEN 1 ELSE 0 END) as open'),
// DB::raw('count(*) as totaltickets'))
// ->groupBy('month')
// ->orderBy('month', 'asc')
// ->get();
// return $ticketlist;
}
}

View File

@@ -0,0 +1,234 @@
@extends('themes.default1.agent.layout.agent')
@section('Dashboard')
class="active"
@stop
@section('dashboard-bar')
active
@stop
@section('dashboard')
class="active"
@stop
@section('content')
<div class="box box-info">
<?php
// $tickets = App\Model\Ticket\Tickets::where('created_at','>=',date('Y-m-d'))->get();
// echo count($tickets);
?>
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.line_chart') !!}</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div class="chart" >
<div id="legendDiv"></div>
<canvas class="chart-data" id="tickets-graph" width="1000" height="400"></canvas>
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
<hr/>
<div class="box">
<div class="box-header">
<h1>{!! Lang::get('lang.statistics') !!}</h1>
</div>
<div class="box-body">
<table class="table table-hover" style="overflow:hidden;">
<tr>
<th>{!! Lang::get('lang.department') !!}</th>
<th>{!! Lang::get('lang.opened') !!}</th>
<th>{!! Lang::get('lang.resolved') !!}</th>
<th>{!! Lang::get('lang.closed') !!}</th>
<th>{!! Lang::get('lang.deleted') !!}</th>
</tr>
<?php $departments = App\Model\helpdesk\Agent\Department::all(); ?>
@foreach($departments as $department)
<?php
$open = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',1)->count();
$resolve = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',2)->count();
$close = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',3)->count();
$delete = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',5)->count();
?>
<tr>
<td>{!! $department->name !!}</td>
<td>{!! $open !!}</td>
<td>{!! $resolve !!}</td>
<td>{!! $close !!}</td>
<td>{!! $delete !!}</td>
</tr>
@endforeach
</table>
</div>
</div>
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$.getJSON("agen", function (result) {
var labels = [],data=[],data2=[],data3=[],data4=[];
for (var i = 0; i < result.length; i++) {
$var12 = result[i].month;
if($var12 == 1){
$var13 = "January";
}
if($var12 == 2){
$var13 = "Febuary";
}
if($var12 == 3){
$var13 = "March";
}
if($var12 == 4){
$var13 = "April";
}
if($var12 == 5){
$var13 = "May";
}
if($var12 == 6){
$var13 = "June";
}
if($var12 == 7){
$var13 = "July";
}
if($var12 == 8){
$var13 = "August";
}
if($var12 == 9){
$var13 = "September";
}
if($var12 == 10){
$var13 = "October";
}
if($var12 == 11){
$var13 = "November";
}
if($var12 == 12){
$var13 = "December";
}
labels.push($var13);
data.push(result[i].totaltickets);
data2.push(result[i].closed);
data3.push(result[i].reopened);
data4.push(result[i].open);
}
var buyerData = {
labels : labels,
datasets : [
{
label : "Total Tickets" ,
fillColor : "rgba(240, 127, 110, 0.3)",
strokeColor : "#f56954",
pointColor : "#A62121",
pointStrokeColor : "#E60073",
data : data
}
,
{
label : "Open Tickets" ,
fillColor : "rgba(255, 102, 204, 0.4)",
strokeColor : "#f56954",
pointColor : "#FF66CC",
pointStrokeColor : "#fff",
pointHighlightFill : "#FF4DC3",
pointHighlightStroke : "rgba(151,187,205,1)",
data : data4
}
,
{
label : "Closed Tickets",
fillColor : "rgba(151,187,205,0.2)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#0000CC",
pointHighlightFill : "#0000E6",
pointHighlightStroke : "rgba(151,187,205,1)",
data : data2
}
,
{
label : "Reopened Tickets",
fillColor : "rgba(102,255,51,0.2)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(46,184,0,1)",
pointStrokeColor : "#fff",
pointHighlightFill : "#fff",
pointHighlightStroke : "rgba(151,187,205,1)",
data : data3
}
]
};
var myLineChart = new Chart(document.getElementById("tickets-graph").getContext("2d")).Line(buyerData, {
showScale: true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines: false,
//String - Colour of the grid lines
scaleGridLineColor: "rgba(0,0,0,.05)",
//Number - Width of the grid lines
scaleGridLineWidth: 1,
//Boolean - Whether to show horizontal lines (except X axis)
scaleShowHorizontalLines: true,
//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,
//Boolean - Whether the line is curved between points
bezierCurve: false,
//Number - Tension of the bezier curve between points
bezierCurveTension: 0.3,
//Boolean - Whether to show a dot for each point
pointDot: true,
//Number - Radius of each point dot in pixels
pointDotRadius: 4,
//Number - Pixel width of point dot stroke
pointDotStrokeWidth: 1,
//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
pointHitDetectionRadius: 20,
//Boolean - Whether to show a stroke for datasets
datasetStroke: true,
//Number - Pixel width of dataset stroke
datasetStrokeWidth: 1,
//Boolean - Whether to fill the dataset with a color
datasetFill: true,
//String - A legend template
//Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
maintainAspectRatio: false,
//Boolean - whether to make the chart responsive to window resizing
responsive: true,
legendTemplate : '<ul style="list-style-type: square;">'
+'<% for (var i=0; i<datasets.length; i++) { %>'
+'<li style="color: <%=datasets[i].pointColor%>;">'
+'<span style=\"background-color:<%=datasets[i].pointColor%>\"></span>'
+'<% if (datasets[i].label) { %><%= datasets[i].label %><% } %>'
+'</li>'
+'<% } %>'
+'</ul>'
});
document.getElementById("legendDiv").innerHTML = myLineChart.generateLegend();
});
});
</script>
@stop

View File

@@ -54,14 +54,37 @@ class DashboardController extends Controller {
*/
public function ChartData()
{
$ticketlist = DB::table('tickets')
->select(DB::raw('MONTH(updated_at) as month'),
DB::raw('count(*) as tickets'))
->groupBy('month')
->orderBy('month', 'asc')
->get();
return $ticketlist;
$date2 = strtotime(Date('Y-m-d'));
$date3 = Date('Y-m-d');
$format = 'Y-m-d';
$date1 = strtotime(Date($format,strtotime('-1 month'. $date3)));
$return = "";
$last = "";
for ( $i = $date1; $i <= $date2; $i = $i + 86400 ) {
$thisDate = date( 'Y-m-d', $i );
$created = \DB::table('tickets')->select('created_at')->where('created_at','LIKE','%'.$thisDate.'%')->count();
$closed = \DB::table('tickets')->select('closed_at')->where('closed_at','LIKE','%'.$thisDate.'%')->count();
$reopened = \DB::table('tickets')->select('reopened_at')->where('reopened_at','LIKE','%'.$thisDate.'%')->count();
$value = ['date' => $thisDate, 'open' => $created, 'closed' => $closed, 'reopened' => $reopened];
$array = array_map('htmlentities',$value);
$json = html_entity_decode(json_encode($array));
$return .= $json.',';
}
$last = rtrim($return,',');
return '['.$last.']';
// $ticketlist = DB::table('tickets')
// ->select(DB::raw('MONTH(updated_at) as month'),DB::raw('SUM(CASE WHEN status = 3 THEN 1 ELSE 0 END) as closed'),DB::raw('SUM(CASE WHEN status = 2 THEN 1 ELSE 0 END) as reopened'),DB::raw('SUM(CASE WHEN status = 1 THEN 1 ELSE 0 END) as open'),DB::raw('SUM(CASE WHEN status = 5 THEN 1 ELSE 0 END) as deleted'),
// DB::raw('count(*) as totaltickets'))
// ->groupBy('month')
// ->orderBy('month', 'asc')
// ->get();
// return $ticketlist;
}
}

View File

@@ -0,0 +1,131 @@
<?php namespace App\Http\Controllers\Agent\helpdesk;
// controllers
use App\Http\Controllers\Controller;
// Model
use App\User;
use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\Agent\Teams;
use App\Model\helpdesk\Agent\Department;
/**
* UserController
*
* @package Controllers
* @subpackage Controller
* @author Ladybird <info@ladybirdweb.com>
*/
class NotificationController extends Controller {
/**
* This function is for sending daily report/notification about the system
* @return mail
**/
public function send_notification() {
// $this->test();
$company = $this->company();
$this->send_notification_to_admin($company);
$this->send_notification_to_team_lead($company);
$this->send_notification_to_manager($company);
$this->send_notification_to_agent($company);
}
/**
* Admin Notification/Report
* @param company
* @return mail
**/
public function send_notification_to_admin($company) {
// get all admin users
$users = User::where('role','=','admin')->get();
foreach ($users as $user) {
$email = $user->email;
$user_name = $user->first_name . " " . $user->last_name;
\Mail::send('emails.notifications.admin', ['company' => $company, 'name'=>$user_name], function ($message)use ($email, $user_name, $company) {
$message->to($email, $user_name)->subject($company . ' Daily Report ');
});
}
}
/**
* Department Manager Notification/Report
* @return mail
**/
public function send_notification_to_manager($company) {
$depts = Department::all();
foreach ($depts as $dept) {
if(isset($dept->manager)) {
$dept_name = $dept->name;
$users = User::where('id','=',$dept->manager)->get();
foreach ($users as $user) {
$email = $user->email;
$user_name = $user->first_name . " " . $user->last_name;
\Mail::send('emails.notifications.manager', ['company' => $company, 'name'=>$user_name,'dept_id' => $dept->id, 'dept_name' => $dept->name], function ($message)use ($email, $user_name, $company, $dept_name) {
$message->to($email, $user_name)->subject($company . ' Daily Report for department manager of '. $dept_name.' department.');
});
}
}
}
}
/**
* Team Lead Notification/Report
* @return mail
**/
public function send_notification_to_team_lead($company) {
$teams = Teams::all();
foreach ($teams as $team) {
if(isset($team->team_lead)) {
$team_name = $team->name;
$users = User::where('id','=',$team->team_lead)->get();
foreach ($users as $user) {
$email = $user->email;
$user_name = $user->first_name . " " . $user->last_name;
\Mail::send('emails.notifications.lead', ['company' => $company, 'name'=>$user_name,'team_id' => $team->id], function ($message)use ($email, $user_name, $company, $team_name) {
$message->to($email, $user_name)->subject($company . ' Daily Report for Team Lead of team '. $team_name);
});
}
}
}
}
/**
* Agent Notification/Report
* @return mail
**/
public function send_notification_to_agent($company) {
// get all agents users
$users = User::where('role','=','agent')->get();
foreach ($users as $user) {
$email = $user->email;
$user_name = $user->first_name . " " . $user->last_name;
\Mail::send('emails.notifications.agent', ['company' => $company, 'name'=>$user_name, 'user_id' => 1], function ($message)use ($email, $user_name, $company) {
$message->to($email, $user_name)->subject($company . ' Daily Report for Agents');
});
}
}
/**
* company
* @return type
*/
public function company()
{
$company = Company::Where('id','=','1')->first();
if($company->company_name == null){
$company = "Support Center";
}else{
$company = $company->company_name;
}
return $company;
}
public function test(){
$email = "sujit.prasad@ladybirdweb.com";
$user_name = "sujit prasad";
\Mail::send('emails.notifications.test', ['user_id' => 1], function ($message) use($email, $user_name) {
$message->to($email, $user_name)->subject('testing reporting');
});
}
}

View File

@@ -304,6 +304,9 @@ class TicketController extends Controller {
public function reply(Ticket_Thread $thread, TicketRequest $request, Ticket_attachments $ta ) {
$attachments = $request->file('attachment');
$check_attachment = null;
// Event fire
$eventthread = $thread->where('ticket_id',$request->input('ticket_ID'))->first();$eventuserid = $eventthread->user_id;$emailadd = User::where('id',$eventuserid)->first()->email;$source = $eventthread->source;$form_data = $request->except('ReplyContent','ticket_ID','attachment');
\Event::fire(new \App\Events\ClientTicketFormPost($form_data,$emailadd,$source));
// dd($attachments);
// }
//return $attachments;
@@ -389,6 +392,10 @@ class TicketController extends Controller {
//dd($thread->id);\
// mail to main user
//$path = 'C:\wamp\tmp\php5D3A.tmp';
// Event
\Event::fire(new \App\Events\FaveoAfterReply($reply_content,$user->phone_number,$request,$tickets));
Mail::send(array('html'=>'emails.ticket_re-reply'), ['content' => $reply_content, 'ticket_number' => $ticket_number, 'From' => $company, 'name'=>$username, 'Agent_Signature' => $agentsign], function ($message) use ($email, $user_name, $ticket_number, $ticket_subject, $attachments, $check_attachment) {
$message->to($email, $user_name)->subject($ticket_subject . '[#' . $ticket_number . ']');
// if(isset($attachments)){
@@ -558,8 +565,11 @@ class TicketController extends Controller {
$user->role = "user";
$user->active = "1";
// mail user his/her password
if ($user->save()) {
if ($user->save()) {
$user_id = $user->id;
// Event fire
\Event::fire(new \App\Events\ReadMailEvent($user_id,$password));
if (Mail::send('emails.pass', ['password' => $password, 'name' => $username, 'from'=>$company,'emailadd' => $emailadd], function ($message) use ($emailadd, $username,$company) {
$message->to($emailadd, $username)->subject('Welcome to '.$company.' helpdesk');
})) {

View File

@@ -56,11 +56,15 @@ class AuthController extends Controller {
$this->middleware('guest', ['except' => 'getLogout']);
}
/**
* Get the form for registration
* @return type Response
*/
public function getRegister() {
// Event for login
\Event::fire(new \App\Events\FormRegisterEvent());
if(Auth::user()) {
if(Auth::user()->role == "admin" || Auth::user()->role == "agent") {
return \Redirect::route('dashboard');
@@ -72,6 +76,7 @@ class AuthController extends Controller {
}
}
/**
* Post registration form
* @param type User $user
@@ -79,6 +84,9 @@ class AuthController extends Controller {
* @return type Response
*/
public function postRegister(User $user, RegisterRequest $request) {
// Event for login
\Event::fire(new \App\Events\LoginEvent($request));
$password = Hash::make($request->input('password'));
$user->password = $password;
$name = $request->input('full_name');

View File

@@ -101,13 +101,13 @@ class UserController extends Controller {
/* get the article_id where category_id == current category */
$catid = $category->where('slug', $slug)->first();
$id = $catid->id;
$all = $relation->where('category_id', $id)->paginate(2);
$all->setPath('');
$all = $relation->where('category_id', $id)->get();
// $all->setPath('');
/* from whole attribute pick the article_id */
$article_id = $all->lists('article_id');
$categorys = $category->get();
/* direct to view with $article_id */
return view('themes.default1.client.kb.article-list.category', compact('all', 'categorys', 'article_id'));
return view('themes.default1.client.kb.article-list.category', compact('all','id', 'categorys', 'article_id'));
}
public function home(Article $article, Category $category, Relationship $relation) {
@@ -117,8 +117,8 @@ class UserController extends Controller {
else
{
//$categorys = $category->get();
$categorys = $category->paginate(3);
$categorys->setPath('home');
$categorys = $category->get();
// $categorys->setPath('home');
/* direct to view with $article_id */
return view('themes.default1.client.kb.article-list.home', compact('categorys', 'article_id'));
}
@@ -223,8 +223,8 @@ class UserController extends Controller {
public function getCategoryList(Article $article, Category $category, Relationship $relation) {
//$categorys = $category->get();
$categorys = $category->paginate(3);
$categorys->setPath('home');
$categorys = $category->get();
// $categorys->setPath('home');
/* direct to view with $article_id */
return view('themes.default1.client.kb.article-list.categoryList', compact('categorys', 'article_id'));

View File

@@ -1,5 +1,9 @@
<?php namespace App\Http\Controllers;
use App\Model\helpdesk\Manage\Sla_plan;
use App\Model\helpdesk\Ticket\Tickets;
class HomeController extends Controller {
/*
|--------------------------------------------------------------------------
@@ -27,7 +31,7 @@ class HomeController extends Controller {
* @return Response
*/
public function index() {
ksjdckjdsnc
// ksjdckjdsnc
return view('themes/default1/admin/dashboard');
}
@@ -37,4 +41,39 @@ class HomeController extends Controller {
return $smtp->host;
}
Public function getdata(){
return \View::make('emails/notifications/agent');
}
public function getreport(){
return \View::make('test');
}
public function pushdata(){
$date2 = strtotime(Date('Y-m-d'));
$date3 = Date('Y-m-d');
$format = 'Y-m-d';
$date1 = strtotime(Date($format,strtotime('-1 month'. $date3)));
$return = "";
$last = "";
for ( $i = $date1; $i <= $date2; $i = $i + 86400 ) {
$thisDate = date( 'Y-m-d', $i );
$created = \DB::table('tickets')->select('created_at')->where('created_at','LIKE','%'.$thisDate.'%')->count();
$closed = \DB::table('tickets')->select('closed_at')->where('closed_at','LIKE','%'.$thisDate.'%')->count();
$reopened = \DB::table('tickets')->select('reopened_at')->where('reopened_at','LIKE','%'.$thisDate.'%')->count();
$value = ['date' => $thisDate, 'open' => $created, 'closed' => $closed, 'reopened' => $reopened];
$array = array_map('htmlentities',$value);
$json = html_entity_decode(json_encode($array));
$return .= $json.',';
}
$last = rtrim($return,',');
return '['.$last.']';
}
}

View File

@@ -368,6 +368,7 @@ Route::group(['middleware' => 'role.user', 'middleware' => 'auth'], function ()
|
*/
Route::get('readmails',['as' => 'readmails', 'uses' => 'Agent\helpdesk\MailController@readmails']);
Route::get('notification',['as' => 'notification', 'uses' => 'Agent\helpdesk\NotificationController@send_notification']);
/*
@@ -518,3 +519,8 @@ Route::patch('client-profile-password/{id}',['as' => 'client-profile-password',
Route::get('/inbox/data', ['as' => 'api.inbox', 'uses' => 'Agent\helpdesk\TicketController@get_inbox']);
Route::get('/report','HomeController@getreport');
Route::get('/reportdata','HomeController@pushdata');

View File

@@ -6,6 +6,6 @@ class Tickets extends Model
{
protected $table = 'tickets';
protected $fillable = [
'id','ticket_number','num_sequence','user_id','priority_id','sla','help_topic_id','max_open_ticket','collision_avoid','captcha','status','lock_by','lock_at','claim_response','assigned_ticket','answered_ticket','agent_mask','html','client_update','max_file_size','remember_token','created_at','updated_at'
'id','ticket_number','num_sequence','user_id','priority_id','sla','help_topic_id','max_open_ticket','collision_avoid','captcha','status','lock_by','lock_at','claim_response','assigned_ticket','answered_ticket','agent_mask','html','client_update','max_file_size','remember_token','reopened_at','duedate','closed_at','last_message_at','last_response_at','created_at','updated_at'
];
}
}

View File

@@ -24,7 +24,7 @@ return [
|
*/
'version' => 'Community 1.0.2.1',
'version' => '1.0.3',
/*
|--------------------------------------------------------------------------

View File

@@ -16,8 +16,6 @@ class CreateTicketTable extends Migration {
$table->string('ticket_number');
$table->integer('user_id');
$table->integer('dept_id');
$table->integer('sla_id');
$table->integer('staff_id');
$table->integer('team_id');
$table->integer('priority_id');
$table->integer('sla');
@@ -30,18 +28,16 @@ class CreateTicketTable extends Migration {
$table->integer('lock_at');
$table->integer('source');
$table->integer('isoverdue');
$table->date('duedate');
$table->integer('reopened');
$table->integer('isanswered');
$table->integer('html');
$table->integer('is_deleted');
$table->integer('closed');
$table->string('last_message');
$table->string('last_response');
$table->dateTime('reopened_at');
$table->dateTime('closed_at');
$table->dateTime('last_message_at');
$table->dateTime('last_response_at');
$table->dateTime('reopened_at')->nullable();
$table->dateTime('duedate')->nullable();
$table->dateTime('closed_at')->nullable();
$table->dateTime('last_message_at')->nullable();
$table->dateTime('last_response_at')->nullable();
$table->timestamps();
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

View File

@@ -39,7 +39,6 @@ return array(
'login' => 'Login',
'e-mail' => 'E-mail',
'reg_new_member' => 'Register a new membership',
'loading' => 'Loading',
/*
|--------------------------------------
@@ -566,6 +565,7 @@ return array(
'tools' => 'Tools',
'canned' => 'Canned',
'knowledge_base' => 'Knowledge Base',
'loading' => 'Loading',
/*
|-----------------------------------------------
@@ -824,4 +824,8 @@ return array(
'ticket_status' => 'Ticket Status',
'post_comment' => 'Post Comment',
);
'plugin' => 'Plugin',
);

View File

@@ -0,0 +1,154 @@
<?php
$date = Date('d-m-Y');
$format = 'Y-m-d';
$day1 = Date($format,strtotime('-1 day'. $date));
$depts = App\Model\helpdesk\Agent\Department::all();
foreach ($depts as $dept) {
// echo $dept->name;
$created = DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('created_at','LIKE','%'.$day1.'%')->count();
$closed = DB::table('tickets')->where('dept_id','=',$dept->id)->where('closed_at','LIKE','%'.$day1.'%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
$ovdate = $overdue->created_at;
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
if(date('Y-m-d H:i:s') > $new_date){
$i++;
}
}
// echo "created=".$created."<br/>";
// echo "closed=".$closed."<br/>";
// echo "inprogress=".$inprogress."<br/>";
// echo "overdue=".$i."<br/>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SmoothDeal</title>
</head>
<body style="background-color: #666">
<!-- Start Container -->
<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<!-- Start Main Text (introduction) -->
<!-- Main Title -->
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 24px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center;">
<strong> Daily Report</strong>
</p>
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 12px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
<strong>Hi {!! $name !!},</strong> <br> Below mentioned are your daily report for your {!! $company !!}.
</p>
<!-- End Main Text (introduction) -->
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF">
<!-- Start - Quick overview table -->
<!-- Quick overview table title -->
<p style="padding: 25px 0px 20px 0px; margin: 0; font-size: 18px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
Overview
</p>
@foreach ($depts as $dept)
<?php
// echo $dept->name;
$created = DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('created_at','LIKE','%'.$day1.'%')->count();
$closed = DB::table('tickets')->where('dept_id','=',$dept->id)->where('closed_at','LIKE','%'.$day1.'%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
$ovdate = $overdue->created_at;
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
if(date('Y-m-d H:i:s') > $new_date){
$i++;
}
}
// echo "created=".$created."<br/>";
// echo "closed=".$closed."<br/>";
// echo "inprogress=".$inprogress."<br/>";
// echo "overdue=".$i."<br/>";
?>
<!-- Overview Table -->
<table align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333;" width="500" border="0" cellspacing="0" cellpadding="10">
<tr >
<td align="center" bgcolor="#FFF2D9" colspan="2" style="border: 1px solid #F1DDDD; ">
<span style="font-size: 18px; color: #158CCA;"><strong>{!! $dept->name !!}</strong></span>
</td>
</tr>
<tr>
<td align="center"><strong>New tickets</strong></td>
<td align="center"><strong>{!! $created !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Closed tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $closed !!}</strong></td>
</tr>
<tr>
<td align="center"><strong>Inprogress tickets</strong></td>
<td align="center"><strong>{!! $inprogress !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Overdue tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $i !!}</strong></td>
</tr>
<tr>
<td colspan="2" style="height: 10px;"></td>
</tr>
</table>
<!-- End - Overview table -->
@endforeach
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 11px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
We should all work hard to guarantee that all tickets are being addressed in a timely manner. 
</p>
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: left;">
Thank You,<br/> Kind Regards,<br/>{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center; color: #3AB4FF;">
<strong> Powered by Faveo</strong>
</p>
</td>
</tr>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,135 @@
<?php
$date = Date('d-m-Y');
$format = 'Y-m-d';
$day1 = Date($format,strtotime('-1 day'. $date));
$user = App\User::where('id','=',$user_id)->first();
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$user->primary_dpt)->first();
$created = DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('created_at','LIKE','%'.$day1.'%')->count();
$closed = DB::table('tickets')->where('dept_id','=',$dept->id)->where('closed_at','LIKE','%'.$day1.'%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
$ovdate = $overdue->created_at;
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
if(date('Y-m-d H:i:s') > $new_date){
$i++;
}
}
// echo "created=".$created."<br/>";
// echo "closed=".$closed."<br/>";
// echo "inprogress=".$inprogress."<br/>";
// echo "overdue=".$i."<br/>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SmoothDeal</title>
</head>
<body style="background-color: #666">
<!-- Start Container -->
<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<!-- Start Main Text (introduction) -->
<!-- Main Title -->
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 24px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center;">
<strong> Daily Report</strong>
</p>
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 12px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
<strong>Hi {!! $name !!},</strong> <br> Below mentioned are your daily report for your {!! $company !!}.
</p>
<!-- End Main Text (introduction) -->
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF">
<!-- Start - Quick overview table -->
<!-- Quick overview table title -->
<p style="padding: 25px 0px 20px 0px; margin: 0; font-size: 18px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
Overview
</p>
<!-- Overview Table -->
<table align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333;" width="500" border="0" cellspacing="0" cellpadding="10">
<tr >
<td align="center" bgcolor="#FFF2D9" colspan="2" style="border: 1px solid #F1DDDD; ">
<span style="font-size: 18px; color: #158CCA;"><strong>{!! $dept->name !!}</strong></span>
</td>
</tr>
<tr>
<td align="center"><strong>New tickets</strong></td>
<td align="center"><strong>{!! $created !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Closed tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $closed !!}</strong></td>
</tr>
<tr>
<td align="center"><strong>Inprogress tickets</strong></td>
<td align="center"><strong>{!! $inprogress !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Overdue tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $i !!}</strong></td>
</tr>
<tr>
<td colspan="2" style="height: 10px;"></td>
</tr>
</table>
<!-- End - Overview table -->
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 11px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
We should all work hard to guarantee that all tickets are being addressed in a timely manner. 
</p>
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: left;">
Thank You,<br/> Kind Regards,<br/>{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center; color: #3AB4FF;">
<strong> Powered by Faveo</strong>
</p>
</td>
</tr>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/footer_shadow.png" width="600" height="25" /></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,590 @@
<?php
$date = Date('d-m-Y');
$format = 'Y-m-d';
$day1 = Date($format,strtotime('-1 day'. $date));
$depts = App\Model\helpdesk\Agent\Department::all();
foreach ($depts as $dept) {
// echo $dept->name;
$created = DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('created_at','LIKE','%'.$day1.'%')->count();
$closed = DB::table('tickets')->where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('closed_at','LIKE','%'.$day1.'%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
$ovdate = $overdue->created_at;
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
if(date('Y-m-d H:i:s') > $new_date){
$i++;
}
}
// echo "created=".$created."<br/>";
// echo "closed=".$closed."<br/>";
// echo "inprogress=".$inprogress."<br/>";
// echo "overdue=".$i."<br/>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Simples-Minimalistic Responsive Template</title>
<style type="text/css">
/* Client-specific Styles */
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0;}
/* Prevent Webkit and Windows Mobile platforms from changing default font sizes, while not breaking desktop design. */
.ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing.*/
#backgroundTable {margin:0; padding:0; width:100% !important; line-height: 100% !important;}
img {outline:none; text-decoration:none;border:none; -ms-interpolation-mode: bicubic;}
a img {border:none;}
.image_fix {display:block;}
p {margin: 0px 0px !important;}
table td {border-collapse: collapse;}
table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }
a {color: #0a8cce;text-decoration: none;text-decoration:none!important;}
/*STYLES*/
table[class=full] { width: 100%; clear: both; }
/*IPAD STYLES*/
@media only screen and (max-width: 640px) {
a[href^="tel"], a[href^="sms"] {
text-decoration: none;
color: #0a8cce; /* or whatever your want */
pointer-events: none;
cursor: default;
}
.mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
text-decoration: default;
color: #0a8cce !important;
pointer-events: auto;
cursor: default;
}
table[class=devicewidth] {width: 440px!important;text-align:center!important;}
table[class=devicewidthinner] {width: 420px!important;text-align:center!important;}
img[class=banner] {width: 440px!important;height:220px!important;}
img[class=colimg2] {width: 440px!important;height:220px!important;}
}
/*IPHONE STYLES*/
@media only screen and (max-width: 480px) {
a[href^="tel"], a[href^="sms"] {
text-decoration: none;
color: #0a8cce; /* or whatever your want */
pointer-events: none;
cursor: default;
}
.mobile_link a[href^="tel"], .mobile_link a[href^="sms"] {
text-decoration: default;
color: #0a8cce !important;
pointer-events: auto;
cursor: default;
}
table[class=devicewidth] {width: 280px!important;text-align:center!important;}
table[class=devicewidthinner] {width: 260px!important;text-align:center!important;}
img[class=banner] {width: 280px!important;height:140px!important;}
img[class=colimg2] {width: 280px!important;height:140px!important;}
td[class=mobile-hide]{display:none!important;}
td[class="padding-bottom25"]{padding-bottom:25px!important;}
}
</style>
</head>
<body>
<!-- Start of preheader -->
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" st-sortable="preheader" >
<tbody>
<tr>
<td>
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td width="100%">
<table width="600" cellpadding="20" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td>
<table width="100%" align="left" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td st-title="fulltext-heading" style="font-family: Helvetica, arial, sans-serif; font-size: 40px; color: #333333; line-height: 30px; text-align:center;">
<b>Faveo</b>HELPDESK
</td>
</tr>
<tr>
<td st-title="fulltext-heading" style="font-family: Helvetica, arial, sans-serif; font-size: 20px; color: #333333; line-height: 30px; text-align:center;">
Daily Report
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- End of preheader -->
<!-- Start of seperator -->
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" st-sortable="seperator">
<tbody>
<tr>
<td>
<table width="600" align="center" cellspacing="0" cellpadding="0" border="0" class="devicewidth">
<tbody>
<tr>
<td width="550" align="center" height="1" bgcolor="#d1d1d1" style="font-size:1px; line-height:1px;">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- End of seperator -->
<!-- 2columns -->
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" st-sortable="2columns">
<tbody>
<tr>
<td>
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td width="100%">
<table bgcolor="#ffffff" width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td>
<table width="600" align="left" border="0" cellpadding="0" cellspacing="0" class="devicewidth">
<tbody>
<tr>
<td>
<!-- start of text content table -->
<table width="600" align="left" border="0" cellpadding="0" cellspacing="0" class="devicewidth">
<tbody>
<!-- Content -->
<tr>
<td>
<table width="600" align="center" border="0" cellpadding="20" cellspacing="0" class="devicewidthinner">
<tbody style="margin-left:100px;">
<tr>
<td style="font-family: Helvetica, arial, sans-serif; font-size: 18px; color: #333333; line-height:24px;" st-title="2coltitle1">
Hi {!! $name !!}
</td>
</tr>
<tr>
<td style="font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height:24px; color: #666666;" st-conteent="2colcontent1">
Below mentioned are your daily reportfor your {!! $company !!}.
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- end of Content -->
<!-- end of content -->
</tbody>
</table>
</td>
</tr>
<!-- end of text content table -->
</tbody>
</table>
<!-- end of right column -->
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- end of 2 columns -->
<!-- Start Full Text -->
<?php
foreach ($depts as $dept) {
$created = DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('created_at','LIKE','%'.$day1.'%')->count();
$closed = DB::table('tickets')->where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('closed_at','LIKE','%'.$day1.'%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
$ovdate = $overdue->created_at;
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
if(date('Y-m-d H:i:s') > $new_date){
$i++;
}
}
?>
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" st-sortable="full-text">
<tbody>
<tr>
<td>
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td width="100%">
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td height="20" style="font-size:1px; line-height:1px; mso-line-height-rule: exactly;">&nbsp;</td>
</tr>
<tr>
<td>
<table width="560" align="center" cellpadding="0" cellspacing="0" border="1" class="devicewidthinner">
<tbody>
<!--Table Heading-->
<tr>
<td st-title="fulltext-heading" style="font-family: Helvetica, arial, sans-serif; font-size: 30px; color: #333333; text-align:center; line-height: 30px;">
{!! $dept->name !!}
</td>
</tr><!--Table Heading-->
<tr>
<td style="font-family: Helvetica, arial, sans-serif; font-size: 18px; color: #333333; line-height:24px;">
<table style="width:100%">
<tr>
<td><b>Opened</b></td>
<td>{!! $created !!}</td>
</tr>
<tr>
<td><b>Closed</b></td>
<td>{!! $closed !!}</td>
</tr>
<tr>
<td><b>Inprogress</b></td>
<td>{!! $inprogress !!}</td>
</tr>
<tr>
<td><b>Overdue</b></td>
<td>{!! $i !!}</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<?php } ?>
<!-- end of full text -->
<!-- 2columns -->
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" st-sortable="2columns">
<tbody>
<tr>
<td>
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td width="100%">
<table bgcolor="#ffffff" width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td>
<table width="600" align="left" border="0" cellpadding="0" cellspacing="0" class="devicewidth">
<tbody>
<!-- Spacing -->
<tr>
<td width="100%" height="20"></td>
</tr>
<!-- Spacing -->
<tr>
<td>
<!-- start of text content table -->
<table width="600" align="left" border="0" cellpadding="0" cellspacing="0" class="devicewidth">
<tbody>
<!-- Content -->
<tr>
<td>
<table width="600" align="center" border="0" cellpadding="20" cellspacing="0" class="devicewidthinner">
<tbody>
<tr>
<td style="font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height:24px; color: #666666;" st-conteent="2colcontent1">
We should all work hard to guarantee that all tickets are being addressed in a timely manner.
</td>
</tr>
<tr>
<td style="font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height:24px; color: #666666;" st-conteent="2colcontent1">
Thank You,
</td>
</tr>
<tr>
<td style="font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height:24px; color: #666666;" st-conteent="2colcontent1">
Kind Regards,
</td>
</tr>
<tr>
<td style="font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height:24px; color: #666666;" st-conteent="2colcontent1">
{!! $company !!}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- end of Content -->
<!-- end of content -->
</tbody>
</table>
</td>
</tr>
<!-- end of text content table -->
</tbody>
</table>
<!-- end of left column -->
<!-- end of right column -->
</td>
</tr>
<!-- Spacing -->
<tr>
<td width="100%" height="10"></td>
</tr>
<!-- Spacing -->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- end of 2 columns -->
<!-- Start of seperator -->
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" st-sortable="seperator">
<tbody>
<tr>
<td>
<table width="600" align="center" cellspacing="0" cellpadding="0" border="0" class="devicewidth">
<tbody>
<tr>
<td align="center" height="30" style="font-size:0px; line-height:1px;">&nbsp;</td>
</tr>
<tr>
<td width="550" align="center" height="1" bgcolor="#d1d1d1" style="font-size:1px; line-height:1px;">&nbsp;</td>
</tr>
<tr>
<td align="center" height="30" style="font-size:1px; line-height:1px;">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- End of seperator -->
<!-- Start of Postfooter -->
<table width="100%" bgcolor="#ffffff" cellpadding="0" cellspacing="0" border="0" id="backgroundTable" st-sortable="postfooter" >
<tbody>
<tr>
<td>
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td width="100%">
<table width="600" cellpadding="20" cellspacing="0" border="0" align="center" class="devicewidth">
<tbody>
<tr>
<td valign="middle" style="font-family: Helvetica, arial, sans-serif; font-size: 14px;color: #666666; text-align:center;" st-content="postfooter">
Powered by <a href="#" style="text-decoration: none; color: #0a8cce">Faveo</a>
</td>
</tr>
<!-- Spacing -->
<tr>
<td width="100%" height="20"></td>
</tr>
<!-- Spacing -->
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- End of postfooter -->
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SmoothDeal</title>
</head>
<body style="background-color: #666">
<!-- Start Container -->
<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<!-- Start Main Text (introduction) -->
<!-- Main Title -->
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 24px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center;">
<strong> Daily Report</strong>
</p>
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 12px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
<strong>Hi {!! $name !!},</strong> <br> Below mentioned are your daily report for your {!! $company !!}.
</p>
<!-- End Main Text (introduction) -->
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF">
<!-- Start - Quick overview table -->
<!-- Quick overview table title -->
<p style="padding: 25px 0px 20px 0px; margin: 0; font-size: 18px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
Overview
</p>
<?php
foreach ($depts as $dept) {
$created = DB::table('tickets')->select('created_at')->where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('created_at','LIKE','%'.$day1.'%')->count();
$closed = DB::table('tickets')->where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('closed_at','LIKE','%'.$day1.'%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept->id)->where('team_id','=',$team_id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
$ovdate = $overdue->created_at;
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
if(date('Y-m-d H:i:s') > $new_date){
$i++;
}
}
?>
<!-- Overview Table -->
<table align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333;" width="500" border="0" cellspacing="0" cellpadding="10">
<tr >
<td align="center" bgcolor="#FFF2D9" colspan="2" style="border: 1px solid #F1DDDD; ">
<span style="font-size: 18px; color: #158CCA;"><strong>{!! $dept->name !!}</strong></span>
</td>
</tr>
<tr>
<td align="center"><strong>New tickets</strong></td>
<td align="center"><strong>{!! $created !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Closed tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $closed !!}</strong></td>
</tr>
<tr>
<td align="center"><strong>Inprogress tickets</strong></td>
<td align="center"><strong>{!! $inprogress !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Overdue tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $i !!}</strong></td>
</tr>
<tr>
<td colspan="2" style="height: 10px;"></td>
</tr>
</table>
<!-- End - Overview table -->
<?php } ?>
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 11px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
We should all work hard to guarantee that all tickets are being addressed in a timely manner. 
</p>
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: left;">
Thank You,<br/> Kind Regards,<br/>{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center; color: #3AB4FF;">
<strong> Powered by Faveo</strong>
</p>
</td>
</tr>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/footer_shadow.png" width="600" height="25" /></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,133 @@
<?php
$date = Date('d-m-Y');
$format = 'Y-m-d';
$day1 = Date($format,strtotime('-1 day'. $date));
$created = DB::table('tickets')->select('created_at')->where('dept_id','=',$dept_id)->where('created_at','LIKE','%'.$day1.'%')->count();
$closed = DB::table('tickets')->where('dept_id','=',$dept_id)->where('closed_at','LIKE','%'.$day1.'%')->count();
$inprogress = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept_id)->where('status', '=', 1)->count();
$overdues = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$dept_id)->where('status', '=', 1)->get();
$i = 0;
foreach ($overdues as $overdue) {
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id','=',$overdue->sla)->first();
$ovdate = $overdue->created_at;
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period)).'<br/><br/>';
if(date('Y-m-d H:i:s') > $new_date){
$i++;
}
}
// echo "created=".$created."<br/>";
// echo "closed=".$closed."<br/>";
// echo "inprogress=".$inprogress."<br/>";
// echo "overdue=".$i."<br/>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SmoothDeal</title>
</head>
<body style="background-color: #666">
<!-- Start Container -->
<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<!-- Start Main Text (introduction) -->
<!-- Main Title -->
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 24px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center;">
<strong> Daily Report</strong>
</p>
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 12px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
<strong>Hi {!! $name !!},</strong> <br> Below mentioned are your daily report for your {!! $company !!}.
</p>
<!-- End Main Text (introduction) -->
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF">
<!-- Start - Quick overview table -->
<!-- Quick overview table title -->
<p style="padding: 25px 0px 20px 0px; margin: 0; font-size: 18px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
Overview
</p>
<!-- Overview Table -->
<table align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333;" width="500" border="0" cellspacing="0" cellpadding="10">
<tr >
<td align="center" bgcolor="#FFF2D9" colspan="2" style="border: 1px solid #F1DDDD; ">
<span style="font-size: 18px; color: #158CCA;"><strong>{!! $dept->name !!}</strong></span>
</td>
</tr>
<tr>
<td align="center"><strong>New tickets</strong></td>
<td align="center"><strong>{!! $created !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Closed tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $closed !!}</strong></td>
</tr>
<tr>
<td align="center"><strong>Inprogress tickets</strong></td>
<td align="center"><strong>{!! $inprogress !!}</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Overdue tickets</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>{!! $i !!}</strong></td>
</tr>
<tr>
<td colspan="2" style="height: 10px;"></td>
</tr>
</table>
<!-- End - Overview table -->
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 11px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
We should all work hard to guarantee that all tickets are being addressed in a timely manner. 
</p>
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: left;">
Thank You,<br/> Kind Regards,<br/>{!! $company !!}
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center; color: #3AB4FF;">
<strong> Powered by Faveo</strong>
</p>
</td>
</tr>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/footer_shadow.png" width="600" height="25" /></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,186 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SmoothDeal</title>
</head>
<body style="background-color: #666">
<!-- Start Container -->
<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<!-- Start Main Text (introduction) -->
<!-- Main Title -->
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 24px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
Faveo HELPDESK
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center;">
<strong> Daily Report</strong>
</p>
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 12px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
<strong>Hi Bhanu,</strong> <br>Below mentioned are your daily report for your Helpdesk Support system.
</p>
<!-- End Main Text (introduction) -->
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF">
<!-- Start - Quick overview table -->
<!-- Quick overview table title -->
<p style="padding: 25px 0px 20px 0px; margin: 0; font-size: 18px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: center;">
A quick overview of our starter package
</p>
<!-- Overview Table -->
<table align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333;" width="500" border="0" cellspacing="0" cellpadding="10">
<tr >
<td align="center" bgcolor="#FFF2D9" colspan="2" style="border: 1px solid #F1DDDD; ">
<span style="font-size: 18px; color: #158CCA;"><strong>$ 25,00 today only!</strong></span>
</td>
</tr>
<tr>
<td align="center"><strong>Bandwith</strong></td>
<td align="center"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Webspace</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center"><strong>Bandwith</strong></td>
<td align="center"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Webspace</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>Bandwith</strong></td>
</tr>
<tr>
<td colspan="2" style="height: 10px;"></td>
</tr>
</table>
<!-- End - Overview table -->
<!-- Overview Table -->
<table align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333;" width="500" border="0" cellspacing="0" cellpadding="10">
<tr >
<td align="center" bgcolor="#FFF2D9" colspan="2" style="border: 1px solid #F1DDDD; ">
<span style="font-size: 18px; color: #158CCA;"><strong>$ 25,00 today only!</strong></span>
</td>
</tr>
<tr>
<td align="center"><strong>Bandwith</strong></td>
<td align="center"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Webspace</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center"><strong>Bandwith</strong></td>
<td align="center"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Webspace</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>Bandwith</strong></td>
</tr>
<tr>
<td colspan="2" style="height: 10px;"></td>
</tr>
</table>
<!-- End - Overview table -->
<!-- Overview Table -->
<table align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333;" width="500" border="0" cellspacing="0" cellpadding="10">
<tr >
<td align="center" bgcolor="#FFF2D9" colspan="2" style="border: 1px solid #F1DDDD; ">
<span style="font-size: 18px; color: #158CCA;"><strong>$ 25,00 today only!</strong></span>
</td>
</tr>
<tr>
<td align="center"><strong>Bandwith</strong></td>
<td align="center"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Webspace</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center"><strong>Bandwith</strong></td>
<td align="center"><strong>Bandwith</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#EBEBEB"><strong>Webspace</strong></td>
<td align="center" bgcolor="#EBEBEB"><strong>Bandwith</strong></td>
</tr>
<tr>
<td colspan="2" style="height: 10px;"></td>
</tr>
</table>
<!-- End - Overview table -->
<tr>
<td style="padding: " colspan="2" bgcolor="#FFFFFF">
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 11px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
We should all work hard to guarantee that all tickets are being addressed in a timely manner. 
</p>
<p style="padding: 15px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-align: left;">
Thank You,<br/> Kind Regards,<br/>Faveo HELPDESK/ Ladybird Support
</p>
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 12px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
To view or respond to the ticket, please login to the support ticket system. You're receiving this notice because
the ticket is assigned directly to you or to a team or department of which you're a member.
</p>
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 14px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px;">
Your friendly (<i>although with limited patience</i>) Customer Support System
</p>
<!-- Main Text -->
<p style="padding: 0px 30px 20px 50px; margin: 0; font-size: 16px; color: #333; font-weight: normal; font-family: Arial, Helvetica, sans-serif; line-height: 22px; text-align: center; color: #3AB4FF;">
<strong> Powered by Faveo</strong>
</p>
<!-- End Main Text (introduction) -->
</td>
</tr>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/footer_shadow.png" width="600" height="25" /></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,156 @@
@extends('themes.default1.agent.layout.agent')
@section('Dashboard')
class="active"
@stop
@section('dashboard-bar')
active
@stop
@section('dashboard')
class="active"
@stop
@section('content')
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.line_chart') !!}</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div class="chart" >
<div id="legendDiv"></div>
<canvas class="chart-data" id="tickets-graph" width="1000" height="400"></canvas>
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
<hr/>
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$.getJSON("reportdata", function (result) {
var labels=[], open=[], closed=[], reopened=[];
//,data2=[],data3=[],data4=[];
for (var i = 0; i < result.length; i++) {
// $var12 = result[i].day;
// labels.push($var12);
labels.push(result[i].date);
open.push(result[i].open);
closed.push(result[i].closed);
reopened.push(result[i].reopened);
// data4.push(result[i].open);
}
var buyerData = {
labels : labels,
datasets : [
{
label : "Total Tickets" ,
fillColor : "rgba(240, 127, 110, 0.3)",
strokeColor : "#f56954",
pointColor : "#A62121",
pointStrokeColor : "#E60073",
pointHighlightFill : "#FF4DC3",
pointHighlightStroke : "rgba(151,187,205,1)",
data : open
}
,{
label : "Open Tickets" ,
fillColor : "rgba(255, 102, 204, 0.4)",
strokeColor : "#f56954",
pointColor : "#FF66CC",
pointStrokeColor : "#fff",
pointHighlightFill : "#FF4DC3",
pointHighlightStroke : "rgba(151,187,205,1)",
data : closed
}
,{
label : "Closed Tickets",
fillColor : "rgba(151,187,205,0.2)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#0000CC",
pointHighlightFill : "#0000E6",
pointHighlightStroke : "rgba(151,187,205,1)",
data : reopened
}
// ,{
// label : "Reopened Tickets",
// fillColor : "rgba(102,255,51,0.2)",
// strokeColor : "rgba(151,187,205,1)",
// pointColor : "rgba(46,184,0,1)",
// pointStrokeColor : "#fff",
// pointHighlightFill : "#fff",
// pointHighlightStroke : "rgba(151,187,205,1)",
// data : data3
// }
]
};
var myLineChart = new Chart(document.getElementById("tickets-graph").getContext("2d")).Line(buyerData, {
showScale: true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines: false,
//String - Colour of the grid lines
scaleGridLineColor: "rgba(0,0,0,.05)",
//Number - Width of the grid lines
scaleGridLineWidth: 1,
//Boolean - Whether to show horizontal lines (except X axis)
scaleShowHorizontalLines: true,
//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: true,
//Boolean - Whether the line is curved between points
bezierCurve: false,
//Number - Tension of the bezier curve between points
bezierCurveTension: 0.3,
//Boolean - Whether to show a dot for each point
pointDot: true,
//Number - Radius of each point dot in pixels
pointDotRadius: 4,
//Number - Pixel width of point dot stroke
pointDotStrokeWidth: 1,
//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
pointHitDetectionRadius: 20,
//Boolean - Whether to show a stroke for datasets
datasetStroke: true,
//Number - Pixel width of dataset stroke
datasetStrokeWidth: 1,
//Boolean - Whether to fill the dataset with a color
datasetFill: true,
//String - A legend template
//Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
maintainAspectRatio: false,
//Boolean - whether to make the chart responsive to window resizing
responsive: true,
legendTemplate : '<ul style="list-style-type: square;">'
+'<% for (var i=0; i<datasets.length; i++) { %>'
+'<li style="color: <%=datasets[i].pointColor%>;">'
+'<span style=\"background-color:<%=datasets[i].pointColor%>\"></span>'
+'<% if (datasets[i].label) { %><%= datasets[i].label %><% } %>'
+'</li>'
+'<% } %>'
+'</ul>'
});
document.getElementById("legendDiv").innerHTML = myLineChart.generateLegend();
});
});
</script>
@stop

View File

@@ -56,6 +56,7 @@
<li @yield('Manage')><a data-target="#tabD" href="#">{!! Lang::get('lang.manage') !!}</a></li>
<li @yield('Settings')><a data-target="#tabE" href="#">{!! Lang::get('lang.settings') !!}</a></li>
<li @yield('Themes')><a data-target="#tabF" href="#">{!! Lang::get('lang.themes') !!}</a></li>
<li @yield('Plugin')><a data-target="#tabP" href="#">{!! Lang::get('lang.plugin') !!}</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
@@ -150,7 +151,7 @@ $tickets = App\Model\helpdesk\Ticket\Tickets::where('status','1')->get();
$i = count($tickets);
?>
<li>
<a href="{{ url('/ticket/open') }}">
<a href="{{ url('/ticket/inbox') }}">
<i class="fa fa-envelope"></i> <span>{!! Lang::get('lang.inbox') !!}</span> <small class="label pull-right bg-green">
{!! $i !!}</small>
</a>
@@ -256,6 +257,10 @@ $i = count($tickets);
<li id="bar" @yield('footer4')><a href="{{ url('create-footer4') }}" >{!! Lang::get('lang.footer4') !!}</a></li></a></li>
</ul>
</div>
<div class="tabs-pane @yield('plugin-bar')" id="tabF">
{{-- Event fire --}}
<ul class="nav navbar-nav"><?php \Event::fire(new App\Events\TopNavEvent()); ?></ul>
</div>
</div>
</div>
</div>

View File

@@ -15,14 +15,7 @@ class="active"
@section('content')
<div class="box box-info">
<?php
// $tickets = App\Model\Ticket\Tickets::where('created_at','>=',date('Y-m-d'))->get();
// echo count($tickets);
?>
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.line_chart') !!}</h3>
<div class="box-tools pull-right">
@@ -83,75 +76,65 @@ $delete = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id
$(function(){
$.getJSON("agen", function (result) {
var labels = [],data=[],data2=[];
var labels=[], open=[], closed=[], reopened=[];
//,data2=[],data3=[],data4=[];
for (var i = 0; i < result.length; i++) {
$var12 = result[i].month;
if($var12 == 1){
$var13 = "January";
}
if($var12 == 2){
$var13 = "Febuary";
}
if($var12 == 3){
$var13 = "March";
}
if($var12 == 4){
$var13 = "April";
}
if($var12 == 5){
$var13 = "May";
}
if($var12 == 6){
$var13 = "June";
}
if($var12 == 7){
$var13 = "July";
}
if($var12 == 8){
$var13 = "August";
}
if($var12 == 9){
$var13 = "September";
}
if($var12 == 10){
$var13 = "October";
}
if($var12 == 11){
$var13 = "November";
}
if($var12 == 12){
$var13 = "December";
}
labels.push($var13);
data.push(result[i].tickets);
// data2.push(result[i].monthNum);
// $var12 = result[i].day;
// labels.push($var12);
labels.push(result[i].date);
open.push(result[i].open);
closed.push(result[i].closed);
reopened.push(result[i].reopened);
// data4.push(result[i].open);
}
var buyerData = {
labels : labels,
datasets : [
{
label : "Tickets" ,
label : "Total Tickets" ,
fillColor : "rgba(240, 127, 110, 0.3)",
strokeColor : "#f56954",
pointColor : "#A62121",
pointStrokeColor : "#741F1F",
data : data
pointStrokeColor : "#E60073",
pointHighlightFill : "#FF4DC3",
pointHighlightStroke : "rgba(151,187,205,1)",
data : open
}
,{
label : "Open Tickets" ,
fillColor : "rgba(255, 102, 204, 0.4)",
strokeColor : "#f56954",
pointColor : "#FF66CC",
pointStrokeColor : "#fff",
pointHighlightFill : "#FF4DC3",
pointHighlightStroke : "rgba(151,187,205,1)",
data : closed
}
//,
// {
// label : "Closed Tickets",
// fillColor : "rgba(151,187,205,0.2)",
// strokeColor : "rgba(151,187,205,1)",
// pointColor : "rgba(151,187,205,1)",
// pointStrokeColor : "#fff",
// pointHighlightFill : "#fff",
// pointHighlightStroke : "rgba(151,187,205,1)",
// data : data2
// }
,{
label : "Closed Tickets",
fillColor : "rgba(151,187,205,0.2)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#0000CC",
pointHighlightFill : "#0000E6",
pointHighlightStroke : "rgba(151,187,205,1)",
data : reopened
}
// ,{
// label : "Reopened Tickets",
// fillColor : "rgba(102,255,51,0.2)",
// strokeColor : "rgba(151,187,205,1)",
// pointColor : "rgba(46,184,0,1)",
// pointStrokeColor : "#fff",
// pointHighlightFill : "#fff",
// pointHighlightStroke : "rgba(151,187,205,1)",
// data : data3
// }
]
};

View File

@@ -50,7 +50,10 @@ active
<h3 class="box-title" id="refresh2"><i class="fa fa-user"> </i> @if($thread->title){!! $thread->title !!} @endif</h3>
<div class="pull-right">
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
<?php if ($group->can_edit_ticket == 1) {?>
<?php
Event::fire(new \App\Events\TicketBoxHeader($user->id));
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>
<?php } ?>
@@ -195,8 +198,9 @@ echo UTC::usertimezone(date_format($time, 'Y-m-d H:i:s'));
@if($user->mobile !=null)<tr><td><b>Phone:</b></td> <td>{{$user->ext . $user->phone_number}}</td></tr>@endif
<tr><td><b>{!! Lang::get('lang.source') !!}:</b></td> <td>{{$ticket_source}}</td></tr>
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first();?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
<?php Event::fire(new App\Events\TicketDetailTable($TicketData)); ?>
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{$username}}</td></tr>
<?php Event::fire(new App\Events\TicketDetailTable($TicketData)); ?>
</table>
</div>
</div>
@@ -204,6 +208,8 @@ echo UTC::usertimezone(date_format($time, 'Y-m-d H:i:s'));
</div>
</div>
</div>
{{-- Event fire --}}
<?php Event::fire(new App\Events\TimeLineFormEvent($TicketData)); ?>
<div class='row'>
<div class='col-xs-12'>
<div class="nav-tabs-custom">
@@ -620,7 +626,11 @@ $data = $ConvDate[0];
</div>
@endif
@endif
<div class="timeline-footer" style="margin-bottom:-5px">
@if(!$conversation->is_internal)
<?php Event::fire(new App\Events\Timeline($conversation,$role,$user)); ?>
@endif
<?php
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
$i = 0;

View File

@@ -130,6 +130,9 @@ $helptopic = App\Model\helpdesk\Manage\Help_topic::get();
{!! Form::textarea('Details',null,['class' => 'form-control']) !!}
</div>
{{-- Event fire --}}
<?php Event::fire(new App\Events\ClientTicketForm()); ?>
<div class="col-md-12" id="response"> </div>
<div id="ss" class="xs-md-6 form-group {{ $errors->has('') ? 'has-error' : '' }}"> </div>
</div>

View File

@@ -10,47 +10,56 @@
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here')!!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.frequently_asked_questions') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.allarticle') !!}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<div id="content" class="site-content col-md-9 archive-list archive-article">
@foreach($article as $arti)
<h3><a href="{{route('show',$arti->slug)}}">{{$arti->name}}</a></h3>
<hr>
<ul class="col-md-10" id="article1">
<li class="pull-left"><img src="{{asset('lb-faveo/Img/icon/time.png')}}">&nbsp;&nbsp;&nbsp;<?php $utc = $arti->created_at;
$time = UTC::usertimezone($utc);
?>{!! $time !!}&nbsp;&nbsp;
<?php
$category_id = App\Model\kb\Relationship::where('article_id', $arti->id)->lists('category_id');
foreach ($category_id as $id) {
$category = App\Model\kb\Category::where('id', $id)->first();
?>
<a href="{{asset('category-list/'.$category->slug)}}"><img src="{{asset('lb-faveo/Img/icon/category.png')}}">&nbsp;&nbsp;&nbsp;{{$category->name}}</a> &nbsp;&nbsp;</li>
<?php }
?>
</ul>
<br>
<hr>
<?php $str = $arti->description ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 300) ?>
<p>{!!$excerpt!!} <a class="readmore-link" href="{{route('show',$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
<article class="hentry">
<header class="entry-header">
<i class="fa fa-list-alt fa-2x fa-fw pull-left text-muted"></i>
<h2 class="entry-title h4"><a href="{{url('show/'.$arti->slug)}}" onclick="toggle_visibility('foo');">{{$arti->name}}</a></h2>
</header><!-- .entry-header -->
<?php $str = $arti->description; ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 200); ?>
<blockquote class="archive-description">
<?php $content = trim(preg_replace("/<img[^>]+\>/i", "", $excerpt), " \t.") ?>
{!! strip_tags($content) !!}
<p><a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a></p>
</blockquote>
<footer class="entry-footer">
<div class="entry-meta text-muted">
<span class="date"><i class="fa fa-clock-o fa-fw"></i> <time datetime="2013-10-22T20:01:58+00:00">{{$arti->created_at->format('l, d-m-Y')}}</time></span>
</div><!-- .entry-meta -->
</footer><!-- .entry-footer -->
</article><!-- .hentry -->
{{-- <hr> --}}
@endforeach
<div class="pagination">
<?php echo $article->render(); ?>
</div>
</div>
@stop
@section('category')
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
<ul class="nav nav-pills nav-stacked nav-categories">
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>
@endforeach
</ul>
@stop

View File

@@ -7,26 +7,28 @@
@section('kb')
class = "active"
@stop
<?php $category = App\Model\kb\Category::where('id','=',$id)->first(); ?>
@section('breadcrumb')
<div class="site-hero clearfix">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li class="active">{!! Lang::get('lang.allcategory') !!}</li>
<li class="active">{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.category') !!}</li>
<li class="active">{!! $category->name !!}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<div id="content" class="site-content col-md-9">
<header class="archive-header">
@foreach($categorys as $category)
<h1 >{!! $category->name !!}</h1>
</header><!-- .archive-header -->
<blockquote class="archive-description" style="display: none;">
<p>{!! $category->description !!}</p>
</blockquote>
@endforeach
<div class="archive-list archive-article">
<?php foreach ($article_id as $id) { ?>
<?php $article = App\Model\kb\Article::where('id', $id)->get(); ?>
@@ -39,7 +41,8 @@
<?php $str = $arti->description; ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 400); ?>
<blockquote class="archive-description">
<p>{!!$excerpt!!}</p><br/>
<?php $content = trim(preg_replace("/<img[^>]+\>/i", "", $excerpt), " \t.") ?>
<p>{!! strip_tags($content) !!}</p>
<a class="readmore-link" href="{{url('show/'.$arti->slug)}}">{!! Lang::get('lang.read_more') !!}</a>
</blockquote>
<footer class="entry-footer">
@@ -51,7 +54,7 @@
@endforeach
<?php
}
echo $all->render();
//echo $all->render();
?>
</div>
</div>
@@ -70,3 +73,18 @@
@stop
@section('category')
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
<ul class="nav nav-pills nav-stacked nav-categories">
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>
@endforeach
</ul>
@stop

View File

@@ -14,8 +14,8 @@
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here')!!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.frequently_asked_questions') !!}</li>
<li class="active">{!! Lang::get('lang.allcategory') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
<li class="active">{!! Lang::get('lang.category') !!}</li>
</ol>
</div>
@stop
@@ -41,7 +41,7 @@
?>
<section class="articles-list">
<h3><a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a> <span>({{count($all)}})</span></h3>
<h3><i class="fa fa-folder-open-o fa-fw text-muted"></i> <a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a> <span>({{count($all)}})</span></h3>
<ul class="articles">
<hr>
<?php foreach ($article_id as $id) {
@@ -55,7 +55,7 @@
@foreach($article as $arti)
<li class="article-entry image" style="margin-left: 50px;">
<h4><a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a></h4>
<span class="article-meta">{{$arti->created_at}}
<span class="article-meta">{{$arti->created_at->format('l, d-m-Y')}}
<?php $str = $arti->description ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 55) ?>
@@ -72,10 +72,8 @@
@endforeach
</div>
<div>
{!! $categorys->render() !!}
</div>
</div>
<!-- end of page content -->
@stop

View File

@@ -28,22 +28,24 @@
@endif
@section('breadcrumb')
<div class="site-hero clearfix">
<div class="container">
<ol class="breadcrumb breadcrumb-custom">
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<li class="active">{!! Lang::get('lang.knowledge_base') !!}</li>
<li>{!! Lang::get('lang.you_are_here') !!}: </li>
<li>{!! Lang::get('lang.home') !!}</li>
<li>{!! Lang::get('lang.knowledge_base') !!}</li>
</ol>
</div>
</div>
@stop
<div id="content" class="site-content col-md-9">
<div class="row">
<?php $categories = App\Model\kb\Category::paginate('4');
<?php $categories = App\Model\kb\Category::all();
?>
@foreach($categorys as $category)
{{-- get the article_id where category_id == current category --}}
<?php
$all = App\Model\kb\Relationship::where('category_id', '=',$category->id)->get();
$all = App\Model\kb\Relationship::all();
/* from whole attribute pick the article_id */
$page = App\Model\kb\Relationship::where('category_id', '=',$category->id)->paginate('3');
/* from whole attribute pick the article_id */
@@ -59,19 +61,19 @@
</h1>
<ul class="fa-ul">
<?php foreach ($article_id as $id) {
?>
<?php
$article = App\Model\kb\Article::where('id', '=', $id)->where('status', '=','1')->where('type', '=','1')->get();
?>
@foreach($article as $arti)
<li>
<i class="fa-li fa fa-list-alt fa-fw text-muted"></i>
<h3 class="h5"><a href="#"><a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a></h3>
<span class="article-meta">{{$arti->created_at}}</span>
<?php $str = $arti->description;
$len = strlen($str); ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 50); ?>
<p >{!!$excerpt!!} <br/><a class="more-link text-center" href="{{url('show/'.$arti->slug)}}" style="color: orange">{!! Lang::get('lang.read_more') !!}</a></p>
<span class="article-meta">{{$arti->created_at->format('l, d-m-Y')}}</span>
<?php $str = $arti->description;
$len = strlen($str);
$excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 50); ?>
{!!$excerpt!!} <br/><a class="more-link text-center" href="{{url('show/'.$arti->slug)}}" style="color: orange">{!! Lang::get('lang.read_more') !!}</a>
</li>
@endforeach
<?php } ?>
@@ -80,7 +82,7 @@
</section>
</div>
@endforeach
{!! $categories->setPath('show/'); !!}
</div>
<section class="section">
<div class="banner-wrapper banner-horizontal clearfix">
@@ -92,8 +94,10 @@
</div>
</section>
</div>
@stop
@section('category')
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}</h2>
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
<ul class="nav nav-pills nav-stacked nav-categories">
@foreach($categorys as $category)
<?php
@@ -105,5 +109,3 @@ $numcount = count($article_id);
@endforeach
</ul>
@stop
@stop

View File

@@ -9,31 +9,52 @@
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<div id="content" class="site-content col-md-9">
@foreach($result as $arti)
<article class="format-standard type-post hentry clearfix">
<header class="clearfix">
<h3 class="post-title">
<small><i class="fa fa-list-alt fa-2x fa-fw pull-left text-muted"></i></small>
<a href="{{url('show/'.$arti->slug)}}">{{$arti->name}}</a>
</h3>
<div class="post-meta clearfix">
<span class="date">{{$arti->created_at->format('l, d-m-Y')}}</span>
<span class="category"><a href="#" title="View all posts in Server &amp; Database">Server &amp; Database</a></span>
</div><!-- end of post meta -->
</header>
<?php $str = $arti->description ?>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 100) ?>
<p>{!!$excerpt!!} <a class="readmore-link" href="{{url('show/'.$arti->slug)}}">Read more</a></p>
<?php $excerpt = App\Http\Controllers\Client\kb\UserController::getExcerpt($str, $startPos = 0, $maxLength = 200) ?>
<blockquote class="archive-description">
<p>{!! strip_tags($excerpt) !!} </p>
<a class="readmore-link" href="{{url('show/'.$arti->slug)}}">Read more</a>
</blockquote>
<div class="post-meta clearfix">
<span class="date"><i class="fa fa-clock-o fa-fw"></i> {{$arti->created_at->format('l, d-m-Y')}}</span>
</div><!-- end of post meta -->
<hr>
@endforeach
</article>
<!-- end of page content -->
<div class="pagination">
<?php echo $result->render(); ?>
</div>
</div>
@stop
</div>
</div>
@section('category')
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
<ul class="nav nav-pills nav-stacked nav-categories">
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>
@endforeach
</ul>
@stop

View File

@@ -14,14 +14,14 @@ $category_id = $all->lists('category_id');
<li class="text">{!! Lang::get('lang.you_are_here') !!}: </li>
<?php $category = App\Model\kb\Category::where('id', $category_id)->first(); ?>
<li><a href="{{url('/')}}">{!! Lang::get('lang.home') !!}</a></li>
<li><a href="{{url('category-list')}}">{!! Lang::get('lang.allcategory') !!}</a></li>
<li><a href="{{url('category-list')}}">{!! Lang::get('lang.category') !!}</a></li>
<li><a href="{{url('category-list/'.$category->slug)}}">{{$category->name}}</a></li>
<li class="active">{{$arti->name}}</li>
</ol>
</div>
@stop
@section('content')
<div id="content" class="site-content col-md-12">
<div id="content" class="site-content col-md-9">
<!--
<article class=" type-post format-standard hentry clearfix">
<h1 class="post-title"><a href="#">{{$arti->name}}</a></h1>
@@ -64,7 +64,7 @@ $category_id = $all->lists('category_id');
<div class="comment-metadata">
<small class="date text-muted">
<time datetime="2013-10-23T01:50:50+00:00">{!! $comment->created_at !!}</time>
<time datetime="2013-10-23T01:50:50+00:00">{!! $comment->created_at->format('l, d-m-Y') !!}</time>
</small>
</div><!-- .comment-metadata -->
</footer><!-- .comment-meta -->
@@ -133,3 +133,19 @@ $category_id = $all->lists('category_id');
{!! $category->name !!} -
@endif
@stop
@section('category')
<h2 class="section-title h4 clearfix">{!! Lang::get('lang.categories') !!}<small class="pull-right"><i class="fa fa-hdd-o fa-fw"></i></small></h2>
<ul class="nav nav-pills nav-stacked nav-categories">
<?php $categorys = App\Model\kb\Category::all(); ?>
@foreach($categorys as $category)
<?php
$num = \App\Model\kb\Relationship::where('category_id','=', $category->id)->get();
$article_id = $num->lists('article_id');
$numcount = count($article_id);
?>
<li><a href="{{url('category-list/'.$category->slug)}}"><span class="badge pull-right">{{$numcount}}</span>{{$category->name}}</a></li>
@endforeach
</ul>
@stop

View File

@@ -10,7 +10,7 @@
$title_name = "SUPPORT CENTER";
}
?>
<title> @yield('title') {!! $title_name !!} </title>
<title> @yield('title') {!! strip_tags($title_name) !!} </title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- Bootstrap 3.3.2 -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
@@ -266,7 +266,7 @@ $footer4 = App\Model\helpdesk\Theme\Footer4::whereId('1')->first();
<hr/>
<div class="row">
<div class="site-info col-md-6">
<p class="text-muted">{!! Lang::get('lang.copyright') !!} &copy; {!! date('Y') !!} <a href="{!! $company->website !!}">{!! $company->company_name !!}</a>. {!! Lang::get('lang.all_rights_reserved') !!}. {!! Lang::get('lang.powered_by') !!} <a href="http://www.faveohelpdesk.com/">Faveo</a></p>
<p class="text-muted">{!! Lang::get('lang.copyright') !!} &copy; {!! date('Y') !!} <a href="{!! $company->website !!}">{!! $company->company_name !!}</a>. {!! Lang::get('lang.all_rights_reserved') !!}. {!! Lang::get('lang.powered_by') !!} <a href="http://www.faveohelpdesk.com/" target="_blank">Faveo</a></p>
</div>
<div class="site-social text-right col-md-6">
<?php $social = App\Model\kb\Social::where('id', '1')->first(); ?>

View File

@@ -15,7 +15,7 @@
"php-imap/php-imap": "~2.0",
"neitanod/forceutf8": "dev-master",
"nicolaslopezj/searchable": "1.*"
},
"require-dev": {
"phpunit/phpunit": "~4.0",

View File

@@ -18,7 +18,6 @@
|
*/
require __DIR__.'/code/bootstrap/autoload.php';
/*

BIN
lb-faveo/Img/Ladybird.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

BIN
lb-faveo/dist/1123.logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
lb-faveo/dist/1351.logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
lb-faveo/dist/img/ladybird.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
lb-faveo/dist/img/ladybird.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB