Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
where('branch_id',Session::get('user')['branch_id'])->get();
foreach($cal as $cc){
$bb="";
foreach(DB::table('borrowers')->where('id',$cc->borrower_id)->get() as $borrower){
$bb = ucfirst(strtolower($borrower->title))." ".ucfirst(strtolower($borrower->firstName))." ".ucfirst(strtolower($borrower->middleName))." ".ucfirst(strtolower($borrower->lastName));
}
$date = explode('-',$cc->dueDate);
if(count($date) > 2){
$year = $date[0];
$month = $date[1]-1;
$day = $date[2];
$amount = number_format($cc->amount);
$calendar .="
{
title: '$bb',
start: new Date($year, $month, $day),
allDay: false,
className: 'fc-success',
description: 'Loan Repayment Schedule: $amount, $cc->dueDate'
},
";
}
}
$cal2 = DB::table('loans')->get();
foreach($cal2 as $cc){
$bb="";
foreach(DB::table('borrowers')->where('branch_id',Session::get('user')['branch_id'])->where('id',$cc->borrower_id)->get() as $borrower){
$bb = ucfirst(strtolower($borrower->title))." ".ucfirst(strtolower($borrower->firstName))." ".ucfirst(strtolower($borrower->middleName))." ".ucfirst(strtolower($borrower->lastName));
}
$date = explode('-',$cc->loanReleaseDate);
if(count($date) > 2){
$year = $date[0];
$month = $date[1]-1;
$day = $date[2];
$amount = number_format($cc->principalAmount);
$calendar .="
{
title: '$bb',
start: new Date($year, $month, $day),
allDay: false,
className: 'fc-danger',
description: 'Loan Release $amount, $cc->loanReleaseDate'
},
";
}
}
#
#
## Kama unataka event yeyote itokee kwenye calender copy and paste code za hapa chini na uzingatie kila kitu.
## Anzia hapa
foreach(DB::table('events')->where('branch_id',Session::get('user')['branch_id'])->get() as $event){
$date = explode('-',$event->date);
$title = $event->title;
$description = $event->description;
if(strlen($description) > 0){
$description = $event->description;
}else{
$description = 'Custom Event';
}
$year = $date[0];
$month = $date[1]-01;
$day = $date[2];
$dd = $event->date;
$calendar .="
{
title: '$title',
start: new Date($year, $month, $day),
allDay: true,
className: 'fc-primary',
description: 'Custom Event'
},
";
}
# Ishia hapa
return view('pages.calendar')->with('calendar',$calendar);
}
public function add(Request $request){
$data = array(
'branch_id'=>Session::get('user')['branch_id'],
'title'=>$request->title,
'description'=>$request->description,
'date'=>$request->date,
);
DB::table('events')->insert($data);
return redirect('/calendar');
}
}