ingreso/0040755000113600011300000000000010507124245013227 5ustar sgap_admwebmastersingreso/access_user_class.php0100644000113600011300000007405610507126457017444 0ustar sgap_admwebmastersconnect_db(); $this->login_page = LOGIN_PAGE; $this->main_page = START_PAGE; $this->password_page = ACTIVE_PASS_PAGE; $this->deny_access_page = DENY_ACCESS_PAGE; $this->admin_page = ADMIN_PAGE; } function check_user($pass = "") { switch ($pass) { case "new": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE email = '%s' OR login = '%s'", $this->table_name, $this->user_email, $this->user); break; case "lost": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE email = '%s' AND active = 'y'", $this->table_name, $this->user_email); break; case "new_pass": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE pw = '%s' AND id = %d", $this->table_name, $this->user_pw, $this->id); break; case "active": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE id = %d AND active = 'n'", $this->table_name, $this->id); break; case "validate": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE id = %d AND tmp_mail <> ''", $this->table_name, $this->id); break; default: $password = (strlen($this->user_pw) < 32) ? md5($this->user_pw) : $this->user_pw; $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE BINARY login = '%s' AND pw = '%s' AND active = 'y'", $this->table_name, $this->user, $password); } $result = mysql_query($sql) or die(mysql_error()); if (mysql_result($result, 0, "test") == 1) { return true; } else { return false; } } // New methods to handle the access level function get_access_level() { $sql = sprintf("SELECT access_level FROM %s WHERE login = '%s' AND active = 'y'", $this->table_name, $this->user); if (!$result = mysql_query($sql)) { $this->the_msg = $this->messages(14); } else { return mysql_result($result, 0, "access_level"); } } function set_user() { $_SESSION['user'] = $this->user; $_SESSION['pw'] = $this->user_pw; if (!empty($_SESSION['referer'])) { $next_page = $_SESSION['referer']; unset($_SESSION['referer']); } else { $next_page = $this->main_page; } header("Location: ".$next_page); } function connect_db() { $conn_str = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD); mysql_select_db(DB_NAME); // if there are problems with the tablenames inside the config file use this row } function login_user($user, $password) { if ($user != "" && $password != "") { $this->user = $user; $this->user_pw = $password; if ($this->check_user()) { $this->login_saver(); if ($this->count_visit) { $this->reg_visit($user, $password); } $this->set_user(); } else { $this->the_msg = $this->messages(10); } } else { $this->the_msg = $this->messages(11); } } function login_saver() { if ($this->save_login == "no") { if (isset($_COOKIE[$this->cookie_name])) { $expire = time()-3600; } else { return; } } else { $expire = time()+2592000; } $cookie_str = $this->user.chr(31).base64_encode($this->user_pw); setcookie($this->cookie_name, $cookie_str, $expire, $this->cookie_path); } function login_reader() { if (isset($_COOKIE[$this->cookie_name])) { $cookie_parts = explode(chr(31), $_COOKIE[$this->cookie_name]); $this->user = $cookie_parts[0]; $this->user_pw = base64_decode($cookie_parts[1]); $this->is_cookie = true; } } function reg_visit($login, $pass) { $visit_sql = sprintf("UPDATE %s SET last_login = '%s' WHERE login = '%s' AND pw = '%s'", $this->table_name, date("Y-m-d H:i:s"), $login, md5($pass)); mysql_query($visit_sql); } function log_out() { unset($_SESSION['user']); unset($_SESSION['pw']); header("Location: ".$this->login_page); } function access_page($refer = "", $qs = "", $level = DEFAULT_ACCESS_LEVEL) { $refer_qs = $refer; $refer_qs .= ($qs != "") ? "?".$qs : ""; if (isset($_SESSION['user']) && isset($_SESSION['pw'])) { $this->user = $_SESSION['user']; $this->user_pw = $_SESSION['pw']; if (!$this->check_user()) { $_SESSION['referer'] = $refer_qs; header("Location: ".$this->login_page); } if ($this->get_access_level() < $level) { header("Location: ".$this->deny_access_page); } } else { $_SESSION['referer'] = $refer_qs; header("Location: ".$this->login_page); } } function get_user_info() { $sql_info = sprintf("SELECT name, lastname, t_doc, n_doc, fec_nac, nac, email, last_login, id FROM %s WHERE login = '%s' AND pw = '%s'", $this->table_name, $this->user, md5($this->user_pw)); $res_info = mysql_query($sql_info); $this->id = mysql_result($res_info, 0, "id"); $this->user_name = mysql_result($res_info, 0, "name"); $this->user_lastname = mysql_result($res_info, 0, "lastname"); $this->user_t_doc = mysql_result($res_info, 0, "t_doc"); $this->user_n_doc = mysql_result($res_info, 0, "n_doc"); $this->user_fec_nac = mysql_result($res_info, 0, "fec_nac"); $this->user_nac = mysql_result($res_info, 0, "nac"); $this->user_email = mysql_result($res_info, 0, "email"); $this->user_last_login = mysql_result($res_info, 0, "last_login"); } function update_user($new_password, $new_confirm, /*$new_name, /*$new_last_login, */$new_mail) { if ($new_password != "") { if ($this->check_new_password($new_password, $new_confirm)) { $ins_password = $new_password; $update_pw = true; } else { return; } } else { $ins_password = $this->user_pw; $update_pw = false; } if (trim($new_mail) <> $this->user_email) { if ($this->check_email($new_mail)) { $this->user_email = $new_mail; if (!$this->check_user("lost")) { $update_email = true; } else { $this->the_msg = $this->messages(31); return; } } else { $this->the_msg = $this->messages(16); return; } } else { $update_email = false; $new_mail = ""; } $upd_sql = sprintf("UPDATE %s SET pw = %s, tmp_mail = %s WHERE id = %d", // $upd_sql = sprintf("UPDATE %s SET pw = %s, name = %s, last_login = %s, tmp_mail = %s WHERE id = %d", $this->table_name, $this->ins_string(md5($ins_password)), // $this->ins_string($new_name), // $this->ins_string($new_last_login), $this->ins_string($new_mail), $this->id); $upd_res = mysql_query($upd_sql); if ($upd_res) { if ($update_pw) { $_SESSION['pw'] = $this->user_pw = $ins_password; if (isset($_COOKIE[$this->cookie_name])) { $this->save_login = "yes"; $this->login_saver(); } } $this->the_msg = $this->messages(30); if ($update_email) { if ($this->send_mail($new_mail, 33)) { $this->the_msg = $this->messages(27); } else { mysql_query(sprintf("UPDATE %s SET tmp_mail = ''", $this->table_name)); $this->the_msg = $this->messages(14); } } } else { $this->the_msg = $this->messages(15); } } function check_new_password($pass, $pw_conform) { if ($pass == $pw_conform) { if (strlen($pass) >= PW_LENGTH) { return true; } else { $this->the_msg = $this->messages(32); return false; } } else { $this->the_msg = $this->messages(38); return false; } } function check_email($mail_address) { if (preg_match("/^[0-9a-z]+(([\.\-_])[0-9a-z]+)*@[0-9a-z]+(([\.\-])[0-9a-z-]+)*\.[a-z]{2,4}$/i", $mail_address)) { return true; } else { return false; } } function ins_string($value) { if (preg_match("/^(.*)(##)(int|date|eu_date)$/", $value, $parts)) { $value = $parts[1]; $type = $parts[3]; } else { $type = ""; } $value = (!get_magic_quotes_gpc()) ? addslashes($value) : $value; switch ($type) { case "int": $value = ($value != "") ? intval($value) : NULL; break; case "eu_date": $date_parts = preg_split ("/[\-\/\.]/", $value); $time = mktime(0, 0, 0, $date_parts[1], $date_parts[0], $date_parts[2]); $value = strftime("'%Y-%m-%d'", $time); break; case "date": $value = "'".preg_replace("/[\-\/\.]/", "-", $value)."'"; break; default: $value = ($value != "") ? "'" . $value . "'" : "''"; } return $value; } function register_user($first_login, $first_password, $confirm_password, $first_name, $first_lastname, $first_t_doc, $first_n_doc, $first_fec_nac, $first_nac, $first_ingreso, $first_email, $first_last_login) { if ($this->check_new_password($first_password, $confirm_password)) { if (strlen($first_login) >= LOGIN_LENGTH) { if ($this->check_email($first_email)) { $this->user_email = $first_email; $this->user = $first_login; if ($this->check_user("new")) { $this->the_msg = $this->messages(12); return; } else { $sql = sprintf("INSERT INTO %s (id, login, pw, name, lastname, t_doc, n_doc, fec_nac, nac, ingreso, email, last_login, access_level, active) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, 'n')", $this->table_name, $this->ins_string($first_login), $this->ins_string(md5($first_password)), $this->ins_string($first_name), $this->ins_string($first_lastname), $this->ins_string($first_t_doc), $this->ins_string($first_n_doc), $this->ins_string($first_fec_nac), $this->ins_string($first_nac), $this->ins_string($first_ingreso), $this->ins_string($this->user_email), $this->ins_string($first_last_login), DEFAULT_ACCESS_LEVEL); $ins_res = mysql_query($sql) or die(mysql_error()); if ($ins_res) { $this->id = mysql_insert_id(); $this->user_pw = $first_password; $this->user_name = $first_name; if ($this->send_mail($this->user_email, 29, 28)) { $this->the_msg = $this->messages(13); } else { mysql_query(sprintf("DELETE FROM %s WHERE id = %s", $this->table_name, $this->id)); $this->the_msg = $this->messages(14); } } else { $this->the_msg = $this->messages(15); } } } else { $this->the_msg = $this->messages(16); } } else { $this->the_msg = $this->messages(17); } } } function validate_email($validation_key, $key_id) { if ($validation_key != "" && strlen($validation_key) == 32 && $key_id > 0) { $this->id = $key_id; if ($this->check_user("validate")) { $upd_sql = sprintf("UPDATE %s SET email = tmp_mail, tmp_mail = '' WHERE id = %d AND pw = '%s'", $this->table_name, $key_id, $validation_key); if (mysql_query($upd_sql)) { $this->the_msg = $this->messages(18); } else { $this->the_msg = $this->messages(19); } } else { $this->the_msg = $this->messages(34); } } else { $this->the_msg = $this->messages(21); } } function activate_account($activate_key, $key_id) { if ($activate_key != "" && strlen($activate_key) == 32 && $key_id > 0) { $this->id = $key_id; if ($this->check_user("active")) { if ($this->auto_activation) { $upd_sql = sprintf("UPDATE %s SET active = 'y' WHERE id = %s AND pw = '%s'", $this->table_name, $key_id, $activate_key); if (mysql_query($upd_sql)) { if ($this->send_confirmation($key_id)) { $this->the_msg = $this->messages(18); } else { $this->the_msg = $this->messages(14); } } else { $this->the_msg = $this->messages(19); } } else { if ($this->send_mail($this->admin_mail, 40, 39)) { $this->the_msg = $this->messages(36); } else { $this->the_msg = $this->messages(14); } } } else { $this->the_msg = $this->messages(20); } } else { $this->the_msg = $this->messages(21); } } function forgot_password($forgot_email) { if ($this->check_email($forgot_email)) { $this->user_email = $forgot_email; if (!$this->check_user("lost")) { $this->the_msg = $this->messages(22); } else { $forgot_sql = sprintf("SELECT id, pw FROM %s WHERE email = '%s'", $this->table_name, $this->user_email); if ($forgot_result = mysql_query($forgot_sql)) { $this->id = mysql_result($forgot_result, 0, "id"); $this->user_pw = mysql_result($forgot_result, 0, "pw"); if ($this->send_mail($this->user_email, 35, 26)) { $this->the_msg = $this->messages(23); } else { $this->the_msg = $this->messages(14); } } else { $this->the_msg = $this->messages(15); } } } else { $this->the_msg = $this->messages(16); } } function check_activation_password($controle_str, $id) { if ($controle_str != "" && strlen($controle_str) == 32 && $id > 0) { $this->user_pw = $controle_str; $this->id = $id; if ($this->check_user("new_pass")) { // this is a fix for version 1.76 $sql_get_user = sprintf("SELECT login FROM %s WHERE pw = '%s' AND id = %d", $this->table_name, $this->user_pw, $this->id); $get_user = mysql_query($sql_get_user); $this->user = mysql_result($get_user, 0, "login"); // end fix return true; } else { $this->the_msg = $this->messages(21); return false; } } else { $this->the_msg = $this->messages(21); return false; } } function activate_new_password($new_pass, $new_confirm, $old_pass, $user_id) { if ($this->check_new_password($new_pass, $new_confirm)) { $sql_new_pass = sprintf("UPDATE %s SET pw = '%s' WHERE pw = '%s' AND id = %d", $this->table_name, md5($new_pass), $old_pass, $user_id); if (mysql_query($sql_new_pass)) { $this->the_msg = $this->messages(30); return true; } else { $this->the_msg = $this->messages(14); return false; } } else { return false; } } function send_confirmation($id) { $sql = sprintf("SELECT name, email, n_doc, clave FROM %s WHERE id = %d", $this->table_name, $id); $res = mysql_query($sql); $user_email = mysql_result($res, 0, "email"); $this->user_name = mysql_result($res, 0, "name"); $this->user_clave = mysql_result($res, 0, "clave"); $this->user_n_doc = mysql_result($res, 0, "n_doc"); if ($this->user_name == "") $this->user_name = "Usuario"; // change "User" to whatever you want, it's just a default name if ($this->send_mail($user_email, 37, 24, $this->send_copy)) { return true; } else { return false; } } function send_mail($mail_address, $msg = 29, $subj = 28, $send_admin = false) { $header = "From: \"".$this->webmaster_name."\" <".$this->webmaster_mail.">\r\n"; if ($send_admin) $header .= "Bcc: ".ADMIN_MAIL."\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Mailer: Olaf's mail script version 1.11\r\n"; $header .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n"; $subject = $this->messages($subj); $body = $this->messages($msg); if (mail($mail_address, $subject, $body, $header)) { return true; } else { return false; } } function messages($num) { $host = "http://".$_SERVER['HTTP_HOST']; switch ($this->language) { case "de": $msg[10] = "Login und/oder Passwort finden keinen Treffer in der Datenbank."; $msg[11] = "Login und/oder Passwort sind leer!"; $msg[12] = "Leider existiert bereits ein Benutzer mit diesem Login und/oder E-mailadresse."; $msg[13] = "Weitere Anweisungen wurden per E-mail versandt, folgen Sie nun den Instruktionen."; $msg[14] = "Es is ein Fehler entstanden probieren Sie es erneut."; $msg[15] = "Es is ein Fehler entstanden probieren Sie es später nochmal."; $msg[16] = "Die eingegebene E-mailadresse ist nicht gültig."; $msg[17] = "Das Feld login (min. ".LOGIN_LENGTH." Zeichen) muss eingegeben sein."; $msg[18] = "Ihr Benutzerkonto ist aktiv. Sie können sich nun anmelden."; $msg[19] = "Ihr Aktivierungs ist nicht gültig."; $msg[20] = "Da ist kein Konto zu aktivieren."; $msg[21] = "Der benutzte Aktivierung-Code is nicht gültig!"; $msg[22] = "Keine Konto gefunden dass mit der eingegeben E-mailadresse übereinkommt."; $msg[23] = "Kontrollieren Sie Ihre E-Mail um Ihr neues Passwort zu erhalten."; $msg[24] = "Ihr Benutzerkonto wurde aktiviert."; $msg[25] = "Kann Ihr Passwort nicht aktivieren."; $msg[26] = "Sie haben Ihr Passwort vergessen..."; $msg[27] = "Kontrollieren Sie Ihre E-Mailbox und bestätigen Sie Ihre Änderung(en)."; $msg[28] = "Ihre Anfrage bestätigen..."; $msg[29] = "Hallo,\r\n\r\num Ihre Anfrage zu aktivieren klicken Sie bitte auf den folgenden Link:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[30] = "Ihre Änderung ist durchgeführt."; $msg[31] = "Diese E-mailadresse wird bereits genutzt, bitte wählen Sie eine andere."; $msg[32] = "Das Feld Passwort (min. ".PW_LENGTH." Zeichen) muss eingegeben sein."; $msg[33] = "Hallo,\r\n\r\nIhre neue E-mailadresse muss noch überprüft werden, bitte klicken Sie auf den folgenden Link:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[34] = "Da ist keine E-mailadresse zu überprüfen."; $msg[35] = "Hallo,\r\n\r\nIhr neues Passwort kann nun eingegeben werden, bitte klicken Sie auf den folgenden Link:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[36] = "Ihr Antrag ist verarbeitet und wird nun durch den Administrator kontrolliert. \r\nSie erhalten eine Nachricht wenn dies geschehen ist."; $msg[37] = "Hallo ".$this->user_name.",\r\n\r\nIhr Konto ist nun eigerichtet und Sie können sich nun anmelden.\r\n\r\nKlicken Sie hierfür auf den folgenden Link:\r\n".$host.$this->login_page."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[38] = "Das bestätigte Passwort hat keine Übereinstimmung mit dem ersten Passwort, bitte probieren Sie es erneut."; $msg[39] = "Neuer Benutzer..."; $msg[40] = "Es hat sich am ".date("Y-m-d")." ein neuer Benutzer angemeldet.\r\n\r\nKlicken Sie hier um zur Verwaltungsseite zu gelangen:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Bestätigen Sie Ihre E-mailadresse..."; break; break; case "nl": $msg[10] = "Gebruikersnaam en/of wachtwoord vinden geen overeenkomst in de database."; $msg[11] = "Gebruikersnaam en/of wachtwoord zijn leeg!"; $msg[12] = "Helaas bestaat er al een gebruiker met deze gebruikersnaam en/of e-mail adres."; $msg[13] = "Er is een e-mail is aan u verzonden, volg de instructies die daarin vermeld staan."; $msg[14] = "Het is een fout ontstaan, probeer het opnieuw."; $msg[15] = "Het is een fout ontstaan, probeer het later nog een keer."; $msg[16] = "De opgegeven e-mail adres is niet geldig."; $msg[17] = "De gebruikersnaam (min. ".LOGIN_LENGTH." teken) moet opgegeven zijn."; $msg[18] = "Het gebruikersaccount is aangemaakt, u kunt u nu aanmelden."; $msg[19] = "Kan uw account niet activeren."; $msg[20] = "Er is geen account te activeren."; $msg[21] = "De gebruikte activeringscode is niet geldig!"; $msg[22] = "Geen account gevonden dat met de opgegeven e-mail adres overeenkomt."; $msg[23] = "Er is een e-mail is aan u verzonden, daarin staat hoe uw een nieuw wachtwoord kunt aanmaken."; $msg[24] = "Uw gebruikersaccount is geactiveerd... "; $msg[25] = "Kan het wachtwoord niet activeren."; $msg[26] = "U bent uw wachtwoord vergeten..."; $msg[27] = "Er is een e-mail is aan u verzonden, volg de instructies die daarin vermeld staan."; $msg[28] = "Bevestig uw aanvraag ..."; $msg[29] = "Hallo,\r\n\r\nBedankt voor uw aanvraag,\r\n\r\nklik op de volgende link om de aanvraag te verwerken:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[30] = "Uw wijzigingen zijn doorgevoerd."; $msg[31] = "Dit e-mailadres bestaat al, gebruik en andere."; $msg[32] = "Het veld wachtwoord (min. ".PW_LENGTH." teken) mag niet leeg zijn."; $msg[33] = "Beste gebruiker,\r\n\r\nde nieuwe e-mailadres moet nog gevalideerd worden, klik hiervoor op de volgende link:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[34] = "Er is geen e-mailadres te valideren."; $msg[35] = "Hallo,\r\n\r\nuw nieuw wachtwoord kan nu ingevoerd worden, klik op deze link om verder te gaan:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[36] = "U aanvraag is verwerkt en wordt door de beheerder binnenkort activeert. \r\nU krijgt bericht wanneer dit gebeurt is."; $msg[37] = "Hallo ".$this->user_name.",\r\n\r\nHet account is nu gereed en u kunt zich aanmelden.\r\n\r\nKlik hiervoor op de volgende link:\r\n".$host.$this->login_page."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[38] = "Het bevestigings wachtwoord komt niet overeen met het wachtwoord, probeer het opnieuw."; $msg[39] = "Nieuwe gebuiker..."; $msg[40] = "Er heeft zich een nieuwe gebruiker aangemeld op ".date("Y-m-d").":\r\n\r\nKlik hier voor toegang tot de beheer pagina:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Bevestiging e-mail adres..."; break; case "fr": $msg[10] = "Le login et/ou mot de passe ne correspondent pas."; $msg[11] = "Le login et/ou mot de passe est vide !"; $msg[12] = "Désolé, un utilisateur avec le même email et/ou login existe déjà."; $msg[13] = "Vérifiez votre email et suivez les instructions."; $msg[14] = "Désolé, une erreur s'est produite. Veuillez réessayer."; $msg[15] = "Désolé, une erreur s'est produite. Veuillez réessayer plus tard."; $msg[16] = "L'adresse email n'est pas valide."; $msg[17] = "Le champ \"Nom d'usager\" doit être composé d'au moins ".LOGIN_LENGTH." caratères."; $msg[18] = "Votre requete est complète. Enregistrez vous pour continuer."; $msg[19] = "Désolé, nous ne pouvons pas activer votre account."; $msg[20] = "Désolé, il n'y à pas d'account à activer."; $msg[21] = "Désolé, votre clef d'authorisation n'est pas valide"; $msg[22] = "Désolé, il n'y à pas d'account actif avec cette adresse email."; $msg[23] = "Veuillez consulter votre email pour recevoir votre nouveau mot de passe."; $msg[24] = "Votre compte est prêt à l'usage"; $msg[25] = "Désolé, nous ne pouvons pas activer votre mot de passe."; $msg[26] = "Vous avez oublié votre mot de passe..."; $msg[27] = "Veuillez consulter votre email pour activer les modifications."; $msg[28] = "Votre requete doit etre exécuter..."; $msg[29] = "Bonjour,\r\n\r\npour activer votre account clickez sur le lien suivant:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[30] = "Votre account à été modifié."; $msg[31] = "Désolé, cette adresse email existe déjà, veuillez en utiliser une autre."; $msg[32] = "Le champ password (min. ".PW_LENGTH." char) est requis."; $msg[33] = "Bonjour,\r\n\r\nvotre nouvelle adresse email doit être validée, clickez sur le liens suivant:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[34] = "Il n'y à pas d'email à valider."; $msg[35] = "Bonjour,\r\n\r\nPour entrer votre nouveaux mot de passe, clickez sur le lien suivant:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[36] = "Votre demande a été bien traitée et d'ici peu l'administrateur va l 'activer. Nous vous informerons quand ceci est arrivé."; $msg[37] = "Bonjour ".$this->user_name.",\r\n\r\nVotre compte est maintenant actif et il est possible d'y avoir accès.\r\n\r\nCliquez sur le lien suivant afin de rejoindre la page d'accès:\r\n".$host.$this->login_page."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[38] = "Le mot de passe de confirmation de concorde pas avec votre mot de passe. Veuillez réessayer"; $msg[39] = "Nouvel utilisateur..."; $msg[40] = "Nouvel utilisateur s'est enregistré ".date("Y-m-d").":\r\n\r\nCliquez ici pour accéder au page d'administration:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Confirmez l'adresse email..."; break; default: $msg[10] = "El usuario y/o la clave no coinciden con la base de datos."; $msg[11] = "Falta el usuario y/o la clave."; $msg[12] = "Ya existe una cuenta con ese usuario y/o dirección de e-mail."; $msg[13] = "El sistema le acaba de enviar un mail. Por favor, revise su cuenta y siga las instrucciones que se detallan."; $msg[14] = "Ha ocurrido un error. Inténtelo nuevamente."; $msg[15] = "Ha ocurrido un error. Inténtelo nuevamente."; $msg[16] = "La dirección de e-mail es invalida."; $msg[17] = "Falta el usuario o es demasiado corto (min. ".LOGIN_LENGTH." caracteres)."; $msg[18] = "Su solicitud ha sido procesada. Conectese para continuar."; $msg[19] = "Su cuenta no puede ser activada."; $msg[20] = "No hay ninguna cuenta para activar."; $msg[21] = "La clave de activación es invalida."; $msg[22] = "No hay ninguna cuenta activa que coincida con esta dirección de e-mail."; $msg[23] = "Por favor, revise su e-mail para obtener una nueva clave."; $msg[24] = "Su cuenta ha sido activada. "; $msg[25] = "Su clave no puede ser activada."; $msg[26] = "Su nueva clave"; $msg[27] = "El sistema le acaba de enviar un mail. Por favor revise su cuenta y active las modificaciones."; $msg[28] = "Su solicitud debe ser procesada."; $msg[29] = "Hola ".$this->user_name.",\r\n\r\nPara activar su cuenta presione aqui:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nSaludos\r\n".$this->admin_name; $msg[30] = "Su cuenta ha sido modificada."; $msg[31] = "La dirección de e-mail ya existe, por favor cambiela."; $msg[32] = "Falta la clave o es demasiado corta (min. ".PW_LENGTH." caracteres."; $msg[33] = "Hola ".$this->user_name.",\r\n\r\nLa nueva dirección de e-mail debe ser validada. Para hacerlo presione aqui:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nSaludos\r\n".$this->admin_name; $msg[34] = "No hay dirección de e-mail para validar."; $msg[35] = "Hola ".$this->user_name.",\r\n\r\nPara ingresar su nueva clave presione aqui:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nSaludos\r\n".$this->admin_name; $msg[36] = "Su solicitud ha sido procesada y su validación será evaluada por el administrador. \r\nRecibirá un e-mail cuando esto suceda."; $msg[37] = "Hola ".$this->user_name."\r\n\r\nSu cuenta ha sido activada.\r\n\r\nRecuerde que si deseea solicitar la entrega de la revista Exactamente debe hacerlo en la página de actualización de informacion de contacto: \r\n".$host.$this->login_page."\r\n\r\nusuario: ".$this->user_n_doc."\r\nclave: ".$this->user_clave."\r\n\r\nLe sugerimos cambiar esta clave en el primer ingreso\r\n\r\nSaludos\r\n".$this->admin_name; $msg[38] = "La clave y la confirmación no coinciden. Por favor inténtelo nuevamente."; $msg[39] = "Nuevo usuario registrado"; $msg[40] = "Un nuevo usuario se registro el ".date("Y-m-d").":\r\n\r\nIngrese a la pagina de administración:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Convalide su dirección de e-mail"; // subject in e-mail } return $msg[$num]; } } ?>ingreso/activate_password.php0100644000113600011300000000466610507125105017467 0ustar sgap_admwebmasterscheck_activation_password($_GET['activate'], $_GET['id'])) { // the activation/validation method $_SESSION['activation'] = $_GET['activate']; // put the activation string into a session or into a hdden field $_SESSION['id'] = $_GET['id']; // this id is the key where the record have to be updated with new pw } } if (isset($_POST['Submit'])) { if ($act_password->activate_new_password($_POST['password'], $_POST['confirm'], $_SESSION['activation'], $_SESSION['id'])) { // this will change the password unset($_SESSION['activation']); unset($_SESSION['id']); // inserts new password only ones! } $act_password->user = $_POST['user']; // to hold the user name in this screen (new in version > 1.77) } $error = $act_password->the_msg; ?> Cambio de clave

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Su usuario es:

