Esempio n. 1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $registration = registrar();
     if (!empty($registration)) {
         if ($registration->load('student') and isset($registration->student->id)) {
             if (!Auth::guard('student')->check()) {
                 Auth::guard('student')->login($registration->student);
             }
             return redirect()->route('students.profile.index');
         }
         $menu = Menu::get('SidebarMenu');
         $upload_alert = '';
         $form_alert = '';
         $payment_alert = '';
         if ($registration->step->upload_files) {
             $upload_alert = '<span class="badge bg-red pull-left"><i style="font-size:12px" class="fa fa-bell"></i></span>';
         }
         if ($registration->step->edit_form) {
             $form_alert = '<span class="badge bg-red pull-left"><i style="font-size:12px" class="fa fa-bell"></i></span>';
         }
         $menu->add('حالة الطلب', ['route' => 'registration.registrar.status'])->prepend('<i class="fa fa-question"></i>');
         // $menu->add('بوابة الطالب', ['route'=>'registration.registrar.portal'])->prepend('<i class="fa fa-dashboard"></i>');
         $menu->add('تعديل البيانات', ['route' => 'registration.registrar.form'])->prepend($form_alert . '<i class="fa fa-edit"></i>');
         $menu->add('تحميل الملفات', ['route' => 'registration.registrar.files'])->prepend($upload_alert . '<i class="fa fa-upload"></i>');
         if ($registration->step->make_payment) {
             $payment_alert = '<span class="badge bg-red pull-left"><i style="font-size:12px" class="fa fa-bell"></i></span>';
             $menu->add('دفع الرسوم', ['route' => 'registration.registrar.payment'])->prepend($payment_alert . '<i class="fa fa-credit-card"></i>');
         }
     }
     return $next($request);
 }
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $skill_levels = implode(',', array_keys(config('registration.skill_levels')));
     $social_status = implode(',', array_keys(config('registration.social_status')));
     $registration_id = registrar()->id;
     return ['first_name' => 'required|max:255|min:2', 'second_name' => 'required|max:255|min:2', 'third_name' => 'required|max:255|min:2', 'fourth_name' => 'max:255', 'last_name' => 'required|max:255|min:2', 'last_name_latin' => 'required|max:255|min:2', 'fourth_name_latin' => 'max:255', 'third_name_latin' => 'required|max:255|min:2', 'second_name_latin' => 'required|max:255|min:2', 'first_name_latin' => 'required|max:255|min:2', 'gender' => 'required|in:f,m', 'birthday' => 'required|date', 'passeport_country_id' => 'exists:lists_countries,id|required_with:passeport_number', 'nationality_type' => 'in:omani,expat|required', 'passeport_number' => 'required_unless:nationality_type,omani|max:255|min:4', 'passeport_issued' => 'date|required_with:passeport_number', 'passeport_expire' => 'date|required_with:passeport_number', 'stay_type' => 'sometimes|required', 'stay_expire' => 'required_unless:stay_type,non_resident', 'national_id' => 'required', 'religion' => 'required|in:jew,muslim,christian', 'contact_region' => '', 'contact_postalbox' => 'required|max:255', 'contact_street' => 'required|max:255', 'contact_home_number' => 'required|max:255', 'degree_country_id' => 'required|exists:lists_countries,id', 'birth_country_id' => 'required|exists:lists_countries,id', 'nationality_country_id' => 'sometimes|required|exists:lists_countries,id', 'nationality_city_id' => 'sometimes|required|exists:lists_cities,id', 'nationality_state_id' => 'sometimes|required|exists:lists_states,id', 'contact_country_id' => 'required|exists:lists_countries,id', 'contact_city_id' => 'sometimes|required|exists:lists_cities,id', 'contact_state_id' => 'sometimes|required|exists:lists_states,id', 'contact_email' => 'required|unique:registrations,contact_email,' . $registration_id . '|max:255', 'contact_mobile' => 'required|numeric', 'degree_graduation_year' => 'required|numeric', 'contact_phone' => 'numeric', 'contact_fax' => 'numeric', 'degree_speciality' => 'required', 'degree_institution' => 'required', 'degree_score' => 'required', 'social_status' => 'required|in:' . $social_status, 'social_job' => 'required', 'social_job_status' => 'required_if:social_job,employed', 'social_job_start' => 'required_if:social_job,employed', 'social_experience' => 'required_if:social_job,employed', 'social_job_employer' => 'required_if:social_job,employed', 'social_job_country_id' => 'required_if:social_job,employed|exists:lists_countries,id', 'social_job_city_id' => 'required_if:social_job,employed|exists:lists_cities,id', 'health_status' => 'in:0,1|required', 'health_disabled_type' => 'required_if:health_status,disabled', 'health_disabled_size' => 'required_if:health_status,disabled', 'computer_skills' => 'in:' . $skill_levels, 'internet_skills' => 'in:' . $skill_levels, 'internet_link' => '', 'cyber_cafe' => '', 'computer_availability' => '', 'reference' => 'required|in:iiswebsite,iisewebsite,iisfriend,iisefriend,other', 'reference_other' => 'required_if:reference,other'];
 }
