HI Sir
i have saw users purchase premium account because of direct downloads so here is the coding in xfilesharing if a user purchase premium account they have to selected direct downloading option thought the my account page but lots of users dont know about it so i want any body to help me out in xfilesharing default coding is unselected but i want this coding like this if a user purchase a premium so they will able to download direct they dont need to select the option but if a user want to disable the direct download so they have to go to my account page and selected not direct download .
like this
select to not direct download
so can any one let meknow how to do this i mean how to make changings in this coding
Hi Sir,
im trying to fix a issue but i dont have any experience with your scripts sir here is the coding if a user purchase premium account
<TMPL_IF premium><TR><TD colspan=2><input type="checkbox" name="usr_direct_downloads" id="cdl" value="1"<TMPL_IF usr_direct_downloads> checked</TMPL_IF>> <label for="cdl"><b><TMPL_VAR lang_direct_downloads></b></label> <small>(<TMPL_VAR lang_premium_only>)</small></TD></TR></TMPL_IF>
i will wait for you thanks
XFileSharing Pro - need help about premium user
It's not the template you should be looking at but rather ipn.cgi line 98.
When you confirm a premium user this command runs and adds premium days to the user. At the same time you'll want to set usr_direct_downloads to 1.
So you could add this below the previous mentioned code.
Note this is UNTESTED, but I see no reason for it not to work. Let me know how you go.
Code: Select all
# Add premium days
$db->Exec("UPDATE Users SET usr_premium_expire=NOW()+INTERVAL ? SECOND WHERE usr_id=?", $user->{exp_sec}, $transaction->{usr_id} );
So you could add this below the previous mentioned code.
Code: Select all
# Set premium to direct download
$db->Exec("UPDATE Users SET usr_direct_downloads=1 WHERE usr_id=?", $transaction->{usr_id} );
-
- Posts: 23
- Joined: Aug 14, 2012 9:10 am
Really Great job its really works thankstrinsic wrote:It's not the template you should be looking at but rather ipn.cgi line 98.
When you confirm a premium user this command runs and adds premium days to the user. At the same time you'll want to set usr_direct_downloads to 1.Code: Select all
# Add premium days $db->Exec("UPDATE Users SET usr_premium_expire=NOW()+INTERVAL ? SECOND WHERE usr_id=?", $user->{exp_sec}, $transaction->{usr_id} );
So you could add this below the previous mentioned code.
Note this is UNTESTED, but I see no reason for it not to work. Let me know how you go.Code: Select all
# Set premium to direct download $db->Exec("UPDATE Users SET usr_direct_downloads=1 WHERE usr_id=?", $transaction->{usr_id} );