0) { $items = file($database); foreach($items as $line) { list($username, $password, $email, $name, $active) = explode('|', trim($line)); if ($username == $_POST['username'] && $active != "0" && $password == $crypt_pass) { $found = true; $fullname = $name; } } } if($found == false) { header('Location: '.$error_page); exit; } else { session_start(); $_SESSION['username'] = $_POST['username']; $_SESSION['fullname'] = $fullname; $rememberme = isset($_POST['rememberme']) ? true : false; if ($rememberme) { setcookie('username', $_POST['username'], time() + 3600*24*30); setcookie('password', $_POST['password'], time() + 3600*24*30); } header('Location: '.$success_page); exit; } } $username = isset($_COOKIE['username']) ? $_COOKIE['username'] : ''; $password = isset($_COOKIE['password']) ? $_COOKIE['password'] : ''; ?> "; } $prefix = rand(111111, 999999); $i = 0; while (list ($key, $val) = each ($_FILES)) { if ($_FILES[$key]['name'] != "" and file_exists($_FILES[$key]['tmp_name']) and $_FILES[$key]['size'] > 0) { $upload_DstName[$i] = $prefix . "_" . str_replace(" ", "_", $_FILES[$key]['name']); $upload_SrcName[$i] = $_FILES[$key]['name']; $upload_Size[$i] = ($_FILES[$key]['size']); $upload_Temp[$i] = ($_FILES[$key]['tmp_name']); $upload_Type[$i] = ($_FILES[$key]['type']); $uploadlink[$i] = "$upload_folder/$upload_DstName[$i]"; $upload_fieldname[$i] = $key; $upload_fieldname_final[$i] = ucwords(str_replace("_", " ", $key)); $fieldvalue[$i] = $uploadlink[$i]; $i++; } if ($upload_Size[$i] >= $max_filesize) { $error .= "The size of $key (file: $upload_SrcName[$i]) is bigger than the allowed " . $max_filesize/1024 . " Kbytes!\n"; } } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "##error##"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $uploadfolder = basename($upload_folder); for ($i = 0; $i < count($upload_DstName); $i++) { $uploadFile = $uploadfolder . "/" . $upload_DstName[$i]; if (!is_dir(dirname($uploadFile))) { RecursiveMkdir(dirname($uploadFile)); } else { chmod(dirname($uploadFile), 0777); } move_uploaded_file($upload_Temp[$i] , $uploadFile); chmod($uploadFile, 0644); } $internalfields = array ("submit", "reset", "send", "captcha_code"); $message .= $eol; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } if (count($upload_SrcName) > 0) { $message .= "\nThe following files have been uploaded:\n"; for ($i = 0; $i < count($upload_SrcName); $i++) { $message .= $upload_SrcName[$i] . " Link: " . $uploadlink[$i] . "\n"; } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=iso-8859-1'.$eol; $body .= 'Content-Transfer-Encoding: 8bit'.$eol; $body .= $eol.stripslashes($message).$eol; $body .= '--'.$boundary.'--'.$eol; mail($mailto, $subject, $body, $header); header('Location: '.$success_url); exit; } ?> This page was created with an illegal version of WYSIWYG Web Builder!
Institute of Polymeric Materials
IPM
IPM
Copyright 2010 by ipm web master    All Rights reserved    E-Mail: z_aghaeifar@sut.ac.ir
Contact us
Institute of Polymeric Materials

Sahand University of Technology
Sahand New Town, Tabriz, East Azarbaijan, Iran.

Excellent
Very Good
Good
Poor
Comments:
Website Survey form
Search in google for:
Log In
User Name:
Password:
 Remember me
 
Forgot your password?
Email:
 
Sign up for a new account
Full Name:
User Name:
Password:
Confirm Password:
E-mail:
 
Home  | SUT  |  Site map |