Esempio n. 3
0
 /**
  * Handle the event.
  *
  * @param  RegistrationUpdated  $event
  * @return void
  */
 public function handle(RegistrationUpdated $event)
 {
     $registration = $event->registration;
     if (registrar()) {
         $registration->load('step', 'type', 'degrees', 'speciality', 'period', 'birthcountry', 'contactcountry', 'contactcity', 'nationalitycity');
         session()->put(config('registration.session_key'), $registration);
     }
 }
Esempio n. 4
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (registrar()) {
         $has_notifications = RegistrationNotification::where('registration_id', registrar()->id)->where('seen', 0)->count();
         $notification_routes = ['registration.registrar.notifications', 'registration.registrar.notifications.update'];
         if ($has_notifications && !in_array(Route::getCurrentRoute()->getName(), $notification_routes)) {
             return redirect()->route('registration.registrar.notifications')->with('message', 'عليك التأكيد بأنك قرأت هذه الإشعارات.');
         }
     }
     return $next($request);
 }
Esempio n. 5
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $menu = Menu::get('SidebarMenu');
     if (Auth::user()) {
         $menu->add('الرئيسية', ['route' => 'dashboards.admin'])->data('order', 1)->prepend('<i class="fa fa-home"></i>');
     } elseif (registrar()) {
         $menu->add('الرئيسية', ['route' => 'registration.registrar.index'])->data('order', 1)->prepend('<i class="fa fa-home"></i>');
     } elseif (student()) {
         $menu->add('الرئيسية', ['route' => 'students.profile.index'])->data('order', 1)->prepend('<i class="fa fa-home"></i>');
     }
     return $next($request);
 }
