XFileSharing Pro - Small bug in download0

Message
Author
MrJones
Posts: 26
Joined: May 28, 2012 4:51 pm

Small bug in download0

#1 Postby MrJones » Jul 04, 2012 12:34 am

Hello

On my download0 page I added a new button for user to register in order to download faster and without limitations.

Image

Now when a user is logged and click on register he is directed to register page and not download1.

below is the code from download0.Can you please tell me what should i add in order for logged user to be redirect to download1 and hide the free button from a logged user because no longer applies to him since is registered already.

Code: Select all


<h2><TMPL_VAR lang_download_file> <TMPL_VAR file_name></h2>
<font style="font-size:12px;"><TMPL_VAR lang_you_requested> <font color="red"><TMPL_VAR site_url><TMPL_IF usr_add_login>/<TMPL_VAR usr_login></TMPL_IF>/<TMPL_VAR file_code>/<TMPL_VAR file_name></font> (<TMPL_VAR fsize>)</font>
<br>
<TMPL_INCLUDE comparison.html>
<br>
<Form method="POST" action=''>
<input type="hidden" name="op" value="download1">
<input type="hidden" name="usr_login" value="<TMPL_VAR usr_login>">
<input type="hidden" name="id" value="<TMPL_VAR file_code>">
<input type="hidden" name="fname" value="<TMPL_VAR file_name>">
<input type="hidden" name="referer" value="<TMPL_VAR referer>">
<div style="margin-left:43px; margin-top:0px">
<table width="930" cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;border:none">
 <tbody><tr>
  <td width="180" valign="bottom" style="margin:6px;" rowspan="2">
  <p style="margin-left:25px;"> </p>
  </td>
  <td width="138" valign="top" align="center">
  <p style="margin-left:8px;"><input type="submit" value="Free Download" name="method_free"></p>
  </td>
  <td width="188" valign="top" align="center">
  <p style="margin-left:38px;"><a href="http://domain.com/?op=registration"><img border="0" src="http://www.domain.com/images/dregister.jpg"></a> </p>
  </td>
  <td width="138" valign="top" align="center">
  <p style="margin-left:13px;"><input type="submit" value="Premium Download" name="method_premium"></p>
  </td>
 </tr>
 <tr>
  <td width="480" valign="top" style="margin-left:10px;" colspan="3"> </td>
 </tr>
</tbody></table>

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

Re: Small bug in download0

#2 Postby randy » Jul 04, 2012 10:43 am

MrJones wrote:Hello

On my download0 page I added a new button for user to register in order to download faster and without limitations.

Image

Now when a user is logged and click on register he is directed to register page and not download1.

below is the code from download0.Can you please tell me what should i add in order for logged user to be redirect to download1 and hide the free button from a logged user because no longer applies to him since is registered already.

Code: Select all


<h2><TMPL_VAR lang_download_file> <TMPL_VAR file_name></h2>
<font style="font-size:12px;"><TMPL_VAR lang_you_requested> <font color="red"><TMPL_VAR site_url><TMPL_IF usr_add_login>/<TMPL_VAR usr_login></TMPL_IF>/<TMPL_VAR file_code>/<TMPL_VAR file_name></font> (<TMPL_VAR fsize>)</font>
<br>
<TMPL_INCLUDE comparison.html>
<br>
<Form method="POST" action=''>
<input type="hidden" name="op" value="download1">
<input type="hidden" name="usr_login" value="<TMPL_VAR usr_login>">
<input type="hidden" name="id" value="<TMPL_VAR file_code>">
<input type="hidden" name="fname" value="<TMPL_VAR file_name>">
<input type="hidden" name="referer" value="<TMPL_VAR referer>">
<div style="margin-left:43px; margin-top:0px">
<table width="930" cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;border:none">
 <tbody><tr>
  <td width="180" valign="bottom" style="margin:6px;" rowspan="2">
  <p style="margin-left:25px;"> </p>
  </td>
  <td width="138" valign="top" align="center">
  <p style="margin-left:8px;"><input type="submit" value="Free Download" name="method_free"></p>
  </td>

<TMPL_IF my_login>

  <td width="188" valign="top" align="center">
  <p style="margin-left:38px;"><a href="http://domain.com/?op=registration"><img border="0" src="http://www.domain.com/images/dregister.jpg"></a> </p>
  </td>

<TMPL_ELSE>

  <td width="138" valign="top" align="center">
  <p style="margin-left:13px;"><input type="submit" value="Premium Download" name="method_premium"></p>
  </td>

</TMPL_IF>

 </tr>
 <tr>
  <td width="480" valign="top" style="margin-left:10px;" colspan="3"> </td>
 </tr>
</tbody></table>
this must work normally!

MrJones
Posts: 26
Joined: May 28, 2012 4:51 pm

#3 Postby MrJones » Jul 04, 2012 12:55 pm

I managed to work something out but i have a small problem.I managed to show the free registration button if a user is logged.

The free registration button already has an image attached through css so how can i change it to show the image from the button register?
(http://www.domain.com/images/dregister.jpg)

Code: Select all

<TMPL_IF my_login><input type="submit" value="Free Download" name="method_free">

<TMPL_ELSE>

<a href="http://domain.com/?op=registration"><img border="0" src="http://www.domain.com/images/dregister.jpg"></a>

</TMPL_IF>