コード例 #1
0
ファイル: basic.blade.php プロジェクト: AjitHogade/clg_web

</head>
<body style="background:#5F5F5F;position:relative;overflow:hidden">

@include('layouts.teachers.header')

<div id="" style="overflow:none">
<div class="w3-container" style="width:100%">

<div id="">
<div class="" style="width:100%">

     <div class="w3-row">
      <?php 
$isIncharge = ClassIncharge::where('teacher_id', '=', Auth::user()->get()->id)->first();
?>
@if($isIncharge === null)

  <div id="body_section" class="w3-col m12 content_row animated bounceIn" >
<div class="content w3-row" style="">

 
          @yield('content')  
      </div>
  </div>
@else
<div id="acc_section" class="w3-col m1" style="">
  
  @include('layouts.teachers.left_nav')
コード例 #2
0
 public function processStudentFile($dataArray, $model, $section_id, $year_id)
 {
     function compareByName($dataArray, $b)
     {
         return strcmp($dataArray[3], $b[3]);
     }
     usort($dataArray, 'compareByName');
     $num = count($dataArray);
     //echo $num;
     //$counter
     for ($row = 0; $row < $num; $row++) {
         for ($col1 = 0; $col1 < 15; $col1++) {
             $col[$col1] = $dataArray[$row][$col1];
             //  var_dump($col[$col1]);
         }
         $csv_import = new $model();
         $csv_import->roll_no = "fyit16_" . $row;
         $csv_import->first_name = $col[0];
         $csv_import->middle_name = $col[1];
         $csv_import->last_name = $col[2];
         $csv_import->username = strtolower($col[0]) . "_" . strtolower($col[2]);
         $csv_import->section = $section_id;
         $csv_import->year = $year_id;
         $csv_import->email = $col[3];
         $csv_import->address = $col[4];
         $csv_import->mobile = $col[5];
         $csv_import->telephone = $col[6];
         $csv_import->dob = $col[7];
         $csv_import->ssc_percent = $col[8];
         $csv_import->hsc_percent = $col[9];
         $csv_import->class_teacher = Auth::user()->get()->id;
         $csv_import->optional_subject = $col[10];
         $csv_import->last_year_ATKT = $col[11];
         $csv_import->last_year_percent = $col[12];
         $csv_import->sem1_ATKT = $col[13];
         $csv_import->sem2_ATKT = $col[14];
         $csv_import->updated_by = Auth::user()->get()->username;
         $csv_import->save();
         $csv_import = new $model();
         $first_name = $col[0];
         $middle_name = $col[1];
         $last_name = $col[2];
         $username = $col[0] . "_" . $col[2];
         $send_to = $col[3];
     }
     $stream = DB::table('streams')->where('stream_short', $model)->pluck('id');
     $setClassIncharge = new ClassIncharge();
     $setClassIncharge->teacher_id = Auth::user()->get()->id;
     $setClassIncharge->stream_id = $stream;
     $setClassIncharge->section_id = $section_id;
     $setClassIncharge->year_id = $year_id;
     $setClassIncharge->save();
     $data['status'] = "success";
     $data['message'] = "You have registered with a class Sucessdfully";
     return Redirect::intended('desktop')->with($data);
     //   return $this->sendMail($model);
 }