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
 IP change in the list of countries
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Maxime
Average Member

France
521 Posts

Posted - 22 November 2014 :  04:26:15  Show Profile  Visit Maxime's Homepage  Reply with Quote
Hello,

I'm looking for a way to change IP for countries in the display of the country because for me it is Saudi Arabia, while I am in France, which is registered each time when I change things in my profile. If someone could create a page for it that would be nice.

Mod here: http://www.snitzbitz.com/mods/details.asp?Version=All&mid=335

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)


Edited by - Maxime on 22 November 2014 04:36:14

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 22 November 2014 :  14:41:00  Show Profile
What is your IP (go to "whatismyip.com" to verify)? Your forum IP address is: 178.248.213.79 - which, according to the IPtoCountry database is in France....

Edited by - Carefree on 22 November 2014 14:46:38
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 23 November 2014 :  03:01:11  Show Profile  Visit Maxime's Homepage
Here is my ip address and if there was an administration page to correct IP database it would be good for the mod. I sent you an email with the IP address

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 November 2014 :  05:46:36  Show Profile  Visit HuwR's Homepage
The IP logged against you here also says France according to the IP Mod data

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 23 November 2014 :  08:14:19  Show Profile
quote:
Originally posted by Maxime

I sent you an email with the IP address

I didn't get any EMail from you.
quote:
if there was an administration page to correct IP database it would be good for the mod

OK, I agree with that. I'll write one. I wrote one.

Here you go:

"admin_iptocountry.asp"

