'; echo 'window.parent.document.getElementById("res").innerHTML="'.$out.'";'; echo ''; } if (isset($_POST['prior5']) && $_POST['prior5']=='Safe'){ $target_path = "/home/camdpams_www/WhiteListing/uploads/"; $file_nm=basename( $_FILES['userfile']['name']); $target_path = $target_path . $file_nm; if(move_uploaded_file($_FILES['userfile']['tmp_name'],$target_path)){ $lines = file($target_path); $login = $_SESSION['login']; $sql = "select \"UserId\" from \"WhiteListing\".\"Users\" where \"Login\" ='$login'"; $usrquery = odbc_exec($db_conn,$sql); $usrid = odbc_result($usrquery, "UserId"); foreach ($lines as $line_num => $line) { $sql1 = "Select \"WhiteListing\".add_sate($usrid, 3, '".trim($line)."',5)"; $tmp = odbc_exec($db_conn,$sql1); } sendtext('Complete'); // sendtext($usrid); } } else{ $target_path = "/home/camdpams_www/WhiteListing/uploads/"; $file_nm=basename( $_FILES['userfile']['name']); $target_path = $target_path . $file_nm; if(move_uploaded_file($_FILES['userfile']['tmp_name'],$target_path)){ $lines = file($target_path); $login = $_SESSION['login']; $sql = "select \"UserId\" from \"WhiteListing\".\"Users\" where \"Login\" ='$login'"; $usrquery = odbc_exec($db_conn,$sql); $usrid = odbc_result($usrquery, "UserId"); foreach ($lines as $line_num => $line) { $sql1 = "Select \"WhiteListing\".add_sate($usrid, 1, '".trim($line)."',5)"; $tmp = odbc_exec($db_conn,$sql1); } sendtext('Complete'); } } ?>