Friday, March 7, 2014

Wednesday, March 5, 2014

Apache2 : How to disable directory listing

open sites-available/default file

change to below:
  <Directory /var/www/>
                Options FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all
        </Directory>


restart apache2 

Tuesday, March 4, 2014

How to pay TDS online for professional fees

Follow below steps:
1. Open E-tax payment site:

https://onlineservices.tin.egov-nsdl.com/etaxnew/tdsnontds.jsp


2. select challan number 281

3. select 0021 for LLP firms

4. Provide TAN number

5. Make sure Assessment year is correctly selected.

  What is Assessment year and financial year?
Financial year starts from 1st April and ends on 31st March (wherein there is income pertaining to the whole year or part of the year). Assessment year is the year immediately following the financial year wherein the income of the F.Y. is assessed.

for upto March 31 , 2014 ==> assessment year is 2014-15.

From april 1, 2014=> assessment year is 2015-16

6. select Type of payment as 200 (TDS by Tax Payer).

7. select 94J ==> fees for professional and technical services 

8.  select Retail customer when prompt for paid

9. MOST Important:   Download the acknowledgement and save file with below convention
 TDS_<person name>_year_payment_name.pdf


Monday, March 3, 2014

SQL Injection: How to save from it in OpenCart

Tips:
 Always use $this->db->escape() after reading it from $this->request or $_GET

what is sql injection:

below query can be hacked:
[select * from my_table where var='$var']

if i pass $var=' OR delete from my_table where 1

It will delete all content of my_table.

$this->db->escape ...escape ' field so save from injection. 

Jquery: How to handle select

Below is example of how to use jquery select

$('#tag_item').on('change', function() {
  alert( "I am selected");
});


get selected value text:

$("#tag_select").change(function()
{
         var tag_value=$("#tag_select").val();
         if(tag_value!=-1)
     {
     var tag_name=$("#tag_select option:selected").text();
     add_tag_id(tag_value,tag_name);
     }
}