<%
'################################################################################
'## Snitz Forums 2000 v3.4.07
'################################################################################
'## Copyright (C) 2000-14 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##	
'## This program is free software; you can redistribute it and/or modify it
'## under the terms of the GNU General Public License as published by the Free
'## Software Foundation; version 2 (or later) of the License.
'## 
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the outputted HTML.  The "powered by" text/logo with
'## a link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the Internet or intranet.
'##	
'## This program is distributed in the hope that it will be useful, WITHOUT
'## ANY WARRANTY (even the implied warranty of MERCHANTABILITY or FITNESS FOR A
'## PARTICULAR PURPOSE.  See the GNU General Public License for more details.
'##	
'## You should have received a copy of the GNU General Public License along
'## with this program; if not, write to the Free Software Foundation, Inc.;
'## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##	
'## Support can be obtained from our support forums at:	http://forum.snitz.com
'##	
'## Send correspondence or marketing questions to: manderson@snitz.com
'##	
'################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<%
If Session(strCookieURL & "Approval") <> "15916941253" Then
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
End If
Response.Write	"<table border=""0"" width=""100%"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"		<td width=""33%"" align=""Left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
	"		" & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
	"		" & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""admin_home.asp"">Admin Section</a><br />" & vbNewLine & _
	"		" & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " IP to Country<br /></font></td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table><br />" & vbNewLine & _
	"<form action=""admin_iptocountry.asp"" method=""post"">" & vbNewLine & _
	"	<table align=""center"" width=""50%"" border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
	"		<tr>" & vbNewLine & _
	"			<td align=""center"" width=""100%"">" & vbNewLine & _
	"				<table align=""center"" width=""100%"" style=""border-collapse:collapse;"" bgColor=""" & strTableBorderColor & """ border=""1"" cellpadding=""4"" cellspacing=""1"">" & vbNewLine & _
	"					<tr valign=""middle"">" & vbNewLine & _
	"						<td align=""center"" colspan=""2"" width=""100%"" bgColor=""" & strCategoryCellColor & """>" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ color=""" & strCategoryFontColor & """ size=""" & strHeaderFontSize+1 & """><b>IP to Country Editor</b></font>" & vbNewLine & _
	"						</td>" & vbNewLine & _
	"					</tr>" & vbNewLine & _
	"					<tr valign=""middle"">" & vbNewLine & _
	"						<td align=""right"" width=""50%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """><b>IP Address: </b></font>" & vbNewLine & _
	"						</td>" & vbNewLine & _
	"						<td align=""left"" width=""50%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
	"							<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
	"								<input type=""text"" style=""width:95%; background:lightblue; color:navy; text-align:center; font-weight:bold;"" maxlength=""20"" name=""search"" value=""" & Request.Form("search") & """ />" & vbNewLine & _
	"							</font>" & vbNewLine & _
	"						</td>" & vbNewLine & _
	"					</tr>" & vbNewLine
If len(Request.Form("search")) > 7 Then
	strLead="00"
	strK=""
	strIP = Request.Form("search")
	If len(strIP) < 15 Then
		For i = 1 to len(strIP)
			If mid(strIP,i,1)="." Then
				intPeriod=intPeriod+1
				strPart=right(strLead+strK,3)
				If intPeriod=1 Then
					strPart1=strPart
					strK=""
				ElseIf intPeriod=2 Then
					strPart2=strPart
					strK=""
				ElseIf intPeriod=3 Then
					strPart3=strPart
					strK=""
					strPart4=mid(strIP,i+1)
					Exit For
				End If
			Else
				strK=strK+mid(strIP,i,1)
			End If
		Next
	End If
	strPart=strPart1+"."+strPart2+"."+strPart3+"."+right(strLead+strPart4,3)
	If len(strIP)<5 Then strPart="000.000.000.000"
	strSql="SELECT * FROM " & strTablePrefix & "IPTOCOUNTRY WHERE IPSTART <= '" & strPart & "' AND IPEND >= '" & strPart & "'"
	Set rsLocale= my_Conn.Execute(strSql)
	If NOT (rsLocale.BOF or rsLocale.EOF) Then
		strLocale=rsLocale("IPCOUNTRY")
		strStart =rsLocale("IPSTART")
		strEnd   =rsLocale("IPEND")
		intIPID  =rsLocale("IPID")
		rsLocale.Close
		Response.Write	"					<tr valign=""middle"">" & vbNewLine & _
			"						<td align=""right"" width=""50%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
			"							<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """><b>Country: </b></font>" & vbNewLine & _
			"						</td>" & vbNewLine & _
			"						<td align=""left"" width=""50%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
			"							<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
			"								<input type=""text"" style=""width:95%; background:lightblue; color:navy; text-align:center; font-weight:bold;"" maxlength=""100"" name=""country"" value=""" & strLocale & """ />" & vbNewLine & _
			"							</font>" & vbNewLine & _
			"						</td>" & vbNewLine & _
			"					</tr>" & vbNewLine
	End If
	Set rsLocale = Nothing
	If len(Request.Form("country")) > 0 Then
		strSql = "UPDATE " & strTablePrefix & "IPTOCOUNTRY SET IPCOUNTRY='" & Request.Form("country") & "' WHERE IPID=" & intIPID
		my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
		Response.Redirect	"admin_iptocountry.asp"
	End If
End If
Response.Write	"				</table>" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"		</tr>" & vbNewLine & _
	"		<tr valign=""top"">" & vbNewLine & _
	"			<td align=""center"" colspan=""2"" bgColor=""" & strPageBGColor & """ width=""100%"">" & vbNewLine & _
	"				<input style=""color:" & strCategoryFontColor & "; font-weight:bold; padding:5px 10px 5px 10px; border:1px solid " & strTableBorderColor & "; text-shadow:0px 1px 1px #000; text-decoration none; border-radius:25px; -moz-border-radius:25px; -webkit-border-radius:25px; background:" & strCategoryCellColor & ";"" type=""Submit"" class=""button2"" name=""Submit"" value=""Submit"" />" & vbNewLine & _
	"			</td>" & vbNewLine & _
	"		</tr>" & vbNewLine & _
	"	</table>" & vbNewLine & _
	"</form><br />" & vbNewLine
WriteFooter
%>



Edited by - Carefree on 24 November 2014 17:00:47
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 26 November 2014 :  05:13:05  Show Profile  Visit Maxime's Homepage
Hello Carefree,

I have this error when I put the IP:
ADODB.Recordset error '800a0cc1'

Can not find the object in the collection corresponding to the name or ordinal reference requested.

/admin_iptocountry.asp, line 101

Bizarre for sending email I used for the forum and the box told me that it had been sent.

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 November 2014 :  11:21:20  Show Profile
Forgot to include that change to the dbs file, it's fixed on Snitzbitz. Here's a simple fix so you don't have to re-download.

"admin_ip2c.asp"


<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
strSql = "ALTER TABLE " & strTablePrefix & "IPTOCOUNTRY ADD IPID INT IDENTITY"
my_Conn.Execute(strSql)
Response.Redirect "admin_home.asp"
%>
Go to Top of Page

Maxime
Average Member

France
521 Posts

Posted - 15 December 2014 :  02:34:30  Show Profile  Visit Maxime's Homepage
Hello Carefree,
I installed your page, but there was a change of IP fields. I wish I could modier the beginning and ending IP of a country and this is not the case with the code you've written.
And I always when I go to edit my profile Saudi Arabia, which is displayed instead of France.

Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)

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