VIP Subscription System

09/17/2013 06:59 Super Aids#16
Also you don't need to call both Close() and Dispose() since Dispose() is already calling Close().

Also take a look at this:
[Only registered and activated users can see links. Click Here To Register...]
09/17/2013 11:21 atef201080#17
this is not the best way to do it,
you can just add one more column in entities table called VIPEndTime and do a small check in player login if the VIPEndTime grater than the actual time add the viplevel else reset the VIPLevel column to zero.
09/17/2013 13:35 _Emme_#18
Quote:
Originally Posted by atef201080 View Post
this is not the best way to do it,
you can just add one more column in entities table called VIPEndTime and do a small check in player login if the VIPEndTime grater than the actual time add the viplevel else reset the VIPLevel column to zero.
No..

Have a seperate table, that's correct. A good way to do it would be

id - user - type - end

Where 'type' is the VIP type, if you want to add different levels of it. To grab the VIP, simply do

Quote:
SELECT type, end FROM VIP WHERE user={The_Entity_UID}
To clear VIP field, perhaps once a day

Quote:
DELETE FROM VIP WHERE end > CURDATE()
To extend VIP time

Quote:
UPDATE VIP SET end = DATE_ADD(`end` , INTERVAL 30 DAY) WHERE user={The_Entity_UID}
09/17/2013 13:48 abdoumatrix#19
Quote:
Originally Posted by atef201080 View Post
this is not the best way to do it,
you can just add one more column in entities table called VIPEndTime and do a small check in player login if the VIPEndTime grater than the actual time add the viplevel else reset the VIPLevel column to zero.
why to add where there r codes could do the job

PHP Code:
if (DateTime.Now > client.VIPInformation.SuscribtionDate.AddDays(client.VIPInformation.Days))                      
                    {
                        
client.Send(new Conquer_Online_Server.Network.GamePackets.Message("Your VIP Suscribtion Has Expired", System.Drawing.Color.Red, Message.TopLeft));                   
                    
//    client.SendMessage("Your VIP Suscribtion Has Expired", Message.TopLeft);
                        
Database.VipTable.Delete(client.Entity.Name);
                    } 
09/19/2013 04:22 BahaaMedhat#20
TY Bro. Nice One
09/19/2013 04:58 Spirited#21
I've fixed the spelling error in the title of your thread.
"VIP Suscribtion System" -> "VIP Subscription System"
09/19/2013 05:09 shadowman123#22
Thx Fang for doing that ... anyways ill Improve the Upper codes and update the Thread ASAP .. but after i Finish Learning MYSQL .. i never throught its thats fun and very easy to learn
09/19/2013 05:18 Spirited#23
Quote:
Originally Posted by shadowman123 View Post
Thx Fang for doing that ... anyways ill Improve the Upper codes and update the Thread ASAP .. but after i Finish Learning MYSQL .. i never throught its thats fun and very easy to learn
MySQL is a very useful language to know in game programming and the software industry. If you're thinking about programming as a living (web, client, or server programming), you're on the right track. You should work on some programming language to go with it though. Maybe next you could work on improving your PHP or another high level programming language. If you go with C#, you could get some advice from the community (if they brighten up a bit).
09/19/2013 05:32 shadowman123#24
my goal ATM is Creating the server .. but my Real Life Goal is :-
- Become Professional in C# (im good at C# basics , Studied Sockets for while but havent gone Deep) ..

- Becoming Very Good in using MYSQL , NHiberate Databases (maybe subsonic but i didnt and i wont ever like it)

- Become Very Good At Reverse Engineering (Ollydb as Example)

Once i do those ..ill be Happiest Person in The world
Note : i studied PHP long while ago but havent liked it ... and what i studied was too basic beside that Creating Web Requires More than 1 Language PHP , CSS , HTML5 , Java Scripts , JQuery or w.e which is too much to learn .
09/19/2013 08:18 _Emme_#25
Quote:
Originally Posted by shadowman123 View Post
Once i do those ..ill be Happiest Person in The world
Note : i studied PHP long while ago but havent liked it ... and what i studied was too basic beside that Creating Web Requires More than 1 Language PHP , CSS , HTML5 , Java Scripts , JQuery or w.e which is too much to learn .
That is why you always team up with someone who does to front-end, and you focus on backend :D
09/19/2013 12:14 _DreadNought_#26
Quote:
Originally Posted by shadowman123 View Post
my goal ATM is Creating the server .. but my Real Life Goal is :-
- Become Professional in C# (im good at C# basics , Studied Sockets for while but havent gone Deep) ..

- Becoming Very Good in using MYSQL , NHiberate Databases (maybe subsonic but i didnt and i wont ever like it)

- Become Very Good At Reverse Engineering (Ollydb as Example)

Once i do those ..ill be Happiest Person in The world
Note : i studied PHP long while ago but havent liked it ... and what i studied was too basic beside that Creating Web Requires More than 1 Language PHP , CSS , HTML5 , Java Scripts , JQuery or w.e which is too much to learn .
Once you have learned your goals it will be years and years, but I admire your courage, it pays off.
09/19/2013 12:24 Super Aids#27
Quote:
Originally Posted by 'Emil View Post
That is why you always team up with someone who does to front-end, and you focus on backend :D
Not necessary. You can do it alone. I've done sites alone many times, it takes 1-3 weeks depending on the type of site. This is for less complex sites tho such as webshops, business websites etc.
09/19/2013 17:22 _Emme_#28
Quote:
Originally Posted by Super Aids View Post
Not necessary. You can do it alone. I've done sites alone many times, it takes 1-3 weeks depending on the type of site. This is for less complex sites tho such as webshops, business websites etc.
I've never, ever, met a real good programmer or developer in general that has produced something good when it comes to both design and functionality. There are designers who know how to code, sure, but the end result is not near as good as a real back-end programmer, same goes for the opposite.

When talking front-end, I generally mean everything the user will see, which include design, properly strucured html and valid CSS, responsive and of course SEO-friendly.

And I sure as hell hope you don't mean like setting up a WordPress theme with some lame web shop plugin or w/e it's called. I'm talking proper projects, not 1-3 weeks lol. :facepalm:
09/19/2013 20:16 _DreadNought_#29
Everybody has their speciality, you cannot be exactly equal, you prefer and/or are better at one or another.
09/19/2013 20:38 Super Aids#30
Quote:
Originally Posted by 'Emil View Post
I've never, ever, met a real good programmer or developer in general that has produced something good when it comes to both design and functionality. There are designers who know how to code, sure, but the end result is not near as good as a real back-end programmer, same goes for the opposite.

When talking front-end, I generally mean everything the user will see, which include design, properly strucured html and valid CSS, responsive and of course SEO-friendly.

And I sure as hell hope you don't mean like setting up a WordPress theme with some lame web shop plugin or w/e it's called. I'm talking proper projects, not 1-3 weeks lol. :facepalm:
LOL No. I've never used wordpress. I don't even use such thing, nor do I use PHP anyways. I'm using Ruby on rails, Python + Django and ASP.NET for web only, but anyways this is off topic talk. Stop assuming so much tho, just because you're not capable of doing both. You come off kinda like an ass with an attitude "I'm the best and only webdeveloperin this community."