コード例 #1
0
 public function getMyprofile()
 {
     $id = Auth::user()->id;
     $alumni_id = null;
     $sql = "SELECT * FROM alumni WHERE account_id = ?";
     $prof = DB::select($sql, array($id));
     if ($prof != null) {
         $alumni_id = $prof[0]->id;
     }
     $sql2 = "SELECT * FROM degree WHERE alumni_id = ?";
     $deg = DB::select($sql2, array($alumni_id));
     $sql3 = "SELECT * FROM work_experience WHERE alumni_id = ?";
     $wrk_exp = DB::select($sql3, array($alumni_id));
     $sql4 = "SELECT * FROM certificate WHERE alumni_id = ?";
     $certificate = DB::select($sql4, array($alumni_id));
     // $sql5 = "SELECT * FROM alumni_tracer WHERE alumni_id = ?";
     $sql5 = "SELECT at.*, sq.question, sc.choice\n\t\t\t\tFROM alumni_tracer AS at\n\t\t\t\tINNER JOIN survey_questions AS sq\n\t\t\t\tON sq.id = at.question_id\n\t\t\t\tINNER JOIN survey_choices AS sc\n\t\t\t\tON sc.id = at.choice_id\n\t\t\t\tWHERE at.alumni_id = ?\n\t\t\t\tORDER BY at.question_id";
     $a_tracer = DB::select($sql5, array($alumni_id));
     $dept = Department::all();
     $region = Region::all();
     $province = Province::all();
     $occupation = Occupation::all();
     $company = Company::all();
     $deg_title = DegreeTitle::all();
     $school = School::all();
     $jobs = Job::all();
     $field = Field::all();
     $questions = DB::select("SELECT * FROM survey_questions");
     $civil_status = DB::select("SELECT * FROM civil_status");
     return View::make('user.profile')->with('company', $company)->with('field', $field)->with('occupation', $occupation)->with('work_exp', $wrk_exp)->with('degree', $deg)->with('a_tracer', $a_tracer)->with('certificate', $certificate)->with('school', $school)->with('deg_title', $deg_title)->with('profile', $prof)->with('dept', $dept)->with('region', $region)->with('province', $province)->with('civil_status', $civil_status)->with('questions', $questions)->with('jobs', $jobs);
 }
コード例 #2
0
ファイル: TokenController.php プロジェクト: himor/testing
 /**
  * Start test
  */
 public function startIndexAction()
 {
     Assets::reset()->add('main');
     $token = $this->getToken();
     if (!$token) {
         return Redirect::route('info')->with('message', 'Токен не найден');
     }
     if ($token->status == Token::TOKEN_STATUS_EMPTY) {
         /**
          * вывести форму где пользователь введёт свои данные
          */
         $departments = Department::all();
         $groups = Group::all();
         $selectedDepartments = array();
         $selectGroups = array();
         $selectedDepartments[] = 'Не выбран';
         $selectGroups[] = 'Не выбран';
         foreach ($departments as $department) {
             $selectedDepartments[$department->id] = $department->name;
         }
         foreach ($groups as $group) {
             $selectGroups[$group->id] = $group->name;
         }
         return View::make('test.start', ['token' => $token, 'departments' => $selectedDepartments, 'groups' => $selectGroups]);
     } elseif ($token->status == Token::TOKEN_STATUS_STARTED) {
         if ($this->isTokenValid($token)) {
             return Redirect::route('test.index');
         } else {
             Session::forget('token_string');
             $token->status = Token::TOKEN_STATUS_EXPIRED;
             $token->save();
             return Redirect::route('info')->with('message', 'Время теста истекло');
         }
     }
 }
コード例 #3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $product = Product::find($id);
     $departments = Department::all()->lists('name', 'id');
     $categories = Category::all()->lists('name', 'id');
     $brands = Brand::all()->lists('name', 'id');
     $sizes = Size::all()->lists('name', 'id');
     $colors = Color::all()->lists('name', 'id');
     return View::make('admin::products.edit', compact('product', 'departments', 'categories', 'brands', 'sizes', 'colors'));
 }
コード例 #4
0
ファイル: Role.php プロジェクト: Crocodile26/php-1
 public static function format(array $data = [], $single = false)
 {
     $departments = Department::all(true);
     if ($single) {
         $data = [$data];
     }
     foreach ($data as &$row) {
         $row['dname'] = $departments[$row['did']]['name'];
     }
     return $single ? $data[0] : $data;
 }
コード例 #5
0
 /**
  * Display a listing of departments
  */
 public function index()
 {
     $this->data['departments'] = Department::all();
     $this->data['departmentActive'] = 'active';
     $employeeCount = array();
     foreach (Department::all() as $dept) {
         $employeeCount[$dept->id] = Employee::join('designation', 'employees.designation', '=', 'designation.id')->join('department', 'designation.deptID', '=', 'department.id')->where('department.id', '=', $dept->id)->count();
     }
     $this->data['employeeCount'] = $employeeCount;
     return View::make('admin.departments.index', $this->data);
 }
