Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Help! Links Manager Version 2
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

rick7165
Senior Member

USA
1094 Posts

Posted - 16 May 2001 :  11:26:47  Show Profile  Visit rick7165's Homepage
I've added this code so it would email me if someone submitted a Link. It
worked a couple of times and now has stopped working and I've not changed
a thing. When I approve a Link it sends me to login after login if I go
back to approve it just keeps sending me to login.

Here is the links_add_url.asp files:

The bold is what I've added.

<%
'---------------------------------------------------------------------------------------
'Description : Links Manager Mod for Snitz Forum 3.1 sr 4
'Author : Originally link Manager 4 by Ezebox (www.ezebox.com)
' Edited and implemented for snitz forum by frankie
' Re-worked by Alan Le (alanle2000@hotmail.com)
'---------------------------------------------------------------------------------------
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->

<%
cat = Request.Form("cat")
name = Request.Form("name")
URL = Request.Form("url")
key = Request.Form("key")
Description = Request.Form("des")
Email = Request.Form("mail")
today = datetostr(Now())
banner = Request.Form("banner")

strSQL = "SELECT CAT_ID FROM LINKS_SUBCATEGORIES WHERE SUBCAT_ID = " & cat
dim rsCategories
set rsCategories = server.CreateObject("adodb.recordset")
rsCategories.Open strSQL, my_Conn
parent = rsCategories("CAT_ID")
rsCategories.Close
set rsCategories = nothing

if banner = "http://" then banner = ""
sString = ""

if len(trim(name)) = 0 then
sString = sString & "<li>Please enter website title.</li>"
end if

if len(trim(URL)) = 7 then
sString = sString & "<li>Please enter Link URL.</li>"
else
Set RS=Server.CreateObject("ADODB.Recordset")

strSql="Select URL from links where URL='" & URL & "'"
RS.Open strSql, my_Conn

if not rs.eof then
sString = sString & "<li>This Url already exists in our database.</li>"
end if
RS.close
end if

if cat = "--Please select one--" then
sString = sString & "<li>Please select category that match your website.</li>"
end if

'if len(trim(key)) = 0 then
' sString = sString & "<li>Please enter keywords.</li>"
'end if

if len(trim(Description)) = 0 then
sString = sString & "<li>Please enter website description.</li>"
end if

if len(trim(Email)) = 0 then
sString = sString & "<li>You must give an email address.</li>"
end if

if EmailField(Email) = 0 then
Err_Msg = Err_Msg & "<li>You Must enter a valid email address.</li>"
end if

if sString = "" then

strSQL = "insert into links (name, url, keyword, category, description, email, banner_url, post_date, parent_ID, show, badlink)"
strSQL = strSQL & " values"
strSql = strSQL & "('" & chkString(name, "SQLString") & "', '" & url & "', '" & chkString(key, "SQLString") & "', '" & cat & "', '" & chkString(description, "SQLString") & "', '" & chkString(email, "SQLString") & "', '" & banner & "', '" & today & "', '" & parent & "', 0, 0)"
my_Conn.Execute (strSQL)

Body = "A new link has arrived for you to approve."
Body = Body & vbCrLf & "go to http://www.yourdomain.com/forums/admin_links_main.asp to approve."

Set Mailer = Server.CreateObject("CDONTS.NewMail")
Mailer.To = "links@yourdomain.com"
Mailer.From = "links@yourdomain.com"
Mailer.Subject = "New link to approve"
Mailer.Body = Body

Mailer.Send
Set Mailer = nothing

%>

<head>
<meta http-equiv="Refresh" content="5; URL=links.asp">
</head>

<center>
 <font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">Your site has been accepted for review.<br>
Please wait 1-3 days for your site to be reviewed and added.</font>
<table border=0 cellpadding=0 cellspacing=0 valign=top align=center width=95%>
<tr>
<td valign=top>
<table bgcolor="<% =strTableBorderColor %>" border="0" cellpadding="0" cellspacing="1" width="95%" ALIGN=CENTER height=200 valign=top>
<tr>
<td bgcolor="<% =strForumCellColor %>" valign="middle" width=100%>
<table border="0" cellpadding="4" cellspacing="0" width="60%" align="center">
<tr>
<td valign=top width=30%>
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Name:</font></b> 
</td>
<td valign=top align=left width=70%>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><%Response.write name %></font>
</td>
</tr>
<tr>
<td valign=top>
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">URL:</font></b> 
</td>
<td valign=top align=left>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><% Response.write URL %></font>
</td>
</tr>
<tr>
<td valign=top>
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Keywords:</font></b> 
</td>
<td valign=top align=left>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><% Response.write key %></font>
</td>
</tr>
<tr>
<td valign=top>
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Email:</font></b> 
</td>
<td valign=top align=left>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><% Response.write Email %></font>
</td>
</tr>
<tr>
<td valign=top colspan=2>
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Description:</font></b> 
</td>
</tr>
<tr>
<td valign=top colspan=2>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"><% Response.write Description %></font>
</td>
</tr>
<% if banner <> "" then%>
<tr>
<td valign=top colspan=2>
<b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>">Banner:</font></b> 
</td>
</tr>
<tr>
<td valign=top colspan=2>
<img src=<% Response.write banner %> border=0>
</td>
</tr>
<% end if %>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p><a href="links.asp"><font face="<%= strDefaultFontFace %>" size="<%= strDefaultFontSize %>">Back to Links Categories</font> </a></p>
</center>
<%else%>

