public function login_now() { $this->use->use_lib('site/sessions'); $session = new sessions(); if ($session->get_login()) { exit; } else { $this->use->use_lib('site/students'); $students = new students(); echo $students->find_student_login(); } }
/** * Response when updating role succeed. * * @param \Orchestra\Model\Role $role * * @return mixed */ public function destroySucceed(students $students) { $message = trans('orchestra/control::response.roles.delete', ['name' => $students->getAttribute('name')]); return $this->redirectWithMessage(handles('orchestra::students'), $message); }
<?php $use = new class_loader(); $use->use_lib('site/students'); $use->use_lib('site/sessions'); $use->use_lib('table/tpl_students'); $students = new students(); $tpl_students = new tpl_students(); $session = new sessions(); $data = $students->get_more_election(); $total = $students->count_all(); ?> <script src="<?php echo site_url('include/js/Chart.js'); ?> "></script> <!-- PORTFOLIO SECTION --> <div id="dg"> <div class="container"> <div class="row centered"> <h4>Elect</h4> <br> <?php foreach ($data as $rows) { if ($rows['sum'] > 0) { ?> <div class="col-lg-3"> <canvas id="canvas" height="130" width="130"></canvas>
<?php $use = new class_loader(); $use->use_lib('site/students'); $use->use_lib('site/sessions'); $use->use_lib('table/tpl_students'); $students = new students(); $tpl_students = new tpl_students(); $session = new sessions(); ?> <div class="container w"> <div class="row centered"> <br><br> <h4>Students</h4> <hr> <br><br> <?php foreach ($students->find_elect() as $row) { ?> <div class="col-lg-4 form-control-row"> <img src="<?php echo site_url($row[$tpl_students->image()]); ?> " class="img-responsive"/> <h4><?php echo $row[$tpl_students->first_name()] . ' ' . $row[$tpl_students->first_name()]; ?> </h4> <p><?php
public function postStudentsAttendenceIndex() { $clseId = Input::get('class'); $sectionId = Input::get('section'); //return $clseId; // $today = date("Y-m-d"); /* $this->getallclass(); $GetStudents=DB::table('tbl_studets') ->join('tbl_attendence','tbl_studets.st_id','=','tbl_attendence.uid') ->select('tbl_studets.*','tbl_attendence.*') ->where('tbl_attendence.institute_code','=',Auth::user()->institute_id) ->where('tbl_studets.institute_code','=',Auth::user()->institute_id) ->where('tbl_attendence.type','=','Student') ->where('tbl_studets.class','=',$clseId) ->where('tbl_studets.section','=',$sectionId) // ->where('tbl_attendence.created_at','LIKE',"%$today%") ->get();*/ $GetStudents = students::where('institute_code', '=', Auth::user()->institute_id)->where('class', '=', $clseId)->where('section', '=', $sectionId)->get(); return view('admin.attendence.studentsAttendenceIndex')->with('GetStudents', $GetStudents)->with('allclass', $this->getallclass()); }
<?php header('content-type:text/html;charset=utf-8'); //对象的第二个重要特征--继承 class human { public $name; public $age; public $sex; function say($word) { echo $this->name . '年龄为' . $this->age . '在说' . $word . '<br />'; } function dosth($sth) { echo $this->name . '年龄为' . $this->age . '在做' . $sth . '<br />'; } } class students extends human { public $lever; public function study($subject) { echo $this->name . '年龄为' . $this->age . '在学习' . $subject; } } $s1 = new students(); $s1->name = 'tom'; $s1->age = 23; $s1->dosth('BOLO'); $s1->dosth('homework');