-
Re: Phoenix CMS [UberEmu Compatible]
cfmail bro;
Code:
<cfmail
from="contact@*************.com"
to="#user.mail#"
subject="Habboon: Validate your email address"
server="smtp.googlemail.com"
username = "contact@*************.com"
password = "password"
port = "465"
useSSL = "yes"
type = "html">
<cfinclude template="/system/email/resend.htm">
</cfmail>
And the verification page;
Code:
<!-- Read config.ini settings & apply them -->
<cfset iniFile = expandPath("/config.ini")>
<cfset DSN = getProfileString(iniFile, "coldfusion", "DSN")>
<!-- Read config.ini settings & apply them -->
<cfquery name = "GrabUser" datasource = "#DSN#">
SELECT *
FROM users
WHERE mail = '#url.mail#'
LIMIT 1
</cfquery>
<cfif not GrabUser.recordcount>
<cfset StructClear(session)>
<cflocation url="/index.cfm" addtoken="no">
</cfif>
<cfif GrabUser.mail_verified is url.ver AND not url.ver is "0">
<cfquery name = "VerifyEmail" datasource = "#DSN#">
UPDATE users
SET mail_verified = "true"
WHERE mail = "#url.mail#"
</cfquery>
<cflocation url="/content/1-Home/settings.cfm?page=email&validated=true" addtoken="no">
</cfif>
<cflocation url="/index.cfm" addtoken="no">
-
Re: Phoenix CMS [UberEmu Compatible]
-
Re: Phoenix CMS [UberEmu Compatible]
I've gotta admit, I like the fact that CF is so alike to HTML, however, I just love the syntax of php.. Also, isn't there anyway of commenting
<!-- Read config.ini settings & apply them -->
so it isn't displayed in browser, for instance //in php.
-
Re: Phoenix CMS [UberEmu Compatible]
Uh I don't think so - they're just html comments - they don't need to be in there but I have a few scattered around, usually when I'm half asleep and need reminders of what I'm doing and what I'm up to lol.
I usually place comments in places so that if a page errors out I can view source and see where it got to before crashing - that way I can narrow down the source of the problem, for instance I do it with the login script;
Code:
<!-- Read config.ini settings & apply them -->
<cfset iniFile = expandPath("/config.ini")>
<cfset DSN = getProfileString(iniFile, "coldfusion", "DSN")>
<!-- Read config.ini settings & apply them -->
<!-- WHAT THE FUCK WHY ISN'T THIS SHIT WORKING?! -->
<cfif not isdefined('form.username') OR not isdefined('form.password') OR isdefined('url.session.account')>
<cflocation url="/mexico.cfm?error=fields" Addtoken="no">
</cfif>
<cfquery name = "userexists" datasource = "#DSN#">
SELECT *
FROM users
WHERE username = '#form.username#'
</cfquery>
<cfquery name = "mailexists" datasource = "#DSN#">
SELECT *
FROM users
WHERE mail = '#form.username#'
</cfquery>
<cfif not userexists.RecordCount AND not mailexists.RecordCount>
<cflocation url="/index.cfm?error=username" Addtoken="no">
</cfif>
<cfif not form.username is ""><!-- check for username in form -->
<cfif not form.password is ""><!-- check for password in form -->
<!-- Are we logging in with an email? -->
<cfif hash(form.password) is mailexists.password><!-- check if pass is right -->
<!-- set session username -->
<cfset session.account = #form.username#>
<cfquery name = "UpdateLastLogin" datasource = "#DSN#">
UPDATE users
SET last_online = UNIX_TIMESTAMP(), ip_last = '#CGI.REMOTE_ADDR#'
WHERE mail = '#form.username#'
</cfquery>
<cflocation url="/characters.cfm" Addtoken="no">
<!-- Are we logging in with an account name? -->
<cfelseif hash(form.password) is userexists.password><!-- check if pass is right -->
<!-- set session username -->
<cfquery name = "UpdateLastLogin" datasource = "#DSN#">
UPDATE users
SET last_online = UNIX_TIMESTAMP(), ip_last = '#CGI.REMOTE_ADDR#'
WHERE username = '#form.username#'
</cfquery>
<cfset session.account = #userexists.mail#>
<cfset session.username = #form.username#>
<cflocation url="/main.cfm" Addtoken="no">
<cfelse>
<cflocation url="/index.cfm?error=password" Addtoken="no">
</cfif>
<cfelse>
<cflocation url="/index.cfm?error=password" Addtoken="no">
</cfif>
<cfelse>
<cflocation url="/index.cfm?error=username" Addtoken="no">
</cfif>
Huh I need to fix that mexico link lol - looks like I was frustrated xD
-
Re: Phoenix CMS [UberEmu Compatible]
Quote:
Originally Posted by
Sojobo
Uh I don't think so - they're just html comments - they don't need to be in there but I have a few scattered around, usually when I'm half asleep and need reminders of what I'm doing and what I'm up to lol.
I usually place comments in places so that if a page errors out I can view source and see where it got to before crashing - that way I can narrow down the source of the problem, for instance I do it with the login script;
Code:
<!-- Read config.ini settings & apply them -->
<cfset iniFile = expandPath("/config.ini")>
<cfset DSN = getProfileString(iniFile, "coldfusion", "DSN")>
<!-- Read config.ini settings & apply them -->
<!-- WHAT THE FUCK WHY ISN'T THIS SHIT WORKING?! -->
<cfif not isdefined('form.username') OR not isdefined('form.password') OR isdefined('url.session.account')>
<cflocation url="/mexico.cfm?error=fields" Addtoken="no">
</cfif>
<cfquery name = "userexists" datasource = "#DSN#">
SELECT *
FROM users
WHERE username = '#form.username#'
</cfquery>
<cfquery name = "mailexists" datasource = "#DSN#">
SELECT *
FROM users
WHERE mail = '#form.username#'
</cfquery>
<cfif not userexists.RecordCount AND not mailexists.RecordCount>
<cflocation url="/index.cfm?error=username" Addtoken="no">
</cfif>
<cfif not form.username is ""><!-- check for username in form -->
<cfif not form.password is ""><!-- check for password in form -->
<!-- Are we logging in with an email? -->
<cfif hash(form.password) is mailexists.password><!-- check if pass is right -->
<!-- set session username -->
<cfset session.account = #form.username#>
<cfquery name = "UpdateLastLogin" datasource = "#DSN#">
UPDATE users
SET last_online = UNIX_TIMESTAMP(), ip_last = '#CGI.REMOTE_ADDR#'
WHERE mail = '#form.username#'
</cfquery>
<cflocation url="/characters.cfm" Addtoken="no">
<!-- Are we logging in with an account name? -->
<cfelseif hash(form.password) is userexists.password><!-- check if pass is right -->
<!-- set session username -->
<cfquery name = "UpdateLastLogin" datasource = "#DSN#">
UPDATE users
SET last_online = UNIX_TIMESTAMP(), ip_last = '#CGI.REMOTE_ADDR#'
WHERE username = '#form.username#'
</cfquery>
<cfset session.account = #userexists.mail#>
<cfset session.username = #form.username#>
<cflocation url="/main.cfm" Addtoken="no">
<cfelse>
<cflocation url="/index.cfm?error=password" Addtoken="no">
</cfif>
<cfelse>
<cflocation url="/index.cfm?error=password" Addtoken="no">
</cfif>
<cfelse>
<cflocation url="/index.cfm?error=username" Addtoken="no">
</cfif>
Huh I need to fix that mexico link lol - looks like I was frustrated xD
Haha, If I was you I would do some research into optimizing your query's... for instance, ALWAYS. I mean ALWAYS. Have ; at the of your querys.
for instance:
Code:
SELECT null FROM users WHERE id = 1 LIMIT 1;
Also, only grab what is needed, in this case, nothing is needed so we use NULL, i've also limited it to 1, because there can only be one row returned, but its nice to LIMIT 1, so the query doesn't keep looking for others with the ID of 1, which would save alot of time load with a large db..
I love mySQL. I'm extremely fluent in it, so ya.. Only one thing I hate to see people do is this...
Code:
id = SELECT id FROM users WHERE name = 'Pure' LIMIT 1;
SELECT user_group FROM groups WHERE id_user = id LIMIT 1;
You could easily do this via a dual query.. for instance.
Code:
SELECT
g.user_group
FROM
users AS u, groups AS g
WHERE
u.username = 'Pure' AND g.id_user = u.id
LIMIT 1;
I know thats a little oftopic, but I hope you're using the query right, from the looks of it your not but still, If you need any help.. PM me your msn and I will help you.
-
Re: Phoenix CMS [UberEmu Compatible]
Quote:
Originally Posted by
Pure
Haha, If I was you I would do some research into optimizing your query's... for instance, ALWAYS. I mean ALWAYS. Have ; at the of your querys.
for instance:
Code:
SELECT null FROM users WHERE id = 1 LIMIT 1;
Also, only grab what is needed, in this case, nothing is needed so we use NULL, i've also limited it to 1, because there can only be one row returned, but its nice to LIMIT 1, so the query doesn't keep looking for others with the ID of 1, which would save alot of time load with a large db..
I love mySQL. I'm extremely fluent in it, so ya.. Only one thing I hate to see people do is this...
Code:
id = SELECT id FROM users WHERE name = 'Pure' LIMIT 1;
SELECT user_group FROM groups WHERE id_user = id LIMIT 1;
You could easily do this via a dual query.. for instance.
Code:
SELECT
g.user_group
FROM
users AS u, groups AS g
WHERE
u.username = 'Pure' AND g.id_user = u.id
LIMIT 1;
I know thats a little oftopic, but I hope you're using the query right, from the looks of it your not but still, If you need any help.. PM me your msn and I will help you.
Yeah I use LIMIT 1 in most places, however there are some places in which I can't just limit 1. Although looking at that login page yeah it needs some fixing up.
Also I know that you can get fancy with SQL statements by merging multiple queries into one like that but I've not really got to grips with that yet - definitely something I'll be looking into in the future though
-
Re: Phoenix CMS [UberEmu Compatible]
Quote:
Originally Posted by
Sojobo
Yeah I use LIMIT 1 in most places, however there are some places in which I can't just limit 1. Although looking at that login page yeah it needs some fixing up.
Also I know that you can get fancy with SQL statements by merging multiple queries into one like that but I've not really got to grips with that yet - definitely something I'll be looking into in the future though
yeh, it isn't something you learn overnight, it takes time.. it took me a while, but I've got my head around it, and once you've learnt it you can merge like 4 tables if needs be.. haha.
-
Re: Phoenix CMS [UberEmu Compatible]
I'm probably going to be concentrating a lot on the actual emulator over the next few days now that the CMS has most of the core in place.
The main things that I still want to do for the CMS are;
- Housekeeping
- Home system
- Installer, including upgrading
- Might also do a mini-forum system
- Might attempt to finish my Habbo Imager that I started for HabboRP and implement it in this
That reminds me there is one more core feature I need to do - password recovery & resetting.
The housekeeping system will be using the same template design that I use for the HabboRP housekeeping and probably a lot of the same coding too;
http://img808.imageshack.us/img808/5...usekeeping.png
-
Re: Phoenix CMS [UberEmu Compatible]
Quote:
Originally Posted by
Sojobo
I'm probably going to be concentrating a lot on the actual emulator over the next few days now that the CMS has most of the core in place.
The main things that I still want to do for the CMS are;
- Housekeeping
- Home system
- Installer, including upgrading
- Might also do a mini-forum system
- Might attempt to finish my Habbo Imager that I started for HabboRP and implement it in this
That reminds me there is one more core feature I need to do - password recovery & resetting.
The housekeeping system will be using the same template design that I use for the HabboRP housekeeping and probably a lot of the same coding too;
http://img808.imageshack.us/img808/5...usekeeping.png
i love that housekeeping layout:thumbup:
-
Re: Phoenix CMS [UberEmu Compatible]
Yeah that housekeeping layout is simple & looks like Habbo's old housekeeping :)
-
Re: Phoenix CMS [UberEmu Compatible]
Quote:
Originally Posted by
Sojobo
I'm probably going to be concentrating a lot on the actual emulator over the next few days now that the CMS has most of the core in place.
The main things that I still want to do for the CMS are;
- Housekeeping
- Home system
- Installer, including upgrading
- Might also do a mini-forum system
- Might attempt to finish my Habbo Imager that I started for HabboRP and implement it in this
That reminds me there is one more core feature I need to do - password recovery & resetting.
The housekeeping system will be using the same template design that I use for the HabboRP housekeeping and probably a lot of the same coding too;
http://img808.imageshack.us/img808/5...usekeeping.png
Tha just look's, SEXY! Keep on going 'bruda.
-
Re: Phoenix CMS [UberEmu Compatible]
Wow, Sexy (: man Keep it up <3
-
Re: Phoenix CMS [UberEmu Compatible]
Excellent, have you took up a job in ColdFusion coding or coding of any sort? I think you would make a lot of money by selling ColdFusion websites.. you seem to be very good and have lots of skills!
-
Re: Phoenix CMS [UberEmu Compatible]
I cannot wait for this release any more! :D
It looks pretty awesome so far, hope it continues this way
-
Re: Phoenix CMS [UberEmu Compatible]
Can someone tell me why so much people like ColdFusion when its actually hard 2 setup & you'll need to buy an ColdFusion license or something like that o_O.
-
Re: Phoenix CMS [UberEmu Compatible]
The layout just calls to me, its so effective.
-
Re: Phoenix CMS [UberEmu Compatible]
Got bored so I started to work on a second theme, as you can see skinning the CMS is really easy - I made this in less than 5 minutes (as you can see it needs some touching up as some font is white where it needs to be black and vice versa), overall looking quite sleek for a quick mess around;
http://img683.imageshack.us/img683/9100/blackao.png
-
Re: Phoenix CMS [UberEmu Compatible]
lol you sure know how to design aaron
-
Re: Phoenix CMS [UberEmu Compatible]
Got bored waiting for some files to upload so I fixed it up somemore;
http://img148.imageshack.us/img148/7757/black2x.png
-
Re: Phoenix CMS [UberEmu Compatible]
i think i seen that before on habborp right? anyway it looks awesome how does it work? reads data from the database?
-
Re: Phoenix CMS [UberEmu Compatible]
nice work aaron liking it so far
-
Re: Phoenix CMS [UberEmu Compatible]
Oh the server stats? Yeah that's something I coded into RetroTopSites.com, it monitors all the retros that sign up to it and it monitors their users online.. I'm recreating RetroTopSites from scratch atm though so it's a blank site atm.. I've decided to write my own topsites script from scratch as I was bored of advaark and felt like a challenge.
-
Re: Phoenix CMS [UberEmu Compatible]
Hmm, That new style is more like an recolor though :P
-
Re: Phoenix CMS [UberEmu Compatible]
Quote:
Originally Posted by
PEjump2
Hmm, That new style is more like an recolor though :P
Pretty much, new background image and just some colour changes in the CSS file. Quick, simple, easy and effective! :)
-
Re: Phoenix CMS [UberEmu Compatible]
Wow Aaron Maybe u Could help me Im Coding a Flat file Cms For Hablux Rp v18
n I duno how To Do your Moving bar Thingys For the Workout