当前位置: 首页>>代码示例>>PHP>>正文


PHP Student::search方法代码示例

本文整理汇总了PHP中Student::search方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::search方法的具体用法?PHP Student::search怎么用?PHP Student::search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


在下文中一共展示了Student::search方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search_students

 public function search_students()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         $data["actions"] = Session::get('actions');
         if (in_array('side_listar_alumnos', $data["actions"])) {
             $data["search"] = Input::get('search');
             $search_criteria = $data["search"];
             $data["state"] = Input::get('search_state');
             $search_level = Input::get('search_level');
             $data["level"] = $search_level ? $search_level : '0';
             $data["students_data"] = Student::search($search_criteria, $data["state"], $data["level"])->orderBy('lastname')->paginate(20);
             $data["states"] = ['T' => 'Todos', 'A' => 'Matriculados', 'P' => 'Pendientes de aprobación', 'D' => 'Matriculas desaprobadas', 'N' => 'No matriculados'];
             $data["levels"] = Level::lists('name', 'id');
             $data["levels"]["0"] = "Todos los niveles";
             return View::make('people/list_students', $data);
         } else {
             // Llamo a la función para registrar el log de auditoria
             $log_description = "Se intentó acceder a la ruta '" . Request::path() . "' por el método '" . Request::method() . "'";
             Helpers::registerLog(10, $log_description);
             Session::flash('error', 'Usted no tiene permisos para realizar dicha acción.');
             return Redirect::to('/dashboard');
         }
     } else {
         return View::make('error/error');
     }
 }
开发者ID:damv93,项目名称:trecedemayolaravel,代码行数:28,代码来源:PeopleController.php

示例2: showStudent

function showStudent()
{
    global $connector;
    global $result;
    $student = new Student();
    $course = new Course();
    $plan = new Plan();
    $student->setConnector($connector);
    $course->setConnector($connector);
    $plan->setConnector($connector);
    if (isset($_POST['operation'])) {
        list($operation, $params) = explode("#", $_POST['operation']);
        switch ($operation) {
            case 'delete':
                $error_msg = $student->delete($params);
                break;
            case 'edit':
                $stud = $student->getById($params);
                $result['edit'] = $stud;
                $result['edit']->student = $stud;
                $exam = new Exam();
                $exam->setConnector($connector);
                $result['edit']->exam = $exam->getList($result['edit']->student);
                break;
            case 'editChanges':
                $student->storeFormValues($_POST);
                $error_msg = $student->update();
                break;
            case 'saveChanges':
                $student->storeFormValues($_POST);
                $error_msg = $student->insert();
                if ($error_msg) {
                    $result['edit'] = $student;
                }
                break;
            case 'nextPage':
                $student->storeFormValues($_POST);
                $result['edit'] = $student;
                break;
            case 'createPassword':
                $stud = $student->getById($params);
                $stud->setConnector($connector);
                $error_msg = $stud->generatePassword();
                $result['edit'] = $stud;
                break;
            default:
                $error_msg = "Operazione non valida";
        }
        if ($error_msg != "") {
            $result["errorMessage"] = $error_msg;
        } elseif ($operation != 'edit' && $operation != "nextPage") {
            $result["statusMessage"] = "Operazione completata!";
        }
    }
    if (isset($_POST['search'])) {
        $result["students"] = $student->search($_POST['search']);
    } else {
        $result["students"] = $student->getList();
    }
    $result["plans"] = $plan->getList("id_piano");
    $result["courses"] = $course->getList("nome");
    $page = "student.php";
    include_once BASE_PATH . "template.php";
}
开发者ID:christian-rizza,项目名称:sis-portal,代码行数:64,代码来源:index.php

示例3: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin($assignment = null)
 {
     $model = new Student('search');
     $model->unsetAttributes();
     // clear any default values
     if ($assignment) {
         $dataProvider = new CArrayDataProvider($this->loadStudentsFromAssignment($assignment), array('keyField' => 'id', 'pagination' => array('pageSize' => 1000)));
     } else {
         if (isset($_GET['Student'])) {
             $model->attributes = $_GET['Student'];
         }
         $dataProvider = $model->search();
     }
     $this->render('admin', array('model' => $model, 'dataProvider' => $dataProvider));
 }
开发者ID:loristissino,项目名称:swu,代码行数:18,代码来源:StudentController.php

示例4: Student

<?php

require_once "../init.php";
$student = new Student(new PDOdb("mysql:host=localhost;dbname=usjr", "root", ""));
$studid = $_GET['studid'];
$mode = $_GET['mode'];
$result = $student->search(array('studid' => $studid));
?>
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <meta author="Rabsky">
      <title>
         Student Maintenance - Change Entries
      </title>
      <link rel="stylesheet" type="text/css" href="../css/ustyles.css">
   </head>
   <body>
      <header class="mainheader">
         <section class="lefthead">
             <span class="headtext">Rabsky University</span>
         </section>
         <section class="righthead">
         </section>
      </header>   
     <section id="regholder">
     <?php 
if ($mode === "1") {
    ?>
 
开发者ID:rickyb1970,项目名称:Rabsky,代码行数:30,代码来源:studentSearch.php


注:本文中的Student::search方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。