<?php
include_once(_DIR_TO_CLASS.'/c_page.php') ;
class c_page_cab_cards extends c_page
{ public $h1='Печать карточек' ;
  function show()
  {   ?><div id="list_items"><?
      $k=0 ;
      $from=$_GET['from']? $_GET['from']:1 ;
      $to=$_GET['to']? $_GET['to']:10 ;
      for ($i=$from;$i<=$to;$i++)
      { $k++ ;
        ?><div class=item>
            <h2>№ <?echo $i?></h2>
            <img class="logo" src="/images/logo.png" width="50">
            <img class=qrcode src="/services/qrcode/<?echo $i?>/" />
            <table>
                <tr><td>ФИО:</td></tr>
                <tr><td></td></tr>
                <tr><td></td></tr>
                <tr><td>Подразделение:</td></tr>
                <tr><td></td></tr>
                <tr><td>Должность:</td></tr>
                <tr><td></td></tr>
            </table>
            <div class="clear"></div>
          </div>
        <?
        if ($k==10) {?><div class="clear"></div><? $k=0 ;}
      }
      ?></div><style>
      @media print {  .more {  page-break-after: always;  }  }
         div#list_items{}
         div#list_items div.clear{clear:both;page-break-after: always;}
         div#list_items div.item{width:300px;height:180px;float:left;margin:5px 10px;border:1px solid gray;position:relative;}
         div#list_items div.item h2{margin:10px 0 0 80px;padding:0;text-align:left;font-family:arial, helvetica, sans-serif;font-size:13px;text-transform:uppercase;}
         div#list_items div.item img.logo{position:absolute;top:10px;left:25px;}
         div#list_items div.item img.qrcode{position:absolute;top:25px;left:1px;}
         div#list_items div.item table{position:absolute;top:5px;right:29px;width:130px;table-layout:fixed;border-collapse:collapse;font-family:arial, helvetica, sans-serif;font-size:10px;}
         div#list_items div.item table tr td{text-align:left;vertical-align:top;padding:5px;border-bottom:1px solid gray;height:20px;}
      </style><?
  }

}

?>