There are 4 banner spaces :
Usual banner only takes 1 space.
But i want the user to order more than 1 space and expandable.
For example if user chooses [A] position, he /she can expand the banner into (for example) 2 spaces
And if user chooses position, he / she can expand the banner into (for example) 2 spaces
If he / she chooses and expands 3 spaces
In my current code, i store "expand" in my database. For example if "expand" column is 1, banner will take 1 more space.
Space only can be expanded in right direction.
Anyone knows the algorithm?
Thanks.
Kurniawan.
Code:
[A] [B] [C] [D]
Usual banner only takes 1 space.
But i want the user to order more than 1 space and expandable.
For example if user chooses [A] position, he /she can expand the banner into (for example) 2 spaces
Code:
[ A ] [C] [D]
And if user chooses position, he / she can expand the banner into (for example) 2 spaces
Code:
[A] [ B ] [D]
If he / she chooses and expands 3 spaces
Code:
[A] [ B ]
In my current code, i store "expand" in my database. For example if "expand" column is 1, banner will take 1 more space.
Space only can be expanded in right direction.
Anyone knows the algorithm?
Thanks.
Kurniawan.






