[Release] WebEngine 1.0.8 / 1.0.8 PL1

Page 7 of 13 FirstFirst 12345678910111213 LastLast
Results 91 to 105 of 182
  1. #91
    Account Upgraded | Title Enabled! nofeara is offline
    MemberRank
    Nov 2009 Join Date
    510Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    does anyone know how to embed images on the news?


  2. #92
    Don't be afraid to ask! RevolGaming is offline
    MemberRank
    Jun 2012 Join Date
    1,458Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Quote Originally Posted by nemeth View Post
    Please help
    need tutorial with IIS
    php with iis is not a good combo.....

    IIS is for asp, not for php. you can make it but its not good.

    - - - Updated - - -

    Quote Originally Posted by nofeara View Post
    does anyone know how to embed images on the news?

    check browser source on the broken image, and you will see whats the problem.

  3. #93
    Account Upgraded | Title Enabled! nofeara is offline
    MemberRank
    Nov 2009 Join Date
    510Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    PHP Code:
    class Vip {
        
        function 
    VipProcess($userid,$plan) {
            global 
    $common;
            
    $plan Decode($plan);
            if(
    check_value($userid) && Validator::Number($userid)) {
                
    $planData $this->PlanInfo($plan);
                
    $userData $common->accountInformation($userid);
                if(
    is_array($userData) && is_array($planData)) {
                
                    
    // data
                    
    $username $userData[_CLMN_USERNM_];
                    
    $vipstamp $userData[_CLMN_VIP_STAMP_];
                    
    $plandays $planData['days'];
                    
    $plandiscount $planData['discount_percent'];
                    
    $planprice $this->CalculatePlanCost($plandays,$plandiscount);
                    
                    if(!
    $common->accountOnline($username)) {
                        
    // deduct credits
                        
    $deduct $common->substractCredits($userid,$planprice);
                        if(
    $deduct) {
                            if(
    $this->isVIP($userid)) {
                                
    // Extend Timestamp
                                
    $new_timestamp $this->CalculateExtension($vipstamp,$plandays);
                                
    $update $common->updateVipTimeStamp($userid,$new_timestamp);
                                if(
    $update) {
                                    
    // success
                                    
    message('success'lang('success_13',true));
                                } else {
                                    
    // unkown error
                                    
    message('error'lang('error_23',true));
                                }
                            } else {
                                
                                
    // New timestamp
                                
    $new_timestamp $this->CalculateTimestamp($plandays);
                                
                                if(
    mconfig('vip_enable_promotion')) {
                                    if(
    $this->vipGetsPromotion()) {
                                        
    $new_timestamp $this->addPromotionDays($new_timestamp);
                                        
    $gotFreeDays true;
                                    } else {
                                        
    $gotFreeDays false;
                                    }
                                }
                                
                                
    $update $common->updateVipTimeStamp($userid,$new_timestamp);
                                if(
    $update) {
                                    
    // success
                                    
    message('success'lang('success_14',true));
                                    
                                    if(
    $gotFreeDays) {
                                        
    message('success'lang('vip_reward_1b',true).mconfig('vip_promotion_reward_days').lang('vip_reward_1c',true), lang('vip_reward_1a',true));
                                    }
                                } else {
                                    
    // unkown error
                                    
    message('error'lang('error_23',true));
                                }
                            }
                        } else {
                            
    // not enough credits
                            
    message('error'lang('error_40',true));
                        }
                    } else {
                        
    // account is online
                        
    message('error'lang('error_14',true));
                    }
                } else {
                    
    // invalid user (unknown error)
                    
    message('error'lang('error_23',true));
                }
            } else {
                
    // missing data (unknown error)
                
    message('error'lang('error_23',true));
            }
        }
        
        function 
    PackageExists($id) {
            
    $VipPlans mconfig('vip_plans');
            if(
    is_array($VipPlans)) {
                if(
    array_key_exists(0$VipPlans)) {
                    if(
    is_array($VipPlans[$id])) {
                        return 
    true;
                    }
                } else {
                    return 
    true;
                }
            }
        }
        
        function 
    PlanInfo($id) {
            if(
    $this->PackageExists($id)) {
                
    $VipPlans mconfig('vip_plans');
                if(
    array_key_exists(0$VipPlans)) {
                    return 
    $VipPlans[$id];
                } else {
                    return 
    $VipPlans;
                }
            }
        }
        
        function 
    CalculateTimestamp($days) {
            if(
    check_value($days) && Validator::Number($days) && $days >= 1) {
                
    $vip_days 60*60*24*$days;
                
    $free_time 3600;
                
    $result time() + $free_time $vip_days;
                return 
    $result;
            }
        }
        
        function 
    CalculateExtension($timestamp,$days) {
            if(
    check_value($timestamp) && check_value($days) && Validator::Number($days) && $days >= 1) {
                
    $vip_days 60*60*24*$days;
                
    $result $timestamp $vip_days;
                return 
    $result;
            }
        }
        
        function 
    isVIP($userid) {
            global 
    $common;
            if(
    check_value($userid) && Validator::Number($userid)) {
                
    $accountInfo $common->accountInformation($userid);
                if(
    $accountInfo) {
                    
    $vipTimestamp $accountInfo[_CLMN_VIP_STAMP_];
                    if(
    $vipTimestamp time()) {
                        return 
    true;
                    }
                }
            }
        }
        
        function 
    RemainingVIP($timestamp) {
            if(
    check_value($timestamp) && Validator::Number($timestamp)) {
                
    $calculate = ($timestamp time()) / (60*60*24);
                return 
    round($calculate);
            }
        }
        
        function 
    vipGetsPromotion() {
            
    $success_rate mconfig('vip_promotion_success_percent');
            
    $random rand(1,100);
            if(
    $random <= $success_rate) {
                return 
    true;
            }
        }
        
        function 
    addPromotionDays($timestamp) {
            if(
    check_value($timestamp) && Validator::Number($timestamp)) {
                
    $promotion_days 60*60*24*mconfig('vip_promotion_reward_days');
                return 
    $timestamp+$promotion_days;
            }
        }
        
        function 
    CalculatePlanCost($days,$discount=0) {
            if(
    check_value($days) && Validator::Number($days)) {
                
    $vip_day_cost mconfig('vip_day_cost');
                
    $calculate_days_cost round($days*$vip_day_cost);
                if(
    $discount >= 1) {
                    
    // Formula: original price - ( (discount % / 100) * original price )
                    
    $discounted_price $calculate_days_cost - (($discount/100)*$calculate_days_cost);
                    return 
    round($discounted_price);
                } else {
                    return 
    round($calculate_days_cost);
                }
            }
        }


    Result:






    What/how do i insert something on the script so that it would also update/post/put/insert something on AccountLevel and AccountExpireDate? These columns are the ones affecting VIP in game.

    @RevolGaming
    @natzugen

    Help please...

    Thanks :)

    - - - Updated - - -
    @Edit



    So i manged to point the stamping of vip system to muemu's AccountExpireDate column by modifying the script below:

    PHP Code:
    class Vip {
        
        function 
    VipProcess($userid,$plan) {
            global 
    $common;
            
    $plan Decode($plan);
            if(
    check_value($userid) && Validator::Number($userid)) {
                
    $planData $this->PlanInfo($plan);
                
    $userData $common->accountInformation($userid);
                if(
    is_array($userData) && is_array($planData)) {
                
                    
    // data
                    
    $username $userData[_CLMN_USERNM_];
                    
    $vipstamp $userData[_CLMN_VIP_STAMP_];
                    
    $plandays $planData['days'];
                    
    $plandiscount $planData['discount_percent'];
                    
    $planprice $this->CalculatePlanCost($plandays,$plandiscount);
                    
                    if(!
    $common->accountOnline($username)) {
                        
    // deduct credits
                        
    $deduct $common->substractCredits($userid,$planprice);
                        if(
    $deduct) {
                            if(
    $this->isVIP($userid)) {
                                
    // Extend Timestamp
                                
    $new_timestamp $this->CalculateExtension($vipstamp,$plandays);
                                
    $update $common->updateVipTimeStamp($userid,$new_timestamp);
                                if(
    $update) {
                                    
    // success
                                    
    message('success'lang('success_13',true));
                                } else {
                                    
    // unkown error
                                    
    message('error'lang('error_23',true));
                                }
                            } else {
                                
                                
    // New timestamp
                                
    $new_timestamp $this->CalculateTimestamp($plandays);
                                
                                if(
    mconfig('vip_enable_promotion')) {
                                    if(
    $this->vipGetsPromotion()) {
                                        
    $new_timestamp $this->addPromotionDays($new_timestamp);
                                        
    $gotFreeDays true;
                                    } else {
                                        
    $gotFreeDays false;
                                    }
                                }
                                
                                
    $update $common->updateVipTimeStamp($userid,$new_timestamp);
                                if(
    $update) {
                                    
    // success
                                    
    message('success'lang('success_14',true));
                                    
                                    if(
    $gotFreeDays) {
                                        
    message('success'lang('vip_reward_1b',true).mconfig('vip_promotion_reward_days').lang('vip_reward_1c',true), lang('vip_reward_1a',true));
                                    }
                                } else {
                                    
    // unkown error
                                    
    message('error'lang('error_23',true));
                                }
                            }
                        } else {
                            
    // not enough credits
                            
    message('error'lang('error_40',true));
                        }
                    } else {
                        
    // account is online
                        
    message('error'lang('error_14',true));
                    }
                } else {
                    
    // invalid user (unknown error)
                    
    message('error'lang('error_23',true));
                }
            } else {
                
    // missing data (unknown error)
                
    message('error'lang('error_23',true));
            }
        }
        
        function 
    PackageExists($id) {
            
    $VipPlans mconfig('vip_plans');
            if(
    is_array($VipPlans)) {
                if(
    array_key_exists(0$VipPlans)) {
                    if(
    is_array($VipPlans[$id])) {
                        return 
    true;
                    }
                } else {
                    return 
    true;
                }
            }
        }
        
        function 
    PlanInfo($id) {
            if(
    $this->PackageExists($id)) {
                
    $VipPlans mconfig('vip_plans');
                if(
    array_key_exists(0$VipPlans)) {
                    return 
    $VipPlans[$id];
                } else {
                    return 
    $VipPlans;
                }
            }
        }
        
        function 
    CalculateTimestamp($days) {
            if(
    check_value($days) && Validator::Number($days) && $days >= 1) {
                
    //$vip_days = 60*60*24*$days;
                //$free_time = 3600;
                
    $result date('Y-m-d H:i:s'strtotime("+ " .$days" day"));
                return 
    $result;
            }
        }
        
        function 
    CalculateExtension($timestamp,$days) {
            if(
    check_value($timestamp) && check_value($days) && Validator::Number($days) && $days >= 1) {
                
    $vip_days 60*60*24*$days;
                
    $tsnum strtotime($timestamp);
                
    $tsnumvip $tsnum $vip_days;
                
    $extendtime date('Y-m-d H:i:s'$tsnumvip);
                
    //$result = $timestamp + $vip_days;
                
    return $extendtime;
            }
        }
        
        function 
    isVIP($userid) {
            global 
    $common;
            if(
    check_value($userid) && Validator::Number($userid)) {
                
    $accountInfo $common->accountInformation($userid);
                if(
    $accountInfo) {
                    
    $vipTimestamp $accountInfo[_CLMN_VIP_STAMP_];
                    if(
    $vipTimestamp date('Y-m-d H:i:s'time())) {
                        return 
    true;
                    }
                }
            }
        }
        
        function 
    RemainingVIP($timestamp) {
            if(
    check_value($timestamp) && Validator::Date($timestamp)) {
                
    //$calculate = ($timestamp - time()) / (60*60*24);
                
    return $timestamp;
            }
        }
        
        function 
    vipGetsPromotion() {
            
    $success_rate mconfig('vip_promotion_success_percent');
            
    $random rand(1,100);
            if(
    $random <= $success_rate) {
                return 
    true;
            }
        }
        
        function 
    addPromotionDays($timestamp) {
            if(
    check_value($timestamp) && Validator::Number($timestamp)) {
                
    $promotion_days 60*60*24*mconfig('vip_promotion_reward_days');
                return 
    $timestamp+$promotion_days;
            }
        }
        
        function 
    CalculatePlanCost($days,$discount=0) {
            if(
    check_value($days) && Validator::Number($days)) {
                
    $vip_day_cost mconfig('vip_day_cost');
                
    $calculate_days_cost round($days*$vip_day_cost);
                if(
    $discount >= 1) {
                    
    // Formula: original price - ( (discount % / 100) * original price )
                    
    $discounted_price $calculate_days_cost - (($discount/100)*$calculate_days_cost);
                    return 
    round($discounted_price);
                } else {
                    return 
    round($calculate_days_cost);
                }
            }
        }


    But the problem is with modifying the column AccountLevel.

    i tried to use original automatic vip expiry procedure which is originally working with expiration:

    Code:
    USE [MuOnline]
    GO
    
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_GetAccountLevel]
     @account varchar(10)
    AS
    BEGIN
    
    SET NOCOUNT ON
    SET XACT_ABORT ON
    
    DECLARE @CurrentAccountLevel int
    DECLARE @CurrentAccountExpireDate smalldatetime
    
    SELECT @CurrentAccountLevel = AccountLevel, @CurrentAccountExpireDate = AccountExpireDate FROM MEMB_INFO WHERE memb___id = @account
    
    IF (@CurrentAccountLevel <> 0 AND GETDATE() > @CurrentAccountExpireDate)
    BEGIN
    	SET @CurrentAccountLevel = 0
    	UPDATE MEMB_INFO SET AccountLevel = @CurrentAccountLevel, AccountExpireDate = @CurrentAccountExpireDate WHERE memb___id = @account
    END
    
    SELECT @CurrentAccountLevel as AccountLevel, @CurrentAccountExpireDate as AccountExpireDate
    
    SET NOCOUNT OFF
    SET XACT_ABORT OFF
    
    END
    GO
    
    SET ANSI_NULLS OFF
    GO
    
    SET QUOTED_IDENTIFIER OFF
    GO
    Into:
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_GetAccountLevel]    Script Date: 11/30/2016 21:32:58 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_GetAccountLevel]
     @account varchar(10)
    AS
    BEGIN
    
    SET NOCOUNT ON
    SET XACT_ABORT ON
    
    DECLARE @CurrentAccountLevel int
    DECLARE @CurrentAccountExpireDate smalldatetime
    
    SELECT @CurrentAccountLevel = AccountLevel, @CurrentAccountExpireDate = AccountExpireDate FROM MEMB_INFO WHERE memb___id = @account
    
    IF (@CurrentAccountLevel <> 0 AND GETDATE() > @CurrentAccountExpireDate)
    BEGIN
    	SET @CurrentAccountLevel = 0
    	UPDATE MEMB_INFO SET AccountLevel = @CurrentAccountLevel, AccountExpireDate = @CurrentAccountExpireDate WHERE memb___id = @account
    END
    ELSE
    IF (@CurrentAccountLevel = 0 AND GETDATE() < @CurrentAccountExpireDate)
    BEGIN
    	SET @CurrentAccountLevel = 0
    	UPDATE MEMB_INFO SET AccountLevel = @CurrentAccountLevel, AccountExpireDate = @CurrentAccountExpireDate WHERE memb___id = @account
    END
    
    SELECT @CurrentAccountLevel as AccountLevel, @CurrentAccountExpireDate as AccountExpireDate
    
    SET NOCOUNT OFF
    SET XACT_ABORT OFF
    
    END
    But it is not working......

    i also tried:
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_GetAccountLevelVIP]    Script Date: 11/30/2016 21:34:26 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_GetAccountLevelVIP]
     @account varchar(10)
    AS
    BEGIN
    
    SET NOCOUNT ON
    SET XACT_ABORT ON
    
    DECLARE @CurAccountLevel int
    DECLARE @CurAccountExpireDate smalldatetime
    
    SELECT @CurAccountLevel = AccountLevel, @CurAccountExpireDate = AccountExpireDate FROM MEMB_INFO WHERE memb___id = @account
    
    IF (@CurAccountLevel = 0 AND @CurAccountExpireDate < Getdate())
    BEGIN
    	SET @CurAccountLevel = 1
    	UPDATE MEMB_INFO SET AccountLevel = @CurAccountLevel, AccountExpireDate = @CurAccountExpireDate WHERE memb___id = @account
    END
    
    SELECT @CurAccountLevel as AccountLevel, @CurAccountExpireDate as AccountExpireDate
    
    SET NOCOUNT OFF
    SET XACT_ABORT OFF
    
    END
    Still not working....

    Any idea how to make it work?, holiday is ending so fast xD....

  4. #94
    Valued Member nemeth is offline
    MemberRank
    Jan 2016 Join Date
    111Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Hello,
    finally managed to install ...
    The problem is that I can not enter the admincp because they always bring up the home page.
    How can I access the admincp?

  5. #95
    Apprentice ivan2001 is offline
    MemberRank
    Jan 2010 Join Date
    5Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Quote Originally Posted by nemeth View Post
    Hello,
    finally managed to install ...
    The problem is that I can not enter the admincp because they always bring up the home page.
    How can I access the admincp?
    Define an ingame account as admin in config.php, login in the website and go to admincp

  6. #96
    Account Upgraded | Title Enabled! nofeara is offline
    MemberRank
    Nov 2009 Join Date
    510Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    freaking noob....

    i just needed a good sleep xD..

    missed a single part, now vip system fully working on muemu :D




  7. #97
    Valued Member nemeth is offline
    MemberRank
    Jan 2016 Join Date
    111Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Quote Originally Posted by ivan2001 View Post
    Define an ingame account as admin in config.php, login in the website and go to admincp
    thans very! ;)

  8. #98
    Member hisync is offline
    MemberRank
    Feb 2008 Join Date
    93Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Thanks for the files, its fast unlike other mu web, easy to config, i tested this files with PerfectZone S4 and its great, btw is there any other compatible template that i can try?

  9. #99
    Account Upgraded | Title Enabled! nofeara is offline
    MemberRank
    Nov 2009 Join Date
    510Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    uhm, is it only paying with paypal account (the one with register paypal email) you can received credits automatically? I tried setting the paypal module but it is connected with my paypal account, so i paid using it, it won't accept. So tried debit/credit instead, it does not add credits automatically to the account i used, but i received the payment in my paypal account, for manual credit addition though. Can someone share their experiences, thanks..

  10. #100
    Valued Member nemeth is offline
    MemberRank
    Jan 2016 Join Date
    111Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Hello

    someone would describe how I configure MSSQL you to reach your webhost PDO driver from linux?


    I use WebEngine 1.0.8

    windows vps- MSSQL 2008 R2 Standard / linux hos- cPanel

  11. #101
    Enthusiast mumeister is offline
    MemberRank
    Aug 2016 Join Date
    HungaryLocation
    28Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    This is how you should do:


  12. #102
    Apprentice billx is offline
    MemberRank
    Mar 2009 Join Date
    5Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    hello, i'm trying this web, but no sucess.



    /**
    * MSSQL Connection Details
    */
    $config['SQL_DB_HOST'] = "VPS-IP";
    $config['SQL_DB_NAME'] = 'MuOnline';
    $config['SQL_DB_2_NAME'] = 'MuOnline';
    $config['SQL_DB_USER'] = 'sa';
    $config['SQL_DB_PASS'] = 'pwsql';
    $config['SQL_DB_PORT'] = '1433';
    $config['SQL_USE_2_DB'] = false;
    $config['SQL_PDO_DRIVER'] = 1; // 1= dblib (default) || 2= sqlsrv || 3= odbc
    $config['SQL_ENABLE_MD5'] = false;

    Website: Godaddy Linux host
    VPS: Windows server 2008 r2 x64
    ms sql server 2012 enterprise (i try also 2008 r2, same error.)
    Can someone help me?

  13. #103
    Enthusiast mumeister is offline
    MemberRank
    Aug 2016 Join Date
    HungaryLocation
    28Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Quote Originally Posted by billx View Post
    hello, i'm trying this web, but no sucess.



    /**
    * MSSQL Connection Details
    */
    $config['SQL_DB_HOST'] = "VPS-IP";
    $config['SQL_DB_NAME'] = 'MuOnline';
    $config['SQL_DB_2_NAME'] = 'MuOnline';
    $config['SQL_DB_USER'] = 'sa';
    $config['SQL_DB_PASS'] = 'pwsql';
    $config['SQL_DB_PORT'] = '1433';
    $config['SQL_USE_2_DB'] = false;
    $config['SQL_PDO_DRIVER'] = 1; // 1= dblib (default) || 2= sqlsrv || 3= odbc
    $config['SQL_ENABLE_MD5'] = false;

    Website: Godaddy Linux host
    VPS: Windows server 2008 r2 x64
    ms sql server 2012 enterprise (i try also 2008 r2, same error.)
    Can someone help me?


    Edit php ini: extension=php_pdo_odbc.dll , remove ; . And edit $config['SQL_PDO_DRIVER'] = 3; // 1= dblib (default) || 2= sqlsrv || 3= odbc and working =)

  14. #104
    Apprentice billx is offline
    MemberRank
    Mar 2009 Join Date
    5Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    Quote Originally Posted by mumeister View Post
    Edit php ini: extension=php_pdo_odbc.dll , remove ; . And edit $config['SQL_PDO_DRIVER'] = 3; // 1= dblib (default) || 2= sqlsrv || 3= odbc and working =)
    i try, check:

    /**
    * MSSQL Connection Details
    */
    $config['SQL_DB_HOST'] = "VPS-IP";
    $config['SQL_DB_NAME'] = 'MuOnline';
    $config['SQL_DB_2_NAME'] = 'MuOnline';
    $config['SQL_DB_USER'] = 'sa';
    $config['SQL_DB_PASS'] = 'SQL PASS';
    $config['SQL_DB_PORT'] = '1433';
    $config['SQL_USE_2_DB'] = false;
    $config['SQL_PDO_DRIVER'] = 3; // 1= dblib (default) || 2= sqlsrv || 3= odbc
    $config['SQL_ENABLE_MD5'] = false;









    image hosting

  15. #105
    Valued Member nemeth is offline
    MemberRank
    Jan 2016 Join Date
    111Posts

    re: [Release] WebEngine 1.0.8 / 1.0.8 PL1

    no odbc change linux pdolib



Advertisement