Esempio n. 6
0
} else {
    if (isset($_GET['acao'])) {
        $acao = $_GET['acao'];
        $dados = $_GET['dados'];
        $callback = $_GET['callback'];
    } else {
        $acao = '';
        $dados = '';
        $callback = '';
    }
}
if ($acao == 'sincronizar') {
    $resultado = sincronizar($dados);
}
if ($acao == 'registrar') {
    $resultado = registrar($dados);
}
if ($callback != '') {
    echo $_GET['callback'] . '(' . json_encode($resultado) . ');';
} else {
    echo json_encode($resultado);
}
exit;
function sincronizar($dados)
{
    mysql_query('SET CHARACTER SET utf8');
    $resultado = array();
    $resultado['status'] = '';
    $resultado['mensagem'] = '';
    $resultado['dados'] = $dados;
    $s1 = "SELECT * FROM usuario WHERE id = '" . $dados['usuario_id'] . "' ORDER BY id LIMIT 1";
 public function update(UpdateNotificationRequest $request)
 {
     $registrar = registrar();
     RegistrationNotification::where('registration_id', $registrar->id)->where('seen', 0)->where('id', $request->input('notification_id'))->update(['seen' => 1]);
     return redirect()->route('registration.registrar.index');
 }
<html lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta charset="utf-8">
		<title>Bootstrap Login Form</title>
		<meta name="generator" content="Bootply" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link href="css/bootstrap.min.css" rel="stylesheet">
		<!--[if lt IE 9]>
			<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
		<link href="css/styles.css" rel="stylesheet">
                <?php 
include 'Funciones.php';
if (isset($_POST['registrar'])) {
    registrar();
}
?>
	</head>
	<body>
<!--login modal-->
<div class="container-fluid">
    <section class="container">
		<div class="container-page">				
			<div class="col-md-6">
                            <form method="post" action="register.php" class='ajaxform'>
				<h3 class="dark-grey">Registration</h3>
                             
		
				<div class="form-group col-lg-12">
					<label>Nombre</label>
Esempio n. 9
0
 public function __construct()
 {
     $this->registration = registrar();
 }
Esempio n. 10
0
<?php

/* Template Name: [ Cadastro ] */
include "includes/functions.php";
require "includes/config.php";
if (!empty($_POST) and isset($_POST["cadastrar"])) {
    $account_id = str_replace($letters, "", $_POST[""]);
    $userid = LimparTexto($letters, $_POST["userid"]);
    $user_pass = str_replace($letters, "", $_POST["user_pass"]);
    $confirm_user_pass = str_replace($letters, "", $_POST["confirm_user_pass"]);
    $sex = str_replace($letters, "", $_POST["sex"]);
    $email = str_replace($letters, "", $_POST["email"]);
    $date = str_replace($letters, "", $_POST["birthdate"]);
    $dados = registrar($con, $userid, $user_pass, $confirm_user_pass, $sex, $email, $date, $letters);
} else {
}
$resumo = get_the_excerpt();
get_header();
?>

<section class="conteudo limit">
    <aside class="left">
    	<?php 
include get_template_directory() . '/includes/menu-left.php';
?>
    </aside>

    <article>

		<div class="box">
            <?php 
Esempio n. 11
0
 public function uploadDone()
 {
     $registration = registrar();
     $step = $registration->step;
     $step->load('children');
     $nextStepId = $step->children->first()->id;
     $registration->registration_step_id = $nextStepId;
     $registration->save();
     session()->put(config('registration.session_key'), $registration);
     event(new RegistrationUpdated($registration));
     event(new RegistrationStepChanged($registration));
     return redirect()->route('registration.registrar.index')->with('success', trans('registration::registrar.processing_files'));
 }
Esempio n. 12
0
<?php

session_start();
include "utilities.php";
// validar usuario
if ($_POST["num"] == 0) {
    echo validar($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_POST["email"], $_POST["pass"], $_POST["recordar"], $_POST["reco"]);
}
// registrar usuario
if ($_POST["num"] == 1) {
    echo registrar($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_POST["nom"], $_POST["email"], $_POST["cel"], $_POST["pass"]);
}
// cerrar session de usuario
if ($_POST["num"] == 2) {
    unset($_SESSION["user"]);
}
// restaurar password
if ($_POST["num"] == 3) {
    echo restaurar($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_POST["email"]);
}
// guardar album
if ($_POST["num"] == 4) {
    echo ultimoAlbumUser($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_SESSION["iduser"], $_POST["album"], $_POST["coment"]);
}
// guardar red, cel, mail
if ($_POST["num"] == 5) {
    echo guardarred($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_POST["red"], $_POST["tipo"]);
}
// guardar perfil
if ($_POST["num"] == 6) {
    echo guardarperfil($strHostMYSQL, $strUserMYSQL, $strPWDMYSQL, $strDBMYSQL, $_POST["sobremi"], $_POST["dia"], $_POST["mes"], $_POST["annio"], $_POST["sexo"], $_POST["profe"], $_POST["kmm"]);
Esempio n. 13
0
<?php

if ($_POST['user'] != "" || $_POST['password'] != "" || $_POST['correo'] != "") {
    require 'libs/funciones.php';
    conectar();
    session_start();
    registrar($_POST['user'], md5($_POST['password']), $_POST['correo']);
    $id_user = id_user($_POST['user']);
    $_SESSION['user_logged'] = $id_user;
    ?>
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
	   <title>Gestor de cuentas</title>
	   <meta http-equiv="Content-Type"
	    content="text/html; charset=utf-8" />
	    <link rel="stylesheet" type="text/css" media="screen" href="libs/estilo.css" />
	</head>
	<body>
		<div id="cabecera">
			<a href=".">
				<img src="imagenes/logo.png" alt="Logo de la web" />
			De rondas</a>
		</div>

<?php 
    $id_user = $_SESSION['user_logged'];
    require 'login.php';
    echo "<br />Te has registrado con el usuario <strong>" . $_POST['user'] . "</strong> y la contraseña <strong>" . $_POST['password'] . "</strong><br />\n\t\tTe recuerdo que no guardo la contraseña en claro sino el md5, así que no temas :D";
} else {