[PHP-DB] Files stored in mysql

2005-08-17 Thread Vincent Lape
I need some advise on how to handle some pfd files. We have sales guys out
in the field and generally need to access client reports regularly. I was
thinking about making a dir for each rep, subdir for each client and posting
the pfd files there. 

After the reps auth from the login page I call an iframe depending on the
user:
?php if($row_get_user['username'] ==rep1) print 'iframe id=User
name=Userss src=repdata/rep1/dlist.php width=100% height=100%
scrolling=AUTO frameborder=1 marginwidth=0
marginheight=0/iframe'; ?

?php if($row_get_user['username'] ==rep2) print 'iframe id=User
name=Userss src=repdata/rep2/dlist.php width=100% height=100%
scrolling=AUTO frameborder=1 marginwidth=0
marginheight=0/iframe'; ?

This is going to be a pain later when we get all the guys stuff online. The
iframe calls dlist.php which will display all the data in a directory. 

There has got to be a better way to handle this. How would I go about
storing the pdf files in mysql and printing all the files in a nice linked
table do onclick of filename it will open the pfd file to read?

Any help would be greatly appreciated.

P.S. sorry about the read request in my last post

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Getting error with IE

2005-08-16 Thread Vincent Lape
I am getting an error with IE when I load the page
https://doctors.cardiactelecom.com
Line: 6
Char: 1
Error: Object Expected
Code: 0

[CODE]
?php require_once('Connections/mysql.php'); ?
?php
// *** Validate request to login to this site.
session_start();

$loginFormAction=$_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
  $GLOBALS['PrevUrl'] = $accesscheck;
  session_register('PrevUrl');
}
[/CODE]

Any help would be appreciated

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Getting error with IE

2005-08-16 Thread Vincent Lape
?php require_once('Connections/mysql.php'); ?
?php
// *** Validate request to login to this site.
session_start();

$loginFormAction=$_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
  $GLOBALS['PrevUrl'] = $accesscheck;
  session_register('PrevUrl');
}

if (isset($_POST['UserID'])) {
  $loginUsername=$_POST['UserID'];
  $password=$_POST['Passwd'];
  $MM_fldUserAuthorization = isauth;
  $MM_redirectLoginSuccess = ctc/index2.php;
  $MM_redirectLoginFailed = login_error.php;
  $MM_redirecttoReferrer = false;
  mysql_select_db($database_mysql, $mysql);

  $LoginRS__query=sprintf(SELECT username, password, isauth FROM webauth
WHERE username='%s' AND password='%s',
  get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername),
get_magic_quotes_gpc() ? $password : addslashes($password)); 
   
  $LoginRS = mysql_query($LoginRS__query, $mysql) or die(mysql_error());
  $loginFoundUser = mysql_num_rows($LoginRS);
  if ($loginFoundUser) {

$loginStrGroup  = mysql_result($LoginRS,0,'isauth');

//declare two session variables and assign them
$GLOBALS['MM_Username'] = $loginUsername;
$GLOBALS['MM_UserGroup'] = $loginStrGroup;

//register the session variables
session_register(MM_Username);
session_register(MM_UserGroup);

if (isset($_SESSION['PrevUrl'])  false) {
  $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];  
}
header(Location:  . $MM_redirectLoginSuccess );
  }
  else {
header(Location: . $MM_redirectLoginFailed );
  }
}
?
html
head
titleCardiac Telecom Patient Information Login/title
link REL=stylesheet TYPE=text/css
HREF=file:///C|/Documents%20and%20Settings/vlape/My%20Documents/site_templa
te/Webadmin/WinCss.css
/HEAD
BODY bgcolor=#FF onLoad=RunMe();

table width=90% border=0 cellspacing=0 cellpadding=3
align=center
  tr
td
  center
a href=index.phpimg src=content/logo.gif width=199
height=60 border=0/a
form ACTION=?php echo $loginFormAction; ? method=POST
name=LoginForm
  table width=63 border=0 cellspacing=0 cellpadding=3
align=center
tr 
  tdfont color=8F9CBCbfont
size=2Username:/font/b/fontbr
input type=text name=UserID class=txtbox
  /td
/tr
tr 
  tdfont color=8F9CBCbfont
size=2Password:/font/b/fontbr
input type=password name=Passwd class=txtbox
  /td
/tr
tr 
  td 
input type=image src=content/signin.gif width=64
height=18 name=image
  /td
/tr
  /table
/form
 
  /center

/td
  /tr
/table
div align=centerfont size=1br
  a href=http://www.cardiactelecom.com; target=_blankbr
  Copyright copy; Cardiac Telecom Corporation /a/font/div
/BODY
/HTML

 -- 
Vincent Lape
Systems Administrator, Cardiac Telecom Corporation.
 -Original Message-
 From: Bastien Koert [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 16, 2005 5:04 PM
 To: [EMAIL PROTECTED]; php-db@lists.php.net
 Subject: RE: [PHP-DB] Getting error with IE
 
 Its a js error, post the complete page code/ js code for the page
 
 bastien
 
 
 From: Vincent Lape [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: php-db@lists.php.net
 Subject: [PHP-DB] Getting error with IE
 Date: Tue, 16 Aug 2005 16:59:11 -0400
 
 I am getting an error with IE when I load the page
 https://doctors.cardiactelecom.com
 Line: 6
 Char: 1
 Error: Object Expected
 Code: 0
 
 [CODE]
 ?php require_once('Connections/mysql.php'); ?
 ?php
 // *** Validate request to login to this site.
 session_start();
 
 $loginFormAction=$_SERVER['PHP_SELF'];
 if (isset($accesscheck)) {
$GLOBALS['PrevUrl'] = $accesscheck;
session_register('PrevUrl');
 }
 [/CODE]
 
 Any help would be appreciated
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Getting error with IE [[ SOLVED ]]

2005-08-16 Thread Vincent Lape
Thanks, the problem is solved. I forgot to remove an old ref to some
JavaScript I decided not to use. Funny what a fresh set of eyes will do for
something one has been staring at for hours :)

Thanks again,

Vinny

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php