Gossamer Forum
Home : Products : DBMan : Installation :

log off problem

Quote Reply
log off problem
Hi there everyone. I was hoping DBMan could help me make a database without giving my non-programmer mind too many headaches and everything was going great until I tested it out.
Everything works fine except that when I try to log off I am redirected back to the Gossamer HP. Anyone know what I have to change to get it working smoothly? I turned on the debug routine and it said there was a problem with the db.cgi script. I'm sure this makes sense to someone! Please...
Quote Reply
Re: [Teazle] log off problem In reply to
Hi,

Please check the below variable in the default.cfg file
and replace the http://www.yoursite.com with your site
$auth_logoff = "http://www.yoursite.com/";

hope this helps

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] log off problem In reply to
Thanks for the tip. I actually found out the problem myself, soon after writing this plea for help, but thanks for taking the time to reply. Appreciated!
Now I have a different problem! My script works great now, but I wanted to add image upload capabilities and so tried to add a MOD (Multiple File Upload). I followed the readme to the letter, but I got a little confused when it explained how to make the images actually print in the 'sub html_record' section. The readme advised to simply add the code where I wanted the images to print out...does this mean within html tags and/or do I have to include the $rec{'Field Name'} tag first?I have included a section to show you what I have done (obviously in error!):

sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.
#($db_auto_generate and print &build_html_record(%rec) and return);

$rec{$db_key} =~ s/<.?B>//g;

print qq|
<table width="550" cellpadding=3 cellspacing=0 border=1 bgcolor="#DDEBC3" bordercolor="#999999">
<tr bgcolor="#99CC33" align="left">
<td valign="TOP" colspan="5"><$font>Model ID: $rec{'ModelID'}</td>
</tr>
<tr>
<td align="Right" valign="TOP" width="115" bgcolor="#FFFFFF"><$font>First
Name:</td>
<td valign="TOP" width="111" bgcolor="#F8FFDC">&nbsp;$rec{'First Name'}</td>
<td align="Right" valign="TOP" width="113" bgcolor="#FFFFFF"><$font>Age:</td>
<td valign="TOP" width="101" bgcolor="#F8FFDC">$rec{'Age'}&nbsp;</td>
<td valign="TOP" rowspan="9" bgcolor="#FFFFFF" width="100">

if (-e &quot;$SAVE_DIRECTORY/$rec{$db_key}&quot;)
{
opendir (GRAPHIC, &quot;$SAVE_DIRECTORY/$rec{$db_key}&quot;) or &amp;cgierr(&quot;unable
to open directory: $SAVE_DIRECTORY/$rec{$db_key}. Reason: $!&quot;);
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
foreach $file (@files) {
next if ($file =~ /^\./); # Skip &quot;.&quot; and &quot;..&quot; entries..
next if ($file =~ /^index/); # Skip index.htm type files..
print qq|&lt;img src= &quot;$SAVE_DIRECTORY_URL/$rec{$db_key}/$file&quot;&gt;|;
}
}

</td>
</tr>
<tr>
<td valign="TOP" width="115" bgcolor="#FFFFFF" align="right"><$font>Last Name:</td>
Code:

Can you help me again? thank you...
Quote Reply
Re: [Teazle] log off problem In reply to
hi,

you don't need to inlcude the $rec{'Field Name'} tag. The sub html_record seems to be fine. What error have you got?

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [Teazle] log off problem In reply to
You need to close the print statement prior to:

<td valign="TOP" rowspan="9" bgcolor="#FFFFFF" width="100">
|; ### add this

if (-e &quot;$SAVE_DIRECTORY/$rec{$db_key}&quot;)
{
opendir (GRAPHIC, &quot;$SAVE_DIRECTORY/$rec{$db_key}&quot;) or &amp;cgierr(&quot;unable
to open directory: $SAVE_DIRECTORY/$rec{$db_key}. Reason: $!&quot;);
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
foreach $file (@files) {
next if ($file =~ /^\./); # Skip &quot;.&quot; and &quot;..&quot; entries..
next if ($file =~ /^index/); # Skip index.htm type files..
print qq|&lt;img src= &quot;$SAVE_DIRECTORY_URL/$rec{$db_key}/$file&quot;&gt;|;
}
}

and then here restart the printing with:

print qq|</td>

Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] log off problem In reply to
You might not want all those &quot; in there Cool
Quote Reply
Re: [LoisC] log off problem In reply to
Thanks! It worked! After days of clenched fists and gritted teeth, it finally works. Marvellous...you really do know what you're talking about. I can't thank you enough.Smile