OC


Persoane

Rezultat"; $find=$_POST['valoare']; //If they did not enter a search term we give them an error if ($find == "") { echo "

Nu aţi introdus valoare

"; exit; } // Otherwise we connect to our Database //mysql_connect("mysql.yourhost.com", "user_name", "password") or die(mysql_error()); //mysql_select_db("database_name") or die(mysql_error()); include("dbconn.php"); // We preform a bit of filtering // $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); //Now we search for our search term, in the field the user specified if ($find == 'femei') { $data = mysqli_query("SELECT * FROM telefon WHERE gen='F' and activ=1 order by nume"); } else { $data = mysqli_query("SELECT * FROM telefon WHERE (nume LIKE '%$find%' OR prenume LIKE '%$find%') and activ=1 order by nume"); } $par=1; while ($sor = mysqli_fetch_array($data)) {/* if ($szin=="lightgrey") { $szin="white"; } else { $szin="lightgrey";bgcolor="" }*/ if ($par%2 == 1){ echo ' ';} else { echo ' '; } $par++; ?> "; echo $result['e_mail']; echo "
"; echo "
"; } //This counts the number or results - and if there wasn't any it gives them a little message explaining that $anymatches=mysql_num_rows($data); if ($anymatches == 0) { echo "

Ne pare rău, nu am găsit înregistrare cu nume introdus de d-voastră!



"; } //And we remind them what they searched for // echo "Searched For: " .$find; } else{ $max_row=10; $sql = "select count(id) as count from telefon where activ=1 order by nume, prenume;"; $result = mysql_query($sql); $row_count=mysql_fetch_assoc($result); $total_pages=ceil($row_count['count']/$max_row); //$szin = "lightgrey"; // $page=1; // $total_rows=0; //$num_page=0; if (isset($_GET['page']) and $_GET['page'] != '') { $cur_page = $_GET['page'];} else { $cur_page = 1; } $start_result = ($cur_page - 1) * $max_row; $sql="SELECT * FROM telefon WHERE activ=1 ORDER BY nume, prenume LIMIT $start_result, $max_row"; $result=mysql_query($sql); /* echo '
Pagina: ' . $cur_page . ' din ' . $total_pages . '

';*/ // Now if there is more than one page create the links for the other pages if ($total_pages > 1) { echo ' '; } // Then close the div for the page info echo '
'; $par=1; while ($sor = mysql_fetch_array($result)) {/* if ($szin=="lightgrey") { $szin="white"; } else { $szin="lightgrey";bgcolor="" }*/ if ($par%2 == 1){ echo ' ';} else { echo ' '; } $par++; ?>
Photo not available

 ' . $sor["dr"] . ' ' . $sor["nume"] .' ' . $sor["prenume"] . '
Functia: ' . $sor["functia"] .'
Departament: ' . $sor["departament"] .'
Telefon: (+4)0264-584037, int ' . $sor["nr_tel"] . '
Fax: (+4)0264-420042
Birou: '. $sor["birou"] .'
'; $mail=substr($sor["e_mail"],0,strpos($sor["e_mail"],"@")); if ($sor["e_mail"] != "") { echo 'E-mail: ' . $mail . '@itim-cj.ro
'; }; if ($sor["webpage"] != "") { echo 'Webpage: '. $sor["webpage"] .''; }; echo'

 ' . $sor["dr"] . ' ' . $sor["nume"] .' ' . $sor["prenume"] . '
Functia: ' . $sor["functia"] .'
Departament: ' . $sor["departament"] .'
Telefon: (+4)0264-584037, int ' . $sor["nr_tel"] . '
Fax: (+4)0264-420042
Birou: '. $sor["birou"] .'
'; $mail=substr($sor["e_mail"],0,strpos($sor["e_mail"],"@")); if ($sor["e_mail"] != "") { echo 'E-mail: ' . $mail . '@itim-cj.ro
'; }; if ($sor["webpage"] != "") { echo 'Webpage: '. $sor["webpage"] .''; }; echo'

Photo not available
Photo not available

 ' . $sor["dr"] . ' ' . $sor["nume"] .' ' . $sor["prenume"] . '
Functia: ' . $sor["functia"] .'
Departament: ' . $sor["departament"] .'
Telefon: (+4)0264-584037, int ' . $sor["nr_tel"] . '
Fax: (+4)0264-420042
Birou: '. $sor["birou"] .'
'; $mail=substr($sor["e_mail"],0,strpos($sor["e_mail"],"@")); if ($sor["e_mail"] != "") { echo 'E-mail: ' . $mail . '@itim-cj.ro
'; }; if ($sor["webpage"] != "") { echo 'Webpage: '. $sor["webpage"] .''; }; echo'

 ' . $sor["dr"] . ' ' . $sor["nume"] .' ' . $sor["prenume"] . '
Functia: ' . $sor["functia"] .'
Departament: ' . $sor["departament"] .'
Telefon: (+4)0264-584037, int ' . $sor["nr_tel"] . '
Fax: (+4)0264-420042
Birou: '. $sor["birou"] .'
'; $mail=substr($sor["e_mail"],0,strpos($sor["e_mail"],"@")); if ($sor["e_mail"] != "") { echo 'E-mail: ' . $mail . '@itim-cj.ro
'; }; if ($sor["webpage"] != "") { echo 'Webpage: '. $sor["webpage"] .''; }; echo'

Photo not available