コード例 #6
0
 /**
  * Show the form for editing the specified branch.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $employee = Employee::find($id);
     $branches = Branch::all();
     $departments = Department::all();
     $jgroups = JGroup::all();
     $etypes = EType::all();
     $banks = Bank::all();
     $bbranches = BBranch::all();
     return View::make('employees.edit', compact('branches', 'departments', 'etypes', 'jgroups', 'banks', 'bbranches', 'employee'));
 }
コード例 #7
0
ファイル: ReportsController.php プロジェクト: kenkode/xpose
 public function period_summary()
 {
     $branches = Branch::all();
     $depts = Department::all();
     return View::make('pdf.summarySelect', compact('branches', 'depts'));
 }
コード例 #8
0
 public function getModifyPub($id)
 {
     $pub = Publicaciones::find($id);
     $title = "Modificar publicacion | pasillo24.com";
     if ($pub->tipo == 'Lider') {
         $url = "usuario/publicacion/modificar/lider/" . $id;
     } elseif ($pub->tipo == 'Habitual') {
         $url = "usuario/publicacion/modificar/habitual/" . $id;
     } elseif ($pub->tipo == 'Casual') {
         $url = "usuario/publicacion/modificar/casual/" . $id;
     }
     $categorias = Categorias::all();
     $subCat = SubCat::all();
     $departamento = Department::all();
     if ($pub->categoria == 34) {
         $marcas = Marcas::all();
         $modelos = Modelo::where('marca_id', '=', $pub->marca_id)->get();
         return View::make('publications.modifyPub')->with('title', $title)->with('tipo', $pub->tipo)->with('publicaciones', $pub)->with('url', $url)->with('categorias', $categorias)->with('subCat', $subCat)->with('departamento', $departamento)->with('marcas', $marcas)->with('modelos', $modelos);
     } else {
         return View::make('publications.modifyPub')->with('title', $title)->with('tipo', $pub->tipo)->with('publicaciones', $pub)->with('url', $url)->with('categorias', $categorias)->with('subCat', $subCat)->with('departamento', $departamento);
     }
 }
コード例 #9
0
 /**
  * Show list of employee department choices
  *
  * @return mixed
  */
 public function manageDepartments()
 {
     $depts = Department::all();
     return View::make('admin.departments', compact('depts'));
 }
コード例 #10
0
 public function listAction()
 {
     $departments = Department::all();
     $this->view->setVar('departments', $departments);
 }
コード例 #11
0
 /**
  * Display all departments
  */
 public function indexAction()
 {
     $departments = Department::all();
     return View::make('department.index', ['departments' => $departments]);
 }
コード例 #12
0
@extends('layouts.admin.default')

@section('content')

<?php 
$employeeEditId = $employeeEditInfo[0]->id;
$message = Session::get('message');
//echo 'employeeEdit:'.$employeeEditId;
//exit;
$companies = Company::all();
$departments = Department::all();
$jobTitles = JobTitle::all();
$managers = Employee::all();
$supervisors = Employee::all();
$roles = DB::table('groups')->get();
if (isset($employeeEditId) && !empty($employeeEditId)) {
    $userEdit = DB::table('users')->where('employee_id', $employeeEditId)->first();
}
if (isset($userEdit) && !empty($userEdit)) {
    $userGroupEdit = DB::table('users_groups')->where('user_id', $userEdit->id)->first();
}
if (isset($userGroupEdit) && !empty($userGroupEdit)) {
    $groupEdit = DB::table('groups')->where('id', (int) $userGroupEdit->group_id)->first();
}
$companyArr[0] = '';
if (!empty($companies)) {
    foreach ($companies as $company) {
        $companyArr[$company->id] = $company->name;
    }
}
$departmentArr[0] = '';
コード例 #13
0
 public function getListDepartments()
 {
     $departments = Department::all();
     return View::make('admin.departments')->with('departments', $departments);
 }
コード例 #14
0
 public function online()
 {
     if (\KodeInfo\Utilities\Utils::isDepartmentAdmin(Auth::user()->id)) {
         $department_admin = DepartmentAdmins::where('user_id', Auth::user()->id)->first();
         $department = Department::where('id', $department_admin->department_id)->first();
         $user_ids = OperatorsDepartment::where('department_id', $department->id)->lists('user_id');
     } else {
         $group = Groups::where("name", "operator")->first();
         $user_ids = UsersGroups::where("group_id", $group->id)->lists("user_id");
     }
     if (sizeof($user_ids) > 0) {
         $this->data["operators"] = User::whereIn("id", $user_ids)->where("is_online", 1)->get();
     } else {
         $this->data["operators"] = [];
     }
     foreach ($this->data["operators"] as $operator) {
         $department_id = OperatorsDepartment::where('user_id', $operator->id)->pluck("department_id");
         $department = Department::find($department_id);
         $company = Company::find($department->company_id);
         $operator->department = $department;
         $operator->company = $company;
     }
     $this->data['permissions'] = Permissions::all();
     $this->data['departments'] = Department::all();
     return View::make('operators.all', $this->data);
 }
