Fix up for current browser...
This commit is contained in:
14
requestTarget.php
Normal file → Executable file
14
requestTarget.php
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
error_reporting(0);
|
||||
#error_reporting('E_ALL');
|
||||
|
||||
@@ -11,6 +11,7 @@ $db=$GLOBALS['conf_dbname'];
|
||||
$basePath=$GLOBALS['conf_basePath'];
|
||||
$mapPath=$GLOBALS['conf_mapPath'];
|
||||
|
||||
|
||||
function myMail($to,$subject,$message){
|
||||
$fromAddr=$GLOBALS['conf_mailAddress'];
|
||||
$headers = 'From: <' . $fromAddr . ">\r\n" .
|
||||
@@ -34,7 +35,7 @@ function writeToFile($filename,$text){
|
||||
$cmd="mkdir -p \"$(dirname \"" . $filename . "\")\"";
|
||||
system($cmd);
|
||||
|
||||
$fp=fopen($filename,'w') or die("Can't open file");
|
||||
$fp=fopen($filename,'w') or die ("Can't open file _" . $filename . "_" );
|
||||
fwrite($fp,$text);
|
||||
fclose($fp);
|
||||
}
|
||||
@@ -111,7 +112,7 @@ function getUserInfo($dh){
|
||||
// returns the filename.
|
||||
// filePKey must be null for new records
|
||||
function getFileNameAndPKey($dh,$filePKey,$description){
|
||||
if ($filePKey=="") {
|
||||
if ($filePKey=="null") {
|
||||
$isNew=true;
|
||||
$filePKey=getNewPKey($dh);
|
||||
$fileName=$_SESSION["UserPKey"] . "/" . $filePKey; // TODO - should include the user
|
||||
@@ -273,8 +274,13 @@ function logInUser($dh,$mail,$password,$isSetupAutoLogin,$loginToken){
|
||||
$query="Select count(*) \"count\",max(user.pkey) \"userPKey\" from user, userOptin where userOptin.userPKey=user.PKey and userOptin.confirmed='1' and user.mail=" . $dh->quote($mail) . " and user.password=" . $dh->quote($password);
|
||||
}
|
||||
|
||||
|
||||
$result=$dh->query($query) ;
|
||||
$row=$result->fetch();
|
||||
try {
|
||||
$row=$result->fetch();
|
||||
} catch (Exception $ex) {
|
||||
echo "EX:" . $ex->getMessage();
|
||||
}
|
||||
if ($row['count']==1) {
|
||||
$success="true";
|
||||
$_SESSION['UserPKey']=$row['userPKey'];
|
||||
|
||||
Reference in New Issue
Block a user