user; ?>

Ingrese una nueva clave:

"> ">

 

Ingreso

ingreso/update_user_profile.php0100644000113600011300000001110110701167515017772 0ustar sgap_admwebmastersaccess_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']); // protect this page too. $update_profile->get_profile_data(); if (isset($_POST['user_data'])) { $update_profile->update_user($_POST['password'], $_POST['confirm'], $_POST['user_name'], $_POST['user_last_login'], $_POST['user_email']); // the update method } if (isset($_POST['profile_data'])) { $update_profile->save_profile_date($_POST['id'], $_POST['dir_part'], $_POST['loc_part'], $_POST['zip_part'], $_POST['prov_part'], $_POST['pais_part'], $_POST['tel_part'], $_POST['cel_part'], $_POST['nombre_lab'], $_POST['dir_lab'], $_POST['loc_lab'], $_POST['zip_lab'], $_POST['prov_lab'], $_POST['pais_lab'], $_POST['tel_lab'], $_POST['cel_lab'], $_POST['trab_fcen'], $_POST['revista'], $_POST['lista'], $_POST['letter']); // note the last trailing string, this used to optimize the value as a euro date. } $error = $update_profile->the_msg; // error message //$update_profile = new Users_profile; ?> Actualización de información de contacto

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Actualice su información de contacto :


