View file script/pass.php

File size: 1.89Kb
<?php
/*-----------------------------------------------------------------------------------------
mcGalleryPRO
All code is © 2003 Marc Cagninacci.
No files may be redistributed in whole or significant part.
----------------- mcgalleryPRO IS NOT FREE SOFTWARE -------------------
You should have receive a file called license.txt in this package
--------------------------------------------------------------------------------------------*/

session_start();
if (empty($lang)) $lang = $lang_def;
include './admin/conf.inc.php';
include './lang/'.$lang;

if ($valid == 'OK')
{
$connect= mysql_connect($host,$login,$pass);
mysql_select_db($base, $connect);
$query="SELECT password, login FROM mcgallery_members WHERE email='$private_email'";
$res=mysql_query($query);
         if (mysql_num_rows($res) != 0)
         {
         $row=mysql_fetch_row($res);
           if ($mail_function == 1)
           {
            email("gallery",$private_email,"mcGallery","$l_Login: $row[1]\n$l_Password: $row[0]");
           }
           else
           {
            mail("$private_email", "mcGallery", "$l_Login: $row[1]\n$l_Pass: $row[0]", "From: $email_admin");
           }
         header ("location:index.php?r=ok");
         }
         else
         {
         header ("location:index.php?r=err");
         }
}
   echo '<form method="post" action="pass.php">';
   echo '<table border="0" cellspacing="1" cellpadding="2" width="300">';
   echo '<tr><td class="td0" align="center"><font size="2">'.$l_Perdu.'</font></td></tr>';
   echo '<tr><td class="td2" align="right"><font size="2">'.$l_Email_pass.':</font>&nbsp;<input type="text" name ="private_email" size="20">&nbsp;</td></tr>';
   echo '<tr><td class="td1" align="center"><input type="submit" value="OK" name="valid"></td></tr>';
    echo '<tr><td class="td0">&nbsp;</td></tr>';
  echo '</table></form>';
   echo '</td></tr></table>';

?>