Advertisement
webmw

Untitled

Jan 28th, 2013
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <?php
  2. $this->record++;
  3. $initr=$this->record;
  4. //set top margin
  5. $topmargin=.75; //.75 bumping up the top margin moved the Full Address down and was how I gave the barcode room on the label
  6.  
  7. // change this number to the number of items per page
  8. $r=($initr % 30);
  9. if ($r==0) {
  10.  
  11. //also change this to items per page
  12. $r=30;
  13. }
  14.  
  15.     //column 1
  16.     if (($r % 3) == 1) {
  17.     $x=.25;
  18.     $y=((floor($r/3)+1)*$h)-($h-$topmargin);
  19. }
  20.  
  21.     //column 2
  22.     if (($r % 3) == 2) {
  23.     $x=3;
  24.     $y=((floor($r/3)+1)*$h)-($h-$topmargin);
  25. }
  26.  
  27.     //column 3
  28.     if (($r % 3) == 0) {
  29.     $x=5.75;
  30.     $y=((floor($r/3)+1)*$h)-((2*$h)-$topmargin);
  31. }
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement