Go Back   PvP-Kenti > 1351 Paylaşımları > 1351 Prosedürler / Kodlar

1351 Prosedürler / Kodlar

Forum Reklamları
468x60

Cevapla
 
LinkBack Seçenekler Stil
Alt 02-09-2010, 22:37   #1 (permalink)
Bağımlı Üye

 
pamir90 - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Jul 2010
Yaş: 21
Mesajlar: 250
Oyun Parası: $26890
Teşekkür : 19
9 Konusuna 343 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 12
pamir90 has much to be proud ofpamir90 has much to be proud ofpamir90 has much to be proud ofpamir90 has much to be proud ofpamir90 has much to be proud ofpamir90 has much to be proud ofpamir90 has much to be proud ofpamir90 has much to be proud of
Post [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Alıntı:
Reallizt Nickli Üyeden Alıntı Mesajı göster
Herkez genellikle UPDATE procedurunu kullanir ama bu etkisiz bir procedur oldugundan dolayi biz LOAD procedurunu kullanicaz.
Kod:
ALTER PROCEDURE [dbo].[LOAD_PREMIUM_SERVICE_USER] 
    @AccountID varchar(21),
    @type int output, 
    @days int output 
AS 
BEGIN 
    DECLARE @PremiumExpire datetime
    SELECT @PremiumExpire = PremiumExpire FROM TB_USER WHERE strAccountID = @AccountID
    SET @days = DateDiff(dd, getDate(), @PremiumExpire)
    SET @type = 1
    IF @days <= 0 or @@ERROR <> 0 or @days is null
    BEGIN
        SET @type = 0
        SET @days = 0
    END
    RETURN 
END
Kod:
ALTER PROCEDURE [dbo].[UPDATE_PREMIUM_SERVICE_USER] 
    @AccountID varchar(21),
    @d24 datetime
AS
Evet.
Kullanis sekili su sekilde.

Update TB_USER Set PremiumExpire = Getdate()+3 where StrAccountID = ' '

Getdate()+3 ün Oldugu yerde günleri ayarlamaktayiz Straccount bölümü ise Premium u eklemek istediginiz hesap.


Diyelim herkeze premium eklemek istiyorsunuz yapicaginiz tek sey

UPDATE TB_USER SET PREMIUMEXPIRE = Getdate()+3
Gün Silmiyorsa !
Bu Konuda Gizli Link Mevcut Cevap yazdikdan sonra mesaji görebilirsiniz. İçerigi Görmek İçin Cevap Yazın Cevaplarınız Kurallara Uygun Olsun Lütfen



Notice: This Ad only show to guest, please register now to disappear !
__________________
1351 Dß Editlemeye Başladım
pamir90 isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Teşekkür edenler:
-b0Ni (07-05-2011), aBouT (28-11-2010), actionsee (04-02-2011), Alger (22-10-2010), aragon (19-02-2011), ByHasan_01 (12-09-2010), casper543 (24-09-2010), cli0gt (08-10-2010), cosmus (31-01-2011), crayTic (07-05-2011), DandyRich (07-02-2011), dibi (19-04-2011), didyou (07-09-2010), FireProoF (24-04-2011), GameMod (08-06-2011), gicikin (01-01-2012), HomekoKentii (20-11-2011), hwaniii (27-10-2010), Hymenoptera (24-10-2010), JeToN (06-04-2011), KeLepChe (26-11-2010), KinKong (10-11-2010), koray_10 (02-01-2011), KroniqWaqaa (27-10-2010), kubi753 (05-06-2011), kurtkral (26-02-2011), l3ladeMaster (04-07-2011), liveans (23-06-2011), m0l0t0v (18-08-2011), MacR0 (20-02-2011), macxx (27-05-2011), manoka (12-10-2011), MepistoOfDewiL (01-10-2010), mustafatopka (17-09-2010), Nightmare (30-01-2012), NoBodyNoPerfect (10-12-2010), NoX (04-02-2012), PandemoniumKO (19-08-2011), PuNisHeR (02-09-2010), rahipkral624 (23-09-2010), rodrigo23 (01-06-2011), slayrevenge (22-05-2011), timefinished (24-10-2010), Tryagain (01-12-2010), ufaqlik (17-07-2011), wiston31 (07-05-2011), xero4ever (13-12-2010), İlLeqaL (09-01-2011)
Sponsored Links


Alt 19-09-2010, 04:58   #2 (permalink)
Gelişmiş Üye
 
lepos - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Dec 2009
Yaş: 25
Mesajlar: 87
Oyun Parası: $3500
Teşekkür : 11
14 Konusuna 39 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 13
lepos has much to be proud oflepos has much to be proud oflepos has much to be proud oflepos has much to be proud oflepos has much to be proud oflepos has much to be proud oflepos has much to be proud oflepos has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Teşekkürler



Notice: This Ad only show to guest, please register now to disappear !
lepos isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 09-10-2010, 13:45   #3 (permalink)
Gelişmiş Üye
 
Dante - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Apr 2010
Mesajlar: 53
Oyun Parası: $500
Teşekkür : 3
Bu saat içinde 1 teşekkür aldı.
P-K Puan: 0
Tecrübe Puanı: 12
Dante has much to be proud ofDante has much to be proud ofDante has much to be proud ofDante has much to be proud ofDante has much to be proud ofDante has much to be proud ofDante has much to be proud ofDante has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Teşekkürler



Notice: This Ad only show to guest, please register now to disappear !
Dante isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 09-10-2010, 18:36   #4 (permalink)
Kıdemli Üye
 
bycem12 - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Dec 2009
Yaş: 19
Mesajlar: 752
Oyun Parası: $142992
Teşekkür : 12
8 Konusuna 10 teşekkür almış
P-K Puan: 5
Tecrübe Puanı: 13
bycem12 has much to be proud ofbycem12 has much to be proud ofbycem12 has much to be proud ofbycem12 has much to be proud ofbycem12 has much to be proud ofbycem12 has much to be proud ofbycem12 has much to be proud ofbycem12 has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Teşekkürler kardeş



Notice: This Ad only show to guest, please register now to disappear !
bycem12 isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 09-10-2010, 19:56   #5 (permalink)
Banned
 
LastChaoS - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Oct 2010
Bulunduğu Yer: İstanBuL
Yaş: 20
Mesajlar: 1.000
Oyun Parası: $500
Teşekkür : 149
89 Konusuna 991 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 13
LastChaoS has much to be proud ofLastChaoS has much to be proud ofLastChaoS has much to be proud ofLastChaoS has much to be proud ofLastChaoS has much to be proud ofLastChaoS has much to be proud ofLastChaoS has much to be proud ofLastChaoS has much to be proud of
LastChaoS - MSN üzeri Mesaj gönder
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Paylaşım için teşşekürler.



Notice: This Ad only show to guest, please register now to disappear !
LastChaoS isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 09-10-2010, 20:24   #6 (permalink)
Banned

 
EveryBodyFooL - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Nov 2009
Bulunduğu Yer: C:\WINDOWS\system32
Yaş: 16
Mesajlar: 863
Oyun Parası: $212374
Teşekkür : 125
133 Konusuna 1.618 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 13
EveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Kod:
CREATE PROCEDURE [dbo].[LOAD_PREMIUM_SERVICE_USER] 
	@AccountID varchar(21),
	@type int output, 
	@days int output 
AS 
BEGIN 
	-- Declare the variable @PremiumExpire (the date when the premium service expires)
	DECLARE @PremiumExpire datetime

	-- Retrieve the date the premium service expires
	SELECT @PremiumExpire = PremiumExpire FROM TB_USER WHERE strAccountID = @AccountID
	-- Set the number of days left to
	-- the day difference between the current time 
	-- and the date the premium service expires
	SET @days = DateDiff(dd, getDate(), @PremiumExpire)

	-- Set @type to 1 as its a required output variable
	-- and there appear to be no ways to have silver/gold etc
	SET @type = 1

	-- If the days are 0
	-- or there's some error
	-- or the day count for whatever reason is empty/null
	IF @days <= 0 or @@ERROR <> 0 or @days is null
	BEGIN
		-- House cleaning:
		-- Setting the two below variables to 0 just in case.
		SET @type = 0
		SET @days = 0
	END
	RETURN 
END 


GO
Kod:
CREATE PROCEDURE [dbo].[UPDATE_PREMIUM_SERVICE_USER] 
	@AccountID varchar(21),
	@d24 datetime
AS 

GO
Kod:
CREATE PROCEDURE [dbo].[Premium]
    @strAccountID varchar(50),
    @strUserID varchar(50),
    @days int
AS
-- Declarations.
DECLARE @currentDays int, @lastDate datetime, @dateDiff int
BEGIN
    -- If the day field is null/empty or 0 (why would we add 0 days, that's just silly!)
    IF @days IS NULL or @days = 0
    BEGIN
        -- Default the days added to 30.
        SET @days = 30
    END

    -- If the account name isn't null/empty and not equal to ''
    IF @strAccountID IS NOT NULL AND @strAccountID <> ''
    BEGIN
        -- Get the current premium expire time
        SELECT @lastDate = PremiumExpire FROM TB_USER WHERE strAccountID = @strAccountID
        
         -- How many days differ between now and the last premium expire date
        SET @dateDiff = DateDiff(dd, getDate(), @lastDate)

        -- Check if the last premium expire date is null/empty or
        -- the days between now and the last premium expire date is below or equal to 0
        IF @lastDate IS NULL or @dateDiff <= 0
        BEGIN
             -- We default the last premium expire date to now
            -- Otherwise if they had existing premium
            -- Say a month ago, it'd give them up
            -- until now, and still be "behind" the current time.
            SET @lastDate = getDate()
        END
         -- Update the premium date            
         UPDATE TB_USER SET PremiumExpire = DateAdd(dd, @days, @lastDate) WHERE strAccountID = @strAccountID
    END
    -- Now we check if the character name is being used :P
    ELSE IF @strUserID IS NOT NULL AND @strUserID <> ''
    BEGIN
        -- Get the account ID from ACCOUNT_CHAR
        SET @strAccountID = (SELECT strAccountID FROM [KN_World]..[ACCOUNT_CHAR] WHERE strCharID1 = @strUserID or strCharID2 = @strUserID or strCharID3 = @strUserID)
        SELECT @lastDate = PremiumExpire FROM TB_USER WHERE strAccountID = @strAccountID
        SET @dateDiff = DateDiff(dd, getDate(), @lastDate)
        IF @lastDate IS NULL or @dateDiff <= 0
        BEGIN
             SET @lastDate = getDate()
        END
         UPDATE TB_USER SET PremiumExpire = DateAdd(dd, @days, @lastDate) WHERE strAccountID = @strAccountID
    END        
     ELSE
    BEGIN
        PRINT 'You must specify an account ID (1) or character (2) to use this procedure.'
    END
END
GO
Kod:
ALTER TABLE TB_USER ADD PremiumExpire datetime
Defauld Value Columü = (getdate()) Olması Gerek
Pre Vermek İçin Exec Premium_ver 'AccountID','Karakter ID','Gün'

Bide Bu Var Kimin Oldugunu Bilmiyorum Kullandıgım Bişey Bu Usko Eski Sürümündeki Gibi Day Tipinde Çalışır Oyundada Premiumun İçinde Kaç Gün Kaldıgını Yazar Day Tipinde Pre Bitince Oyundada Gözümez Premium Var Falan Filan işte



Notice: This Ad only show to guest, please register now to disappear !

Konu EveryBodyFooL tarafından (09-10-2010 Saat 20:27 ) değiştirilmiştir.
EveryBodyFooL isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 09-10-2010, 20:57   #7 (permalink)
Bağımlı Üye


 
rahipkral624 - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Nov 2009
Bulunduğu Yer: Elazığ
Yaş: 21
Mesajlar: 218
Oyun Parası: $176310
Teşekkür : 235
15 Konusuna 16 teşekkür almış
P-K Puan: 10
Tecrübe Puanı: 13
rahipkral624 has much to be proud ofrahipkral624 has much to be proud ofrahipkral624 has much to be proud ofrahipkral624 has much to be proud ofrahipkral624 has much to be proud ofrahipkral624 has much to be proud ofrahipkral624 has much to be proud ofrahipkral624 has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Paylaşım İçin Teşekkürler.



Notice: This Ad only show to guest, please register now to disappear !
__________________
[Üye olmadan linki göremezsiniz.. Üye olmak için tıklayınız...]

[Üye olmadan linki göremezsiniz.. Üye olmak için tıklayınız...]
rahipkral624 isimli Üye şuanda  online konumundadır   Alıntı ile Cevapla
Alt 19-10-2010, 00:10   #8 (permalink)
Gelişmiş Üye

 
TheHunteR - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Dec 2009
Mesajlar: 35
Oyun Parası: $19555
Teşekkür : 47
3 Konusuna 4 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 13
TheHunteR has much to be proud ofTheHunteR has much to be proud ofTheHunteR has much to be proud ofTheHunteR has much to be proud ofTheHunteR has much to be proud ofTheHunteR has much to be proud ofTheHunteR has much to be proud ofTheHunteR has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Güzel paylaşımlar yav



Notice: This Ad only show to guest, please register now to disappear !
TheHunteR isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 24-10-2010, 13:31   #9 (permalink)
Gelişmiş Üye
 
nedo31tr - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Mar 2010
Yaş: 24
Mesajlar: 90
Oyun Parası: $5555
Teşekkür : 0
3 Konusuna 3 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 12
nedo31tr has much to be proud ofnedo31tr has much to be proud ofnedo31tr has much to be proud ofnedo31tr has much to be proud ofnedo31tr has much to be proud ofnedo31tr has much to be proud ofnedo31tr has much to be proud ofnedo31tr has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


++++++++++++++++++++++++++++



Notice: This Ad only show to guest, please register now to disappear !
nedo31tr isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 25-10-2010, 09:35   #10 (permalink)
[ - Ugly / Where Have You Gone - ]
 
By_Ugly - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Apr 2010
Mesajlar: 859
Oyun Parası: $171257
Teşekkür : 228
59 Konusuna 922 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 12
By_Ugly has much to be proud ofBy_Ugly has much to be proud ofBy_Ugly has much to be proud ofBy_Ugly has much to be proud ofBy_Ugly has much to be proud ofBy_Ugly has much to be proud ofBy_Ugly has much to be proud ofBy_Ugly has much to be proud of
Standart Cevap: [Paylaşım] sorunsuz Premium Sistemi [Reallizt] [1351]


Teşekkürler



Notice: This Ad only show to guest, please register now to disappear !
__________________
[Üye olmadan linki göremezsiniz.. Üye olmak için tıklayınız...]
By_Ugly isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Cevapla

Bookmarks

Etiketler
1351, paylasim, premium, reallizt, sistemi, sorunsuz

Seçenekler
Stil

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık




| oyun | kız oyunları | atari oyunları | dora oyunları | tüm oyunlar |

Tüm Zamanlar GMT +2 Olarak Ayarlanmış. Şuanki Zaman: 17:50.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

19 sorgu 0,20159 saniyede oluşturuldu