<?php include 'db.php'; session_start(); require 'clearDataFunctions.php'; if (isset($_POST['email'])) { $email = $_POST['email']; customUnset($email); } if (isset($_POST['password'])) { $password = $_POST['password']; customUnset($password); } clearString($email); clearString($password); $password = md5($password); //md5 hashing $result = mysqli_query($link, "SELECT * FROM user_profile WHERE email='{$email}'"); $myrow = mysqli_fetch_array($result); if ($myrow['password'] == $password) { $_SESSION['fname'] = $myrow['fname']; $_SESSION['lname'] = $myrow['lname']; $_SESSION['email'] = $myrow['email']; $_SESSION['id'] = $myrow['id']; } header('Location: index.php');
function nouns_from_wiki($str) { // Create stream (constructer) $stream_context = stream_context_create(array('http' => array('method' => 'GET', 'header' => 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'))); // Get html data using http, URL encode $wiki_data = file_get_contents(WIKIPEDIA_API_URL . '/' . urldecode($str), false, $stream_context); // encode raw data $wiki_data_encode = mb_detect_encoding($wiki_data); // text tag if (preg_match('/<text(.*?)<\\/text>/s', mb_convert_encoding($wiki_data, 'UTF-8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS'), $result)) { $text = $result[0]; $noun = exec('echo "' . $text . '"| mecab | grep "名詞" | cut -f 1| sort | uniq -c | sort -n', $ma); // Only Japanese $tmp_array = clearString($ma); return $tmp_array; } else { // page not found $noun = exec('echo "' . $str . '"| mecab | grep "名詞" | cut -f 1 | sort | uniq -c | sort -n', $ma); $tmp_array = clearString($ma); return $tmp_array; } }
?> " /> <div align="left" id="divContentGrid" name="divContentGrid" > <?php //style="height:100%; margin-left:8px; margin-top:8px; overflow:auto; width:100%;" Get_Formulario($_SESSION["usuario"], $pCodCaratula, $pNroExpediente, $pNroCarpeta, $ptipoJuicio); ?> </div> <!--------------------------------------------------------------------------------------------> <div align="left" id="divContentGrid" name="divContentGrid" > <?php if ($_POST) { if (ValidarCampos($pCodCaratula, $pNroExpediente, $pNroCarpeta, $ptipoJuicio)) { echo getGrid(clearString($pidUsuario), clearString($pCodCaratula), clearNumber($pNroExpediente), clearNumber($pNroCarpeta), clearNumber($ptipoJuicio)); } else { echo "<h4 style='color: #FF0000;' >Los valores para algunos Campos son incorrectos<h4>"; } echo "<a href='" . $_SERVER['HTTP_REFERER'] . "'><input class='btnVolver' type='button' value=''></a>"; } ?> </div> <!--------------------------------------------------------------------------------------------> <div align="center" id="divProcesando" name="divProcesando" style="display:none"><img border="0" src="/images/waiting.gif" title="Espere por favor..."></div> <script type="text/javascript"> function CopyContent() { try { window.parent.document.getElementById('divContent').inner = document.getElementById('divContent').inner; } catch(err) {
$password_confirm = $_POST['password_confirm']; customUnset($password_confirm); } if (isset($_POST['fname'])) { $fname = $_POST['fname']; customUnset($fname); } if (isset($_POST['lname'])) { $lname = $_POST['lname']; customUnset($lname); } clearString($fname); clearString($lname); clearString($password); clearString($password_confirm); clearString($email); $resultSel = mysqli_query($link, "SELECT id FROM user_profile WHERE email='{$email}'"); $myrow = mysqli_fetch_array($resultSel); if (!empty($myrow['id'])) { exit("Извините, введённый вами логин уже зарегистрирован. Введите другой логин."); } $date = getdate(date("U")); $dateStr = $date[mday] . '/' . $date[mon] . '/' . $date[year]; $password = md5($password); $resultIns = mysqli_query($link, "INSERT INTO user_profile (email,password,fname,lname,registration_date, status) VALUES('{$email}','{$password}','{$fname}','{$lname}','{$dateStr}', 0)"); if ($resultIns != 'TRUE') { echo mysqli_error($link); } /* $title = 'title'; $mess = "msg"; $to = '*****@*****.**';
function getSeo($text) { $utf8table = array("á" => "a", "ä" => "a", "č" => "c", "ď" => "d", "é" => "e", "ě" => "e", "í" => "i", "ľ" => "l", "ĺ" => "l", "ň" => "n", "ó" => "o", "ö" => "o", "ő" => "o", "ô" => "o", "ř" => "r", "ŕ" => "r", "š" => "s", "ť" => "t", "ú" => "u", "ů" => "u", "ü" => "u", "ű" => "u", "ý" => "y", "ž" => "z", "Á" => "A", "Ä" => "A", "Č" => "C", "Ď" => "D", "É" => "E", "Ě" => "E", "Í" => "I", "Ľ" => "L", "Ĺ" => "L", "Ň" => "N", "Ó" => "O", "Ö" => "O", "Ő" => "O", "Ô" => "O", "Ř" => "R", "Ŕ" => "R", "Š" => "S", "Ť" => "T", "Ú" => "U", "Ů" => "U", "Ü" => "U", "Ű" => "U", "Ý" => "Y", "Ž" => "Z"); $text = strtolower(strtr($text, $utf8table)); return clearString($text); }
function ValidarAlfaNum($text) { $result = clearString($text); return $result == $text; }