<table border=0 cellpadding=0 cellspacing=0 valign=top align=center width=95%>
<tr>
<td valign=top>
<table bgcolor="<% =strTableBorderColor %>" border="0" cellpadding="0" cellspacing="1" width="95%" ALIGN=CENTER height=200 valign=top>
<tr>
<td bgcolor="<% =strForumCellColor %>" valign="middle" width=100%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign=top align=center>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There Was A Problem.</font></p>
<table align="center" border="0">
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<ul>
<% =sString %>
</ul>
</font></td>
</tr>
</table>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Go Back To Enter Data</a></font></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%end if%>
<br>
<!--#INCLUDE FILE="inc_footer.asp" -->



Test Site
www.eastpasco.com
HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser.

Aznknight
Senior Member

USA
1373 Posts

Posted - 16 May 2001 :  18:16:19  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
i have no idea since this is not default to the links manager. If it's keep sending you back to the admin_login page then that means this mod or one of the other mod is inferring or not using the admin session variable correctly.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

philboze
Starting Member

12 Posts

Posted - 18 May 2001 :  05:47:23  Show Profile
Help!

when I try to do the setup for the Links MOD, I get several errors as shown below:
-------------------
Snitz Links Manager Version 2

Creating table(s)...
CREATE TABLE LINKS_CATEGORIES( CAT_ID COUNTER CONSTRAINT Primary , CAT_NAME text (100) NULL )
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition.

--------------------------------------------------------------------------------

Creating table(s)...
CREATE TABLE LINKS_SUBCATEGORIES( SUBCAT_ID COUNTER CONSTRAINT Primary , SUBCAT_NAME text (100) NULL , CAT_ID int NULL )
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition.

--------------------------------------------------------------------------------

Creating table(s)...
CREATE TABLE LINKS( LINK_ID COUNTER CONSTRAINT Primary , NAME text (100) NULL , URL text (100) NULL , KEYWORD text (255) NULL , DESCRIPTION text (255) NULL , EMAIL text (100) NULL , POST_DATE text (50) NULL , BANNER_URL text (100) NULL , HIT int NULL DEFAULT 0, CATEGORY int NULL , PARENT_ID int NULL , SHOW int NULL , BADLINK int NULL )
-2147217900 | [Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition.

-------------------------------

I'm using NT4 Server (SP6a) with IIS4 and Acess 97. Do I need Acess 2000 or SQL?

Any help is greatly appreicated....I know my users will like this Links MOD very much, if only I can get it working...

philboze@hotmail.com

Go to Top of Page

gemini
Starting Member

2 Posts

Posted - 20 May 2001 :  00:52:13  Show Profile
I also get the same problem when attempting to approve an added link. It just takes me to the admin login page.

I am using the files right from the MOD zip. The only thing I changed was the mailing information (so that it comes from me instead of from IAMVIET).
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 20 May 2001 :  08:54:10  Show Profile  Visit rick7165's Homepage
It looks simple because it's just code to email, but for some reason it must be hard to figure out because nobody can tell me how to fix it.

Test Site
www.eastpasco.com
HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser.
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 20 May 2001 :  18:26:10  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
sorry no time to look into this right now. my pardons for forgetting that the email was still saying @iamviet.com. I'm on quite a tight schedule but when i get a chance i'll look.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

stupidity
Starting Member

United Kingdom
49 Posts

Posted - 03 June 2001 :  17:35:47  Show Profile  Visit stupidity's Homepage
quote:
I also get the same problem when attempting to approve an added link. It just takes me to the admin login page.

I am using the files right from the MOD zip. The only thing I changed was the mailing information (so that it comes from me instead of from IAMVIET).



Just done the same changed, the mailing information from IAMVIET to my own site address and now when I try to approve a link it send me back to admin login (repeatedly)

Anyone else who had the problem managed to change it back to normal? or as a thankyou to Alan do we have to send everyone who posts their site in the links manager to IAMVIET just joking honest

Weird I re-installed the origional files (admin_links_main.asp & admin_links_approve.asp) changed to JMail from CDONTs and everything works the emails come from the correct domain even though I left IAMVIET etc. in place

Edited by - stupidity on 03 June 2001 18:22:38
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 04 June 2001 :  14:05:01  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
that's pretty wierd that it's just sending you guys back to the admin_login page when you try to approve. Was all that you changed were these 2 lines?


strFrom = "links@iamviet.com"
strFromName = "IAMVIET"


- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

stupidity
Starting Member

United Kingdom
49 Posts

Posted - 05 June 2001 :  11:38:12  Show Profile  Visit stupidity's Homepage
quote:

that's pretty wierd that it's just sending you guys back to the admin_login page when you try to approve. Was all that you changed were these 2 lines?


strFrom = "links@iamviet.com"
strFromName = "IAMVIET"


- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource



That's all I did don't know about anyone else though, like I said in my previous post once I re-installed the 2 files in question and changed to JMAIL everything worked fine even though I left IAMVIET etc in place

Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 05 June 2001 :  13:10:07  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
wierd must be something else then because change those two lines should not affect anything else and make it send you back to admin_login.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

stupidity
Starting Member

United Kingdom
49 Posts

Posted - 15 June 2001 :  07:12:27  Show Profile  Visit stupidity's Homepage
quote:

wierd must be something else then because change those two lines should not affect anything else and make it send you back to admin_login.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource



Found the problem, it just happened again after I changed part of the email message I kept being sent back to the admin login page. I used FrontPage 2k and it must of made some change to the code (which I haven’t found) as soon as I used a different editor on the original file and re-uploaded it everything went back to normal.

Might be worth mentioning in the readme file in the zip


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07