コード例 #15
0
 public function getEditInfo($id)
 {
     $user = User::find($id);
     if (!$user) {
         App::abort(404);
     }
     /*
     	Redirects the user if user 
     	meddles with the id in the url
     */
     /*first param becomes a variable user
     		2nd param is the user variable in this page*/
     $alldepartments = Department::all();
     return View::make('emp.edit-info')->with('user', $user)->with('alldepartments', $alldepartments);
 }
コード例 #16
0
 public function getRegister()
 {
     $title = 'Registro';
     $departamentos = Department::all();
     return View::make('register')->with('title', $title)->with('departamentos', $departamentos);
 }
コード例 #17
0
 /**
  * Display a listing of branches
  *
  * @return Response
  */
 public function index()
 {
     $departments = Department::all();
     return View::make('departments.index', compact('departments'));
 }
コード例 #18
0
 public function getTracer()
 {
     $regions = Region::all();
     $departments = Department::all();
     return View::make('home.tracer_form')->with('regions', $regions)->with('departments', $departments);
 }
コード例 #19
0
 public function getPublicationNormal()
 {
     $title = "Publicación HABITUAL | pasillo24.com";
     $marcas = Marcas::all();
     $url = 'usuario/publication/estandar/enviar';
     $departamento = Department::all();
     $categorias = Categorias::where('deleted', '=', 0)->where('tipo', '=', 1)->orderBy('nombre')->get();
     $otros = new StdClass();
     foreach ($categorias as $c) {
         if (strtolower($c->nombre) == 'otros') {
             $otros->id = $c->id;
             $otros->nombre = $c->nombre;
         }
     }
     if (!isset($otros->id)) {
         $otros->id = '1000';
         $otros->nombre = 'Otros';
     }
     $servicios = Categorias::where('deleted', '=', 0)->where('tipo', '=', 2)->orderBy('nombre')->get();
     $otros2 = new StdClass();
     foreach ($servicios as $c) {
         if (strtolower($c->nombre) == 'otros') {
             $otros2->id = $c->id;
             $otros2->nombre = $c->nombre;
         }
     }
     if (!isset($otros2->id)) {
         $otros2->id = '1000';
         $otros2->nombre = 'Otros';
     }
     $textos = Textos::where('id', '=', 2)->first();
     return View::make('publications.publicacion')->with('title', $title)->with('tipo', 'normal')->with('marcas', $marcas)->with('url', $url)->with('categorias', $categorias)->with('texto', $textos)->with('departamento', $departamento)->with('servicios', $servicios)->with('otros', $otros)->with('otros2', $otros2);
 }
コード例 #20
0
 public function getEmployability()
 {
     $course = Course::all();
     $dept = Department::all();
     return View::make('analytics.employability')->with('course', $course)->with('department', $dept);
 }
コード例 #21
0
ファイル: routes.php プロジェクト: kenkode/umash
        return View::make('leaveapplications.rejected', compact('leaveapplications'));
    });
});
Route::group(['before' => 'manage_settings'], function () {
    Route::get('migrate', function () {
        return View::make('migration');
    });
});
/*
* Template routes and generators 
*/
Route::get('template/employees', function () {
    $bank_data = Bank::all();
    $bankbranch_data = BBranch::all();
    $branch_data = Branch::all();
    $department_data = Department::all();
    $employeetype_data = EType::all();
    $jobgroup_data = JGroup::all();
    Excel::create('Employees', function ($excel) use($bank_data, $bankbranch_data, $branch_data, $department_data, $employeetype_data, $jobgroup_data, $employees) {
        require_once base_path() . "/vendor/phpoffice/phpexcel/Classes/PHPExcel/NamedRange.php";
        require_once base_path() . "/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DataValidation.php";
        $excel->sheet('employees', function ($sheet) use($bank_data, $bankbranch_data, $branch_data, $department_data, $employeetype_data, $jobgroup_data, $employees) {
            $sheet->row(1, array('PERSONAL FILE NUMBER', 'EMPLOYEE', 'FIRST NAME', 'LAST NAME', 'ID', 'KRA PIN', 'BASIC PAY', ''));
            $empdata = array();
            foreach ($employees as $d) {
                $empdata[] = $d->personal_file_number . ':' . $d->first_name . ' ' . $d->last_name . ' ' . $d->middle_name;
            }
            $emplist = implode(", ", $empdata);
            $listdata = array();
            foreach ($data as $d) {
                $listdata[] = $d->allowance_name;
コード例 #22
0
ファイル: AuthController.php プロジェクト: bakuryuthem0/nia
 public function getRegister()
 {
     $title = Lang::get('lang.titulo_3');
     $dep = Department::all();
     return View::make('indexs.register')->with('title', $title)->with('prov', $dep);
 }