Por favor no utilice comillas (") o abreviaturas dentro del formulario.
Los nombres de país deben completarse en español.

Si solicita la revista Exactamente, la misma se enviará a la dirección ingresada en Datos particulares.

Datos particulares

"; echo $update_profile->create_form_field("dir_part", "Dirección: "); echo $update_profile->create_form_field("loc_part", "Localidad: "); echo $update_profile->create_form_field("prov_part", "Provincia: "); //echo $update_profile->create_country_menu("country", "Pais: "); echo $update_profile->create_country_menu("pais_lab", "País: "); // this function is optional and shows some countries out of the database //echo $update_profile->create_form_field("pais_part", "Pais: "); echo $update_profile->create_form_field("zip_part", "CP: "); echo $update_profile->create_form_field("tel_part", "Teléfono: "); echo $update_profile->create_form_field("cel_part", "Celular: "); echo "
Datos laborales

"; echo $update_profile->create_form_field("nombre_lab", "Lugar de trabajo: "); echo $update_profile->create_form_field("dir_lab", "Dirección: "); echo $update_profile->create_form_field("loc_lab", "Localidad: "); echo $update_profile->create_form_field("prov_lab", "Provincia: "); echo $update_profile->create_country_menu("pais_lab", "País: "); // this function is optional and shows some countries out of the database //echo $update_profile->create_form_field("pais_lab", "País: "); echo $update_profile->create_form_field("zip_lab", "CP: "); echo $update_profile->create_form_field("tel_lab", "Teléfono: "); echo $update_profile->create_form_field("cel_lab", "Celular: "); echo "
Información adicional

"; //echo $update_profile->language_menu($label); echo $update_profile->create_form_field("trab_fcen", "¿Trabaja en la FCEN? (s/n): ", $length = 1); echo "

"; echo $update_profile->create_form_field("revista", "¿Desea recibir la revista Exactamente? (s/n): ", $length = 1); echo "


"; echo $update_profile->create_form_field("letter", "¿Desea suscribirse a la Newsletter para graduados? (s/n): ", $length = 1); echo "



"; echo $update_profile->create_form_field("lista", "¿Desea suscribirse a lista de mails internos de la FCEyN? (s/n): ", $length = 1);?>



 

Volver al menú principal

ingreso/index.php0100644000113600011300000000660510507126752015060 0ustar sgap_admwebmasterslogin_reader(); // $my_access->language = "de"; // use this selector to get messages in other languages if (isset($_GET['activate']) && isset($_GET['ident'])) { // this two variables are required for activating/updating the account/password $my_access->auto_activation = false; // use this (true/false) to stop the automatic activation $my_access->activate_account($_GET['activate'], $_GET['ident']); // the activation method } if (isset($_GET['validate']) && isset($_GET['id'])) { // this two variables are required for activating/updating the new e-mail address $my_access->validate_email($_GET['validate'], $_GET['id']); // the validation method } if (isset($_POST['Submit'])) { $my_access->save_login = (isset($_POST['remember'])) ? $_POST['remember'] : "no"; // use a cookie to remember the login $my_access->count_visit = true; // if this is true then the last visitdate is saved in the database $my_access->login_user($_POST['login'], $_POST['password']); // call the login method } $error = $my_access->the_msg; ?> Base de Graduados - SEGB

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Ingreso

Por favor ingrese su usuario y clave .




¿Todavía no está registrado? Regístrese aqui.

¿Olvidó su clave y/o usuario?

Volver a la página del Área de Graduados


Secretaría de Extensión, Graduados y Bienestar
Facultad de Ciencias Exactas y Naturales - UBA
Ultima actualización: 17 de septiembre de 2006
Si desea enviar comentarios o encuentra errores, por favor dirija un e-mail a graduados@de.fcen.uba.ar
ingreso/testpage.php0100644000113600011300000000274210503304024015545 0ustar sgap_admwebmasterslogin_page = "login.php"; // change this only if your login is on another page $test_page_protect->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']); // set this method, including the server vars to protect your page and get redirected to here after login if (isset($_GET['action']) && $_GET['action'] == "log_out") { $test_page_protect->log_out(); // the method to log off } ?> Test page "access_user Class"

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Now you have access to this testpage.

".$_SERVER['QUERY_STRING']."" : " "; ?>

 

Click here to log out.

ingreso/admin_user.php0100644000113600011300000002165710507124731016076 0ustar sgap_admwebmasterstable_name, trim($for_user)); } else { $sql = sprintf("SELECT id, login, name, lastname, t_doc, n_doc, fec_nac, nac, email, access_level, active FROM %s WHERE n_doc = %d", $this->table_name, intval($for_user)); } $result = mysql_query($sql); if (mysql_num_rows($result) == 1) { $obj = mysql_fetch_object($result); $this->user_id = $obj->id; $this->user_login = $obj->login; $this->user_name = $obj->name; $this->user_lastname = $obj->lastname; $this->user_t_doc = $obj->t_doc; $this->user_n_doc = $obj->n_doc; $this->user_fec_nac = $obj->fec_nac; $this->user_nac = $obj->nac; $this->old_user_email = $obj->email; $this->user_access_level = $obj->access_level; $this->activation = $obj->active; if ($this->user_login != $_SESSION['user']) { $this->user_found = true; } else { $this->user_found = false; $this->the_msg = "No esta permitido modificar la información propia!"; } mysql_free_result($result); } else { $this->the_msg = "No hay datos para ese usuario!"; } } function update_user_by_admin($new_level, $user_id, $def_pass, $new_email, $active, $confirmation = "no") { $this->user_found = true; $this->user_access_level = $new_level; if ($def_pass != "" && strlen($def_pass) < 6) { $this->the_msg = "La clave es demasiado corta, debe tener 6 caracteres como mínimo."; } else { if ($this->check_email($new_email)) { $sql = "UPDATE %s SET access_level = %d, email = '%s', active = '%s'"; $sql .= ($def_pass != "") ? sprintf(", pw = '%s'", md5($def_pass)) : ""; $sql .= " WHERE id = %d"; $sql_compl = sprintf($sql, $this->table_name, $new_level, $new_email, $active, $user_id); if (mysql_query($sql_compl)) { $this->the_msg = "Se modifico la información para el usuario ".$user_id.""; if ($confirmation == "yes") { if ($this->send_confirmation($user_id)) { $this->the_msg .= "
...y se le envio un mail de aviso al usuario."; } else { $this->the_msg .= "
...ERROR no se envio un mail de aviso al usuario."; } } } else { $this->the_msg = "Database error, por favor intente de nuevo!"; } } else { $this->the_msg = "La dirección de email no es válida!"; } } } function access_level_menu($curr_level, $element_name = "level") { $menu = "\n"; return $menu; } function activation_switch($formelement = "activation") { $radio_group = "\n"; $first = ($this->activation == "y") ? " checked" : ""; $second = ($first == " checked") ? "" : " checked"; $radio_group .= "yes\n"; $radio_group .= "no\n"; return $radio_group; } } $admin_update = new Admin_user; $admin_update->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING'], DEFAULT_ADMIN_LEVEL); // check the level inside the config file if (isset($_POST['Submit'])) { if ($_POST['Submit'] == "Update") { $conf_str = (isset($_POST['send_confirmation'])) ? $_POST['send_confirmation'] : ""; // the checkbox value to send a confirmation mail $admin_update->update_user_by_admin($_POST['level'], $_POST['user_id'], $_POST['password'], $_POST['email'], $_POST['activation'], $conf_str); $admin_update->get_userdata($_POST['login_name']); // this is needed to get the modified data after update } elseif ($_POST['Submit'] == "Buscar") { $admin_update->get_userdata($_POST['login_name']); } } elseif (isset($_GET['login_id']) && intval($_GET['login_id']) > 0) { $admin_update->get_userdata($_GET['login_id'], "is_id"); } $error = $admin_update->the_msg; // error message ?> Admin page

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Página de administración (user data)

user_found) { ?>

Datos almacenados en la base de graduados.

user_login; ?>
user_name; ?>
user_lastname; ?>
user_t_doc; ?>
user_n_doc; ?>
user_fec_nac; ?>
user_nac; ?>
access_level_menu($admin_update->user_access_level); ?>
"> (min. 6 chars.)

activation_switch(); ?>

user_n_doc; $resultado = mysql_query("SELECT id, login, name, lastname, t_doc, n_doc, dia_nac, mes_nac, ano_nac, nac, email, access_level, active FROM rg_users WHERE n_doc = '$rg_n_doc'"); $fila = mysql_fetch_array($resultado); ?>

Datos ingresados en el formulario de registro.











 

buscar otro usuario

Ingreso el login del usuario que hay que modificar:

">

 

Volver a la página principal

ingreso/db_config.php0100644000113600011300000000464210503321266015653 0ustar sgap_admwebmastersingreso/ext_user_profile.php0100644000113600011300000002121110645607342017317 0ustar sgap_admwebmasterslanguage) { case "nl": $extra_msg[1] = "Op het moment is geen profiel data aanwezig."; $extra_msg[2] = "De profiel data is gewijzigd."; $extra_msg[3] = "Er is een fout ontstaam tijdens het update, probeer het opnieuw."; break; case "de": $extra_msg[1] = "Zur Zeit verfügt dieses Konto über keine weiteren Profildaten."; $extra_msg[2] = "Die Profildaten wurden geändert."; $extra_msg[3] = "Es ist ein Fehler entstanden, bitte probieren Sie es erneut."; break; case "fr": $extra_msg[1] = "Le profil ne contient actuellement aucune information."; $extra_msg[2] = "Les information de votre profil sont à jour."; $extra_msg[3] = "Il y a eu un problème pendant la mise à jour de votre profil. Veuillez réessayer."; break; default: $extra_msg[1] = "No hay información de contacto en este momento."; $extra_msg[2] = "Su información de contacto ha sido actualizada."; $extra_msg[3] = "Ha ocurrido un error, por favor inténtelo nuevamente."; } return $extra_msg[$msg_num]; } // use this method to get the messages in the language of the user (if exist) function login_local($user, $password) { $this->get_language($user, $password); $this->login_user($user, $password); } function get_language($user, $pw) { $sql = sprintf("SELECT up.language AS lang FROM %s AS u, %s AS up WHERE u.login = '%s' AND u.pw = '%s' AND u.id = up.users_id ", $this->table_name, $this->profile_tbl_name, $user, md5($pw)); $result = mysql_query($sql); if (mysql_num_rows($result) == 0) { return; } else { $lang = mysql_result($result, 0, "lang"); if ($lang != "") { $this->language = $lang; } else { return; } } } function language_menu($label) { $lang_select = "\n"; $lang_select .= "
\n"; return $lang_select; } // install the "countries_table.sql" first function create_country_menu($label) { $sql_countries = sprintf("SELECT iso, name FROM %s ORDER BY id", COUNTRY_TABLE); $res_countries = mysql_query($sql_countries); $menu = "\n"; $menu .= "
\n"; mysql_free_result($res_countries); return $menu; } function create_form_field($formelement, $label, $length = 25, $required = false, $disabled = false, $euro_date = false) { $form_field = "\n"; $form_field .= " $formelement) && !isset($_REQUEST[$formelement])) { $form_field .= ($euro_date) ? strftime("%d/%m/%Y", strtotime($this->$formelement)) : $this->$formelement; // this is row 110 } else { $form_field .= ""; } $form_field .= ($disabled) ? "\" disabled>" : "\">"; $form_field .= ($required) ? "*
\n" : "
\n"; return $form_field; } function create_text_area($text_field, $label) { $textarea = "\n"; $textarea .= "
\n"; return $textarea; } function save_profile_date($ident = "", $dir_part = "", $loc_part = "", $zip_part = "", $prov_part = "", $pais_part = "", $tel_part = "", $cel_part = "", $nombre_lab = "", $dir_lab = "", $loc_lab = "", $zip_lab = "", $prov_lab = "", $pais_lab = "", $tel_lab = "", $cel_lab = "", $trab_fcen = "", $revista = "", $lista = "", $letter = "") { if ($_SESSION['is_rec']) { $sql = sprintf("UPDATE %s SET dir_part=%s, loc_part=%s, zip_part=%s, prov_part=%s, pais_part=%s, tel_part=%s, cel_part=%s, nombre_lab=%s, dir_lab=%s, loc_lab=%s, zip_lab=%s, prov_lab=%s, pais_lab=%s, tel_lab=%s, cel_lab=%s, trab_fcen=%s, revista=%s, lista=%s, letter=%s, last_change=NOW() WHERE id = %s AND users_id = %d", PROFILE_TABLE, $this->ins_string($dir_part), $this->ins_string($loc_part), $this->ins_string($zip_part), $this->ins_string($prov_part), $this->ins_string($pais_part), $this->ins_string($tel_part), $this->ins_string($cel_part), $this->ins_string($nombre_lab), $this->ins_string($dir_lab), $this->ins_string($loc_lab), $this->ins_string($zip_lab), $this->ins_string($prov_lab), $this->ins_string($pais_lab), $this->ins_string($tel_lab), $this->ins_string($cel_lab), $this->ins_string($trab_fcen), $this->ins_string($revista), $this->ins_string($lista), $this->ins_string($letter), $this->ins_string($ident, "int"), $_SESSION['user_id']); } else { $sql = sprintf("INSERT INTO %s (id, users_id, dir_part, loc_part, zip_part, prov_part, pais_part, tel_part, cel_part, nombre_lab, calle_lab, dir_lab, loc_lab, zip_lab, prov_lab, pais_lab, tel_lab, cel_lab, trab_fcen, revista, lista, letter, last_change) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, NOW())", PROFILE_TABLE, $_SESSION['user_id'], $this->ins_string($dir_part), $this->ins_string($loc_part), $this->ins_string($zip_part), $this->ins_string( $prov_part), $this->ins_string($pais_part), $this->ins_string($tel_part), $this->ins_string($cel_part), $this->ins_string($nombre_lab), $this->ins_string($dir_lab), $this->ins_string($loc_lab), $this->ins_string($zip_lab), $this->ins_string($prov_lab), $this->ins_string($pais_lab), $this->ins_string($tel_lab), $this->ins_string($cel_lab), $this->ins_string($trab_fcen), $this->ins_string($revista), $this->ins_string($lista), $this->ins_string($letter)); } if (mysql_query($sql) or die (mysql_error())) { $this->profile_id = (!$_SESSION['is_rec']) ? mysql_insert_id() : $ident; $this->the_msg = $this->extra_text(2); } else { $this->the_msg = $this->extra_text(3); } } function get_profile_data() { $this->get_user_info(); $_SESSION['user_id'] = $this->id; $sql = sprintf("SELECT id, dir_part, loc_part, zip_part, prov_part, pais_part, tel_part, cel_part, nombre_lab, dir_lab, loc_lab, zip_lab, prov_lab, pais_lab, tel_lab, cel_lab, trab_fcen, revista, lista, letter FROM %s WHERE users_id = %d", PROFILE_TABLE, $this->id); $result = mysql_query($sql) or die (mysql_error()); if (mysql_num_rows($result) == 0) { $_SESSION['is_rec'] = false; $this->the_msg = $this->extra_text(1); } else { $_SESSION['is_rec'] = true; // this session acts like an extra controle while ($obj = mysql_fetch_object($result)) { $this->profile_id = $obj->id; $this->dir_part = $obj->dir_part; $this->loc_part = $obj->loc_part; $this->zip_part = $obj->zip_part; $this->prov_part = $obj->prov_part; $this->pais_part = $obj->pais_part; $this->tel_part = $obj->tel_part; $this->cel_part = $obj->cel_part; $this->nombre_lab = $obj->nombre_lab; $this->dir_lab = $obj->dir_lab; $this->loc_lab = $obj->loc_lab; $this->zip_lab = $obj->zip_lab; $this->prov_lab = $obj->prov_lab; $this->pais_lab = $obj->pais_lab; $this->tel_lab = $obj->tel_lab; $this->cel_lab = $obj->cel_lab; $this->trab_fcen = $obj->trab_fcen; $this->revista = $obj->revista; $this->lista = $obj->lista; $this->letter = $obj->letter; } } } } ?>ingreso/forgot_password.php0100644000113600011300000000272610507124652017170 0ustar sgap_admwebmastersforgot_password($_POST['email']); } $error = $renew_password->the_msg; ?> Recuperación de clave o usuario

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


¿Olvidó su clave o usuario?

Por favor, ingrese la dirección de e-mail utilizada para registrarse.

">

 

Ingreso

ingreso/deny_access.php0100644000113600011300000000153010507124760016216 0ustar sgap_admwebmasters Acceso denegado

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Acceso denegado

Tu cuenta no te permite ver esta página!

 

Menú principal

ingreso/login_local.php0100644000113600011300000000347410503304024016216 0ustar sgap_admwebmasterssave_login = (isset($_POST['remember'])) ? $_POST['remember'] : "no"; // use a cookie to remember the login $my_local_access->count_visit = true; // if this is true then the last visitdate is saved in the database $my_local_access->login_local($_POST['login'], $_POST['password']); // call the login method } $error = $my_local_access->the_msg; ?> Login page example

Login (with user's language settings):

Please enter your login and password.



is_cookie == true) ? " checked" : ""; ?>>

 

 

ingreso/base_inicio.php0100644000113600011300000000336110647042514016207 0ustar sgap_admwebmasterslogin_page = "login.php"; // change this only if your login is on another page $page_protect->access_page(); // only set this this method to protect your page $page_protect->get_user_info(); $hello_name = ($page_protect->user_name != "") ? $page_protect->user_name : $page_protect->user; if (isset($_GET['action']) && $_GET['action'] == "log_out") { $page_protect->log_out(); // the method to log off } ?> Base de graduados

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Hola

Conexión a la base de graduados activa.

 

Cambie su clave o e-mail

Información de contacto y revista Exactamente

access_level >= DEFAULT_ADMIN_LEVEL) { // this link is only visible for admin level user ?>

Admin page (user / access level update)

Desconexión

ingreso/test_access_level.php0100644000113600011300000000224710503304024017420 0ustar sgap_admwebmastersaccess_page($_SERVER['PHP_SELF'], "", 5); // change this value to test differnet access levels (default: 1 = low and 10 high) if (isset($_GET['action']) && $_GET['action'] == "log_out") { $test_access_level->log_out(); // the method to log off } ?> Test page "access_user Class"

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


According the access level from your account it's allowed to view this page!

 

Click here to log out.

ingreso/update_user.php0100644000113600011300000000520710503413672016262 0ustar sgap_admwebmasterslanguage = "de"; // use this selector to get messages in other languages $update_member->access_page(); // protect this page too. $update_member->get_user_info(); // call this method to get all other information if (isset($_POST['Submit'])) { $update_member->update_user($_POST['password'], $_POST['confirm'], /*$_POST['name'], /*$_POST['last_login'], */$_POST['email']); // the update method } $error = $update_member->the_msg; // error message ?> Base de Graduados

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Cambie su clave aqui:

Los campos con * son obligatorios.

user; ?>
" size="6"> * (min. 6 caracteres)
" size="6"> *

*


Volver al menu principal

ingreso/admin_user_old.php0100644000113600011300000001524410503304022016714 0ustar sgap_admwebmasterstable_name, trim($for_user)); } else { $sql = sprintf("SELECT id, login, email, access_level, active FROM %s WHERE id = %d", $this->table_name, intval($for_user)); } $result = mysql_query($sql); if (mysql_num_rows($result) == 1) { $obj = mysql_fetch_object($result); $this->user_id = $obj->id; $this->user_name = $obj->login; $this->old_user_email = $obj->email; $this->user_access_level = $obj->access_level; $this->activation = $obj->active; if ($this->user_name != $_SESSION['user']) { $this->user_found = true; } else { $this->user_found = false; $this->the_msg = "It's not allowed to change your own data!"; } mysql_free_result($result); } else { $this->the_msg = "Sorry, no data for this loginname!"; } } function update_user_by_admin($new_level, $user_id, $def_pass, $new_email, $active, $confirmation = "no") { $this->user_found = true; $this->user_access_level = $new_level; if ($def_pass != "" && strlen($def_pass) < 4) { $this->the_msg = "Password is to short use the min. of 4 chars."; } else { if ($this->check_email($new_email)) { $sql = "UPDATE %s SET access_level = %d, email = '%s', active = '%s'"; $sql .= ($def_pass != "") ? sprintf(", pw = '%s'", md5($def_pass)) : ""; $sql .= " WHERE id = %d"; $sql_compl = sprintf($sql, $this->table_name, $new_level, $new_email, $active, $user_id); if (mysql_query($sql_compl)) { $this->the_msg = "Data is modified for user with id#".$user_id.""; if ($confirmation == "yes") { if ($this->send_confirmation($user_id)) { $this->the_msg .= "
...a confirmation mail is send to the user."; } else { $this->the_msg .= "
...ERROR no confirmation mail is send to the user."; } } } else { $this->the_msg = "Database error, please try again!"; } } else { $this->the_msg = "The e-mail address is invalid!"; } } } function access_level_menu($curr_level, $element_name = "level") { $menu = "\n"; return $menu; } function activation_switch($formelement = "activation") { $radio_group = "\n"; $first = ($this->activation == "y") ? " checked" : ""; $second = ($first == " checked") ? "" : " checked"; $radio_group .= "yes\n"; $radio_group .= "no\n"; return $radio_group; } } $admin_update = new Admin_user; $admin_update->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING'], DEFAULT_ADMIN_LEVEL); // check the level inside the config file if (isset($_POST['Submit'])) { if ($_POST['Submit'] == "Update") { $conf_str = (isset($_POST['send_confirmation'])) ? $_POST['send_confirmation'] : ""; // the checkbox value to send a confirmation mail $admin_update->update_user_by_admin($_POST['level'], $_POST['user_id'], $_POST['password'], $_POST['email'], $_POST['activation'], $conf_str); $admin_update->get_userdata($_POST['login_name']); // this is needed to get the modified data after update } elseif ($_POST['Submit'] == "Search") { $admin_update->get_userdata($_POST['login_name']); } } elseif (isset($_GET['login_id']) && intval($_GET['login_id']) > 0) { $admin_update->get_userdata($_GET['login_id'], "is_id"); } $error = $admin_update->the_msg; // error message ?> Admin page example

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Página de administración

user_found) { ?>

Este formulario permite cambiar el grado de acceso o reemplazar el email o la clave del usuario.

user_name; ?>
access_level_menu($admin_update->user_access_level); ?>
"> (min. 6 caracteres)

activation_switch(); ?>

buscar otro usuario...

Ingrese el numero de documento del usuario que hay que modificar:

">

 

Principal

ingreso/login.php0100644000113600011300000000565110503304305015045 0ustar sgap_admwebmasterslogin_reader(); // $my_access->language = "de"; // use this selector to get messages in other languages if (isset($_GET['activate']) && isset($_GET['ident'])) { // this two variables are required for activating/updating the account/password $my_access->auto_activation = false; // use this (true/false) to stop the automatic activation $my_access->activate_account($_GET['activate'], $_GET['ident']); // the activation method } if (isset($_GET['validate']) && isset($_GET['id'])) { // this two variables are required for activating/updating the new e-mail address $my_access->validate_email($_GET['validate'], $_GET['id']); // the validation method } if (isset($_POST['Submit'])) { $my_access->save_login = (isset($_POST['remember'])) ? $_POST['remember'] : "no"; // use a cookie to remember the login $my_access->count_visit = true; // if this is true then the last visitdate is saved in the database $my_access->login_user($_POST['login'], $_POST['password']); // call the login method } $error = $my_access->the_msg; ?> Base de Graduados - SEGB

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Ingreso:

Por favor ingrese su usuario y clave .




¿Todavía no está registrado? Registrese aqui.

¿Olvidó su clave y/o usuario?

registro/0040755000113600011300000000000010503325637013423 5ustar sgap_admwebmastersregistro/access_user_class.php0100644000113600011300000007371210503304027017615 0ustar sgap_admwebmastersconnect_db(); $this->login_page = LOGIN_PAGE; $this->main_page = START_PAGE; $this->password_page = ACTIVE_PASS_PAGE; $this->deny_access_page = DENY_ACCESS_PAGE; $this->admin_page = ADMIN_PAGE; } function check_user($pass = "") { switch ($pass) { case "new": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE email = '%s' OR login = '%s'", $this->table_name, $this->user_email, $this->user); break; case "lost": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE email = '%s' AND active = 'y'", $this->table_name, $this->user_email); break; case "new_pass": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE pw = '%s' AND id = %d", $this->table_name, $this->user_pw, $this->id); break; case "active": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE id = %d AND active = 'n'", $this->table_name, $this->id); break; case "validate": $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE id = %d AND tmp_mail <> ''", $this->table_name, $this->id); break; default: $password = (strlen($this->user_pw) < 32) ? md5($this->user_pw) : $this->user_pw; $sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE BINARY login = '%s' AND pw = '%s' AND active = 'y'", $this->table_name, $this->user, $password); } $result = mysql_query($sql) or die(mysql_error()); if (mysql_result($result, 0, "test") == 1) { return true; } else { return false; } } // New methods to handle the access level function get_access_level() { $sql = sprintf("SELECT access_level FROM %s WHERE login = '%s' AND active = 'y'", $this->table_name, $this->user); if (!$result = mysql_query($sql)) { $this->the_msg = $this->messages(14); } else { return mysql_result($result, 0, "access_level"); } } function set_user() { $_SESSION['user'] = $this->user; $_SESSION['pw'] = $this->user_pw; if (!empty($_SESSION['referer'])) { $next_page = $_SESSION['referer']; unset($_SESSION['referer']); } else { $next_page = $this->main_page; } header("Location: ".$next_page); } function connect_db() { $conn_str = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD); mysql_select_db(DB_NAME); // if there are problems with the tablenames inside the config file use this row } function login_user($user, $password) { if ($user != "" && $password != "") { $this->user = $user; $this->user_pw = $password; if ($this->check_user()) { $this->login_saver(); if ($this->count_visit) { $this->reg_visit($user, $password); } $this->set_user(); } else { $this->the_msg = $this->messages(10); } } else { $this->the_msg = $this->messages(11); } } function login_saver() { if ($this->save_login == "no") { if (isset($_COOKIE[$this->cookie_name])) { $expire = time()-3600; } else { return; } } else { $expire = time()+2592000; } $cookie_str = $this->user.chr(31).base64_encode($this->user_pw); setcookie($this->cookie_name, $cookie_str, $expire, $this->cookie_path); } function login_reader() { if (isset($_COOKIE[$this->cookie_name])) { $cookie_parts = explode(chr(31), $_COOKIE[$this->cookie_name]); $this->user = $cookie_parts[0]; $this->user_pw = base64_decode($cookie_parts[1]); $this->is_cookie = true; } } function reg_visit($login, $pass) { $visit_sql = sprintf("UPDATE %s SET last_login = '%s' WHERE login = '%s' AND pw = '%s'", $this->table_name, date("Y-m-d H:i:s"), $login, md5($pass)); mysql_query($visit_sql); } function log_out() { unset($_SESSION['user']); unset($_SESSION['pw']); header("Location: ".$this->login_page); } function access_page($refer = "", $qs = "", $level = DEFAULT_ACCESS_LEVEL) { $refer_qs = $refer; $refer_qs .= ($qs != "") ? "?".$qs : ""; if (isset($_SESSION['user']) && isset($_SESSION['pw'])) { $this->user = $_SESSION['user']; $this->user_pw = $_SESSION['pw']; if (!$this->check_user()) { $_SESSION['referer'] = $refer_qs; header("Location: ".$this->login_page); } if ($this->get_access_level() < $level) { header("Location: ".$this->deny_access_page); } } else { $_SESSION['referer'] = $refer_qs; header("Location: ".$this->login_page); } } function get_user_info() { $sql_info = sprintf("SELECT name, lastname, t_doc, n_doc, dia_nac, mes_nac, ano_nac, nac, last_login, email, id FROM %s WHERE login = '%s' AND pw = '%s'", $this->table_name, $this->user, md5($this->user_pw)); $res_info = mysql_query($sql_info); $this->id = mysql_result($res_info, 0, "id"); $this->user_name = mysql_result($res_info, 0, "name"); $this->user_lastname = mysql_result($res_info, 0, "lastname"); $this->user_t_doc = mysql_result($res_info, 0, "t_doc"); $this->user_n_doc = mysql_result($res_info, 0, "n_doc"); $this->user_dia_nac = mysql_result($res_info, 0, "dia_nac"); $this->user_mes_nac = mysql_result($res_info, 0, "mes_nac"); $this->user_ano_nac = mysql_result($res_info, 0, "ano_nac"); $this->user_nac = mysql_result($res_info, 0, "nac"); $this->user_last_login = mysql_result($res_info, 0, "last_login"); $this->user_email = mysql_result($res_info, 0, "email"); } function update_user($new_password, $new_confirm, /*$new_name, /*$new_last_login, */$new_mail) { if ($new_password != "") { if ($this->check_new_password($new_password, $new_confirm)) { $ins_password = $new_password; $update_pw = true; } else { return; } } else { $ins_password = $this->user_pw; $update_pw = false; } if (trim($new_mail) <> $this->user_email) { if ($this->check_email($new_mail)) { $this->user_email = $new_mail; if (!$this->check_user("lost")) { $update_email = true; } else { $this->the_msg = $this->messages(31); return; } } else { $this->the_msg = $this->messages(16); return; } } else { $update_email = false; $new_mail = ""; } $upd_sql = sprintf("UPDATE %s SET pw = %s, tmp_mail = %s WHERE id = %d", // $upd_sql = sprintf("UPDATE %s SET pw = %s, name = %s, last_login = %s, tmp_mail = %s WHERE id = %d", $this->table_name, $this->ins_string(md5($ins_password)), // $this->ins_string($new_name), // $this->ins_string($new_last_login), $this->ins_string($new_mail), $this->id); $upd_res = mysql_query($upd_sql); if ($upd_res) { if ($update_pw) { $_SESSION['pw'] = $this->user_pw = $ins_password; if (isset($_COOKIE[$this->cookie_name])) { $this->save_login = "yes"; $this->login_saver(); } } $this->the_msg = $this->messages(30); if ($update_email) { if ($this->send_mail($new_mail, 33)) { $this->the_msg = $this->messages(27); } else { mysql_query(sprintf("UPDATE %s SET tmp_mail = ''", $this->table_name)); $this->the_msg = $this->messages(14); } } } else { $this->the_msg = $this->messages(15); } } function check_new_password($pass, $pw_conform) { if ($pass == $pw_conform) { if (strlen($pass) >= PW_LENGTH) { return true; } else { $this->the_msg = $this->messages(32); return false; } } else { $this->the_msg = $this->messages(38); return false; } } function check_email($mail_address) { if (preg_match("/^[0-9a-z]+(([\.\-_])[0-9a-z]+)*@[0-9a-z]+(([\.\-])[0-9a-z-]+)*\.[a-z]{2,4}$/i", $mail_address)) { return true; } else { return false; } } function ins_string($value) { if (preg_match("/^(.*)(##)(int|date|eu_date)$/", $value, $parts)) { $value = $parts[1]; $type = $parts[3]; } else { $type = ""; } $value = (!get_magic_quotes_gpc()) ? addslashes($value) : $value; switch ($type) { case "int": $value = ($value != "") ? intval($value) : NULL; break; case "eu_date": $date_parts = preg_split ("/[\-\/\.]/", $value); $time = mktime(0, 0, 0, $date_parts[1], $date_parts[0], $date_parts[2]); $value = strftime("'%Y-%m-%d'", $time); break; case "date": $value = "'".preg_replace("/[\-\/\.]/", "-", $value)."'"; break; default: $value = ($value != "") ? "'" . $value . "'" : "''"; } return $value; } function register_user($first_login, $first_password, $confirm_password, $first_name, $first_lastname, $first_t_doc, $first_n_doc, $first_dia_nac, $first_mes_nac, $first_ano_nac, $first_nac, $first_last_login, $first_email) { if ($this->check_new_password($first_password, $confirm_password)) { if (strlen($first_login) >= LOGIN_LENGTH) { if ($this->check_email($first_email)) { $this->user_email = $first_email; $this->user = $first_login; if ($this->check_user("new")) { $this->the_msg = $this->messages(12); return; } else { $sql = sprintf("INSERT INTO %s (id, login, pw, name, lastname, t_doc, n_doc, dia_nac, mes_nac, ano_nac, nac, last_login, email, access_level, active) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, 'n')", $this->table_name, $this->ins_string($first_n_doc), $this->ins_string($first_login), $this->ins_string(md5($first_password)), $this->ins_string($first_name), $this->ins_string($first_lastname), $this->ins_string($first_t_doc), $this->ins_string($first_n_doc), $this->ins_string($first_dia_nac), $this->ins_string($first_mes_nac), $this->ins_string($first_ano_nac), $this->ins_string($first_nac), $this->ins_string($first_last_login), $this->ins_string($this->user_email), DEFAULT_ACCESS_LEVEL); $ins_res = mysql_query($sql) or die(mysql_error()); if ($ins_res) { $this->id = $first_n_doc; // $this->id = mysql_insert_id(); $this->user_pw = $first_password; $this->user_name = $first_name; if ($this->send_mail($this->user_email, 29, 28)) { $this->the_msg = $this->messages(13); } else { mysql_query(sprintf("DELETE FROM %s WHERE id = %s", $this->table_name, $this->id)); $this->the_msg = $this->messages(14); } } else { $this->the_msg = $this->messages(15); } } } else { $this->the_msg = $this->messages(16); } } else { $this->the_msg = $this->messages(17); } } } function validate_email($validation_key, $key_id) { if ($validation_key != "" && strlen($validation_key) == 32 && $key_id > 0) { $this->id = $key_id; if ($this->check_user("validate")) { $upd_sql = sprintf("UPDATE %s SET email = tmp_mail, tmp_mail = '' WHERE id = %d AND pw = '%s'", $this->table_name, $key_id, $validation_key); if (mysql_query($upd_sql)) { $this->the_msg = $this->messages(18); } else { $this->the_msg = $this->messages(19); } } else { $this->the_msg = $this->messages(34); } } else { $this->the_msg = $this->messages(21); } } function activate_account($activate_key, $key_id) { if ($activate_key != "" && strlen($activate_key) == 32 && $key_id > 0) { $this->id = $key_id; if ($this->check_user("active")) { if ($this->auto_activation) { $upd_sql = sprintf("UPDATE %s SET active = 'y' WHERE id = %s AND pw = '%s'", $this->table_name, $key_id, $activate_key); if (mysql_query($upd_sql)) { if ($this->send_confirmation($first_n_doc)) { $this->the_msg = $this->messages(18); } else { $this->the_msg = $this->messages(14); } } else { $this->the_msg = $this->messages(19); } } else { if ($this->send_mail($this->admin_mail, 40, 39)) { $this->the_msg = $this->messages(36); } else { $this->the_msg = $this->messages(14); } } } else { $this->the_msg = $this->messages(20); } } else { $this->the_msg = $this->messages(21); } } function forgot_password($forgot_email) { if ($this->check_email($forgot_email)) { $this->user_email = $forgot_email; if (!$this->check_user("lost")) { $this->the_msg = $this->messages(22); } else { $forgot_sql = sprintf("SELECT id, pw FROM %s WHERE email = '%s'", $this->table_name, $this->user_email); if ($forgot_result = mysql_query($forgot_sql)) { $this->id = mysql_result($forgot_result, 0, "id"); $this->user_pw = mysql_result($forgot_result, 0, "pw"); if ($this->send_mail($this->user_email, 35, 26)) { $this->the_msg = $this->messages(23); } else { $this->the_msg = $this->messages(14); } } else { $this->the_msg = $this->messages(15); } } } else { $this->the_msg = $this->messages(16); } } function check_activation_password($controle_str, $id) { if ($controle_str != "" && strlen($controle_str) == 32 && $id > 0) { $this->user_pw = $controle_str; $this->id = $id; if ($this->check_user("new_pass")) { // this is a fix for version 1.76 $sql_get_user = sprintf("SELECT login FROM %s WHERE pw = '%s' AND id = %d", $this->table_name, $this->user_pw, $this->id); $get_user = mysql_query($sql_get_user); $this->user = mysql_result($get_user, 0, "login"); // end fix return true; } else { $this->the_msg = $this->messages(21); return false; } } else { $this->the_msg = $this->messages(21); return false; } } function activate_new_password($new_pass, $new_confirm, $old_pass, $user_id) { if ($this->check_new_password($new_pass, $new_confirm)) { $sql_new_pass = sprintf("UPDATE %s SET pw = '%s' WHERE pw = '%s' AND id = %d", $this->table_name, md5($new_pass), $old_pass, $user_id); if (mysql_query($sql_new_pass)) { $this->the_msg = $this->messages(30); return true; } else { $this->the_msg = $this->messages(14); return false; } } else { return false; } } function send_confirmation($id) { $sql = sprintf("SELECT name, email FROM %s WHERE id = %d", $this->table_name, $id); $res = mysql_query($sql); $user_email = mysql_result($res, 0, "email"); $this->user_name = mysql_result($res, 0, "name"); if ($this->user_name == "") $this->user_name = "Usuario"; // change "User" to whatever you want, it's just a default name if ($this->send_mail($user_email, 37, 24, $this->send_copy)) { return true; } else { return false; } } function send_mail($mail_address, $msg = 29, $subj = 28, $send_admin = false) { $header = "From: \"".$this->webmaster_name."\" <".$this->webmaster_mail.">\r\n"; if ($send_admin) $header .= "Bcc: ".ADMIN_MAIL."\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Mailer: Olaf's mail script version 1.11\r\n"; $header .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n"; $subject = $this->messages($subj); $body = $this->messages($msg); if (mail($mail_address, $subject, $body, $header)) { return true; } else { return false; } } function messages($num) { $host = "http://".$_SERVER['HTTP_HOST']; switch ($this->language) { case "de": $msg[10] = "Login und/oder Passwort finden keinen Treffer in der Datenbank."; $msg[11] = "Login und/oder Passwort sind leer!"; $msg[12] = "Leider existiert bereits ein Benutzer mit diesem Login und/oder E-mailadresse."; $msg[13] = "Weitere Anweisungen wurden per E-mail versandt, folgen Sie nun den Instruktionen."; $msg[14] = "Es is ein Fehler entstanden probieren Sie es erneut."; $msg[15] = "Es is ein Fehler entstanden probieren Sie es später nochmal."; $msg[16] = "Die eingegebene E-mailadresse ist nicht gültig."; $msg[17] = "Das Feld login (min. ".LOGIN_LENGTH." Zeichen) muss eingegeben sein."; $msg[18] = "Ihr Benutzerkonto ist aktiv. Sie können sich nun anmelden."; $msg[19] = "Ihr Aktivierungs ist nicht gültig."; $msg[20] = "Da ist kein Konto zu aktivieren."; $msg[21] = "Der benutzte Aktivierung-Code is nicht gültig!"; $msg[22] = "Keine Konto gefunden dass mit der eingegeben E-mailadresse übereinkommt."; $msg[23] = "Kontrollieren Sie Ihre E-Mail um Ihr neues Passwort zu erhalten."; $msg[24] = "Ihr Benutzerkonto wurde aktiviert."; $msg[25] = "Kann Ihr Passwort nicht aktivieren."; $msg[26] = "Sie haben Ihr Passwort vergessen..."; $msg[27] = "Kontrollieren Sie Ihre E-Mailbox und bestätigen Sie Ihre Änderung(en)."; $msg[28] = "Ihre Anfrage bestätigen..."; $msg[29] = "Hallo,\r\n\r\num Ihre Anfrage zu aktivieren klicken Sie bitte auf den folgenden Link:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[30] = "Ihre Änderung ist durchgeführt."; $msg[31] = "Diese E-mailadresse wird bereits genutzt, bitte wählen Sie eine andere."; $msg[32] = "Das Feld Passwort (min. ".PW_LENGTH." Zeichen) muss eingegeben sein."; $msg[33] = "Hallo,\r\n\r\nIhre neue E-mailadresse muss noch überprüft werden, bitte klicken Sie auf den folgenden Link:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[34] = "Da ist keine E-mailadresse zu überprüfen."; $msg[35] = "Hallo,\r\n\r\nIhr neues Passwort kann nun eingegeben werden, bitte klicken Sie auf den folgenden Link:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[36] = "Ihr Antrag ist verarbeitet und wird nun durch den Administrator kontrolliert. \r\nSie erhalten eine Nachricht wenn dies geschehen ist."; $msg[37] = "Hallo ".$this->user_name.",\r\n\r\nIhr Konto ist nun eigerichtet und Sie können sich nun anmelden.\r\n\r\nKlicken Sie hierfür auf den folgenden Link:\r\n".$host.$this->login_page."\r\n\r\nmit freundlichen Grüssen\r\n".$this->admin_name; $msg[38] = "Das bestätigte Passwort hat keine Übereinstimmung mit dem ersten Passwort, bitte probieren Sie es erneut."; $msg[39] = "Neuer Benutzer..."; $msg[40] = "Es hat sich am ".date("Y-m-d")." ein neuer Benutzer angemeldet.\r\n\r\nKlicken Sie hier um zur Verwaltungsseite zu gelangen:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Bestätigen Sie Ihre E-mailadresse..."; break; break; case "nl": $msg[10] = "Gebruikersnaam en/of wachtwoord vinden geen overeenkomst in de database."; $msg[11] = "Gebruikersnaam en/of wachtwoord zijn leeg!"; $msg[12] = "Helaas bestaat er al een gebruiker met deze gebruikersnaam en/of e-mail adres."; $msg[13] = "Er is een e-mail is aan u verzonden, volg de instructies die daarin vermeld staan."; $msg[14] = "Het is een fout ontstaan, probeer het opnieuw."; $msg[15] = "Het is een fout ontstaan, probeer het later nog een keer."; $msg[16] = "De opgegeven e-mail adres is niet geldig."; $msg[17] = "De gebruikersnaam (min. ".LOGIN_LENGTH." teken) moet opgegeven zijn."; $msg[18] = "Het gebruikersaccount is aangemaakt, u kunt u nu aanmelden."; $msg[19] = "Kan uw account niet activeren."; $msg[20] = "Er is geen account te activeren."; $msg[21] = "De gebruikte activeringscode is niet geldig!"; $msg[22] = "Geen account gevonden dat met de opgegeven e-mail adres overeenkomt."; $msg[23] = "Er is een e-mail is aan u verzonden, daarin staat hoe uw een nieuw wachtwoord kunt aanmaken."; $msg[24] = "Uw gebruikersaccount is geactiveerd... "; $msg[25] = "Kan het wachtwoord niet activeren."; $msg[26] = "U bent uw wachtwoord vergeten..."; $msg[27] = "Er is een e-mail is aan u verzonden, volg de instructies die daarin vermeld staan."; $msg[28] = "Bevestig uw aanvraag ..."; $msg[29] = "Hallo,\r\n\r\nBedankt voor uw aanvraag,\r\n\r\nklik op de volgende link om de aanvraag te verwerken:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[30] = "Uw wijzigingen zijn doorgevoerd."; $msg[31] = "Dit e-mailadres bestaat al, gebruik en andere."; $msg[32] = "Het veld wachtwoord (min. ".PW_LENGTH." teken) mag niet leeg zijn."; $msg[33] = "Beste gebruiker,\r\n\r\nde nieuwe e-mailadres moet nog gevalideerd worden, klik hiervoor op de volgende link:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[34] = "Er is geen e-mailadres te valideren."; $msg[35] = "Hallo,\r\n\r\nuw nieuw wachtwoord kan nu ingevoerd worden, klik op deze link om verder te gaan:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[36] = "U aanvraag is verwerkt en wordt door de beheerder binnenkort activeert. \r\nU krijgt bericht wanneer dit gebeurt is."; $msg[37] = "Hallo ".$this->user_name.",\r\n\r\nHet account is nu gereed en u kunt zich aanmelden.\r\n\r\nKlik hiervoor op de volgende link:\r\n".$host.$this->login_page."\r\n\r\nmet vriendelijke groet\r\n".$this->admin_name; $msg[38] = "Het bevestigings wachtwoord komt niet overeen met het wachtwoord, probeer het opnieuw."; $msg[39] = "Nieuwe gebuiker..."; $msg[40] = "Er heeft zich een nieuwe gebruiker aangemeld op ".date("Y-m-d").":\r\n\r\nKlik hier voor toegang tot de beheer pagina:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Bevestiging e-mail adres..."; break; case "fr": $msg[10] = "Le login et/ou mot de passe ne correspondent pas."; $msg[11] = "Le login et/ou mot de passe est vide !"; $msg[12] = "Désolé, un utilisateur avec le même email et/ou login existe déjà."; $msg[13] = "Vérifiez votre email et suivez les instructions."; $msg[14] = "Désolé, une erreur s'est produite. Veuillez réessayer."; $msg[15] = "Désolé, une erreur s'est produite. Veuillez réessayer plus tard."; $msg[16] = "L'adresse email n'est pas valide."; $msg[17] = "Le champ \"Nom d'usager\" doit être composé d'au moins ".LOGIN_LENGTH." caratères."; $msg[18] = "Votre requete est complète. Enregistrez vous pour continuer."; $msg[19] = "Désolé, nous ne pouvons pas activer votre account."; $msg[20] = "Désolé, il n'y à pas d'account à activer."; $msg[21] = "Désolé, votre clef d'authorisation n'est pas valide"; $msg[22] = "Désolé, il n'y à pas d'account actif avec cette adresse email."; $msg[23] = "Veuillez consulter votre email pour recevoir votre nouveau mot de passe."; $msg[24] = "Votre compte est prêt à l'usage"; $msg[25] = "Désolé, nous ne pouvons pas activer votre mot de passe."; $msg[26] = "Vous avez oublié votre mot de passe..."; $msg[27] = "Veuillez consulter votre email pour activer les modifications."; $msg[28] = "Votre requete doit etre exécuter..."; $msg[29] = "Bonjour,\r\n\r\npour activer votre account clickez sur le lien suivant:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[30] = "Votre account à été modifié."; $msg[31] = "Désolé, cette adresse email existe déjà, veuillez en utiliser une autre."; $msg[32] = "Le champ password (min. ".PW_LENGTH." char) est requis."; $msg[33] = "Bonjour,\r\n\r\nvotre nouvelle adresse email doit être validée, clickez sur le liens suivant:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[34] = "Il n'y à pas d'email à valider."; $msg[35] = "Bonjour,\r\n\r\nPour entrer votre nouveaux mot de passe, clickez sur le lien suivant:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[36] = "Votre demande a été bien traitée et d'ici peu l'administrateur va l 'activer. Nous vous informerons quand ceci est arrivé."; $msg[37] = "Bonjour ".$this->user_name.",\r\n\r\nVotre compte est maintenant actif et il est possible d'y avoir accès.\r\n\r\nCliquez sur le lien suivant afin de rejoindre la page d'accès:\r\n".$host.$this->login_page."\r\n\r\nCordialement\r\n".$this->admin_name; $msg[38] = "Le mot de passe de confirmation de concorde pas avec votre mot de passe. Veuillez réessayer"; $msg[39] = "Nouvel utilisateur..."; $msg[40] = "Nouvel utilisateur s'est enregistré ".date("Y-m-d").":\r\n\r\nCliquez ici pour accéder au page d'administration:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Confirmez l'adresse email..."; break; default: $msg[10] = "El usuario y/o la clave no coinciden con la base de datos."; $msg[11] = "Falta el usuario y/o la clave."; $msg[12] = "Ya existe una cuenta con ese documento y/o dirección de e-mail."; $msg[13] = "Por favor, revise su cuenta de e-mail y siga las instrucciones."; $msg[14] = "Ha ocurrido un error. Inténtelo nuevamente."; $msg[15] = "Ha ocurrido un error. Inténtelo nuevamente."; $msg[16] = "La dirección de e-mail es invalida."; $msg[17] = "Falta el usuario o es demasiado corto (min. ".LOGIN_LENGTH." caracteres)."; $msg[18] = "Su solicitud ha sido procesada. Conectese para continuar."; $msg[19] = "Su cuenta no puede ser activada."; $msg[20] = "No hay ninguna cuenta para activar."; $msg[21] = "La clave de activación es invalida."; $msg[22] = "No hay ninguna cuenta activa que coincida con esta dirección de e-mail."; $msg[23] = "Por favor, revise su e-mail para obtener una nueva clave."; $msg[24] = "Su cuenta ha sido activada. "; $msg[25] = "Su clave no puede ser activada."; $msg[26] = "Su nueva clave"; $msg[27] = "Por favor revise su cuenta de e-mail y active las modificaciones."; $msg[28] = "Su solicitud debe ser procesada."; $msg[29] = "Hola ".$this->user_name.",\r\n\r\nPara activar su cuenta presione aqui:\r\n".$host.$this->login_page."?ident=".$this->id."&activate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nSaludos\r\n".$this->admin_name; $msg[30] = "Su cuenta ha sido modificada."; $msg[31] = "La dirección de e-mail ya existe, por favor cambiela."; $msg[32] = "Falta la clave o es demasiado corta (min. ".PW_LENGTH." caracteres."; $msg[33] = "Hola ".$this->user_name.",\r\n\r\nLa nueva dirección de e-mail debe ser validada. Para hacerlo presione aqui:\r\n".$host.$this->login_page."?id=".$this->id."&validate=".md5($this->user_pw)."&language=".$this->language."\r\n\r\nSaludos\r\n".$this->admin_name; $msg[34] = "No hay dirección de e-mail para validar."; $msg[35] = "Hola ".$this->user_name.",\r\n\r\nPara ingresar su nueva clave presione aqui:\r\n".$host.$this->password_page."?id=".$this->id."&activate=".$this->user_pw."&language=".$this->language."\r\n\r\nSaludos\r\n".$this->admin_name; $msg[36] = "Su solicitud ha sido procesada y su validación será evaluada por el administrador. \r\nRecibirá un e-mail cuando esto suceda."; $msg[37] = "Hola ".$this->user_name."\r\n\r\nSu cuenta ha sido activada.\r\n\r\nPor favor ingrese para incorporar su información de contacto: \r\n".$host.$this->login_page."\r\n\r\nSaludos\r\n".$this->admin_name; $msg[38] = "La clave y la confirmación no coinciden. Por favor inténtelo nuevamente."; $msg[39] = "Nuevo usuario registrado"; $msg[40] = "Un nuevo usuario se registro el ".date("d-m-Y").":\r\n\r\nIngrese a la pagina de administración:\r\n\r\n".$host.$this->admin_page."?login_id=".$this->id; $msg[41] = "Convalide su dirección de e-mail"; // subject in e-mail } return $msg[$num]; } } ?>registro/activate_password.php0100644000113600011300000000474010503304027017646 0ustar sgap_admwebmasterscheck_activation_password($_GET['activate'], $_GET['id'])) { // the activation/validation method $_SESSION['activation'] = $_GET['activate']; // put the activation string into a session or into a hdden field $_SESSION['id'] = $_GET['id']; // this id is the key where the record have to be updated with new pw } } if (isset($_POST['Submit'])) { if ($act_password->activate_new_password($_POST['password'], $_POST['confirm'], $_SESSION['activation'], $_SESSION['id'])) { // this will change the password unset($_SESSION['activation']); unset($_SESSION['id']); // inserts new password only ones! } $act_password->user = $_POST['user']; // to hold the user name in this screen (new in version > 1.77) } $error = $act_password->the_msg; ?> Example new Passwort activation

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Enter your new password:

Enter here your new password, (login: user; ?>).

"> ">

Att. !

 

Login

registro/update_user_profile.php0100644000113600011300000000733410503304032020162 0ustar sgap_admwebmastersaccess_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']); // protect this page too. $update_profile->get_profile_data(); if (isset($_POST['user_data'])) { $update_profile->update_user($_POST['password'], $_POST['confirm'], $_POST['user_name'], $_POST['user_last_login'], $_POST['user_email']); // the update method } if (isset($_POST['profile_data'])) { $update_profile->save_profile_date($_POST['id'], $_POST['calle_part'], $_POST['nro_part'], $_POST['piso_part'], $_POST['loc_part'], $_POST['prov_part'], $_POST['pais_part'], $_POST['zip_part'], $_POST['tel_part'], $_POST['cel_part'], $_POST['mail_part'], $_POST['nombre_lab'], $_POST['calle_lab'], $_POST['nro_lab'], $_POST['piso_lab'], $_POST['loc_lab'], $_POST['prov_lab'], $_POST['pais_lab'], $_POST['zip_lab'], $_POST['tel_lab'], $_POST['cel_lab'], $_POST['mail_lab']); // note the last trailing string, this used to optimize the value as a euro date. } $error = $update_profile->the_msg; // error message ?> Actualización de información de contacto

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Actualice su información de contacto :

Datos particulares

"; echo $update_profile->create_form_field("calle_part", "Calle: "); echo $update_profile->create_form_field("nro_part", "Nro.: "); echo $update_profile->create_form_field("piso_part", "Piso: "); echo $update_profile->create_form_field("loc_part", "Localidad: "); echo $update_profile->create_form_field("prov_part", "Provincia: "); echo $update_profile->create_form_field("pais_part", "País: "); echo $update_profile->create_form_field("zip_part", "CP: "); echo $update_profile->create_form_field("tel_part", "Teléfono: "); echo $update_profile->create_form_field("cel_part", "Celular: "); echo $update_profile->create_form_field("mail_part", "mail: "); echo "
Datos laborales

"; echo $update_profile->create_form_field("nombre_lab", "Lugar de trabajo: "); echo $update_profile->create_form_field("calle_lab", "Calle: "); echo $update_profile->create_form_field("nro_lab", "Nro.: "); echo $update_profile->create_form_field("piso_lab", "Piso: "); echo $update_profile->create_form_field("loc_lab", "Localidad: "); echo $update_profile->create_form_field("prov_lab", "Provincia: "); echo $update_profile->create_form_field("pais_lab", "País: "); echo $update_profile->create_form_field("zip_lab", "CP: "); echo $update_profile->create_form_field("tel_lab", "Teléfono: "); echo $update_profile->create_form_field("cel_lab", "Celular: "); echo $update_profile->create_form_field("mail_lab", "mail: "); ?>

 

Volver al menú principal

registro/index.php0100644000113600011300000001455410507125572015251 0ustar sgap_admwebmasterslanguage = "de"; // use this selector to get messages in other languages if (isset($_POST['Submit'])) { // the confirm variable is new since ver. 1.84 // if you don't like the confirm feature use a copy of the password variable $new_member->register_user($_POST['n_doc'], $_POST['n_doc'], $_POST['n_doc'], $_POST['name'], $_POST['lastname'], $_POST['t_doc'], $_POST['n_doc'], $_POST['dia_nac'], $_POST['mes_nac'], $_POST['ano_nac'], $_POST['nac'], $_POST['last_login'], $_POST['email']); // the register method // $new_member->register_user($_POST['login'], $_POST['password'], $_POST['confirm'], $_POST['name'], $_POST['lastname'], $_POST['t_doc'], $_POST['n_doc'], $_POST['dia_nac'], $_POST['mes_nac'], $_POST['ano_nac'], $_POST['nac'], $_POST['carrera'], $_POST['last_login'], $_POST['email']); // the register method } $error = $new_member->the_msg; // error message ?> Base de Graduados - SEGB

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Registrese por favor

- Deben completarse todos los campos. Para validar la cuenta los mismos deben coincidir con la información provista por la Facultad.
- Para que un graduado de la FCEN pueda ser incorporado a la base el mismo debe haber iniciado la tramitación del título.
- Es posible que la incorporación a la base de los graduados muy recientes demande algún tiempo extra de procesamiento.

">
">
">
DNI LE LC
">
"> (dd mm aaaa)

">

Ingreso a la base de graduados

Volver a la página del Área de Graduados


Secretaría de Extensión, Graduados y Bienestar
Facultad de Ciencias Exactas y Naturales - UBA
Ultima actualización: 17 de septiembre de 2006
Si desea enviar comentarios o encuentra errores, por favor dirija un e-mail a graduados@de.fcen.uba.ar
registro/testpage.php0100644000113600011300000000274310503304031015734 0ustar sgap_admwebmasterslogin_page = "login.php"; // change this only if your login is on another page $test_page_protect->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']); // set this method, including the server vars to protect your page and get redirected to here after login if (isset($_GET['action']) && $_GET['action'] == "log_out") { $test_page_protect->log_out(); // the method to log off } ?> Test page "access_user Class"

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Now you have access to this testpage.

".$_SERVER['QUERY_STRING']."" : " "; ?>

 

Click here to log out.

registro/admin_user.php0100644000113600011300000001520410503304027016247 0ustar sgap_admwebmasterstable_name, trim($for_user)); } else { $sql = sprintf("SELECT id, login, email, access_level, active FROM %s WHERE id = %d", $this->table_name, intval($for_user)); } $result = mysql_query($sql); if (mysql_num_rows($result) == 1) { $obj = mysql_fetch_object($result); $this->user_id = $obj->id; $this->user_name = $obj->login; $this->old_user_email = $obj->email; $this->user_access_level = $obj->access_level; $this->activation = $obj->active; if ($this->user_name != $_SESSION['user']) { $this->user_found = true; } else { $this->user_found = false; $this->the_msg = "It's not allowed to change your own data!"; } mysql_free_result($result); } else { $this->the_msg = "Sorry, no data for this loginname!"; } } function update_user_by_admin($new_level, $user_id, $def_pass, $new_email, $active, $confirmation = "no") { $this->user_found = true; $this->user_access_level = $new_level; if ($def_pass != "" && strlen($def_pass) < 4) { $this->the_msg = "Password is to short use the min. of 4 chars."; } else { if ($this->check_email($new_email)) { $sql = "UPDATE %s SET access_level = %d, email = '%s', active = '%s'"; $sql .= ($def_pass != "") ? sprintf(", pw = '%s'", md5($def_pass)) : ""; $sql .= " WHERE id = %d"; $sql_compl = sprintf($sql, $this->table_name, $new_level, $new_email, $active, $user_id); if (mysql_query($sql_compl)) { $this->the_msg = "Data is modified for user with id#".$user_id.""; if ($confirmation == "yes") { if ($this->send_confirmation($user_id)) { $this->the_msg .= "
...a confirmation mail is send to the user."; } else { $this->the_msg .= "
...ERROR no confirmation mail is send to the user."; } } } else { $this->the_msg = "Database error, please try again!"; } } else { $this->the_msg = "The e-mail address is invalid!"; } } } function access_level_menu($curr_level, $element_name = "level") { $menu = "\n"; return $menu; } function activation_switch($formelement = "activation") { $radio_group = "\n"; $first = ($this->activation == "y") ? " checked" : ""; $second = ($first == " checked") ? "" : " checked"; $radio_group .= "yes\n"; $radio_group .= "no\n"; return $radio_group; } } $admin_update = new Admin_user; $admin_update->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING'], DEFAULT_ADMIN_LEVEL); // check the level inside the config file if (isset($_POST['Submit'])) { if ($_POST['Submit'] == "Update") { $conf_str = (isset($_POST['send_confirmation'])) ? $_POST['send_confirmation'] : ""; // the checkbox value to send a confirmation mail $admin_update->update_user_by_admin($_POST['level'], $_POST['user_id'], $_POST['password'], $_POST['email'], $_POST['activation'], $conf_str); $admin_update->get_userdata($_POST['login_name']); // this is needed to get the modified data after update } elseif ($_POST['Submit'] == "Search") { $admin_update->get_userdata($_POST['login_name']); } } elseif (isset($_GET['login_id']) && intval($_GET['login_id']) > 0) { $admin_update->get_userdata($_GET['login_id'], "is_id"); } $error = $admin_update->the_msg; // error message ?> Admin page example

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Admin page (user data)

user_found) { ?>

Use this form to change the access level or replace the user's email and/or password.

user_name; ?>
access_level_menu($admin_update->user_access_level); ?>
"> (min. 4 chars.)

activation_switch(); ?>

search next user...

Enter the login name from the user where the modifications has to be done:

">

 

Main

registro/db_config.php0100644000113600011300000000464610503321333016042 0ustar sgap_admwebmastersregistro/ext_user_profile.php0100644000113600011300000002177010503304030017476 0ustar sgap_admwebmasterslanguage) { case "nl": $extra_msg[1] = "Op het moment is geen profiel data aanwezig."; $extra_msg[2] = "De profiel data is gewijzigd."; $extra_msg[3] = "Er is een fout ontstaam tijdens het update, probeer het opnieuw."; break; case "de": $extra_msg[1] = "Zur Zeit verfügt dieses Konto über keine weiteren Profildaten."; $extra_msg[2] = "Die Profildaten wurden geändert."; $extra_msg[3] = "Es ist ein Fehler entstanden, bitte probieren Sie es erneut."; break; case "fr": $extra_msg[1] = "Le profil ne contient actuellement aucune information."; $extra_msg[2] = "Les information de votre profil sont à jour."; $extra_msg[3] = "Il y a eu un problème pendant la mise à jour de votre profil. Veuillez réessayer."; break; default: $extra_msg[1] = "No hay información de contacto en este momento."; $extra_msg[2] = "Su información de contacto ha sido actualizada."; $extra_msg[3] = "Ha ocurrido un error, por favor inténtelo nuevamente."; } return $extra_msg[$msg_num]; } // use this method to get the messages in the language of the user (if exist) function login_local($user, $password) { $this->get_language($user, $password); $this->login_user($user, $password); } function get_language($user, $pw) { $sql = sprintf("SELECT up.language AS lang FROM %s AS u, %s AS up WHERE u.login = '%s' AND u.pw = '%s' AND u.id = up.users_id ", $this->table_name, $this->profile_tbl_name, $user, md5($pw)); $result = mysql_query($sql); if (mysql_num_rows($result) == 0) { return; } else { $lang = mysql_result($result, 0, "lang"); if ($lang != "") { $this->language = $lang; } else { return; } } } function language_menu($label) { $lang_select = "\n"; $lang_select .= "
\n"; return $lang_select; } // install the "countries_table.sql" first function create_country_menu($label) { $sql_countries = sprintf("SELECT iso, name FROM %s ORDER BY id", COUNTRY_TABLE); $res_countries = mysql_query($sql_countries); $menu = "\n"; $menu .= "
\n"; mysql_free_result($res_countries); return $menu; } function create_form_field($formelement, $label, $length = 25, $required = false, $disabled = false, $euro_date = false) { $form_field = "\n"; $form_field .= " $formelement) && !isset($_REQUEST[$formelement])) { $form_field .= ($euro_date) ? strftime("%d/%m/%Y", strtotime($this->$formelement)) : $this->$formelement; // this is row 110 } else { $form_field .= ""; } $form_field .= ($disabled) ? "\" disabled>" : "\">"; $form_field .= ($required) ? "*
\n" : "
\n"; return $form_field; } function create_text_area($text_field, $label) { $textarea = "\n"; $textarea .= "
\n"; return $textarea; } function save_profile_date($ident = "", $calle_part = "", $nro_part = "", $piso_part = "", $loc_part = "", $prov_part = "", $pais_part = "", $zip_part = "", $tel_part = "", $cel_part = "", $mail_part = "", $nombre_lab = "", $calle_lab = "", $nro_lab = "", $piso_lab = "", $loc_lab = "", $prov_lab = "", $pais_lab = "", $zip_lab = "", $tel_lab = "", $cel_lab = "", $mail_lab = "") { if ($_SESSION['is_rec']) { $sql = sprintf("UPDATE %s SET calle_part=%s, nro_part=%s, piso_part=%s, loc_part=%s, prov_part=%s, pais_part=%s, zip_part=%s, tel_part=%s, cel_part=%s, mail_part=%s, nombre_lab=%s, calle_lab=%s, nro_lab=%s, piso_lab=%s, loc_lab=%s, prov_lab=%s, pais_lab=%s, zip_lab=%s, tel_lab=%s, cel_lab=%s, mail_lab=%s WHERE id = %s AND users_id = %d", PROFILE_TABLE, $this->ins_string($calle_part), $this->ins_string($nro_part), $this->ins_string($piso_part), $this->ins_string($loc_part), $this->ins_string($prov_part), $this->ins_string($pais_part), $this->ins_string($zip_part), $this->ins_string($tel_part), $this->ins_string($cel_part), $this->ins_string($mail_part), $this->ins_string($nombre_lab), $this->ins_string($calle_lab), $this->ins_string($nro_lab), $this->ins_string($piso_lab), $this->ins_string($loc_lab), $this->ins_string($prov_lab), $this->ins_string($pais_lab), $this->ins_string($zip_lab), $this->ins_string($tel_lab), $this->ins_string($cel_lab), $this->ins_string($mail_lab), $this->ins_string($ident, "int"), $_SESSION['user_id']); } else { $sql = sprintf("INSERT INTO %s (id, users_id, calle_part, nro_part, piso_part, loc_part, prov_part, pais_part, zip_part, tel_part, cel_part, mail_part, nombre_lab, calle_lab, nro_lab, piso_lab, loc_lab, prov_lab, pais_lab, zip_lab, tel_lab, cel_lab, mail_lab) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", PROFILE_TABLE, $_SESSION['user_id'], $this->ins_string($calle_part), $this->ins_string($nro_part), $this->ins_string($piso_part), $this->ins_string($loc_part), $this->ins_string( $prov_part), $this->ins_string($pais_part), $this->ins_string($zip_part), $this->ins_string($tel_part), $this->ins_string($cel_part), $this->ins_string($mail_part), $this->ins_string($nombre_lab), $this->ins_string($calle_lab), $this->ins_string($nro_lab), $this->ins_string($piso_lab), $this->ins_string($loc_lab), $this->ins_string($prov_lab), $this->ins_string($pais_lab), $this->ins_string($zip_lab), $this->ins_string($tel_lab), $this->ins_string($cel_lab), $this->ins_string($mail_lab)); } if (mysql_query($sql) or die (mysql_error())) { $this->profile_id = (!$_SESSION['is_rec']) ? mysql_insert_id() : $ident; $this->the_msg = $this->extra_text(2); } else { $this->the_msg = $this->extra_text(3); } } function get_profile_data() { $this->get_user_info(); $_SESSION['user_id'] = $this->id; $sql = sprintf("SELECT id, calle_part, nro_part, piso_part, loc_part, prov_part, pais_part, zip_part, tel_part, cel_part, mail_part, nombre_lab, calle_lab, nro_lab, piso_lab, loc_lab, prov_lab, pais_lab, zip_lab, tel_lab, cel_lab, mail_lab FROM %s WHERE users_id = %d", PROFILE_TABLE, $this->id); $result = mysql_query($sql) or die (mysql_error()); if (mysql_num_rows($result) == 0) { $_SESSION['is_rec'] = false; $this->the_msg = $this->extra_text(1); } else { $_SESSION['is_rec'] = true; // this session acts like an extra controle while ($obj = mysql_fetch_object($result)) { $this->profile_id = $obj->id; $this->calle_part = $obj->calle_part; $this->nro_part = $obj->nro_part; $this->piso_part = $obj->piso_part; $this->loc_part = $obj->loc_part; $this->prov_part = $obj->prov_part; $this->pais_part = $obj->pais_part; $this->zip_part = $obj->zip_part; $this->tel_part = $obj->tel_part; $this->cel_part = $obj->cel_part; $this->mail_part = $obj->mail_part; $this->nombre_lab = $obj->nombre_lab; $this->calle_lab = $obj->calle_lab; $this->nro_lab = $obj->nro_lab; $this->piso_lab = $obj->piso_lab; $this->loc_lab = $obj->loc_lab; $this->prov_lab = $obj->prov_lab; $this->pais_lab = $obj->pais_lab; $this->zip_lab = $obj->zip_lab; $this->tel_lab = $obj->tel_lab; $this->cel_lab = $obj->cel_lab; $this->mail_lab = $obj->mail_lab; } } } } ?>registro/forgot_password.php0100644000113600011300000000271510503304030017340 0ustar sgap_admwebmastersforgot_password($_POST['email']); } $error = $renew_password->the_msg; ?> Forgot password page example

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


¿Olvidó su clave o usuario?

Por favor, ingrese la dirección de e-mail utilizada para registrarse.

">

 

Ingreso

registro/deny_access.php0100644000113600011300000000151110503304030016367 0ustar sgap_admwebmasters Access denied!

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Access denied!

It's not allowed to your account to view this site!

 

Main

registro/register.php0100644000113600011300000001314710503321236015752 0ustar sgap_admwebmasterslanguage = "de"; // use this selector to get messages in other languages if (isset($_POST['Submit'])) { // the confirm variable is new since ver. 1.84 // if you don't like the confirm feature use a copy of the password variable $new_member->register_user($_POST['n_doc'], $_POST['n_doc'], $_POST['n_doc'], $_POST['name'], $_POST['lastname'], $_POST['t_doc'], $_POST['n_doc'], $_POST['dia_nac'], $_POST['mes_nac'], $_POST['ano_nac'], $_POST['nac'], $_POST['last_login'], $_POST['email']); // the register method // $new_member->register_user($_POST['login'], $_POST['password'], $_POST['confirm'], $_POST['name'], $_POST['lastname'], $_POST['t_doc'], $_POST['n_doc'], $_POST['dia_nac'], $_POST['mes_nac'], $_POST['ano_nac'], $_POST['nac'], $_POST['carrera'], $_POST['last_login'], $_POST['email']); // the register method } $error = $new_member->the_msg; // error message ?> Base de Graduados - SEGB

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Registrese por favor:

Todos los campos deben estar completos para poder validar la cuenta .

">
">
">
DNI LE LC
">
"> (dd mm aaaa)
">

 

Ingreso

registro/login_local.php0100644000113600011300000000347510503304031016405 0ustar sgap_admwebmasterssave_login = (isset($_POST['remember'])) ? $_POST['remember'] : "no"; // use a cookie to remember the login $my_local_access->count_visit = true; // if this is true then the last visitdate is saved in the database $my_local_access->login_local($_POST['login'], $_POST['password']); // call the login method } $error = $my_local_access->the_msg; ?> Login page example

Login (with user's language settings):

Please enter your login and password.



is_cookie == true) ? " checked" : ""; ?>>

 

 

registro/base_inicio.php0100644000113600011300000000342210503304027016364 0ustar sgap_admwebmasterslogin_page = "login.php"; // change this only if your login is on another page $page_protect->access_page(); // only set this this method to protect your page $page_protect->get_user_info(); $hello_name = ($page_protect->user_name != "") ? $page_protect->user_name : $page_protect->user; if (isset($_GET['action']) && $_GET['action'] == "log_out") { $page_protect->log_out(); // the method to log off } ?> Base de graduados

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Hola

Usted está conectado a la base de graduados.

 

Cambie su clave o e-mail

Actualice su información de contacto

access_level >= DEFAULT_ADMIN_LEVEL) { // this link is only visible for admin level user ?>

Admin page (user / access level update)

Desconexión

registro/test_access_level.php0100644000113600011300000000225010503304031017600 0ustar sgap_admwebmastersaccess_page($_SERVER['PHP_SELF'], "", 5); // change this value to test differnet access levels (default: 1 = low and 10 high) if (isset($_GET['action']) && $_GET['action'] == "log_out") { $test_access_level->log_out(); // the method to log off } ?> Test page "access_user Class"

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


According the access level from your account it's allowed to view this page!

 

Click here to log out.

registro/update_user.php0100644000113600011300000000472410503304032016442 0ustar sgap_admwebmasterslanguage = "de"; // use this selector to get messages in other languages $update_member->access_page(); // protect this page too. $update_member->get_user_info(); // call this method to get all other information if (isset($_POST['Submit'])) { $update_member->update_user($_POST['password'], $_POST['confirm'], /*$_POST['name'], /*$_POST['last_login'], */$_POST['email']); // the update method } $error = $update_member->the_msg; // error message ?> Base de Graduados

Cambie su clave aqui:

Los campos con * son obligatorios.

user; ?>
" size="6"> * (min. 6 caracteres)
" size="6"> *

*


Volver a la página principal

registro/login.php0100644000113600011300000000432010503304031015221 0ustar sgap_admwebmasterslogin_reader(); // $my_access->language = "de"; // use this selector to get messages in other languages if (isset($_GET['activate']) && isset($_GET['ident'])) { // this two variables are required for activating/updating the account/password $my_access->auto_activation = false; // use this (true/false) to stop the automatic activation $my_access->activate_account($_GET['activate'], $_GET['ident']); // the activation method } if (isset($_GET['validate']) && isset($_GET['id'])) { // this two variables are required for activating/updating the new e-mail address $my_access->validate_email($_GET['validate'], $_GET['id']); // the validation method } if (isset($_POST['Submit'])) { $my_access->save_login = (isset($_POST['remember'])) ? $_POST['remember'] : "no"; // use a cookie to remember the login $my_access->count_visit = true; // if this is true then the last visitdate is saved in the database $my_access->login_user($_POST['login'], $_POST['password']); // call the login method } $error = $my_access->the_msg; ?> Base de Graduados - SEGB

Secretaría de Extensión, Graduados y Bienestar

Área de Graduados - base de graduados


Validación de e-mail: