Exemplo n.º 1
0
 $message = $filter->get('message');
 $from = ereg_replace('[^ 0-9a-zA-Z,@.]', '', $from);
 $to = ereg_replace('[^ 0-9a-zA-Z,@.]', '', $to);
 $to = str_replace(',', '', $to);
 $to = preg_replace('/\\s\\s+/', ' ', $to);
 $to = str_replace("\r", '', $to);
 $to = str_replace("\n", '', $to);
 $to = explode(' ', $to);
 if (!$to) {
     $data['msg'] = $lang['ajax.share_recipient'];
 } else {
     $emails = array();
     $users = array();
     $valid = new VValidation();
     foreach ($to as $key => $value) {
         if ($valid->email($value)) {
             $emails[] = $value;
         } elseif ($valid->usernameExists($value)) {
             $users[] = $value;
         }
     }
     if ($users) {
         $sql_add = array();
         foreach ($users as $user) {
             $sql_add[] = "'" . mysql_real_escape_string($user) . "'";
         }
         $sql = "SELECT email FROM signup WHERE username IN (" . implode(',', $sql_add) . ")";
         $rs = $conn->execute($sql);
         $users_emails = $rs->getrows();
         foreach ($users_emails as $user) {
             $emails[] = $user['email'];
Exemplo n.º 2
0
Arquivo: edit.php Projeto: ecr007/pr0n
 $school = $filter->get('school');
 $website = $filter->get('website');
 $country = $filter->get('country');
 $gender = $filter->get('gender');
 $relation = $filter->get('relation');
 $website = $filter->get('website');
 $password = $filter->get('password');
 $password_confirm = $filter->get('password_confirm');
 $video_viewed = $filter->get('video_viewed', 'INTEGER');
 $profile_viewed = $filter->get('profile_viewed', 'INTEGER');
 $watched_video = $filter->get('watched_video', 'INTEGER');
 $account_status = $filter->get('account_status');
 $emailverified = $filter->get('emailverified');
 if ($email == '') {
     $errors[] = 'Email field cannot be blank!';
 } elseif (!$valid->email($email)) {
     $errors[] = 'Email is not a valid email address!';
 } elseif ($valid->emailExists($email, $UID)) {
     $errors[] = 'Email is already used by another user!';
 }
 if ($password != '' && $password != $password_confirm) {
     $errors[] = 'Password and confirmation password are not the same!';
 }
 if ($_FILES['avatar']['tmp_name'] != '' && !$errors) {
     $imagesize = getimagesize($_FILES['avatar']['tmp_name']);
     if (!$imagesize) {
         $errors[] = 'Invalid image uploaded!';
     }
     if (!$errors) {
         $ext = '';
         if ($imagesize['2'] == 1) {
Exemplo n.º 3
0
 } elseif (strlen($admin_name) < 5) {
     $errors[] = 'Admin name (used for siteadmin login) must be at least 6 characters long!';
 }
 if ($admin_pass == '') {
     $errors[] = 'Admin pass (used for siteadmin login) cannot be blank!';
 } elseif (strlen($admin_pass) < 5) {
     $errors[] = 'Admin pass (used for siteadmin login) must be at least 6 characters long!';
 }
 if ($admin_email == '') {
     $errors[] = 'Admin email field cannot be blank!';
 } elseif (!VValidation::email($admin_email)) {
     $errors[] = 'Admin email field is not a valid email address!';
 }
 if ($noreply_email == '') {
     $errors[] = 'Noreply email field cannot be blank!';
 } elseif (!VValidation::email($noreply_email)) {
     $errors[] = 'Noreply email field is not a valid email address!';
 }
 if ($approve != '1' && $approve != '0') {
     $errors[] = 'Video approve field can only be yes/no!';
 }
 if ($downloads != '1' && $downloads != '0') {
     $errors[] = 'Video downloads field can only be yes/no!';
 }
 if ($captcha != '1' && $captcha != '0') {
     $errors[] = 'Signup captcha field can only be yes/no!';
 }
 if ($gzip_encoding != '1' && $gzip_encoding != '0') {
     $errors[] = 'GZIP Encoding field can only be yes/no!';
 }
 if ($videos_per_page == '' || $videos_per_page == '0') {