< ? p h p 
 
 / * * 
 
   *   D a s h b o a r d   V i e w   -   P r o f e s s i o n a l   G r a p h i c a l   D a s h b o a r d 
 
   * / 
 
 
 
 / /     R                       &      R         &  R              R  
 
 $ i s _ s u p e r a d m i n   =   A u t h : : i s S u p e r A d m i n ( ) ; 
 
 
 
 $ t o t a l _ c o m p a n i e s   =   $ d a t a [ ' t o t a l _ c o m p a n i e s ' ]   ? ?   0 ; 
 
 $ t o t a l _ u s e r s   =   $ d a t a [ ' t o t a l _ u s e r s ' ]   ? ?   0 ; 
 
 $ t o t a l _ c u s t o m e r s   =   $ d a t a [ ' t o t a l _ c u s t o m e r s ' ]   ? ?   0 ; 
 
 $ t o t a l _ o r d e r s   =   $ d a t a [ ' t o t a l _ o r d e r s ' ]   ? ?   0 ; 
 
 $ t o t a l _ s u i t s   =   $ d a t a [ ' t o t a l _ s u i t s ' ]   ? ?   0 ; 
 
 $ t o t a l _ d e l i v e r e d _ s u i t s   =   $ d a t a [ ' t o t a l _ d e l i v e r e d _ s u i t s ' ]   ? ?   0 ; 
 
 $ t o t a l _ e m p l o y e e s   =   $ d a t a [ ' t o t a l _ e m p l o y e e s ' ]   ? ?   0 ; 
 
 $ t o d a y _ o r d e r s   =   $ d a t a [ ' t o d a y _ o r d e r s ' ]   ? ?   0 ; 
 
 $ t o d a y _ d e l i v e r e d   =   $ d a t a [ ' t o d a y _ d e l i v e r e d ' ]   ? ?   0 ; 
 
 $ t o d a y _ c u t t i n g _ s u i t s   =   $ d a t a [ ' t o d a y _ c u t t i n g _ s u i t s ' ]   ? ?   0 ; 
 
 $ t o t a l _ r e v e n u e   =   $ d a t a [ ' t o t a l _ r e v e n u e ' ]   ? ?   0 ; 
 
 $ t o t a l _ d u e   =   $ d a t a [ ' t o t a l _ d u e ' ]   ? ?   0 ; 
 
 $ d a i l y _ c a s h   =   $ d a t a [ ' d a i l y _ c a s h ' ]   ? ?   0 ; 
 
 $ c a s h _ b a l a n c e   =   $ d a t a [ ' c a s h _ b a l a n c e ' ]   ? ?   0 ; 
 
 $ w e e k _ c a s h   =   $ d a t a [ ' w e e k _ c a s h ' ]   ? ?   0 ; 
 
 $ m o n t h _ c a s h   =   $ d a t a [ ' m o n t h _ c a s h ' ]   ? ?   0 ; 
 
 $ r e c e n t _ o r d e r s   =   $ d a t a [ ' r e c e n t _ o r d e r s ' ]   ? ?   [ ] ; 
 
 $ r e c e n t _ c u s t o m e r s   =   $ d a t a [ ' r e c e n t _ c u s t o m e r s ' ]   ? ?   [ ] ; 
 
 $ m o n t h l y _ c o u n t s   =   $ d a t a [ ' m o n t h l y _ c o u n t s ' ]   ? ?   a r r a y _ f i l l ( 1 ,   1 2 ,   0 ) ; 
 
 $ m o n t h l y _ r e v e n u e   =   $ d a t a [ ' m o n t h l y _ r e v e n u e ' ]   ? ?   a r r a y _ f i l l ( 1 ,   1 2 ,   0 ) ; 
 
 $ s t a t u s _ d a t a   =   $ d a t a [ ' s t a t u s _ d a t a ' ]   ? ?   [ ' p e n d i n g '   = >   0 ,   ' c u t t i n g '   = >   0 ,   ' s t i t c h i n g '   = >   0 ,   ' r e a d y '   = >   0 ,   ' d e l i v e r e d '   = >   0 ,   ' c a n c e l l e d '   = >   0 ] ; 
 
 
 
 $ m o n t h _ n a m e s   =   [ ' J a n ' ,   ' F e b ' ,   ' M a r ' ,   ' A p r ' ,   ' M a y ' ,   ' J u n ' ,   ' J u l ' ,   ' A u g ' ,   ' S e p ' ,   ' O c t ' ,   ' N o v ' ,   ' D e c ' ] ; 
 
 $ m o n t h l y _ c o u n t s _ a r r a y   =   [ ] ; 
 
 $ m o n t h l y _ r e v e n u e _ a r r a y   =   [ ] ; 
 
 f o r   ( $ i   =   1 ;   $ i   < =   1 2 ;   $ i + + )   { 
 
         $ m o n t h l y _ c o u n t s _ a r r a y [ ]   =   $ m o n t h l y _ c o u n t s [ $ i ]   ? ?   0 ; 
 
         $ m o n t h l y _ r e v e n u e _ a r r a y [ ]   =   $ m o n t h l y _ r e v e n u e [ $ i ]   ? ?   0 ; 
 
 } 
 
 
 
 $ s t a t u s _ c o l o r s   =   [ 
 
         ' p e n d i n g '   = >   ' # f 5 9 e 0 b ' , 
 
         ' c u t t i n g '   = >   ' # 0 6 b 6 d 4 ' , 
 
         ' s t i t c h i n g '   = >   ' # 3 b 8 2 f 6 ' , 
 
         ' r e a d y '   = >   ' # 8 b 5 c f 6 ' , 
 
         ' d e l i v e r e d '   = >   ' # 2 2 c 5 5 e ' , 
 
         ' c a n c e l l e d '   = >   ' # e f 4 4 4 4 ' 
 
 ] ; 
 
 
 
 / /   C a l c u l a t e   m o n t h l y   s t a t s 
 
 $ t o t a l _ o r d e r s _ m o n t h   =   $ m o n t h l y _ c o u n t s [ d a t e ( ' n ' ) ]   ? ?   0 ; 
 
 $ t o t a l _ r e v e n u e _ m o n t h   =   $ m o n t h l y _ r e v e n u e [ d a t e ( ' n ' ) ]   ? ?   0 ; 
 
 
 
 / /   C a l c u l a t e   y e a r l y   s t a t s 
 
 $ t o t a l _ o r d e r s _ y e a r   =   a r r a y _ s u m ( $ m o n t h l y _ c o u n t s ) ; 
 
 $ t o t a l _ r e v e n u e _ y e a r   =   a r r a y _ s u m ( $ m o n t h l y _ r e v e n u e ) ; 
 
 ? > 
 
 
 
 < s t y l e > 
 
         / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
               G L O B A L   D A S H B O A R D   S T Y L E S 
 
               = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 
         . d a s h b o a r d - c o n t a i n e r   { 
 
                 p a d d i n g :   0   0   1 0 p x   0 ; 
 
                 f o n t - f a m i l y :   ' I n t e r ' ,   ' S e g o e   U I ' ,   s a n s - s e r i f ; 
 
         } 
 
 
 
         / *   = = = = =   W E L C O M E   H E A D E R   = = = = =   * / 
 
         . d a s h - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 0 f 0 c 2 9 ,   # 3 0 2 b 6 3 ,   # 2 4 2 4 3 e ) ; 
 
                 b o r d e r - r a d i u s :   2 0 p x ; 
 
                 p a d d i n g :   2 0 p x   2 8 p x ; 
 
                 c o l o r :   # f f f ; 
 
                 m a r g i n - b o t t o m :   2 0 p x ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ; 
 
         } 
 
         . d a s h - h e a d e r : : b e f o r e   { 
 
                 c o n t e n t :   ' ' ; 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 t o p :   - 5 0 % ; 
 
                 r i g h t :   - 2 0 % ; 
 
                 w i d t h :   4 0 0 p x ; 
 
                 h e i g h t :   4 0 0 p x ; 
 
                 b a c k g r o u n d :   r a d i a l - g r a d i e n t ( c i r c l e ,   r g b a ( 1 0 2 , 1 2 6 , 2 3 4 , 0 . 1 5 )   0 % ,   t r a n s p a r e n t   7 0 % ) ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
         } 
 
         . d a s h - h e a d e r : : a f t e r   { 
 
                 c o n t e n t :   ' ' ; 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 b o t t o m :   - 3 0 % ; 
 
                 l e f t :   - 1 0 % ; 
 
                 w i d t h :   3 0 0 p x ; 
 
                 h e i g h t :   3 0 0 p x ; 
 
                 b a c k g r o u n d :   r a d i a l - g r a d i e n t ( c i r c l e ,   r g b a ( 2 3 6 , 7 2 , 1 5 3 , 0 . 1 )   0 % ,   t r a n s p a r e n t   7 0 % ) ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
         } 
 
         . d a s h - h e a d e r   . g r e e t i n g   { 
 
                 f o n t - s i z e :   2 0 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 z - i n d e x :   1 ; 
 
         } 
 
         . d a s h - h e a d e r   . g r e e t i n g   i   { 
 
                 c o l o r :   # f c d 3 4 d ; 
 
         } 
 
         . d a s h - h e a d e r   . s u b - t e x t   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 z - i n d e x :   1 ; 
 
         } 
 
         . d a s h - h e a d e r   . d a t e - b o x   { 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 8 ) ; 
 
                 b a c k d r o p - f i l t e r :   b l u r ( 1 0 p x ) ; 
 
                 b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 1 ) ; 
 
                 b o r d e r - r a d i u s :   1 4 p x ; 
 
                 p a d d i n g :   6 p x   1 8 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 z - i n d e x :   1 ; 
 
         } 
 
         . d a s h - h e a d e r   . d a t e - b o x   . d a y   { 
 
                 f o n t - s i z e :   2 0 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # f c d 3 4 d ; 
 
         } 
 
         . d a s h - h e a d e r   . d a t e - b o x   . m o n t h   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
         } 
 
 
 
         / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
               S T A T   C A R D S   -   G L O W I N G   &   C O M P A C T 
 
               = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 
         . s t a t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 4 p x ; 
 
                 p a d d i n g :   1 4 p x   1 8 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   c u b i c - b e z i e r ( 0 . 2 5 ,   0 . 4 6 ,   0 . 4 5 ,   0 . 9 4 ) ; 
 
                 h e i g h t :   1 0 0 % ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
         } 
 
         . s t a t - c a r d : : b e f o r e   { 
 
                 c o n t e n t :   ' ' ; 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 t o p :   0 ; 
 
                 l e f t :   0 ; 
 
                 r i g h t :   0 ; 
 
                 b o t t o m :   0 ; 
 
                 b o r d e r - r a d i u s :   1 4 p x ; 
 
                 p a d d i n g :   1 p x ; 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ,   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 ) ) ; 
 
                 - w e b k i t - m a s k :   l i n e a r - g r a d i e n t ( # f f f   0   0 )   c o n t e n t - b o x ,   l i n e a r - g r a d i e n t ( # f f f   0   0 ) ; 
 
                 - w e b k i t - m a s k - c o m p o s i t e :   x o r ; 
 
                 m a s k - c o m p o s i t e :   e x c l u d e ; 
 
                 p o i n t e r - e v e n t s :   n o n e ; 
 
         } 
 
         . s t a t - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 4 p x )   s c a l e ( 1 . 0 1 ) ; 
 
                 b o x - s h a d o w :   0   1 2 p x   4 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 0 ) ; 
 
         } 
 
         . s t a t - c a r d   . s t a t - i c o n   { 
 
                 w i d t h :   4 2 p x ; 
 
                 h e i g h t :   4 2 p x ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 f o n t - s i z e :   1 8 p x ; 
 
                 c o l o r :   # f f f ; 
 
                 f l e x - s h r i n k :   0 ; 
 
         } 
 
         . s t a t - c a r d   . s t a t - n u m b e r   { 
 
                 f o n t - s i z e :   2 2 p x ; 
 
                 f o n t - w e i g h t :   8 0 0 ; 
 
                 l i n e - h e i g h t :   1 . 2 ; 
 
                 l e t t e r - s p a c i n g :   - 0 . 5 p x ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . s t a t - c a r d   . s t a t - l a b e l   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
         } 
 
         . s t a t - c a r d   . s t a t - c h a n g e   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 p a d d i n g :   1 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   2 0 p x ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . s t a t - c a r d   . s t a t - c h a n g e . u p   {   b a c k g r o u n d :   # d 1 f a e 5 ;   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . s t a t - c a r d   . s t a t - c h a n g e . d o w n   {   b a c k g r o u n d :   # f e e 2 e 2 ;   c o l o r :   # 9 9 1 b 1 b ;   } 
 
         . s t a t - c a r d   . s t a t - c h a n g e . n e u t r a l   {   b a c k g r o u n d :   # f 1 f 5 f 9 ;   c o l o r :   # 4 7 5 5 6 9 ;   } 
 
 
 
         / *   = = = = =   G L O W I N G   S T A T   C A R D S   = = = = =   * / 
 
         . s t a t - c a r d . g l o w - p u r p l e   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 0 2 , 1 2 6 , 2 3 4 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - b l u e   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 4 f a c f e   0 % ,   # 0 0 f 2 f e   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 7 9 , 1 7 2 , 2 5 4 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - g r e e n   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 4 3 e 9 7 b   0 % ,   # 3 8 f 9 d 7   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 6 7 , 2 3 3 , 1 2 3 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - o r a n g e   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f a 7 0 9 a   0 % ,   # f e e 1 4 0   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 5 0 , 1 1 2 , 1 5 4 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - r e d   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 0 9 3 f b   0 % ,   # f 5 5 7 6 c   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 4 5 , 8 7 , 1 0 8 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - t e a l   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 0 c 3 4 8 3   0 % ,   # a 2 b 6 d f   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 2 , 5 2 , 1 3 1 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - c y a n   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 0 0 c 6 f f   0 % ,   # 0 0 7 2 f f   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 0 , 1 9 8 , 2 5 5 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - g o l d   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 7 9 7 1 e   0 % ,   # f f d 2 0 0   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 4 7 , 1 5 1 , 3 0 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - p i n k   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 0 9 3 f b   0 % ,   # f 5 5 7 6 c   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 4 0 , 1 4 7 , 2 5 1 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - e m e r a l d   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 7 , 1 5 3 , 1 4 2 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - i n d i g o   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 8 E 2 D E 2   0 % ,   # 4 A 0 0 E 0   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 4 2 , 4 5 , 2 2 6 , 0 . 4 ) ;   } 
 
         . s t a t - c a r d . g l o w - r o s e   . s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f f 7 5 8 c   0 % ,   # f f 7 e b 3   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 5 5 , 1 1 7 , 1 4 0 , 0 . 4 ) ;   } 
 
 
 
         / *   = = = = =   T I M E   P E R I O D   C A R D S   ( S P E C I A L   G L O W )   = = = = =   * / 
 
         . p e r i o d - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 p a d d i n g :   1 6 p x   2 0 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   c u b i c - b e z i e r ( 0 . 2 5 ,   0 . 4 6 ,   0 . 4 5 ,   0 . 9 4 ) ; 
 
                 h e i g h t :   1 0 0 % ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . p e r i o d - c a r d : : a f t e r   { 
 
                 c o n t e n t :   ' ' ; 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 t o p :   - 5 0 % ; 
 
                 r i g h t :   - 3 0 % ; 
 
                 w i d t h :   2 0 0 p x ; 
 
                 h e i g h t :   2 0 0 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ; 
 
                 p o i n t e r - e v e n t s :   n o n e ; 
 
         } 
 
         . p e r i o d - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 4 p x )   s c a l e ( 1 . 0 2 ) ; 
 
         } 
 
         . p e r i o d - c a r d   . p - n u m b e r   { 
 
                 f o n t - s i z e :   2 8 p x ; 
 
                 f o n t - w e i g h t :   8 0 0 ; 
 
                 l i n e - h e i g h t :   1 . 1 ; 
 
         } 
 
         . p e r i o d - c a r d   . p - l a b e l   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 o p a c i t y :   0 . 8 ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
         } 
 
         . p e r i o d - c a r d   . p - s u b   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
                 m a r g i n - t o p :   2 p x ; 
 
         } 
 
         . p e r i o d - c a r d . t o d a y   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   2 5 p x   r g b a ( 1 0 2 , 1 2 6 , 2 3 4 , 0 . 4 ) ;   } 
 
         . p e r i o d - c a r d . m o n t h   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   2 5 p x   r g b a ( 1 7 , 1 5 3 , 1 4 2 , 0 . 4 ) ;   } 
 
         . p e r i o d - c a r d . y e a r   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 7 9 7 1 e   0 % ,   # f f d 2 0 0   1 0 0 % ) ;   b o x - s h a d o w :   0   4 p x   2 5 p x   r g b a ( 2 4 7 , 1 5 1 , 3 0 , 0 . 4 ) ;   } 
 
 
 
         / *   = = = = =   C A R D S   = = = = =   * / 
 
         . c u s t o m - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 6 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
         } 
 
         . c u s t o m - c a r d : h o v e r   { 
 
                 b o x - s h a d o w :   0   8 p x   3 5 p x   r g b a ( 0 , 0 , 0 , 0 . 0 8 ) ; 
 
         } 
 
         . c u s t o m - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 p a d d i n g :   1 0 p x   1 8 p x ; 
 
         } 
 
         . c u s t o m - c a r d   . c a r d - h e a d e r   . c a r d - t i t l e   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 l e t t e r - s p a c i n g :   - 0 . 3 p x ; 
 
         } 
 
         . c u s t o m - c a r d   . c a r d - h e a d e r   . c a r d - t i t l e   i   { 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
         } 
 
 
 
         / *   = = = = =   T A B L E S   = = = = =   * / 
 
         . d a s h - t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . d a s h - t a b l e   t h e a d   t h   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 c o l o r :   # 4 7 5 5 6 9 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 4 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
         } 
 
         . d a s h - t a b l e   t d   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 1 f 5 f 9 ; 
 
         } 
 
         . d a s h - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . b a d g e - s t a t u s   { 
 
                 p a d d i n g :   3 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   2 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
 
 
         / *   = = = = =   C U S T O M E R   I T E M S   = = = = =   * / 
 
         . c u s t o m e r - i t e m   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   1 0 p x ; 
 
         } 
 
         . c u s t o m e r - i t e m : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . c u s t o m e r - i t e m   . a v a t a r   { 
 
                 w i d t h :   3 4 p x ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 o b j e c t - f i t :   c o v e r ; 
 
                 b o r d e r :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 f l e x - s h r i n k :   0 ; 
 
         } 
 
         . c u s t o m e r - i t e m   . c u s t o m e r - n a m e   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 1 e 2 9 3 b ; 
 
         } 
 
         . c u s t o m e r - i t e m   . c u s t o m e r - p h o n e   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
         } 
 
         . c u s t o m e r - i t e m   . c u s t o m e r - d a t e   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 m a r g i n - l e f t :   a u t o ; 
 
         } 
 
 
 
         / *   = = = = =   C H A R T S   = = = = =   * / 
 
         . c h a r t - c o n t a i n e r   { 
 
                 h e i g h t :   2 4 0 p x ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
         } 
 
         . c h a r t - c o n t a i n e r - s m   { 
 
                 h e i g h t :   2 0 0 p x ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
         } 
 
 
 
         / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
               R E S P O N S I V E 
 
               = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . d a s h - h e a d e r   {   p a d d i n g :   1 6 p x   1 8 p x ;   } 
 
                 . d a s h - h e a d e r   . g r e e t i n g   {   f o n t - s i z e :   1 7 p x ;   } 
 
                 . p e r i o d - c a r d   . p - n u m b e r   {   f o n t - s i z e :   2 2 p x ;   } 
 
                 . s t a t - c a r d   . s t a t - n u m b e r   {   f o n t - s i z e :   1 8 p x ;   } 
 
                 . s t a t - c a r d   . s t a t - i c o n   {   w i d t h :   3 6 p x ;   h e i g h t :   3 6 p x ;   f o n t - s i z e :   1 5 p x ;   } 
 
                 . c h a r t - c o n t a i n e r   {   h e i g h t :   1 8 0 p x ;   } 
 
                 . c h a r t - c o n t a i n e r - s m   {   h e i g h t :   1 6 0 p x ;   } 
 
                 . d a s h - t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . c u s t o m e r - i t e m   . a v a t a r   {   w i d t h :   2 8 p x ;   h e i g h t :   2 8 p x ;   } 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   5 7 6 p x )   { 
 
                 . p e r i o d - c a r d   . p - n u m b e r   {   f o n t - s i z e :   1 8 p x ;   } 
 
                 . s t a t - c a r d   . s t a t - n u m b e r   {   f o n t - s i z e :   1 5 p x ;   } 
 
                 . s t a t - c a r d   . s t a t - i c o n   {   w i d t h :   3 0 p x ;   h e i g h t :   3 0 p x ;   f o n t - s i z e :   1 3 p x ;   } 
 
                 . s t a t - c a r d   {   p a d d i n g :   1 0 p x   1 4 p x ;   } 
 
                 . d a s h - h e a d e r   . d a t e - b o x   . d a y   {   f o n t - s i z e :   1 6 p x ;   } 
 
         } 
 
 
 
         / *   = = = = =   S C R O L L B A R   = = = = =   * / 
 
         . s c r o l l a b l e - c u s t o m e r s : : - w e b k i t - s c r o l l b a r   {   w i d t h :   3 p x ;   } 
 
         . s c r o l l a b l e - c u s t o m e r s : : - w e b k i t - s c r o l l b a r - t h u m b   {   b a c k g r o u n d :   # c b d 5 e 1 ;   b o r d e r - r a d i u s :   1 0 p x ;   } 
 
         . s c r o l l a b l e - c u s t o m e r s : : - w e b k i t - s c r o l l b a r - t r a c k   {   b a c k g r o u n d :   t r a n s p a r e n t ;   } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " d a s h b o a r d - c o n t a i n e r " > 
 
 
 
         < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         H E A D E R 
 
         = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
         < d i v   c l a s s = " d a s h - h e a d e r " > 
 
                 < d i v   c l a s s = " r o w   a l i g n - i t e m s - c e n t e r " > 
 
                         < d i v   c l a s s = " c o l - m d - 8 " > 
 
                                 < d i v   c l a s s = " g r e e t i n g " > 
 
                                         < i   c l a s s = " f a s   f a - h a n d - p e a c e   m e - 2 " > < / i > 
 
                                         < ? p h p   
 
                                         $ h o u r   =   d a t e ( ' H ' ) ; 
 
                                         i f   ( $ h o u r   <   1 2 )   e c h o   ' G o o d   M o r n i n g ' ; 
 
                                         e l s e i f   ( $ h o u r   <   1 7 )   e c h o   ' G o o d   A f t e r n o o n ' ; 
 
                                         e l s e   e c h o   ' G o o d   E v e n i n g ' ; 
 
                                         ? > , 
 
                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' f u l l _ n a m e ' ]   ? ?   ' U s e r ' ) ;   ? > ! 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s u b - t e x t " > 
 
                                         < i   c l a s s = " f a s   f a - c h a r t - l i n e   m e - 1 " > < / i > 
 
                                         H e r e ' s   y o u r   b u s i n e s s   o v e r v i e w   f o r   t o d a y . 
 
                                         < ? p h p   i f   ( ! $ i s _ s u p e r a d m i n   & &   i s s e t ( $ c o m p a n y ) ) :   ? > 
 
                                                 < s p a n   c l a s s = " m s - 2 " > |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > < / s p a n > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 4   t e x t - m d - e n d   m t - 2   m t - m d - 0 " > 
 
                                 < d i v   c l a s s = " d a t e - b o x   d - i n l i n e - b l o c k " > 
 
                                         < d i v   c l a s s = " d a y " > < ? p h p   e c h o   d a t e ( ' d ' ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " m o n t h " > < ? p h p   e c h o   d a t e ( ' M   Y ' ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         T I M E   P E R I O D   C A R D S   ( T O D A Y   |   T H I S   M O N T H   |   T H I S   Y E A R ) 
 
         = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
         < d i v   c l a s s = " r o w   g - 3   m b - 4 " > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - 1 2 " > 
 
                         < d i v   c l a s s = " p e r i o d - c a r d   t o d a y " > 
 
                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " p - l a b e l " > < i   c l a s s = " f a s   f a - c a l e n d a r - d a y   m e - 1 " > < / i > T o d a y < / d i v > 
 
                                                 < d i v   c l a s s = " p - n u m b e r " > < ? p h p   e c h o   $ t o d a y _ o r d e r s ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " p - s u b " > O r d e r s       R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ d a i l y _ c a s h ,   0 ) ;   ? > < / d i v > 
 
                                         < / d i v > 
 
                                         < d i v   s t y l e = " f o n t - s i z e : 3 2 p x ;   o p a c i t y : 0 . 3 ; " > 
 
                                                 < i   c l a s s = " f a s   f a - s u n " > < / i > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - 1 2 " > 
 
                         < d i v   c l a s s = " p e r i o d - c a r d   m o n t h " > 
 
                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " p - l a b e l " > < i   c l a s s = " f a s   f a - c a l e n d a r - a l t   m e - 1 " > < / i > T h i s   M o n t h < / d i v > 
 
                                                 < d i v   c l a s s = " p - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ o r d e r s _ m o n t h ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " p - s u b " > O r d e r s       R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e v e n u e _ m o n t h ,   0 ) ;   ? > < / d i v > 
 
                                         < / d i v > 
 
                                         < d i v   s t y l e = " f o n t - s i z e : 3 2 p x ;   o p a c i t y : 0 . 3 ; " > 
 
                                                 < i   c l a s s = " f a s   f a - c a l e n d a r - c h e c k " > < / i > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - 1 2 " > 
 
                         < d i v   c l a s s = " p e r i o d - c a r d   y e a r " > 
 
                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " p - l a b e l " > < i   c l a s s = " f a s   f a - c a l e n d a r - a l t   m e - 1 " > < / i > T h i s   Y e a r < / d i v > 
 
                                                 < d i v   c l a s s = " p - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ o r d e r s _ y e a r ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " p - s u b " > O r d e r s       R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e v e n u e _ y e a r ,   0 ) ;   ? > < / d i v > 
 
                                         < / d i v > 
 
                                         < d i v   s t y l e = " f o n t - s i z e : 3 2 p x ;   o p a c i t y : 0 . 3 ; " > 
 
                                                 < i   c l a s s = " f a s   f a - c a l e n d a r - a l t " > < / i > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         S T A T S   C A R D S   ( C o m p a c t   &   G l o w i n g ) 
 
         = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
         < d i v   c l a s s = " r o w   g - 2   m b - 4 " > 
 
                 
 
                 < ? p h p   i f   ( $ i s _ s u p e r a d m i n ) :   ? > 
 
                         < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " s t a t - c a r d   g l o w - p u r p l e " > 
 
                                         < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                                 < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - b u i l d i n g " > < / i > < / d i v > 
 
                                                 < d i v > 
 
                                                         < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ c o m p a n i e s ;   ? > < / d i v > 
 
                                                         < d i v   c l a s s = " s t a t - l a b e l " > C o m p a n i e s < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " s t a t - c a r d   g l o w - p i n k " > 
 
                                         < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                                 < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - u s e r s - c o g " > < / i > < / d i v > 
 
                                                 < d i v > 
 
                                                         < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ u s e r s ;   ? > < / d i v > 
 
                                                         < d i v   c l a s s = " s t a t - l a b e l " > U s e r s < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - b l u e " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - c a l e n d a r - d a y " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o d a y _ o r d e r s ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > T o d a y   O r d e r s < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - g r e e n " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - c h e c k - c i r c l e " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o d a y _ d e l i v e r e d ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > T o d a y   D e l i v e r e d < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - g o l d " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ o r d e r s ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > T o t a l   O r d e r s < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - i n d i g o " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - t s h i r t " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ s u i t s ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > T o t a l   S u i t s < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - e m e r a l d " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - c h e c k - d o u b l e " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ d e l i v e r e d _ s u i t s ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > D e l i v e r e d   S u i t s < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - r e d " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - c u t " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o d a y _ c u t t i n g _ s u i t s ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > T o d a y   C u t t i n g < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - t e a l " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - u s e r - t i e " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > < ? p h p   e c h o   $ t o t a l _ e m p l o y e e s ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > E m p l o y e e s < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d   g l o w - c y a n " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                         < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - h a n d - h o l d i n g - u s d " > < / i > < / d i v > 
 
                                         < d i v > 
 
                                                 < d i v   c l a s s = " s t a t - n u m b e r " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ d a i l y _ c a s h ,   0 ) ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " s t a t - l a b e l " > T o d a y   C o l l e c t i o n < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( ! $ i s _ s u p e r a d m i n ) :   ? > 
 
                         < d i v   c l a s s = " c o l - 6   c o l - l g - 3   c o l - m d - 4 " > 
 
                                 < d i v   c l a s s = " s t a t - c a r d   g l o w - g o l d " > 
 
                                         < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                                 < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - w a l l e t " > < / i > < / d i v > 
 
                                                 < d i v > 
 
                                                         < d i v   c l a s s = " s t a t - n u m b e r " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e v e n u e ,   0 ) ;   ? > < / d i v > 
 
                                                         < d i v   c l a s s = " s t a t - l a b e l " > R e v e n u e < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( $ i s _ s u p e r a d m i n ) :   ? > 
 
                         < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " s t a t - c a r d   g l o w - g o l d " > 
 
                                         < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                                 < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - w a l l e t " > < / i > < / d i v > 
 
                                                 < d i v > 
 
                                                         < d i v   c l a s s = " s t a t - n u m b e r " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e v e n u e ,   0 ) ;   ? > < / d i v > 
 
                                                         < d i v   c l a s s = " s t a t - l a b e l " > R e v e n u e < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - 6   c o l - l g - 2   c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " s t a t - c a r d   g l o w - r e d " > 
 
                                         < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 2 " > 
 
                                                 < d i v   c l a s s = " s t a t - i c o n " > < i   c l a s s = " f a s   f a - e x c l a m a t i o n - t r i a n g l e " > < / i > < / d i v > 
 
                                                 < d i v > 
 
                                                         < d i v   c l a s s = " s t a t - n u m b e r " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d u e ,   0 ) ;   ? > < / d i v > 
 
                                                         < d i v   c l a s s = " s t a t - l a b e l " > D u e < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         C H A R T S 
 
         = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
         < d i v   c l a s s = " r o w   g - 3   m b - 4 " > 
 
                 < d i v   c l a s s = " c o l - l g - 8 " > 
 
                         < d i v   c l a s s = " c u s t o m - c a r d " > 
 
                                 < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                                         < h 6   c l a s s = " c a r d - t i t l e " > < i   c l a s s = " f a s   f a - c h a r t - l i n e   m e - 2 " > < / i > M o n t h l y   O r d e r s   &   R e v e n u e < / h 6 > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - p r i m a r y   b g - o p a c i t y - 1 0   t e x t - p r i m a r y   p x - 3   p y - 1 " > < ? p h p   e c h o   d a t e ( ' Y ' ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c a r d - b o d y " > 
 
                                         < d i v   c l a s s = " c h a r t - c o n t a i n e r " > 
 
                                                 < c a n v a s   i d = " m o n t h l y C h a r t " > < / c a n v a s > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c o l - l g - 4 " > 
 
                         < d i v   c l a s s = " c u s t o m - c a r d " > 
 
                                 < d i v   c l a s s = " c a r d - h e a d e r " > 
 
                                         < h 6   c l a s s = " c a r d - t i t l e " > < i   c l a s s = " f a s   f a - c h a r t - p i e   m e - 2 " > < / i > O r d e r   S t a t u s < / h 6 > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c a r d - b o d y " > 
 
                                         < d i v   c l a s s = " c h a r t - c o n t a i n e r - s m " > 
 
                                                 < c a n v a s   i d = " s t a t u s C h a r t " > < / c a n v a s > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m t - 2   t e x t - c e n t e r   d - f l e x   f l e x - w r a p   j u s t i f y - c o n t e n t - c e n t e r   g a p - 1 " > 
 
                                                 < ? p h p   
 
                                                 $ h a s _ s t a t u s _ d a t a   =   f a l s e ; 
 
                                                 f o r e a c h   ( $ s t a t u s _ d a t a   a s   $ s t a t u s   = >   $ c o u n t ) :   
 
                                                         i f   ( $ c o u n t   >   0 ) :   $ h a s _ s t a t u s _ d a t a   =   t r u e ;   ? > 
 
                                                                 < s p a n   c l a s s = " b a d g e   r o u n d e d - p i l l   p x - 2   p y - 1 "   s t y l e = " b a c k g r o u n d : < ? p h p   e c h o   $ s t a t u s _ c o l o r s [ $ s t a t u s ]   ? ?   ' # 6 C 7 5 7 D ' ;   ? > ;   c o l o r : # f f f ;   f o n t - s i z e : 9 p x ; " > 
 
                                                                         < ? p h p   e c h o   u c f i r s t ( $ s t a t u s ) ;   ? > :   < ? p h p   e c h o   $ c o u n t ;   ? > 
 
                                                                 < / s p a n > 
 
                                                         < ? p h p   e n d i f ;   ? > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < ? p h p   i f   ( ! $ h a s _ s t a t u s _ d a t a ) :   ? > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d   s m a l l " > N o   o r d e r   d a t a   a v a i l a b l e < / s p a n > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         R E C E N T   O R D E R S   &   C U S T O M E R S 
 
         = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
         < d i v   c l a s s = " r o w   g - 3 " > 
 
                 < d i v   c l a s s = " c o l - l g - 7 " > 
 
                         < d i v   c l a s s = " c u s t o m - c a r d " > 
 
                                 < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                                         < h 6   c l a s s = " c a r d - t i t l e " > < i   c l a s s = " f a s   f a - c l o c k   m e - 2 " > < / i > R e c e n t   O r d e r s < / h 6 > 
 
                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r s "   c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l   p x - 3   p y - 1 "   s t y l e = " f o n t - s i z e : 1 1 p x ; " > 
 
                                                 V i e w   A l l   < i   c l a s s = " f a s   f a - a r r o w - r i g h t   m s - 1 " > < / i > 
 
                                         < / a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c a r d - b o d y   p - 0 " > 
 
                                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                                 < t a b l e   c l a s s = " t a b l e   d a s h - t a b l e   m b - 0 " > 
 
                                                         < t h e a d > 
 
                                                                 < t r > 
 
                                                                         < t h > O r d e r < / t h > 
 
                                                                         < t h > C u s t o m e r < / t h > 
 
                                                                         < t h > D a t e < / t h > 
 
                                                                         < t h > A m o u n t < / t h > 
 
                                                                         < t h > S t a t u s < / t h > 
 
                                                                         < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                                                 < / t r > 
 
                                                         < / t h e a d > 
 
                                                         < t b o d y > 
 
                                                                 < ? p h p   i f   ( e m p t y ( $ r e c e n t _ o r d e r s ) ) :   ? > 
 
                                                                         < t r > 
 
                                                                                 < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > N o   o r d e r s   f o u n d . < / t d > 
 
                                                                         < / t r > 
 
                                                                 < ? p h p   e l s e :   ? > 
 
                                                                         < ? p h p   f o r e a c h   ( $ r e c e n t _ o r d e r s   a s   $ o ) :   ? > 
 
                                                                                 < t r > 
 
                                                                                         < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   t e x t - s e c o n d a r y " > # < ? p h p   e c h o   $ o [ ' i d ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                                         < t d > < ? p h p   e c h o   d a t e ( ' d   M ' ,   s t r t o t i m e ( $ o [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                                         < t d > < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o [ ' n e t _ a m o u n t ' ]   ? ?   0 ,   0 ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                                         < t d > 
 
                                                                                                 < s p a n   c l a s s = " b a d g e   b a d g e - s t a t u s   b g - < ? p h p   e c h o   $ o [ ' s t a t u s ' ] = = ' p e n d i n g ' ? ' w a r n i n g ' : ( $ o [ ' s t a t u s ' ] = = ' c u t t i n g ' ? ' i n f o ' : ( $ o [ ' s t a t u s ' ] = = ' s t i t c h i n g ' ? ' p r i m a r y ' : ( $ o [ ' s t a t u s ' ] = = ' r e a d y ' ? ' s e c o n d a r y ' : ( $ o [ ' s t a t u s ' ] = = ' d e l i v e r e d ' ? ' s u c c e s s ' : ' d a n g e r ' ) ) ) ) ;   ? > " > 
 
                                                                                                         < ? p h p   e c h o   u c f i r s t ( $ o [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' ) ;   ? > 
 
                                                                                                 < / s p a n > 
 
                                                                                         < / t d > 
 
                                                                                         < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ v i e w & i d = < ? p h p   e c h o   $ o [ ' i d ' ] ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - i n f o   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 "   t a r g e t = " _ b l a n k "   t i t l e = " V i e w " > 
 
                                                                                                         < i   c l a s s = " f a s   f a - e y e " > < / i > 
 
                                                                                                 < / a > 
 
                                                                                         < / t d > 
 
                                                                                 < / t r > 
 
                                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                         < / t b o d y > 
 
                                                 < / t a b l e > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c o l - l g - 5 " > 
 
                         < d i v   c l a s s = " c u s t o m - c a r d " > 
 
                                 < d i v   c l a s s = " c a r d - h e a d e r " > 
 
                                         < h 6   c l a s s = " c a r d - t i t l e " > < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 2 " > < / i > R e c e n t   C u s t o m e r s < / h 6 > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c a r d - b o d y   p - 2   s c r o l l a b l e - c u s t o m e r s "   s t y l e = " m a x - h e i g h t :   2 8 0 p x ;   o v e r f l o w - y :   a u t o ; " > 
 
                                         < ? p h p   i f   ( e m p t y ( $ r e c e n t _ c u s t o m e r s ) ) :   ? > 
 
                                                 < p   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3   s m a l l " > N o   c u s t o m e r s   f o u n d . < / p > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ r e c e n t _ c u s t o m e r s   a s   $ c ) :   ? > 
 
                                                         < d i v   c l a s s = " c u s t o m e r - i t e m " > 
 
                                                                 < i m g   s r c = " < ? p h p   e c h o   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   ( $ c [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' ) ;   ? > "   
 
                                                                           c l a s s = " a v a t a r " 
 
                                                                           o n e r r o r = " t h i s . s r c = ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = < ? p h p   e c h o   u r l e n c o d e ( $ c [ ' n a m e ' ] ) ;   ? > & b a c k g r o u n d = 6 6 7 e e a & c o l o r = f f f & s i z e = 4 0 ' " > 
 
                                                                 < d i v   c l a s s = " f l e x - g r o w - 1 " > 
 
                                                                         < d i v   c l a s s = " c u s t o m e r - n a m e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > < / d i v > 
 
                                                                         < d i v   c l a s s = " c u s t o m e r - p h o n e " > < i   c l a s s = " f a s   f a - p h o n e   m e - 1 " > < / i > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / d i v > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c u s t o m e r - d a t e " > 
 
                                                                         < ? p h p   e c h o   d a t e ( ' d   M ' ,   s t r t o t i m e ( $ c [ ' c r e a t e d _ a t ' ] ) ) ;   ? > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 C H A R T S   J A V A S C R I P T 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / c h a r t . j s " > < / s c r i p t > 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
 
 
         / /   = = = = =   M o n t h l y   C h a r t   = = = = = 
 
         v a r   m o n t h l y C t x   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' m o n t h l y C h a r t ' ) ; 
 
         i f   ( m o n t h l y C t x )   { 
 
                 n e w   C h a r t ( m o n t h l y C t x ,   { 
 
                         t y p e :   ' b a r ' , 
 
                         d a t a :   { 
 
                                 l a b e l s :   < ? p h p   e c h o   j s o n _ e n c o d e ( $ m o n t h _ n a m e s ) ;   ? > , 
 
                                 d a t a s e t s :   [ 
 
                                         { 
 
                                                 l a b e l :   ' O r d e r s ' , 
 
                                                 d a t a :   < ? p h p   e c h o   j s o n _ e n c o d e ( $ m o n t h l y _ c o u n t s _ a r r a y ) ;   ? > , 
 
                                                 b a c k g r o u n d C o l o r :   ' r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 7 ) ' , 
 
                                                 b o r d e r C o l o r :   ' # 6 6 7 e e a ' , 
 
                                                 b o r d e r W i d t h :   2 , 
 
                                                 b o r d e r R a d i u s :   4 , 
 
                                                 o r d e r :   2 , 
 
                                                 y A x i s I D :   ' y 1 ' 
 
                                         } , 
 
                                         { 
 
                                                 l a b e l :   ' R e v e n u e   ( R s . ) ' , 
 
                                                 d a t a :   < ? p h p   e c h o   j s o n _ e n c o d e ( $ m o n t h l y _ r e v e n u e _ a r r a y ) ;   ? > , 
 
                                                 t y p e :   ' l i n e ' , 
 
                                                 b o r d e r C o l o r :   ' # 2 2 c 5 5 e ' , 
 
                                                 b a c k g r o u n d C o l o r :   ' r g b a ( 3 4 ,   1 9 7 ,   9 4 ,   0 . 0 8 ) ' , 
 
                                                 f i l l :   t r u e , 
 
                                                 t e n s i o n :   0 . 4 , 
 
                                                 p o i n t B a c k g r o u n d C o l o r :   ' # 2 2 c 5 5 e ' , 
 
                                                 p o i n t B o r d e r C o l o r :   ' # f f f ' , 
 
                                                 p o i n t B o r d e r W i d t h :   2 , 
 
                                                 p o i n t R a d i u s :   4 , 
 
                                                 o r d e r :   1 , 
 
                                                 y A x i s I D :   ' y 2 ' 
 
                                         } 
 
                                 ] 
 
                         } , 
 
                         o p t i o n s :   { 
 
                                 r e s p o n s i v e :   t r u e , 
 
                                 m a i n t a i n A s p e c t R a t i o :   f a l s e , 
 
                                 p l u g i n s :   { 
 
                                         l e g e n d :   { 
 
                                                 p o s i t i o n :   ' t o p ' , 
 
                                                 l a b e l s :   { 
 
                                                         f o n t :   {   s i z e :   1 0 ,   w e i g h t :   ' 6 0 0 '   } , 
 
                                                         b o x W i d t h :   1 2 , 
 
                                                         p a d d i n g :   1 2 , 
 
                                                         u s e P o i n t S t y l e :   t r u e , 
 
                                                         p o i n t S t y l e :   ' c i r c l e ' 
 
                                                 } 
 
                                         } , 
 
                                         t o o l t i p :   { 
 
                                                 b a c k g r o u n d C o l o r :   ' r g b a ( 1 5 , 2 3 , 4 2 , 0 . 9 ) ' , 
 
                                                 t i t l e F o n t :   {   s i z e :   1 1   } , 
 
                                                 b o d y F o n t :   {   s i z e :   1 0   } , 
 
                                                 p a d d i n g :   8 , 
 
                                                 c o r n e r R a d i u s :   8 
 
                                         } 
 
                                 } , 
 
                                 s c a l e s :   { 
 
                                         y 1 :   { 
 
                                                 b e g i n A t Z e r o :   t r u e , 
 
                                                 p o s i t i o n :   ' l e f t ' , 
 
                                                 g r i d :   {   d r a w O n C h a r t A r e a :   f a l s e ,   c o l o r :   ' r g b a ( 0 , 0 , 0 , 0 . 0 4 ) '   } , 
 
                                                 t i c k s :   {   s t e p S i z e :   1 ,   f o n t :   {   s i z e :   9   }   } 
 
                                         } , 
 
                                         y 2 :   { 
 
                                                 b e g i n A t Z e r o :   t r u e , 
 
                                                 p o s i t i o n :   ' r i g h t ' , 
 
                                                 g r i d :   {   d r a w O n C h a r t A r e a :   f a l s e   } , 
 
                                                 t i c k s :   {   
 
                                                         c a l l b a c k :   f u n c t i o n ( v a l u e )   {   r e t u r n   ' R s . '   +   v a l u e . t o L o c a l e S t r i n g ( ) ;   } , 
 
                                                         f o n t :   {   s i z e :   9   } 
 
                                                 } 
 
                                         } 
 
                                 } 
 
                         } 
 
                 } ) ; 
 
         } 
 
 
 
         / /   = = = = =   S t a t u s   P i e   C h a r t   = = = = = 
 
         v a r   s t a t u s C t x   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s t a t u s C h a r t ' ) ; 
 
         i f   ( s t a t u s C t x )   { 
 
                 v a r   s t a t u s L a b e l s   =   [ ] ; 
 
                 v a r   s t a t u s C o u n t s   =   [ ] ; 
 
                 v a r   s t a t u s C o l o r s   =   [ ] ; 
 
 
 
                 < ? p h p   f o r e a c h   ( $ s t a t u s _ d a t a   a s   $ s t a t u s   = >   $ c o u n t ) :   ? > 
 
                         < ? p h p   i f   ( $ c o u n t   >   0 ) :   ? > 
 
                                 s t a t u s L a b e l s . p u s h ( ' < ? p h p   e c h o   u c f i r s t ( $ s t a t u s ) ;   ? > ' ) ; 
 
                                 s t a t u s C o u n t s . p u s h ( < ? p h p   e c h o   $ c o u n t ;   ? > ) ; 
 
                                 s t a t u s C o l o r s . p u s h ( ' < ? p h p   e c h o   $ s t a t u s _ c o l o r s [ $ s t a t u s ]   ? ?   " # 6 C 7 5 7 D " ;   ? > ' ) ; 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < ? p h p   e n d f o r e a c h ;   ? > 
 
 
 
                 i f   ( s t a t u s L a b e l s . l e n g t h   >   0 )   { 
 
                         n e w   C h a r t ( s t a t u s C t x ,   { 
 
                                 t y p e :   ' d o u g h n u t ' , 
 
                                 d a t a :   { 
 
                                         l a b e l s :   s t a t u s L a b e l s , 
 
                                         d a t a s e t s :   [ { 
 
                                                 d a t a :   s t a t u s C o u n t s , 
 
                                                 b a c k g r o u n d C o l o r :   s t a t u s C o l o r s , 
 
                                                 b o r d e r W i d t h :   3 , 
 
                                                 b o r d e r C o l o r :   ' # f f f ' , 
 
                                                 h o v e r O f f s e t :   8 
 
                                         } ] 
 
                                 } , 
 
                                 o p t i o n s :   { 
 
                                         r e s p o n s i v e :   t r u e , 
 
                                         m a i n t a i n A s p e c t R a t i o :   f a l s e , 
 
                                         c u t o u t :   ' 6 5 % ' , 
 
                                         p l u g i n s :   { 
 
                                                 l e g e n d :   { 
 
                                                         p o s i t i o n :   ' b o t t o m ' , 
 
                                                         l a b e l s :   { 
 
                                                                 f o n t :   {   s i z e :   9 ,   w e i g h t :   ' 5 0 0 '   } , 
 
                                                                 p a d d i n g :   8 , 
 
                                                                 u s e P o i n t S t y l e :   t r u e , 
 
                                                                 p o i n t S t y l e :   ' c i r c l e ' , 
 
                                                                 b o x W i d t h :   8 
 
                                                         } 
 
                                                 } 
 
                                         } 
 
                                 } 
 
                         } ) ; 
 
                 }   e l s e   { 
 
                         s t a t u s C t x . p a r e n t E l e m e n t . i n n e r H T M L   =   ' < p   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 4 "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > N o   o r d e r   s t a t u s   d a t a   a v a i l a b l e . < / p > ' ; 
 
                 } 
 
         } 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < ? p h p 
 
 / * * 
 
   *   I m p o r t   M e a s u r e m e n t s   f r o m   C S V 
 
   *   P l a c e   t h i s   f i l e   i n   y o u r   p r o j e c t   r o o t   a n d   r u n   i t 
 
   * / 
 
 
 
 r e q u i r e _ o n c e   ' a p p / c o n f i g / d a t a b a s e . p h p ' ; 
 
 r e q u i r e _ o n c e   ' a p p / c o r e / A u t h . p h p ' ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   C O N F I G U R A T I O N 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 $ c s v _ f i l e   =   ' M A P . c s v ' ;   / /   C h a n g e   t o   y o u r   C S V   f i l e   p a t h 
 
 $ c o m p a n y _ i d   =   1 ;   / /   D e f a u l t   c o m p a n y   I D 
 
 $ i m p o r t e d   =   0 ; 
 
 $ s k i p p e d   =   0 ; 
 
 $ e r r o r s   =   [ ] ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   R E A D   C S V   F I L E 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 i f   ( ! f i l e _ e x i s t s ( $ c s v _ f i l e ) )   { 
 
         d i e ( " C S V   f i l e   n o t   f o u n d :   "   .   $ c s v _ f i l e ) ; 
 
 } 
 
 
 
 $ h a n d l e   =   f o p e n ( $ c s v _ f i l e ,   ' r ' ) ; 
 
 i f   ( ! $ h a n d l e )   { 
 
         d i e ( " C a n n o t   o p e n   C S V   f i l e . " ) ; 
 
 } 
 
 
 
 / /   G e t   h e a d e r s 
 
 $ h e a d e r s   =   f g e t c s v ( $ h a n d l e ) ; 
 
 i f   ( ! $ h e a d e r s )   { 
 
         d i e ( " E m p t y   C S V   f i l e . " ) ; 
 
 } 
 
 
 
 / /   M a p   C S V   c o l u m n s   t o   d a t a b a s e   f i e l d s 
 
 $ c o l u m n _ m a p   =   [ 
 
         ' C U S   I D '   = >   ' c u s t o m e r _ n o ' , 
 
         ' L E N G T H '   = >   ' l e n g t h ' , 
 
         ' S L E E V E '   = >   ' s l e e v e ' , 
 
         ' S H O U L D E R '   = >   ' s h o u l d e r ' , 
 
         ' C O L L A R '   = >   ' c o l l a r ' , 
 
         ' S H E R W A N I '   = >   ' s h e r w a n i ' , 
 
         ' C H E S T '   = >   ' c h e s t ' , 
 
         ' W A I S T '   = >   ' w a i s t ' , 
 
         ' L O O S I N G '   = >   ' l o o s i n g ' , 
 
         ' C U F F _ L E N G T H '   = >   ' c u f f _ l e n g t h ' , 
 
         ' C U F F _ W I D T H '   = >   ' c u f f _ w i d t h ' , 
 
         ' S I D E P O C K E T '   = >   ' s i d e p o c k e t ' , 
 
         ' F R O N T P O C K E T '   = >   ' f r o n t p o c k e t ' , 
 
         ' S H A L W A R P O C K E T '   = >   ' s h a l w a r p o c k e t ' , 
 
         ' S H A L W A R _ L E N G T H '   = >   ' s h a l w a r _ l e n g t h ' , 
 
         ' S H A L W A R _ B O T T O M '   = >   ' s h a l w a r _ b o t t o m ' , 
 
         ' C R E A T E D _ A T '   = >   ' c r e a t e d _ a t ' , 
 
         ' R E M A R K S '   = >   ' r e m a r k s ' , 
 
         ' N o t e s '   = >   ' n o t e s ' 
 
 ] ; 
 
 
 
 / /   F i n d   c o l u m n   i n d e x e s 
 
 $ c o l _ i n d e x e s   =   [ ] ; 
 
 f o r e a c h   ( $ h e a d e r s   a s   $ i n d e x   = >   $ h e a d e r )   { 
 
         $ h e a d e r   =   t r i m ( $ h e a d e r ) ; 
 
         i f   ( i s s e t ( $ c o l u m n _ m a p [ $ h e a d e r ] ) )   { 
 
                 $ c o l _ i n d e x e s [ $ h e a d e r ]   =   $ i n d e x ; 
 
         } 
 
 } 
 
 
 
 i f   ( e m p t y ( $ c o l _ i n d e x e s ) )   { 
 
         d i e ( " N o   m a t c h i n g   c o l u m n s   f o u n d   i n   C S V .   H e a d e r s :   "   .   i m p l o d e ( ' ,   ' ,   $ h e a d e r s ) ) ; 
 
 } 
 
 
 
 e c h o   " F o u n d   c o l u m n s :   "   .   i m p l o d e ( ' ,   ' ,   a r r a y _ k e y s ( $ c o l _ i n d e x e s ) )   .   " \ n \ n " ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   I M P O R T   D A T A 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 $ d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
 
 
 t r y   { 
 
         w h i l e   ( ( $ r o w   =   f g e t c s v ( $ h a n d l e ) )   ! = =   f a l s e )   { 
 
                 / /   S k i p   e m p t y   r o w s 
 
                 i f   ( e m p t y ( a r r a y _ f i l t e r ( $ r o w ) ) )   c o n t i n u e ; 
 
                 
 
                 / /   G e t   c u s t o m e r _ n o 
 
                 $ c u s t o m e r _ n o   =   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' C U S   I D ' ] ]   ? ?   ' ' ) ; 
 
                 i f   ( e m p t y ( $ c u s t o m e r _ n o ) )   { 
 
                         $ s k i p p e d + + ; 
 
                         c o n t i n u e ; 
 
                 } 
 
                 
 
                 / /   G e t   c u s t o m e r _ i d   f r o m   d a t a b a s e 
 
                 $ s t m t   =   $ d b - > p r e p a r e ( " S E L E C T   i d   F R O M   c u s t o m e r s   W H E R E   c u s t o m e r _ n o   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ n o ,   $ c o m p a n y _ i d ] ) ; 
 
                 $ c u s t o m e r   =   $ s t m t - > f e t c h ( ) ; 
 
                 
 
                 i f   ( ! $ c u s t o m e r )   { 
 
                         e c h o   " C u s t o m e r   n o t   f o u n d :   $ c u s t o m e r _ n o \ n " ; 
 
                         $ s k i p p e d + + ; 
 
                         c o n t i n u e ; 
 
                 } 
 
                 
 
                 $ c u s t o m e r _ i d   =   $ c u s t o m e r [ ' i d ' ] ; 
 
                 
 
                 / /   B u i l d   m e a s u r e m e n t   d a t a 
 
                 $ d a t a   =   [ 
 
                         ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                         ' c o m p a n y _ i d '   = >   $ c o m p a n y _ i d , 
 
                         ' c h e s t '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' C H E S T ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' w a i s t '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' W A I S T ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' l o o s i n g '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' L O O S I N G ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' c u f f _ l e n g t h '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' C U F F _ L E N G T H ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' c u f f _ w i d t h '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' C U F F _ W I D T H ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' s i d e p o c k e t '   = >   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' S I D E P O C K E T ' ] ]   ? ?   ' ' )   ? :   n u l l , 
 
                         ' f r o n t p o c k e t '   = >   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' F R O N T P O C K E T ' ] ]   ? ?   ' ' )   ? :   n u l l , 
 
                         ' s h a l w a r p o c k e t '   = >   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' S H A L W A R P O C K E T ' ] ]   ? ?   ' ' )   ? :   n u l l , 
 
                         ' s h a l w a r _ l e n g t h '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' S H A L W A R _ L E N G T H ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' s h a l w a r _ b o t t o m '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' S H A L W A R _ B O T T O M ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' s h o u l d e r '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' S H O U L D E R ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' s l e e v e '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' S L E E V E ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' l e n g t h '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' L E N G T H ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' c o l l a r '   = >   f l o a t v a l ( $ r o w [ $ c o l _ i n d e x e s [ ' C O L L A R ' ] ]   ? ?   0 )   ? :   n u l l , 
 
                         ' s h e r w a n i '   = >   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' S H E R W A N I ' ] ]   ? ?   ' ' )   ? :   n u l l , 
 
                         ' n o t e s '   = >   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' N o t e s ' ] ]   ? ?   ' ' )   ? :   n u l l , 
 
                         ' r e m a r k s '   = >   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' R E M A R K S ' ] ]   ? ?   ' ' )   ? :   n u l l , 
 
                         ' m e a s u r e d _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                 ] ; 
 
                 
 
                 / /   P a r s e   C R E A T E D _ A T   i f   e x i s t s 
 
                 i f   ( i s s e t ( $ c o l _ i n d e x e s [ ' C R E A T E D _ A T ' ] )   & &   ! e m p t y ( $ r o w [ $ c o l _ i n d e x e s [ ' C R E A T E D _ A T ' ] ] ) )   { 
 
                         $ d a t e _ s t r   =   t r i m ( $ r o w [ $ c o l _ i n d e x e s [ ' C R E A T E D _ A T ' ] ] ) ; 
 
                         / /   T r y   t o   p a r s e   d a t e   ( f o r m a t :   m / d / Y   H : i ) 
 
                         $ d a t e _ p a r t s   =   e x p l o d e ( '   ' ,   $ d a t e _ s t r ) ; 
 
                         i f   ( c o u n t ( $ d a t e _ p a r t s )   > =   1 )   { 
 
                                 $ d a t e _ o n l y   =   s t r _ r e p l a c e ( ' / ' ,   ' - ' ,   $ d a t e _ p a r t s [ 0 ] ) ; 
 
                                 $ t i m e s t a m p   =   s t r t o t i m e ( $ d a t e _ o n l y ) ; 
 
                                 i f   ( $ t i m e s t a m p   ! = =   f a l s e )   { 
 
                                         $ d a t a [ ' m e a s u r e d _ d a t e ' ]   =   d a t e ( ' Y - m - d ' ,   $ t i m e s t a m p ) ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 / /   I n s e r t   m e a s u r e m e n t 
 
                 $ s q l   =   " I N S E R T   I N T O   m e a s u r e m e n t s   ( 
 
                         c u s t o m e r _ i d ,   c h e s t ,   w a i s t ,   l o o s i n g ,   c u f f _ l e n g t h ,   c u f f _ w i d t h , 
 
                         s i d e p o c k e t ,   f r o n t p o c k e t ,   s h a l w a r p o c k e t ,   s h a l w a r _ l e n g t h ,   s h a l w a r _ b o t t o m , 
 
                         s h o u l d e r ,   s l e e v e ,   l e n g t h ,   c o l l a r ,   s h e r w a n i , 
 
                         n o t e s ,   r e m a r k s ,   m e a s u r e d _ d a t e ,   c o m p a n y _ i d ,   c r e a t e d _ a t 
 
                 )   V A L U E S   ( 
 
                         : c u s t o m e r _ i d ,   : c h e s t ,   : w a i s t ,   : l o o s i n g ,   : c u f f _ l e n g t h ,   : c u f f _ w i d t h , 
 
                         : s i d e p o c k e t ,   : f r o n t p o c k e t ,   : s h a l w a r p o c k e t ,   : s h a l w a r _ l e n g t h ,   : s h a l w a r _ b o t t o m , 
 
                         : s h o u l d e r ,   : s l e e v e ,   : l e n g t h ,   : c o l l a r ,   : s h e r w a n i , 
 
                         : n o t e s ,   : r e m a r k s ,   : m e a s u r e d _ d a t e ,   : c o m p a n y _ i d ,   N O W ( ) 
 
                 ) " ; 
 
                 
 
                 $ s t m t   =   $ d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ r e s u l t   =   $ s t m t - > e x e c u t e ( $ d a t a ) ; 
 
                 
 
                 i f   ( $ r e s u l t )   { 
 
                         $ i m p o r t e d + + ; 
 
                         e c h o   " I m p o r t e d :   $ c u s t o m e r _ n o \ n " ; 
 
                 }   e l s e   { 
 
                         $ e r r o r s [ ]   =   " F a i l e d   t o   i m p o r t :   $ c u s t o m e r _ n o " ; 
 
                 } 
 
         } 
 
         
 
         $ d b - > c o m m i t ( ) ; 
 
         
 
 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
         $ d b - > r o l l B a c k ( ) ; 
 
         d i e ( " E r r o r :   "   .   $ e - > g e t M e s s a g e ( ) ) ; 
 
 } 
 
 
 
 f c l o s e ( $ h a n d l e ) ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   S U M M A R Y 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 e c h o   " \ n "   .   s t r _ r e p e a t ( ' = ' ,   5 0 )   .   " \ n " ; 
 
 e c h o   " I M P O R T   S U M M A R Y \ n " ; 
 
 e c h o   s t r _ r e p e a t ( ' = ' ,   5 0 )   .   " \ n " ; 
 
 e c h o   " T o t a l   I m p o r t e d :   $ i m p o r t e d \ n " ; 
 
 e c h o   " T o t a l   S k i p p e d :   $ s k i p p e d \ n " ; 
 
 e c h o   " T o t a l   E r r o r s :   "   .   c o u n t ( $ e r r o r s )   .   " \ n " ; 
 
 
 
 i f   ( ! e m p t y ( $ e r r o r s ) )   { 
 
         e c h o   " \ n E r r o r s : \ n " ; 
 
         f o r e a c h   ( $ e r r o r s   a s   $ e r r )   { 
 
                 e c h o   "     -   $ e r r \ n " ; 
 
         } 
 
 } 
 
 
 
 e c h o   " \ n D o n e ! \ n " ; 
 
 ? > 
 
 < ? p h p 
 
 / * * 
 
   *   B i z T e c h   T a i l o r   -   M a i n   E n t r y   P o i n t   ( F r o n t   C o n t r o l l e r ) 
 
   *      &    &                 R                                   R     R  
 
   * / 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   1 .   E R R O R   R E P O R T I N G   ( D e v e l o p m e n t   M o d e ) 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 e r r o r _ r e p o r t i n g ( E _ A L L ) ; 
 
 i n i _ s e t ( ' d i s p l a y _ e r r o r s ' ,   1 ) ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   2 .   S T A R T   S E S S I O N 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 i f   ( s e s s i o n _ s t a t u s ( )   = = =   P H P _ S E S S I O N _ N O N E )   { 
 
         s e s s i o n _ s t a r t ( ) ; 
 
 } 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   3 .   C O N F I G U R A T I O N   &   D E P E N D E N C I E S 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 r e q u i r e _ o n c e   ' a p p / c o n f i g / d a t a b a s e . p h p ' ; 
 
 r e q u i r e _ o n c e   ' a p p / c o r e / A u t h . p h p ' ; 
 
 r e q u i r e _ o n c e   ' a p p / c o r e / H e l p e r . p h p ' ; 
 
 
 
 / /   S i m p l e   A u t o l o a d e r 
 
 s p l _ a u t o l o a d _ r e g i s t e r ( f u n c t i o n   ( $ c l a s s )   { 
 
         $ p a t h s   =   [ 
 
                 ' a p p / c o n t r o l l e r s / ' , 
 
                 ' a p p / m o d e l s / ' , 
 
                 ' a p p / c o r e / ' 
 
         ] ; 
 
         f o r e a c h   ( $ p a t h s   a s   $ p a t h )   { 
 
                 $ f i l e   =   _ _ D I R _ _   .   ' / '   .   $ p a t h   .   $ c l a s s   .   ' . p h p ' ; 
 
                 i f   ( f i l e _ e x i s t s ( $ f i l e ) )   { 
 
                         r e q u i r e   $ f i l e ; 
 
                         r e t u r n ; 
 
                 } 
 
         } 
 
 } ) ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   4 .   A U T H E N T I C A T I O N   C H E C K 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 / /   L o g i n   p a g e   k o   a l l o w   k a r e i n 
 
 $ p u b l i c _ a c t i o n s   =   [ ' l o g i n ' ,   ' l o g o u t ' ,   ' i n s t a l l ' ] ; 
 
 
 
 i f   ( ! i n _ a r r a y ( $ _ G E T [ ' a c t i o n ' ]   ? ?   ' d a s h b o a r d ' ,   $ p u b l i c _ a c t i o n s ) )   { 
 
         A u t h : : r e q u i r e L o g i n ( ) ; 
 
 } 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   5 .   G E T   R E Q U E S T   P A R A M E T E R S 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 $ a c t i o n   =   i s s e t ( $ _ G E T [ ' a c t i o n ' ] )   ?   $ _ G E T [ ' a c t i o n ' ]   :   ' d a s h b o a r d ' ; 
 
 $ i d   =   i s s e t ( $ _ G E T [ ' i d ' ] )   ?   ( i n t ) $ _ G E T [ ' i d ' ]   :   0 ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   6 .   R O U T I N G   -   S Y S T E M   M O D U L E S 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 s w i t c h   ( $ a c t i o n )   { 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1   A U T H E N T I C A T I O N 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' l o g i n ' : 
 
                 $ c o n t r o l l e r   =   n e w   L o g i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' l o g o u t ' : 
 
                 A u t h : : l o g o u t ( ) ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = l o g i n ' ) ; 
 
                 e x i t ; 
 
 
 
         c a s e   ' i n s t a l l ' : 
 
                 $ c o n t r o l l e r   =   n e w   L o g i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n s t a l l ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2   D A S H B O A R D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' d a s h b o a r d ' : 
 
                 $ c o n t r o l l e r   =   n e w   D a s h b o a r d C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 3   C U S T O M E R S   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' c u s t o m e r s ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ p r o f i l e ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > p r o f i l e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ s e a r c h ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s e a r c h C u s t o m e r s ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 4   M E A S U R E M E N T S   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' m e a s u r e m e n t _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d M e a s u r e m e n t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' m e a s u r e m e n t _ e d i t ' : 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T '   & &   i s s e t ( $ _ P O S T [ ' m e a s u r e m e n t _ i d ' ] ) )   { 
 
                         $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                         $ c o n t r o l l e r - > e d i t M e a s u r e m e n t ( $ _ P O S T [ ' m e a s u r e m e n t _ i d ' ] ) ; 
 
                 }   e l s e   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                 } 
 
                 b r e a k ; 
 
 
 
         c a s e   ' m e a s u r e m e n t _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e M e a s u r e m e n t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' m e a s u r e m e n t _ p r i n t ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > m e a s u r e m e n t _ p r i n t ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 5   O R D E R S   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' o r d e r s ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' o r d e r _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' o r d e r _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' o r d e r _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' o r d e r _ v i e w ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > v i e w ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' o r d e r _ s e a r c h ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s e a r c h O r d e r s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' o r d e r _ r e c e i p t ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > o r d e r _ r e c e i p t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' i n v o i c e ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n v o i c e ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' f i n a l _ i n v o i c e ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > f i n a l _ i n v o i c e ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 6   C U T T I N G   M O D U L E   (  S&   S u i t - w i s e ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' c u t t i n g ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u t t i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   2 :   P e n d i n g   C u t t i n g   S u i t s   ( s t a t u s   =   ' p e n d i n g ' ) 
 
         c a s e   ' c u t t i n g _ p e n d i n g ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u t t i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > p e n d i n g ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   2 :   A s s i g n   C u t t i n g   S u i t   ( s t a t u s   - >   ' c u t t i n g ' ) 
 
         c a s e   ' c u t t i n g _ a s s i g n ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u t t i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a s s i g n ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   3 :   A s s i g n e d   C u t t i n g   S u i t s   ( s t a t u s   =   ' c u t t i n g '   A N D   c u t t i n g _ c o m p l e t e d _ d a t e   I S   N U L L ) 
 
         c a s e   ' c u t t i n g _ a s s i g n e d ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u t t i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a s s i g n e d ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   3 :   C o m p l e t e   C u t t i n g   ( s t a t u s   r e m a i n s   ' c u t t i n g ' ,   s e t   c o m p l e t e d   d a t e ) 
 
         c a s e   ' c u t t i n g _ c o m p l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u t t i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c o m p l e t e ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u t t i n g _ r e p o r t ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u t t i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r e p o r t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u t t i n g _ s l i p ' : 
 
                 $ c o n t r o l l e r   =   n e w   C u t t i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s l i p ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 7   S T I T C H I N G   M O D U L E   (  S&   S u i t - w i s e ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' s t i t c h i n g ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   4 :   P e n d i n g   S t i t c h i n g   S u i t s   ( s t a t u s   =   ' c u t t i n g '   A N D   c u t t i n g _ c o m p l e t e d _ d a t e   I S   N O T   N U L L ) 
 
         c a s e   ' s t i t c h i n g _ p e n d i n g ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > p e n d i n g ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   5 :   A s s i g n   S t i t c h i n g   S u i t   ( s t a t u s   - >   ' s t i t c h i n g ' ) 
 
         c a s e   ' s t i t c h i n g _ a s s i g n ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a s s i g n ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   5 :   A s s i g n e d   S t i t c h i n g   S u i t s   ( s t a t u s   =   ' s t i t c h i n g ' ) 
 
         c a s e   ' s t i t c h i n g _ a s s i g n e d ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a s s i g n e d ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   6 :   C o m p l e t e   S t i t c h i n g   F o r m   ( S h e l f   s e l e c t i o n ) 
 
         c a s e   ' s t i t c h i n g _ c o m p l e t e _ f o r m ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c o m p l e t e F o r m ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S T E P   6 :   C o m p l e t e   S t i t c h i n g   ( s t a t u s   - >   ' r e a d y ' ) 
 
         c a s e   ' s t i t c h i n g _ c o m p l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c o m p l e t e ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s t i t c h i n g _ r e p o r t ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r e p o r t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s t i t c h i n g _ s l i p ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s l i p ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s t i t c h i n g _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 8   D E L I V E R Y   M O D U L E   (  S&   S u i t - w i s e   +   O r d e r - w i s e ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' d e l i v e r y ' : 
 
                 $ c o n t r o l l e r   =   n e w   D e l i v e r y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S u i t - w i s e   d e l i v e r y   r e a d y 
 
         c a s e   ' s u i t _ d e l i v e r y _ r e a d y ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ d e l i v e r y _ r e a d y ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   S u i t - w i s e   d e l i v e r 
 
         c a s e   ' s u i t _ d e l i v e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ d e l i v e r ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   O r d e r - w i s e   d e l i v e r y 
 
         c a s e   ' d e l i v e r y _ d e l i v e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   D e l i v e r y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l i v e r ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' d e l i v e r y _ p r o c e s s ' : 
 
                 $ c o n t r o l l e r   =   n e w   D e l i v e r y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > p r o c e s s D e l i v e r y ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' d e l i v e r y _ s l i p ' : 
 
                 $ c o n t r o l l e r   =   n e w   D e l i v e r y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s l i p ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' d e l i v e r y _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   D e l i v e r y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 9   E M P L O Y E E S   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' e m p l o y e e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ v i e w ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > v i e w ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ c a t e g o r i e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c a t e g o r i e s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ c a t e g o r y _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c a t e g o r y _ a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ c a t e g o r y _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c a t e g o r y _ e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ c a t e g o r y _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c a t e g o r y _ d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ g e n e r a t e _ s a l a r y ' : 
 
                 $ c o n t r o l l e r   =   n e w   E m p l o y e e C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > g e n e r a t e _ s a l a r y ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 0   L E D G E R   /   A C C O U N T I N G   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' l e d g e r s ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ l e d g e r _ l i s t ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c u s t o m e r L i s t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ l e d g e r _ l i s t ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e m p l o y e e L i s t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ l e d g e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c u s t o m e r ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ l e d g e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e m p l o y e e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c a s h _ l e d g e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c a s h L e d g e r ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r e c e i v e _ p a y m e n t ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r e c e i v e P a y m e n t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ p a y m e n t ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e m p l o y e e P a y m e n t ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' p r i n t _ l e d g e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > p r i n t L e d g e r ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' e m p l o y e e _ v o u c h e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e m p l o y e e V o u c h e r ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 1   C O M P A N I E S   M O D U L E   ( S u p e r   A d m i n   O n l y ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' c o m p a n i e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   C o m p a n y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c o m p a n y _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   C o m p a n y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c o m p a n y _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   C o m p a n y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c o m p a n y _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   C o m p a n y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c o m p a n y _ v i e w ' : 
 
                 $ c o n t r o l l e r   =   n e w   C o m p a n y C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > v i e w ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 2   R A T E S   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' r a t e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r a t e s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r a t e _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r a t e _ a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r a t e _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r a t e _ e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r a t e _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r a t e _ d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 3   R E P O R T S   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' r e p o r t s ' : 
 
                 $ c o n t r o l l e r   =   n e w   R e p o r t s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r e p o r t _ s a l e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   R e p o r t s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s a l e s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r e p o r t _ r e v e n u e ' : 
 
                 $ c o n t r o l l e r   =   n e w   R e p o r t s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > r e v e n u e ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r e p o r t _ c u s t o m e r s ' : 
 
                 $ c o n t r o l l e r   =   n e w   R e p o r t s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c u s t o m e r s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r e p o r t _ e m p l o y e e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   R e p o r t s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e m p l o y e e s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r e p o r t _ s u i t s ' : 
 
                 $ c o n t r o l l e r   =   n e w   R e p o r t s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' r e p o r t _ c a s h ' : 
 
                 $ c o n t r o l l e r   =   n e w   R e p o r t s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c a s h ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 4   S E T T I N G S   M O D U L E   ( S u p e r   A d m i n   +   A d m i n ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' s e t t i n g s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c o m p a n y _ s e t t i n g s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c o m p a n y ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s y s t e m _ s e t t i n g s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s y s t e m ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' i n v o i c e _ s e t t i n g s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n v o i c e ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 5   U S E R   M A N A G E M E N T   ( S u p e r   A d m i n   O n l y ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' u s e r s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > u s e r s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' u s e r _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > u s e r _ a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' u s e r _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > u s e r _ e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' d e l e t e _ u s e r ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e U s e r ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 6   B A C K U P   S E T T I N G S   ( S u p e r   A d m i n   O n l y ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' b a c k u p ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > b a c k u p ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' b a c k u p _ c r e a t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c r e a t e B a c k u p ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' b a c k u p _ d o w n l o a d ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d o w n l o a d B a c k u p ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' b a c k u p _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e B a c k u p ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 7   S H E L F   M A N A G E M E N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' s h e l v e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s h e l v e s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s h e l f _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s h e l f _ a d d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s h e l f _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s h e l f _ e d i t ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s h e l f _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s h e l f _ d e l e t e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 8   L A N G U A G E   S E T T I N G S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' l a n g u a g e _ s e t t i n g s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S e t t i n g s C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > l a n g u a g e ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 1 9   O R D E R   T R A C K I N G 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' t r a c k ' : 
 
                 $ c o n t r o l l e r   =   n e w   T r a c k C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' t r a c k _ l i v e ' : 
 
                 $ c o n t r o l l e r   =   n e w   T r a c k C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > l i v e S e a r c h ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 0   A J A X   E N D P O I N T S   ( N o   L a y o u t ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' g e t _ m e a s u r e m e n t s ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > g e t M e a s u r e m e n t s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' g e t _ r a t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > g e t R a t e ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' g e t _ b a l a n c e _ a s _ o f ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > g e t B a l a n c e A s O f ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' g l o b a l _ s e a r c h ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > g l o b a l S e a r c h ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' g e t _ n o t i f i c a t i o n s ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > g e t N o t i f i c a t i o n s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' m a r k _ n o t i f i c a t i o n _ r e a d ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > m a r k N o t i f i c a t i o n R e a d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' m a r k _ a l l _ n o t i f i c a t i o n s _ r e a d ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > m a r k A l l N o t i f i c a t i o n s R e a d ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 1   A P I   E N D P O I N T S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' a p i _ c u s t o m e r _ s e a r c h ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a p i C u s t o m e r S e a r c h ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' a p i _ o r d e r _ s e a r c h ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a p i O r d e r S e a r c h ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 2   S U P E R   A D M I N   M O D U L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' s u p e r a d m i n ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > i n d e x ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ c o m p a n i e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c o m p a n i e s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ c o m p a n y _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d C o m p a n y ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ c o m p a n y _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e d i t C o m p a n y ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ c o m p a n y _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e C o m p a n y ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ p a c k a g e s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > p a c k a g e s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ p a c k a g e _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d P a c k a g e ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ p a c k a g e _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e d i t P a c k a g e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ p a c k a g e _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e P a c k a g e ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ u s e r s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > u s e r s ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ u s e r _ a d d ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > a d d U s e r ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ u s e r _ e d i t ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > e d i t U s e r ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ u s e r _ d e l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > d e l e t e U s e r ( $ i d ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u p e r a d m i n _ t o g g l e _ s t a t u s ' : 
 
                 $ c o n t r o l l e r   =   n e w   S u p e r A d m i n C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > t o g g l e S t a t u s ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 3   L E D G E R   F O R M   ( S e l e c t   C u s t o m e r   +   D a t e   R a n g e ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' l e d g e r _ f o r m ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > l e d g e r F o r m ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ l e d g e r _ s e a r c h ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c u s t o m e r L e d g e r S e a r c h ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 4   S U I T - W I S E   C U T T I N G   ( A l t e r n a t e   r o u t e s   f o r   b a c k w a r d   c o m p a t i b i l i t y ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' s u i t _ c u t t i n g _ p e n d i n g ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ c u t t i n g _ p e n d i n g ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u i t _ c u t t i n g _ a s s i g n ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ c u t t i n g _ a s s i g n ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u i t _ c u t t i n g _ a s s i g n e d ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ c u t t i n g _ a s s i g n e d ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u i t _ c u t t i n g _ c o m p l e t e ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ c u t t i n g _ c o m p l e t e ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 5   S U I T - W I S E   S T I T C H I N G   ( A l t e r n a t e   r o u t e s ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' s u i t _ s t i t c h i n g _ p e n d i n g ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ s t i t c h i n g _ p e n d i n g ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u i t _ s t i t c h i n g _ a s s i g n ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ s t i t c h i n g _ a s s i g n ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' s u i t _ s t i t c h i n g _ a s s i g n e d ' : 
 
                 $ c o n t r o l l e r   =   n e w   O r d e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > s u i t _ s t i t c h i n g _ a s s i g n e d ( ) ; 
 
                 b r e a k ; 
 
 
 
       c a s e   ' s t i t c h i n g _ c o m p l e t e ' : 
 
         $ c o n t r o l l e r   =   n e w   S t i t c h i n g C o n t r o l l e r ( ) ; 
 
         $ c o n t r o l l e r - > c o m p l e t e ( ) ; 
 
         b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 6   L E D G E R   F O R M   ( S e l e c t   C u s t o m e r   +   D a t e   R a n g e ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         c a s e   ' l e d g e r _ f o r m ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > l e d g e r F o r m ( ) ; 
 
                 b r e a k ; 
 
 
 
         c a s e   ' c u s t o m e r _ l e d g e r _ s e a r c h ' : 
 
                 $ c o n t r o l l e r   =   n e w   L e d g e r C o n t r o l l e r ( ) ; 
 
                 $ c o n t r o l l e r - > c u s t o m e r L e d g e r S e a r c h ( ) ; 
 
                 b r e a k ; 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   6 . 2 7   D E F A U L T   -   R e d i r e c t   t o   D a s h b o a r d 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         d e f a u l t : 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d a s h b o a r d ' ) ; 
 
                 e x i t ; 
 
 c a s e   ' l i v e _ s e a r c h ' : 
 
         $ c o n t r o l l e r   =   n e w   C u s t o m e r C o n t r o l l e r ( ) ; 
 
         $ c o n t r o l l e r - > l i v e S e a r c h ( ) ; 
 
         b r e a k ; 
 
   
 
 } 
 
 ? > 
 
 < ? p h p 
 
 / * * 
 
   *   B i z T e c h T a i l o r   -   C o m p l e t e   I n s t a l l a t i o n   S c r i p t 
 
   *   R u n   t h i s   f i l e   O N C E   t o   s e t   u p   t h e   e n t i r e   p r o j e c t . 
 
   * / 
 
 
 
 / /   D i s p l a y   e r r o r s   f o r   d e b u g g i n g 
 
 i n i _ s e t ( ' d i s p l a y _ e r r o r s ' ,   1 ) ; 
 
 i n i _ s e t ( ' d i s p l a y _ s t a r t u p _ e r r o r s ' ,   1 ) ; 
 
 e r r o r _ r e p o r t i n g ( E _ A L L ) ; 
 
 
 
 / /   S e t   b a s e   p a t h 
 
 d e f i n e ( ' R O O T _ P A T H ' ,   _ _ D I R _ _ ) ; 
 
 $ s t e p   =   i s s e t ( $ _ G E T [ ' s t e p ' ] )   ?   ( i n t ) $ _ G E T [ ' s t e p ' ]   :   1 ; 
 
 
 
 / /   - - - - - - - - - -   F U N C T I O N :   C r e a t e   D i r e c t o r y   R e c u r s i v e l y   - - - - - - - - - - 
 
 f u n c t i o n   c r e a t e D i r e c t o r y ( $ p a t h )   { 
 
         i f   ( ! i s _ d i r ( $ p a t h ) )   { 
 
                 m k d i r ( $ p a t h ,   0 7 5 5 ,   t r u e ) ; 
 
                 r e t u r n   t r u e ; 
 
         } 
 
         r e t u r n   f a l s e ; 
 
 } 
 
 
 
 / /   - - - - - - - - - -   F U N C T I O N :   W r i t e   F i l e   - - - - - - - - - - 
 
 f u n c t i o n   w r i t e F i l e ( $ p a t h ,   $ c o n t e n t )   { 
 
         $ d i r   =   d i r n a m e ( $ p a t h ) ; 
 
         i f   ( ! i s _ d i r ( $ d i r ) )   { 
 
                 m k d i r ( $ d i r ,   0 7 5 5 ,   t r u e ) ; 
 
         } 
 
         f i l e _ p u t _ c o n t e n t s ( $ p a t h ,   $ c o n t e n t ) ; 
 
 } 
 
 
 
 / /   - - - - - - - - - -   S T E P   1 :   S h o w   W e l c o m e   /   D B   F o r m   - - - - - - - - - - 
 
 i f   ( $ s t e p   = = =   1 )   { 
 
         ? > 
 
         < ! D O C T Y P E   h t m l > 
 
         < h t m l   l a n g = " u r " > 
 
         < h e a d > 
 
                 < m e t a   c h a r s e t = " U T F - 8 " > 
 
                 < m e t a   n a m e = " v i e w p o r t "   c o n t e n t = " w i d t h = d e v i c e - w i d t h ,   i n i t i a l - s c a l e = 1 . 0 " > 
 
                 < t i t l e > B i z T e c h T a i l o r   -                 R     < / t i t l e > 
 
                 < l i n k   h r e f = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / c s s / b o o t s t r a p . m i n . c s s "   r e l = " s t y l e s h e e t " > 
 
                 < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
                 < s t y l e > 
 
                         b o d y   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ;   m i n - h e i g h t :   1 0 0 v h ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   c e n t e r ;   f o n t - f a m i l y :   ' S e g o e   U I ' ,   T a h o m a ,   G e n e v a ,   V e r d a n a ,   s a n s - s e r i f ;   } 
 
                         . i n s t a l l - c a r d   {   b a c k g r o u n d :   # f f f ;   b o r d e r - r a d i u s :   3 0 p x ;   p a d d i n g :   4 0 p x ;   m a x - w i d t h :   6 0 0 p x ;   w i d t h :   1 0 0 % ;   b o x - s h a d o w :   0   2 0 p x   6 0 p x   r g b a ( 0 , 0 , 0 , 0 . 3 ) ;   } 
 
                         . i n s t a l l - c a r d   . i c o n   {   f o n t - s i z e :   5 0 p x ;   c o l o r :   # 6 6 7 e e a ;   b a c k g r o u n d :   # f 0 f 2 f f ;   p a d d i n g :   2 0 p x ;   b o r d e r - r a d i u s :   2 0 p x ;   d i s p l a y :   i n l i n e - b l o c k ;   } 
 
                         . i n s t a l l - c a r d   h 2   {   f o n t - w e i g h t :   7 0 0 ;   m a r g i n - t o p :   1 5 p x ;   } 
 
                         . b t n - i n s t a l l   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ;   c o l o r :   # f f f ;   b o r d e r :   n o n e ;   p a d d i n g :   1 2 p x   3 0 p x ;   b o r d e r - r a d i u s :   5 0 p x ;   f o n t - w e i g h t :   6 0 0 ;   t r a n s i t i o n :   0 . 3 s ;   } 
 
                         . b t n - i n s t a l l : h o v e r   {   t r a n s f o r m :   s c a l e ( 1 . 0 5 ) ;   b o x - s h a d o w :   0   1 0 p x   2 5 p x   r g b a ( 1 0 2 , 1 2 6 , 2 3 4 , 0 . 4 ) ;   c o l o r :   # f f f ;   } 
 
                         . f o r m - c o n t r o l   {   b o r d e r - r a d i u s :   1 5 p x ;   p a d d i n g :   1 2 p x   2 0 p x ;   b o r d e r :   2 p x   s o l i d   # e 9 e c e f ;   } 
 
                         . f o r m - c o n t r o l : f o c u s   {   b o r d e r - c o l o r :   # 6 6 7 e e a ;   b o x - s h a d o w :   0   0   0   0 . 2 r e m   r g b a ( 1 0 2 , 1 2 6 , 2 3 4 , 0 . 2 5 ) ;   } 
 
                         . a l e r t   {   b o r d e r - r a d i u s :   1 5 p x ;   } 
 
                 < / s t y l e > 
 
         < / h e a d > 
 
         < b o d y > 
 
                 < d i v   c l a s s = " i n s t a l l - c a r d " > 
 
                         < d i v   c l a s s = " t e x t - c e n t e r " > 
 
                                 < s p a n   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - s c r o l l " > < / i > < / s p a n > 
 
                                 < h 2 > B i z T e c h   < s p a n   s t y l e = " c o l o r : # 6 6 7 e e a ; " > T a i l o r < / s p a n > < / h 2 > 
 
                                 < p   c l a s s = " t e x t - m u t e d " >    R       &  R      &               &      R                R     < / p > 
 
                         < / d i v > 
 
                         < h r > 
 
                         < h 5   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - d a t a b a s e   m e - 2   t e x t - p r i m a r y " > < / i >   R         R       R         R      < / h 5 > 
 
                         < p   c l a s s = " t e x t - m u t e d   s m a l l " >                &           R  M y S Q L     R         R       R         R                     R    < / p > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " ? s t e p = 2 " > 
 
                                 < d i v   c l a s s = " m b - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " >          ( H o s t ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " d b _ h o s t "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " l o c a l h o s t "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m b - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " >   R         R                & < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " d b _ n a m e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " b i z t e c h _ t a i l o r "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m b - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " >                 & < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " d b _ u s e r "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " r o o t "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m b - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " >             < / l a b e l > 
 
                                         < i n p u t   t y p e = " p a s s w o r d "   n a m e = " d b _ p a s s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = "               (        R                         R  ) " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " f o r m - c h e c k   m b - 3 " > 
 
                                         < i n p u t   c l a s s = " f o r m - c h e c k - i n p u t "   t y p e = " c h e c k b o x "   n a m e = " c r e a t e _ d b "   i d = " c r e a t e _ d b "   c h e c k e d > 
 
                                         < l a b e l   c l a s s = " f o r m - c h e c k - l a b e l "   f o r = " c r e a t e _ d b " >           R         R     &                                 R         R  < / l a b e l > 
 
                                 < / d i v > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - i n s t a l l   w - 1 0 0 " > 
 
                                         < i   c l a s s = " f a s   f a - r o c k e t   m e - 2 " > < / i >                                R  
 
                                 < / b u t t o n > 
 
                         < / f o r m > 
 
                         < d i v   c l a s s = " m t - 3   t e x t - c e n t e r   t e x t - m u t e d   s m a l l " > 
 
                                 < i   c l a s s = " f a s   f a - s h i e l d - a l t   m e - 1 " > < / i >      &    &                    &               R                                    
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / j s / b o o t s t r a p . b u n d l e . m i n . j s " > < / s c r i p t > 
 
         < / b o d y > 
 
         < / h t m l > 
 
         < ? p h p 
 
         e x i t ; 
 
 } 
 
 
 
 / /   - - - - - - - - - -   S T E P   2 :   P r o c e s s   I n s t a l l a t i o n   - - - - - - - - - - 
 
 i f   ( $ s t e p   = = =   2   & &   $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
         $ d b _ h o s t   =   $ _ P O S T [ ' d b _ h o s t ' ]   ? ?   ' l o c a l h o s t ' ; 
 
         $ d b _ n a m e   =   $ _ P O S T [ ' d b _ n a m e ' ]   ? ?   ' b i z t e c h _ t a i l o r ' ; 
 
         $ d b _ u s e r   =   $ _ P O S T [ ' d b _ u s e r ' ]   ? ?   ' r o o t ' ; 
 
         $ d b _ p a s s   =   $ _ P O S T [ ' d b _ p a s s ' ]   ? ?   ' ' ; 
 
         $ c r e a t e _ d b   =   i s s e t ( $ _ P O S T [ ' c r e a t e _ d b ' ] ) ; 
 
 
 
         $ e r r o r s   =   [ ] ; 
 
         $ s u c c e s s   =   f a l s e ; 
 
 
 
         t r y   { 
 
                 / /   C o n n e c t   w i t h o u t   D B   f i r s t   ( t o   c r e a t e   i t   i f   n e e d e d ) 
 
                 $ p d o   =   n e w   P D O ( " m y s q l : h o s t = $ d b _ h o s t " ,   $ d b _ u s e r ,   $ d b _ p a s s ) ; 
 
                 $ p d o - > s e t A t t r i b u t e ( P D O : : A T T R _ E R R M O D E ,   P D O : : E R R M O D E _ E X C E P T I O N ) ; 
 
 
 
                 i f   ( $ c r e a t e _ d b )   { 
 
                         $ p d o - > e x e c ( " C R E A T E   D A T A B A S E   I F   N O T   E X I S T S   ` $ d b _ n a m e `   C H A R A C T E R   S E T   u t f 8 m b 4   C O L L A T E   u t f 8 m b 4 _ u n i c o d e _ c i " ) ; 
 
                 } 
 
 
 
                 / /   N o w   c o n n e c t   t o   t h e   s p e c i f i c   D B 
 
                 $ p d o   =   n e w   P D O ( " m y s q l : h o s t = $ d b _ h o s t ; d b n a m e = $ d b _ n a m e ; c h a r s e t = u t f 8 m b 4 " ,   $ d b _ u s e r ,   $ d b _ p a s s ) ; 
 
                 $ p d o - > s e t A t t r i b u t e ( P D O : : A T T R _ E R R M O D E ,   P D O : : E R R M O D E _ E X C E P T I O N ) ; 
 
 
 
                 / /   - - - - - - - - - -   S Q L   S C H E M A   - - - - - - - - - - 
 
                 $ s q l   =   " 
 
                 - -   U s e r s 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` u s e r s `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` u s e r n a m e `   v a r c h a r ( 5 0 )   N O T   N U L L , 
 
                     ` p a s s w o r d `   v a r c h a r ( 2 5 5 )   N O T   N U L L , 
 
                     ` f u l l _ n a m e `   v a r c h a r ( 1 0 0 )   N O T   N U L L , 
 
                     ` p r o f i l e _ p i c `   v a r c h a r ( 2 5 5 )   D E F A U L T   ' d e f a u l t _ a v a t a r . p n g ' , 
 
                     ` r o l e `   e n u m ( ' a d m i n ' , ' m a n a g e r ' , ' w o r k e r ' )   D E F A U L T   ' w o r k e r ' , 
 
                     ` s t a t u s `   e n u m ( ' a c t i v e ' , ' i n a c t i v e ' )   D E F A U L T   ' a c t i v e ' , 
 
                     ` c r e a t e d _ a t `   t i m e s t a m p   N O T   N U L L   D E F A U L T   c u r r e n t _ t i m e s t a m p ( ) , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     U N I Q U E   K E Y   ` u s e r n a m e `   ( ` u s e r n a m e ` ) 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   C u s t o m e r s 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` c u s t o m e r s `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` c u s t o m e r _ n o `   v a r c h a r ( 2 0 )   N O T   N U L L , 
 
                     ` n a m e `   v a r c h a r ( 1 0 0 )   N O T   N U L L , 
 
                     ` p h o n e `   v a r c h a r ( 2 0 )   D E F A U L T   N U L L , 
 
                     ` a d d r e s s `   t e x t   D E F A U L T   N U L L , 
 
                     ` p r o f i l e _ p i c `   v a r c h a r ( 2 5 5 )   D E F A U L T   ' d u m m y _ c u s t o m e r . p n g ' , 
 
                     ` c r e a t e d _ a t `   t i m e s t a m p   N O T   N U L L   D E F A U L T   c u r r e n t _ t i m e s t a m p ( ) , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     U N I Q U E   K E Y   ` c u s t o m e r _ n o `   ( ` c u s t o m e r _ n o ` ) 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   M e a s u r e m e n t s 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` m e a s u r e m e n t s `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` c u s t o m e r _ i d `   i n t ( 1 1 )   N O T   N U L L , 
 
                     ` c h e s t `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` w a i s t `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` h i p `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` s h o u l d e r `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` s l e e v e `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` l e n g t h `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` n e c k `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` a r m h o l e `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` i n s e a m `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` o u t s e a m `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` t h i g h `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` k n e e `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` b i c e p `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` c u f f `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` c o l l a r `   d e c i m a l ( 5 , 2 )   D E F A U L T   N U L L , 
 
                     ` n o t e s `   t e x t   D E F A U L T   N U L L , 
 
                     ` m e a s u r e d _ d a t e `   d a t e   D E F A U L T   N U L L , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     K E Y   ` c u s t o m e r _ i d `   ( ` c u s t o m e r _ i d ` ) , 
 
                     C O N S T R A I N T   ` m e a s u r e m e n t s _ i b f k _ 1 `   F O R E I G N   K E Y   ( ` c u s t o m e r _ i d ` )   R E F E R E N C E S   ` c u s t o m e r s `   ( ` i d ` )   O N   D E L E T E   C A S C A D E 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   O r d e r s 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` o r d e r s `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` o r d e r _ n o `   v a r c h a r ( 2 0 )   N O T   N U L L , 
 
                     ` c u s t o m e r _ i d `   i n t ( 1 1 )   N O T   N U L L , 
 
                     ` o r d e r _ d a t e `   d a t e   N O T   N U L L , 
 
                     ` d e l i v e r y _ d a t e `   d a t e   D E F A U L T   N U L L , 
 
                     ` s t a t u s `   e n u m ( ' p e n d i n g ' , ' c u t t i n g ' , ' s t i t c h i n g ' , ' r e a d y ' , ' d e l i v e r e d ' , ' c a n c e l l e d ' )   D E F A U L T   ' p e n d i n g ' , 
 
                     ` c l o t h _ t y p e `   v a r c h a r ( 5 0 )   D E F A U L T   N U L L , 
 
                     ` d e s i g n _ n o t e s `   t e x t   D E F A U L T   N U L L , 
 
                     ` t o t a l _ a m o u n t `   d e c i m a l ( 1 0 , 2 )   D E F A U L T   0 . 0 0 , 
 
                     ` d i s c o u n t `   d e c i m a l ( 1 0 , 2 )   D E F A U L T   0 . 0 0 , 
 
                     ` n e t _ a m o u n t `   d e c i m a l ( 1 0 , 2 )   D E F A U L T   0 . 0 0 , 
 
                     ` p a i d _ a m o u n t `   d e c i m a l ( 1 0 , 2 )   D E F A U L T   0 . 0 0 , 
 
                     ` d u e _ a m o u n t `   d e c i m a l ( 1 0 , 2 )   D E F A U L T   0 . 0 0 , 
 
                     ` c r e a t e d _ a t `   t i m e s t a m p   N O T   N U L L   D E F A U L T   c u r r e n t _ t i m e s t a m p ( ) , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     U N I Q U E   K E Y   ` o r d e r _ n o `   ( ` o r d e r _ n o ` ) , 
 
                     K E Y   ` c u s t o m e r _ i d `   ( ` c u s t o m e r _ i d ` ) , 
 
                     C O N S T R A I N T   ` o r d e r s _ i b f k _ 1 `   F O R E I G N   K E Y   ( ` c u s t o m e r _ i d ` )   R E F E R E N C E S   ` c u s t o m e r s `   ( ` i d ` ) 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   O r d e r   I t e m s 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` o r d e r _ i t e m s `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` o r d e r _ i d `   i n t ( 1 1 )   N O T   N U L L , 
 
                     ` i t e m _ n a m e `   v a r c h a r ( 1 0 0 )   N O T   N U L L , 
 
                     ` q u a n t i t y `   i n t ( 1 1 )   D E F A U L T   1 , 
 
                     ` r a t e `   d e c i m a l ( 1 0 , 2 )   D E F A U L T   0 . 0 0 , 
 
                     ` a m o u n t `   d e c i m a l ( 1 0 , 2 )   D E F A U L T   0 . 0 0 , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     K E Y   ` o r d e r _ i d `   ( ` o r d e r _ i d ` ) , 
 
                     C O N S T R A I N T   ` o r d e r _ i t e m s _ i b f k _ 1 `   F O R E I G N   K E Y   ( ` o r d e r _ i d ` )   R E F E R E N C E S   ` o r d e r s `   ( ` i d ` )   O N   D E L E T E   C A S C A D E 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   C u t t i n g 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` c u t t i n g `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` o r d e r _ i d `   i n t ( 1 1 )   N O T   N U L L , 
 
                     ` a s s i g n e d _ t o `   i n t ( 1 1 )   D E F A U L T   N U L L , 
 
                     ` c u t t i n g _ d a t e `   d a t e   D E F A U L T   N U L L , 
 
                     ` s t a t u s `   e n u m ( ' p e n d i n g ' , ' i n _ p r o g r e s s ' , ' c o m p l e t e d ' )   D E F A U L T   ' p e n d i n g ' , 
 
                     ` n o t e s `   t e x t   D E F A U L T   N U L L , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     K E Y   ` o r d e r _ i d `   ( ` o r d e r _ i d ` ) , 
 
                     K E Y   ` a s s i g n e d _ t o `   ( ` a s s i g n e d _ t o ` ) , 
 
                     C O N S T R A I N T   ` c u t t i n g _ i b f k _ 1 `   F O R E I G N   K E Y   ( ` o r d e r _ i d ` )   R E F E R E N C E S   ` o r d e r s `   ( ` i d ` ) , 
 
                     C O N S T R A I N T   ` c u t t i n g _ i b f k _ 2 `   F O R E I G N   K E Y   ( ` a s s i g n e d _ t o ` )   R E F E R E N C E S   ` u s e r s `   ( ` i d ` ) 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   S t i t c h i n g 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` s t i t c h i n g `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` o r d e r _ i d `   i n t ( 1 1 )   N O T   N U L L , 
 
                     ` a s s i g n e d _ t o `   i n t ( 1 1 )   D E F A U L T   N U L L , 
 
                     ` s t i t c h i n g _ d a t e `   d a t e   D E F A U L T   N U L L , 
 
                     ` s t a t u s `   e n u m ( ' p e n d i n g ' , ' i n _ p r o g r e s s ' , ' c o m p l e t e d ' )   D E F A U L T   ' p e n d i n g ' , 
 
                     ` n o t e s `   t e x t   D E F A U L T   N U L L , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     K E Y   ` o r d e r _ i d `   ( ` o r d e r _ i d ` ) , 
 
                     K E Y   ` a s s i g n e d _ t o `   ( ` a s s i g n e d _ t o ` ) , 
 
                     C O N S T R A I N T   ` s t i t c h i n g _ i b f k _ 1 `   F O R E I G N   K E Y   ( ` o r d e r _ i d ` )   R E F E R E N C E S   ` o r d e r s `   ( ` i d ` ) , 
 
                     C O N S T R A I N T   ` s t i t c h i n g _ i b f k _ 2 `   F O R E I G N   K E Y   ( ` a s s i g n e d _ t o ` )   R E F E R E N C E S   ` u s e r s `   ( ` i d ` ) 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   D e l i v e r y 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` d e l i v e r y `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` o r d e r _ i d `   i n t ( 1 1 )   N O T   N U L L , 
 
                     ` d e l i v e r y _ d a t e `   d a t e   N O T   N U L L , 
 
                     ` r e c e i v e d _ b y `   v a r c h a r ( 1 0 0 )   D E F A U L T   N U L L , 
 
                     ` s i g n a t u r e `   v a r c h a r ( 2 5 5 )   D E F A U L T   N U L L , 
 
                     ` n o t e s `   t e x t   D E F A U L T   N U L L , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     K E Y   ` o r d e r _ i d `   ( ` o r d e r _ i d ` ) , 
 
                     C O N S T R A I N T   ` d e l i v e r y _ i b f k _ 1 `   F O R E I G N   K E Y   ( ` o r d e r _ i d ` )   R E F E R E N C E S   ` o r d e r s `   ( ` i d ` ) 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   L e d g e r 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` l e d g e r `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` c u s t o m e r _ i d `   i n t ( 1 1 )   D E F A U L T   N U L L , 
 
                     ` o r d e r _ i d `   i n t ( 1 1 )   D E F A U L T   N U L L , 
 
                     ` t y p e `   e n u m ( ' r e c e i v e ' , ' p a y ' )   N O T   N U L L , 
 
                     ` a m o u n t `   d e c i m a l ( 1 0 , 2 )   N O T   N U L L , 
 
                     ` m e t h o d `   e n u m ( ' c a s h ' , ' b a n k ' , ' o n l i n e ' )   D E F A U L T   ' c a s h ' , 
 
                     ` d e s c r i p t i o n `   v a r c h a r ( 2 5 5 )   D E F A U L T   N U L L , 
 
                     ` t r a n s a c t i o n _ d a t e `   d a t e   N O T   N U L L , 
 
                     ` c r e a t e d _ a t `   t i m e s t a m p   N O T   N U L L   D E F A U L T   c u r r e n t _ t i m e s t a m p ( ) , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     K E Y   ` c u s t o m e r _ i d `   ( ` c u s t o m e r _ i d ` ) , 
 
                     K E Y   ` o r d e r _ i d `   ( ` o r d e r _ i d ` ) , 
 
                     C O N S T R A I N T   ` l e d g e r _ i b f k _ 1 `   F O R E I G N   K E Y   ( ` c u s t o m e r _ i d ` )   R E F E R E N C E S   ` c u s t o m e r s `   ( ` i d ` )   O N   D E L E T E   S E T   N U L L , 
 
                     C O N S T R A I N T   ` l e d g e r _ i b f k _ 2 `   F O R E I G N   K E Y   ( ` o r d e r _ i d ` )   R E F E R E N C E S   ` o r d e r s `   ( ` i d ` )   O N   D E L E T E   S E T   N U L L 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   S e t t i n g s 
 
                 C R E A T E   T A B L E   I F   N O T   E X I S T S   ` s e t t i n g s `   ( 
 
                     ` i d `   i n t ( 1 1 )   N O T   N U L L   A U T O _ I N C R E M E N T , 
 
                     ` s e t t i n g _ k e y `   v a r c h a r ( 5 0 )   N O T   N U L L , 
 
                     ` s e t t i n g _ v a l u e `   t e x t   D E F A U L T   N U L L , 
 
                     P R I M A R Y   K E Y   ( ` i d ` ) , 
 
                     U N I Q U E   K E Y   ` s e t t i n g _ k e y `   ( ` s e t t i n g _ k e y ` ) 
 
                 )   E N G I N E = I n n o D B   D E F A U L T   C H A R S E T = u t f 8 m b 4 ; 
 
 
 
                 - -   D e f a u l t   A d m i n   &   D a t a 
 
                 I N S E R T   I G N O R E   I N T O   ` u s e r s `   ( ` i d ` ,   ` u s e r n a m e ` ,   ` p a s s w o r d ` ,   ` f u l l _ n a m e ` ,   ` p r o f i l e _ p i c ` ,   ` r o l e ` ,   ` s t a t u s ` )   V A L U E S 
 
                 ( 1 ,   ' a d m i n ' ,   ' $ 2 y $ 1 0 $ 9 2 I X U N p k j O 0 r O Q 5 b y M i . Y e 4 o K o E a 3 R o 9 l l C / . o g / a t 2 . u h e W G / i g i ' ,   '  &    R            & ' ,   ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = A d m i n + U s e r & b a c k g r o u n d = 0 D 6 E F D & c o l o r = f f f & s i z e = 1 2 8 ' ,   ' a d m i n ' ,   ' a c t i v e ' ) ; 
 
 
 
                 I N S E R T   I G N O R E   I N T O   ` s e t t i n g s `   ( ` s e t t i n g _ k e y ` ,   ` s e t t i n g _ v a l u e ` )   V A L U E S 
 
                 ( ' c o m p a n y _ n a m e ' ,   ' B i z T e c h   T a i l o r ' ) , 
 
                 ( ' c o m p a n y _ a d d r e s s ' ,   '             &       5  R                  &       2  R     R              ' ) , 
 
                 ( ' c o m p a n y _ p h o n e ' ,   ' 0 3 0 0 - 1 2 3 4 5 6 7 ' ) , 
 
                 ( ' c u r r e n c y ' ,   ' R s . ' ) , 
 
                 ( ' l a n g u a g e ' ,   ' u r ' ) , 
 
                 ( ' t i m e z o n e ' ,   ' A s i a / K a r a c h i ' ) , 
 
                 ( ' r e c e i p t _ f o o t e r ' ,   '        R  !      &                        R   R    ' ) ; 
 
 
 
                 I N S E R T   I G N O R E   I N T O   ` c u s t o m e r s `   ( ` c u s t o m e r _ n o ` ,   ` n a m e ` ,   ` p h o n e ` ,   ` a d d r e s s ` ,   ` p r o f i l e _ p i c ` )   V A L U E S 
 
                 ( ' C U S T - 0 0 1 ' ,   '      &          R' ,   ' 0 3 0 0 - 1 1 1 1 1 1 1 ' ,   '             &       1 0  R         R    5  R                       ' ,   ' h t t p s : / / p i c s u m . p h o t o s / s e e d / c u s t 1 / 2 0 0 / 2 0 0 ' ) , 
 
                 ( ' C U S T - 0 0 2 ' ,   '                ' ,   ' 0 3 0 0 - 2 2 2 2 2 2 2 ' ,   '      R    3  R                        R' ,   ' h t t p s : / / p i c s u m . p h o t o s / s e e d / c u s t 2 / 2 0 0 / 2 0 0 ' ) ; 
 
                 " ; 
 
 
 
                 / /   E x e c u t e   S Q L   ( s p l i t   b y   s e m i c o l o n   t o   h a n d l e   m u l t i p l e   s t a t e m e n t s ) 
 
                 $ p d o - > e x e c ( $ s q l ) ; 
 
 
 
                 / /   - - - - - - - - - -   W R I T E   D A T A B A S E   C O N F I G   F I L E   - - - - - - - - - - 
 
                 $ d b _ c o n f i g   =   " < ? p h p 
 
 d e f i n e ( ' D B _ H O S T ' ,   ' { $ d b _ h o s t } ' ) ; 
 
 d e f i n e ( ' D B _ N A M E ' ,   ' { $ d b _ n a m e } ' ) ; 
 
 d e f i n e ( ' D B _ U S E R ' ,   ' { $ d b _ u s e r } ' ) ; 
 
 d e f i n e ( ' D B _ P A S S ' ,   ' { $ d b _ p a s s } ' ) ; 
 
 
 
 t r y   { 
 
         \ $ d b   =   n e w   P D O ( \ " m y s q l : h o s t = \ " . D B _ H O S T . \ " ; d b n a m e = \ " . D B _ N A M E . \ " ; c h a r s e t = u t f 8 m b 4 \ " ,   D B _ U S E R ,   D B _ P A S S ) ; 
 
         \ $ d b - > s e t A t t r i b u t e ( P D O : : A T T R _ E R R M O D E ,   P D O : : E R R M O D E _ E X C E P T I O N ) ; 
 
         \ $ d b - > s e t A t t r i b u t e ( P D O : : A T T R _ D E F A U L T _ F E T C H _ M O D E ,   P D O : : F E T C H _ A S S O C ) ; 
 
 }   c a t c h ( P D O E x c e p t i o n   \ $ e )   { 
 
         d i e ( \ " D a t a b a s e   C o n n e c t i o n   F a i l e d :   \ "   .   \ $ e - > g e t M e s s a g e ( ) ) ; 
 
 } 
 
 ? > " ; 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / a p p / c o n f i g / d a t a b a s e . p h p ' ,   $ d b _ c o n f i g ) ; 
 
 
 
                 / /   - - - - - - - - - -   W R I T E   A L L   O T H E R   F I L E S   - - - - - - - - - - 
 
                 / /   ( I   w i l l   e m b e d   t h e   f u l l   c o d e   f o r   e a c h   f i l e   h e r e   u s i n g   t h e   s a m e   l o g i c   a s   b e f o r e ) 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   A U T H L I B   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 $ a u t h _ c o d e   =   " < ? p h p 
 
 s e s s i o n _ s t a r t ( ) ; 
 
 r e q u i r e _ o n c e   _ _ D I R _ _   .   ' / . . / c o n f i g / d a t a b a s e . p h p ' ; 
 
 
 
 c l a s s   A u t h   { 
 
         p u b l i c   s t a t i c   f u n c t i o n   l o g i n ( \ $ u s e r n a m e ,   \ $ p a s s w o r d )   { 
 
                 g l o b a l   \ $ d b ; 
 
                 \ $ s t m t   =   \ $ d b - > p r e p a r e ( \ " S E L E C T   *   F R O M   u s e r s   W H E R E   u s e r n a m e   =   ?   A N D   s t a t u s   =   ' a c t i v e ' \ " ) ; 
 
                 \ $ s t m t - > e x e c u t e ( [ \ $ u s e r n a m e ] ) ; 
 
                 \ $ u s e r   =   \ $ s t m t - > f e t c h ( ) ; 
 
                 
 
                 i f   ( \ $ u s e r   & &   p a s s w o r d _ v e r i f y ( \ $ p a s s w o r d ,   \ $ u s e r [ ' p a s s w o r d ' ] ) )   { 
 
                         \ $ _ S E S S I O N [ ' u s e r _ i d ' ]   =   \ $ u s e r [ ' i d ' ] ; 
 
                         \ $ _ S E S S I O N [ ' u s e r n a m e ' ]   =   \ $ u s e r [ ' u s e r n a m e ' ] ; 
 
                         \ $ _ S E S S I O N [ ' f u l l _ n a m e ' ]   =   \ $ u s e r [ ' f u l l _ n a m e ' ] ; 
 
                         \ $ _ S E S S I O N [ ' r o l e ' ]   =   \ $ u s e r [ ' r o l e ' ] ; 
 
                         \ $ _ S E S S I O N [ ' p r o f i l e _ p i c ' ]   =   \ $ u s e r [ ' p r o f i l e _ p i c ' ] ; 
 
                         r e t u r n   t r u e ; 
 
                 } 
 
                 r e t u r n   f a l s e ; 
 
         } 
 
 
 
         p u b l i c   s t a t i c   f u n c t i o n   l o g o u t ( )   { 
 
                 s e s s i o n _ d e s t r o y ( ) ; 
 
                 r e t u r n   t r u e ; 
 
         } 
 
 
 
         p u b l i c   s t a t i c   f u n c t i o n   i s L o g g e d I n ( )   { 
 
                 r e t u r n   i s s e t ( \ $ _ S E S S I O N [ ' u s e r _ i d ' ] ) ; 
 
         } 
 
 
 
         p u b l i c   s t a t i c   f u n c t i o n   r e q u i r e L o g i n ( )   { 
 
                 i f   ( ! s e l f : : i s L o g g e d I n ( ) )   { 
 
                         h e a d e r ( ' L o c a t i o n :   l o g i n . p h p ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         p u b l i c   s t a t i c   f u n c t i o n   r e q u i r e R o l e ( \ $ r o l e )   { 
 
                 s e l f : : r e q u i r e L o g i n ( ) ; 
 
                 i f   ( \ $ _ S E S S I O N [ ' r o l e ' ]   ! = =   \ $ r o l e   & &   \ $ _ S E S S I O N [ ' r o l e ' ]   ! = =   ' a d m i n ' )   { 
 
                         d i e ( '                                           R        R          ' ) ; 
 
                 } 
 
         } 
 
 } 
 
 ? > " ; 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / a p p / c o r e / A u t h . p h p ' ,   $ a u t h _ c o d e ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   l o g i n . p h p   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 $ l o g i n _ c o d e   =   < < < ' E O T ' 
 
 < ? p h p 
 
 r e q u i r e _ o n c e   ' a p p / c o r e / A u t h . p h p ' ; 
 
 i f   ( A u t h : : i s L o g g e d I n ( ) )   { 
 
         h e a d e r ( ' L o c a t i o n :   d a s h b o a r d . p h p ' ) ; 
 
         e x i t ; 
 
 } 
 
 $ e r r o r   =   ' ' ; 
 
 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
         $ u s e r n a m e   =   $ _ P O S T [ ' u s e r n a m e ' ]   ? ?   ' ' ; 
 
         $ p a s s w o r d   =   $ _ P O S T [ ' p a s s w o r d ' ]   ? ?   ' ' ; 
 
         i f   ( A u t h : : l o g i n ( $ u s e r n a m e ,   $ p a s s w o r d ) )   { 
 
                 h e a d e r ( ' L o c a t i o n :   d a s h b o a r d . p h p ' ) ; 
 
                 e x i t ; 
 
         }   e l s e   { 
 
                 $ e r r o r   =   '                         &    R                ! ' ; 
 
         } 
 
 } 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l   l a n g = " u r " > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < m e t a   n a m e = " v i e w p o r t "   c o n t e n t = " w i d t h = d e v i c e - w i d t h ,   i n i t i a l - s c a l e = 1 . 0 " > 
 
         < t i t l e >                -   B i z T e c h   T a i l o r < / t i t l e > 
 
         < l i n k   h r e f = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / c s s / b o o t s t r a p . m i n . c s s "   r e l = " s t y l e s h e e t " > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < l i n k   h r e f = " h t t p s : / / f o n t s . g o o g l e a p i s . c o m / c s s 2 ? f a m i l y = P o p p i n s : w g h t @ 3 0 0 ; 4 0 0 ; 6 0 0 ; 7 0 0 & d i s p l a y = s w a p "   r e l = " s t y l e s h e e t " > 
 
         < s t y l e > 
 
                 : r o o t   {   - - p r i m a r y - c o l o r :   # 0 D 6 E F D ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' P o p p i n s ' ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         m a r g i n :   0 ; 
 
                 } 
 
                 . l o g i n - c a r d   { 
 
                         b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 9 5 ) ; 
 
                         b a c k d r o p - f i l t e r :   b l u r ( 1 0 p x ) ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         p a d d i n g :   4 0 p x ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         m a x - w i d t h :   4 2 0 p x ; 
 
                         b o x - s h a d o w :   0   2 5 p x   5 0 p x   r g b a ( 0 , 0 , 0 , 0 . 3 ) ; 
 
                         t r a n s i t i o n :   t r a n s f o r m   0 . 3 s ; 
 
                 } 
 
                 . l o g i n - c a r d : h o v e r   {   t r a n s f o r m :   t r a n s l a t e Y ( - 5 p x ) ;   } 
 
                 . l o g i n - c a r d   . l o g o - a r e a   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n - b o t t o m :   3 0 p x ;   } 
 
                 . l o g i n - c a r d   . l o g o - a r e a   i   {   f o n t - s i z e :   6 0 p x ;   c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;   b a c k g r o u n d :   # e 9 e c e f ;   p a d d i n g :   2 0 p x ;   b o r d e r - r a d i u s :   2 0 p x ;   } 
 
                 . l o g i n - c a r d   . l o g o - a r e a   h 2   {   f o n t - w e i g h t :   7 0 0 ;   m a r g i n - t o p :   1 5 p x ;   c o l o r :   # 1 a 1 a 2 e ;   } 
 
                 . l o g i n - c a r d   . l o g o - a r e a   p   {   c o l o r :   # 6 c 7 5 7 d ;   f o n t - w e i g h t :   3 0 0 ;   } 
 
                 . f o r m - c o n t r o l   {   b o r d e r - r a d i u s :   1 5 p x ;   p a d d i n g :   1 2 p x   2 0 p x ;   b o r d e r :   2 p x   s o l i d   # e 9 e c e f ;   b a c k g r o u n d :   # f 8 f 9 f a ;   t r a n s i t i o n :   0 . 3 s ;   } 
 
                 . f o r m - c o n t r o l : f o c u s   {   b o r d e r - c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;   b o x - s h a d o w :   0   0   0   0 . 2 r e m   r g b a ( 1 3 , 1 1 0 , 2 5 3 , 0 . 2 5 ) ;   b a c k g r o u n d :   # f f f ;   } 
 
                 . b t n - l o g i n   {   w i d t h :   1 0 0 % ;   p a d d i n g :   1 2 p x ;   b o r d e r - r a d i u s :   5 0 p x ;   f o n t - w e i g h t :   6 0 0 ;   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ;   b o r d e r :   n o n e ;   c o l o r :   w h i t e ;   f o n t - s i z e :   1 8 p x ;   t r a n s i t i o n :   0 . 3 s ;   } 
 
                 . b t n - l o g i n : h o v e r   {   t r a n s f o r m :   s c a l e ( 1 . 0 2 ) ;   b o x - s h a d o w :   0   1 0 p x   2 0 p x   r g b a ( 1 0 2 , 1 2 6 , 2 3 4 , 0 . 4 ) ;   } 
 
                 . a l e r t - d a n g e r   {   b o r d e r - r a d i u s :   1 5 p x ;   b o r d e r - l e f t :   5 p x   s o l i d   # d c 3 5 4 5 ;   } 
 
                 . f o o t e r - t e x t   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n - t o p :   2 0 p x ;   c o l o r :   # 6 c 7 5 7 d ;   f o n t - s i z e :   1 4 p x ;   } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " l o g i n - c a r d " > 
 
                 < d i v   c l a s s = " l o g o - a r e a " > 
 
                         < i   c l a s s = " f a s   f a - s c r o l l " > < / i > 
 
                         < h 2 > B i z T e c h   T a i l o r < / h 2 > 
 
                         < p >    R       &  R      &               & < / p > 
 
                 < / d i v > 
 
                 < ? p h p   i f   ( $ e r r o r ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r "   r o l e = " a l e r t " > < i   c l a s s = " f a s   f a - e x c l a m a t i o n - c i r c l e   m e - 2 " > < / i >   < ? p h p   e c h o   $ e r r o r ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " > < i   c l a s s = " f a s   f a - u s e r   m e - 2 " > < / i >                 & < / l a b e l > 
 
                                 < i n p u t   t y p e = " t e x t "   n a m e = " u s e r n a m e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " a d m i n "   r e q u i r e d   a u t o f o c u s > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " > < i   c l a s s = " f a s   f a - l o c k   m e - 2 " > < / i >             < / l a b e l > 
 
                                 < i n p u t   t y p e = " p a s s w o r d "   n a m e = " p a s s w o r d "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = "                         "   r e q u i r e d > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 4 " > 
 
                                 < d i v   c l a s s = " f o r m - c h e c k " > < i n p u t   c l a s s = " f o r m - c h e c k - i n p u t "   t y p e = " c h e c k b o x "   i d = " r e m e m b e r " > < l a b e l   c l a s s = " f o r m - c h e c k - l a b e l "   f o r = " r e m e m b e r " >  &          R             R  < / l a b e l > < / d i v > 
 
                                 < a   h r e f = " # "   c l a s s = " t e x t - d e c o r a t i o n - n o n e "   s t y l e = " c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ; " >                               x< / a > 
 
                         < / d i v > 
 
                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - l o g i n " > < i   c l a s s = " f a s   f a - s i g n - i n - a l t   m e - 2 " > < / i >                       R  < / b u t t o n > 
 
                 < / f o r m > 
 
                 < d i v   c l a s s = " f o o t e r - t e x t " > < i   c l a s s = " f a s   f a - c o p y r i g h t   m e - 1 " > < / i >   2 0 2 6   B i z T e c h   S o l u t i o n s < / d i v > 
 
         < / d i v > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / j s / b o o t s t r a p . b u n d l e . m i n . j s " > < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 E O T ; 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / l o g i n . p h p ' ,   $ l o g i n _ c o d e ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   l o g o u t . p h p   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / l o g o u t . p h p ' ,   ' < ? p h p   r e q u i r e _ o n c e   " a p p / c o r e / A u t h . p h p " ;   A u t h : : l o g o u t ( ) ;   h e a d e r ( " L o c a t i o n :   l o g i n . p h p " ) ;   e x i t ;   ? > ' ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   d a s h b o a r d . p h p   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 $ d a s h _ c o d e   =   < < < ' E O T ' 
 
 < ? p h p 
 
 r e q u i r e _ o n c e   ' a p p / c o r e / A u t h . p h p ' ; 
 
 A u t h : : r e q u i r e L o g i n ( ) ; 
 
 $ s t a t s   =   [ ' t o t a l _ o r d e r s '   = >   1 4 8 ,   ' p e n d i n g _ o r d e r s '   = >   2 3 ,   ' t o d a y _ d e l i v e r y '   = >   1 2 ,   ' t o t a l _ r e v e n u e '   = >   4 2 5 0 0 0 ] ; 
 
 $ r e c e n t _ o r d e r s   =   [ 
 
         [ ' i d '   = >   1 ,   ' c u s t o m e r '   = >   '      &          R' ,   ' a m o u n t '   = >   ' 2 5 0 0 ' ,   ' s t a t u s '   = >   ' c u t t i n g ' ,   ' d a t e '   = >   ' 2 0 2 6 - 0 7 - 0 7 ' ] , 
 
         [ ' i d '   = >   2 ,   ' c u s t o m e r '   = >   '                ' ,   ' a m o u n t '   = >   ' 1 8 0 0 ' ,   ' s t a t u s '   = >   ' p e n d i n g ' ,   ' d a t e '   = >   ' 2 0 2 6 - 0 7 - 0 6 ' ] , 
 
         [ ' i d '   = >   3 ,   ' c u s t o m e r '   = >   '  &    &        R    ' ,   ' a m o u n t '   = >   ' 3 2 0 0 ' ,   ' s t a t u s '   = >   ' d e l i v e r e d ' ,   ' d a t e '   = >   ' 2 0 2 6 - 0 7 - 0 5 ' ] , 
 
 ] ; 
 
 ? > 
 
 < ? p h p   i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ;   ? > 
 
 < d i v   c l a s s = " r o w   g - 4   m b - 4 " > 
 
         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m   h - 1 0 0 "   s t y l e = " b o r d e r - r a d i u s : 2 0 p x ;   b o r d e r - l e f t :   5 p x   s o l i d   # 0 D 6 E F D ; " > < d i v   c l a s s = " c a r d - b o d y " > < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n " > < d i v > < s p a n   c l a s s = " t e x t - m u t e d   s m a l l " >                < / s p a n > < h 3   c l a s s = " f w - b o l d   m t - 1 " > < ? p h p   e c h o   $ s t a t s [ ' t o t a l _ o r d e r s ' ] ;   ? > < / h 3 > < s p a n   c l a s s = " b a d g e   b g - s u c c e s s   b g - o p a c i t y - 1 0   t e x t - s u c c e s s " > < i   c l a s s = " f a s   f a - a r r o w - u p " > < / i >   1 2 % < / s p a n > < / d i v > < d i v   c l a s s = " b g - p r i m a r y   b g - o p a c i t y - 1 0   p - 3   r o u n d e d - 3 " > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g   t e x t - p r i m a r y   f s - 4 " > < / i > < / d i v > < / d i v > < / d i v > < / d i v > < / d i v > 
 
         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m   h - 1 0 0 "   s t y l e = " b o r d e r - r a d i u s : 2 0 p x ;   b o r d e r - l e f t :   5 p x   s o l i d   # F F C 1 0 7 ; " > < d i v   c l a s s = " c a r d - b o d y " > < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n " > < d i v > < s p a n   c l a s s = " t e x t - m u t e d   s m a l l " >    R               < / s p a n > < h 3   c l a s s = " f w - b o l d   m t - 1 " > < ? p h p   e c h o   $ s t a t s [ ' p e n d i n g _ o r d e r s ' ] ;   ? > < / h 3 > < s p a n   c l a s s = " b a d g e   b g - w a r n i n g   b g - o p a c i t y - 1 0   t e x t - w a r n i n g " > < i   c l a s s = " f a s   f a - c l o c k " > < / i >                < / s p a n > < / d i v > < d i v   c l a s s = " b g - w a r n i n g   b g - o p a c i t y - 1 0   p - 3   r o u n d e d - 3 " > < i   c l a s s = " f a s   f a - h o u r g l a s s - h a l f   t e x t - w a r n i n g   f s - 4 " > < / i > < / d i v > < / d i v > < / d i v > < / d i v > < / d i v > 
 
         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m   h - 1 0 0 "   s t y l e = " b o r d e r - r a d i u s : 2 0 p x ;   b o r d e r - l e f t :   5 p x   s o l i d   # 0 D C A F 0 ; " > < d i v   c l a s s = " c a r d - b o d y " > < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n " > < d i v > < s p a n   c l a s s = " t e x t - m u t e d   s m a l l " >          R    R   R    R< / s p a n > < h 3   c l a s s = " f w - b o l d   m t - 1 " > < ? p h p   e c h o   $ s t a t s [ ' t o d a y _ d e l i v e r y ' ] ;   ? > < / h 3 > < s p a n   c l a s s = " b a d g e   b g - i n f o   b g - o p a c i t y - 1 0   t e x t - i n f o " > < i   c l a s s = " f a s   f a - t r u c k " > < / i >          R< / s p a n > < / d i v > < d i v   c l a s s = " b g - i n f o   b g - o p a c i t y - 1 0   p - 3   r o u n d e d - 3 " > < i   c l a s s = " f a s   f a - t r u c k - f a s t   t e x t - i n f o   f s - 4 " > < / i > < / d i v > < / d i v > < / d i v > < / d i v > < / d i v > 
 
         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m   h - 1 0 0 "   s t y l e = " b o r d e r - r a d i u s : 2 0 p x ;   b o r d e r - l e f t :   5 p x   s o l i d   # 1 9 8 7 5 4 ; " > < d i v   c l a s s = " c a r d - b o d y " > < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n " > < d i v > < s p a n   c l a s s = " t e x t - m u t e d   s m a l l " >          &       R< / s p a n > < h 3   c l a s s = " f w - b o l d   m t - 1 " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s t a t s [ ' t o t a l _ r e v e n u e ' ] ) ;   ? > < / h 3 > < s p a n   c l a s s = " b a d g e   b g - s u c c e s s   b g - o p a c i t y - 1 0   t e x t - s u c c e s s " > < i   c l a s s = " f a s   f a - a r r o w - u p " > < / i >   8 % < / s p a n > < / d i v > < d i v   c l a s s = " b g - s u c c e s s   b g - o p a c i t y - 1 0   p - 3   r o u n d e d - 3 " > < i   c l a s s = " f a s   f a - w a l l e t   t e x t - s u c c e s s   f s - 4 " > < / i > < / d i v > < / d i v > < / d i v > < / d i v > < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " r o w   g - 4 " > 
 
         < d i v   c l a s s = " c o l - m d - 8 " > < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 2 0 p x ; " > < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 3 " > < h 6   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - c h a r t - l i n e   m e - 2   t e x t - p r i m a r y " > < / i >                             < / h 6 > < / d i v > < d i v   c l a s s = " c a r d - b o d y " > < c a n v a s   i d = " o r d e r C h a r t "   h e i g h t = " 2 0 0 " > < / c a n v a s > < / d i v > < / d i v > < / d i v > 
 
         < d i v   c l a s s = " c o l - m d - 4 " > < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 2 0 p x ; " > < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 3 " > < h 6   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 2   t e x t - p r i m a r y " > < / i >                       < / h 6 > < / d i v > < d i v   c l a s s = " c a r d - b o d y " > < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 3   m b - 3 " > < i m g   s r c = " h t t p s : / / p i c s u m . p h o t o s / s e e d / c u s t 1 / 5 0 / 5 0 "   c l a s s = " r o u n d e d - c i r c l e "   w i d t h = " 4 5 "   h e i g h t = " 4 5 " > < d i v > < s t r o n g >      &          R< / s t r o n g > < b r > < s m a l l   c l a s s = " t e x t - m u t e d " > + 9 2 3 0 0 - 1 1 1 1 1 1 1 < / s m a l l > < / d i v > < s p a n   c l a s s = " b a d g e   b g - s u c c e s s   m s - a u t o " >     R  < / s p a n > < / d i v > < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 3 " > < i m g   s r c = " h t t p s : / / p i c s u m . p h o t o s / s e e d / c u s t 2 / 5 0 / 5 0 "   c l a s s = " r o u n d e d - c i r c l e "   w i d t h = " 4 5 "   h e i g h t = " 4 5 " > < d i v > < s t r o n g >                < / s t r o n g > < b r > < s m a l l   c l a s s = " t e x t - m u t e d " > + 9 2 3 0 0 - 2 2 2 2 2 2 2 < / s m a l l > < / d i v > < s p a n   c l a s s = " b a d g e   b g - w a r n i n g   m s - a u t o " >         R< / s p a n > < / d i v > < / d i v > < / d i v > < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m   m t - 4 "   s t y l e = " b o r d e r - r a d i u s : 2 0 p x ; " > < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   p t - 3 " > < h 6   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - c l o c k   m e - 2   t e x t - p r i m a r y " > < / i >                        < / h 6 > < a   h r e f = " # "   c l a s s = " t e x t - p r i m a r y   t e x t - d e c o r a t i o n - n o n e " >  &    R       R     R    < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / a > < / d i v > < d i v   c l a s s = " c a r d - b o d y " > < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   a l i g n - m i d d l e " > < t h e a d   c l a s s = " t a b l e - l i g h t " > < t r > < t h >               R    R< / t h > < t h >         < / t h > < t h >        R  < / t h > < t h >      & < / t h > < t h >        R    < / t h > < t h >    &   < / t h > < / t r > < / t h e a d > < t b o d y > < ? p h p   f o r e a c h   ( $ r e c e n t _ o r d e r s   a s   $ o r d e r ) :   ? > < t r > < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   t e x t - s e c o n d a r y " > # O R D - 0 0 < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > < / s p a n > < / t d > < t d > < i m g   s r c = " h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = < ? p h p   e c h o   u r l e n c o d e ( $ o r d e r [ ' c u s t o m e r ' ] ) ;   ? > & b a c k g r o u n d = r a n d o m & s i z e = 3 0 "   c l a s s = " r o u n d e d - c i r c l e   m e - 2 "   w i d t h = " 3 0 "   h e i g h t = " 3 0 " >   < ? p h p   e c h o   $ o r d e r [ ' c u s t o m e r ' ] ;   ? > < / t d > < t d > < ? p h p   e c h o   $ o r d e r [ ' d a t e ' ] ;   ? > < / t d > < t d > < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' a m o u n t ' ] ) ;   ? > < / s t r o n g > < / t d > < t d > < s p a n   c l a s s = " b a d g e   b g - < ? p h p   e c h o   $ o r d e r [ ' s t a t u s ' ] = = ' p e n d i n g ' ? ' w a r n i n g ' : ( $ o r d e r [ ' s t a t u s ' ] = = ' c u t t i n g ' ? ' i n f o ' : ( $ o r d e r [ ' s t a t u s ' ] = = ' s t i t c h i n g ' ? ' p r i m a r y ' : ' s u c c e s s ' ) ) ;   ? > " > < ? p h p   e c h o   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > < / s p a n > < / t d > < t d > < a   h r e f = " # "   c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > < i   c l a s s = " f a s   f a - e y e " > < / i > < / a > < / t d > < / t r > < ? p h p   e n d f o r e a c h ;   ? > < / t b o d y > < / t a b l e > < / d i v > < / d i v > < / d i v > 
 
 < s c r i p t > d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' , f u n c t i o n ( ) { n e w   C h a r t ( d o c u m e n t . g e t E l e m e n t B y I d ( ' o r d e r C h a r t ' ) , { t y p e : ' l i n e ' , d a t a : { l a b e l s : [ '          R' , '         R' , '  &        ' , '        R  ' , '  &    R' , '       ' , '           R' ] , d a t a s e t s : [ { l a b e l : '          ' , d a t a : [ 1 2 , 1 9 , 1 5 , 2 7 , 2 2 , 3 4 , 2 5 ] , b o r d e r C o l o r : ' # 0 D 6 E F D ' , b a c k g r o u n d C o l o r : ' r g b a ( 1 3 , 1 1 0 , 2 5 3 , 0 . 1 ) ' , t e n s i o n : 0 . 4 , f i l l : t r u e } ] } , o p t i o n s : { r e s p o n s i v e : t r u e , p l u g i n s : { l e g e n d : { d i s p l a y : f a l s e } } , s c a l e s : { y : { b e g i n A t Z e r o : t r u e } } } } ) ; } ) ; < / s c r i p t > 
 
 < ? p h p   i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ;   ? > 
 
 E O T ; 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / d a s h b o a r d . p h p ' ,   $ d a s h _ c o d e ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   H E A D E R   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 $ h e a d e r _ c o d e   =   < < < ' E O T ' 
 
 < ? p h p 
 
 i f   ( s e s s i o n _ s t a t u s ( )   = = =   P H P _ S E S S I O N _ N O N E )   s e s s i o n _ s t a r t ( ) ; 
 
 i f   ( ! i s s e t ( $ _ S E S S I O N [ ' u s e r _ i d ' ] ) )   {   h e a d e r ( ' L o c a t i o n :   l o g i n . p h p ' ) ;   e x i t ;   } 
 
 $ f u l l _ n a m e   =   $ _ S E S S I O N [ ' f u l l _ n a m e ' ]   ? ?   '  &    &      ' ; 
 
 $ p r o f i l e _ p i c   =   $ _ S E S S I O N [ ' p r o f i l e _ p i c ' ]   ? ?   ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = U s e r & b a c k g r o u n d = 0 D 6 E F D & c o l o r = f f f ' ; 
 
 $ r o l e   =   $ _ S E S S I O N [ ' r o l e ' ]   ? ?   ' w o r k e r ' ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l   l a n g = " u r " > 
 
 < h e a d > < m e t a   c h a r s e t = " U T F - 8 " > < m e t a   n a m e = " v i e w p o r t "   c o n t e n t = " w i d t h = d e v i c e - w i d t h ,   i n i t i a l - s c a l e = 1 . 0 " > < t i t l e > B i z T e c h   T a i l o r < / t i t l e > 
 
 < l i n k   h r e f = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / c s s / b o o t s t r a p . m i n . c s s "   r e l = " s t y l e s h e e t " > 
 
 < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
 < l i n k   h r e f = " h t t p s : / / f o n t s . g o o g l e a p i s . c o m / c s s 2 ? f a m i l y = P o p p i n s : w g h t @ 3 0 0 ; 4 0 0 ; 5 0 0 ; 6 0 0 ; 7 0 0 & d i s p l a y = s w a p "   r e l = " s t y l e s h e e t " > 
 
 < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / c h a r t . j s " > < / s c r i p t > 
 
 < s t y l e > : r o o t { - - s i d e b a r - w i d t h : 2 6 0 p x ; - - p r i m a r y - b l u e : # 0 D 6 E F D ; - - s i d e b a r - b g : # 1 a 1 a 2 e ; } * { f o n t - f a m i l y : ' P o p p i n s ' , s a n s - s e r i f ; } b o d y { b a c k g r o u n d : # f 4 f 7 f b ; } . w r a p p e r { d i s p l a y : f l e x ; } . s i d e b a r { w i d t h : v a r ( - - s i d e b a r - w i d t h ) ; m i n - h e i g h t : 1 0 0 v h ; b a c k g r o u n d : v a r ( - - s i d e b a r - b g ) ; c o l o r : # f f f ; p o s i t i o n : f i x e d ; t o p : 0 ; l e f t : 0 ; z - i n d e x : 1 0 0 0 ; t r a n s i t i o n : a l l   0 . 3 s ; o v e r f l o w - y : a u t o ; b o x - s h a d o w : 2 p x   0   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 ) ; } . s i d e b a r   . b r a n d { p a d d i n g : 2 0 p x   1 5 p x ; b o r d e r - b o t t o m : 1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ; t e x t - a l i g n : c e n t e r ; } . s i d e b a r   . b r a n d   i { f o n t - s i z e : 3 5 p x ; c o l o r : # 6 6 7 e e a ; b a c k g r o u n d : r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 8 ) ; p a d d i n g : 1 0 p x ; b o r d e r - r a d i u s : 1 5 p x ; } . s i d e b a r   . b r a n d   h 4 { f o n t - w e i g h t : 7 0 0 ; m a r g i n - t o p : 1 0 p x ; } . s i d e b a r   . b r a n d   s p a n { c o l o r : # 6 6 7 e e a ; } . s i d e b a r   . u s e r - i n f o { p a d d i n g : 2 0 p x   1 5 p x ; d i s p l a y : f l e x ; a l i g n - i t e m s : c e n t e r ; g a p : 1 2 p x ; b o r d e r - b o t t o m : 1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ; } . s i d e b a r   . u s e r - i n f o   i m g { w i d t h : 4 5 p x ; h e i g h t : 4 5 p x ; b o r d e r - r a d i u s : 5 0 % ; b o r d e r : 2 p x   s o l i d   # 6 6 7 e e a ; o b j e c t - f i t : c o v e r ; } . s i d e b a r   . u s e r - i n f o   . n a m e { f o n t - w e i g h t : 6 0 0 ; f o n t - s i z e : 1 4 p x ; } . s i d e b a r   . u s e r - i n f o   . r o l e { f o n t - s i z e : 1 1 p x ; c o l o r : # a 0 a e c 0 ; } . s i d e b a r   . n a v - i t e m { p a d d i n g : 1 0 p x   2 0 p x ; m a r g i n : 5 p x   1 0 p x ; b o r d e r - r a d i u s : 1 2 p x ; t r a n s i t i o n : 0 . 3 s ; c o l o r : # b 0 b 8 c 8 ; d i s p l a y : f l e x ; a l i g n - i t e m s : c e n t e r ; g a p : 1 5 p x ; t e x t - d e c o r a t i o n : n o n e ; f o n t - w e i g h t : 5 0 0 ; } . s i d e b a r   . n a v - i t e m   i { w i d t h : 2 2 p x ; f o n t - s i z e : 1 8 p x ; } . s i d e b a r   . n a v - i t e m : h o v e r , . s i d e b a r   . n a v - i t e m . a c t i v e { b a c k g r o u n d : # 2 d 2 d 4 4 ; c o l o r : # f f f ; } . s i d e b a r   . n a v - i t e m . a c t i v e { b a c k g r o u n d : # 0 D 6 E F D ; c o l o r : # f f f ; b o x - s h a d o w : 0   5 p x   1 5 p x   r g b a ( 1 3 , 1 1 0 , 2 5 3 , 0 . 3 ) ; } . s i d e b a r   . n a v - i t e m   . b a d g e { m a r g i n - l e f t : a u t o ; b a c k g r o u n d : # d c 3 5 4 5 ; } . m a i n - c o n t e n t { m a r g i n - l e f t : v a r ( - - s i d e b a r - w i d t h ) ; w i d t h : 1 0 0 % ; m i n - h e i g h t : 1 0 0 v h ; p a d d i n g : 0 ; } . t o p - n a v { b a c k g r o u n d : # f f f ; p a d d i n g : 1 5 p x   2 5 p x ; b o x - s h a d o w : 0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; d i s p l a y : f l e x ; j u s t i f y - c o n t e n t : s p a c e - b e t w e e n ; a l i g n - i t e m s : c e n t e r ; p o s i t i o n : s t i c k y ; t o p : 0 ; z - i n d e x : 9 9 9 ; } . t o p - n a v   . p a g e - t i t l e   h 5 { f o n t - w e i g h t : 6 0 0 ; m a r g i n : 0 ; } . t o p - n a v   . p a g e - t i t l e   s m a l l { c o l o r : # 6 c 7 5 7 d ; f o n t - s i z e : 1 3 p x ; } . t o p - n a v   . n a v - i c o n s { d i s p l a y : f l e x ; a l i g n - i t e m s : c e n t e r ; g a p : 2 0 p x ; } . t o p - n a v   . n a v - i c o n s   . i c o n - b t n { w i d t h : 4 0 p x ; h e i g h t : 4 0 p x ; b o r d e r - r a d i u s : 5 0 % ; b a c k g r o u n d : # f 8 f 9 f a ; b o r d e r : n o n e ; d i s p l a y : f l e x ; a l i g n - i t e m s : c e n t e r ; j u s t i f y - c o n t e n t : c e n t e r ; c o l o r : # 4 9 5 0 5 7 ; t r a n s i t i o n : 0 . 3 s ; p o s i t i o n : r e l a t i v e ; } . t o p - n a v   . n a v - i c o n s   . i c o n - b t n : h o v e r { b a c k g r o u n d : # e 9 e c e f ; } . t o p - n a v   . n a v - i c o n s   . i c o n - b t n   . b a d g e - d o t { p o s i t i o n : a b s o l u t e ; t o p : 5 p x ; r i g h t : 5 p x ; w i d t h : 8 p x ; h e i g h t : 8 p x ; b a c k g r o u n d : # d c 3 5 4 5 ; b o r d e r - r a d i u s : 5 0 % ; } . t o p - n a v   . n a v - i c o n s   . u s e r - d r o p d o w n   i m g { w i d t h : 3 8 p x ; h e i g h t : 3 8 p x ; b o r d e r - r a d i u s : 5 0 % ; o b j e c t - f i t : c o v e r ; b o r d e r : 2 p x   s o l i d   # e 9 e c e f ; c u r s o r : p o i n t e r ; } . d r o p d o w n - m e n u { b o r d e r - r a d i u s : 1 5 p x ; b o r d e r : n o n e ; b o x - s h a d o w : 0   1 0 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 ) ; } . p a g e - c o n t e n t { p a d d i n g : 2 5 p x ; } @ m e d i a ( m a x - w i d t h : 7 6 8 p x ) { . s i d e b a r { m a r g i n - l e f t : - 2 6 0 p x ; } . s i d e b a r . s h o w { m a r g i n - l e f t : 0 ; } . m a i n - c o n t e n t { m a r g i n - l e f t : 0 ; } . t o g g l e - s i d e b a r { d i s p l a y : b l o c k ! i m p o r t a n t ; } } . t o g g l e - s i d e b a r { d i s p l a y : n o n e ; b a c k g r o u n d : n o n e ; b o r d e r : n o n e ; f o n t - s i z e : 2 4 p x ; c o l o r : # 4 9 5 0 5 7 ; } < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " w r a p p e r " > 
 
 < n a v   c l a s s = " s i d e b a r "   i d = " s i d e b a r " > 
 
 < d i v   c l a s s = " b r a n d " > < i   c l a s s = " f a s   f a - s c r o l l " > < / i > < h 4 > B i z < s p a n > T e c h < / s p a n > < / h 4 > < s m a l l   s t y l e = " c o l o r : # a 0 a e c 0 ; f o n t - s i z e : 1 1 p x ; " >    R       &  R      &      < / s m a l l > < / d i v > 
 
 < d i v   c l a s s = " u s e r - i n f o " > < i m g   s r c = " < ? p h p   e c h o   $ p r o f i l e _ p i c ;   ? > "   a l t = " U s e r " > < d i v > < d i v   c l a s s = " n a m e " > < ? p h p   e c h o   $ f u l l _ n a m e ;   ? > < / d i v > < d i v   c l a s s = " r o l e " > < i   c l a s s = " f a s   f a - c i r c l e "   s t y l e = " c o l o r : # 2 e c c 7 1 ; f o n t - s i z e : 8 p x ; m a r g i n - r i g h t : 5 p x ; " > < / i >   < ? p h p   e c h o   u c f i r s t ( $ r o l e ) ;   ? > < / d i v > < / d i v > < / d i v > 
 
 < d i v   c l a s s = " m t - 2 " > 
 
 < a   h r e f = " d a s h b o a r d . p h p "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   b a s e n a m e ( $ _ S E R V E R [ ' P H P _ S E L F ' ] ) = = ' d a s h b o a r d . p h p ' ? ' a c t i v e ' : ' ' ;   ? > " > < i   c l a s s = " f a s   f a - c h a r t - p i e " > < / i >   < s p a n >   R          < / s p a n > < / a > 
 
 < a   h r e f = " c u s t o m e r s . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - u s e r s " > < / i >   < s p a n >         < / s p a n >   < s p a n   c l a s s = " b a d g e " > 1 2 < / s p a n > < / a > 
 
 < a   h r e f = " o r d e r s . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g " > < / i >   < s p a n >          < / s p a n >   < s p a n   c l a s s = " b a d g e " > 8 < / s p a n > < / a > 
 
 < a   h r e f = " c u t t i n g . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - c u t " > < / i >   < s p a n >          < / s p a n > < / a > 
 
 < a   h r e f = " s t i t c h i n g . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - t s h i r t " > < / i >   < s p a n >          R< / s p a n > < / a > 
 
 < a   h r e f = " d e l i v e r y . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - t r u c k " > < / i >   < s p a n >   R   R    R< / s p a n > < / a > 
 
 < a   h r e f = " l e d g e r s . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - b o o k " > < / i >   < s p a n >    R    < / s p a n > < / a > 
 
 < a   h r e f = " r e p o r t s . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - f i l e - a l t " > < / i >   < s p a n >            < / s p a n > < / a > 
 
 < a   h r e f = " s e t t i n g s . p h p "   c l a s s = " n a v - i t e m " > < i   c l a s s = " f a s   f a - c o g " > < / i >   < s p a n >    R         < / s p a n > < / a > 
 
 < a   h r e f = " l o g o u t . p h p "   c l a s s = " n a v - i t e m "   s t y l e = " c o l o r : # f f 6 b 6 b ; " > < i   c l a s s = " f a s   f a - s i g n - o u t - a l t " > < / i >   < s p a n >               < / s p a n > < / a > 
 
 < / d i v > 
 
 < / n a v > 
 
 < d i v   c l a s s = " m a i n - c o n t e n t " > 
 
 < n a v   c l a s s = " t o p - n a v " > 
 
 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   g a p - 3 " > 
 
 < b u t t o n   c l a s s = " t o g g l e - s i d e b a r "   o n c l i c k = " d o c u m e n t . g e t E l e m e n t B y I d ( ' s i d e b a r ' ) . c l a s s L i s t . t o g g l e ( ' s h o w ' ) " > < i   c l a s s = " f a s   f a - b a r s " > < / i > < / b u t t o n > 
 
 < d i v   c l a s s = " p a g e - t i t l e " > < h 5 > < ? p h p   e c h o   b a s e n a m e ( $ _ S E R V E R [ ' P H P _ S E L F ' ] ,   ' . p h p ' ) ;   ? > < / h 5 > < s m a l l > < i   c l a s s = " f a s   f a - c a l e n d a r - a l t   m e - 1 " > < / i >   < ? p h p   e c h o   d a t e ( ' d   F ,   Y ' ) ;   ? > < / s m a l l > < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " n a v - i c o n s " > 
 
 < b u t t o n   c l a s s = " i c o n - b t n " > < i   c l a s s = " f a s   f a - s e a r c h " > < / i > < / b u t t o n > 
 
 < b u t t o n   c l a s s = " i c o n - b t n " > < i   c l a s s = " f a s   f a - b e l l " > < / i >   < s p a n   c l a s s = " b a d g e - d o t " > < / s p a n > < / b u t t o n > 
 
 < d i v   c l a s s = " d r o p d o w n   u s e r - d r o p d o w n " > 
 
 < i m g   s r c = " < ? p h p   e c h o   $ p r o f i l e _ p i c ;   ? > "   d a t a - b s - t o g g l e = " d r o p d o w n "   a r i a - e x p a n d e d = " f a l s e " > 
 
 < u l   c l a s s = " d r o p d o w n - m e n u   d r o p d o w n - m e n u - e n d " > 
 
 < l i > < a   c l a s s = " d r o p d o w n - i t e m "   h r e f = " # " > < i   c l a s s = " f a s   f a - u s e r   m e - 2 " > < / i >              < / a > < / l i > 
 
 < l i > < a   c l a s s = " d r o p d o w n - i t e m "   h r e f = " # " > < i   c l a s s = " f a s   f a - c o g   m e - 2 " > < / i >    R         < / a > < / l i > 
 
 < l i > < h r   c l a s s = " d r o p d o w n - d i v i d e r " > < / l i > 
 
 < l i > < a   c l a s s = " d r o p d o w n - i t e m   t e x t - d a n g e r "   h r e f = " l o g o u t . p h p " > < i   c l a s s = " f a s   f a - s i g n - o u t - a l t   m e - 2 " > < / i >               < / a > < / l i > 
 
 < / u l > 
 
 < / d i v > 
 
 < / d i v > 
 
 < / n a v > 
 
 < d i v   c l a s s = " p a g e - c o n t e n t " > 
 
 E O T ; 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ,   $ h e a d e r _ c o d e ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   F O O T E R   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 $ f o o t e r _ c o d e   =   < < < ' E O T ' 
 
 < / d i v > < / d i v > < / d i v > 
 
 < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / j s / b o o t s t r a p . b u n d l e . m i n . j s " > < / s c r i p t > 
 
 < s c r i p t > d o c u m e n t . a d d E v e n t L i s t e n e r ( ' c l i c k ' , f u n c t i o n ( e ) { c o n s t   s = d o c u m e n t . g e t E l e m e n t B y I d ( ' s i d e b a r ' ) , t = d o c u m e n t . q u e r y S e l e c t o r ( ' . t o g g l e - s i d e b a r ' ) ; i f ( w i n d o w . i n n e r W i d t h < = 7 6 8 ) { i f ( ! s . c o n t a i n s ( e . t a r g e t ) & & ! t . c o n t a i n s ( e . t a r g e t ) ) { s . c l a s s L i s t . r e m o v e ( ' s h o w ' ) ; } } } ) ; < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 E O T ; 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ,   $ f o o t e r _ c o d e ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   i n d e x . p h p   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / i n d e x . p h p ' ,   ' < ? p h p   h e a d e r ( " L o c a t i o n :   d a s h b o a r d . p h p " ) ;   e x i t ;   ? > ' ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   . h t a c c e s s   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / . h t a c c e s s ' ,   ' R e w r i t e E n g i n e   O n 
 
 R e w r i t e C o n d   % { R E Q U E S T _ F I L E N A M E }   ! - f 
 
 R e w r i t e C o n d   % { R E Q U E S T _ F I L E N A M E }   ! - d 
 
 R e w r i t e R u l e   ^ ( . * ) $   i n d e x . p h p   [ Q S A , L ] ' ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   R E A D M E   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 w r i t e F i l e ( R O O T _ P A T H   .   ' / R E A D M E . m d ' ,   ' #   B i z T e c h T a i l o r   -   T a i l o r   M a n a g e m e n t   S y s t e m ' ) ; 
 
 
 
                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = =   E M P T Y   F I L E S   ( P l a c e h o l d e r s )   = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                 / /   C r e a t e   a l l   o t h e r   f i l e s   a s   e m p t y   p l a c e h o l d e r s   t o   a v o i d   4 0 4 s   l a t e r 
 
                 $ e m p t y _ f i l e s   =   [ 
 
                         ' a p p / c o n f i g / c o n f i g . p h p ' ,   ' a p p / c o n f i g / c o n s t a n t s . p h p ' ,   ' a p p / c o n f i g / r o u t e s . p h p ' , 
 
                         ' a p p / c o r e / D a t a b a s e . p h p ' ,   ' a p p / c o r e / S e s s i o n . p h p ' ,   ' a p p / c o r e / H e l p e r . p h p ' ,   ' a p p / c o r e / L a n g u a g e . p h p ' ,   ' a p p / c o r e / R o u t e r . p h p ' ,   ' a p p / c o r e / V a l i d a t o r . p h p ' , 
 
                         ' a p p / c o n t r o l l e r s / L o g i n C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / D a s h b o a r d C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / C u s t o m e r C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / M e a s u r e m e n t C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / O r d e r C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / C u t t i n g C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / S t i t c h i n g C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / S h e l f C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / D e l i v e r y C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / L e d g e r C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / R e p o r t C o n t r o l l e r . p h p ' ,   ' a p p / c o n t r o l l e r s / S e t t i n g s C o n t r o l l e r . p h p ' , 
 
                         ' a p p / m o d e l s / U s e r . p h p ' ,   ' a p p / m o d e l s / C u s t o m e r . p h p ' ,   ' a p p / m o d e l s / M e a s u r e m e n t . p h p ' ,   ' a p p / m o d e l s / O r d e r . p h p ' ,   ' a p p / m o d e l s / C u t t i n g . p h p ' ,   ' a p p / m o d e l s / S t i t c h i n g . p h p ' ,   ' a p p / m o d e l s / S h e l f . p h p ' ,   ' a p p / m o d e l s / L e d g e r . p h p ' ,   ' a p p / m o d e l s / R e p o r t . p h p ' , 
 
                         ' a p p / h e l p e r s / f u n c t i o n s . p h p ' ,   ' a p p / h e l p e r s / l a n g u a g e _ h e l p e r . p h p ' ,   ' a p p / h e l p e r s / d a t e _ h e l p e r . p h p ' ,   ' a p p / h e l p e r s / n u m b e r _ h e l p e r . p h p ' , 
 
                         ' a p p / l a n g u a g e / e n . p h p ' ,   ' a p p / l a n g u a g e / u r . p h p ' ,   ' a p p / l a n g u a g e / s d . p h p ' , 
 
                         ' a p p / v i e w s / d a s h b o a r d / i n d e x . p h p ' , 
 
                         ' a p p / v i e w s / c u s t o m e r s / i n d e x . p h p ' ,   ' a p p / v i e w s / c u s t o m e r s / a d d . p h p ' ,   ' a p p / v i e w s / c u s t o m e r s / e d i t . p h p ' ,   ' a p p / v i e w s / c u s t o m e r s / p r o f i l e . p h p ' ,   ' a p p / v i e w s / c u s t o m e r s / m e a s u r e m e n t s . p h p ' , 
 
                         ' a p p / v i e w s / o r d e r s / i n d e x . p h p ' ,   ' a p p / v i e w s / o r d e r s / a d d . p h p ' ,   ' a p p / v i e w s / o r d e r s / e d i t . p h p ' ,   ' a p p / v i e w s / o r d e r s / i n v o i c e . p h p ' , 
 
                         ' a p p / v i e w s / c u t t i n g / i n d e x . p h p ' ,   ' a p p / v i e w s / s t i t c h i n g / i n d e x . p h p ' ,   ' a p p / v i e w s / s h e l v e s / i n d e x . p h p ' ,   ' a p p / v i e w s / d e l i v e r y / i n d e x . p h p ' , 
 
                         ' a p p / v i e w s / l e d g e r s / c u s t o m e r . p h p ' ,   ' a p p / v i e w s / l e d g e r s / c u t t i n g . p h p ' ,   ' a p p / v i e w s / l e d g e r s / k a r i g a r . p h p ' ,   ' a p p / v i e w s / l e d g e r s / c a s h b o o k . p h p ' , 
 
                         ' a p p / v i e w s / r e p o r t s / d a s h b o a r d . p h p ' ,   ' a p p / v i e w s / r e p o r t s / d a i l y . p h p ' ,   ' a p p / v i e w s / r e p o r t s / c u s t o m e r . p h p ' ,   ' a p p / v i e w s / r e p o r t s / k a r i g a r . p h p ' , 
 
                         ' a p p / v i e w s / s e t t i n g s / c o m p a n y . p h p ' ,   ' a p p / v i e w s / s e t t i n g s / u s e r s . p h p ' ,   ' a p p / v i e w s / s e t t i n g s / l a n g u a g e . p h p ' ,   ' a p p / v i e w s / s e t t i n g s / b a c k u p . p h p ' , 
 
                         ' a j a x / c u s t o m e r s . p h p ' ,   ' a j a x / m e a s u r e m e n t s . p h p ' ,   ' a j a x / o r d e r s . p h p ' ,   ' a j a x / c u t t i n g . p h p ' ,   ' a j a x / s t i t c h i n g . p h p ' ,   ' a j a x / d e l i v e r y . p h p ' ,   ' a j a x / l e d g e r s . p h p ' ,   ' a j a x / r e p o r t s . p h p ' , 
 
                         ' a s s e t s / c s s / s t y l e . c s s ' ,   ' a s s e t s / c s s / r t l . c s s ' ,   ' a s s e t s / c s s / l t r . c s s ' ,   ' a s s e t s / c s s / p r i n t . c s s ' , 
 
                         ' a s s e t s / j s / a p p . j s ' ,   ' a s s e t s / j s / c u s t o m e r . j s ' ,   ' a s s e t s / j s / o r d e r . j s ' ,   ' a s s e t s / j s / d e l i v e r y . j s ' ,   ' a s s e t s / j s / r e p o r t . j s ' , 
 
                         ' p r i n t / i n v o i c e . p h p ' ,   ' p r i n t / r e c e i p t . p h p ' ,   ' p r i n t / m e a s u r e m e n t . p h p ' ,   ' p r i n t / b a r c o d e . p h p ' 
 
                 ] ; 
 
                 f o r e a c h   ( $ e m p t y _ f i l e s   a s   $ f i l e )   { 
 
                         w r i t e F i l e ( R O O T _ P A T H   .   ' / '   .   $ f i l e ,   ' < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > ' ) ; 
 
                 } 
 
 
 
                 / /   C r e a t e   e m p t y   d i r e c t o r i e s   f o r   u p l o a d s ,   s t o r a g e ,   e t c . 
 
                 $ e m p t y _ d i r s   =   [ 
 
                         ' a s s e t s / i m a g e s ' ,   ' a s s e t s / f o n t s ' ,   ' a s s e t s / p l u g i n s ' , 
 
                         ' a s s e t s / u p l o a d s / c u s t o m e r s ' ,   ' a s s e t s / u p l o a d s / m e a s u r e m e n t s ' ,   ' a s s e t s / u p l o a d s / i n v o i c e s ' ,   ' a s s e t s / u p l o a d s / r e c e i p t s ' ,   ' a s s e t s / u p l o a d s / t e m p ' , 
 
                         ' r e p o r t s ' ,   ' l o g s ' ,   ' b a c k u p ' ,   ' b a r c o d e ' ,   ' q r c o d e ' ,   ' c a c h e ' , 
 
                         ' s t o r a g e / e x p o r t s ' ,   ' s t o r a g e / i m p o r t s ' ,   ' s t o r a g e / i n v o i c e s ' ,   ' s t o r a g e / r e c e i p t s ' , 
 
                         ' s e t u p ' 
 
                 ] ; 
 
                 f o r e a c h   ( $ e m p t y _ d i r s   a s   $ d i r )   { 
 
                         c r e a t e D i r e c t o r y ( R O O T _ P A T H   .   ' / '   .   $ d i r ) ; 
 
                         / /   P u t   i n d e x . h t m l   t o   p r e v e n t   d i r e c t o r y   l i s t i n g 
 
                         f i l e _ p u t _ c o n t e n t s ( R O O T _ P A T H   .   ' / '   .   $ d i r   .   ' / i n d e x . h t m l ' ,   ' ' ) ; 
 
                 } 
 
 
 
                 $ s u c c e s s   =   t r u e ; 
 
 
 
         }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                 $ e r r o r s [ ]   =   $ e - > g e t M e s s a g e ( ) ; 
 
         } 
 
 
 
         / /   S h o w   r e s u l t   p a g e 
 
         ? > 
 
         < ! D O C T Y P E   h t m l > 
 
         < h t m l   l a n g = " u r " > 
 
         < h e a d > 
 
                 < m e t a   c h a r s e t = " U T F - 8 " > 
 
                 < m e t a   n a m e = " v i e w p o r t "   c o n t e n t = " w i d t h = d e v i c e - w i d t h ,   i n i t i a l - s c a l e = 1 . 0 " > 
 
                 < t i t l e > B i z T e c h T a i l o r   -                 R        &    &   < / t i t l e > 
 
                 < l i n k   h r e f = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / c s s / b o o t s t r a p . m i n . c s s "   r e l = " s t y l e s h e e t " > 
 
                 < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
                 < s t y l e > 
 
                         b o d y   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ;   m i n - h e i g h t :   1 0 0 v h ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   c e n t e r ;   f o n t - f a m i l y :   ' S e g o e   U I ' ,   T a h o m a ,   G e n e v a ,   V e r d a n a ,   s a n s - s e r i f ;   } 
 
                         . r e s u l t - c a r d   {   b a c k g r o u n d :   # f f f ;   b o r d e r - r a d i u s :   3 0 p x ;   p a d d i n g :   4 0 p x ;   m a x - w i d t h :   6 0 0 p x ;   w i d t h :   1 0 0 % ;   b o x - s h a d o w :   0   2 0 p x   6 0 p x   r g b a ( 0 , 0 , 0 , 0 . 3 ) ;   t e x t - a l i g n :   c e n t e r ;   } 
 
                         . r e s u l t - c a r d   . i c o n   {   f o n t - s i z e :   6 0 p x ;   } 
 
                         . r e s u l t - c a r d   . i c o n . s u c c e s s   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
                         . r e s u l t - c a r d   . i c o n . e r r o r   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
                         . b t n - l o g i n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ;   c o l o r :   # f f f ;   b o r d e r :   n o n e ;   p a d d i n g :   1 2 p x   3 0 p x ;   b o r d e r - r a d i u s :   5 0 p x ;   f o n t - w e i g h t :   6 0 0 ;   t r a n s i t i o n :   0 . 3 s ;   t e x t - d e c o r a t i o n :   n o n e ;   d i s p l a y :   i n l i n e - b l o c k ;   } 
 
                         . b t n - l o g i n : h o v e r   {   t r a n s f o r m :   s c a l e ( 1 . 0 5 ) ;   c o l o r :   # f f f ;   } 
 
                 < / s t y l e > 
 
         < / h e a d > 
 
         < b o d y > 
 
                 < d i v   c l a s s = " r e s u l t - c a r d " > 
 
                         < ? p h p   i f   ( $ s u c c e s s ) :   ? > 
 
                                 < d i v   c l a s s = " i c o n   s u c c e s s " > < i   c l a s s = " f a s   f a - c h e c k - c i r c l e " > < / i > < / d i v > 
 
                                 < h 2   c l a s s = " f w - b o l d " >  S&                 R        &    &   ! < / h 2 > 
 
                                 < p   c l a s s = " t e x t - m u t e d " > B i z T e c h T a i l o r          &        &  R     R                               R          < / p > 
 
                                 < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   t e x t - s t a r t " > 
 
                                         < i   c l a s s = " f a s   f a - u s e r   m e - 2 " > < / i >   < s t r o n g >                 & : < / s t r o n g >   a d m i n < b r > 
 
                                         < i   c l a s s = " f a s   f a - l o c k   m e - 2 " > < / i >   < s t r o n g >             : < / s t r o n g >   a d m i n 1 2 3 
 
                                 < / d i v > 
 
                                 < a   h r e f = " l o g i n . p h p "   c l a s s = " b t n   b t n - l o g i n " > < i   c l a s s = " f a s   f a - s i g n - i n - a l t   m e - 2 " > < / i >                       R  < / a > 
 
                                 < d i v   c l a s s = " m t - 3   t e x t - m u t e d   s m a l l " > 
 
                                         < i   c l a s s = " f a s   f a - s h i e l d - a l t   m e - 1 " > < / i >      R   R      R           R    < s t r o n g > i n s t a l l . p h p < / s t r o n g >                         R    
 
                                 < / d i v > 
 
                         < ? p h p   e l s e :   ? > 
 
                                 < d i v   c l a s s = " i c o n   e r r o r " > < i   c l a s s = " f a s   f a - t i m e s - c i r c l e " > < / i > < / d i v > 
 
                                 < h 2   c l a s s = " f w - b o l d " >   R           R!   < / h 2 > 
 
                                 < p   c l a s s = " t e x t - m u t e d " >            R       R                        : < / p > 
 
                                 < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   t e x t - s t a r t " > 
 
                                         < ? p h p   f o r e a c h   ( $ e r r o r s   a s   $ e r r ) :   e c h o   " < i   c l a s s = ' f a s   f a - e x c l a m a t i o n - c i r c l e   m e - 2 ' > < / i > $ e r r < b r > " ;   e n d f o r e a c h ;   ? > 
 
                                 < / d i v > 
 
                                 < a   h r e f = " ? s t e p = 1 "   c l a s s = " b t n   b t n - l o g i n " > < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 2 " > < / i >                   R  < / a > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / d i v > 
 
         < / b o d y > 
 
         < / h t m l > 
 
         < ? p h p 
 
         e x i t ; 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 r e q u i r e _ o n c e   ' a p p / c o n f i g / d a t a b a s e . p h p ' ; 
 
 r e q u i r e _ o n c e   ' a p p / c o r e / A u t h . p h p ' ; 
 
 
 
 / /   A g a r   a l r e a d y   l o g g e d   i n   h a i   t o   d a s h b o a r d   p a r   b h e j   d o 
 
 A u t h : : i n i t ( ) ; 
 
 i f   ( A u t h : : i s L o g g e d I n ( ) )   { 
 
         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d a s h b o a r d ' ) ; 
 
         e x i t ; 
 
 } 
 
 
 
 $ e r r o r   =   ' ' ; 
 
 
 
 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
         $ u s e r n a m e   =   t r i m ( $ _ P O S T [ ' u s e r n a m e ' ]   ? ?   ' ' ) ; 
 
         $ p a s s w o r d   =   t r i m ( $ _ P O S T [ ' p a s s w o r d ' ]   ? ?   ' ' ) ; 
 
         
 
         i f   ( e m p t y ( $ u s e r n a m e )   | |   e m p t y ( $ p a s s w o r d ) )   { 
 
                 $ e r r o r   =   ' P l e a s e   e n t e r   u s e r n a m e   a n d   p a s s w o r d . ' ; 
 
         }   e l s e   { 
 
                 / /   D a t a b a s e   s e   u s e r   c h e c k   k a r e i n 
 
                 g l o b a l   $ d b ; 
 
                 $ s t m t   =   $ d b - > p r e p a r e ( " S E L E C T   *   F R O M   u s e r s   W H E R E   u s e r n a m e   =   ?   A N D   s t a t u s   =   ' a c t i v e ' " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ u s e r n a m e ] ) ; 
 
                 $ u s e r   =   $ s t m t - > f e t c h ( ) ; 
 
                 
 
                 / /   S u p e r   A d m i n   c h e c k   ( a g a r   d a t a b a s e   m e i n   n a h i   h a i   t o   h a r d c o d e d ) 
 
                 i f   ( ! $ u s e r   & &   $ u s e r n a m e   = = =   ' a d m i n '   & &   $ p a s s w o r d   = = =   ' a d m i n 1 2 3 ' )   { 
 
                         / /   S u p e r   A d m i n   l o g i n   ( h a r d c o d e d   f a l l b a c k ) 
 
                         $ u s e r   =   [ 
 
                                 ' i d '   = >   1 , 
 
                                 ' u s e r n a m e '   = >   ' a d m i n ' , 
 
                                 ' p a s s w o r d '   = >   p a s s w o r d _ h a s h ( ' a d m i n 1 2 3 ' ,   P A S S W O R D _ D E F A U L T ) , 
 
                                 ' f u l l _ n a m e '   = >   ' S u p e r   A d m i n ' , 
 
                                 ' r o l e '   = >   ' s u p e r a d m i n ' , 
 
                                 ' c o m p a n y _ i d '   = >   n u l l , 
 
                                 ' p r o f i l e _ p i c '   = >   ' d e f a u l t _ a v a t a r . p n g ' , 
 
                                 ' s t a t u s '   = >   ' a c t i v e ' 
 
                         ] ; 
 
                         / /   I n s e r t   i n t o   d a t a b a s e   i f   n o t   e x i s t s 
 
                         $ c h e c k   =   $ d b - > p r e p a r e ( " S E L E C T   i d   F R O M   u s e r s   W H E R E   u s e r n a m e   =   ' a d m i n ' " ) ; 
 
                         $ c h e c k - > e x e c u t e ( ) ; 
 
                         i f   ( ! $ c h e c k - > f e t c h ( ) )   { 
 
                                 $ i n s e r t   =   $ d b - > p r e p a r e ( " I N S E R T   I N T O   u s e r s   ( u s e r n a m e ,   p a s s w o r d ,   f u l l _ n a m e ,   r o l e ,   c o m p a n y _ i d ,   s t a t u s )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ) ; 
 
                                 $ i n s e r t - > e x e c u t e ( [ ' a d m i n ' ,   $ u s e r [ ' p a s s w o r d ' ] ,   ' S u p e r   A d m i n ' ,   ' s u p e r a d m i n ' ,   n u l l ,   ' a c t i v e ' ] ) ; 
 
                         } 
 
                 } 
 
                 
 
                 i f   ( $ u s e r   & &   p a s s w o r d _ v e r i f y ( $ p a s s w o r d ,   $ u s e r [ ' p a s s w o r d ' ] ) )   { 
 
                         A u t h : : l o g i n ( $ u s e r ) ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d a s h b o a r d ' ) ; 
 
                         e x i t ; 
 
                 }   e l s e   { 
 
                         $ e r r o r   =   ' I n v a l i d   u s e r n a m e   o r   p a s s w o r d . ' ; 
 
                 } 
 
         } 
 
 } 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l   l a n g = " e n " > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < m e t a   n a m e = " v i e w p o r t "   c o n t e n t = " w i d t h = d e v i c e - w i d t h ,   i n i t i a l - s c a l e = 1 . 0 " > 
 
         < t i t l e > L o g i n   -   B i z T e c h   T a i l o r < / t i t l e > 
 
         < l i n k   h r e f = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / c s s / b o o t s t r a p . m i n . c s s "   r e l = " s t y l e s h e e t " > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 4 . 0 / c s s / a l l . m i n . c s s " > 
 
         < s t y l e > 
 
                 b o d y   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 } 
 
                 . l o g i n - c a r d   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                         p a d d i n g :   4 0 p x ; 
 
                         m a x - w i d t h :   4 2 0 p x ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         b o x - s h a d o w :   0   2 0 p x   6 0 p x   r g b a ( 0 , 0 , 0 , 0 . 3 ) ; 
 
                 } 
 
                 . l o g i n - c a r d   . l o g o   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         m a r g i n - b o t t o m :   3 0 p x ; 
 
                 } 
 
                 . l o g i n - c a r d   . l o g o   i   { 
 
                         f o n t - s i z e :   4 8 p x ; 
 
                         c o l o r :   # 6 6 7 e e a ; 
 
                 } 
 
                 . l o g i n - c a r d   . l o g o   h 4   { 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 . l o g i n - c a r d   . l o g o   p   { 
 
                         c o l o r :   # 7 1 8 0 9 6 ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                 } 
 
                 . f o r m - c o n t r o l   { 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         p a d d i n g :   1 2 p x   1 6 p x ; 
 
                         b o r d e r :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         f o n t - s i z e :   1 5 p x ; 
 
                 } 
 
                 . f o r m - c o n t r o l : f o c u s   { 
 
                         b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
                         b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 2 ) ; 
 
                 } 
 
                 . b t n - l o g i n   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         p a d d i n g :   1 2 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         c o l o r :   # f f f ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 } 
 
                 . b t n - l o g i n : h o v e r   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                         b o x - s h a d o w :   0   8 p x   2 5 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 4 ) ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . e r r o r - m s g   { 
 
                         b a c k g r o u n d :   # f e e 2 e 2 ; 
 
                         c o l o r :   # d c 2 6 2 6 ; 
 
                         p a d d i n g :   1 0 p x   1 6 p x ; 
 
                         b o r d e r - r a d i u s :   1 0 p x ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         m a r g i n - b o t t o m :   1 6 p x ; 
 
                 } 
 
                 . l o g i n - f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         m a r g i n - t o p :   2 0 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         c o l o r :   # 9 4 a 3 b 8 ; 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " l o g i n - c a r d " > 
 
                 < d i v   c l a s s = " l o g o " > 
 
                         < i   c l a s s = " f a s   f a - t s h i r t " > < / i > 
 
                         < h 4 > B i z T e c h   T a i l o r < / h 4 > 
 
                         < p > S i g n   i n   t o   y o u r   a c c o u n t < / p > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( $ e r r o r ) :   ? > 
 
                         < d i v   c l a s s = " e r r o r - m s g " > < i   c l a s s = " f a s   f a - e x c l a m a t i o n - c i r c l e   m e - 2 " > < / i > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " > U s e r n a m e < / l a b e l > 
 
                                 < i n p u t   t y p e = " t e x t "   n a m e = " u s e r n a m e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " E n t e r   u s e r n a m e "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ P O S T [ ' u s e r n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - s e m i b o l d " > P a s s w o r d < / l a b e l > 
 
                                 < i n p u t   t y p e = " p a s s w o r d "   n a m e = " p a s s w o r d "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " E n t e r   p a s s w o r d "   r e q u i r e d > 
 
                         < / d i v > 
 
                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - l o g i n " > 
 
                                 < i   c l a s s = " f a s   f a - s i g n - i n - a l t   m e - 2 " > < / i >   S i g n   I n 
 
                         < / b u t t o n > 
 
                 < / f o r m > 
 
 
 
                 < d i v   c l a s s = " l o g i n - f o o t e r " > 
 
                         < s m a l l > D e f a u l t   S u p e r   A d m i n :   < s t r o n g > a d m i n < / s t r o n g >   /   < s t r o n g > a d m i n 1 2 3 < / s t r o n g > < / s m a l l > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / j s / b o o t s t r a p . b u n d l e . m i n . j s " > < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < ? p h p 
 
 r e q u i r e _ o n c e   ' a p p / c o r e / A u t h . p h p ' ; 
 
 A u t h : : l o g o u t ( ) ; 
 
 h e a d e r ( ' L o c a t i o n :   l o g i n . p h p ' ) ; 
 
 e x i t ; 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 d e f i n e ( ' D B _ H O S T ' ,   ' l o c a l h o s t ' ) ; 
 
 d e f i n e ( ' D B _ N A M E ' ,   ' b i z t e c h _ t a i l o r ' ) ; 
 
 d e f i n e ( ' D B _ U S E R ' ,   ' r o o t ' ) ; 
 
 d e f i n e ( ' D B _ P A S S ' ,   ' ' ) ; 
 
 
 
 t r y   { 
 
         $ d b   =   n e w   P D O ( " m y s q l : h o s t = " . D B _ H O S T . " ; d b n a m e = " . D B _ N A M E . " ; c h a r s e t = u t f 8 m b 4 " ,   D B _ U S E R ,   D B _ P A S S ) ; 
 
         $ d b - > s e t A t t r i b u t e ( P D O : : A T T R _ E R R M O D E ,   P D O : : E R R M O D E _ E X C E P T I O N ) ; 
 
         $ d b - > s e t A t t r i b u t e ( P D O : : A T T R _ D E F A U L T _ F E T C H _ M O D E ,   P D O : : F E T C H _ A S S O C ) ; 
 
 }   c a t c h ( P D O E x c e p t i o n   $ e )   { 
 
         d i e ( " D a t a b a s e   C o n n e c t i o n   F a i l e d :   "   .   $ e - > g e t M e s s a g e ( ) ) ; 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 c l a s s   C o m p a n y C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 A u t h : : r e q u i r e S u p e r A d m i n ( ) ;   / /   O n l y   S u p e r   A d m i n   c a n   a c c e s s 
 
         } 
 
 
 
         / /   = = = = =   I N D E X   -   L i s t   a l l   c o m p a n i e s   = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ c o m p a n i e s   =   $ t h i s - > g e t A l l C o m p a n i e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / c o m p a n i e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   A L L   C O M P A N I E S   = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t A l l C o m p a n i e s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   c . * ,   
 
                                       ( S E L E C T   C O U N T ( * )   F R O M   u s e r s   W H E R E   c o m p a n y _ i d   =   c . i d )   a s   u s e r _ c o u n t , 
 
                                       ( S E L E C T   C O U N T ( * )   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   c . i d )   a s   o r d e r _ c o u n t 
 
                         F R O M   c o m p a n i e s   c 
 
                         O R D E R   B Y   c . i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   A D D   C O M P A N Y   = = = = = 
 
         p u b l i c   f u n c t i o n   a d d ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ n a m e   =   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p h o n e   =   t r i m ( $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' ) ; 
 
                         $ a d d r e s s   =   t r i m ( $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' ; 
 
                         
 
                         i f   ( e m p t y ( $ n a m e ) )   { 
 
                                 $ e r r o r   =   ' C o m p a n y   n a m e   i s   r e q u i r e d . ' ; 
 
                         }   e l s e   { 
 
                                 / /   H a n d l e   l o g o   u p l o a d 
 
                                 $ l o g o   =   ' d e f a u l t _ l o g o . p n g ' ; 
 
                                 i f   ( i s s e t ( $ _ F I L E S [ ' l o g o ' ] )   & &   $ _ F I L E S [ ' l o g o ' ] [ ' e r r o r ' ]   = =   0 )   { 
 
                                         $ u p l o a d _ d i r   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / ' ; 
 
                                         i f   ( ! i s _ d i r ( $ u p l o a d _ d i r ) )   m k d i r ( $ u p l o a d _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                                         $ e x t   =   p a t h i n f o ( $ _ F I L E S [ ' l o g o ' ] [ ' n a m e ' ] ,   P A T H I N F O _ E X T E N S I O N ) ; 
 
                                         $ f i l e n a m e   =   t i m e ( )   .   ' _ '   .   r a n d ( 1 0 0 0 ,   9 9 9 9 )   .   ' . '   .   $ e x t ; 
 
                                         i f   ( m o v e _ u p l o a d e d _ f i l e ( $ _ F I L E S [ ' l o g o ' ] [ ' t m p _ n a m e ' ] ,   $ u p l o a d _ d i r   .   $ f i l e n a m e ) )   { 
 
                                                 $ l o g o   =   $ f i l e n a m e ; 
 
                                         } 
 
                                 } 
 
                                 
 
                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                         I N S E R T   I N T O   c o m p a n i e s   ( n a m e ,   p h o n e ,   a d d r e s s ,   l o g o ,   s t a t u s )   
 
                                         V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ) 
 
                                 " ) ; 
 
                                 i f   ( $ s t m t - > e x e c u t e ( [ $ n a m e ,   $ p h o n e ,   $ a d d r e s s ,   $ l o g o ,   $ s t a t u s ] ) )   { 
 
                                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c o m p a n i e s ' ) ; 
 
                                         e x i t ; 
 
                                 }   e l s e   { 
 
                                         $ e r r o r   =   ' F a i l e d   t o   a d d   c o m p a n y . ' ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / c o m p a n y _ a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   E D I T   C O M P A N Y   = = = = = 
 
         p u b l i c   f u n c t i o n   e d i t ( $ i d )   { 
 
                 $ c o m p a n y   =   $ t h i s - > g e t C o m p a n y B y I d ( $ i d ) ; 
 
                 i f   ( ! $ c o m p a n y )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c o m p a n i e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ n a m e   =   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p h o n e   =   t r i m ( $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' ) ; 
 
                         $ a d d r e s s   =   t r i m ( $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' ; 
 
                         
 
                         i f   ( e m p t y ( $ n a m e ) )   { 
 
                                 $ e r r o r   =   ' C o m p a n y   n a m e   i s   r e q u i r e d . ' ; 
 
                         }   e l s e   { 
 
                                 $ l o g o   =   $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ; 
 
                                 i f   ( i s s e t ( $ _ F I L E S [ ' l o g o ' ] )   & &   $ _ F I L E S [ ' l o g o ' ] [ ' e r r o r ' ]   = =   0 )   { 
 
                                         $ u p l o a d _ d i r   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / ' ; 
 
                                         i f   ( ! i s _ d i r ( $ u p l o a d _ d i r ) )   m k d i r ( $ u p l o a d _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                                         $ e x t   =   p a t h i n f o ( $ _ F I L E S [ ' l o g o ' ] [ ' n a m e ' ] ,   P A T H I N F O _ E X T E N S I O N ) ; 
 
                                         $ f i l e n a m e   =   t i m e ( )   .   ' _ '   .   r a n d ( 1 0 0 0 ,   9 9 9 9 )   .   ' . '   .   $ e x t ; 
 
                                         i f   ( m o v e _ u p l o a d e d _ f i l e ( $ _ F I L E S [ ' l o g o ' ] [ ' t m p _ n a m e ' ] ,   $ u p l o a d _ d i r   .   $ f i l e n a m e ) )   { 
 
                                                 i f   ( $ l o g o   ! =   ' d e f a u l t _ l o g o . p n g '   & &   f i l e _ e x i s t s ( $ u p l o a d _ d i r   .   $ l o g o ) )   { 
 
                                                         u n l i n k ( $ u p l o a d _ d i r   .   $ l o g o ) ; 
 
                                                 } 
 
                                                 $ l o g o   =   $ f i l e n a m e ; 
 
                                         } 
 
                                 } 
 
                                 
 
                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                         U P D A T E   c o m p a n i e s   
 
                                         S E T   n a m e   =   ? ,   p h o n e   =   ? ,   a d d r e s s   =   ? ,   l o g o   =   ? ,   s t a t u s   =   ? 
 
                                         W H E R E   i d   =   ? 
 
                                 " ) ; 
 
                                 i f   ( $ s t m t - > e x e c u t e ( [ $ n a m e ,   $ p h o n e ,   $ a d d r e s s ,   $ l o g o ,   $ s t a t u s ,   $ i d ] ) )   { 
 
                                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c o m p a n i e s ' ) ; 
 
                                         e x i t ; 
 
                                 }   e l s e   { 
 
                                         $ e r r o r   =   ' F a i l e d   t o   u p d a t e   c o m p a n y . ' ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / c o m p a n y _ e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   D E L E T E   C O M P A N Y   = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 / /   C h e c k   i f   c o m p a n y   h a s   o r d e r s 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 $ o r d e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                 
 
                 i f   ( $ o r d e r s   >   0 )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C a n n o t   d e l e t e   c o m p a n y   w i t h   e x i s t i n g   o r d e r s . ' ; 
 
                 }   e l s e   { 
 
                         / /   D e l e t e   l o g o   f i l e 
 
                         $ c o m p a n y   =   $ t h i s - > g e t C o m p a n y B y I d ( $ i d ) ; 
 
                         i f   ( $ c o m p a n y   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                 $ f i l e   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   $ c o m p a n y [ ' l o g o ' ] ; 
 
                                 i f   ( f i l e _ e x i s t s ( $ f i l e ) )   u n l i n k ( $ f i l e ) ; 
 
                         } 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                         i f   ( $ s t m t - > e x e c u t e ( [ $ i d ] ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                         }   e l s e   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   d e l e t e   c o m p a n y . ' ; 
 
                         } 
 
                 } 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c o m p a n i e s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   C O M P A N Y   B Y   I D   = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t C o m p a n y B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   C O M P A N Y   U S E R S   = = = = = 
 
         p u b l i c   f u n c t i o n   u s e r s ( $ i d )   { 
 
                 A u t h : : r e q u i r e S u p e r A d m i n ( ) ; 
 
                 $ c o m p a n y   =   $ t h i s - > g e t C o m p a n y B y I d ( $ i d ) ; 
 
                 i f   ( ! $ c o m p a n y )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c o m p a n i e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   u s e r s   W H E R E   c o m p a n y _ i d   =   ?   O R D E R   B Y   i d   A S C " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 $ u s e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / c o m p a n y _ u s e r s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   C u s t o m e r C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c u s t o m e r M o d e l ; 
 
         p r i v a t e   $ m e a s u r e m e n t M o d e l ; 
 
         p r i v a t e   $ o r d e r M o d e l ; 
 
         p r i v a t e   $ l e d g e r M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c u s t o m e r M o d e l   =   n e w   C u s t o m e r ( ) ; 
 
                 $ t h i s - > m e a s u r e m e n t M o d e l   =   n e w   M e a s u r e m e n t ( ) ; 
 
                 $ t h i s - > o r d e r M o d e l   =   n e w   O r d e r ( ) ; 
 
                 $ t h i s - > l e d g e r M o d e l   =   n e w   L e d g e r ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U S T O M E R S   L I S T   ( I N I T I A L   L O A D ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ s e a r c h   =   $ _ G E T [ ' s e a r c h ' ]   ? ?   ' ' ; 
 
                 $ p a g e   =   i s s e t ( $ _ G E T [ ' p a g e ' ] )   ?   ( i n t ) $ _ G E T [ ' p a g e ' ]   :   1 ; 
 
                 i f   ( $ p a g e   <   1 )   $ p a g e   =   1 ; 
 
                 
 
                 $ p e r _ p a g e   =   i s s e t ( $ _ G E T [ ' p e r _ p a g e ' ] )   ?   $ _ G E T [ ' p e r _ p a g e ' ]   :   1 0 ; 
 
                 i f   ( $ p e r _ p a g e   = =   ' A l l ' )   { 
 
                         $ p e r _ p a g e   =   1 0 0 0 0 ; 
 
                 }   e l s e   { 
 
                         $ p e r _ p a g e   =   ( i n t ) $ p e r _ p a g e ; 
 
                         $ a l l o w e d   =   [ 1 0 ,   2 5 ,   1 0 0 ,   5 0 0 ] ; 
 
                         i f   ( ! i n _ a r r a y ( $ p e r _ p a g e ,   $ a l l o w e d ) )   { 
 
                                 $ p e r _ p a g e   =   1 0 ; 
 
                         } 
 
                 } 
 
                 
 
                 $ r e s u l t   =   $ t h i s - > c u s t o m e r M o d e l - > g e t P a g i n a t e d ( $ s e a r c h ,   $ p a g e ,   $ p e r _ p a g e ) ; 
 
                 $ c u s t o m e r s   =   $ r e s u l t [ ' c u s t o m e r s ' ]   ? ?   [ ] ; 
 
                 $ t o t a l   =   $ r e s u l t [ ' t o t a l ' ]   ? ?   0 ; 
 
                 $ t o t a l P a g e s   =   c e i l ( $ t o t a l   /   $ p e r _ p a g e ) ; 
 
                 $ p e r _ p a g e _ d i s p l a y   =   ( $ p e r _ p a g e   > =   1 0 0 0 0 )   ?   ' A l l '   :   $ p e r _ p a g e ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u s t o m e r s / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
 p u b l i c   f u n c t i o n   l i v e S e a r c h ( )   { 
 
         $ s e a r c h   =   $ _ G E T [ ' s e a r c h ' ]   ? ?   ' ' ; 
 
         $ p e r _ p a g e   =   i s s e t ( $ _ G E T [ ' p e r _ p a g e ' ] )   ?   $ _ G E T [ ' p e r _ p a g e ' ]   :   1 0 ; 
 
         i f   ( $ p e r _ p a g e   = =   ' A l l ' )   { 
 
                 $ p e r _ p a g e   =   1 0 0 0 0 ; 
 
         }   e l s e   { 
 
                 $ p e r _ p a g e   =   ( i n t ) $ p e r _ p a g e ; 
 
                 $ a l l o w e d   =   [ 1 0 ,   2 5 ,   1 0 0 ,   5 0 0 ] ; 
 
                 i f   ( ! i n _ a r r a y ( $ p e r _ p a g e ,   $ a l l o w e d ) )   { 
 
                         $ p e r _ p a g e   =   1 0 ; 
 
                 } 
 
         } 
 
         $ p a g e   =   1 ; 
 
         
 
         $ r e s u l t   =   $ t h i s - > c u s t o m e r M o d e l - > g e t P a g i n a t e d ( $ s e a r c h ,   $ p a g e ,   $ p e r _ p a g e ) ; 
 
         $ c u s t o m e r s   =   $ r e s u l t [ ' c u s t o m e r s ' ]   ? ?   [ ] ; 
 
         $ t o t a l   =   $ r e s u l t [ ' t o t a l ' ]   ? ?   0 ; 
 
         $ t o t a l P a g e s   =   c e i l ( $ t o t a l   /   $ p e r _ p a g e ) ; 
 
         
 
         $ r u n n i n g _ b a l a n c e   =   0 ; 
 
         f o r e a c h   ( $ c u s t o m e r s   a s   & $ c )   { 
 
                 $ r u n n i n g _ b a l a n c e   + =   $ c [ ' b a l a n c e ' ]   ? ?   0 ; 
 
                 $ c [ ' r u n n i n g _ b a l a n c e ' ]   =   $ r u n n i n g _ b a l a n c e ; 
 
         } 
 
         
 
         h e a d e r ( ' C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n ' ) ; 
 
         e c h o   j s o n _ e n c o d e ( [ 
 
                 ' c u s t o m e r s '   = >   $ c u s t o m e r s , 
 
                 ' t o t a l '   = >   $ t o t a l , 
 
                 ' t o t a l P a g e s '   = >   $ t o t a l P a g e s , 
 
                 ' c u r r e n t P a g e '   = >   $ p a g e , 
 
                 ' p e r P a g e '   = >   $ p e r _ p a g e , 
 
                 ' r u n n i n g _ b a l a n c e '   = >   $ r u n n i n g _ b a l a n c e 
 
         ] ) ; 
 
         e x i t ; 
 
 } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A D D   C U S T O M E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a d d ( )   { 
 
                 $ n e x t _ c u s t o m e r _ n o   =   $ t h i s - > c u s t o m e r M o d e l - > g e n e r a t e C u s t o m e r N o ( ) ; 
 
 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ n a m e   =   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p h o n e   =   t r i m ( $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' ) ; 
 
                         $ a d d r e s s   =   t r i m ( $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' ) ; 
 
                         
 
                         i f   ( e m p t y ( $ n a m e ) )   { 
 
                                 $ e r r o r   =   ' C u s t o m e r   n a m e   i s   r e q u i r e d . ' ; 
 
                         }   e l s e   { 
 
                                 $ c u s t o m e r _ n o   =   t r i m ( $ _ P O S T [ ' c u s t o m e r _ n o ' ]   ? ?   ' ' ) ; 
 
                                 i f   ( e m p t y ( $ c u s t o m e r _ n o )   | |   ! p r e g _ m a t c h ( ' / ^ C U S - \ d { 4 } $ / ' ,   $ c u s t o m e r _ n o ) )   { 
 
                                         $ c u s t o m e r _ n o   =   $ t h i s - > c u s t o m e r M o d e l - > g e n e r a t e C u s t o m e r N o ( ) ; 
 
                                 } 
 
                                 
 
                                 $ p r o f i l e _ p i c   =   ' d u m m y _ c u s t o m e r . p n g ' ; 
 
                                 i f   ( i s s e t ( $ _ F I L E S [ ' p r o f i l e _ p i c ' ] )   & &   $ _ F I L E S [ ' p r o f i l e _ p i c ' ] [ ' e r r o r ' ]   = =   0 )   { 
 
                                         $ u p l o a d _ d i r   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / ' ; 
 
                                         i f   ( ! i s _ d i r ( $ u p l o a d _ d i r ) )   m k d i r ( $ u p l o a d _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                                         $ e x t   =   p a t h i n f o ( $ _ F I L E S [ ' p r o f i l e _ p i c ' ] [ ' n a m e ' ] ,   P A T H I N F O _ E X T E N S I O N ) ; 
 
                                         $ f i l e n a m e   =   t i m e ( )   .   ' _ '   .   r a n d ( 1 0 0 0 ,   9 9 9 9 )   .   ' . '   .   $ e x t ; 
 
                                         i f   ( m o v e _ u p l o a d e d _ f i l e ( $ _ F I L E S [ ' p r o f i l e _ p i c ' ] [ ' t m p _ n a m e ' ] ,   $ u p l o a d _ d i r   .   $ f i l e n a m e ) )   { 
 
                                                 $ p r o f i l e _ p i c   =   $ f i l e n a m e ; 
 
                                         } 
 
                                 } 
 
                                 
 
                                 $ d a t a   =   [ 
 
                                         ' c u s t o m e r _ n o '   = >   $ c u s t o m e r _ n o , 
 
                                         ' n a m e '   = >   $ n a m e , 
 
                                         ' p h o n e '   = >   $ p h o n e , 
 
                                         ' a d d r e s s '   = >   $ a d d r e s s , 
 
                                         ' p r o f i l e _ p i c '   = >   $ p r o f i l e _ p i c 
 
                                 ] ; 
 
                                 
 
                                 i f   ( $ t h i s - > c u s t o m e r M o d e l - > i n s e r t ( $ d a t a ) )   { 
 
                                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                                         e x i t ; 
 
                                 }   e l s e   { 
 
                                         $ e r r o r   =   ' F a i l e d   t o   a d d   c u s t o m e r . ' ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 $ c u s t o m e r _ n o   =   $ n e x t _ c u s t o m e r _ n o ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u s t o m e r s / a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E D I T   C U S T O M E R   ( i n c l u d e s   m e a s u r e m e n t s ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e d i t ( $ i d )   { 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ c u s t o m e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 / /   L o a d   m e a s u r e m e n t s   a n d   b a l a n c e 
 
                 $ m e a s u r e m e n t s   =   $ t h i s - > m e a s u r e m e n t M o d e l - > g e t B y C u s t o m e r ( $ i d ) ; 
 
                 $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e ( $ i d ) ; 
 
 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ n a m e   =   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p h o n e   =   t r i m ( $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' ) ; 
 
                         $ a d d r e s s   =   t r i m ( $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' ) ; 
 
                         
 
                         i f   ( e m p t y ( $ n a m e ) )   { 
 
                                 $ e r r o r   =   ' C u s t o m e r   n a m e   i s   r e q u i r e d . ' ; 
 
                         }   e l s e   { 
 
                                 $ p r o f i l e _ p i c   =   $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' ; 
 
                                 i f   ( i s s e t ( $ _ F I L E S [ ' p r o f i l e _ p i c ' ] )   & &   $ _ F I L E S [ ' p r o f i l e _ p i c ' ] [ ' e r r o r ' ]   = =   0 )   { 
 
                                         $ u p l o a d _ d i r   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / ' ; 
 
                                         i f   ( ! i s _ d i r ( $ u p l o a d _ d i r ) )   m k d i r ( $ u p l o a d _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                                         $ e x t   =   p a t h i n f o ( $ _ F I L E S [ ' p r o f i l e _ p i c ' ] [ ' n a m e ' ] ,   P A T H I N F O _ E X T E N S I O N ) ; 
 
                                         $ f i l e n a m e   =   t i m e ( )   .   ' _ '   .   r a n d ( 1 0 0 0 ,   9 9 9 9 )   .   ' . '   .   $ e x t ; 
 
                                         i f   ( m o v e _ u p l o a d e d _ f i l e ( $ _ F I L E S [ ' p r o f i l e _ p i c ' ] [ ' t m p _ n a m e ' ] ,   $ u p l o a d _ d i r   .   $ f i l e n a m e ) )   { 
 
                                                 i f   ( $ p r o f i l e _ p i c   ! =   ' d u m m y _ c u s t o m e r . p n g '   & &   f i l e _ e x i s t s ( $ u p l o a d _ d i r   .   $ p r o f i l e _ p i c ) )   { 
 
                                                         u n l i n k ( $ u p l o a d _ d i r   .   $ p r o f i l e _ p i c ) ; 
 
                                                 } 
 
                                                 $ p r o f i l e _ p i c   =   $ f i l e n a m e ; 
 
                                         } 
 
                                 } 
 
                                 
 
                                 $ d a t a   =   [ 
 
                                         ' n a m e '   = >   $ n a m e , 
 
                                         ' p h o n e '   = >   $ p h o n e , 
 
                                         ' a d d r e s s '   = >   $ a d d r e s s , 
 
                                         ' p r o f i l e _ p i c '   = >   $ p r o f i l e _ p i c 
 
                                 ] ; 
 
                                 
 
                                 i f   ( $ t h i s - > c u s t o m e r M o d e l - > u p d a t e ( $ i d ,   $ d a t a ) )   { 
 
                                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                                         e x i t ; 
 
                                 }   e l s e   { 
 
                                         $ e r r o r   =   ' F a i l e d   t o   u p d a t e   c u s t o m e r . ' ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u s t o m e r s / e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   C U S T O M E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( $ c u s t o m e r   & &   $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   ! =   ' d u m m y _ c u s t o m e r . p n g ' )   { 
 
                         $ f i l e   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   $ c u s t o m e r [ ' p r o f i l e _ p i c ' ] ; 
 
                         i f   ( f i l e _ e x i s t s ( $ f i l e ) )   u n l i n k ( $ f i l e ) ; 
 
                 } 
 
                 $ t h i s - > c u s t o m e r M o d e l - > d e l e t e ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U S T O M E R   P R O F I L E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   p r o f i l e ( $ i d )   { 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ c u s t o m e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ m e a s u r e m e n t s   =   $ t h i s - > m e a s u r e m e n t M o d e l - > g e t B y C u s t o m e r ( $ i d ) ; 
 
                 $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e ( $ i d ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u s t o m e r s / p r o f i l e . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   M E A S U R E M E N T   C R U D   (                      R          R    ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
         p u b l i c   f u n c t i o n   a d d M e a s u r e m e n t ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ c u s t o m e r _ i d   =   ( i n t ) ( $ _ P O S T [ ' c u s t o m e r _ i d ' ]   ? ?   0 ) ; 
 
                         i f   ( ! $ c u s t o m e r _ i d )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   c u s t o m e r . ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                                 e x i t ; 
 
                         } 
 
 
 
                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                         i f   ( ! $ c u s t o m e r )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   n o t   f o u n d . ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                                 e x i t ; 
 
                         } 
 
                         $ c u s t o m e r _ n o   =   $ c u s t o m e r [ ' c u s t o m e r _ n o ' ] ; 
 
 
 
                         $ d a t a   =   [ 
 
                                 ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ n o , 
 
                                 ' c h e s t '   = >   $ _ P O S T [ ' c h e s t ' ]   ? ?   n u l l , 
 
                                 ' w a i s t '   = >   $ _ P O S T [ ' w a i s t ' ]   ? ?   n u l l , 
 
                                 ' l o o s i n g '   = >   $ _ P O S T [ ' l o o s i n g ' ]   ? ?   n u l l , 
 
                                 ' c u f f _ l e n g t h '   = >   $ _ P O S T [ ' c u f f _ l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' c u f f _ w i d t h '   = >   $ _ P O S T [ ' c u f f _ w i d t h ' ]   ? ?   n u l l , 
 
                                 ' s i d e p o c k e t '   = >   $ _ P O S T [ ' s i d e p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' f r o n t p o c k e t '   = >   $ _ P O S T [ ' f r o n t p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r p o c k e t '   = >   $ _ P O S T [ ' s h a l w a r p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r _ l e n g t h '   = >   $ _ P O S T [ ' s h a l w a r _ l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r _ b o t t o m '   = >   $ _ P O S T [ ' s h a l w a r _ b o t t o m ' ]   ? ?   n u l l , 
 
                                 ' s h o u l d e r '   = >   $ _ P O S T [ ' s h o u l d e r ' ]   ? ?   n u l l , 
 
                                 ' s l e e v e '   = >   $ _ P O S T [ ' s l e e v e ' ]   ? ?   n u l l , 
 
                                 ' l e n g t h '   = >   $ _ P O S T [ ' l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' c o l l a r '   = >   $ _ P O S T [ ' c o l l a r ' ]   ? ?   n u l l , 
 
                                 ' s h e r w a n i '   = >   $ _ P O S T [ ' s h e r w a n i ' ]   ? ?   n u l l , 
 
                                 ' n o t e s '   = >   $ _ P O S T [ ' n o t e s ' ]   ? ?   n u l l , 
 
                                 ' r e m a r k s '   = >   $ _ P O S T [ ' r e m a r k s ' ]   ? ?   n u l l , 
 
                                 ' m e a s u r e d _ d a t e '   = >   $ _ P O S T [ ' m e a s u r e d _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) 
 
                         ] ; 
 
                         
 
                         i f   ( $ t h i s - > m e a s u r e m e n t M o d e l - > i n s e r t ( $ d a t a ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' M e a s u r e m e n t   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = '   .   $ c u s t o m e r _ i d ) ; 
 
                                 e x i t ; 
 
                         }   e l s e   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   a d d   m e a s u r e m e n t . ' ; 
 
                         } 
 
                 } 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   e d i t M e a s u r e m e n t ( $ i d )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ d a t a   =   [ 
 
                                 ' c h e s t '   = >   $ _ P O S T [ ' c h e s t ' ]   ? ?   n u l l , 
 
                                 ' w a i s t '   = >   $ _ P O S T [ ' w a i s t ' ]   ? ?   n u l l , 
 
                                 ' l o o s i n g '   = >   $ _ P O S T [ ' l o o s i n g ' ]   ? ?   n u l l , 
 
                                 ' c u f f _ l e n g t h '   = >   $ _ P O S T [ ' c u f f _ l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' c u f f _ w i d t h '   = >   $ _ P O S T [ ' c u f f _ w i d t h ' ]   ? ?   n u l l , 
 
                                 ' s i d e p o c k e t '   = >   $ _ P O S T [ ' s i d e p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' f r o n t p o c k e t '   = >   $ _ P O S T [ ' f r o n t p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r p o c k e t '   = >   $ _ P O S T [ ' s h a l w a r p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r _ l e n g t h '   = >   $ _ P O S T [ ' s h a l w a r _ l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r _ b o t t o m '   = >   $ _ P O S T [ ' s h a l w a r _ b o t t o m ' ]   ? ?   n u l l , 
 
                                 ' s h o u l d e r '   = >   $ _ P O S T [ ' s h o u l d e r ' ]   ? ?   n u l l , 
 
                                 ' s l e e v e '   = >   $ _ P O S T [ ' s l e e v e ' ]   ? ?   n u l l , 
 
                                 ' l e n g t h '   = >   $ _ P O S T [ ' l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' c o l l a r '   = >   $ _ P O S T [ ' c o l l a r ' ]   ? ?   n u l l , 
 
                                 ' s h e r w a n i '   = >   $ _ P O S T [ ' s h e r w a n i ' ]   ? ?   n u l l , 
 
                                 ' n o t e s '   = >   $ _ P O S T [ ' n o t e s ' ]   ? ?   n u l l , 
 
                                 ' r e m a r k s '   = >   $ _ P O S T [ ' r e m a r k s ' ]   ? ?   n u l l , 
 
                                 ' m e a s u r e d _ d a t e '   = >   $ _ P O S T [ ' m e a s u r e d _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) 
 
                         ] ; 
 
                         
 
                         i f   ( $ t h i s - > m e a s u r e m e n t M o d e l - > u p d a t e ( $ i d ,   $ d a t a ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' M e a s u r e m e n t   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         }   e l s e   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   u p d a t e   m e a s u r e m e n t . ' ; 
 
                         } 
 
                         
 
                         $ m e a s u r e m e n t   =   $ t h i s - > m e a s u r e m e n t M o d e l - > g e t B y I d ( $ i d ) ; 
 
                         i f   ( $ m e a s u r e m e n t )   { 
 
                                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y C u s t o m e r N o ( $ m e a s u r e m e n t [ ' c u s t o m e r _ i d ' ] ) ; 
 
                                 i f   ( $ c u s t o m e r )   { 
 
                                         / /    S&   E d i t   p a g e                         R    ( c u s t o m e r _ p r o f i l e      R            ) 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = '   .   $ c u s t o m e r [ ' i d ' ] ) ; 
 
                                 }   e l s e   { 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                                 } 
 
                         }   e l s e   { 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                         } 
 
                         e x i t ; 
 
                 } 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e M e a s u r e m e n t ( $ i d )   { 
 
                 $ m e a s u r e m e n t   =   $ t h i s - > m e a s u r e m e n t M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 $ c u s t o m e r _ i d   =   0 ; 
 
                 i f   ( $ m e a s u r e m e n t )   { 
 
                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y C u s t o m e r N o ( $ m e a s u r e m e n t [ ' c u s t o m e r _ i d ' ] ) ; 
 
                         i f   ( $ c u s t o m e r )   { 
 
                                 $ c u s t o m e r _ i d   =   $ c u s t o m e r [ ' i d ' ] ; 
 
                         } 
 
                 } 
 
                 $ t h i s - > m e a s u r e m e n t M o d e l - > d e l e t e ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' M e a s u r e m e n t   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 i f   ( $ c u s t o m e r _ i d )   { 
 
                         / /    S&   E d i t   p a g e                         R  
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = '   .   $ c u s t o m e r _ i d ) ; 
 
                 }   e l s e   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r s ' ) ; 
 
                 } 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   M E A S U R E M E N T   P R I N T   ( S I N G L E   O R   A L L ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   m e a s u r e m e n t _ p r i n t ( )   { 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ c o m p a n y   =   $ s t m t - > f e t c h ( ) ; 
 
                 i f   ( ! $ c o m p a n y )   { 
 
                         $ c o m p a n y   =   [ ' n a m e '   = >   ' B i z T e c h   T a i l o r ' ,   ' a d d r e s s '   = >   ' ' ,   ' p h o n e '   = >   ' ' ,   ' r e c e i p t _ f o o t e r '   = >   ' ' ] ; 
 
                 } 
 
 
 
                 $ c u s t o m e r   =   n u l l ; 
 
                 $ m e a s u r e m e n t s   =   [ ] ; 
 
 
 
                 i f   ( i s s e t ( $ _ G E T [ ' m e a s u r e m e n t _ i d ' ] )   & &   $ _ G E T [ ' m e a s u r e m e n t _ i d ' ]   >   0 )   { 
 
                         $ m e a s u r e m e n t _ i d   =   ( i n t ) $ _ G E T [ ' m e a s u r e m e n t _ i d ' ] ; 
 
                         $ m e a s u r e m e n t   =   $ t h i s - > m e a s u r e m e n t M o d e l - > g e t B y I d ( $ m e a s u r e m e n t _ i d ) ; 
 
                         i f   ( ! $ m e a s u r e m e n t )   { 
 
                                 d i e ( ' M e a s u r e m e n t   n o t   f o u n d . ' ) ; 
 
                         } 
 
                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y C u s t o m e r N o ( $ m e a s u r e m e n t [ ' c u s t o m e r _ i d ' ] ) ; 
 
                         i f   ( ! $ c u s t o m e r )   { 
 
                                 d i e ( ' C u s t o m e r   n o t   f o u n d .   C u s t o m e r   N o :   '   .   $ m e a s u r e m e n t [ ' c u s t o m e r _ i d ' ] ) ; 
 
                         } 
 
                         $ m e a s u r e m e n t s   =   [ $ m e a s u r e m e n t ] ; 
 
                 }   e l s e i f   ( i s s e t ( $ _ G E T [ ' c u s t o m e r _ i d ' ] )   & &   $ _ G E T [ ' c u s t o m e r _ i d ' ]   >   0 )   { 
 
                         $ c u s t o m e r _ i d   =   ( i n t ) $ _ G E T [ ' c u s t o m e r _ i d ' ] ; 
 
                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                         i f   ( ! $ c u s t o m e r )   { 
 
                                 d i e ( ' C u s t o m e r   n o t   f o u n d . ' ) ; 
 
                         } 
 
                         $ m e a s u r e m e n t s   =   $ t h i s - > m e a s u r e m e n t M o d e l - > g e t B y C u s t o m e r ( $ c u s t o m e r _ i d ) ; 
 
                 }   e l s e   { 
 
                         d i e ( ' I n v a l i d   r e q u e s t .   P l e a s e   p r o v i d e   c u s t o m e r _ i d   o r   m e a s u r e m e n t _ i d . ' ) ; 
 
                 } 
 
 
 
                 i n c l u d e   ' a p p / v i e w s / m e a s u r e m e n t s / p r i n t . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   C u t t i n g C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ o r d e r M o d e l ; 
 
         p r i v a t e   $ o r d e r S u i t M o d e l ; 
 
         p r i v a t e   $ e m p l o y e e M o d e l ; 
 
         p r i v a t e   $ c u s t o m e r M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > o r d e r M o d e l   =   n e w   O r d e r ( ) ; 
 
                 $ t h i s - > o r d e r S u i t M o d e l   =   n e w   O r d e r S u i t ( ) ; 
 
                 $ t h i s - > e m p l o y e e M o d e l   =   n e w   E m p l o y e e ( ) ; 
 
                 $ t h i s - > c u s t o m e r M o d e l   =   n e w   C u s t o m e r ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N D E X   ( R e d i r e c t   t o   P e n d i n g ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ p e n d i n g ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   2 :   P E N D I N G   C U T T I N G   S U I T S   ( s t a t u s   =   ' p e n d i n g ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   p e n d i n g ( )   { 
 
                 $ p e n d i n g _ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t P e n d i n g C u t t i n g ( ) ; 
 
                 $ c u t t i n g _ m e n   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y C a t e g o r y ( 1 ) ;   / /   C u t t i n g   c a t e g o r y 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u t t i n g / s u i t _ p e n d i n g . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   2 :   A S S I G N   C U T T I N G   ( s t a t u s   - >   ' c u t t i n g ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a s s i g n ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   ! = =   ' P O S T ' )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ p e n d i n g ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ s u i t _ i d   =   $ _ P O S T [ ' s u i t _ i d ' ]   ? ?   0 ; 
 
                 $ e m p l o y e e _ i d   =   $ _ P O S T [ ' e m p l o y e e _ i d ' ]   ? ?   0 ; 
 
 
 
                 i f   ( ! $ s u i t _ i d   | |   ! $ e m p l o y e e _ i d )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   d a t a . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ p e n d i n g ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ r e s u l t   =   $ t h i s - > o r d e r S u i t M o d e l - > a s s i g n C u t t i n g ( $ s u i t _ i d ,   $ e m p l o y e e _ i d ) ; 
 
 
 
                 i f   ( $ r e s u l t )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S u i t   a s s i g n e d   t o   c u t t i n g   s u c c e s s f u l l y ! ' ; 
 
                 }   e l s e   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   a s s i g n   s u i t . ' ; 
 
                 } 
 
 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ p e n d i n g ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   3 :   A S S I G N E D   C U T T I N G   S U I T S   ( s t a t u s   =   ' c u t t i n g '   A N D   c u t t i n g _ c o m p l e t e d _ d a t e   I S   N U L L ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a s s i g n e d ( )   { 
 
                 $ a s s i g n e d _ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t A s s i g n e d C u t t i n g ( ) ; 
 
                 $ c u t t i n g _ m e n   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y C a t e g o r y ( 1 ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u t t i n g / s u i t _ a s s i g n e d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   3 :   C O M P L E T E   C U T T I N G   ( s t a t u s   r e m a i n s   ' c u t t i n g ' ,   s e t   c o m p l e t e d   d a t e ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c o m p l e t e ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   ! = =   ' P O S T ' )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ s u i t _ i d   =   $ _ P O S T [ ' s u i t _ i d ' ]   ? ?   0 ; 
 
 
 
                 i f   ( ! $ s u i t _ i d )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   s u i t . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ r e s u l t   =   $ t h i s - > o r d e r S u i t M o d e l - > c o m p l e t e C u t t i n g ( $ s u i t _ i d ) ; 
 
 
 
                 i f   ( $ r e s u l t )   { 
 
                         / /   A d d   c u t t i n g   p a y m e n t 
 
                         $ s u i t   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y I d ( $ s u i t _ i d ) ; 
 
                         i f   ( $ s u i t   & &   $ s u i t [ ' c u t t i n g _ e m p l o y e e _ i d ' ] )   { 
 
                                 $ t h i s - > a d d C u t t i n g P a y m e n t ( $ s u i t _ i d ) ; 
 
                         } 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u t t i n g   c o m p l e t e d   f o r   t h i s   s u i t ! ' ; 
 
                 }   e l s e   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   c o m p l e t e   c u t t i n g . ' ; 
 
                 } 
 
 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   H E L P E R :   A d d   C u t t i n g   P a y m e n t 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p r i v a t e   f u n c t i o n   a d d C u t t i n g P a y m e n t ( $ s u i t _ i d )   { 
 
                 $ s u i t   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y I d ( $ s u i t _ i d ) ; 
 
                 i f   ( ! $ s u i t   | |   ! $ s u i t [ ' c u t t i n g _ e m p l o y e e _ i d ' ] )   r e t u r n ; 
 
 
 
                 $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ s u i t [ ' c u t t i n g _ e m p l o y e e _ i d ' ] ) ; 
 
                 i f   ( ! $ e m p l o y e e )   r e t u r n ; 
 
 
 
                 $ c a t e g o r y   =   $ t h i s - > e m p l o y e e M o d e l - > g e t C a t e g o r y B y I d ( $ e m p l o y e e [ ' c a t e g o r y _ i d ' ] ) ; 
 
                 $ r a t e   =   0 ; 
 
                 i f   ( $ c a t e g o r y )   { 
 
                         $ r a t e s   =   j s o n _ d e c o d e ( $ c a t e g o r y [ ' r a t e s ' ] ,   t r u e ) ; 
 
                         i f   ( $ r a t e s   & &   i s s e t ( $ r a t e s [ s t r t o l o w e r ( $ s u i t [ ' s i z e ' ] ) ] ) )   { 
 
                                 $ r a t e   =   $ r a t e s [ s t r t o l o w e r ( $ s u i t [ ' s i z e ' ] ) ] ; 
 
                         }   e l s e   { 
 
                                 $ r a t e   =   $ c a t e g o r y [ ' r a t e ' ]   ? ?   0 ; 
 
                         } 
 
                 } 
 
 
 
                 i f   ( $ r a t e   >   0 )   { 
 
                         $ t h i s - > e m p l o y e e M o d e l - > a d d T r a n s a c t i o n ( [ 
 
                                 ' e m p l o y e e _ i d '   = >   $ s u i t [ ' c u t t i n g _ e m p l o y e e _ i d ' ] , 
 
                                 ' o r d e r _ i d '   = >   $ s u i t [ ' o r d e r _ i d ' ] , 
 
                                 ' t y p e '   = >   ' c r e d i t ' , 
 
                                 ' a m o u n t '   = >   $ r a t e , 
 
                                 ' d e s c r i p t i o n '   = >   ' C u t t i n g   p a y m e n t   f o r   S u i t   # '   .   $ s u i t [ ' s u i t _ n u m b e r ' ]   .   '   ( '   .   $ s u i t [ ' s i z e ' ]   .   ' ) ' , 
 
                                 ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                         ] ) ; 
 
                 } 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U T T I N G   S L I P 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   s l i p ( )   { 
 
                 $ o r d e r _ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
                 i f   ( ! $ o r d e r _ i d )   d i e ( ' O r d e r   I D   r e q u i r e d . ' ) ; 
 
                 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ o r d e r _ i d ) ; 
 
                 i f   ( ! $ o r d e r )   d i e ( ' O r d e r   n o t   f o u n d . ' ) ; 
 
                 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y O r d e r ( $ o r d e r _ i d ) ; 
 
                 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ c o m p a n y   =   $ s t m t - > f e t c h ( ) ; 
 
                 i f   ( ! $ c o m p a n y )   { 
 
                         $ c o m p a n y   =   [ ' n a m e '   = >   ' B i z T e c h   T a i l o r ' ,   ' a d d r e s s '   = >   ' ' ,   ' p h o n e '   = >   ' ' ] ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / c u t t i n g / s l i p . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U T T I N G   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   r e p o r t ( )   { 
 
                 $ e m p l o y e e _ i d   =   $ _ G E T [ ' e m p l o y e e _ i d ' ]   ? ?   n u l l ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 
 
                 $ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y C a t e g o r y ( 1 ) ; 
 
                 / /   R e p o r t   l o g i c   ( s i m p l i f i e d ) 
 
                 $ r e p o r t s   =   [ ] ; 
 
                 / /   . . .   ( y o u   c a n   a d d   y o u r   r e p o r t   l o g i c   h e r e ) 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u t t i n g / r e p o r t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U T T E R   R E P O R T   ( I f   n e e d e d ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c u t t e r _ r e p o r t ( )   { 
 
                 / /   S i m i l a r   t o   r e p o r t ,   b u t   m a y   h a v e   s p e c i f i c   f i l t e r s 
 
                 $ t h i s - > r e p o r t ( ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   D a s h b o a r d C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ d a t a   =   $ t h i s - > g e t S t a t s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' d a s h b o a r d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t S t a t s ( )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ i s _ s u p e r a d m i n   =   A u t h : : i s S u p e r A d m i n ( ) ; 
 
 
 
                 / /   = = = = =   B A S I C   C O U N T S   = = = = = 
 
                 $ t o t a l _ c u s t o m e r s   =   0 ; 
 
                 $ t o t a l _ o r d e r s   =   0 ; 
 
                 $ t o t a l _ s u i t s   =   0 ; 
 
                 $ t o t a l _ e m p l o y e e s   =   0 ; 
 
                 $ t o t a l _ d e l i v e r e d _ s u i t s   =   0 ; 
 
                 $ t o d a y _ o r d e r s   =   0 ; 
 
                 $ t o d a y _ d e l i v e r e d   =   0 ; 
 
                 $ t o d a y _ c u t t i n g _ s u i t s   =   0 ; 
 
                 $ p e n d i n g _ o r d e r s   =   0 ; 
 
                 $ c u t t i n g _ o r d e r s   =   0 ; 
 
                 $ s t i t c h i n g _ o r d e r s   =   0 ; 
 
                 $ r e a d y _ o r d e r s   =   0 ; 
 
                 $ d e l i v e r e d _ o r d e r s   =   0 ; 
 
                 $ c a n c e l l e d _ o r d e r s   =   0 ; 
 
                 $ t o t a l _ r e v e n u e   =   0 ; 
 
                 $ t o t a l _ d u e   =   0 ; 
 
                 $ d a i l y _ c a s h   =   0 ; 
 
                 $ m o n t h l y _ c o u n t s   =   a r r a y _ f i l l ( 1 ,   1 2 ,   0 ) ; 
 
                 $ m o n t h l y _ r e v e n u e   =   a r r a y _ f i l l ( 1 ,   1 2 ,   0 ) ; 
 
                 $ s t a t u s _ d a t a   =   [ ' p e n d i n g '   = >   0 ,   ' c u t t i n g '   = >   0 ,   ' s t i t c h i n g '   = >   0 ,   ' r e a d y '   = >   0 ,   ' d e l i v e r e d '   = >   0 ,   ' c a n c e l l e d '   = >   0 ] ; 
 
                 $ r e c e n t _ o r d e r s   =   [ ] ; 
 
                 $ r e c e n t _ c u s t o m e r s   =   [ ] ; 
 
                 $ c a s h _ b a l a n c e   =   0 ; 
 
                 $ t o d a y _ c a s h   =   0 ; 
 
                 $ w e e k _ c a s h   =   0 ; 
 
                 $ m o n t h _ c a s h   =   0 ; 
 
                 $ t o t a l _ c o m p a n i e s   =   0 ; 
 
                 $ t o t a l _ u s e r s   =   0 ; 
 
 
 
                 i f   ( $ i s _ s u p e r a d m i n )   { 
 
                         / /   S u p e r   A d m i n   -   A l l   c o m p a n i e s 
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c o m p a n i e s " ) ; 
 
                         $ t o t a l _ c o m p a n i e s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   u s e r s " ) ; 
 
                         $ t o t a l _ u s e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c u s t o m e r s " ) ; 
 
                         $ t o t a l _ c u s t o m e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s " ) ; 
 
                         $ t o t a l _ o r d e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   e m p l o y e e s " ) ; 
 
                         $ t o t a l _ e m p l o y e e s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   
 
                                         S U M ( t o t a l _ s u i t s )   a s   t o t a l _ s u i t s , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' d e l i v e r e d '   T H E N   t o t a l _ s u i t s   E L S E   0   E N D )   a s   d e l i v e r e d _ s u i t s 
 
                                 F R O M   o r d e r s " ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ t o t a l _ s u i t s   =   $ r o w [ ' t o t a l _ s u i t s ' ]   ? ?   0 ; 
 
                         $ t o t a l _ d e l i v e r e d _ s u i t s   =   $ r o w [ ' d e l i v e r e d _ s u i t s ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   D A T E ( o r d e r _ d a t e )   =   C U R D A T E ( ) " ) ; 
 
                         $ t o d a y _ o r d e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   D A T E ( d e l i v e r y _ d a t e )   =   C U R D A T E ( )   A N D   s t a t u s   =   ' d e l i v e r e d ' " ) ; 
 
                         $ t o d a y _ d e l i v e r e d   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' p e n d i n g '   T H E N   1   E L S E   0   E N D )   a s   p e n d i n g , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' c u t t i n g '   T H E N   1   E L S E   0   E N D )   a s   c u t t i n g , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' s t i t c h i n g '   T H E N   1   E L S E   0   E N D )   a s   s t i t c h i n g , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' r e a d y '   T H E N   1   E L S E   0   E N D )   a s   r e a d y , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' d e l i v e r e d '   T H E N   1   E L S E   0   E N D )   a s   d e l i v e r e d , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' c a n c e l l e d '   T H E N   1   E L S E   0   E N D )   a s   c a n c e l l e d 
 
                                 F R O M   o r d e r s " ) ; 
 
                         $ s t a t u s   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ s t a t u s _ d a t a   =   [ 
 
                                 ' p e n d i n g '   = >   $ s t a t u s [ ' p e n d i n g ' ]   ? ?   0 , 
 
                                 ' c u t t i n g '   = >   $ s t a t u s [ ' c u t t i n g ' ]   ? ?   0 , 
 
                                 ' s t i t c h i n g '   = >   $ s t a t u s [ ' s t i t c h i n g ' ]   ? ?   0 , 
 
                                 ' r e a d y '   = >   $ s t a t u s [ ' r e a d y ' ]   ? ?   0 , 
 
                                 ' d e l i v e r e d '   = >   $ s t a t u s [ ' d e l i v e r e d ' ]   ? ?   0 , 
 
                                 ' c a n c e l l e d '   = >   $ s t a t u s [ ' c a n c e l l e d ' ]   ? ?   0 
 
                         ] ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   
 
                                         S U M ( n e t _ a m o u n t )   a s   r e v e n u e , 
 
                                         S U M ( d u e _ a m o u n t )   a s   d u e 
 
                                 F R O M   o r d e r s   W H E R E   s t a t u s   ! =   ' c a n c e l l e d ' " ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ t o t a l _ r e v e n u e   =   $ r o w [ ' r e v e n u e ' ]   ? ?   0 ; 
 
                         $ t o t a l _ d u e   =   $ r o w [ ' d u e ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   
 
                                         M O N T H ( o r d e r _ d a t e )   a s   m o n t h , 
 
                                         C O U N T ( * )   a s   c o u n t , 
 
                                         S U M ( n e t _ a m o u n t )   a s   r e v e n u e 
 
                                 F R O M   o r d e r s   
 
                                 W H E R E   s t a t u s   ! =   ' c a n c e l l e d '   A N D   Y E A R ( o r d e r _ d a t e )   =   Y E A R ( C U R D A T E ( ) ) 
 
                                 G R O U P   B Y   M O N T H ( o r d e r _ d a t e ) " ) ; 
 
                         w h i l e   ( $ r o w   =   $ s t m t - > f e t c h ( ) )   { 
 
                                 $ m o n t h l y _ c o u n t s [ $ r o w [ ' m o n t h ' ] ]   =   $ r o w [ ' c o u n t ' ] ; 
 
                                 $ m o n t h l y _ r e v e n u e [ $ r o w [ ' m o n t h ' ] ]   =   $ r o w [ ' r e v e n u e ' ] ; 
 
                         } 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " 
 
                                 S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e   
 
                                 F R O M   o r d e r s   o 
 
                                 L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                                 O R D E R   B Y   o . i d   D E S C   L I M I T   1 0 
 
                         " ) ; 
 
                         $ r e c e n t _ o r d e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " 
 
                                 S E L E C T   *   F R O M   c u s t o m e r s   O R D E R   B Y   i d   D E S C   L I M I T   1 0 
 
                         " ) ; 
 
                         $ r e c e n t _ c u s t o m e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   t o t a l _ d e b i t , 
 
                                         S U M ( c r e d i t )   a s   t o t a l _ c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r 
 
                         " ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ c a s h _ b a l a n c e   =   ( $ r o w [ ' t o t a l _ d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ c r e d i t ' ]   ? ?   0 ) ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   d e b i t , 
 
                                         S U M ( c r e d i t )   a s   c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   D A T E ( t r a n s a c t i o n _ d a t e )   =   C U R D A T E ( ) 
 
                         " ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ t o d a y _ c a s h   =   ( $ r o w [ ' d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' c r e d i t ' ]   ? ?   0 ) ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   d e b i t , 
 
                                         S U M ( c r e d i t )   a s   c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   Y E A R W E E K ( t r a n s a c t i o n _ d a t e )   =   Y E A R W E E K ( C U R D A T E ( ) ) 
 
                         " ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ w e e k _ c a s h   =   ( $ r o w [ ' d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' c r e d i t ' ]   ? ?   0 ) ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > q u e r y ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   d e b i t , 
 
                                         S U M ( c r e d i t )   a s   c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   M O N T H ( t r a n s a c t i o n _ d a t e )   =   M O N T H ( C U R D A T E ( ) )   A N D   Y E A R ( t r a n s a c t i o n _ d a t e )   =   Y E A R ( C U R D A T E ( ) ) 
 
                         " ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ m o n t h _ c a s h   =   ( $ r o w [ ' d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' c r e d i t ' ]   ? ?   0 ) ; 
 
 
 
                 }   e l s e   { 
 
                         / /   C o m p a n y   A d m i n   -   S i n g l e   c o m p a n y 
 
                         / /   C u s t o m e r s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c u s t o m e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ t o t a l _ c u s t o m e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         / /   O r d e r s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ t o t a l _ o r d e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         / /   E m p l o y e e s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   e m p l o y e e s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' a c t i v e ' " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ t o t a l _ e m p l o y e e s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         / /   S u i t s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   
 
                                         S U M ( t o t a l _ s u i t s )   a s   t o t a l _ s u i t s , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' d e l i v e r e d '   T H E N   t o t a l _ s u i t s   E L S E   0   E N D )   a s   d e l i v e r e d _ s u i t s 
 
                                 F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ t o t a l _ s u i t s   =   $ r o w [ ' t o t a l _ s u i t s ' ]   ? ?   0 ; 
 
                         $ t o t a l _ d e l i v e r e d _ s u i t s   =   $ r o w [ ' d e l i v e r e d _ s u i t s ' ]   ? ?   0 ; 
 
                         
 
                         / /   T o d a y   O r d e r s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   D A T E ( o r d e r _ d a t e )   =   C U R D A T E ( ) " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ t o d a y _ o r d e r s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         / /   T o d a y   D e l i v e r e d 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   D A T E ( d e l i v e r y _ d a t e )   =   C U R D A T E ( )   A N D   s t a t u s   =   ' d e l i v e r e d ' " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ t o d a y _ d e l i v e r e d   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                         
 
                         / /   T o d a y   C u t t i n g   S u i t s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   S U M ( t o t a l _ s u i t s )   a s   s u i t s   
 
                                 F R O M   o r d e r s   
 
                                 W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' c u t t i n g '   A N D   D A T E ( c r e a t e d _ a t )   =   C U R D A T E ( ) 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ t o d a y _ c u t t i n g _ s u i t s   =   $ s t m t - > f e t c h ( ) [ ' s u i t s ' ]   ? ?   0 ; 
 
                         
 
                         / /   S t a t u s   w i s e   o r d e r s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' p e n d i n g '   T H E N   1   E L S E   0   E N D )   a s   p e n d i n g , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' c u t t i n g '   T H E N   1   E L S E   0   E N D )   a s   c u t t i n g , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' s t i t c h i n g '   T H E N   1   E L S E   0   E N D )   a s   s t i t c h i n g , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' r e a d y '   T H E N   1   E L S E   0   E N D )   a s   r e a d y , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' d e l i v e r e d '   T H E N   1   E L S E   0   E N D )   a s   d e l i v e r e d , 
 
                                         S U M ( C A S E   W H E N   s t a t u s   =   ' c a n c e l l e d '   T H E N   1   E L S E   0   E N D )   a s   c a n c e l l e d 
 
                                 F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ s t a t u s   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ s t a t u s _ d a t a   =   [ 
 
                                 ' p e n d i n g '   = >   $ s t a t u s [ ' p e n d i n g ' ]   ? ?   0 , 
 
                                 ' c u t t i n g '   = >   $ s t a t u s [ ' c u t t i n g ' ]   ? ?   0 , 
 
                                 ' s t i t c h i n g '   = >   $ s t a t u s [ ' s t i t c h i n g ' ]   ? ?   0 , 
 
                                 ' r e a d y '   = >   $ s t a t u s [ ' r e a d y ' ]   ? ?   0 , 
 
                                 ' d e l i v e r e d '   = >   $ s t a t u s [ ' d e l i v e r e d ' ]   ? ?   0 , 
 
                                 ' c a n c e l l e d '   = >   $ s t a t u s [ ' c a n c e l l e d ' ]   ? ?   0 
 
                         ] ; 
 
                         
 
                         / /   R e v e n u e   &   D u e 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         S U M ( n e t _ a m o u n t )   a s   r e v e n u e , 
 
                                         S U M ( d u e _ a m o u n t )   a s   d u e 
 
                                 F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   ! =   ' c a n c e l l e d ' 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ t o t a l _ r e v e n u e   =   $ r o w [ ' r e v e n u e ' ]   ? ?   0 ; 
 
                         $ t o t a l _ d u e   =   $ r o w [ ' d u e ' ]   ? ?   0 ; 
 
                         
 
                         / /   M o n t h l y   c o u n t s   a n d   r e v e n u e 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         M O N T H ( o r d e r _ d a t e )   a s   m o n t h , 
 
                                         C O U N T ( * )   a s   c o u n t , 
 
                                         S U M ( n e t _ a m o u n t )   a s   r e v e n u e 
 
                                 F R O M   o r d e r s   
 
                                 W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   ! =   ' c a n c e l l e d '   A N D   Y E A R ( o r d e r _ d a t e )   =   Y E A R ( C U R D A T E ( ) ) 
 
                                 G R O U P   B Y   M O N T H ( o r d e r _ d a t e ) 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         w h i l e   ( $ r o w   =   $ s t m t - > f e t c h ( ) )   { 
 
                                 $ m o n t h l y _ c o u n t s [ $ r o w [ ' m o n t h ' ] ]   =   $ r o w [ ' c o u n t ' ] ; 
 
                                 $ m o n t h l y _ r e v e n u e [ $ r o w [ ' m o n t h ' ] ]   =   $ r o w [ ' r e v e n u e ' ] ; 
 
                         } 
 
                         
 
                         / /   R e c e n t   o r d e r s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e   
 
                                 F R O M   o r d e r s   o 
 
                                 L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                                 W H E R E   o . c o m p a n y _ i d   =   ? 
 
                                 O R D E R   B Y   o . i d   D E S C   L I M I T   1 0 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r e c e n t _ o r d e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                         
 
                         / /   R e c e n t   c u s t o m e r s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   *   F R O M   c u s t o m e r s   W H E R E   c o m p a n y _ i d   =   ?   O R D E R   B Y   i d   D E S C   L I M I T   1 0 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r e c e n t _ c u s t o m e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                         
 
                         / /   C a s h   B a l a n c e 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   t o t a l _ d e b i t , 
 
                                         S U M ( c r e d i t )   a s   t o t a l _ c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   W H E R E   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ c a s h _ b a l a n c e   =   ( $ r o w [ ' t o t a l _ d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ c r e d i t ' ]   ? ?   0 ) ; 
 
                         
 
                         / /   T o d a y   C a s h 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   d e b i t , 
 
                                         S U M ( c r e d i t )   a s   c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   c o m p a n y _ i d   =   ?   A N D   D A T E ( t r a n s a c t i o n _ d a t e )   =   C U R D A T E ( ) 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ t o d a y _ c a s h   =   ( $ r o w [ ' d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' c r e d i t ' ]   ? ?   0 ) ; 
 
                         
 
                         / /   W e e k   C a s h 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   d e b i t , 
 
                                         S U M ( c r e d i t )   a s   c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   c o m p a n y _ i d   =   ?   A N D   Y E A R W E E K ( t r a n s a c t i o n _ d a t e )   =   Y E A R W E E K ( C U R D A T E ( ) ) 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ w e e k _ c a s h   =   ( $ r o w [ ' d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' c r e d i t ' ]   ? ?   0 ) ; 
 
                         
 
                         / /   M o n t h   C a s h 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         S U M ( d e b i t )   a s   d e b i t , 
 
                                         S U M ( c r e d i t )   a s   c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   c o m p a n y _ i d   =   ?   A N D   M O N T H ( t r a n s a c t i o n _ d a t e )   =   M O N T H ( C U R D A T E ( ) )   A N D   Y E A R ( t r a n s a c t i o n _ d a t e )   =   Y E A R ( C U R D A T E ( ) ) 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                         $ m o n t h _ c a s h   =   ( $ r o w [ ' d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' c r e d i t ' ]   ? ?   0 ) ; 
 
                 } 
 
 
 
                 r e t u r n   [ 
 
                         ' t o t a l _ c o m p a n i e s '   = >   $ t o t a l _ c o m p a n i e s , 
 
                         ' t o t a l _ u s e r s '   = >   $ t o t a l _ u s e r s , 
 
                         ' t o t a l _ c u s t o m e r s '   = >   $ t o t a l _ c u s t o m e r s , 
 
                         ' t o t a l _ o r d e r s '   = >   $ t o t a l _ o r d e r s , 
 
                         ' t o t a l _ s u i t s '   = >   $ t o t a l _ s u i t s , 
 
                         ' t o t a l _ d e l i v e r e d _ s u i t s '   = >   $ t o t a l _ d e l i v e r e d _ s u i t s , 
 
                         ' t o t a l _ e m p l o y e e s '   = >   $ t o t a l _ e m p l o y e e s , 
 
                         ' t o d a y _ o r d e r s '   = >   $ t o d a y _ o r d e r s , 
 
                         ' t o d a y _ d e l i v e r e d '   = >   $ t o d a y _ d e l i v e r e d , 
 
                         ' t o d a y _ c u t t i n g _ s u i t s '   = >   $ t o d a y _ c u t t i n g _ s u i t s , 
 
                         ' p e n d i n g _ o r d e r s '   = >   $ p e n d i n g _ o r d e r s , 
 
                         ' c u t t i n g _ o r d e r s '   = >   $ c u t t i n g _ o r d e r s , 
 
                         ' s t i t c h i n g _ o r d e r s '   = >   $ s t i t c h i n g _ o r d e r s , 
 
                         ' r e a d y _ o r d e r s '   = >   $ r e a d y _ o r d e r s , 
 
                         ' d e l i v e r e d _ o r d e r s '   = >   $ d e l i v e r e d _ o r d e r s , 
 
                         ' c a n c e l l e d _ o r d e r s '   = >   $ c a n c e l l e d _ o r d e r s , 
 
                         ' t o t a l _ r e v e n u e '   = >   $ t o t a l _ r e v e n u e , 
 
                         ' t o t a l _ d u e '   = >   $ t o t a l _ d u e , 
 
                         ' d a i l y _ c a s h '   = >   $ t o d a y _ c a s h , 
 
                         ' c a s h _ b a l a n c e '   = >   $ c a s h _ b a l a n c e , 
 
                         ' w e e k _ c a s h '   = >   $ w e e k _ c a s h , 
 
                         ' m o n t h _ c a s h '   = >   $ m o n t h _ c a s h , 
 
                         ' m o n t h l y _ c o u n t s '   = >   $ m o n t h l y _ c o u n t s , 
 
                         ' m o n t h l y _ r e v e n u e '   = >   $ m o n t h l y _ r e v e n u e , 
 
                         ' s t a t u s _ d a t a '   = >   $ s t a t u s _ d a t a , 
 
                         ' r e c e n t _ o r d e r s '   = >   $ r e c e n t _ o r d e r s , 
 
                         ' r e c e n t _ c u s t o m e r s '   = >   $ r e c e n t _ c u s t o m e r s , 
 
                 ] ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   D e l i v e r y C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ d e l i v e r y M o d e l ; 
 
         p r i v a t e   $ o r d e r M o d e l ; 
 
         p r i v a t e   $ c u s t o m e r M o d e l ; 
 
         p r i v a t e   $ l e d g e r M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > d e l i v e r y M o d e l   =   n e w   D e l i v e r y ( ) ; 
 
                 $ t h i s - > o r d e r M o d e l   =   n e w   O r d e r ( ) ; 
 
                 $ t h i s - > c u s t o m e r M o d e l   =   n e w   C u s t o m e r ( ) ; 
 
                 $ t h i s - > l e d g e r M o d e l   =   n e w   L e d g e r ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ r e a d y _ o r d e r s   =   $ t h i s - > d e l i v e r y M o d e l - > g e t R e a d y O r d e r s ( ) ; 
 
                 $ d e l i v e r e d _ o r d e r s   =   $ t h i s - > d e l i v e r y M o d e l - > g e t D e l i v e r e d O r d e r s ( ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / d e l i v e r y / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /    x  "       R      R   R    R         &   (         r e a d y                        ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l i v e r ( $ i d )   { 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ o r d e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' O r d e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 / /                              ' r e a d y '      R  
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   o r d e r _ s u i t s   
 
                         W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' r e a d y ' 
 
                         O R D E R   B Y   s u i t _ n u m b e r 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                 $ r e a d y _ s u i t s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 i f   ( e m p t y ( $ r e a d y _ s u i t s ) )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' N o   r e a d y   s u i t s   a v a i l a b l e   f o r   d e l i v e r y . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / d e l i v e r y / f o r m . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /    x  "       R      R   R    R          R    (           R         ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   p r o c e s s D e l i v e r y ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   ! = =   ' P O S T ' )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ o r d e r _ i d   =   $ _ P O S T [ ' o r d e r _ i d ' ]   ? ?   0 ; 
 
                 $ s e l e c t e d _ s u i t _ i d s   =   $ _ P O S T [ ' s u i t _ i d s ' ]   ? ?   [ ] ;   / /   a r r a y   o f   s u i t   I D s 
 
                 $ a m o u n t _ r e c e i v e d   =   f l o a t v a l ( $ _ P O S T [ ' a m o u n t _ r e c e i v e d ' ]   ? ?   0 ) ; 
 
                 $ d e l i v e r y _ d a t e   =   $ _ P O S T [ ' d e l i v e r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ r e c e i v e d _ b y   =   t r i m ( $ _ P O S T [ ' r e c e i v e d _ b y ' ]   ? ?   ' ' ) ; 
 
                 $ n o t e s   =   t r i m ( $ _ P O S T [ ' n o t e s ' ]   ? ?   ' ' ) ; 
 
                 $ p a y m e n t _ m e t h o d   =   $ _ P O S T [ ' p a y m e n t _ m e t h o d ' ]   ? ?   ' c a s h ' ; 
 
                 
 
                 i f   ( e m p t y ( $ s e l e c t e d _ s u i t _ i d s ) )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' P l e a s e   s e l e c t   a t   l e a s t   o n e   s u i t   t o   d e l i v e r . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y _ d e l i v e r & i d = '   .   $ o r d e r _ i d ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ o r d e r _ i d ) ; 
 
                 i f   ( ! $ o r d e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' O r d e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         $ s u i t _ i d s _ s t r   =   i m p l o d e ( ' , ' ,   a r r a y _ m a p ( ' i n t v a l ' ,   $ s e l e c t e d _ s u i t _ i d s ) ) ; 
 
                         
 
                         / /   1 .    &                            R   R          R  
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 U P D A T E   o r d e r _ s u i t s   
 
                                 S E T   s t a t u s   =   ' d e l i v e r e d ' ,   d e l i v e r y _ d a t e   =   ?   
 
                                 W H E R E   i d   I N   ( $ s u i t _ i d s _ s t r )   A N D   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ d e l i v e r y _ d a t e ,   $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         / /   2 .     R   R                         R           R &     (          &       &                R  ) 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   S U M ( p r i c e )   a s   t o t a l   F R O M   o r d e r _ s u i t s   
 
                                 W H E R E   i d   I N   ( $ s u i t _ i d s _ s t r )   A N D   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ t o t a l _ d e l i v e r e d _ a m o u n t   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
                         
 
                         / /   3 .               R  p a i d _ a m o u n t           R         R  
 
                         $ n e w _ p a i d   =   $ o r d e r [ ' p a i d _ a m o u n t ' ]   +   $ a m o u n t _ r e c e i v e d ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 U P D A T E   o r d e r s   S E T   p a i d _ a m o u n t   =   ?   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ n e w _ p a i d ,   $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         / /   4 .      R       R       &  R      R      (      &    &       ) 
 
                         i f   ( $ a m o u n t _ r e c e i v e d   >   0 )   { 
 
                                 $ c a s h D a t a   =   [ 
 
                                         ' t r a n s a c t i o n _ d a t e '   = >   $ d e l i v e r y _ d a t e , 
 
                                         ' d e s c r i p t i o n '   = >   " D e l i v e r y   p a y m e n t   r e c e i v e d   f o r   s u i t s   i n   O r d e r   # { $ o r d e r _ i d } " , 
 
                                         ' d e b i t '   = >   $ a m o u n t _ r e c e i v e d , 
 
                                         ' c r e d i t '   = >   0 , 
 
                                         ' r e f e r e n c e _ i d '   = >   $ o r d e r _ i d , 
 
                                         ' r e f e r e n c e _ t y p e '   = >   ' d e l i v e r y ' 
 
                                 ] ; 
 
                                 $ t h i s - > l e d g e r M o d e l - > i n s e r t C a s h ( $ c a s h D a t a ) ; 
 
                                 
 
                                 / /   5 .          &        R       &  R         R     (      &    &       ) 
 
                                 $ l e d g e r D a t a   =   [ 
 
                                         ' c u s t o m e r _ i d '   = >   $ o r d e r [ ' c u s t o m e r _ i d ' ] , 
 
                                         ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                         ' t y p e '   = >   ' r e c e i v e ' , 
 
                                         ' a m o u n t '   = >   $ a m o u n t _ r e c e i v e d , 
 
                                         ' m e t h o d '   = >   $ p a y m e n t _ m e t h o d , 
 
                                         ' d e s c r i p t i o n '   = >   " P a y m e n t   f o r   d e l i v e r e d   s u i t s   i n   O r d e r   # { $ o r d e r _ i d } " , 
 
                                         ' t r a n s a c t i o n _ d a t e '   = >   $ d e l i v e r y _ d a t e 
 
                                 ] ; 
 
                                 $ t h i s - > l e d g e r M o d e l - > i n s e r t ( $ l e d g e r D a t a ) ; 
 
                         } 
 
                         
 
                         / /   6 .       R         R             R       &    &            R   R                      R   x
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   C O U N T ( * )   a s   r e m a i n i n g   
 
                                 F R O M   o r d e r _ s u i t s   
 
                                 W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   s t a t u s   ! =   ' d e l i v e r e d ' 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ r e m a i n i n g   =   $ s t m t - > f e t c h ( ) [ ' r e m a i n i n g ' ]   ? ?   0 ; 
 
                         
 
                         i f   ( $ r e m a i n i n g   = =   0 )   { 
 
                                 / /      &    &            R   R     - >                   R   R          R  
 
                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                         U P D A T E   o r d e r s   S E T   s t a t u s   =   ' d e l i v e r e d '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                                 " ) ; 
 
                                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                                 
 
                                 / /     R   R    R     R         (        R    R   R    R     R         R  ) 
 
                                 $ d e l i v e r y D a t a   =   [ 
 
                                         ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                         ' d e l i v e r y _ d a t e '   = >   $ d e l i v e r y _ d a t e , 
 
                                         ' r e c e i v e d _ b y '   = >   $ r e c e i v e d _ b y , 
 
                                         ' n o t e s '   = >   $ n o t e s   .   '   ( F i n a l   D e l i v e r y ) ' 
 
                                 ] ; 
 
                                 $ t h i s - > d e l i v e r y M o d e l - > i n s e r t ( $ d e l i v e r y D a t a ) ; 
 
                                 
 
                                 $ t h i s - > d b - > c o m m i t ( ) ; 
 
                                 
 
                                 / /    x}                                       R          R           R    (             R     &  R  ) 
 
                                 e c h o   ' < ! D O C T Y P E   h t m l > 
 
                                 < h t m l > 
 
                                 < h e a d > 
 
                                         < s c r i p t > 
 
                                                 w i n d o w . o p e n ( " i n d e x . p h p ? a c t i o n = f i n a l _ i n v o i c e & i d = '   .   $ o r d e r _ i d   .   ' " ,   " _ b l a n k " ) ; 
 
                                                 w i n d o w . l o c a t i o n . h r e f   =   " i n d e x . p h p ? a c t i o n = d e l i v e r y " ; 
 
                                         < / s c r i p t > 
 
                                 < / h e a d > 
 
                                 < b o d y > < / b o d y > 
 
                                 < / h t m l > ' ; 
 
                                 e x i t ; 
 
                                 
 
                         }   e l s e   { 
 
                                 / /          R                         R     R  
 
                                 / /     R   R    R     R         (       R    R   R    R) 
 
                                 $ d e l i v e r y D a t a   =   [ 
 
                                         ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                         ' d e l i v e r y _ d a t e '   = >   $ d e l i v e r y _ d a t e , 
 
                                         ' r e c e i v e d _ b y '   = >   $ r e c e i v e d _ b y , 
 
                                         ' n o t e s '   = >   $ n o t e s   .   '   ( P a r t i a l   D e l i v e r y   -   '   .   c o u n t ( $ s e l e c t e d _ s u i t _ i d s )   .   '   s u i t s ) ' 
 
                                 ] ; 
 
                                 $ t h i s - > d e l i v e r y M o d e l - > i n s e r t ( $ d e l i v e r y D a t a ) ; 
 
                                 
 
                                 $ t h i s - > d b - > c o m m i t ( ) ; 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   c o u n t ( $ s e l e c t e d _ s u i t _ i d s )   .   '   s u i t ( s )   d e l i v e r e d   s u c c e s s f u l l y ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                                 e x i t ; 
 
                         } 
 
                         
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' D e l i v e r y   f a i l e d :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y _ d e l i v e r & i d = '   .   $ o r d e r _ i d ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   s l i p ( $ i d )   { 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ o r d e r )   { 
 
                         d i e ( ' O r d e r   n o t   f o u n d . ' ) ; 
 
                 } 
 
                 
 
                 $ d e l i v e r y   =   $ t h i s - > d e l i v e r y M o d e l - > g e t B y O r d e r I d ( $ i d ) ; 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ c o m p a n y   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / d e l i v e r y / s l i p . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   d e l i v e r y   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                 $ d e l i v e r y   =   $ s t m t - > f e t c h ( ) ; 
 
                 
 
                 i f   ( ! $ d e l i v e r y )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' D e l i v e r y   r e c o r d   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         / /                           ' r e a d y '        R    (   R   R    R              R  ) 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 U P D A T E   o r d e r _ s u i t s   S E T   s t a t u s   =   ' r e a d y ' ,   d e l i v e r y _ d a t e   =   N U L L   
 
                                 W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' d e l i v e r e d ' 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ d e l i v e r y [ ' o r d e r _ i d ' ] ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         / /                  s t a t u s   ' r e a d y '        R    (    R             &    &                             ) 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 U P D A T E   o r d e r s   S E T   s t a t u s   =   ' r e a d y '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ d e l i v e r y [ ' o r d e r _ i d ' ] ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         / /     R   R    R     R                      R  
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   d e l i v e r y   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         / /    &                R                R                 R    (                 R   R    R     R) 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 D E L E T E   F R O M   l e d g e r   
 
                                 W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   
 
                                 A N D   d e s c r i p t i o n   L I K E   ' % d e l i v e r e d   s u i t s % ' 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ d e l i v e r y [ ' o r d e r _ i d ' ] ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 D E L E T E   F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   r e f e r e n c e _ i d   =   ?   A N D   r e f e r e n c e _ t y p e   =   ' d e l i v e r y '   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ d e l i v e r y [ ' o r d e r _ i d ' ] ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         / /                p a i d _ a m o u n t                            R    (    &    &     R   R    R                      R     R &   ) 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   S U M ( p r i c e )   a s   t o t a l   F R O M   o r d e r _ s u i t s   
 
                                 W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' d e l i v e r e d ' 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ d e l i v e r y [ ' o r d e r _ i d ' ] ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ d e l i v e r e d _ t o t a l   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 U P D A T E   o r d e r s   S E T   p a i d _ a m o u n t   =   ?   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ d e l i v e r e d _ t o t a l ,   $ d e l i v e r y [ ' o r d e r _ i d ' ] ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' D e l i v e r y   r e c o r d   d e l e t e d   a n d   o r d e r   r e v e r t e d   t o   R e a d y   s t a t u s . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                         e x i t ; 
 
                         
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   d e l e t e   d e l i v e r y   r e c o r d :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d e l i v e r y ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   E m p l o y e e C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ e m p l o y e e M o d e l ; 
 
         p r i v a t e   $ c a t e g o r y M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > e m p l o y e e M o d e l   =   n e w   E m p l o y e e ( ) ; 
 
                 $ t h i s - > c a t e g o r y M o d e l   =   n e w   E m p l o y e e C a t e g o r y ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   E M P L O Y E E   C A T E G O R I E S   = = = = = 
 
         p u b l i c   f u n c t i o n   c a t e g o r i e s ( )   { 
 
                 $ c a t e g o r i e s   =   $ t h i s - > c a t e g o r y M o d e l - > g e t A l l ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / c a t e g o r i e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   c a t e g o r y _ a d d ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ r a t e s   =   [ 
 
                                 ' l a r g e '   = >   $ _ P O S T [ ' r a t e _ l a r g e ' ]   ? ?   0 , 
 
                                 ' m e d i u m '   = >   $ _ P O S T [ ' r a t e _ m e d i u m ' ]   ? ?   0 , 
 
                                 ' s m a l l '   = >   $ _ P O S T [ ' r a t e _ s m a l l ' ]   ? ?   0 
 
                         ] ; 
 
                         $ d a t a   =   [ 
 
                                 ' n a m e '   = >   $ _ P O S T [ ' n a m e ' ] , 
 
                                 ' p a y m e n t _ t y p e '   = >   $ _ P O S T [ ' p a y m e n t _ t y p e ' ] , 
 
                                 ' r a t e '   = >   $ _ P O S T [ ' r a t e ' ]   ? ?   0 , 
 
                                 ' r a t e s '   = >   j s o n _ e n c o d e ( $ r a t e s ) 
 
                         ] ; 
 
                         $ t h i s - > c a t e g o r y M o d e l - > i n s e r t ( $ d a t a ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C a t e g o r y   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r i e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / c a t e g o r y _ a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   c a t e g o r y _ e d i t ( $ i d )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ r a t e s   =   [ 
 
                                 ' l a r g e '   = >   $ _ P O S T [ ' r a t e _ l a r g e ' ]   ? ?   0 , 
 
                                 ' m e d i u m '   = >   $ _ P O S T [ ' r a t e _ m e d i u m ' ]   ? ?   0 , 
 
                                 ' s m a l l '   = >   $ _ P O S T [ ' r a t e _ s m a l l ' ]   ? ?   0 
 
                         ] ; 
 
                         $ d a t a   =   [ 
 
                                 ' n a m e '   = >   $ _ P O S T [ ' n a m e ' ] , 
 
                                 ' p a y m e n t _ t y p e '   = >   $ _ P O S T [ ' p a y m e n t _ t y p e ' ] , 
 
                                 ' r a t e '   = >   $ _ P O S T [ ' r a t e ' ]   ? ?   0 , 
 
                                 ' r a t e s '   = >   j s o n _ e n c o d e ( $ r a t e s ) 
 
                         ] ; 
 
                         $ t h i s - > c a t e g o r y M o d e l - > u p d a t e ( $ i d ,   $ d a t a ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C a t e g o r y   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r i e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ c a t e g o r y   =   $ t h i s - > c a t e g o r y M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ c a t e g o r y )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r i e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 / /   D e c o d e   r a t e s 
 
                 $ r a t e s   =   j s o n _ d e c o d e ( $ c a t e g o r y [ ' r a t e s ' ] ,   t r u e ) ; 
 
                 $ c a t e g o r y [ ' r a t e _ l a r g e ' ]   =   $ r a t e s [ ' l a r g e ' ]   ? ?   0 ; 
 
                 $ c a t e g o r y [ ' r a t e _ m e d i u m ' ]   =   $ r a t e s [ ' m e d i u m ' ]   ? ?   0 ; 
 
                 $ c a t e g o r y [ ' r a t e _ s m a l l ' ]   =   $ r a t e s [ ' s m a l l ' ]   ? ?   0 ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / c a t e g o r y _ e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   c a t e g o r y _ d e l e t e ( $ i d )   { 
 
                 $ t h i s - > c a t e g o r y M o d e l - > d e l e t e ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C a t e g o r y   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r i e s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = =   E M P L O Y E E S   = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t A l l ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   a d d ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ e m p l o y e e D a t a   =   [ 
 
                                 ' e m p _ c o d e '   = >   $ _ P O S T [ ' e m p _ c o d e ' ]   ? ?   $ t h i s - > e m p l o y e e M o d e l - > g e n e r a t e E m p C o d e ( ) , 
 
                                 ' n a m e '   = >   $ _ P O S T [ ' n a m e ' ] , 
 
                                 ' p h o n e '   = >   $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' , 
 
                                 ' a d d r e s s '   = >   $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' , 
 
                                 ' c n i c '   = >   $ _ P O S T [ ' c n i c ' ]   ? ?   ' ' , 
 
                                 ' c a t e g o r y _ i d '   = >   $ _ P O S T [ ' c a t e g o r y _ i d ' ] , 
 
                                 ' j o i n i n g _ d a t e '   = >   $ _ P O S T [ ' j o i n i n g _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                                 ' s t a t u s '   = >   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' , 
 
                                 ' f i x e d _ s a l a r y '   = >   $ _ P O S T [ ' f i x e d _ s a l a r y ' ]   ? ?   0 
 
                         ] ; 
 
                         i f   ( $ t h i s - > e m p l o y e e M o d e l - > i n s e r t ( $ e m p l o y e e D a t a ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' E m p l o y e e   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e s ' ) ; 
 
                                 e x i t ; 
 
                         }   e l s e   { 
 
                                 $ e r r o r   =   ' F a i l e d   t o   a d d   e m p l o y e e ! ' ; 
 
                         } 
 
                 } 
 
                 $ c a t e g o r i e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t C a t e g o r i e s ( ) ; 
 
                 $ e m p _ c o d e   =   $ t h i s - > e m p l o y e e M o d e l - > g e n e r a t e E m p C o d e ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   e d i t ( $ i d )   { 
 
                 $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ e m p l o y e e )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ e m p l o y e e D a t a   =   [ 
 
                                 ' e m p _ c o d e '   = >   $ _ P O S T [ ' e m p _ c o d e ' ] , 
 
                                 ' n a m e '   = >   $ _ P O S T [ ' n a m e ' ] , 
 
                                 ' p h o n e '   = >   $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' , 
 
                                 ' a d d r e s s '   = >   $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' , 
 
                                 ' c n i c '   = >   $ _ P O S T [ ' c n i c ' ]   ? ?   ' ' , 
 
                                 ' c a t e g o r y _ i d '   = >   $ _ P O S T [ ' c a t e g o r y _ i d ' ] , 
 
                                 ' j o i n i n g _ d a t e '   = >   $ _ P O S T [ ' j o i n i n g _ d a t e ' ] , 
 
                                 ' s t a t u s '   = >   $ _ P O S T [ ' s t a t u s ' ] , 
 
                                 ' f i x e d _ s a l a r y '   = >   $ _ P O S T [ ' f i x e d _ s a l a r y ' ]   ? ?   0 
 
                         ] ; 
 
                         $ t h i s - > e m p l o y e e M o d e l - > u p d a t e ( $ i d ,   $ e m p l o y e e D a t a ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' E m p l o y e e   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ c a t e g o r i e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t C a t e g o r i e s ( ) ; 
 
                 $ b a l a n c e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e B a l a n c e ( $ i d ) ; 
 
                 $ t r a n s a c t i o n s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e T r a n s a c t i o n s ( $ i d ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ t h i s - > e m p l o y e e M o d e l - > d e l e t e ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' E m p l o y e e   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   v i e w ( $ i d )   { 
 
                 $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ e m p l o y e e )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ b a l a n c e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e B a l a n c e ( $ i d ) ; 
 
                 $ t r a n s a c t i o n s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e T r a n s a c t i o n s ( $ i d ,   3 0 ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / v i e w . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   C U T T I N G   S Y S T E M   = = = = = 
 
         p u b l i c   f u n c t i o n   c u t t i n g _ d a s h b o a r d ( )   { 
 
                 $ p e n d i n g _ o r d e r s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t P e n d i n g C u t t i n g O r d e r s ( ) ; 
 
                 $ c u t t i n g _ o r d e r s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t C u t t i n g O r d e r s ( ) ; 
 
                 $ c u t t i n g _ m e n   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y C a t e g o r y ( 1 ) ;   / /   A s s u m i n g   c a t e g o r y   i d   1   i s   C u t t i n g   M e n 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u t t i n g / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   a s s i g n _ c u t t i n g ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ e m p l o y e e _ i d   =   $ _ P O S T [ ' e m p l o y e e _ i d ' ] ; 
 
                         $ o r d e r _ i d   =   $ _ P O S T [ ' o r d e r _ i d ' ] ; 
 
                         $ t h i s - > e m p l o y e e M o d e l - > a s s i g n C u t t i n g ( $ e m p l o y e e _ i d ,   $ o r d e r _ i d ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' O r d e r   a s s i g n e d   f o r   c u t t i n g ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ d a s h b o a r d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   c o m p l e t e _ c u t t i n g ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ o r d e r _ i d   =   $ _ P O S T [ ' o r d e r _ i d ' ] ; 
 
                         $ e m p l o y e e _ i d   =   $ _ P O S T [ ' e m p l o y e e _ i d ' ] ; 
 
                         $ s i z e s _ d a t a   =   [ 
 
                                 ' l a r g e '   = >   $ _ P O S T [ ' l a r g e _ c o u n t ' ]   ? ?   0 , 
 
                                 ' m e d i u m '   = >   $ _ P O S T [ ' m e d i u m _ c o u n t ' ]   ? ?   0 , 
 
                                 ' s m a l l '   = >   $ _ P O S T [ ' s m a l l _ c o u n t ' ]   ? ?   0 
 
                         ] ; 
 
                         i f   ( $ t h i s - > e m p l o y e e M o d e l - > c o m p l e t e C u t t i n g ( $ o r d e r _ i d ,   $ e m p l o y e e _ i d ,   $ s i z e s _ d a t a ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u t t i n g   c o m p l e t e d   s u c c e s s f u l l y ! ' ; 
 
                         }   e l s e   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   c o m p l e t e   c u t t i n g ! ' ; 
 
                         } 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u t t i n g _ d a s h b o a r d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   c u t t i n g _ r e p o r t ( )   { 
 
                 $ e m p l o y e e _ i d   =   $ _ G E T [ ' e m p l o y e e _ i d ' ]   ? ?   0 ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t A l l ( ) ; 
 
                 $ r e p o r t   =   [ ] ; 
 
                 i f   ( $ e m p l o y e e _ i d )   { 
 
                         $ r e p o r t   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e C u t t i n g R e p o r t ( $ e m p l o y e e _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 } 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u t t i n g / r e p o r t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   S A L A R Y   G E N E R A T I O N   = = = = = 
 
         p u b l i c   f u n c t i o n   g e n e r a t e _ s a l a r y ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ m o n t h   =   $ _ P O S T [ ' m o n t h ' ]   ? ?   d a t e ( ' m ' ) ; 
 
                         $ y e a r   =   $ _ P O S T [ ' y e a r ' ]   ? ?   d a t e ( ' Y ' ) ; 
 
                         $ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t A l l ( ) ; 
 
                         $ g e n e r a t e d   =   0 ; 
 
                         $ t o t a l _ s a l a r y   =   0 ; 
 
 
 
                         f o r e a c h   ( $ e m p l o y e e s   a s   $ e m p )   { 
 
                                 $ c a t e g o r y   =   $ t h i s - > e m p l o y e e M o d e l - > g e t C a t e g o r y B y I d ( $ e m p [ ' c a t e g o r y _ i d ' ] ) ; 
 
                                 $ a m o u n t   =   0 ; 
 
                                 
 
                                 i f   ( $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' f i x e d ' )   { 
 
                                         $ a m o u n t   =   $ e m p [ ' f i x e d _ s a l a r y ' ] ; 
 
                                 }   e l s e i f   ( $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r c e n t a g e ' )   { 
 
                                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   S U M ( a m o u n t )   a s   t o t a l   F R O M   l e d g e r   
 
                                                                                                 W H E R E   c o m p a n y _ i d   =   ?   A N D   t y p e   =   ' r e c e i v e '   
 
                                                                                                 A N D   M O N T H ( t r a n s a c t i o n _ d a t e )   =   ?   A N D   Y E A R ( t r a n s a c t i o n _ d a t e )   =   ? " ) ; 
 
                                         $ s t m t - > e x e c u t e ( [ A u t h : : g e t C o m p a n y I d ( ) ,   $ m o n t h ,   $ y e a r ] ) ; 
 
                                         $ c o l l e c t i o n   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
                                         $ a m o u n t   =   ( $ c o l l e c t i o n   *   $ c a t e g o r y [ ' r a t e ' ] )   /   1 0 0 ; 
 
                                 } 
 
 
 
                                 i f   ( $ a m o u n t   >   0 )   { 
 
                                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   e m p l o y e e _ l e d g e r   
 
                                                                                                 W H E R E   e m p l o y e e _ i d   =   ?   A N D   t y p e   =   ' s a l a r y '   
 
                                                                                                 A N D   M O N T H ( t r a n s a c t i o n _ d a t e )   =   ?   A N D   Y E A R ( t r a n s a c t i o n _ d a t e )   =   ? " ) ; 
 
                                         $ s t m t - > e x e c u t e ( [ $ e m p [ ' i d ' ] ,   $ m o n t h ,   $ y e a r ] ) ; 
 
                                         $ e x i s t s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                         
 
                                         i f   ( $ e x i s t s   = =   0 )   { 
 
                                                 $ t h i s - > e m p l o y e e M o d e l - > a d d T r a n s a c t i o n ( [ 
 
                                                         ' e m p l o y e e _ i d '   = >   $ e m p [ ' i d ' ] , 
 
                                                         ' t y p e '   = >   ' s a l a r y ' , 
 
                                                         ' a m o u n t '   = >   $ a m o u n t , 
 
                                                         ' d e s c r i p t i o n '   = >   ' M o n t h l y   s a l a r y   f o r   '   .   d a t e ( ' F   Y ' ,   s t r t o t i m e ( $ y e a r   .   ' - '   .   $ m o n t h   .   ' - 0 1 ' ) ) , 
 
                                                         ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                                                 ] ) ; 
 
                                                 $ g e n e r a t e d + + ; 
 
                                                 $ t o t a l _ s a l a r y   + =   $ a m o u n t ; 
 
                                         } 
 
                                 } 
 
                         } 
 
 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   " S a l a r y   g e n e r a t e d   f o r   $ g e n e r a t e d   e m p l o y e e s .   T o t a l :   "   .   n u m b e r _ f o r m a t ( $ t o t a l _ s a l a r y ,   0 ) ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / e m p l o y e e s / g e n e r a t e _ s a l a r y . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   L e d g e r C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ o r d e r M o d e l ; 
 
         p r i v a t e   $ c u s t o m e r M o d e l ; 
 
         p r i v a t e   $ e m p l o y e e M o d e l ; 
 
         p r i v a t e   $ l e d g e r M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > o r d e r M o d e l   =   n e w   O r d e r ( ) ; 
 
                 $ t h i s - > c u s t o m e r M o d e l   =   n e w   C u s t o m e r ( ) ; 
 
                 $ t h i s - > e m p l o y e e M o d e l   =   n e w   E m p l o y e e ( ) ; 
 
                 $ t h i s - > l e d g e r M o d e l   =   n e w   L e d g e r ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   L E D G E R   S E L E C T I O N   P A G E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l e d g e r s / s e l e c t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U S T O M E R   L E D G E R   L I S T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c u s t o m e r L i s t ( )   { 
 
                 $ s e a r c h   =   $ _ G E T [ ' s e a r c h ' ]   ? ?   ' ' ; 
 
                 $ c u s t o m e r s   =   $ t h i s - > c u s t o m e r M o d e l - > g e t A l l ( $ s e a r c h ) ; 
 
                 f o r e a c h   ( $ c u s t o m e r s   a s   & $ c )   { 
 
                         $ c [ ' b a l a n c e ' ]   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e ( $ c [ ' i d ' ] ) ; 
 
                 } 
 
                 u s o r t ( $ c u s t o m e r s ,   f u n c t i o n ( $ a ,   $ b )   { 
 
                         r e t u r n   s t r c m p ( $ a [ ' c u s t o m e r _ n o ' ] ,   $ b [ ' c u s t o m e r _ n o ' ] ) ; 
 
                 } ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l e d g e r s / c u s t o m e r _ l i s t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E M P L O Y E E   L E D G E R   L I S T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e m p l o y e e L i s t ( )   { 
 
                 $ s e a r c h   =   $ _ G E T [ ' s e a r c h ' ]   ? ?   ' ' ; 
 
                 $ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t A l l ( $ s e a r c h ) ; 
 
                 f o r e a c h   ( $ e m p l o y e e s   a s   & $ e )   { 
 
                         $ b a l   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e B a l a n c e ( $ e [ ' i d ' ] ) ; 
 
                         $ e [ ' b a l a n c e ' ]   =   $ b a l [ ' b a l a n c e ' ] ; 
 
                 } 
 
                 u s o r t ( $ e m p l o y e e s ,   f u n c t i o n ( $ a ,   $ b )   { 
 
                         r e t u r n   s t r c m p ( $ a [ ' n a m e ' ] ,   $ b [ ' n a m e ' ] ) ; 
 
                 } ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l e d g e r s / e m p l o y e e _ l i s t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /    S&   C U S T O M E R   L E D G E R   D E T A I L   (                 ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c u s t o m e r ( $ i d )   { 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ c u s t o m e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = l e d g e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 
 
                 $ r e s u l t   =   $ t h i s - > g e t C u s t o m e r L e d g e r D a t a ( $ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 
 
                 / /    S&     R               R    (                       R                            R  ) 
 
                 / /   e c h o   ' < p r e > ' ;   p r i n t _ r ( $ r e s u l t [ ' t r a n s a c t i o n s ' ] ) ;   e c h o   ' < / p r e > ' ;   e x i t ; 
 
                 
 
                 $ t r a n s a c t i o n s   =   $ r e s u l t [ ' t r a n s a c t i o n s ' ] ; 
 
                 $ o p e n i n g _ b a l a n c e   =   $ r e s u l t [ ' o p e n i n g _ b a l a n c e ' ] ; 
 
                 $ c l o s i n g _ b a l a n c e   =   $ r e s u l t [ ' c l o s i n g _ b a l a n c e ' ] ; 
 
                 $ t o t a l _ r e c e i v e d   =   $ r e s u l t [ ' t o t a l _ r e c e i v e d ' ] ; 
 
                 $ t o t a l _ p a i d   =   $ r e s u l t [ ' t o t a l _ p a i d ' ] ; 
 
                 $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e ( $ i d ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l e d g e r s / c u s t o m e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /    S&   F I X E D :   g e t C u s t o m e r L e d g e r D a t a   (    &    &            R                  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t C u s t o m e r L e d g e r D a t a ( $ c u s t o m e r _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e )   { 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 
 
                 / /   - - -   O p e n i n g   B a l a n c e   (              R         R        )   - - - 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' r e c e i v e '   T H E N   a m o u n t   E L S E   0   E N D )   a s   r e c e i v e d , 
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' p a y '   T H E N   a m o u n t   E L S E   0   E N D )   a s   p a i d 
 
                         F R O M   l e d g e r   
 
                         W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   t r a n s a c t i o n _ d a t e   <   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ c o m p a n y _ i d ,   $ f r o m _ d a t e ] ) ; 
 
                 $ o p e n i n g   =   $ s t m t - > f e t c h ( ) ; 
 
                 $ o p e n i n g _ b a l a n c e   =   ( $ o p e n i n g [ ' r e c e i v e d ' ]   ? ?   0 )   -   ( $ o p e n i n g [ ' p a i d ' ]   ? ?   0 ) ; 
 
                 
 
                 / /   - - -    S&           :      &    &               R           ( f e t c h A l l )   - - - 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   l . * ,   o . o r d e r _ n o   
 
                         F R O M   l e d g e r   l 
 
                         L E F T   J O I N   o r d e r s   o   O N   l . o r d e r _ i d   =   o . i d 
 
                         W H E R E   l . c u s t o m e r _ i d   =   ?   
 
                             A N D   l . c o m p a n y _ i d   =   ?   
 
                             A N D   l . t r a n s a c t i o n _ d a t e   B E T W E E N   ?   A N D   ? 
 
                         O R D E R   B Y   l . t r a n s a c t i o n _ d a t e   A S C ,   l . i d   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ c o m p a n y _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ] ) ; 
 
                 
 
                 / /    S&    R        f e t c h A l l ( )            &            R   R  f e t c h ( )         R  
 
                 $ t r a n s a c t i o n s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 / /   - - -   R u n n i n g   B a l a n c e   c a l c u l a t e        R    - - - 
 
                 $ r u n n i n g   =   $ o p e n i n g _ b a l a n c e ; 
 
                 f o r e a c h   ( $ t r a n s a c t i o n s   a s   & $ t )   { 
 
                         i f   ( $ t [ ' t y p e ' ]   = =   ' r e c e i v e ' )   { 
 
                                 $ r u n n i n g   + =   $ t [ ' a m o u n t ' ] ; 
 
                         }   e l s e   { 
 
                                 $ r u n n i n g   - =   $ t [ ' a m o u n t ' ] ; 
 
                         } 
 
                         $ t [ ' r u n n i n g _ b a l a n c e ' ]   =   $ r u n n i n g ; 
 
                 } 
 
                 
 
                 / /   - - -   T o t a l s   - - - 
 
                 $ t o t a l _ r e c e i v e d   =   0 ; 
 
                 $ t o t a l _ p a i d   =   0 ; 
 
                 f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t )   { 
 
                         i f   ( $ t [ ' t y p e ' ]   = =   ' r e c e i v e ' )   { 
 
                                 $ t o t a l _ r e c e i v e d   + =   $ t [ ' a m o u n t ' ] ; 
 
                         }   e l s e   { 
 
                                 $ t o t a l _ p a i d   + =   $ t [ ' a m o u n t ' ] ; 
 
                         } 
 
                 } 
 
                 $ c l o s i n g _ b a l a n c e   =   $ o p e n i n g _ b a l a n c e   +   $ t o t a l _ r e c e i v e d   -   $ t o t a l _ p a i d ; 
 
                 
 
                 r e t u r n   [ 
 
                         ' t r a n s a c t i o n s '   = >   $ t r a n s a c t i o n s , 
 
                         ' o p e n i n g _ b a l a n c e '   = >   $ o p e n i n g _ b a l a n c e , 
 
                         ' c l o s i n g _ b a l a n c e '   = >   $ c l o s i n g _ b a l a n c e , 
 
                         ' t o t a l _ r e c e i v e d '   = >   $ t o t a l _ r e c e i v e d , 
 
                         ' t o t a l _ p a i d '   = >   $ t o t a l _ p a i d 
 
                 ] ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E M P L O Y E E   L E D G E R   D E T A I L 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e m p l o y e e ( $ i d )   { 
 
                 $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ e m p l o y e e )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' E m p l o y e e   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = l e d g e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 
 
                 $ r e s u l t   =   $ t h i s - > g e t E m p l o y e e L e d g e r D a t a ( $ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ t r a n s a c t i o n s   =   $ r e s u l t [ ' t r a n s a c t i o n s ' ] ; 
 
                 $ o p e n i n g _ b a l a n c e   =   $ r e s u l t [ ' o p e n i n g _ b a l a n c e ' ] ; 
 
                 $ c l o s i n g _ b a l a n c e   =   $ r e s u l t [ ' c l o s i n g _ b a l a n c e ' ] ; 
 
                 $ t o t a l _ c r e d i t   =   $ r e s u l t [ ' t o t a l _ c r e d i t ' ] ; 
 
                 $ t o t a l _ d e b i t   =   $ r e s u l t [ ' t o t a l _ d e b i t ' ] ; 
 
                 $ b a l a n c e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e B a l a n c e ( $ i d ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l e d g e r s / e m p l o y e e . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E M P L O Y E E   L E D G E R   D A T A   (    &    &            R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t E m p l o y e e L e d g e r D a t a ( $ e m p l o y e e _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e )   { 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' c r e d i t '   T H E N   a m o u n t   E L S E   0   E N D )   a s   c r e d i t s , 
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' d e b i t '   T H E N   a m o u n t   E L S E   0   E N D )   a s   d e b i t s 
 
                         F R O M   e m p l o y e e _ l e d g e r   
 
                         W H E R E   e m p l o y e e _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   t r a n s a c t i o n _ d a t e   <   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ c o m p a n y _ i d ,   $ f r o m _ d a t e ] ) ; 
 
                 $ o p e n i n g   =   $ s t m t - > f e t c h ( ) ; 
 
                 $ o p e n i n g _ b a l a n c e   =   ( $ o p e n i n g [ ' c r e d i t s ' ]   ? ?   0 )   -   ( $ o p e n i n g [ ' d e b i t s ' ]   ? ?   0 ) ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e l . * ,   o . o r d e r _ n o   
 
                         F R O M   e m p l o y e e _ l e d g e r   e l 
 
                         L E F T   J O I N   o r d e r s   o   O N   e l . o r d e r _ i d   =   o . i d 
 
                         W H E R E   e l . e m p l o y e e _ i d   =   ?   A N D   e l . c o m p a n y _ i d   =   ?   
 
                         A N D   e l . t r a n s a c t i o n _ d a t e   B E T W E E N   ?   A N D   ? 
 
                         O R D E R   B Y   e l . t r a n s a c t i o n _ d a t e   A S C ,   e l . i d   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ c o m p a n y _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ] ) ; 
 
                 $ t r a n s a c t i o n s   =   $ s t m t - > f e t c h A l l ( ) ;   / /    S&      &    &            R  
 
                 
 
                 $ r u n n i n g   =   $ o p e n i n g _ b a l a n c e ; 
 
                 f o r e a c h   ( $ t r a n s a c t i o n s   a s   & $ t )   { 
 
                         i f   ( $ t [ ' t y p e ' ]   = =   ' c r e d i t ' )   { 
 
                                 $ r u n n i n g   + =   $ t [ ' a m o u n t ' ] ; 
 
                         }   e l s e   { 
 
                                 $ r u n n i n g   - =   $ t [ ' a m o u n t ' ] ; 
 
                         } 
 
                         $ t [ ' r u n n i n g _ b a l a n c e ' ]   =   $ r u n n i n g ; 
 
                 } 
 
                 
 
                 $ t o t a l _ c r e d i t   =   0 ; 
 
                 $ t o t a l _ d e b i t   =   0 ; 
 
                 f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t )   { 
 
                         i f   ( $ t [ ' t y p e ' ]   = =   ' c r e d i t ' )   { 
 
                                 $ t o t a l _ c r e d i t   + =   $ t [ ' a m o u n t ' ] ; 
 
                         }   e l s e   { 
 
                                 $ t o t a l _ d e b i t   + =   $ t [ ' a m o u n t ' ] ; 
 
                         } 
 
                 } 
 
                 $ c l o s i n g _ b a l a n c e   =   $ o p e n i n g _ b a l a n c e   +   $ t o t a l _ c r e d i t   -   $ t o t a l _ d e b i t ; 
 
                 
 
                 r e t u r n   [ 
 
                         ' t r a n s a c t i o n s '   = >   $ t r a n s a c t i o n s , 
 
                         ' o p e n i n g _ b a l a n c e '   = >   $ o p e n i n g _ b a l a n c e , 
 
                         ' c l o s i n g _ b a l a n c e '   = >   $ c l o s i n g _ b a l a n c e , 
 
                         ' t o t a l _ c r e d i t '   = >   $ t o t a l _ c r e d i t , 
 
                         ' t o t a l _ d e b i t '   = >   $ t o t a l _ d e b i t 
 
                 ] ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C A S H   L E D G E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c a s h L e d g e r ( )   { 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 
 
                 $ t r a n s a c t i o n s   =   $ t h i s - > l e d g e r M o d e l - > g e t C a s h T r a n s a c t i o n s W i t h B a l a n c e ( $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ o p e n i n g _ b a l a n c e   =   $ t h i s - > l e d g e r M o d e l - > g e t C a s h B a l a n c e ( $ f r o m _ d a t e ) ; 
 
                 $ c l o s i n g _ b a l a n c e   =   $ t h i s - > l e d g e r M o d e l - > g e t C a s h B a l a n c e ( $ t o _ d a t e ) ; 
 
                 
 
                 $ t o t a l _ d e b i t   =   0 ; 
 
                 $ t o t a l _ c r e d i t   =   0 ; 
 
                 f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t )   { 
 
                         $ t o t a l _ d e b i t   + =   $ t [ ' d e b i t ' ]   ? ?   0 ; 
 
                         $ t o t a l _ c r e d i t   + =   $ t [ ' c r e d i t ' ]   ? ?   0 ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l e d g e r s / c a s h . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   R E C E I V E   P A Y M E N T   F R O M   C U S T O M E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   r e c e i v e P a y m e n t ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   ! = =   ' P O S T ' )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = l e d g e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ c u s t o m e r _ i d   =   $ _ P O S T [ ' c u s t o m e r _ i d ' ]   ? ?   0 ; 
 
                 $ a m o u n t   =   f l o a t v a l ( $ _ P O S T [ ' a m o u n t ' ]   ? ?   0 ) ; 
 
                 $ m e t h o d   =   $ _ P O S T [ ' m e t h o d ' ]   ? ?   ' c a s h ' ; 
 
                 $ n o t e s   =   t r i m ( $ _ P O S T [ ' n o t e s ' ]   ? ?   ' ' ) ; 
 
                 $ t r a n s a c t i o n _ d a t e   =   $ _ P O S T [ ' t r a n s a c t i o n _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 
 
                 i f   ( ! $ c u s t o m e r _ i d   | |   $ a m o u n t   < =   0 )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   p a y m e n t   d a t a . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r _ l e d g e r & i d = '   .   $ c u s t o m e r _ i d ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                 i f   ( ! $ c u s t o m e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C u s t o m e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = l e d g e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         / /   C u s t o m e r   C r e d i t 
 
                         $ l e d g e r D a t a   =   [ 
 
                                 ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                                 ' o r d e r _ i d '   = >   n u l l , 
 
                                 ' t y p e '   = >   ' r e c e i v e ' , 
 
                                 ' a m o u n t '   = >   $ a m o u n t , 
 
                                 ' m e t h o d '   = >   $ m e t h o d , 
 
                                 ' d e s c r i p t i o n '   = >   ' C a s h   r e c e i v e d   f r o m   c u s t o m e r   -   '   .   ( $ n o t e s   ? :   ' P a y m e n t   r e c e i v e d ' ) , 
 
                                 ' t r a n s a c t i o n _ d a t e '   = >   $ t r a n s a c t i o n _ d a t e 
 
                         ] ; 
 
                         $ t h i s - > l e d g e r M o d e l - > i n s e r t ( $ l e d g e r D a t a ) ; 
 
                         
 
                         / /   C a s h   D e b i t 
 
                         $ c a s h D a t a   =   [ 
 
                                 ' t r a n s a c t i o n _ d a t e '   = >   $ t r a n s a c t i o n _ d a t e , 
 
                                 ' d e s c r i p t i o n '   = >   ' P a y m e n t   r e c e i v e d   f r o m   c u s t o m e r   '   .   $ c u s t o m e r [ ' n a m e ' ]   .   '   -   '   .   ( $ n o t e s   ? :   ' C a s h   r e c e i p t ' ) , 
 
                                 ' d e b i t '   = >   $ a m o u n t , 
 
                                 ' c r e d i t '   = >   0 , 
 
                                 ' r e f e r e n c e _ i d '   = >   n u l l , 
 
                                 ' r e f e r e n c e _ t y p e '   = >   ' c u s t o m e r _ p a y m e n t ' 
 
                         ] ; 
 
                         $ t h i s - > l e d g e r M o d e l - > i n s e r t C a s h ( $ c a s h D a t a ) ; 
 
                         
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' P a y m e n t   o f   R s .   '   .   n u m b e r _ f o r m a t ( $ a m o u n t ,   0 )   .   '   r e c e i v e d   f r o m   '   .   $ c u s t o m e r [ ' n a m e ' ]   .   '   s u c c e s s f u l l y ! ' ; 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   r e c o r d   p a y m e n t :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                 } 
 
                 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c u s t o m e r _ l e d g e r & i d = '   .   $ c u s t o m e r _ i d ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   M A K E   P A Y M E N T   T O   E M P L O Y E E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e m p l o y e e P a y m e n t ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   ! = =   ' P O S T ' )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = l e d g e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ e m p l o y e e _ i d   =   $ _ P O S T [ ' e m p l o y e e _ i d ' ]   ? ?   0 ; 
 
                 $ a m o u n t   =   f l o a t v a l ( $ _ P O S T [ ' a m o u n t ' ]   ? ?   0 ) ; 
 
                 $ m e t h o d   =   $ _ P O S T [ ' m e t h o d ' ]   ? ?   ' c a s h ' ; 
 
                 $ n o t e s   =   t r i m ( $ _ P O S T [ ' n o t e s ' ]   ? ?   ' ' ) ; 
 
                 $ t r a n s a c t i o n _ d a t e   =   $ _ P O S T [ ' t r a n s a c t i o n _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 
 
                 i f   ( ! $ e m p l o y e e _ i d   | |   $ a m o u n t   < =   0 )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   p a y m e n t   d a t a . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e _ l e d g e r & i d = '   .   $ e m p l o y e e _ i d ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ e m p l o y e e _ i d ) ; 
 
                 i f   ( ! $ e m p l o y e e )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' E m p l o y e e   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = l e d g e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         / /   E m p l o y e e   D e b i t   ( p a y m e n t   m a d e ) 
 
                         $ t h i s - > e m p l o y e e M o d e l - > a d d T r a n s a c t i o n ( [ 
 
                                 ' e m p l o y e e _ i d '   = >   $ e m p l o y e e _ i d , 
 
                                 ' o r d e r _ i d '   = >   n u l l , 
 
                                 ' t y p e '   = >   ' d e b i t ' , 
 
                                 ' a m o u n t '   = >   $ a m o u n t , 
 
                                 ' d e s c r i p t i o n '   = >   ' P a y m e n t   t o   e m p l o y e e   -   '   .   ( $ n o t e s   ? :   ' S a l a r y / A d v a n c e   p a y m e n t ' ) , 
 
                                 ' t r a n s a c t i o n _ d a t e '   = >   $ t r a n s a c t i o n _ d a t e 
 
                         ] ) ; 
 
                         
 
                         / /   C a s h   C r e d i t   ( c a s h   p a i d   o u t ) 
 
                         $ c a s h D a t a   =   [ 
 
                                 ' t r a n s a c t i o n _ d a t e '   = >   $ t r a n s a c t i o n _ d a t e , 
 
                                 ' d e s c r i p t i o n '   = >   ' P a y m e n t   m a d e   t o   e m p l o y e e   '   .   $ e m p l o y e e [ ' n a m e ' ]   .   '   -   '   .   ( $ n o t e s   ? :   ' S a l a r y   p a y m e n t ' ) , 
 
                                 ' d e b i t '   = >   0 , 
 
                                 ' c r e d i t '   = >   $ a m o u n t , 
 
                                 ' r e f e r e n c e _ i d '   = >   n u l l , 
 
                                 ' r e f e r e n c e _ t y p e '   = >   ' e m p l o y e e _ p a y m e n t ' 
 
                         ] ; 
 
                         $ t h i s - > l e d g e r M o d e l - > i n s e r t C a s h ( $ c a s h D a t a ) ; 
 
                         
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' P a y m e n t   o f   R s .   '   .   n u m b e r _ f o r m a t ( $ a m o u n t ,   0 )   .   '   m a d e   t o   '   .   $ e m p l o y e e [ ' n a m e ' ]   .   '   s u c c e s s f u l l y ! ' ; 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   r e c o r d   p a y m e n t :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                 } 
 
                 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = e m p l o y e e _ l e d g e r & i d = '   .   $ e m p l o y e e _ i d ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   P R I N T   L E D G E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   p r i n t L e d g e r ( )   { 
 
                 $ t y p e   =   $ _ G E T [ ' t y p e ' ]   ? ?   ' c u s t o m e r ' ; 
 
                 $ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ c o m p a n y   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
                 
 
                 i f   ( $ t y p e   = =   ' c u s t o m e r ' )   { 
 
                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                         i f   ( ! $ c u s t o m e r )   d i e ( ' C u s t o m e r   n o t   f o u n d . ' ) ; 
 
                         $ r e s u l t   =   $ t h i s - > g e t C u s t o m e r L e d g e r D a t a ( $ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                         $ t i t l e   =   ' C u s t o m e r   L e d g e r   -   '   .   $ c u s t o m e r [ ' n a m e ' ] ; 
 
                         $ e n t i t y   =   $ c u s t o m e r ; 
 
                         $ t r a n s a c t i o n s   =   $ r e s u l t [ ' t r a n s a c t i o n s ' ] ; 
 
                         $ o p e n i n g _ b a l a n c e   =   $ r e s u l t [ ' o p e n i n g _ b a l a n c e ' ] ; 
 
                         $ c l o s i n g _ b a l a n c e   =   $ r e s u l t [ ' c l o s i n g _ b a l a n c e ' ] ; 
 
                         $ t o t a l _ r e c e i v e d   =   $ r e s u l t [ ' t o t a l _ r e c e i v e d ' ] ; 
 
                         $ t o t a l _ p a i d   =   $ r e s u l t [ ' t o t a l _ p a i d ' ] ; 
 
                         i n c l u d e   ' a p p / v i e w s / l e d g e r s / p r i n t _ l e d g e r . p h p ' ; 
 
                 }   e l s e i f   ( $ t y p e   = =   ' e m p l o y e e ' )   { 
 
                         $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ i d ) ; 
 
                         i f   ( ! $ e m p l o y e e )   d i e ( ' E m p l o y e e   n o t   f o u n d . ' ) ; 
 
                         $ r e s u l t   =   $ t h i s - > g e t E m p l o y e e L e d g e r D a t a ( $ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                         $ t i t l e   =   ' E m p l o y e e   L e d g e r   -   '   .   $ e m p l o y e e [ ' n a m e ' ] ; 
 
                         $ e n t i t y   =   $ e m p l o y e e ; 
 
                         $ t r a n s a c t i o n s   =   $ r e s u l t [ ' t r a n s a c t i o n s ' ] ; 
 
                         $ o p e n i n g _ b a l a n c e   =   $ r e s u l t [ ' o p e n i n g _ b a l a n c e ' ] ; 
 
                         $ c l o s i n g _ b a l a n c e   =   $ r e s u l t [ ' c l o s i n g _ b a l a n c e ' ] ; 
 
                         $ t o t a l _ c r e d i t   =   $ r e s u l t [ ' t o t a l _ c r e d i t ' ] ; 
 
                         $ t o t a l _ d e b i t   =   $ r e s u l t [ ' t o t a l _ d e b i t ' ] ; 
 
                         i n c l u d e   ' a p p / v i e w s / l e d g e r s / p r i n t _ l e d g e r . p h p ' ; 
 
                 }   e l s e   { 
 
                         / /   C a s h   L e d g e r   P r i n t 
 
                         $ t r a n s a c t i o n s   =   $ t h i s - > l e d g e r M o d e l - > g e t C a s h T r a n s a c t i o n s W i t h B a l a n c e ( $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                         $ o p e n i n g _ b a l a n c e   =   $ t h i s - > l e d g e r M o d e l - > g e t C a s h B a l a n c e ( $ f r o m _ d a t e ) ; 
 
                         $ c l o s i n g _ b a l a n c e   =   $ t h i s - > l e d g e r M o d e l - > g e t C a s h B a l a n c e ( $ t o _ d a t e ) ; 
 
                         $ t o t a l _ d e b i t   =   0 ; 
 
                         $ t o t a l _ c r e d i t   =   0 ; 
 
                         f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t )   { 
 
                                 $ t o t a l _ d e b i t   + =   $ t [ ' d e b i t ' ]   ? ?   0 ; 
 
                                 $ t o t a l _ c r e d i t   + =   $ t [ ' c r e d i t ' ]   ? ?   0 ; 
 
                         } 
 
                         $ t i t l e   =   ' C a s h   L e d g e r ' ; 
 
                         $ t y p e   =   ' c a s h ' ; 
 
                         i n c l u d e   ' a p p / v i e w s / l e d g e r s / p r i n t _ l e d g e r . p h p ' ; 
 
                 } 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E M P L O Y E E   P A Y M E N T   V O U C H E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e m p l o y e e V o u c h e r ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e l . * ,   e . n a m e   a s   e m p l o y e e _ n a m e ,   e . e m p _ c o d e 
 
                         F R O M   e m p l o y e e _ l e d g e r   e l 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   e l . e m p l o y e e _ i d   =   e . i d 
 
                         W H E R E   e l . i d   =   ?   A N D   e l . c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                 $ t r a n s a c t i o n   =   $ s t m t - > f e t c h ( ) ; 
 
                 
 
                 i f   ( ! $ t r a n s a c t i o n   | |   $ t r a n s a c t i o n [ ' t y p e ' ]   ! =   ' d e b i t ' )   { 
 
                         d i e ( ' P a y m e n t   v o u c h e r   n o t   f o u n d . ' ) ; 
 
                 } 
 
                 
 
                 $ c o m p a n y   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l e d g e r s / e m p l o y e e _ v o u c h e r . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   c u s t o m e r L e d g e r S e a r c h ( )   { 
 
         $ c u s t o m e r _ i d   =   $ _ G E T [ ' c u s t o m e r _ i d ' ]   ? ?   0 ; 
 
         $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
         $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 
 
         / /      &    &          &          R                                      R  
 
         $ c u s t o m e r s   =   $ t h i s - > c u s t o m e r M o d e l - > g e t A l l ( ) ; 
 
 
 
         $ t r a n s a c t i o n s   =   [ ] ; 
 
         $ o p e n i n g _ b a l a n c e   =   0 ; 
 
         $ c l o s i n g _ b a l a n c e   =   0 ; 
 
         $ t o t a l _ r e c e i v e d   =   0 ; 
 
         $ t o t a l _ p a i d   =   0 ; 
 
         $ c u s t o m e r   =   n u l l ; 
 
         $ b a l a n c e   =   0 ; 
 
 
 
         i f   ( $ c u s t o m e r _ i d   >   0 )   { 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                 i f   ( $ c u s t o m e r )   { 
 
                         $ r e s u l t   =   $ t h i s - > g e t C u s t o m e r L e d g e r D a t a ( $ c u s t o m e r _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                         $ t r a n s a c t i o n s   =   $ r e s u l t [ ' t r a n s a c t i o n s ' ] ; 
 
                         $ o p e n i n g _ b a l a n c e   =   $ r e s u l t [ ' o p e n i n g _ b a l a n c e ' ] ; 
 
                         $ c l o s i n g _ b a l a n c e   =   $ r e s u l t [ ' c l o s i n g _ b a l a n c e ' ] ; 
 
                         $ t o t a l _ r e c e i v e d   =   $ r e s u l t [ ' t o t a l _ r e c e i v e d ' ] ; 
 
                         $ t o t a l _ p a i d   =   $ r e s u l t [ ' t o t a l _ p a i d ' ] ; 
 
                         $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e ( $ c u s t o m e r _ i d ) ; 
 
                 } 
 
         } 
 
 
 
         i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
         i n c l u d e   ' a p p / v i e w s / l e d g e r s / c u s t o m e r _ l e d g e r _ s e a r c h . p h p ' ;     / /       R      R 
 
         i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
 } 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 c l a s s   O r d e r C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ o r d e r M o d e l ; 
 
         p r i v a t e   $ o r d e r S u i t M o d e l ; 
 
         p r i v a t e   $ o r d e r R a t e M o d e l ; 
 
         p r i v a t e   $ c u s t o m e r M o d e l ; 
 
         p r i v a t e   $ m e a s u r e m e n t M o d e l ; 
 
         p r i v a t e   $ l e d g e r M o d e l ; 
 
         p r i v a t e   $ n o t i f i c a t i o n M o d e l ; 
 
         p r i v a t e   $ e m p l o y e e M o d e l ; 
 
         p r i v a t e   $ s h e l f M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > o r d e r M o d e l   =   n e w   O r d e r ( ) ; 
 
                 $ t h i s - > o r d e r S u i t M o d e l   =   n e w   O r d e r S u i t ( ) ; 
 
                 $ t h i s - > o r d e r R a t e M o d e l   =   n e w   O r d e r R a t e ( ) ; 
 
                 $ t h i s - > c u s t o m e r M o d e l   =   n e w   C u s t o m e r ( ) ; 
 
                 $ t h i s - > m e a s u r e m e n t M o d e l   =   n e w   M e a s u r e m e n t ( ) ; 
 
                 $ t h i s - > l e d g e r M o d e l   =   n e w   L e d g e r ( ) ; 
 
                 $ t h i s - > n o t i f i c a t i o n M o d e l   =   n e w   N o t i f i c a t i o n ( ) ; 
 
                 $ t h i s - > e m p l o y e e M o d e l   =   n e w   E m p l o y e e ( ) ; 
 
                 $ t h i s - > s h e l f M o d e l   =   n e w   S h e l f ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   O R D E R S   L I S T   ( I N D E X ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ s e a r c h   =   $ _ G E T [ ' s e a r c h ' ]   ? ?   ' ' ; 
 
                 $ s t a t u s   =   $ _ G E T [ ' s t a t u s ' ]   ? ?   ' ' ; 
 
                 $ o r d e r s   =   $ t h i s - > o r d e r M o d e l - > g e t A l l ( $ s e a r c h ,   $ s t a t u s ) ; 
 
                 $ t o t a l   =   c o u n t ( $ o r d e r s ) ; 
 
                 $ p e r P a g e   =   1 0 ; 
 
                 $ t o t a l P a g e s   =   c e i l ( $ t o t a l   /   $ p e r P a g e ) ; 
 
                 $ p a g e   =   1 ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / o r d e r s / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   O R D E R   R E C E I P T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   o r d e r _ r e c e i p t ( )   { 
 
                 $ o r d e r _ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
                 i f   ( ! $ o r d e r _ i d )   { 
 
                         d i e ( ' O r d e r   I D   r e q u i r e d . ' ) ; 
 
                 } 
 
                 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ o r d e r _ i d ) ; 
 
                 i f   ( ! $ o r d e r )   { 
 
                         d i e ( ' O r d e r   n o t   f o u n d . ' ) ; 
 
                 } 
 
                 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y O r d e r ( $ o r d e r _ i d ) ; 
 
                 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ c o m p a n y   =   $ s t m t - > f e t c h ( ) ; 
 
                 i f   ( ! $ c o m p a n y )   { 
 
                         $ c o m p a n y   =   [ ' n a m e '   = >   ' B i z T e c h   T a i l o r ' ,   ' a d d r e s s '   = >   ' ' ,   ' p h o n e '   = >   ' ' ,   ' r e c e i p t _ f o o t e r '   = >   ' ' ] ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / o r d e r s / o r d e r _ r e c e i p t . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   V I E W   O R D E R   ( P r i n t ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   v i e w ( $ i d )   { 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ o r d e r )   { 
 
                         d i e ( ' O r d e r   n o t   f o u n d . ' ) ; 
 
                 } 
 
                 $ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y O r d e r ( $ i d ) ; 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e A s O f ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ,   $ o r d e r [ ' o r d e r _ d a t e ' ] ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / o r d e r s / p r i n t . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A D D   O R D E R   ( W I T H   M U L T I P L E   S U I T S   S U P P O R T ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a d d ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ c u s t o m e r _ i d   =   $ _ P O S T [ ' c u s t o m e r _ i d ' ]   ? ?   0 ; 
 
                         $ o r d e r _ d a t e   =   $ _ P O S T [ ' o r d e r _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                         $ d e l i v e r y _ d a t e   =   $ _ P O S T [ ' d e l i v e r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' ; 
 
                         
 
                         $ t y p e s   =   $ _ P O S T [ ' t y p e ' ]   ? ?   [ ] ; 
 
                         $ s i z e s   =   $ _ P O S T [ ' s i z e ' ]   ? ?   [ ] ; 
 
                         $ q t y s   =   $ _ P O S T [ ' q t y ' ]   ? ?   [ ] ; 
 
                         $ r a t e s   =   $ _ P O S T [ ' r a t e ' ]   ? ?   [ ] ; 
 
                         $ m e a s u r e m e n t _ i d s   =   $ _ P O S T [ ' m e a s u r e m e n t _ i d ' ]   ? ?   [ ] ; 
 
                         
 
                         $ t o t a l _ q t y   =   0 ; 
 
                         $ s u b _ t o t a l   =   0 ; 
 
                         $ i t e m s   =   [ ] ; 
 
                         
 
                         f o r   ( $ i   =   0 ;   $ i   <   c o u n t ( $ t y p e s ) ;   $ i + + )   { 
 
                                 $ q t y   =   i n t v a l ( $ q t y s [ $ i ]   ? ?   1 ) ; 
 
                                 $ r a t e   =   f l o a t v a l ( $ r a t e s [ $ i ]   ? ?   0 ) ; 
 
                                 $ m e a s u r e m e n t _ i d   =   ! e m p t y ( $ m e a s u r e m e n t _ i d s [ $ i ] )   ?   $ m e a s u r e m e n t _ i d s [ $ i ]   :   n u l l ; 
 
                                 
 
                                 f o r   ( $ j   =   0 ;   $ j   <   $ q t y ;   $ j + + )   { 
 
                                         $ i t e m s [ ]   =   [ 
 
                                                 ' t y p e '   = >   $ t y p e s [ $ i ] , 
 
                                                 ' s i z e '   = >   $ s i z e s [ $ i ]   ? ?   ' L a r g e ' , 
 
                                                 ' r a t e '   = >   $ r a t e , 
 
                                                 ' m e a s u r e m e n t _ i d '   = >   $ m e a s u r e m e n t _ i d 
 
                                         ] ; 
 
                                         $ t o t a l _ q t y + + ; 
 
                                         $ s u b _ t o t a l   + =   $ r a t e ; 
 
                                 } 
 
                         } 
 
                         
 
                         $ a d v a n c e   =   f l o a t v a l ( $ _ P O S T [ ' a d v a n c e ' ]   ? ?   0 ) ; 
 
                         $ f i n a l _ b a l a n c e   =   $ s u b _ t o t a l   -   $ a d v a n c e ; 
 
                         $ o r d e r _ n o   =   $ t h i s - > o r d e r M o d e l - > g e n e r a t e O r d e r N o ( ) ; 
 
                         
 
                         $ o r d e r D a t a   =   [ 
 
                                 ' o r d e r _ n o '   = >   $ o r d e r _ n o , 
 
                                 ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                                 ' o r d e r _ d a t e '   = >   $ o r d e r _ d a t e , 
 
                                 ' d e l i v e r y _ d a t e '   = >   $ d e l i v e r y _ d a t e , 
 
                                 ' o r d e r _ t y p e '   = >   ' u n s t i t c h e d ' , 
 
                                 ' t o t a l _ s u i t s '   = >   $ t o t a l _ q t y , 
 
                                 ' t o t a l _ a m o u n t '   = >   $ s u b _ t o t a l , 
 
                                 ' d i s c o u n t '   = >   0 , 
 
                                 ' n e t _ a m o u n t '   = >   $ s u b _ t o t a l , 
 
                                 ' p a i d _ a m o u n t '   = >   $ a d v a n c e , 
 
                                 ' d u e _ a m o u n t '   = >   $ f i n a l _ b a l a n c e , 
 
                                 ' s t a t u s '   = >   $ s t a t u s 
 
                         ] ; 
 
                         
 
                         $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                         t r y   { 
 
                                 i f   ( $ t h i s - > o r d e r M o d e l - > i n s e r t ( $ o r d e r D a t a ) )   { 
 
                                         $ o r d e r _ i d   =   $ t h i s - > o r d e r M o d e l - > g e t L a s t I n s e r t I d ( ) ; 
 
                                         
 
                                         $ s u i t _ c o u n t e r   =   0 ; 
 
                                         f o r e a c h   ( $ i t e m s   a s   $ i t e m )   { 
 
                                                 $ s u i t _ c o u n t e r + + ; 
 
                                                 $ s u i t D a t a   =   [ 
 
                                                         ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                                         ' s u i t _ n u m b e r '   = >   $ s u i t _ c o u n t e r , 
 
                                                         ' s u i t _ t y p e '   = >   $ i t e m [ ' t y p e ' ] , 
 
                                                         ' s i z e '   = >   $ i t e m [ ' s i z e ' ]   ? ?   ' L a r g e ' , 
 
                                                         ' c o l o r '   = >   ' ' , 
 
                                                         ' c o l o r _ t y p e '   = >   ' c o l o r e d ' , 
 
                                                         ' c u f f _ t y p e '   = >   ' c u f f ' , 
 
                                                         ' g h e r a _ t y p e '   = >   ' r o u n d ' , 
 
                                                         ' m e a s u r e m e n t _ i d '   = >   $ i t e m [ ' m e a s u r e m e n t _ i d ' ] , 
 
                                                         ' p r i c e '   = >   $ i t e m [ ' r a t e ' ] , 
 
                                                         ' s t a t u s '   = >   ' p e n d i n g ' 
 
                                                 ] ; 
 
                                                 $ t h i s - > o r d e r S u i t M o d e l - > i n s e r t ( $ s u i t D a t a ) ; 
 
                                         } 
 
                                         
 
                                         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                                         / /    S&   L E D G E R   E N T R I E S   -         R   R        R                  
 
                                         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                                         
 
                                         / /   1        N e t   T o t a l   ( C u s t o m e r   D e b i t   /   p a y )   -   O r d e r   a m o u n t 
 
                                         i f   ( $ s u b _ t o t a l   >   0 )   { 
 
                                                 / /                 R         R                                  R                          R  p a y             R             R   x
 
                                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   l e d g e r   W H E R E   o r d e r _ i d   =   ?   A N D   t y p e   =   ' p a y '   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                                                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                                                 $ e x i s t s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                                 
 
                                                 i f   ( $ e x i s t s   = =   0 )   { 
 
                                                         $ l e d g e r D a t a   =   [ 
 
                                                                 ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                                                                 ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                                                 ' t y p e '   = >   ' p a y ' , 
 
                                                                 ' a m o u n t '   = >   $ s u b _ t o t a l , 
 
                                                                 ' m e t h o d '   = >   ' c a s h ' , 
 
                                                                 ' d e s c r i p t i o n '   = >   ' O r d e r   # '   .   $ o r d e r _ i d   .   '   -   T o t a l   a m o u n t   ( C u s t o m e r   D e b i t ) ' , 
 
                                                                 ' t r a n s a c t i o n _ d a t e '   = >   $ o r d e r _ d a t e 
 
                                                         ] ; 
 
                                                         $ t h i s - > l e d g e r M o d e l - > i n s e r t ( $ l e d g e r D a t a ) ; 
 
                                                 } 
 
                                         } 
 
                                         
 
                                         / /   2        A d v a n c e   ( C u s t o m e r   C r e d i t   /   r e c e i v e )   -   A d v a n c e   p a y m e n t 
 
                                         i f   ( $ a d v a n c e   >   0 )   { 
 
                                                 / /                 R         R                                  R                          R  r e c e i v e             R             R   x
 
                                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   l e d g e r   W H E R E   o r d e r _ i d   =   ?   A N D   t y p e   =   ' r e c e i v e '   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                                                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                                                 $ e x i s t s   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                                 
 
                                                 i f   ( $ e x i s t s   = =   0 )   { 
 
                                                         $ l e d g e r D a t a   =   [ 
 
                                                                 ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                                                                 ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                                                 ' t y p e '   = >   ' r e c e i v e ' , 
 
                                                                 ' a m o u n t '   = >   $ a d v a n c e , 
 
                                                                 ' m e t h o d '   = >   ' c a s h ' , 
 
                                                                 ' d e s c r i p t i o n '   = >   ' O r d e r   # '   .   $ o r d e r _ i d   .   '   -   A d v a n c e   ( C u s t o m e r   C r e d i t ) ' , 
 
                                                                 ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                                                         ] ; 
 
                                                         $ t h i s - > l e d g e r M o d e l - > i n s e r t ( $ l e d g e r D a t a ) ; 
 
                                                         
 
                                                         / /   C a s h   L e d g e r   ( C a s h   R e c e i v e d ) 
 
                                                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                                                         / /       R         R          c a s h _ l e d g e r    &  R                     &                    R   x
 
                                                         $ s t m t 2   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c a s h _ l e d g e r   W H E R E   r e f e r e n c e _ i d   =   ?   A N D   r e f e r e n c e _ t y p e   =   ' a d v a n c e '   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                                                         $ s t m t 2 - > e x e c u t e ( [ $ o r d e r _ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                                                         $ c a s h E x i s t s   =   $ s t m t 2 - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                                         
 
                                                         i f   ( $ c a s h E x i s t s   = =   0 )   { 
 
                                                                 $ c a s h D a t a   =   [ 
 
                                                                         ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) , 
 
                                                                         ' d e s c r i p t i o n '   = >   ' A d v a n c e   p a y m e n t   r e c e i v e d   f o r   O r d e r   # '   .   $ o r d e r _ i d   .   '   f r o m   '   .   ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' C u s t o m e r ' ) , 
 
                                                                         ' d e b i t '   = >   $ a d v a n c e , 
 
                                                                         ' c r e d i t '   = >   0 , 
 
                                                                         ' r e f e r e n c e _ i d '   = >   $ o r d e r _ i d , 
 
                                                                         ' r e f e r e n c e _ t y p e '   = >   ' a d v a n c e ' 
 
                                                                 ] ; 
 
                                                                 $ t h i s - > l e d g e r M o d e l - > i n s e r t C a s h ( $ c a s h D a t a ) ; 
 
                                                         } 
 
                                                 } 
 
                                         } 
 
                                         
 
                                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                                         $ m s g   =   " N e w   O r d e r   # { $ o r d e r _ i d }   c r e a t e d   f o r   "   .   ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' C u s t o m e r ' )   .   "   w i t h   { $ t o t a l _ q t y }   s u i t s " ; 
 
                                         $ t h i s - > n o t i f i c a t i o n M o d e l - > c r e a t e ( ' o r d e r _ n e w ' ,   $ m s g ,   ' i n d e x . p h p ? a c t i o n = o r d e r _ e d i t & i d = '   .   $ o r d e r _ i d ) ; 
 
                                         
 
                                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                                         
 
                                         e c h o   ' < ! D O C T Y P E   h t m l > 
 
                                         < h t m l > 
 
                                         < h e a d > 
 
                                                 < s c r i p t > 
 
                                                         w i n d o w . o p e n ( " i n d e x . p h p ? a c t i o n = o r d e r _ r e c e i p t & i d = '   .   $ o r d e r _ i d   .   ' " ,   " _ b l a n k " ) ; 
 
                                                         w i n d o w . l o c a t i o n . h r e f   =   " i n d e x . p h p ? a c t i o n = o r d e r s " ; 
 
                                                 < / s c r i p t > 
 
                                         < / h e a d > 
 
                                         < b o d y > < / b o d y > 
 
                                         < / h t m l > ' ; 
 
                                         e x i t ; 
 
                                 } 
 
                         }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                                 $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                                 $ e r r o r   =   ' F a i l e d   t o   a d d   o r d e r :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                         } 
 
                 } 
 
                 
 
                 $ t y p e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t T y p e s ( ) ; 
 
                 $ s i z e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t S i z e s ( ) ; 
 
                 $ r a t e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t A l l ( ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / o r d e r s / a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E D I T   O R D E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e d i t ( $ i d )   { 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ o r d e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' O r d e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = o r d e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ c u s t o m e r _ i d   =   $ _ P O S T [ ' c u s t o m e r _ i d ' ]   ? ?   0 ; 
 
                         $ o r d e r _ d a t e   =   $ _ P O S T [ ' o r d e r _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                         $ d e l i v e r y _ d a t e   =   $ _ P O S T [ ' d e l i v e r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' ; 
 
                         
 
                         $ t y p e s   =   $ _ P O S T [ ' t y p e ' ]   ? ?   [ ] ; 
 
                         $ s i z e s   =   $ _ P O S T [ ' s i z e ' ]   ? ?   [ ] ; 
 
                         $ q t y s   =   $ _ P O S T [ ' q t y ' ]   ? ?   [ ] ; 
 
                         $ r a t e s   =   $ _ P O S T [ ' r a t e ' ]   ? ?   [ ] ; 
 
                         $ m e a s u r e m e n t _ i d s   =   $ _ P O S T [ ' m e a s u r e m e n t _ i d ' ]   ? ?   [ ] ; 
 
                         
 
                         $ t o t a l _ q t y   =   0 ; 
 
                         $ s u b _ t o t a l   =   0 ; 
 
                         $ i t e m s   =   [ ] ; 
 
                         
 
                         f o r   ( $ i   =   0 ;   $ i   <   c o u n t ( $ t y p e s ) ;   $ i + + )   { 
 
                                 $ q t y   =   i n t v a l ( $ q t y s [ $ i ]   ? ?   1 ) ; 
 
                                 $ r a t e   =   f l o a t v a l ( $ r a t e s [ $ i ]   ? ?   0 ) ; 
 
                                 $ m e a s u r e m e n t _ i d   =   ! e m p t y ( $ m e a s u r e m e n t _ i d s [ $ i ] )   ?   $ m e a s u r e m e n t _ i d s [ $ i ]   :   n u l l ; 
 
                                 
 
                                 f o r   ( $ j   =   0 ;   $ j   <   $ q t y ;   $ j + + )   { 
 
                                         $ i t e m s [ ]   =   [ 
 
                                                 ' t y p e '   = >   $ t y p e s [ $ i ] , 
 
                                                 ' s i z e '   = >   $ s i z e s [ $ i ]   ? ?   ' L a r g e ' , 
 
                                                 ' r a t e '   = >   $ r a t e , 
 
                                                 ' m e a s u r e m e n t _ i d '   = >   $ m e a s u r e m e n t _ i d 
 
                                         ] ; 
 
                                         $ t o t a l _ q t y + + ; 
 
                                         $ s u b _ t o t a l   + =   $ r a t e ; 
 
                                 } 
 
                         } 
 
                         
 
                         $ a d v a n c e   =   f l o a t v a l ( $ _ P O S T [ ' a d v a n c e ' ]   ? ?   0 ) ; 
 
                         $ f i n a l _ b a l a n c e   =   $ s u b _ t o t a l   -   $ a d v a n c e ; 
 
                         
 
                         $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                         t r y   { 
 
                                 $ o r d e r D a t a   =   [ 
 
                                         ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                                         ' o r d e r _ d a t e '   = >   $ o r d e r _ d a t e , 
 
                                         ' d e l i v e r y _ d a t e '   = >   $ d e l i v e r y _ d a t e , 
 
                                         ' o r d e r _ t y p e '   = >   ' u n s t i t c h e d ' , 
 
                                         ' t o t a l _ s u i t s '   = >   $ t o t a l _ q t y , 
 
                                         ' t o t a l _ a m o u n t '   = >   $ s u b _ t o t a l , 
 
                                         ' d i s c o u n t '   = >   0 , 
 
                                         ' n e t _ a m o u n t '   = >   $ s u b _ t o t a l , 
 
                                         ' p a i d _ a m o u n t '   = >   $ a d v a n c e , 
 
                                         ' d u e _ a m o u n t '   = >   $ f i n a l _ b a l a n c e , 
 
                                         ' s t a t u s '   = >   $ s t a t u s 
 
                                 ] ; 
 
                                 $ t h i s - > o r d e r M o d e l - > u p d a t e ( $ i d ,   $ o r d e r D a t a ) ; 
 
                                 
 
                                 $ t h i s - > o r d e r S u i t M o d e l - > d e l e t e B y O r d e r ( $ i d ) ; 
 
                                 
 
                                 $ s u i t _ c o u n t e r   =   0 ; 
 
                                 f o r e a c h   ( $ i t e m s   a s   $ i t e m )   { 
 
                                         $ s u i t _ c o u n t e r + + ; 
 
                                         $ s u i t D a t a   =   [ 
 
                                                 ' o r d e r _ i d '   = >   $ i d , 
 
                                                 ' s u i t _ n u m b e r '   = >   $ s u i t _ c o u n t e r , 
 
                                                 ' s u i t _ t y p e '   = >   $ i t e m [ ' t y p e ' ] , 
 
                                                 ' s i z e '   = >   $ i t e m [ ' s i z e ' ]   ? ?   ' L a r g e ' , 
 
                                                 ' c o l o r '   = >   ' ' , 
 
                                                 ' c o l o r _ t y p e '   = >   ' c o l o r e d ' , 
 
                                                 ' c u f f _ t y p e '   = >   ' c u f f ' , 
 
                                                 ' g h e r a _ t y p e '   = >   ' r o u n d ' , 
 
                                                 ' m e a s u r e m e n t _ i d '   = >   $ i t e m [ ' m e a s u r e m e n t _ i d ' ] , 
 
                                                 ' p r i c e '   = >   $ i t e m [ ' r a t e ' ] , 
 
                                                 ' s t a t u s '   = >   ' p e n d i n g ' 
 
                                         ] ; 
 
                                         $ t h i s - > o r d e r S u i t M o d e l - > i n s e r t ( $ s u i t D a t a ) ; 
 
                                 } 
 
                                 
 
                                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                                 / /    S&             R     R                R                      R  
 
                                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   l e d g e r   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                                 $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                                 
 
                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   c a s h _ l e d g e r   W H E R E   r e f e r e n c e _ i d   =   ?   A N D   r e f e r e n c e _ t y p e   I N   ( ' o r d e r ' ,   ' a d v a n c e ' )   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                                 $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                                 
 
                                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                                 / /    S&         R     R                R          R    (       R   R       R                   R   R     R                    R                     R     R  ) 
 
                                 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
                                 i f   ( $ s u b _ t o t a l   >   0 )   { 
 
                                         $ l e d g e r D a t a   =   [ 
 
                                                 ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                                                 ' o r d e r _ i d '   = >   $ i d , 
 
                                                 ' t y p e '   = >   ' p a y ' , 
 
                                                 ' a m o u n t '   = >   $ s u b _ t o t a l , 
 
                                                 ' m e t h o d '   = >   ' c a s h ' , 
 
                                                 ' d e s c r i p t i o n '   = >   ' O r d e r   # '   .   $ i d   .   '   -   T o t a l   a m o u n t   ( C u s t o m e r   D e b i t ) ' , 
 
                                                 ' t r a n s a c t i o n _ d a t e '   = >   $ o r d e r _ d a t e 
 
                                         ] ; 
 
                                         $ t h i s - > l e d g e r M o d e l - > i n s e r t ( $ l e d g e r D a t a ) ; 
 
                                 } 
 
                                 
 
                                 i f   ( $ a d v a n c e   >   0 )   { 
 
                                         $ l e d g e r D a t a   =   [ 
 
                                                 ' c u s t o m e r _ i d '   = >   $ c u s t o m e r _ i d , 
 
                                                 ' o r d e r _ i d '   = >   $ i d , 
 
                                                 ' t y p e '   = >   ' r e c e i v e ' , 
 
                                                 ' a m o u n t '   = >   $ a d v a n c e , 
 
                                                 ' m e t h o d '   = >   ' c a s h ' , 
 
                                                 ' d e s c r i p t i o n '   = >   ' O r d e r   # '   .   $ i d   .   '   -   A d v a n c e   ( C u s t o m e r   C r e d i t ) ' , 
 
                                                 ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                                         ] ; 
 
                                         $ t h i s - > l e d g e r M o d e l - > i n s e r t ( $ l e d g e r D a t a ) ; 
 
                                         
 
                                         $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                                         $ c a s h D a t a   =   [ 
 
                                                 ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) , 
 
                                                 ' d e s c r i p t i o n '   = >   ' A d v a n c e   p a y m e n t   r e c e i v e d   f o r   O r d e r   # '   .   $ i d   .   '   f r o m   '   .   ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' C u s t o m e r ' ) , 
 
                                                 ' d e b i t '   = >   $ a d v a n c e , 
 
                                                 ' c r e d i t '   = >   0 , 
 
                                                 ' r e f e r e n c e _ i d '   = >   $ i d , 
 
                                                 ' r e f e r e n c e _ t y p e '   = >   ' a d v a n c e ' 
 
                                         ] ; 
 
                                         $ t h i s - > l e d g e r M o d e l - > i n s e r t C a s h ( $ c a s h D a t a ) ; 
 
                                 } 
 
                                 
 
                                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ c u s t o m e r _ i d ) ; 
 
                                 $ m s g   =   " O r d e r   # { $ i d }   h a s   b e e n   u p d a t e d .   S t a t u s :   "   .   u c f i r s t ( $ s t a t u s ) ; 
 
                                 $ t h i s - > n o t i f i c a t i o n M o d e l - > c r e a t e ( ' o r d e r _ u p d a t e ' ,   $ m s g ,   ' i n d e x . p h p ? a c t i o n = o r d e r _ e d i t & i d = '   .   $ i d ) ; 
 
                                 
 
                                 $ t h i s - > d b - > c o m m i t ( ) ; 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' O r d e r   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = o r d e r s ' ) ; 
 
                                 e x i t ; 
 
                                 
 
                         }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                                 $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                                 $ e r r o r   =   ' F a i l e d   t o   u p d a t e   o r d e r :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                         } 
 
                 } 
 
 
 
                 $ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y O r d e r ( $ i d ) ; 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ t y p e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t T y p e s ( ) ; 
 
                 $ s i z e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t S i z e s ( ) ; 
 
                 $ r a t e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t A l l ( ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / o r d e r s / e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   O R D E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   c u t t i n g   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   s t i t c h i n g   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   d e l i v e r y   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ t h i s - > o r d e r S u i t M o d e l - > d e l e t e B y O r d e r ( $ i d ) ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   l e d g e r   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   c a s h _ l e d g e r   W H E R E   r e f e r e n c e _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   e m p l o y e e _ l e d g e r   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         $ t h i s - > o r d e r M o d e l - > d e l e t e ( $ i d ) ; 
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' O r d e r   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   d e l e t e   o r d e r :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                 } 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = o r d e r s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N V O I C E   P R I N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n v o i c e ( )   { 
 
                 $ o r d e r _ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
                 i f   ( ! $ o r d e r _ i d )   { 
 
                         d i e ( ' O r d e r   I D   r e q u i r e d . ' ) ; 
 
                 } 
 
                 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ o r d e r _ i d ) ; 
 
                 i f   ( ! $ o r d e r )   { 
 
                         d i e ( ' O r d e r   n o t   f o u n d . ' ) ; 
 
                 } 
 
                 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y O r d e r ( $ o r d e r _ i d ) ; 
 
                 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ c o m p a n y   =   $ s t m t - > f e t c h ( ) ; 
 
                 i f   ( ! $ c o m p a n y )   { 
 
                         $ c o m p a n y   =   [ ' n a m e '   = >   ' B i z T e c h   T a i l o r ' ,   ' a d d r e s s '   = >   ' ' ,   ' p h o n e '   = >   ' ' ,   ' r e c e i p t _ f o o t e r '   = >   ' ' ] ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / o r d e r s / i n v o i c e . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   F I N A L   I N V O I C E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   f i n a l _ i n v o i c e ( )   { 
 
                 $ o r d e r _ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
                 i f   ( ! $ o r d e r _ i d )   { 
 
                         d i e ( ' O r d e r   I D   r e q u i r e d . ' ) ; 
 
                 } 
 
                 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ o r d e r _ i d ) ; 
 
                 i f   ( ! $ o r d e r   | |   $ o r d e r [ ' s t a t u s ' ]   ! =   ' d e l i v e r e d ' )   { 
 
                         d i e ( ' O r d e r   n o t   f o u n d   o r   n o t   f u l l y   d e l i v e r e d . ' ) ; 
 
                 } 
 
                 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ] ) ; 
 
                 $ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y O r d e r ( $ o r d e r _ i d ) ; 
 
                 
 
                 $ s u b _ t o t a l   =   0 ; 
 
                 f o r e a c h   ( $ s u i t s   a s   $ s )   { 
 
                         $ s u b _ t o t a l   + =   $ s [ ' p r i c e ' ] ; 
 
                 } 
 
                 
 
                 $ p r e v i o u s _ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e A s O f ( $ c u s t o m e r [ ' i d ' ] ,   $ o r d e r [ ' o r d e r _ d a t e ' ] ) ; 
 
                 $ g r a n d _ t o t a l   =   $ s u b _ t o t a l   +   $ p r e v i o u s _ b a l a n c e ; 
 
                 $ t o t a l _ p a i d   =   $ o r d e r [ ' p a i d _ a m o u n t ' ] ; 
 
                 $ n e t _ b a l a n c e   =   $ g r a n d _ t o t a l   -   $ t o t a l _ p a i d ; 
 
                 
 
                 $ c o m p a n y   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / o r d e r s / f i n a l _ i n v o i c e . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A J A X :   S E A R C H   C U S T O M E R S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   s e a r c h C u s t o m e r s ( )   { 
 
                 $ t e r m   =   $ _ G E T [ ' t e r m ' ]   ? ?   ' ' ; 
 
                 i f   ( s t r l e n ( $ t e r m )   <   2 )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ t e r m _ l i k e   =   ' % '   .   $ t e r m   .   ' % ' ; 
 
                 
 
                 t r y   { 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         c . i d ,   
 
                                         c . n a m e ,   
 
                                         c . p h o n e ,   
 
                                         c . p r o f i l e _ p i c , 
 
                                         c . c u s t o m e r _ n o , 
 
                                         C O A L E S C E ( 
 
                                                 ( S E L E C T   S U M ( C A S E   W H E N   t y p e   =   ' p a y '   T H E N   a m o u n t   E L S E   0   E N D )   F R O M   l e d g e r   
 
                                                   W H E R E   c u s t o m e r _ i d   =   c . i d   A N D   c o m p a n y _ i d   =   ? ) ,   0 
 
                                         )   -   
 
                                         C O A L E S C E ( 
 
                                                 ( S E L E C T   S U M ( C A S E   W H E N   t y p e   =   ' r e c e i v e '   T H E N   a m o u n t   E L S E   0   E N D )   F R O M   l e d g e r   
 
                                                   W H E R E   c u s t o m e r _ i d   =   c . i d   A N D   c o m p a n y _ i d   =   ? ) ,   0 
 
                                         )   a s   b a l a n c e 
 
                                 F R O M   c u s t o m e r s   c 
 
                                 W H E R E   c . c o m p a n y _ i d   =   ?   
 
                                 A N D   ( c . n a m e   L I K E   ?   O R   c . p h o n e   L I K E   ?   O R   c . c u s t o m e r _ n o   L I K E   ? ) 
 
                                 O R D E R   B Y   c . n a m e   A S C 
 
                                 L I M I T   1 5 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ c o m p a n y _ i d ,   $ c o m p a n y _ i d ,   $ t e r m _ l i k e ,   $ t e r m _ l i k e ,   $ t e r m _ l i k e ] ) ; 
 
                         $ c u s t o m e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                         
 
                         f o r e a c h   ( $ c u s t o m e r s   a s   & $ c )   { 
 
                                 $ c [ ' p r o f i l e _ p i c ' ]   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   ( $ c [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' ) ; 
 
                                 $ c [ ' b a l a n c e ' ]   =   f l o a t v a l ( $ c [ ' b a l a n c e ' ]   ? ?   0 ) ; 
 
                         } 
 
                         
 
                         h e a d e r ( ' C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n ' ) ; 
 
                         e c h o   j s o n _ e n c o d e ( $ c u s t o m e r s ) ; 
 
                         
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         e r r o r _ l o g ( " C u s t o m e r   s e a r c h   e r r o r :   "   .   $ e - > g e t M e s s a g e ( ) ) ; 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                 } 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A J A X :   G E T   M E A S U R E M E N T S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t M e a s u r e m e n t s ( )   { 
 
                 $ c u s t o m e r _ i d   =   $ _ G E T [ ' c u s t o m e r _ i d ' ]   ? ?   0 ; 
 
                 i f   ( ! $ c u s t o m e r _ i d )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ m e a s u r e m e n t s   =   $ t h i s - > m e a s u r e m e n t M o d e l - > g e t B y C u s t o m e r ( $ c u s t o m e r _ i d ) ; 
 
                 e c h o   j s o n _ e n c o d e ( $ m e a s u r e m e n t s ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A J A X :   G E T   R A T E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t R a t e ( )   { 
 
                 $ t y p e   =   $ _ G E T [ ' t y p e ' ]   ? ?   ' ' ; 
 
                 $ s i z e   =   $ _ G E T [ ' s i z e ' ]   ? ?   ' ' ; 
 
                 i f   ( ! $ t y p e   | |   ! $ s i z e )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ' r a t e '   = >   0 ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ r a t e   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t R a t e ( $ t y p e ,   $ s i z e ) ; 
 
                 e c h o   j s o n _ e n c o d e ( [ ' r a t e '   = >   $ r a t e [ ' r a t e ' ]   ? ?   0 ] ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A J A X :   G E T   B A L A N C E   A S   O F   D A T E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B a l a n c e A s O f ( )   { 
 
                 $ c u s t o m e r _ i d   =   $ _ G E T [ ' c u s t o m e r _ i d ' ]   ? ?   0 ; 
 
                 $ d a t e   =   $ _ G E T [ ' d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 i f   ( ! $ c u s t o m e r _ i d )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ' b a l a n c e '   = >   0 ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ b a l a n c e   =   $ t h i s - > o r d e r M o d e l - > g e t C u s t o m e r B a l a n c e A s O f ( $ c u s t o m e r _ i d ,   $ d a t e ) ; 
 
                 e c h o   j s o n _ e n c o d e ( [ ' b a l a n c e '   = >   $ b a l a n c e ] ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   R A T E S   M A N A G E M E N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   r a t e s ( )   { 
 
                 $ r a t e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t A l l ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / r a t e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   r a t e _ a d d ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ d a t a   =   [ 
 
                                 ' t y p e '   = >   $ _ P O S T [ ' t y p e ' ] , 
 
                                 ' s i z e '   = >   $ _ P O S T [ ' s i z e ' ] , 
 
                                 ' r a t e '   = >   $ _ P O S T [ ' r a t e ' ] , 
 
                                 ' c u t t i n g _ r a t e '   = >   $ _ P O S T [ ' c u t t i n g _ r a t e ' ]   ? ?   0 , 
 
                                 ' s t i t c h i n g _ r a t e '   = >   $ _ P O S T [ ' s t i t c h i n g _ r a t e ' ]   ? ?   0 , 
 
                                 ' s t i t c h i n g _ e x p e n s e s '   = >   $ _ P O S T [ ' s t i t c h i n g _ e x p e n s e s ' ]   ? ?   0 
 
                         ] ; 
 
                         $ t h i s - > o r d e r R a t e M o d e l - > i n s e r t ( $ d a t a ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' R a t e   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = r a t e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ t y p e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t T y p e s ( ) ; 
 
                 $ s i z e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t S i z e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / r a t e _ a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   r a t e _ e d i t ( $ i d )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ d a t a   =   [ 
 
                                 ' t y p e '   = >   $ _ P O S T [ ' t y p e ' ] , 
 
                                 ' s i z e '   = >   $ _ P O S T [ ' s i z e ' ] , 
 
                                 ' r a t e '   = >   $ _ P O S T [ ' r a t e ' ] , 
 
                                 ' c u t t i n g _ r a t e '   = >   $ _ P O S T [ ' c u t t i n g _ r a t e ' ]   ? ?   0 , 
 
                                 ' s t i t c h i n g _ r a t e '   = >   $ _ P O S T [ ' s t i t c h i n g _ r a t e ' ]   ? ?   0 , 
 
                                 ' s t i t c h i n g _ e x p e n s e s '   = >   $ _ P O S T [ ' s t i t c h i n g _ e x p e n s e s ' ]   ? ?   0 
 
                         ] ; 
 
                         $ t h i s - > o r d e r R a t e M o d e l - > u p d a t e ( $ i d ,   $ d a t a ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' R a t e   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = r a t e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   o r d e r _ r a t e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                 $ r a t e   =   $ s t m t - > f e t c h ( ) ; 
 
                 i f   ( ! $ r a t e )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = r a t e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ t y p e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t T y p e s ( ) ; 
 
                 $ s i z e s   =   $ t h i s - > o r d e r R a t e M o d e l - > g e t S i z e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / r a t e _ e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   r a t e _ d e l e t e ( $ i d )   { 
 
                 $ t h i s - > o r d e r R a t e M o d e l - > d e l e t e ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' R a t e   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = r a t e s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G L O B A L   S E A R C H 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g l o b a l S e a r c h ( )   { 
 
                 $ q   =   $ _ G E T [ ' q ' ]   ? ?   ' ' ; 
 
                 i f   ( s t r l e n ( $ q )   <   2 )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ r e s u l t s   =   [ ] ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   i d ,   n a m e ,   p h o n e ,   ' c u s t o m e r '   a s   t y p e   F R O M   c u s t o m e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   ( n a m e   L I K E   ?   O R   p h o n e   L I K E   ? )   L I M I T   5 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   ' % '   .   $ q   .   ' % ' ,   ' % '   .   $ q   .   ' % ' ] ) ; 
 
                 $ c u s t o m e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 f o r e a c h   ( $ c u s t o m e r s   a s   & $ c )   { 
 
                         $ c [ ' n a m e ' ]   =   $ c [ ' n a m e ' ]   .   '   ( '   .   $ c [ ' p h o n e ' ]   .   ' ) ' ; 
 
                         $ c [ ' l i n k ' ]   =   ' i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = '   .   $ c [ ' i d ' ] ; 
 
                 } 
 
                 $ r e s u l t s   =   a r r a y _ m e r g e ( $ r e s u l t s ,   $ c u s t o m e r s ) ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   i d ,   ' o r d e r '   a s   t y p e ,   ( S E L E C T   n a m e   F R O M   c u s t o m e r s   W H E R E   i d   =   o r d e r s . c u s t o m e r _ i d )   a s   n a m e   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   o r d e r _ n o   L I K E   ?   L I M I T   5 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   ' % '   .   $ q   .   ' % ' ] ) ; 
 
                 $ o r d e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 f o r e a c h   ( $ o r d e r s   a s   & $ o )   { 
 
                         $ o [ ' n a m e ' ]   =   ' O r d e r   '   .   $ o [ ' n a m e ' ] ; 
 
                         $ o [ ' l i n k ' ]   =   ' i n d e x . p h p ? a c t i o n = o r d e r _ e d i t & i d = '   .   $ o [ ' i d ' ] ; 
 
                 } 
 
                 $ r e s u l t s   =   a r r a y _ m e r g e ( $ r e s u l t s ,   $ o r d e r s ) ; 
 
                 
 
                 e c h o   j s o n _ e n c o d e ( $ r e s u l t s ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   N O T I F I C A T I O N S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t N o t i f i c a t i o n s ( )   { 
 
                 $ n o t i f i c a t i o n s   =   $ t h i s - > n o t i f i c a t i o n M o d e l - > g e t A l l ( 1 0 ) ; 
 
                 $ u n r e a d _ c o u n t   =   $ t h i s - > n o t i f i c a t i o n M o d e l - > g e t U n r e a d C o u n t ( ) ; 
 
                 e c h o   j s o n _ e n c o d e ( [ ' n o t i f i c a t i o n s '   = >   $ n o t i f i c a t i o n s ,   ' u n r e a d '   = >   $ u n r e a d _ c o u n t ] ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   m a r k N o t i f i c a t i o n R e a d ( )   { 
 
                 $ i d   =   $ _ P O S T [ ' i d ' ]   ? ?   0 ; 
 
                 i f   ( $ i d )   { 
 
                         $ t h i s - > n o t i f i c a t i o n M o d e l - > m a r k A s R e a d ( $ i d ) ; 
 
                         e c h o   j s o n _ e n c o d e ( [ ' s u c c e s s '   = >   t r u e ] ) ; 
 
                 }   e l s e   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ' s u c c e s s '   = >   f a l s e ] ) ; 
 
                 } 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   m a r k A l l N o t i f i c a t i o n s R e a d ( )   { 
 
                 $ t h i s - > n o t i f i c a t i o n M o d e l - > m a r k A l l A s R e a d ( ) ; 
 
                 e c h o   j s o n _ e n c o d e ( [ ' s u c c e s s '   = >   t r u e ] ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S E A R C H   O R D E R S   ( A J A X ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   s e a r c h O r d e r s ( )   { 
 
                 $ s e a r c h   =   $ _ G E T [ ' s e a r c h ' ]   ? ?   ' ' ; 
 
                 i f   ( s t r l e n ( $ s e a r c h )   <   2 )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ o r d e r s   =   $ t h i s - > o r d e r M o d e l - > g e t A l l ( $ s e a r c h ) ; 
 
                 e c h o   j s o n _ e n c o d e ( $ o r d e r s ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A P I   E N D P O I N T S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a p i C u s t o m e r S e a r c h ( )   { 
 
                 $ t e r m   =   $ _ G E T [ ' t e r m ' ]   ? ?   ' ' ; 
 
                 i f   ( s t r l e n ( $ t e r m )   <   2 )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   i d ,   n a m e ,   p h o n e ,   c u s t o m e r _ n o   
 
                         F R O M   c u s t o m e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   ( n a m e   L I K E   ?   O R   p h o n e   L I K E   ?   O R   c u s t o m e r _ n o   L I K E   ? ) 
 
                         L I M I T   1 0 
 
                 " ) ; 
 
                 $ t e r m _ l i k e   =   ' % '   .   $ t e r m   .   ' % ' ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ t e r m _ l i k e ,   $ t e r m _ l i k e ,   $ t e r m _ l i k e ] ) ; 
 
                 e c h o   j s o n _ e n c o d e ( $ s t m t - > f e t c h A l l ( ) ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   a p i O r d e r S e a r c h ( )   { 
 
                 $ t e r m   =   $ _ G E T [ ' t e r m ' ]   ? ?   ' ' ; 
 
                 i f   ( s t r l e n ( $ t e r m )   <   2 )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                         e x i t ; 
 
                 } 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . i d ,   o . o r d e r _ n o ,   o . s t a t u s ,   c . n a m e   a s   c u s t o m e r _ n a m e 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   A N D   ( o . o r d e r _ n o   L I K E   ?   O R   c . n a m e   L I K E   ? ) 
 
                         L I M I T   1 0 
 
                 " ) ; 
 
                 $ t e r m _ l i k e   =   ' % '   .   $ t e r m   .   ' % ' ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ t e r m _ l i k e ,   $ t e r m _ l i k e ] ) ; 
 
                 e c h o   j s o n _ e n c o d e ( $ s t m t - > f e t c h A l l ( ) ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U T T I N G   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c u t t i n g _ r e p o r t ( )   { 
 
                 $ e m p l o y e e _ i d   =   $ _ G E T [ ' e m p l o y e e _ i d ' ]   ? ?   n u l l ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 
 
                 $ f i l t e r   =   $ _ G E T [ ' f i l t e r ' ]   ? ?   ' ' ; 
 
                 i f   ( $ f i l t e r   = =   ' t o d a y ' )   { 
 
                         $ f r o m _ d a t e   =   d a t e ( ' Y - m - d ' ) ; 
 
                         $ t o _ d a t e   =   d a t e ( ' Y - m - d ' ) ; 
 
                 }   e l s e i f   ( $ f i l t e r   = =   ' w e e k ' )   { 
 
                         $ f r o m _ d a t e   =   d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' - 7   d a y s ' ) ) ; 
 
                         $ t o _ d a t e   =   d a t e ( ' Y - m - d ' ) ; 
 
                 }   e l s e i f   ( $ f i l t e r   = =   ' m o n t h ' )   { 
 
                         $ f r o m _ d a t e   =   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                         $ t o _ d a t e   =   d a t e ( ' Y - m - d ' ) ; 
 
                 } 
 
                 
 
                 $ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y C a t e g o r y ( 1 ) ; 
 
                 
 
                 $ r e p o r t s   =   [ ] ; 
 
                 i f   ( $ e m p l o y e e _ i d )   { 
 
                         $ r e p o r t s   =   $ t h i s - > g e t C u t t i n g R e p o r t s ( $ e m p l o y e e _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 }   e l s e   { 
 
                         f o r e a c h   ( $ e m p l o y e e s   a s   $ e m p )   { 
 
                                 $ e m p _ r e p o r t s   =   $ t h i s - > g e t C u t t i n g R e p o r t s ( $ e m p [ ' i d ' ] ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                                 $ r e p o r t s   =   a r r a y _ m e r g e ( $ r e p o r t s ,   $ e m p _ r e p o r t s ) ; 
 
                         } 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / c u t t i n g / r e p o r t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   H E L P E R :   G E T   C U T T I N G   R E P O R T S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t C u t t i n g R e p o r t s ( $ e m p l o y e e _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e )   { 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 o s . i d   a s   s u i t _ i d , 
 
                                 o s . s u i t _ n u m b e r , 
 
                                 o s . s u i t _ t y p e , 
 
                                 o s . s i z e , 
 
                                 o s . s t a t u s , 
 
                                 o s . c u t t i n g _ c o m p l e t e d _ d a t e , 
 
                                 o s . p r i c e , 
 
                                 o . i d   a s   o r d e r _ i d , 
 
                                 o . o r d e r _ n o , 
 
                                 o . o r d e r _ d a t e , 
 
                                 c . i d   a s   c u s t o m e r _ i d , 
 
                                 c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                 e . i d   a s   e m p l o y e e _ i d , 
 
                                 e . n a m e   a s   e m p l o y e e _ n a m e , 
 
                                 e c . r a t e   a s   c u t t i n g _ r a t e , 
 
                                 e l . a m o u n t , 
 
                                 e l . t r a n s a c t i o n _ d a t e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   o s . c u t t i n g _ e m p l o y e e _ i d   =   e . i d 
 
                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d 
 
                         L E F T   J O I N   e m p l o y e e _ l e d g e r   e l   O N   e l . e m p l o y e e _ i d   =   e . i d   A N D   e l . o r d e r _ i d   =   o . i d 
 
                         W H E R E   o s . c u t t i n g _ e m p l o y e e _ i d   =   ?   
 
                         A N D   o s . c o m p a n y _ i d   =   ? 
 
                         A N D   ( o s . c u t t i n g _ c o m p l e t e d _ d a t e   B E T W E E N   ?   A N D   ?   O R   e l . t r a n s a c t i o n _ d a t e   B E T W E E N   ?   A N D   ? ) 
 
                         G R O U P   B Y   o s . i d 
 
                         O R D E R   B Y   o s . c u t t i n g _ c o m p l e t e d _ d a t e   D E S C ,   o s . i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ c o m p a n y _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ,   $ f r o m _ d a t e ,   $ t o _ d a t e ] ) ; 
 
                 $ r e s u l t s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 f o r e a c h   ( $ r e s u l t s   a s   & $ r o w )   { 
 
                         i f   ( e m p t y ( $ r o w [ ' a m o u n t ' ] ) )   { 
 
                                 $ s t m t 2   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                         S E L E C T   e c . r a t e ,   e c . r a t e s   
 
                                         F R O M   e m p l o y e e s   e 
 
                                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d 
 
                                         W H E R E   e . i d   =   ?   A N D   e . c o m p a n y _ i d   =   ? 
 
                                 " ) ; 
 
                                 $ s t m t 2 - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ c o m p a n y _ i d ] ) ; 
 
                                 $ c a t   =   $ s t m t 2 - > f e t c h ( ) ; 
 
                                 
 
                                 $ r a t e   =   0 ; 
 
                                 i f   ( $ c a t )   { 
 
                                         $ r a t e s   =   j s o n _ d e c o d e ( $ c a t [ ' r a t e s ' ] ,   t r u e ) ; 
 
                                         i f   ( $ r a t e s   & &   i s s e t ( $ r a t e s [ s t r t o l o w e r ( $ r o w [ ' s i z e ' ] ) ] ) )   { 
 
                                                 $ r a t e   =   $ r a t e s [ s t r t o l o w e r ( $ r o w [ ' s i z e ' ] ) ] ; 
 
                                         }   e l s e   { 
 
                                                 $ r a t e   =   $ c a t [ ' r a t e ' ]   ? ?   0 ; 
 
                                         } 
 
                                 } 
 
                                 $ r o w [ ' a m o u n t ' ]   =   $ r a t e ; 
 
                         } 
 
                 } 
 
                 
 
                 r e t u r n   $ r e s u l t s ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   R e p o r t s C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   R E P O R T S   D A S H B O A R D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ s u m m a r y   =   $ t h i s - > g e t S u m m a r y S t a t s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / r e p o r t s / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S A L E S   /   O R D E R S   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   s a l e s ( )   { 
 
                 $ r a n g e   =   $ _ G E T [ ' r a n g e ' ]   ? ?   ' t o d a y ' ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 l i s t ( $ f r o m ,   $ t o )   =   $ t h i s - > g e t D a t e R a n g e ( $ r a n g e ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ d a t a   =   $ t h i s - > g e t S a l e s D a t a ( $ f r o m ,   $ t o ) ; 
 
                 $ r e p o r t _ t i t l e   =   $ t h i s - > g e t R a n g e L a b e l ( $ r a n g e ,   $ f r o m ,   $ t o ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / r e p o r t s / s a l e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   R E V E N U E   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   r e v e n u e ( )   { 
 
                 $ r a n g e   =   $ _ G E T [ ' r a n g e ' ]   ? ?   ' t o d a y ' ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 l i s t ( $ f r o m ,   $ t o )   =   $ t h i s - > g e t D a t e R a n g e ( $ r a n g e ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ d a t a   =   $ t h i s - > g e t R e v e n u e D a t a ( $ f r o m ,   $ t o ) ; 
 
                 $ r e p o r t _ t i t l e   =   $ t h i s - > g e t R a n g e L a b e l ( $ r a n g e ,   $ f r o m ,   $ t o ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / r e p o r t s / r e v e n u e . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U S T O M E R   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c u s t o m e r s ( )   { 
 
                 $ r a n g e   =   $ _ G E T [ ' r a n g e ' ]   ? ?   ' t o d a y ' ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 l i s t ( $ f r o m ,   $ t o )   =   $ t h i s - > g e t D a t e R a n g e ( $ r a n g e ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ d a t a   =   $ t h i s - > g e t C u s t o m e r D a t a ( $ f r o m ,   $ t o ) ; 
 
                 $ r e p o r t _ t i t l e   =   $ t h i s - > g e t R a n g e L a b e l ( $ r a n g e ,   $ f r o m ,   $ t o ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / r e p o r t s / c u s t o m e r s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E M P L O Y E E   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e m p l o y e e s ( )   { 
 
                 $ r a n g e   =   $ _ G E T [ ' r a n g e ' ]   ? ?   ' t o d a y ' ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 l i s t ( $ f r o m ,   $ t o )   =   $ t h i s - > g e t D a t e R a n g e ( $ r a n g e ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ d a t a   =   $ t h i s - > g e t E m p l o y e e D a t a ( $ f r o m ,   $ t o ) ; 
 
                 $ r e p o r t _ t i t l e   =   $ t h i s - > g e t R a n g e L a b e l ( $ r a n g e ,   $ f r o m ,   $ t o ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / r e p o r t s / e m p l o y e e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S U I T S   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   s u i t s ( )   { 
 
                 $ r a n g e   =   $ _ G E T [ ' r a n g e ' ]   ? ?   ' t o d a y ' ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 l i s t ( $ f r o m ,   $ t o )   =   $ t h i s - > g e t D a t e R a n g e ( $ r a n g e ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ d a t a   =   $ t h i s - > g e t S u i t s D a t a ( $ f r o m ,   $ t o ) ; 
 
                 $ r e p o r t _ t i t l e   =   $ t h i s - > g e t R a n g e L a b e l ( $ r a n g e ,   $ f r o m ,   $ t o ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / r e p o r t s / s u i t s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C A S H   L E D G E R   R E P O R T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c a s h ( )   { 
 
                 $ r a n g e   =   $ _ G E T [ ' r a n g e ' ]   ? ?   ' t o d a y ' ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 l i s t ( $ f r o m ,   $ t o )   =   $ t h i s - > g e t D a t e R a n g e ( $ r a n g e ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 $ d a t a   =   $ t h i s - > g e t C a s h D a t a ( $ f r o m ,   $ t o ) ; 
 
                 $ r e p o r t _ t i t l e   =   $ t h i s - > g e t R a n g e L a b e l ( $ r a n g e ,   $ f r o m ,   $ t o ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / r e p o r t s / c a s h . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D A T A   F E T C H I N G   F U N C T I O N S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         
 
         p r i v a t e   f u n c t i o n   g e t S u m m a r y S t a t s ( )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s t a t s   =   [ ] ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' t o t a l _ o r d e r s ' ]   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   S U M ( n e t _ a m o u n t )   a s   r e v e n u e   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   ! =   ' c a n c e l l e d ' " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' t o t a l _ r e v e n u e ' ]   =   $ s t m t - > f e t c h ( ) [ ' r e v e n u e ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c u s t o m e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' t o t a l _ c u s t o m e r s ' ]   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   S U M ( t o t a l _ s u i t s )   a s   s u i t s   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' t o t a l _ s u i t s ' ]   =   $ s t m t - > f e t c h ( ) [ ' s u i t s ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   e m p l o y e e s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' a c t i v e ' " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' t o t a l _ e m p l o y e e s ' ]   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   S U M ( d e b i t )   -   S U M ( c r e d i t )   a s   b a l a n c e   F R O M   c a s h _ l e d g e r   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' c a s h _ b a l a n c e ' ]   =   $ s t m t - > f e t c h ( ) [ ' b a l a n c e ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   D A T E ( o r d e r _ d a t e )   =   C U R D A T E ( ) " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' t o d a y _ o r d e r s ' ]   =   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   S U M ( n e t _ a m o u n t )   a s   r e v e n u e   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   D A T E ( o r d e r _ d a t e )   =   C U R D A T E ( )   A N D   s t a t u s   ! =   ' c a n c e l l e d ' " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ s t a t s [ ' t o d a y _ r e v e n u e ' ]   =   $ s t m t - > f e t c h ( ) [ ' r e v e n u e ' ]   ? ?   0 ; 
 
                 
 
                 r e t u r n   $ s t a t s ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t S a l e s D a t a ( $ f r o m ,   $ t o )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 D A T E ( o r d e r _ d a t e )   a s   d a t e , 
 
                                 C O U N T ( * )   a s   t o t a l _ o r d e r s , 
 
                                 S U M ( t o t a l _ s u i t s )   a s   t o t a l _ s u i t s , 
 
                                 S U M ( n e t _ a m o u n t )   a s   t o t a l _ a m o u n t , 
 
                                 S U M ( p a i d _ a m o u n t )   a s   t o t a l _ p a i d , 
 
                                 S U M ( d u e _ a m o u n t )   a s   t o t a l _ d u e 
 
                         F R O M   o r d e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   ! =   ' c a n c e l l e d '   
 
                         A N D   D A T E ( o r d e r _ d a t e )   B E T W E E N   ?   A N D   ? 
 
                         G R O U P   B Y   D A T E ( o r d e r _ d a t e ) 
 
                         O R D E R   B Y   d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ f r o m ,   $ t o ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t R e v e n u e D a t a ( $ f r o m ,   $ t o )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 D A T E ( t r a n s a c t i o n _ d a t e )   a s   d a t e , 
 
                                 S U M ( d e b i t )   a s   t o t a l _ d e b i t , 
 
                                 S U M ( c r e d i t )   a s   t o t a l _ c r e d i t , 
 
                                 ( S U M ( d e b i t )   -   S U M ( c r e d i t ) )   a s   n e t _ c a s h 
 
                         F R O M   c a s h _ l e d g e r   
 
                         W H E R E   c o m p a n y _ i d   =   ?   
 
                         A N D   D A T E ( t r a n s a c t i o n _ d a t e )   B E T W E E N   ?   A N D   ? 
 
                         G R O U P   B Y   D A T E ( t r a n s a c t i o n _ d a t e ) 
 
                         O R D E R   B Y   d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ f r o m ,   $ t o ] ) ; 
 
                 $ d a t a   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 i f   ( e m p t y ( $ d a t a ) )   { 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         D A T E ( o r d e r _ d a t e )   a s   d a t e , 
 
                                         S U M ( n e t _ a m o u n t )   a s   t o t a l _ a m o u n t , 
 
                                         S U M ( p a i d _ a m o u n t )   a s   t o t a l _ p a i d , 
 
                                         S U M ( d u e _ a m o u n t )   a s   t o t a l _ d u e 
 
                                 F R O M   o r d e r s   
 
                                 W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   ! =   ' c a n c e l l e d '   
 
                                 A N D   D A T E ( o r d e r _ d a t e )   B E T W E E N   ?   A N D   ? 
 
                                 G R O U P   B Y   D A T E ( o r d e r _ d a t e ) 
 
                                 O R D E R   B Y   d a t e   A S C 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ f r o m ,   $ t o ] ) ; 
 
                         r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
                 } 
 
                 r e t u r n   $ d a t a ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t C u s t o m e r D a t a ( $ f r o m ,   $ t o )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 c . i d , 
 
                                 c . n a m e , 
 
                                 c . p h o n e , 
 
                                 c . c u s t o m e r _ n o , 
 
                                 C O U N T ( o . i d )   a s   o r d e r _ c o u n t , 
 
                                 S U M ( o . n e t _ a m o u n t )   a s   t o t a l _ s p e n t , 
 
                                 S U M ( o . p a i d _ a m o u n t )   a s   t o t a l _ p a i d , 
 
                                 S U M ( o . d u e _ a m o u n t )   a s   t o t a l _ d u e 
 
                         F R O M   c u s t o m e r s   c 
 
                         L E F T   J O I N   o r d e r s   o   O N   c . i d   =   o . c u s t o m e r _ i d   A N D   o . c o m p a n y _ i d   =   ?   
 
                                 A N D   D A T E ( o . o r d e r _ d a t e )   B E T W E E N   ?   A N D   ?   A N D   o . s t a t u s   ! =   ' c a n c e l l e d ' 
 
                         W H E R E   c . c o m p a n y _ i d   =   ? 
 
                         G R O U P   B Y   c . i d 
 
                         H A V I N G   o r d e r _ c o u n t   >   0   O R   t o t a l _ s p e n t   >   0 
 
                         O R D E R   B Y   t o t a l _ s p e n t   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ f r o m ,   $ t o ,   $ c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t E m p l o y e e D a t a ( $ f r o m ,   $ t o )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 e . i d , 
 
                                 e . n a m e , 
 
                                 e . e m p _ c o d e , 
 
                                 e c . n a m e   a s   c a t e g o r y _ n a m e , 
 
                                 ( S E L E C T   S U M ( a m o u n t )   F R O M   e m p l o y e e _ l e d g e r   W H E R E   e m p l o y e e _ i d   =   e . i d   A N D   t y p e   =   ' c r e d i t '   A N D   D A T E ( t r a n s a c t i o n _ d a t e )   B E T W E E N   ?   A N D   ? )   a s   t o t a l _ c r e d i t , 
 
                                 ( S E L E C T   S U M ( a m o u n t )   F R O M   e m p l o y e e _ l e d g e r   W H E R E   e m p l o y e e _ i d   =   e . i d   A N D   t y p e   =   ' d e b i t '   A N D   D A T E ( t r a n s a c t i o n _ d a t e )   B E T W E E N   ?   A N D   ? )   a s   t o t a l _ d e b i t , 
 
                                 ( S E L E C T   S U M ( a m o u n t )   F R O M   e m p l o y e e _ l e d g e r   W H E R E   e m p l o y e e _ i d   =   e . i d   A N D   t y p e   =   ' c r e d i t ' )   a s   t o t a l _ c r e d i t _ a l l , 
 
                                 ( S E L E C T   S U M ( a m o u n t )   F R O M   e m p l o y e e _ l e d g e r   W H E R E   e m p l o y e e _ i d   =   e . i d   A N D   t y p e   =   ' d e b i t ' )   a s   t o t a l _ d e b i t _ a l l 
 
                         F R O M   e m p l o y e e s   e 
 
                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d 
 
                         W H E R E   e . c o m p a n y _ i d   =   ?   A N D   e . s t a t u s   =   ' a c t i v e ' 
 
                         O R D E R   B Y   e . n a m e 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ f r o m ,   $ t o ,   $ f r o m ,   $ t o ,   $ c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t S u i t s D a t a ( $ f r o m ,   $ t o )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 D A T E ( o . o r d e r _ d a t e )   a s   d a t e , 
 
                                 o s . s u i t _ t y p e , 
 
                                 C O U N T ( o s . i d )   a s   s u i t _ c o u n t , 
 
                                 S U M ( o s . p r i c e )   a s   t o t a l _ p r i c e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d   A N D   o . c o m p a n y _ i d   =   ?   A N D   o . s t a t u s   ! =   ' c a n c e l l e d ' 
 
                         W H E R E   o s . c o m p a n y _ i d   =   ?   
 
                         A N D   D A T E ( o . o r d e r _ d a t e )   B E T W E E N   ?   A N D   ? 
 
                         G R O U P   B Y   D A T E ( o . o r d e r _ d a t e ) ,   o s . s u i t _ t y p e 
 
                         O R D E R   B Y   d a t e   A S C ,   s u i t _ t y p e 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ c o m p a n y _ i d ,   $ f r o m ,   $ t o ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t C a s h D a t a ( $ f r o m ,   $ t o )   { 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 D A T E ( t r a n s a c t i o n _ d a t e )   a s   d a t e , 
 
                                 S U M ( d e b i t )   a s   d e b i t , 
 
                                 S U M ( c r e d i t )   a s   c r e d i t , 
 
                                 ( S U M ( d e b i t )   -   S U M ( c r e d i t ) )   a s   n e t 
 
                         F R O M   c a s h _ l e d g e r   
 
                         W H E R E   c o m p a n y _ i d   =   ?   
 
                         A N D   D A T E ( t r a n s a c t i o n _ d a t e )   B E T W E E N   ?   A N D   ? 
 
                         G R O U P   B Y   D A T E ( t r a n s a c t i o n _ d a t e ) 
 
                         O R D E R   B Y   d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ f r o m ,   $ t o ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   H E L P E R   F U N C T I O N S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         
 
         p r i v a t e   f u n c t i o n   g e t D a t e R a n g e ( $ r a n g e ,   $ f r o m _ d a t e ,   $ t o _ d a t e )   { 
 
                 s w i t c h   ( $ r a n g e )   { 
 
                         c a s e   ' t o d a y ' :   r e t u r n   [ d a t e ( ' Y - m - d ' ) ,   d a t e ( ' Y - m - d ' ) ] ; 
 
                         c a s e   ' y e s t e r d a y ' :   r e t u r n   [ d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' - 1   d a y ' ) ) ,   d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' - 1   d a y ' ) ) ] ; 
 
                         c a s e   ' l a s t 7 ' :   r e t u r n   [ d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' - 6   d a y s ' ) ) ,   d a t e ( ' Y - m - d ' ) ] ; 
 
                         c a s e   ' m o n t h l y ' :   r e t u r n   [ d a t e ( ' Y - m - 0 1 ' ) ,   d a t e ( ' Y - m - d ' ) ] ; 
 
                         c a s e   ' d a t e _ t o _ d a t e ' :   r e t u r n   [ $ f r o m _ d a t e ,   $ t o _ d a t e ] ; 
 
                         d e f a u l t :   r e t u r n   [ d a t e ( ' Y - m - d ' ) ,   d a t e ( ' Y - m - d ' ) ] ; 
 
                 } 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t R a n g e L a b e l ( $ r a n g e ,   $ f r o m ,   $ t o )   { 
 
                 i f   ( $ r a n g e   = =   ' t o d a y ' )   r e t u r n   ' T o d a y \ ' s   R e p o r t ' ; 
 
                 i f   ( $ r a n g e   = =   ' y e s t e r d a y ' )   r e t u r n   ' Y e s t e r d a y \ ' s   R e p o r t ' ; 
 
                 i f   ( $ r a n g e   = =   ' l a s t 7 ' )   r e t u r n   ' L a s t   7   D a y s   R e p o r t ' ; 
 
                 i f   ( $ r a n g e   = =   ' m o n t h l y ' )   r e t u r n   ' T h i s   M o n t h   R e p o r t ' ; 
 
                 i f   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   r e t u r n   ' R e p o r t   f r o m   '   .   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m ) )   .   '   t o   '   .   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o ) ) ; 
 
                 r e t u r n   ' R e p o r t ' ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   S e t t i n g s C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S E T T I N G S   D A S H B O A R D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C O M P A N Y   S E T T I N G S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c o m p a n y ( )   { 
 
                 $ c o m p a n y   =   $ t h i s - > g e t C o m p a n y I n f o ( ) ; 
 
                 $ s e t t i n g s   =   $ t h i s - > g e t A l l S e t t i n g s ( ) ; 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ d a t a   =   [ 
 
                                 ' n a m e '   = >   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) , 
 
                                 ' p h o n e '   = >   t r i m ( $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' ) , 
 
                                 ' a d d r e s s '   = >   t r i m ( $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' ) , 
 
                         ] ; 
 
                         
 
                         i f   ( i s s e t ( $ _ F I L E S [ ' l o g o ' ] )   & &   $ _ F I L E S [ ' l o g o ' ] [ ' e r r o r ' ]   = =   0 )   { 
 
                                 $ u p l o a d _ d i r   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / ' ; 
 
                                 i f   ( ! i s _ d i r ( $ u p l o a d _ d i r ) )   m k d i r ( $ u p l o a d _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                                 $ e x t   =   p a t h i n f o ( $ _ F I L E S [ ' l o g o ' ] [ ' n a m e ' ] ,   P A T H I N F O _ E X T E N S I O N ) ; 
 
                                 $ f i l e n a m e   =   t i m e ( )   .   ' . '   .   $ e x t ; 
 
                                 m o v e _ u p l o a d e d _ f i l e ( $ _ F I L E S [ ' l o g o ' ] [ ' t m p _ n a m e ' ] ,   $ u p l o a d _ d i r   .   $ f i l e n a m e ) ; 
 
                                 $ d a t a [ ' l o g o ' ]   =   $ f i l e n a m e ; 
 
                         } 
 
                         
 
                         $ s q l   =   " U P D A T E   c o m p a n i e s   S E T   n a m e   =   ? ,   p h o n e   =   ? ,   a d d r e s s   =   ? " ; 
 
                         $ p a r a m s   =   [ $ d a t a [ ' n a m e ' ] ,   $ d a t a [ ' p h o n e ' ] ,   $ d a t a [ ' a d d r e s s ' ] ] ; 
 
                         i f   ( i s s e t ( $ d a t a [ ' l o g o ' ] ) )   { 
 
                                 $ s q l   . =   " ,   l o g o   =   ? " ; 
 
                                 $ p a r a m s [ ]   =   $ d a t a [ ' l o g o ' ] ; 
 
                         } 
 
                         $ s q l   . =   "   W H E R E   i d   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                         $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                         
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' c o m p a n y _ e m a i l ' ,   t r i m ( $ _ P O S T [ ' e m a i l ' ]   ? ?   ' ' ) ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' c o m p a n y _ w e b s i t e ' ,   t r i m ( $ _ P O S T [ ' w e b s i t e ' ]   ? ?   ' ' ) ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' c o m p a n y _ c n i c ' ,   t r i m ( $ _ P O S T [ ' c n i c ' ]   ? ?   ' ' ) ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' c o m p a n y _ n t n ' ,   t r i m ( $ _ P O S T [ ' n t n ' ]   ? ?   ' ' ) ) ; 
 
                         
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   s e t t i n g s   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = c o m p a n y _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / c o m p a n y . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S Y S T E M   S E T T I N G S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   s y s t e m ( )   { 
 
                 $ s e t t i n g s   =   $ t h i s - > g e t A l l S e t t i n g s ( ) ; 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' c u r r e n c y ' ,   $ _ P O S T [ ' c u r r e n c y ' ]   ? ?   ' R s . ' ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' l a n g u a g e ' ,   $ _ P O S T [ ' l a n g u a g e ' ]   ? ?   ' e n ' ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' t i m e z o n e ' ,   $ _ P O S T [ ' t i m e z o n e ' ]   ? ?   ' A s i a / K a r a c h i ' ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' d a t e _ f o r m a t ' ,   $ _ P O S T [ ' d a t e _ f o r m a t ' ]   ? ?   ' d - m - Y ' ) ; 
 
                         
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S y s t e m   s e t t i n g s   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s y s t e m _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / s y s t e m . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N V O I C E   S E T T I N G S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n v o i c e ( )   { 
 
                 $ s e t t i n g s   =   $ t h i s - > g e t A l l S e t t i n g s ( ) ; 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' i n v o i c e _ p r e f i x ' ,   t r i m ( $ _ P O S T [ ' i n v o i c e _ p r e f i x ' ]   ? ?   ' I N V - ' ) ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' r e c e i p t _ f o o t e r ' ,   t r i m ( $ _ P O S T [ ' r e c e i p t _ f o o t e r ' ]   ? ?   ' ' ) ) ; 
 
                         $ t h i s - > u p d a t e S e t t i n g ( ' i n v o i c e _ t e r m s ' ,   t r i m ( $ _ P O S T [ ' i n v o i c e _ t e r m s ' ]   ? ?   ' ' ) ) ; 
 
                         
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v o i c e   s e t t i n g s   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = i n v o i c e _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / i n v o i c e . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U S E R   M A N A G E M E N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u s e r s ( )   { 
 
                 $ u s e r s   =   $ t h i s - > g e t U s e r s ( ) ; 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ u s e r n a m e   =   t r i m ( $ _ P O S T [ ' u s e r n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p a s s w o r d   =   $ _ P O S T [ ' p a s s w o r d ' ]   ? ?   ' ' ; 
 
                         $ f u l l _ n a m e   =   t r i m ( $ _ P O S T [ ' f u l l _ n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ r o l e   =   $ _ P O S T [ ' r o l e ' ]   ? ?   ' w o r k e r ' ; 
 
                         
 
                         i f   ( e m p t y ( $ u s e r n a m e )   | |   e m p t y ( $ p a s s w o r d )   | |   e m p t y ( $ f u l l _ n a m e ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' A l l   f i e l d s   a r e   r e q u i r e d ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = u s e r _ m a n a g e m e n t ' ) ; 
 
                                 e x i t ; 
 
                         } 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   i d   F R O M   u s e r s   W H E R E   u s e r n a m e   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ u s e r n a m e ] ) ; 
 
                         i f   ( $ s t m t - > f e t c h ( ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' U s e r n a m e   a l r e a d y   e x i s t s ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = u s e r _ m a n a g e m e n t ' ) ; 
 
                                 e x i t ; 
 
                         } 
 
                         
 
                         $ h a s h e d _ p a s s w o r d   =   p a s s w o r d _ h a s h ( $ p a s s w o r d ,   P A S S W O R D _ D E F A U L T ) ; 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 I N S E R T   I N T O   u s e r s   ( u s e r n a m e ,   p a s s w o r d ,   f u l l _ n a m e ,   r o l e ,   c o m p a n y _ i d )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ) 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ u s e r n a m e ,   $ h a s h e d _ p a s s w o r d ,   $ f u l l _ n a m e ,   $ r o l e ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' U s e r   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = u s e r _ m a n a g e m e n t ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / u s e r s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e U s e r ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   u s e r s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' U s e r   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = u s e r _ m a n a g e m e n t ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   B A C K U P 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   b a c k u p ( )   { 
 
                 $ b a c k u p _ d i r   =   ' b a c k u p / ' ; 
 
                 i f   ( ! i s _ d i r ( $ b a c k u p _ d i r ) )   m k d i r ( $ b a c k u p _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                 
 
                 $ f i l e n a m e   =   ' b a c k u p _ '   .   d a t e ( ' Y - m - d _ H - i - s ' )   .   ' . s q l ' ; 
 
                 $ f i l e p a t h   =   $ b a c k u p _ d i r   .   $ f i l e n a m e ; 
 
                 
 
                 $ h o s t   =   D B _ H O S T ; 
 
                 $ u s e r   =   D B _ U S E R ; 
 
                 $ p a s s   =   D B _ P A S S ; 
 
                 $ d b n a m e   =   D B _ N A M E ; 
 
                 
 
                 $ c o m m a n d   =   " m y s q l d u m p   - - h o s t = $ h o s t   - - u s e r = $ u s e r   - - p a s s w o r d = $ p a s s   $ d b n a m e   >   $ f i l e p a t h   2 > & 1 " ; 
 
                 e x e c ( $ c o m m a n d ,   $ o u t p u t ,   $ r e t u r n _ v a r ) ; 
 
                 
 
                 i f   ( $ r e t u r n _ v a r   = = =   0   & &   f i l e _ e x i s t s ( $ f i l e p a t h ) )   { 
 
                         $ z i p   =   n e w   Z i p A r c h i v e ( ) ; 
 
                         $ z i p _ f i l e   =   $ b a c k u p _ d i r   .   ' b a c k u p _ '   .   d a t e ( ' Y - m - d _ H - i - s ' )   .   ' . z i p ' ; 
 
                         i f   ( $ z i p - > o p e n ( $ z i p _ f i l e ,   Z i p A r c h i v e : : C R E A T E )   = = =   T R U E )   { 
 
                                 $ z i p - > a d d F i l e ( $ f i l e p a t h ,   $ f i l e n a m e ) ; 
 
                                 $ z i p - > c l o s e ( ) ; 
 
                                 u n l i n k ( $ f i l e p a t h ) ; 
 
                                 
 
                                 h e a d e r ( ' C o n t e n t - T y p e :   a p p l i c a t i o n / z i p ' ) ; 
 
                                 h e a d e r ( ' C o n t e n t - D i s p o s i t i o n :   a t t a c h m e n t ;   f i l e n a m e = " '   .   b a s e n a m e ( $ z i p _ f i l e )   .   ' " ' ) ; 
 
                                 h e a d e r ( ' C o n t e n t - L e n g t h :   '   .   f i l e s i z e ( $ z i p _ f i l e ) ) ; 
 
                                 r e a d f i l e ( $ z i p _ f i l e ) ; 
 
                                 u n l i n k ( $ z i p _ f i l e ) ; 
 
                                 e x i t ; 
 
                         } 
 
                 } 
 
                 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' B a c k u p   f a i l e d !   P l e a s e   t r y   a g a i n . ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = b a c k u p _ s e t t i n g s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S H E L F   M A N A G E M E N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   s h e l v e s ( )   { 
 
                 $ s h e l f M o d e l   =   n e w   S h e l f ( ) ; 
 
                 $ s h e l v e s   =   $ s h e l f M o d e l - > g e t A l l ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / s h e l v e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   s h e l f _ a d d ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ s h e l f _ n a m e   =   t r i m ( $ _ P O S T [ ' s h e l f _ n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ s h e l f _ n u m b e r   =   t r i m ( $ _ P O S T [ ' s h e l f _ n u m b e r ' ]   ? ?   ' ' ) ; 
 
                         $ r a c k _ l o c a t i o n   =   t r i m ( $ _ P O S T [ ' r a c k _ l o c a t i o n ' ]   ? ?   ' ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a v a i l a b l e ' ; 
 
                         
 
                         i f   ( e m p t y ( $ s h e l f _ n a m e )   | |   e m p t y ( $ s h e l f _ n u m b e r ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S h e l f   n a m e   a n d   n u m b e r   a r e   r e q u i r e d ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ a d d ' ) ; 
 
                                 e x i t ; 
 
                         } 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 I N S E R T   I N T O   s h e l v e s   ( s h e l f _ n a m e ,   s h e l f _ n u m b e r ,   r a c k _ l o c a t i o n ,   s t a t u s ,   c o m p a n y _ i d )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ) 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ s h e l f _ n a m e ,   $ s h e l f _ n u m b e r ,   $ r a c k _ l o c a t i o n ,   $ s t a t u s ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S h e l f   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / s h e l f _ f o r m . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   s h e l f _ e d i t ( $ i d )   { 
 
                 $ s h e l f M o d e l   =   n e w   S h e l f ( ) ; 
 
                 $ s h e l f   =   $ s h e l f M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ s h e l f )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S h e l f   n o t   f o u n d ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ s h e l f _ n a m e   =   t r i m ( $ _ P O S T [ ' s h e l f _ n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ s h e l f _ n u m b e r   =   t r i m ( $ _ P O S T [ ' s h e l f _ n u m b e r ' ]   ? ?   ' ' ) ; 
 
                         $ r a c k _ l o c a t i o n   =   t r i m ( $ _ P O S T [ ' r a c k _ l o c a t i o n ' ]   ? ?   ' ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a v a i l a b l e ' ; 
 
                         
 
                         i f   ( e m p t y ( $ s h e l f _ n a m e )   | |   e m p t y ( $ s h e l f _ n u m b e r ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S h e l f   n a m e   a n d   n u m b e r   a r e   r e q u i r e d ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ e d i t & i d = '   .   $ i d ) ; 
 
                                 e x i t ; 
 
                         } 
 
                         
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 U P D A T E   s h e l v e s   S E T   
 
                                         s h e l f _ n a m e   =   ? ,   s h e l f _ n u m b e r   =   ? ,   r a c k _ l o c a t i o n   =   ? ,   s t a t u s   =   ? 
 
                                 W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ s h e l f _ n a m e ,   $ s h e l f _ n u m b e r ,   $ r a c k _ l o c a t i o n ,   $ s t a t u s ,   $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S h e l f   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s e t t i n g s / s h e l f _ f o r m . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   s h e l f _ d e l e t e ( $ i d )   { 
 
                 $ s h e l f M o d e l   =   n e w   S h e l f ( ) ; 
 
                 $ s h e l f   =   $ s h e l f M o d e l - > g e t B y I d ( $ i d ) ; 
 
                 i f   ( ! $ s h e l f )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S h e l f   n o t   f o u n d ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i f   ( $ s h e l f [ ' s t a t u s ' ]   = =   ' o c c u p i e d ' )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C a n n o t   d e l e t e   o c c u p i e d   s h e l f ! ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   s h e l v e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S h e l f   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   H E L P E R   F U N C T I O N S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t C o m p a n y I n f o ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t A l l S e t t i n g s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   s e t t i n g s   W H E R E   c o m p a n y _ i d   =   ?   O R   c o m p a n y _ i d   I S   N U L L " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ s e t t i n g s   =   [ ] ; 
 
                 w h i l e   ( $ r o w   =   $ s t m t - > f e t c h ( ) )   { 
 
                         $ s e t t i n g s [ $ r o w [ ' s e t t i n g _ k e y ' ] ]   =   $ r o w [ ' s e t t i n g _ v a l u e ' ] ; 
 
                 } 
 
                 r e t u r n   $ s e t t i n g s ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   u p d a t e S e t t i n g ( $ k e y ,   $ v a l u e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         I N S E R T   I N T O   s e t t i n g s   ( s e t t i n g _ k e y ,   s e t t i n g _ v a l u e ,   c o m p a n y _ i d )   
 
                         V A L U E S   ( ? ,   ? ,   ? )   
 
                         O N   D U P L I C A T E   K E Y   U P D A T E   s e t t i n g _ v a l u e   =   V A L U E S ( s e t t i n g _ v a l u e ) 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ k e y ,   $ v a l u e ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t U s e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   i d ,   u s e r n a m e ,   f u l l _ n a m e ,   r o l e ,   s t a t u s ,   c r e a t e d _ a t   
 
                         F R O M   u s e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   O R   c o m p a n y _ i d   I S   N U L L 
 
                         O R D E R   B Y   c r e a t e d _ a t   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 c l a s s   S t i t c h i n g C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ o r d e r M o d e l ; 
 
         p r i v a t e   $ o r d e r S u i t M o d e l ; 
 
         p r i v a t e   $ e m p l o y e e M o d e l ; 
 
         p r i v a t e   $ c u s t o m e r M o d e l ; 
 
         p r i v a t e   $ s h e l f M o d e l ; 
 
         p r i v a t e   $ s t i t c h i n g M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > o r d e r M o d e l   =   n e w   O r d e r ( ) ; 
 
                 $ t h i s - > o r d e r S u i t M o d e l   =   n e w   O r d e r S u i t ( ) ; 
 
                 $ t h i s - > e m p l o y e e M o d e l   =   n e w   E m p l o y e e ( ) ; 
 
                 $ t h i s - > c u s t o m e r M o d e l   =   n e w   C u s t o m e r ( ) ; 
 
                 $ t h i s - > s h e l f M o d e l   =   n e w   S h e l f ( ) ; 
 
                 $ t h i s - > s t i t c h i n g M o d e l   =   n e w   S t i t c h i n g ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   I N D E X   = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ s t i t c h i n g _ r e c o r d s   =   $ t h i s - > s t i t c h i n g M o d e l - > g e t A l l ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s t i t c h i n g / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   P E N D I N G   ( C u t t i n g   d o n e ,   w a i t i n g   f o r   s t i t c h i n g )   = = = = = 
 
         p u b l i c   f u n c t i o n   p e n d i n g ( )   { 
 
                 $ p e n d i n g _ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t P e n d i n g S t i t c h i n g ( ) ; 
 
                 $ s t i t c h i n g _ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t S t i t c h i n g E m p l o y e e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s t i t c h i n g / s u i t _ p e n d i n g . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   A S S I G N   = = = = = 
 
         p u b l i c   f u n c t i o n   a s s i g n ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   ! = =   ' P O S T ' )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ p e n d i n g ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ s u i t _ i d   =   $ _ P O S T [ ' s u i t _ i d ' ]   ? ?   0 ; 
 
                 $ e m p l o y e e _ i d   =   $ _ P O S T [ ' e m p l o y e e _ i d ' ]   ? ?   0 ; 
 
                 $ s t i t c h i n g _ d a t e   =   $ _ P O S T [ ' s t i t c h i n g _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                 $ n o t e s   =   $ _ P O S T [ ' n o t e s ' ]   ? ?   n u l l ; 
 
 
 
                 i f   ( ! $ s u i t _ i d   | |   ! $ e m p l o y e e _ i d )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   d a t a . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ p e n d i n g ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ r e s u l t   =   $ t h i s - > o r d e r S u i t M o d e l - > a s s i g n S t i t c h i n g ( $ s u i t _ i d ,   $ e m p l o y e e _ i d ) ; 
 
 
 
                 i f   ( $ r e s u l t )   { 
 
                         / /   R e c o r d   i n   s t i t c h i n g   t a b l e 
 
                         $ s u i t   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y I d ( $ s u i t _ i d ) ; 
 
                         i f   ( $ s u i t )   { 
 
                                 $ d a t a   =   [ 
 
                                         ' o r d e r _ i d '   = >   $ s u i t [ ' o r d e r _ i d ' ] , 
 
                                         ' a s s i g n e d _ t o '   = >   $ e m p l o y e e _ i d , 
 
                                         ' s t i t c h i n g _ d a t e '   = >   $ s t i t c h i n g _ d a t e , 
 
                                         ' s t a t u s '   = >   ' p e n d i n g ' , 
 
                                         ' n o t e s '   = >   $ n o t e s 
 
                                 ] ; 
 
                                 $ t h i s - > s t i t c h i n g M o d e l - > i n s e r t ( $ d a t a ) ; 
 
                         } 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S u i t   a s s i g n e d   t o   s t i t c h i n g   s u c c e s s f u l l y ! ' ; 
 
                 }   e l s e   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' F a i l e d   t o   a s s i g n   s u i t . ' ; 
 
                 } 
 
 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ p e n d i n g ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = =   A S S I G N E D   = = = = = 
 
         p u b l i c   f u n c t i o n   a s s i g n e d ( )   { 
 
                 $ a s s i g n e d _ s u i t s   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t A s s i g n e d S t i t c h i n g ( ) ; 
 
                 $ s t i t c h i n g _ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t S t i t c h i n g E m p l o y e e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s t i t c h i n g / s u i t _ a s s i g n e d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   C O M P L E T E   F O R M   ( S h e l f   s e l e c t i o n )   = = = = = 
 
         p u b l i c   f u n c t i o n   c o m p l e t e F o r m ( )   { 
 
                 $ s u i t _ i d   =   $ _ G E T [ ' s u i t _ i d ' ]   ? ?   0 ; 
 
                 i f   ( ! $ s u i t _ i d )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   s u i t . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ s u i t   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y I d ( $ s u i t _ i d ) ; 
 
                 i f   ( ! $ s u i t   | |   $ s u i t [ ' s t a t u s ' ]   ! =   ' s t i t c h i n g ' )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S u i t   n o t   f o u n d   o r   n o t   i n   s t i t c h i n g   s t a t u s . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ o r d e r   =   $ t h i s - > o r d e r M o d e l - > g e t B y I d ( $ s u i t [ ' o r d e r _ i d ' ] ) ; 
 
                 $ c u s t o m e r   =   $ t h i s - > c u s t o m e r M o d e l - > g e t B y I d ( $ o r d e r [ ' c u s t o m e r _ i d ' ]   ? ?   0 ) ; 
 
                 $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ s u i t [ ' s t i t c h i n g _ e m p l o y e e _ i d ' ] ) ; 
 
                 $ a v a i l a b l e _ s h e l v e s   =   $ t h i s - > s h e l f M o d e l - > g e t A v a i l a b l e ( ) ; 
 
 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s t i t c h i n g / c o m p l e t e _ f o r m . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   C O M P L E T E   = = = = = 
 
         p u b l i c   f u n c t i o n   c o m p l e t e ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   ! = =   ' P O S T ' )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ s u i t _ i d   =   $ _ P O S T [ ' s u i t _ i d ' ]   ? ?   0 ; 
 
                 $ s h e l f _ i d   =   $ _ P O S T [ ' s h e l f _ i d ' ]   ? ?   0 ; 
 
                 $ n o t e s   =   $ _ P O S T [ ' n o t e s ' ]   ? ?   n u l l ; 
 
 
 
                 i f   ( ! $ s u i t _ i d )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' I n v a l i d   s u i t . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ s u i t   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y I d ( $ s u i t _ i d ) ; 
 
                 i f   ( ! $ s u i t )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S u i t   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         / /   1 .   C o m p l e t e   s t i t c h i n g   ( s t a t u s   - >   ' r e a d y ' ) 
 
                         $ r e s u l t   =   $ t h i s - > o r d e r S u i t M o d e l - > c o m p l e t e S t i t c h i n g ( $ s u i t _ i d ) ; 
 
                         i f   ( ! $ r e s u l t )   t h r o w   n e w   E x c e p t i o n ( ' F a i l e d   t o   c o m p l e t e   s t i t c h i n g . ' ) ; 
 
 
 
                         / /   2 .   A d d   p a y m e n t 
 
                         i f   ( $ s u i t [ ' s t i t c h i n g _ e m p l o y e e _ i d ' ] )   { 
 
                                 $ t h i s - > a d d S t i t c h i n g P a y m e n t ( $ s u i t _ i d ) ; 
 
                         } 
 
 
 
                         / /   3 .   A s s i g n   s h e l f   i f   s e l e c t e d 
 
                         i f   ( $ s h e l f _ i d   >   0 )   { 
 
                                 $ s h e l f   =   $ t h i s - > s h e l f M o d e l - > g e t B y I d ( $ s h e l f _ i d ) ; 
 
                                 i f   ( ! $ s h e l f )   t h r o w   n e w   E x c e p t i o n ( ' S h e l f   n o t   f o u n d . ' ) ; 
 
                                 i f   ( $ s h e l f [ ' s t a t u s ' ]   ! =   ' a v a i l a b l e ' )   t h r o w   n e w   E x c e p t i o n ( ' S h e l f   n o t   a v a i l a b l e . ' ) ; 
 
                                 $ a s s i g n _ r e s u l t   =   $ t h i s - > s h e l f M o d e l - > a s s i g n S h e l f T o O r d e r ( $ s u i t [ ' o r d e r _ i d ' ] ,   $ s h e l f _ i d ) ; 
 
                                 i f   ( ! $ a s s i g n _ r e s u l t )   t h r o w   n e w   E x c e p t i o n ( ' F a i l e d   t o   a s s i g n   s h e l f . ' ) ; 
 
                                 $ m s g _ s u f f i x   =   '   S h e l f   a s s i g n e d . ' ; 
 
                         }   e l s e   { 
 
                                 $ m s g _ s u f f i x   =   '   ( N o   s h e l f ) ' ; 
 
                         } 
 
 
 
                         / /   4 .   U p d a t e   s t i t c h i n g   t a b l e   s t a t u s 
 
                         $ s t i t c h   =   $ t h i s - > s t i t c h i n g M o d e l - > g e t B y O r d e r I d ( $ s u i t [ ' o r d e r _ i d ' ] ) ; 
 
                         i f   ( $ s t i t c h )   { 
 
                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   s t i t c h i n g   S E T   s t a t u s   =   ' c o m p l e t e d '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                                 $ s t m t - > e x e c u t e ( [ $ s t i t c h [ ' i d ' ] ,   A u t h : : g e t C o m p a n y I d ( ) ] ) ; 
 
                         } 
 
 
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   '  S&   S t i t c h i n g   c o m p l e t e d ! '   .   $ m s g _ s u f f i x ; 
 
 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   '   R  E r r o r :   '   .   $ e - > g e t M e s s a g e ( ) ; 
 
                 } 
 
 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = =   H E L P E R :   A d d   S t i t c h i n g   P a y m e n t   = = = = = 
 
         p r i v a t e   f u n c t i o n   a d d S t i t c h i n g P a y m e n t ( $ s u i t _ i d )   { 
 
                 $ s u i t   =   $ t h i s - > o r d e r S u i t M o d e l - > g e t B y I d ( $ s u i t _ i d ) ; 
 
                 i f   ( ! $ s u i t   | |   ! $ s u i t [ ' s t i t c h i n g _ e m p l o y e e _ i d ' ] )   r e t u r n ; 
 
 
 
                 $ e m p l o y e e   =   $ t h i s - > e m p l o y e e M o d e l - > g e t B y I d ( $ s u i t [ ' s t i t c h i n g _ e m p l o y e e _ i d ' ] ) ; 
 
                 i f   ( ! $ e m p l o y e e )   r e t u r n ; 
 
 
 
                 $ c a t e g o r y   =   $ t h i s - > e m p l o y e e M o d e l - > g e t C a t e g o r y B y I d ( $ e m p l o y e e [ ' c a t e g o r y _ i d ' ] ) ; 
 
                 $ r a t e   =   0 ; 
 
                 i f   ( $ c a t e g o r y )   { 
 
                         i f   ( $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' )   { 
 
                                 $ r a t e s   =   j s o n _ d e c o d e ( $ c a t e g o r y [ ' r a t e s ' ] ,   t r u e ) ; 
 
                                 i f   ( $ r a t e s   & &   i s s e t ( $ r a t e s [ s t r t o l o w e r ( $ s u i t [ ' s i z e ' ] ) ] ) )   { 
 
                                         $ r a t e   =   $ r a t e s [ s t r t o l o w e r ( $ s u i t [ ' s i z e ' ] ) ] ; 
 
                                 }   e l s e   { 
 
                                         $ r a t e   =   $ c a t e g o r y [ ' r a t e ' ]   ? ?   0 ; 
 
                                 } 
 
                         }   e l s e i f   ( $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r c e n t a g e ' )   { 
 
                                 $ r a t e   =   ( $ s u i t [ ' p r i c e ' ]   *   ( $ c a t e g o r y [ ' r a t e ' ]   ? ?   0 ) )   /   1 0 0 ; 
 
                         }   e l s e   { 
 
                                 $ r a t e   =   $ c a t e g o r y [ ' r a t e ' ]   ? ?   0 ; 
 
                         } 
 
                 } 
 
 
 
                 i f   ( $ r a t e   >   0 )   { 
 
                         $ t h i s - > e m p l o y e e M o d e l - > a d d T r a n s a c t i o n ( [ 
 
                                 ' e m p l o y e e _ i d '   = >   $ s u i t [ ' s t i t c h i n g _ e m p l o y e e _ i d ' ] , 
 
                                 ' o r d e r _ i d '   = >   $ s u i t [ ' o r d e r _ i d ' ] , 
 
                                 ' t y p e '   = >   ' c r e d i t ' , 
 
                                 ' a m o u n t '   = >   $ r a t e , 
 
                                 ' d e s c r i p t i o n '   = >   ' S t i t c h i n g   p a y m e n t   f o r   S u i t   # '   .   $ s u i t [ ' s u i t _ n u m b e r ' ]   .   '   ( '   .   $ s u i t [ ' s i z e ' ]   .   ' ) ' , 
 
                                 ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                         ] ) ; 
 
                 } 
 
         } 
 
 
 
         / /   = = = = =   R E P O R T   = = = = = 
 
         p u b l i c   f u n c t i o n   r e p o r t ( )   { 
 
                 $ e m p l o y e e _ i d   =   $ _ G E T [ ' e m p l o y e e _ i d ' ]   ? ?   n u l l ; 
 
                 $ f r o m _ d a t e   =   $ _ G E T [ ' f r o m _ d a t e ' ]   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
                 $ t o _ d a t e   =   $ _ G E T [ ' t o _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 
 
                 $ e m p l o y e e s   =   $ t h i s - > e m p l o y e e M o d e l - > g e t S t i t c h i n g E m p l o y e e s ( ) ; 
 
                 $ r e p o r t s   =   [ ] ; 
 
                 i f   ( $ e m p l o y e e _ i d )   { 
 
                         $ r e p o r t s   =   $ t h i s - > s t i t c h i n g M o d e l - > g e t E m p l o y e e S t i t c h i n g R e p o r t ( $ e m p l o y e e _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ) ; 
 
                 } 
 
 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s t i t c h i n g / r e p o r t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   S L I P   = = = = = 
 
         p u b l i c   f u n c t i o n   s l i p ( )   { 
 
                 $ o r d e r _ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
                 i f   ( ! $ o r d e r _ i d )   d i e ( ' O r d e r   I D   r e q u i r e d . ' ) ; 
 
                 $ s l i p _ d a t a   =   $ t h i s - > s t i t c h i n g M o d e l - > g e t S t i t c h i n g S l i p D a t a ( $ o r d e r _ i d ) ; 
 
                 i f   ( ! $ s l i p _ d a t a )   d i e ( ' O r d e r   n o t   f o u n d   o r   n o t   a s s i g n e d   f o r   s t i t c h i n g . ' ) ; 
 
 
 
                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                 $ c o m p a n y   =   $ s t m t - > f e t c h ( ) ; 
 
                 i f   ( ! $ c o m p a n y )   $ c o m p a n y   =   [ ' n a m e '   = >   ' B i z T e c h   T a i l o r ' ,   ' a d d r e s s '   = >   ' ' ,   ' p h o n e '   = >   ' ' ] ; 
 
 
 
                 i n c l u d e   ' a p p / v i e w s / s t i t c h i n g / s l i p . p h p ' ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = =   D E L E T E   = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ t h i s - > s t i t c h i n g M o d e l - > d e l e t e ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' S t i t c h i n g   r e c o r d   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s t i t c h i n g ' ) ; 
 
                 e x i t ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   S u p e r A d m i n C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y M o d e l ; 
 
         p r i v a t e   $ u s e r M o d e l ; 
 
         p r i v a t e   $ p a c k a g e M o d e l ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y M o d e l   =   n e w   C o m p a n y ( ) ; 
 
                 $ t h i s - > u s e r M o d e l   =   n e w   U s e r ( ) ; 
 
                 
 
                 / /   S u p e r   A d m i n   c h e c k 
 
                 i f   ( ! A u t h : : i s S u p e r A d m i n ( ) )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d a s h b o a r d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D A S H B O A R D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 / /   G e t   a l l   c o m p a n i e s 
 
                 $ c o m p a n i e s   =   $ t h i s - > g e t A l l C o m p a n i e s ( ) ; 
 
                 
 
                 / /   G e t   p a c k a g e s 
 
                 $ p a c k a g e s   =   $ t h i s - > g e t A l l P a c k a g e s ( ) ; 
 
                 
 
                 / /   G e t   s t a t i s t i c s 
 
                 $ s t a t s   =   $ t h i s - > g e t D a s h b o a r d S t a t s ( ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / d a s h b o a r d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C O M P A N I E S   L I S T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c o m p a n i e s ( )   { 
 
                 $ c o m p a n i e s   =   $ t h i s - > g e t A l l C o m p a n i e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / c o m p a n i e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A D D   C O M P A N Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a d d C o m p a n y ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ n a m e   =   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p h o n e   =   t r i m ( $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' ) ; 
 
                         $ a d d r e s s   =   t r i m ( $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' ; 
 
                         $ s t a r t _ d a t e   =   $ _ P O S T [ ' s t a r t _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                         $ e x p i r y _ d a t e   =   $ _ P O S T [ ' e x p i r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' + 1   y e a r ' ) ) ; 
 
                         $ p a c k a g e _ i d   =   $ _ P O S T [ ' p a c k a g e _ i d ' ]   ? ?   0 ; 
 
                         
 
                         i f   ( e m p t y ( $ n a m e ) )   { 
 
                                 $ e r r o r   =   ' C o m p a n y   n a m e   i s   r e q u i r e d . ' ; 
 
                         }   e l s e   { 
 
                                 / /   H a n d l e   l o g o   u p l o a d 
 
                                 $ l o g o   =   ' d e f a u l t _ l o g o . p n g ' ; 
 
                                 i f   ( i s s e t ( $ _ F I L E S [ ' l o g o ' ] )   & &   $ _ F I L E S [ ' l o g o ' ] [ ' e r r o r ' ]   = =   0 )   { 
 
                                         $ u p l o a d _ d i r   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / ' ; 
 
                                         i f   ( ! i s _ d i r ( $ u p l o a d _ d i r ) )   m k d i r ( $ u p l o a d _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                                         $ e x t   =   p a t h i n f o ( $ _ F I L E S [ ' l o g o ' ] [ ' n a m e ' ] ,   P A T H I N F O _ E X T E N S I O N ) ; 
 
                                         $ f i l e n a m e   =   t i m e ( )   .   ' _ '   .   r a n d ( 1 0 0 0 ,   9 9 9 9 )   .   ' . '   .   $ e x t ; 
 
                                         i f   ( m o v e _ u p l o a d e d _ f i l e ( $ _ F I L E S [ ' l o g o ' ] [ ' t m p _ n a m e ' ] ,   $ u p l o a d _ d i r   .   $ f i l e n a m e ) )   { 
 
                                                 $ l o g o   =   $ f i l e n a m e ; 
 
                                         } 
 
                                 } 
 
                                 
 
                                 $ d a t a   =   [ 
 
                                         ' n a m e '   = >   $ n a m e , 
 
                                         ' p h o n e '   = >   $ p h o n e , 
 
                                         ' a d d r e s s '   = >   $ a d d r e s s , 
 
                                         ' l o g o '   = >   $ l o g o , 
 
                                         ' s t a t u s '   = >   $ s t a t u s , 
 
                                         ' s t a r t _ d a t e '   = >   $ s t a r t _ d a t e , 
 
                                         ' e x p i r y _ d a t e '   = >   $ e x p i r y _ d a t e , 
 
                                         ' p a c k a g e _ i d '   = >   $ p a c k a g e _ i d 
 
                                 ] ; 
 
                                 
 
                                 i f   ( $ t h i s - > i n s e r t C o m p a n y ( $ d a t a ) )   { 
 
                                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s ' ) ; 
 
                                         e x i t ; 
 
                                 }   e l s e   { 
 
                                         $ e r r o r   =   ' F a i l e d   t o   a d d   c o m p a n y . ' ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 $ p a c k a g e s   =   $ t h i s - > g e t A l l P a c k a g e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / c o m p a n y _ a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   E D I T   C O M P A N Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   e d i t C o m p a n y ( $ i d )   { 
 
                 $ c o m p a n y   =   $ t h i s - > g e t C o m p a n y B y I d ( $ i d ) ; 
 
                 i f   ( ! $ c o m p a n y )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ n a m e   =   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p h o n e   =   t r i m ( $ _ P O S T [ ' p h o n e ' ]   ? ?   ' ' ) ; 
 
                         $ a d d r e s s   =   t r i m ( $ _ P O S T [ ' a d d r e s s ' ]   ? ?   ' ' ) ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' ; 
 
                         $ s t a r t _ d a t e   =   $ _ P O S T [ ' s t a r t _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
                         $ e x p i r y _ d a t e   =   $ _ P O S T [ ' e x p i r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' + 1   y e a r ' ) ) ; 
 
                         $ p a c k a g e _ i d   =   $ _ P O S T [ ' p a c k a g e _ i d ' ]   ? ?   0 ; 
 
                         
 
                         i f   ( e m p t y ( $ n a m e ) )   { 
 
                                 $ e r r o r   =   ' C o m p a n y   n a m e   i s   r e q u i r e d . ' ; 
 
                         }   e l s e   { 
 
                                 $ l o g o   =   $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ; 
 
                                 i f   ( i s s e t ( $ _ F I L E S [ ' l o g o ' ] )   & &   $ _ F I L E S [ ' l o g o ' ] [ ' e r r o r ' ]   = =   0 )   { 
 
                                         $ u p l o a d _ d i r   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / ' ; 
 
                                         i f   ( ! i s _ d i r ( $ u p l o a d _ d i r ) )   m k d i r ( $ u p l o a d _ d i r ,   0 7 7 7 ,   t r u e ) ; 
 
                                         $ e x t   =   p a t h i n f o ( $ _ F I L E S [ ' l o g o ' ] [ ' n a m e ' ] ,   P A T H I N F O _ E X T E N S I O N ) ; 
 
                                         $ f i l e n a m e   =   t i m e ( )   .   ' _ '   .   r a n d ( 1 0 0 0 ,   9 9 9 9 )   .   ' . '   .   $ e x t ; 
 
                                         i f   ( m o v e _ u p l o a d e d _ f i l e ( $ _ F I L E S [ ' l o g o ' ] [ ' t m p _ n a m e ' ] ,   $ u p l o a d _ d i r   .   $ f i l e n a m e ) )   { 
 
                                                 i f   ( $ l o g o   ! =   ' d e f a u l t _ l o g o . p n g '   & &   f i l e _ e x i s t s ( $ u p l o a d _ d i r   .   $ l o g o ) )   { 
 
                                                         u n l i n k ( $ u p l o a d _ d i r   .   $ l o g o ) ; 
 
                                                 } 
 
                                                 $ l o g o   =   $ f i l e n a m e ; 
 
                                         } 
 
                                 } 
 
                                 
 
                                 $ d a t a   =   [ 
 
                                         ' n a m e '   = >   $ n a m e , 
 
                                         ' p h o n e '   = >   $ p h o n e , 
 
                                         ' a d d r e s s '   = >   $ a d d r e s s , 
 
                                         ' l o g o '   = >   $ l o g o , 
 
                                         ' s t a t u s '   = >   $ s t a t u s , 
 
                                         ' s t a r t _ d a t e '   = >   $ s t a r t _ d a t e , 
 
                                         ' e x p i r y _ d a t e '   = >   $ e x p i r y _ d a t e , 
 
                                         ' p a c k a g e _ i d '   = >   $ p a c k a g e _ i d 
 
                                 ] ; 
 
                                 
 
                                 i f   ( $ t h i s - > u p d a t e C o m p a n y ( $ i d ,   $ d a t a ) )   { 
 
                                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s ' ) ; 
 
                                         e x i t ; 
 
                                 }   e l s e   { 
 
                                         $ e r r o r   =   ' F a i l e d   t o   u p d a t e   c o m p a n y . ' ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 $ p a c k a g e s   =   $ t h i s - > g e t A l l P a c k a g e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / c o m p a n y _ e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   C O M P A N Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e C o m p a n y ( $ i d )   { 
 
                 $ c o m p a n y   =   $ t h i s - > g e t C o m p a n y B y I d ( $ i d ) ; 
 
                 i f   ( $ c o m p a n y   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                         $ f i l e   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   $ c o m p a n y [ ' l o g o ' ] ; 
 
                         i f   ( f i l e _ e x i s t s ( $ f i l e ) )   u n l i n k ( $ f i l e ) ; 
 
                 } 
 
                 $ t h i s - > d e l e t e C o m p a n y B y I d ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' C o m p a n y   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   T O G G L E   C O M P A N Y   S T A T U S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   t o g g l e S t a t u s ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ i d   =   $ _ P O S T [ ' i d ' ]   ? ?   0 ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' ; 
 
                         
 
                         i f   ( $ i d )   { 
 
                                 $ t h i s - > u p d a t e C o m p a n y S t a t u s ( $ i d ,   $ s t a t u s ) ; 
 
                                 e c h o   j s o n _ e n c o d e ( [ ' s u c c e s s '   = >   t r u e ] ) ; 
 
                         }   e l s e   { 
 
                                 e c h o   j s o n _ e n c o d e ( [ ' s u c c e s s '   = >   f a l s e ] ) ; 
 
                         } 
 
                 } 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   P A C K A G E   M A N A G E M E N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   p a c k a g e s ( )   { 
 
                 $ p a c k a g e s   =   $ t h i s - > g e t A l l P a c k a g e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / p a c k a g e s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   a d d P a c k a g e ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ d a t a   =   [ 
 
                                 ' n a m e '   = >   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) , 
 
                                 ' d e s c r i p t i o n '   = >   t r i m ( $ _ P O S T [ ' d e s c r i p t i o n ' ]   ? ?   ' ' ) , 
 
                                 ' p r i c e '   = >   f l o a t v a l ( $ _ P O S T [ ' p r i c e ' ]   ? ?   0 ) , 
 
                                 ' d u r a t i o n _ m o n t h s '   = >   i n t v a l ( $ _ P O S T [ ' d u r a t i o n _ m o n t h s ' ]   ? ?   1 2 ) , 
 
                                 ' m a x _ u s e r s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ u s e r s ' ]   ? ?   5 ) , 
 
                                 ' m a x _ c u s t o m e r s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ c u s t o m e r s ' ]   ? ?   1 0 0 ) , 
 
                                 ' m a x _ o r d e r s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ o r d e r s ' ]   ? ?   5 0 0 ) , 
 
                                 ' m a x _ e m p l o y e e s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ e m p l o y e e s ' ]   ? ?   2 0 ) , 
 
                                 ' f e a t u r e s '   = >   j s o n _ e n c o d e ( $ _ P O S T [ ' f e a t u r e s ' ]   ? ?   [ ] ) , 
 
                                 ' s t a t u s '   = >   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' 
 
                         ] ; 
 
                         
 
                         i f   ( $ t h i s - > i n s e r t P a c k a g e ( $ d a t a ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' P a c k a g e   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s ' ) ; 
 
                                 e x i t ; 
 
                         }   e l s e   { 
 
                                 $ e r r o r   =   ' F a i l e d   t o   a d d   p a c k a g e . ' ; 
 
                         } 
 
                 } 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / p a c k a g e _ a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   e d i t P a c k a g e ( $ i d )   { 
 
                 $ p a c k a g e   =   $ t h i s - > g e t P a c k a g e B y I d ( $ i d ) ; 
 
                 i f   ( ! $ p a c k a g e )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' P a c k a g e   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ d a t a   =   [ 
 
                                 ' n a m e '   = >   t r i m ( $ _ P O S T [ ' n a m e ' ]   ? ?   ' ' ) , 
 
                                 ' d e s c r i p t i o n '   = >   t r i m ( $ _ P O S T [ ' d e s c r i p t i o n ' ]   ? ?   ' ' ) , 
 
                                 ' p r i c e '   = >   f l o a t v a l ( $ _ P O S T [ ' p r i c e ' ]   ? ?   0 ) , 
 
                                 ' d u r a t i o n _ m o n t h s '   = >   i n t v a l ( $ _ P O S T [ ' d u r a t i o n _ m o n t h s ' ]   ? ?   1 2 ) , 
 
                                 ' m a x _ u s e r s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ u s e r s ' ]   ? ?   5 ) , 
 
                                 ' m a x _ c u s t o m e r s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ c u s t o m e r s ' ]   ? ?   1 0 0 ) , 
 
                                 ' m a x _ o r d e r s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ o r d e r s ' ]   ? ?   5 0 0 ) , 
 
                                 ' m a x _ e m p l o y e e s '   = >   i n t v a l ( $ _ P O S T [ ' m a x _ e m p l o y e e s ' ]   ? ?   2 0 ) , 
 
                                 ' f e a t u r e s '   = >   j s o n _ e n c o d e ( $ _ P O S T [ ' f e a t u r e s ' ]   ? ?   [ ] ) , 
 
                                 ' s t a t u s '   = >   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' 
 
                         ] ; 
 
                         
 
                         i f   ( $ t h i s - > u p d a t e P a c k a g e ( $ i d ,   $ d a t a ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' P a c k a g e   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s ' ) ; 
 
                                 e x i t ; 
 
                         }   e l s e   { 
 
                                 $ e r r o r   =   ' F a i l e d   t o   u p d a t e   p a c k a g e . ' ; 
 
                         } 
 
                 } 
 
                 
 
                 $ p a c k a g e [ ' f e a t u r e s ' ]   =   j s o n _ d e c o d e ( $ p a c k a g e [ ' f e a t u r e s ' ] ,   t r u e )   ? :   [ ] ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / p a c k a g e _ e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e P a c k a g e ( $ i d )   { 
 
                 $ t h i s - > d e l e t e P a c k a g e B y I d ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' P a c k a g e   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U S E R S   M A N A G E M E N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u s e r s ( )   { 
 
                 $ c o m p a n y _ i d   =   $ _ G E T [ ' c o m p a n y _ i d ' ]   ? ?   n u l l ; 
 
                 $ u s e r s   =   $ t h i s - > g e t A l l U s e r s ( $ c o m p a n y _ i d ) ; 
 
                 $ c o m p a n i e s   =   $ t h i s - > g e t A l l C o m p a n i e s ( ) ; 
 
                 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / u s e r s . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   a d d U s e r ( )   { 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ u s e r n a m e   =   t r i m ( $ _ P O S T [ ' u s e r n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ p a s s w o r d   =   $ _ P O S T [ ' p a s s w o r d ' ]   ? ?   ' ' ; 
 
                         $ f u l l _ n a m e   =   t r i m ( $ _ P O S T [ ' f u l l _ n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ r o l e   =   $ _ P O S T [ ' r o l e ' ]   ? ?   ' a d m i n ' ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' ; 
 
                         $ c o m p a n y _ i d   =   $ _ P O S T [ ' c o m p a n y _ i d ' ]   ? ?   0 ; 
 
                         
 
                         i f   ( e m p t y ( $ u s e r n a m e )   | |   e m p t y ( $ p a s s w o r d )   | |   e m p t y ( $ f u l l _ n a m e ) )   { 
 
                                 $ e r r o r   =   ' A l l   f i e l d s   a r e   r e q u i r e d . ' ; 
 
                         }   e l s e   { 
 
                                 $ d a t a   =   [ 
 
                                         ' u s e r n a m e '   = >   $ u s e r n a m e , 
 
                                         ' p a s s w o r d '   = >   p a s s w o r d _ h a s h ( $ p a s s w o r d ,   P A S S W O R D _ D E F A U L T ) , 
 
                                         ' f u l l _ n a m e '   = >   $ f u l l _ n a m e , 
 
                                         ' r o l e '   = >   $ r o l e , 
 
                                         ' s t a t u s '   = >   $ s t a t u s , 
 
                                         ' c o m p a n y _ i d '   = >   $ c o m p a n y _ i d 
 
                                 ] ; 
 
                                 
 
                                 i f   ( $ t h i s - > i n s e r t U s e r ( $ d a t a ) )   { 
 
                                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' U s e r   a d d e d   s u c c e s s f u l l y ! ' ; 
 
                                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s ' ) ; 
 
                                         e x i t ; 
 
                                 }   e l s e   { 
 
                                         $ e r r o r   =   ' F a i l e d   t o   a d d   u s e r . ' ; 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 $ c o m p a n i e s   =   $ t h i s - > g e t A l l C o m p a n i e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / u s e r _ a d d . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   e d i t U s e r ( $ i d )   { 
 
                 $ u s e r   =   $ t h i s - > g e t U s e r B y I d ( $ i d ) ; 
 
                 i f   ( ! $ u s e r )   { 
 
                         $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' U s e r   n o t   f o u n d . ' ; 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s ' ) ; 
 
                         e x i t ; 
 
                 } 
 
                 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T ' )   { 
 
                         $ f u l l _ n a m e   =   t r i m ( $ _ P O S T [ ' f u l l _ n a m e ' ]   ? ?   ' ' ) ; 
 
                         $ r o l e   =   $ _ P O S T [ ' r o l e ' ]   ? ?   ' a d m i n ' ; 
 
                         $ s t a t u s   =   $ _ P O S T [ ' s t a t u s ' ]   ? ?   ' a c t i v e ' ; 
 
                         $ c o m p a n y _ i d   =   $ _ P O S T [ ' c o m p a n y _ i d ' ]   ? ?   0 ; 
 
                         
 
                         $ d a t a   =   [ 
 
                                 ' f u l l _ n a m e '   = >   $ f u l l _ n a m e , 
 
                                 ' r o l e '   = >   $ r o l e , 
 
                                 ' s t a t u s '   = >   $ s t a t u s , 
 
                                 ' c o m p a n y _ i d '   = >   $ c o m p a n y _ i d 
 
                         ] ; 
 
                         
 
                         i f   ( ! e m p t y ( $ _ P O S T [ ' p a s s w o r d ' ] ) )   { 
 
                                 $ d a t a [ ' p a s s w o r d ' ]   =   p a s s w o r d _ h a s h ( $ _ P O S T [ ' p a s s w o r d ' ] ,   P A S S W O R D _ D E F A U L T ) ; 
 
                         } 
 
                         
 
                         i f   ( $ t h i s - > u p d a t e U s e r ( $ i d ,   $ d a t a ) )   { 
 
                                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' U s e r   u p d a t e d   s u c c e s s f u l l y ! ' ; 
 
                                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s ' ) ; 
 
                                 e x i t ; 
 
                         }   e l s e   { 
 
                                 $ e r r o r   =   ' F a i l e d   t o   u p d a t e   u s e r . ' ; 
 
                         } 
 
                 } 
 
                 
 
                 $ c o m p a n i e s   =   $ t h i s - > g e t A l l C o m p a n i e s ( ) ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / s u p e r a d m i n / u s e r _ e d i t . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e U s e r ( $ i d )   { 
 
                 $ t h i s - > d e l e t e U s e r B y I d ( $ i d ) ; 
 
                 $ _ S E S S I O N [ ' m e s s a g e ' ]   =   ' U s e r   d e l e t e d   s u c c e s s f u l l y ! ' ; 
 
                 h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D A T A B A S E   M E T H O D S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         
 
         p r i v a t e   f u n c t i o n   g e t A l l C o m p a n i e s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   c . * ,   p . n a m e   a s   p a c k a g e _ n a m e ,   p . p r i c e   a s   p a c k a g e _ p r i c e , 
 
                                       ( S E L E C T   C O U N T ( * )   F R O M   u s e r s   W H E R E   c o m p a n y _ i d   =   c . i d )   a s   u s e r _ c o u n t , 
 
                                       ( S E L E C T   C O U N T ( * )   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   c . i d )   a s   o r d e r _ c o u n t 
 
                         F R O M   c o m p a n i e s   c 
 
                         L E F T   J O I N   p a c k a g e s   p   O N   c . p a c k a g e _ i d   =   p . i d 
 
                         O R D E R   B Y   c . i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t C o m p a n y B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   i n s e r t C o m p a n y ( $ d a t a )   { 
 
                 $ s q l   =   " I N S E R T   I N T O   c o m p a n i e s   ( n a m e ,   p h o n e ,   a d d r e s s ,   l o g o ,   s t a t u s ,   s t a r t _ d a t e ,   e x p i r y _ d a t e ,   p a c k a g e _ i d )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ] , 
 
                         $ d a t a [ ' a d d r e s s ' ] , 
 
                         $ d a t a [ ' l o g o ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' s t a r t _ d a t e ' ] , 
 
                         $ d a t a [ ' e x p i r y _ d a t e ' ] , 
 
                         $ d a t a [ ' p a c k a g e _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   u p d a t e C o m p a n y ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   c o m p a n i e s   S E T   
 
                                         n a m e   =   ? ,   p h o n e   =   ? ,   a d d r e s s   =   ? ,   l o g o   =   ? ,   
 
                                         s t a t u s   =   ? ,   s t a r t _ d a t e   =   ? ,   e x p i r y _ d a t e   =   ? ,   p a c k a g e _ i d   =   ? 
 
                                 W H E R E   i d   =   ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ] , 
 
                         $ d a t a [ ' a d d r e s s ' ] , 
 
                         $ d a t a [ ' l o g o ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' s t a r t _ d a t e ' ] , 
 
                         $ d a t a [ ' e x p i r y _ d a t e ' ] , 
 
                         $ d a t a [ ' p a c k a g e _ i d ' ] , 
 
                         $ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   u p d a t e C o m p a n y S t a t u s ( $ i d ,   $ s t a t u s )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   c o m p a n i e s   S E T   s t a t u s   =   ?   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ s t a t u s ,   $ i d ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   d e l e t e C o m p a n y B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t A l l P a c k a g e s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   p a c k a g e s   O R D E R   B Y   p r i c e   A S C " ) ; 
 
                 $ s t m t - > e x e c u t e ( ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t P a c k a g e B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   p a c k a g e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   i n s e r t P a c k a g e ( $ d a t a )   { 
 
                 $ s q l   =   " I N S E R T   I N T O   p a c k a g e s   ( n a m e ,   d e s c r i p t i o n ,   p r i c e ,   d u r a t i o n _ m o n t h s ,   m a x _ u s e r s ,   m a x _ c u s t o m e r s ,   m a x _ o r d e r s ,   m a x _ e m p l o y e e s ,   f e a t u r e s ,   s t a t u s )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ] , 
 
                         $ d a t a [ ' p r i c e ' ] , 
 
                         $ d a t a [ ' d u r a t i o n _ m o n t h s ' ] , 
 
                         $ d a t a [ ' m a x _ u s e r s ' ] , 
 
                         $ d a t a [ ' m a x _ c u s t o m e r s ' ] , 
 
                         $ d a t a [ ' m a x _ o r d e r s ' ] , 
 
                         $ d a t a [ ' m a x _ e m p l o y e e s ' ] , 
 
                         $ d a t a [ ' f e a t u r e s ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   u p d a t e P a c k a g e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   p a c k a g e s   S E T   
 
                                         n a m e   =   ? ,   d e s c r i p t i o n   =   ? ,   p r i c e   =   ? ,   d u r a t i o n _ m o n t h s   =   ? ,   
 
                                         m a x _ u s e r s   =   ? ,   m a x _ c u s t o m e r s   =   ? ,   m a x _ o r d e r s   =   ? ,   m a x _ e m p l o y e e s   =   ? ,   
 
                                         f e a t u r e s   =   ? ,   s t a t u s   =   ? 
 
                                 W H E R E   i d   =   ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ] , 
 
                         $ d a t a [ ' p r i c e ' ] , 
 
                         $ d a t a [ ' d u r a t i o n _ m o n t h s ' ] , 
 
                         $ d a t a [ ' m a x _ u s e r s ' ] , 
 
                         $ d a t a [ ' m a x _ c u s t o m e r s ' ] , 
 
                         $ d a t a [ ' m a x _ o r d e r s ' ] , 
 
                         $ d a t a [ ' m a x _ e m p l o y e e s ' ] , 
 
                         $ d a t a [ ' f e a t u r e s ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   d e l e t e P a c k a g e B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   p a c k a g e s   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t A l l U s e r s ( $ c o m p a n y _ i d   =   n u l l )   { 
 
                 $ s q l   =   " S E L E C T   u . * ,   c . n a m e   a s   c o m p a n y _ n a m e   
 
                                 F R O M   u s e r s   u 
 
                                 L E F T   J O I N   c o m p a n i e s   c   O N   u . c o m p a n y _ i d   =   c . i d " ; 
 
                 $ p a r a m s   =   [ ] ; 
 
                 i f   ( $ c o m p a n y _ i d )   { 
 
                         $ s q l   . =   "   W H E R E   u . c o m p a n y _ i d   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ c o m p a n y _ i d ; 
 
                 } 
 
                 $ s q l   . =   "   O R D E R   B Y   u . i d   D E S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t U s e r B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   u s e r s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   i n s e r t U s e r ( $ d a t a )   { 
 
                 $ s q l   =   " I N S E R T   I N T O   u s e r s   ( u s e r n a m e ,   p a s s w o r d ,   f u l l _ n a m e ,   r o l e ,   s t a t u s ,   c o m p a n y _ i d )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' u s e r n a m e ' ] , 
 
                         $ d a t a [ ' p a s s w o r d ' ] , 
 
                         $ d a t a [ ' f u l l _ n a m e ' ] , 
 
                         $ d a t a [ ' r o l e ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   u p d a t e U s e r ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   u s e r s   S E T   f u l l _ n a m e   =   ? ,   r o l e   =   ? ,   s t a t u s   =   ? ,   c o m p a n y _ i d   =   ? " ; 
 
                 $ p a r a m s   =   [ $ d a t a [ ' f u l l _ n a m e ' ] ,   $ d a t a [ ' r o l e ' ] ,   $ d a t a [ ' s t a t u s ' ] ,   $ d a t a [ ' c o m p a n y _ i d ' ] ] ; 
 
                 i f   ( i s s e t ( $ d a t a [ ' p a s s w o r d ' ] ) )   { 
 
                         $ s q l   . =   " ,   p a s s w o r d   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ d a t a [ ' p a s s w o r d ' ] ; 
 
                 } 
 
                 $ s q l   . =   "   W H E R E   i d   =   ? " ; 
 
                 $ p a r a m s [ ]   =   $ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   d e l e t e U s e r B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   u s e r s   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
         } 
 
 
 
         p r i v a t e   f u n c t i o n   g e t D a s h b o a r d S t a t s ( )   { 
 
                 $ s t a t s   =   [ ] ; 
 
                 $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   t o t a l   F R O M   c o m p a n i e s " ) ; 
 
                 $ s t a t s [ ' t o t a l _ c o m p a n i e s ' ]   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   t o t a l   F R O M   u s e r s " ) ; 
 
                 $ s t a t s [ ' t o t a l _ u s e r s ' ]   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   t o t a l   F R O M   o r d e r s " ) ; 
 
                 $ s t a t s [ ' t o t a l _ o r d e r s ' ]   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   t o t a l   F R O M   p a c k a g e s " ) ; 
 
                 $ s t a t s [ ' t o t a l _ p a c k a g e s ' ]   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
                 
 
                 r e t u r n   $ s t a t s ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   T r a c k C o n t r o l l e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   M A I N   P A G E   = = = = = 
 
         p u b l i c   f u n c t i o n   i n d e x ( )   { 
 
                 $ o r d e r s   =   [ ] ; 
 
                 $ s e a r c h _ t e r m   =   ' ' ; 
 
                 $ s h o w _ r e s u l t s   =   f a l s e ; 
 
 
 
                 i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T '   | |   i s s e t ( $ _ G E T [ ' s e a r c h ' ] ) )   { 
 
                         $ s e a r c h _ t e r m   =   t r i m ( $ _ P O S T [ ' s e a r c h ' ]   ? ?   $ _ G E T [ ' s e a r c h ' ]   ? ?   ' ' ) ; 
 
                         i f   ( ! e m p t y ( $ s e a r c h _ t e r m ) )   { 
 
                                 $ o r d e r s   =   $ t h i s - > s e a r c h O r d e r s ( $ s e a r c h _ t e r m ) ; 
 
                                 $ s h o w _ r e s u l t s   =   t r u e ; 
 
                         } 
 
                 }   e l s e   { 
 
                         $ o r d e r s   =   $ t h i s - > g e t R e c e n t O r d e r s ( ) ; 
 
                         $ s h o w _ r e s u l t s   =   t r u e ; 
 
                 } 
 
 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / h e a d e r . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / t r a c k / i n d e x . p h p ' ; 
 
                 i n c l u d e   ' a p p / v i e w s / l a y o u t / f o o t e r . p h p ' ; 
 
         } 
 
 
 
         / /   = = = = =   R E C E N T   O R D E R S   ( 5 0 )   -   S U I T   L E V E L   = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t R e c e n t O r d e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 o s . i d   a s   s u i t _ i d , 
 
                                 o s . s u i t _ n u m b e r , 
 
                                 o s . s u i t _ t y p e , 
 
                                 o s . s i z e , 
 
                                 o s . s t a t u s   a s   s u i t _ s t a t u s , 
 
                                 o . i d   a s   o r d e r _ i d , 
 
                                 o . o r d e r _ n o , 
 
                                 o . o r d e r _ d a t e , 
 
                                 o . d e l i v e r y _ d a t e , 
 
                                 o . t o t a l _ a m o u n t , 
 
                                 o . t o t a l _ s u i t s , 
 
                                 o . s t a t u s   a s   o r d e r _ s t a t u s , 
 
                                 c . i d   a s   c u s t o m e r _ i d , 
 
                                 c . n a m e   a s   c u s t o m e r _ n a m e ,   
 
                                 c . p h o n e   a s   c u s t o m e r _ p h o n e ,   
 
                                 c . p r o f i l e _ p i c , 
 
                                 s . i d   a s   s h e l f _ i d , 
 
                                 s . s h e l f _ n a m e , 
 
                                 s . s h e l f _ n u m b e r , 
 
                                 s . r a c k _ l o c a t i o n , 
 
                                 c u t . i d   a s   c u t t i n g _ i d , 
 
                                 c u t . a s s i g n e d _ d a t e   a s   c u t t i n g _ d a t e , 
 
                                 c u t . s t a t u s   a s   c u t t i n g _ s t a t u s , 
 
                                 c u t _ e m p . n a m e   a s   c u t t e r _ n a m e , 
 
                                 s t . i d   a s   s t i t c h i n g _ i d , 
 
                                 s t . s t i t c h i n g _ d a t e , 
 
                                 s t . s t a t u s   a s   s t i t c h i n g _ s t a t u s , 
 
                                 s t i t c h _ e m p . n a m e   a s   t a i l o r _ n a m e , 
 
                                 d . i d   a s   d e l i v e r y _ i d , 
 
                                 d . d e l i v e r y _ d a t e , 
 
                                 d . r e c e i v e d _ b y , 
 
                                 d . n o t e s   a s   d e l i v e r y _ n o t e s 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         L E F T   J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   s h e l v e s   s   O N   o . i d   =   s . o r d e r _ i d 
 
                         L E F T   J O I N   c u t t i n g   c u t   O N   o s . i d   =   c u t . s u i t _ i d   A N D   c u t . s t a t u s   =   ' a s s i g n e d ' 
 
                         L E F T   J O I N   e m p l o y e e s   c u t _ e m p   O N   c u t . e m p l o y e e _ i d   =   c u t _ e m p . i d 
 
                         L E F T   J O I N   s t i t c h i n g   s t   O N   o s . i d   =   s t . s u i t _ i d   A N D   s t . s t a t u s   =   ' i n _ p r o g r e s s ' 
 
                         L E F T   J O I N   e m p l o y e e s   s t i t c h _ e m p   O N   s t . a s s i g n e d _ t o   =   s t i t c h _ e m p . i d 
 
                         L E F T   J O I N   d e l i v e r y   d   O N   o . i d   =   d . o r d e r _ i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o . i d   D E S C ,   o s . s u i t _ n u m b e r   A S C 
 
                         L I M I T   5 0 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   S E A R C H   O R D E R S   -   S U I T   L E V E L   = = = = = 
 
         p r i v a t e   f u n c t i o n   s e a r c h O r d e r s ( $ t e r m )   { 
 
                 / /                 R         R             R         &                &              &    &      &  R             R      
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   i d   F R O M   o r d e r s   W H E R E   o r d e r _ n o   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t e r m ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ e x a c t _ o r d e r   =   $ s t m t - > f e t c h ( ) ; 
 
 
 
                 i f   ( $ e x a c t _ o r d e r )   { 
 
                         / /            &    &                  &                              R                                     R  
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   
 
                                         o s . i d   a s   s u i t _ i d , 
 
                                         o s . s u i t _ n u m b e r , 
 
                                         o s . s u i t _ t y p e , 
 
                                         o s . s i z e , 
 
                                         o s . s t a t u s   a s   s u i t _ s t a t u s , 
 
                                         o . i d   a s   o r d e r _ i d , 
 
                                         o . o r d e r _ n o , 
 
                                         o . o r d e r _ d a t e , 
 
                                         o . d e l i v e r y _ d a t e , 
 
                                         o . t o t a l _ a m o u n t , 
 
                                         o . t o t a l _ s u i t s , 
 
                                         o . s t a t u s   a s   o r d e r _ s t a t u s , 
 
                                         c . i d   a s   c u s t o m e r _ i d , 
 
                                         c . n a m e   a s   c u s t o m e r _ n a m e ,   
 
                                         c . p h o n e   a s   c u s t o m e r _ p h o n e ,   
 
                                         c . p r o f i l e _ p i c , 
 
                                         s . i d   a s   s h e l f _ i d , 
 
                                         s . s h e l f _ n a m e , 
 
                                         s . s h e l f _ n u m b e r , 
 
                                         s . r a c k _ l o c a t i o n , 
 
                                         c u t . i d   a s   c u t t i n g _ i d , 
 
                                         c u t . a s s i g n e d _ d a t e   a s   c u t t i n g _ d a t e , 
 
                                         c u t . s t a t u s   a s   c u t t i n g _ s t a t u s , 
 
                                         c u t _ e m p . n a m e   a s   c u t t e r _ n a m e , 
 
                                         s t . i d   a s   s t i t c h i n g _ i d , 
 
                                         s t . s t i t c h i n g _ d a t e , 
 
                                         s t . s t a t u s   a s   s t i t c h i n g _ s t a t u s , 
 
                                         s t i t c h _ e m p . n a m e   a s   t a i l o r _ n a m e , 
 
                                         d . i d   a s   d e l i v e r y _ i d , 
 
                                         d . d e l i v e r y _ d a t e , 
 
                                         d . r e c e i v e d _ b y , 
 
                                         d . n o t e s   a s   d e l i v e r y _ n o t e s 
 
                                 F R O M   o r d e r _ s u i t s   o s 
 
                                 L E F T   J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                                 L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                                 L E F T   J O I N   s h e l v e s   s   O N   o . i d   =   s . o r d e r _ i d 
 
                                 L E F T   J O I N   c u t t i n g   c u t   O N   o s . i d   =   c u t . s u i t _ i d   A N D   c u t . s t a t u s   =   ' a s s i g n e d ' 
 
                                 L E F T   J O I N   e m p l o y e e s   c u t _ e m p   O N   c u t . e m p l o y e e _ i d   =   c u t _ e m p . i d 
 
                                 L E F T   J O I N   s t i t c h i n g   s t   O N   o s . i d   =   s t . s u i t _ i d   A N D   s t . s t a t u s   =   ' i n _ p r o g r e s s ' 
 
                                 L E F T   J O I N   e m p l o y e e s   s t i t c h _ e m p   O N   s t . a s s i g n e d _ t o   =   s t i t c h _ e m p . i d 
 
                                 L E F T   J O I N   d e l i v e r y   d   O N   o . i d   =   d . o r d e r _ i d 
 
                                 W H E R E   o . i d   =   ?   A N D   o . c o m p a n y _ i d   =   ? 
 
                                 O R D E R   B Y   o s . s u i t _ n u m b e r   A S C 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ e x a c t _ o r d e r [ ' i d ' ] ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
                 } 
 
 
 
                 / /                  &            (        &                 &    R                ) 
 
                 $ t e r m   =   ' % '   .   $ t e r m   .   ' % ' ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 o s . i d   a s   s u i t _ i d , 
 
                                 o s . s u i t _ n u m b e r , 
 
                                 o s . s u i t _ t y p e , 
 
                                 o s . s i z e , 
 
                                 o s . s t a t u s   a s   s u i t _ s t a t u s , 
 
                                 o . i d   a s   o r d e r _ i d , 
 
                                 o . o r d e r _ n o , 
 
                                 o . o r d e r _ d a t e , 
 
                                 o . d e l i v e r y _ d a t e , 
 
                                 o . t o t a l _ a m o u n t , 
 
                                 o . t o t a l _ s u i t s , 
 
                                 o . s t a t u s   a s   o r d e r _ s t a t u s , 
 
                                 c . i d   a s   c u s t o m e r _ i d , 
 
                                 c . n a m e   a s   c u s t o m e r _ n a m e ,   
 
                                 c . p h o n e   a s   c u s t o m e r _ p h o n e ,   
 
                                 c . p r o f i l e _ p i c , 
 
                                 s . i d   a s   s h e l f _ i d , 
 
                                 s . s h e l f _ n a m e , 
 
                                 s . s h e l f _ n u m b e r , 
 
                                 s . r a c k _ l o c a t i o n , 
 
                                 c u t . i d   a s   c u t t i n g _ i d , 
 
                                 c u t . a s s i g n e d _ d a t e   a s   c u t t i n g _ d a t e , 
 
                                 c u t . s t a t u s   a s   c u t t i n g _ s t a t u s , 
 
                                 c u t _ e m p . n a m e   a s   c u t t e r _ n a m e , 
 
                                 s t . i d   a s   s t i t c h i n g _ i d , 
 
                                 s t . s t i t c h i n g _ d a t e , 
 
                                 s t . s t a t u s   a s   s t i t c h i n g _ s t a t u s , 
 
                                 s t i t c h _ e m p . n a m e   a s   t a i l o r _ n a m e , 
 
                                 d . i d   a s   d e l i v e r y _ i d , 
 
                                 d . d e l i v e r y _ d a t e , 
 
                                 d . r e c e i v e d _ b y , 
 
                                 d . n o t e s   a s   d e l i v e r y _ n o t e s 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         L E F T   J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   s h e l v e s   s   O N   o . i d   =   s . o r d e r _ i d 
 
                         L E F T   J O I N   c u t t i n g   c u t   O N   o s . i d   =   c u t . s u i t _ i d   A N D   c u t . s t a t u s   =   ' a s s i g n e d ' 
 
                         L E F T   J O I N   e m p l o y e e s   c u t _ e m p   O N   c u t . e m p l o y e e _ i d   =   c u t _ e m p . i d 
 
                         L E F T   J O I N   s t i t c h i n g   s t   O N   o s . i d   =   s t . s u i t _ i d   A N D   s t . s t a t u s   =   ' i n _ p r o g r e s s ' 
 
                         L E F T   J O I N   e m p l o y e e s   s t i t c h _ e m p   O N   s t . a s s i g n e d _ t o   =   s t i t c h _ e m p . i d 
 
                         L E F T   J O I N   d e l i v e r y   d   O N   o . i d   =   d . o r d e r _ i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   
 
                         A N D   ( c . n a m e   L I K E   ?   O R   c . p h o n e   L I K E   ?   O R   o . o r d e r _ n o   L I K E   ? ) 
 
                         O R D E R   B Y   o . i d   D E S C ,   o s . s u i t _ n u m b e r   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ,   $ t e r m ,   $ t e r m ,   $ t e r m ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   S T A T U S   B A D G E   C L A S S   = = = = = 
 
         p r i v a t e   f u n c t i o n   g e t S t a t u s B a d g e C l a s s ( $ s t a t u s )   { 
 
                 s w i t c h   ( $ s t a t u s )   { 
 
                         c a s e   ' p e n d i n g ' :       r e t u r n   ' w a r n i n g ' ; 
 
                         c a s e   ' c u t t i n g ' :       r e t u r n   ' i n f o ' ; 
 
                         c a s e   ' s t i t c h i n g ' :   r e t u r n   ' p r i m a r y ' ; 
 
                         c a s e   ' r e a d y ' :           r e t u r n   ' s u c c e s s ' ; 
 
                         c a s e   ' d e l i v e r e d ' :   r e t u r n   ' s e c o n d a r y ' ; 
 
                         c a s e   ' c a n c e l l e d ' :   r e t u r n   ' d a n g e r ' ; 
 
                         d e f a u l t :                     r e t u r n   ' s e c o n d a r y ' ; 
 
                 } 
 
         } 
 
 
 
         / /   = = = = =   L I V E   S E A R C H   A J A X   = = = = = 
 
         p u b l i c   f u n c t i o n   l i v e S e a r c h ( )   { 
 
                 $ t e r m   =   $ _ G E T [ ' t e r m ' ]   ? ?   ' ' ; 
 
                 i f   ( s t r l e n ( $ t e r m )   <   2 )   { 
 
                         e c h o   j s o n _ e n c o d e ( [ ] ) ; 
 
                         e x i t ; 
 
                 } 
 
 
 
                 $ t e r m _ l i k e   =   ' % '   .   $ t e r m   .   ' % ' ; 
 
                 $ c o m p a n y _ i d   =   $ t h i s - > c o m p a n y _ i d ; 
 
 
 
                 / /   S e a r c h   o r d e r s   b y   o r d e r _ n o 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 o . i d ,   o . o r d e r _ n o ,   o . s t a t u s , 
 
                                 c . n a m e   a s   c u s t o m e r _ n a m e ,   
 
                                 c . p h o n e   a s   c u s t o m e r _ p h o n e , 
 
                                 s . s h e l f _ n a m e , 
 
                                 s . s h e l f _ n u m b e r , 
 
                                 s . r a c k _ l o c a t i o n , 
 
                                 ( S E L E C T   C O U N T ( * )   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   o . i d )   a s   s u i t _ c o u n t , 
 
                                 c u t _ e m p . n a m e   a s   c u t t e r _ n a m e , 
 
                                 s t i t c h _ e m p . n a m e   a s   t a i l o r _ n a m e , 
 
                                 d . d e l i v e r y _ d a t e , 
 
                                 d . r e c e i v e d _ b y , 
 
                                 ' o r d e r '   a s   t y p e 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   s h e l v e s   s   O N   o . i d   =   s . o r d e r _ i d 
 
                         L E F T   J O I N   c u t t i n g   c u t   O N   o . i d   =   c u t . o r d e r _ i d 
 
                         L E F T   J O I N   e m p l o y e e s   c u t _ e m p   O N   c u t . e m p l o y e e _ i d   =   c u t _ e m p . i d 
 
                         L E F T   J O I N   s t i t c h i n g   s t   O N   o . i d   =   s t . o r d e r _ i d 
 
                         L E F T   J O I N   e m p l o y e e s   s t i t c h _ e m p   O N   s t . a s s i g n e d _ t o   =   s t i t c h _ e m p . i d 
 
                         L E F T   J O I N   d e l i v e r y   d   O N   o . i d   =   d . o r d e r _ i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   
 
                         A N D   o . o r d e r _ n o   L I K E   ? 
 
                         L I M I T   1 0 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ t e r m _ l i k e ] ) ; 
 
                 $ o r d e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
 
 
                 / /   S e a r c h   c u s t o m e r s   b y   n a m e   o r   p h o n e 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   i d ,   n a m e ,   p h o n e ,   c u s t o m e r _ n o ,   ' c u s t o m e r '   a s   t y p e 
 
                         F R O M   c u s t o m e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   ( n a m e   L I K E   ?   O R   p h o n e   L I K E   ?   O R   c u s t o m e r _ n o   L I K E   ? ) 
 
                         L I M I T   1 0 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ,   $ t e r m _ l i k e ,   $ t e r m _ l i k e ,   $ t e r m _ l i k e ] ) ; 
 
                 $ c u s t o m e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
 
 
                 $ r e s u l t s   =   [ ] ; 
 
 
 
                 / /                                  &          R    (        R                  ) 
 
                 f o r e a c h   ( $ o r d e r s   a s   $ o )   { 
 
                         $ r e s u l t s [ ]   =   [ 
 
                                 ' i d '   = >   $ o [ ' i d ' ] , 
 
                                 ' l a b e l '   = >   '  x    '   .   $ o [ ' o r d e r _ n o ' ]   .   '   -   '   .   $ o [ ' c u s t o m e r _ n a m e ' ] , 
 
                                 ' v a l u e '   = >   $ o [ ' o r d e r _ n o ' ] , 
 
                                 ' t y p e '   = >   ' o r d e r ' , 
 
                                 ' o r d e r _ n o '   = >   $ o [ ' o r d e r _ n o ' ] , 
 
                                 ' c u s t o m e r '   = >   $ o [ ' c u s t o m e r _ n a m e ' ] , 
 
                                 ' s t a t u s '   = >   $ o [ ' s t a t u s ' ] , 
 
                                 ' s u i t _ c o u n t '   = >   $ o [ ' s u i t _ c o u n t ' ] , 
 
                                 ' c u t t e r _ n a m e '   = >   $ o [ ' c u t t e r _ n a m e ' ] , 
 
                                 ' t a i l o r _ n a m e '   = >   $ o [ ' t a i l o r _ n a m e ' ] , 
 
                                 ' d e l i v e r y _ d a t e '   = >   $ o [ ' d e l i v e r y _ d a t e ' ] , 
 
                                 ' r e c e i v e d _ b y '   = >   $ o [ ' r e c e i v e d _ b y ' ] , 
 
                                 ' s h e l f '   = >   [ 
 
                                         ' n a m e '   = >   $ o [ ' s h e l f _ n a m e ' ]   ? ?   n u l l , 
 
                                         ' n u m b e r '   = >   $ o [ ' s h e l f _ n u m b e r ' ]   ? ?   n u l l , 
 
                                         ' l o c a t i o n '   = >   $ o [ ' r a c k _ l o c a t i o n ' ]   ? ?   n u l l 
 
                                 ] 
 
                         ] ; 
 
                 } 
 
 
 
                 / /          &                 &          R  
 
                 f o r e a c h   ( $ c u s t o m e r s   a s   $ c )   { 
 
                         $ r e s u l t s [ ]   =   [ 
 
                                 ' i d '   = >   $ c [ ' i d ' ] , 
 
                                 ' l a b e l '   = >   '  x    '   .   $ c [ ' n a m e ' ]   .   '   ( '   .   $ c [ ' p h o n e ' ]   .   ' ) ' , 
 
                                 ' v a l u e '   = >   $ c [ ' n a m e ' ] , 
 
                                 ' t y p e '   = >   ' c u s t o m e r ' , 
 
                                 ' c u s t o m e r _ n o '   = >   $ c [ ' c u s t o m e r _ n o ' ] , 
 
                                 ' n a m e '   = >   $ c [ ' n a m e ' ] , 
 
                                 ' p h o n e '   = >   $ c [ ' p h o n e ' ] 
 
                         ] ; 
 
                 } 
 
 
 
                 e c h o   j s o n _ e n c o d e ( $ r e s u l t s ) ; 
 
                 e x i t ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   A u t h   { 
 
         / /   S e s s i o n   s t a r t   a n d   c h e c k 
 
         p u b l i c   s t a t i c   f u n c t i o n   i n i t ( )   { 
 
                 i f   ( s e s s i o n _ s t a t u s ( )   = = =   P H P _ S E S S I O N _ N O N E )   { 
 
                         s e s s i o n _ s t a r t ( ) ; 
 
                 } 
 
         } 
 
 
 
         / /   L o g i n   u s e r 
 
         p u b l i c   s t a t i c   f u n c t i o n   l o g i n ( $ u s e r )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 $ _ S E S S I O N [ ' u s e r _ i d ' ]   =   $ u s e r [ ' i d ' ] ; 
 
                 $ _ S E S S I O N [ ' u s e r n a m e ' ]   =   $ u s e r [ ' u s e r n a m e ' ] ; 
 
                 $ _ S E S S I O N [ ' f u l l _ n a m e ' ]   =   $ u s e r [ ' f u l l _ n a m e ' ] ; 
 
                 $ _ S E S S I O N [ ' r o l e ' ]   =   $ u s e r [ ' r o l e ' ] ; 
 
                 $ _ S E S S I O N [ ' c o m p a n y _ i d ' ]   =   $ u s e r [ ' c o m p a n y _ i d ' ] ; 
 
                 $ _ S E S S I O N [ ' p r o f i l e _ p i c ' ]   =   $ u s e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' d e f a u l t _ a v a t a r . p n g ' ; 
 
                 $ _ S E S S I O N [ ' l o g g e d _ i n ' ]   =   t r u e ; 
 
         } 
 
 
 
         / /   C h e c k   i f   l o g g e d   i n 
 
         p u b l i c   s t a t i c   f u n c t i o n   i s L o g g e d I n ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   i s s e t ( $ _ S E S S I O N [ ' l o g g e d _ i n ' ] )   & &   $ _ S E S S I O N [ ' l o g g e d _ i n ' ]   = = =   t r u e ; 
 
         } 
 
 
 
         / /   C h e c k   i f   S u p e r   A d m i n 
 
         p u b l i c   s t a t i c   f u n c t i o n   i s S u p e r A d m i n ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   i s s e t ( $ _ S E S S I O N [ ' r o l e ' ] )   & &   $ _ S E S S I O N [ ' r o l e ' ]   = = =   ' s u p e r a d m i n ' ; 
 
         } 
 
 
 
         / /   C h e c k   i f   A d m i n   ( C o m p a n y   A d m i n ) 
 
         p u b l i c   s t a t i c   f u n c t i o n   i s A d m i n ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   i s s e t ( $ _ S E S S I O N [ ' r o l e ' ] )   & &   ( $ _ S E S S I O N [ ' r o l e ' ]   = = =   ' a d m i n '   | |   $ _ S E S S I O N [ ' r o l e ' ]   = = =   ' s u p e r a d m i n ' ) ; 
 
         } 
 
 
 
         / /   G e t   c u r r e n t   u s e r   I D 
 
         p u b l i c   s t a t i c   f u n c t i o n   g e t U s e r I d ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   $ _ S E S S I O N [ ' u s e r _ i d ' ]   ? ?   0 ; 
 
         } 
 
 
 
         / /   G e t   c u r r e n t   c o m p a n y   I D 
 
         p u b l i c   s t a t i c   f u n c t i o n   g e t C o m p a n y I d ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   $ _ S E S S I O N [ ' c o m p a n y _ i d ' ]   ? ?   0 ; 
 
         } 
 
 
 
         / /   G e t   c u r r e n t   r o l e 
 
         p u b l i c   s t a t i c   f u n c t i o n   g e t R o l e ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   $ _ S E S S I O N [ ' r o l e ' ]   ? ?   ' g u e s t ' ; 
 
         } 
 
 
 
         / /   G e t   c u r r e n t   u s e r   f u l l   n a m e 
 
         p u b l i c   s t a t i c   f u n c t i o n   g e t F u l l N a m e ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   $ _ S E S S I O N [ ' f u l l _ n a m e ' ]   ? ?   ' G u e s t ' ; 
 
         } 
 
 
 
         / /   G e t   p r o f i l e   p i c t u r e 
 
         p u b l i c   s t a t i c   f u n c t i o n   g e t P r o f i l e P i c ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 r e t u r n   $ _ S E S S I O N [ ' p r o f i l e _ p i c ' ]   ? ?   ' d e f a u l t _ a v a t a r . p n g ' ; 
 
         } 
 
 
 
         / /   R e q u i r e   l o g i n   ( r e d i r e c t   i f   n o t   l o g g e d   i n ) 
 
         p u b l i c   s t a t i c   f u n c t i o n   r e q u i r e L o g i n ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 i f   ( ! s e l f : : i s L o g g e d I n ( ) )   { 
 
                         h e a d e r ( ' L o c a t i o n :   l o g i n . p h p ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         / /   R e q u i r e   S u p e r   A d m i n   r o l e 
 
         p u b l i c   s t a t i c   f u n c t i o n   r e q u i r e S u p e r A d m i n ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 s e l f : : r e q u i r e L o g i n ( ) ; 
 
                 i f   ( ! s e l f : : i s S u p e r A d m i n ( ) )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d a s h b o a r d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         / /   R e q u i r e   A d m i n   o r   S u p e r   A d m i n 
 
         p u b l i c   s t a t i c   f u n c t i o n   r e q u i r e A d m i n ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 s e l f : : r e q u i r e L o g i n ( ) ; 
 
                 i f   ( ! s e l f : : i s A d m i n ( ) )   { 
 
                         h e a d e r ( ' L o c a t i o n :   i n d e x . p h p ? a c t i o n = d a s h b o a r d ' ) ; 
 
                         e x i t ; 
 
                 } 
 
         } 
 
 
 
         / /   L o g o u t 
 
         p u b l i c   s t a t i c   f u n c t i o n   l o g o u t ( )   { 
 
                 s e l f : : i n i t ( ) ; 
 
                 $ _ S E S S I O N   =   [ ] ; 
 
                 s e s s i o n _ d e s t r o y ( ) ; 
 
                 h e a d e r ( ' L o c a t i o n :   l o g i n . p h p ' ) ; 
 
                 e x i t ; 
 
         } 
 
 
 
         / /   G e t   c o m p a n y   i n f o 
 
         p u b l i c   s t a t i c   f u n c t i o n   g e t C o m p a n y I n f o ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ c o m p a n y _ i d   =   s e l f : : g e t C o m p a n y I d ( ) ; 
 
                 i f   ( $ c o m p a n y _ i d   >   0 )   { 
 
                         $ s t m t   =   $ d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
                 } 
 
                 r e t u r n   n u l l ; 
 
         } 
 
 
 
         / /   C h e c k   i f   u s e r   h a s   a c c e s s   t o   a   s p e c i f i c   c o m p a n y 
 
         p u b l i c   s t a t i c   f u n c t i o n   h a s C o m p a n y A c c e s s ( $ c o m p a n y _ i d )   { 
 
                 i f   ( s e l f : : i s S u p e r A d m i n ( ) )   { 
 
                         r e t u r n   t r u e ; 
 
                 } 
 
                 r e t u r n   s e l f : : g e t C o m p a n y I d ( )   = =   $ c o m p a n y _ i d ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 c l a s s   S m s H e l p e r   { 
 
         / /                    S M S   G a t e w a y      R         R         R              R  
 
         p r i v a t e   s t a t i c   $ a p i _ u r l   =   ' h t t p s : / / a p i . s m s p r o v i d e r . c o m / s e n d ' ;   / /    &       
 
         p r i v a t e   s t a t i c   $ a p i _ k e y   =   ' Y O U R _ A P I _ K E Y ' ; 
 
         p r i v a t e   s t a t i c   $ s e n d e r _ i d   =   ' B i z T e c h ' ;   / /   S e n d e r   I D 
 
 
 
         p u b l i c   s t a t i c   f u n c t i o n   s e n d ( $ t o ,   $ m e s s a g e )   { 
 
                 / /               &                                  f a l s e 
 
                 i f   ( e m p t y ( $ t o )   | |   s t r l e n ( $ t o )   <   1 0 )   { 
 
                         r e t u r n   [ ' s t a t u s '   = >   f a l s e ,   ' e r r o r '   = >   ' I n v a l i d   p h o n e   n u m b e r ' ] ; 
 
                 } 
 
 
 
                 / /    R                         S M S   G a t e w a y          &                      R  
 
                 / /    &                            c U R L    R    G u z z l e            &            R  
 
                 $ d a t a   =   [ 
 
                         ' a p i _ k e y '   = >   s e l f : : $ a p i _ k e y , 
 
                         ' s e n d e r '   = >   s e l f : : $ s e n d e r _ i d , 
 
                         ' t o '   = >   $ t o , 
 
                         ' m e s s a g e '   = >   $ m e s s a g e 
 
                 ] ; 
 
 
 
                 / /   c U R L   r e q u e s t 
 
                 $ c h   =   c u r l _ i n i t ( ) ; 
 
                 c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ U R L ,   s e l f : : $ a p i _ u r l ) ; 
 
                 c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ P O S T ,   1 ) ; 
 
                 c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ P O S T F I E L D S ,   h t t p _ b u i l d _ q u e r y ( $ d a t a ) ) ; 
 
                 c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ R E T U R N T R A N S F E R ,   t r u e ) ; 
 
                 c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ S S L _ V E R I F Y P E E R ,   f a l s e ) ; 
 
                 
 
                 $ r e s p o n s e   =   c u r l _ e x e c ( $ c h ) ; 
 
                 $ e r r o r   =   c u r l _ e r r o r ( $ c h ) ; 
 
                 c u r l _ c l o s e ( $ c h ) ; 
 
 
 
                 i f   ( $ e r r o r )   { 
 
                         / /           A P I        &                                &  R          R    (  &             :     R         ) 
 
                         e r r o r _ l o g ( " S M S   E r r o r :   "   .   $ e r r o r ) ; 
 
                         r e t u r n   [ ' s t a t u s '   = >   f a l s e ,   ' e r r o r '   = >   $ e r r o r ] ; 
 
                 } 
 
 
 
                 / /                    &  R         R   &               R    (            ) 
 
                 / /   f i l e _ p u t _ c o n t e n t s ( ' s m s _ l o g . t x t ' ,   d a t e ( ' Y - m - d   H : i : s ' )   .   "   T o :   $ t o ,   M s g :   $ m e s s a g e ,   R e s p :   $ r e s p o n s e \ n " ,   F I L E _ A P P E N D ) ; 
 
 
 
                 r e t u r n   [ ' s t a t u s '   = >   t r u e ,   ' r e s p o n s e '   = >   $ r e s p o n s e ] ; 
 
         } 
 
 
 
         / /     R &  R                (            R                    R   R         R  S M S         R         R          ) 
 
         p u b l i c   s t a t i c   f u n c t i o n   s e n d D u m m y ( $ t o ,   $ m e s s a g e )   { 
 
                 / /            &  R         R                                      R  
 
                 $ l o g   =   d a t e ( ' Y - m - d   H : i : s ' )   .   "   |   T o :   $ t o   |   M s g :   $ m e s s a g e \ n " ; 
 
                 f i l e _ p u t _ c o n t e n t s ( ' s m s _ d u m m y _ l o g . t x t ' ,   $ l o g ,   F I L E _ A P P E N D ) ; 
 
                 r e t u r n   [ ' s t a t u s '   = >   t r u e ,   ' m e s s a g e '   = >   ' L o g g e d   ( D u m m y ) ' ] ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 c l a s s   C o m p a n y   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   C O M P A N I E S   ( F o r   S u p e r   A d m i n ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   c . * ,   
 
                                       ( S E L E C T   C O U N T ( * )   F R O M   u s e r s   W H E R E   c o m p a n y _ i d   =   c . i d )   a s   u s e r _ c o u n t , 
 
                                       ( S E L E C T   C O U N T ( * )   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   c . i d )   a s   o r d e r _ c o u n t , 
 
                                       p . n a m e   a s   p a c k a g e _ n a m e 
 
                         F R O M   c o m p a n i e s   c 
 
                         L E F T   J O I N   p a c k a g e s   p   O N   c . p a c k a g e _ i d   =   p . i d 
 
                         O R D E R   B Y   c . i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   C O M P A N Y   B Y   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   C O M P A N Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ s q l   =   " I N S E R T   I N T O   c o m p a n i e s   ( n a m e ,   p h o n e ,   a d d r e s s ,   l o g o ,   s t a t u s ,   s t a r t _ d a t e ,   e x p i r y _ d a t e ,   p a c k a g e _ i d )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ] , 
 
                         $ d a t a [ ' a d d r e s s ' ] , 
 
                         $ d a t a [ ' l o g o ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' s t a r t _ d a t e ' ] , 
 
                         $ d a t a [ ' e x p i r y _ d a t e ' ] , 
 
                         $ d a t a [ ' p a c k a g e _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   C O M P A N Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   c o m p a n i e s   S E T   
 
                                         n a m e   =   ? ,   p h o n e   =   ? ,   a d d r e s s   =   ? ,   l o g o   =   ? ,   
 
                                         s t a t u s   =   ? ,   s t a r t _ d a t e   =   ? ,   e x p i r y _ d a t e   =   ? ,   p a c k a g e _ i d   =   ? 
 
                                 W H E R E   i d   =   ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ] , 
 
                         $ d a t a [ ' a d d r e s s ' ] , 
 
                         $ d a t a [ ' l o g o ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' s t a r t _ d a t e ' ] , 
 
                         $ d a t a [ ' e x p i r y _ d a t e ' ] , 
 
                         $ d a t a [ ' p a c k a g e _ i d ' ] , 
 
                         $ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   C O M P A N Y   S T A T U S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e S t a t u s ( $ i d ,   $ s t a t u s )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   c o m p a n i e s   S E T   s t a t u s   =   ?   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ s t a t u s ,   $ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   C O M P A N Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   C u s t o m e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   C U S T O M E R S   ( W I T H   S E A R C H   A N D   O R D E R   B Y   c u s t o m e r _ n o ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( $ s e a r c h   =   ' ' )   { 
 
                 $ s q l   =   " S E L E C T   c . * ,   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   l . t y p e   =   ' p a y '   T H E N   l . a m o u n t   E L S E   0   E N D ) ,   0 )   -   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   l . t y p e   =   ' r e c e i v e '   T H E N   l . a m o u n t   E L S E   0   E N D ) ,   0 )   a s   b a l a n c e 
 
                                 F R O M   c u s t o m e r s   c 
 
                                 L E F T   J O I N   l e d g e r   l   O N   l . c u s t o m e r _ i d   =   c . i d   A N D   l . c o m p a n y _ i d   =   c . c o m p a n y _ i d 
 
                                 W H E R E   c . c o m p a n y _ i d   =   ? " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
 
 
                 i f   ( ! e m p t y ( $ s e a r c h ) )   { 
 
                         $ s q l   . =   "   A N D   ( c . n a m e   L I K E   ?   O R   c . p h o n e   L I K E   ?   O R   c . c u s t o m e r _ n o   L I K E   ? ) " ; 
 
                         $ t e r m   =   ' % '   .   $ s e a r c h   .   ' % ' ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                 } 
 
 
 
                 $ s q l   . =   "   G R O U P   B Y   c . i d   O R D E R   B Y   c . c u s t o m e r _ n o   A S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   P A G I N A T E D   C U S T O M E R S   ( O R D E R   B Y   c u s t o m e r _ n o ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t P a g i n a t e d ( $ s e a r c h   =   ' ' ,   $ p a g e   =   1 ,   $ p e r P a g e   =   1 0 )   { 
 
                 $ p a g e   =   ( i n t ) $ p a g e ; 
 
                 $ p e r P a g e   =   ( i n t ) $ p e r P a g e ; 
 
                 $ o f f s e t   =   ( $ p a g e   -   1 )   *   $ p e r P a g e ; 
 
                 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
                 $ w h e r e   =   " W H E R E   c . c o m p a n y _ i d   =   ? " ; 
 
                 
 
                 i f   ( ! e m p t y ( $ s e a r c h ) )   { 
 
                         $ w h e r e   . =   "   A N D   ( c . n a m e   L I K E   ?   O R   c . p h o n e   L I K E   ?   O R   c . c u s t o m e r _ n o   L I K E   ? ) " ; 
 
                         $ t e r m   =   ' % '   .   $ s e a r c h   .   ' % ' ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                 } 
 
                 
 
                 / /                   
 
                 $ c o u n t S q l   =   " S E L E C T   C O U N T ( D I S T I N C T   c . i d )   a s   t o t a l   F R O M   c u s t o m e r s   c   $ w h e r e " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ c o u n t S q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 $ t o t a l   =   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ] ; 
 
                 
 
                 / /                                   ( O R D E R   B Y   c u s t o m e r _ n o ) 
 
                 $ s q l   =   " S E L E C T   c . * ,   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   l . t y p e   =   ' p a y '   T H E N   l . a m o u n t   E L S E   0   E N D ) ,   0 )   -   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   l . t y p e   =   ' r e c e i v e '   T H E N   l . a m o u n t   E L S E   0   E N D ) ,   0 )   a s   b a l a n c e 
 
                                 F R O M   c u s t o m e r s   c 
 
                                 L E F T   J O I N   l e d g e r   l   O N   l . c u s t o m e r _ i d   =   c . i d   A N D   l . c o m p a n y _ i d   =   c . c o m p a n y _ i d 
 
                                 $ w h e r e 
 
                                 G R O U P   B Y   c . i d 
 
                                 O R D E R   B Y   c . c u s t o m e r _ n o   A S C 
 
                                 L I M I T   $ p e r P a g e   O F F S E T   $ o f f s e t " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 $ c u s t o m e r s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 r e t u r n   [ ' c u s t o m e r s '   = >   $ c u s t o m e r s ,   ' t o t a l '   = >   $ t o t a l ] ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   C U S T O M E R   B Y   I D   ( W I T H   B A L A N C E ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   c . * ,   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   l . t y p e   =   ' p a y '   T H E N   l . a m o u n t   E L S E   0   E N D ) ,   0 )   -   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   l . t y p e   =   ' r e c e i v e '   T H E N   l . a m o u n t   E L S E   0   E N D ) ,   0 )   a s   b a l a n c e 
 
                                 F R O M   c u s t o m e r s   c 
 
                                 L E F T   J O I N   l e d g e r   l   O N   l . c u s t o m e r _ i d   =   c . i d   A N D   l . c o m p a n y _ i d   =   c . c o m p a n y _ i d 
 
                                 W H E R E   c . i d   =   ?   A N D   c . c o m p a n y _ i d   =   ? 
 
                                 G R O U P   B Y   c . i d " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   C U S T O M E R   B Y   C U S T O M E R   N O 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y C u s t o m e r N o ( $ c u s t o m e r _ n o )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   c u s t o m e r s   W H E R E   c u s t o m e r _ n o   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ n o ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E N E R A T E   N E X T   C U S T O M E R   N O   ( C U S - X X X X ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e n e r a t e C u s t o m e r N o ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   M A X ( C A S T ( S U B S T R I N G ( c u s t o m e r _ n o ,   5 )   A S   U N S I G N E D ) )   a s   m a x _ n o   
 
                         F R O M   c u s t o m e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   c u s t o m e r _ n o   L I K E   ' C U S - % ' 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 $ m a x   =   $ r o w [ ' m a x _ n o ' ]   ? ?   0 ; 
 
                 $ n e x t   =   i n t v a l ( $ m a x )   +   1 ; 
 
                 r e t u r n   ' C U S - '   .   s t r _ p a d ( $ n e x t ,   4 ,   ' 0 ' ,   S T R _ P A D _ L E F T ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   C U S T O M E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   c u s t o m e r s   ( 
 
                                         c u s t o m e r _ n o ,   n a m e ,   p h o n e ,   a d d r e s s ,   p r o f i l e _ p i c ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' c u s t o m e r _ n o ' ] , 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' a d d r e s s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   C U S T O M E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   c u s t o m e r s   S E T   
 
                                         n a m e = ? ,   p h o n e = ? ,   a d d r e s s = ? ,   p r o f i l e _ p i c = ?   
 
                                 W H E R E   i d = ?   A N D   c o m p a n y _ i d = ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' a d d r e s s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   C U S T O M E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   c u s t o m e r s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   L A S T   I N S E R T   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t L a s t I n s e r t I d ( )   { 
 
                 r e t u r n   $ t h i s - > d b - > l a s t I n s e r t I d ( ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 c l a s s   C u t t i n g A s s i g n m e n t   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   G e t   p e n d i n g   o r d e r s   f o r   c u t t i n g   ( o r d e r s   t h a t   a r e   n o t   y e t   a s s i g n e d   t o   c u t t i n g   o r   n o t   c o m p l e t e d ) 
 
         p u b l i c   f u n c t i o n   g e t P e n d i n g O r d e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e   
 
                         F R O M   o r d e r s   o   
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d   
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   
 
                         A N D   o . s t a t u s   N O T   I N   ( ' d e l i v e r e d ' , ' c a n c e l l e d ' , ' s t i t c h i n g ' , ' r e a d y ' )   
 
                         A N D   ( o . c u t t i n g _ e m p l o y e e _ i d   I S   N U L L   O R   o . s t a t u s   =   ' p e n d i n g ' ) 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   G e t   o r d e r s   a s s i g n e d   t o   c u t t i n g   b u t   n o t   y e t   c o m p l e t e d 
 
         p u b l i c   f u n c t i o n   g e t A s s i g n e d O r d e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   e . n a m e   a s   e m p l o y e e _ n a m e   
 
                         F R O M   o r d e r s   o   
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d   
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   o . c u t t i n g _ e m p l o y e e _ i d   =   e . i d   
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   
 
                         A N D   o . s t a t u s   =   ' c u t t i n g ' 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   A s s i g n   o r d e r   t o   c u t t i n g   e m p l o y e e 
 
         p u b l i c   f u n c t i o n   a s s i g n O r d e r ( $ o r d e r _ i d ,   $ e m p l o y e e _ i d ,   $ n o t e s   =   ' ' )   { 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         / /   U p d a t e   o r d e r 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   o r d e r s   S E T   c u t t i n g _ e m p l o y e e _ i d   =   ? ,   s t a t u s   =   ' c u t t i n g '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         
 
                         / /   I n s e r t   i n t o   c u t t i n g   t a b l e 
 
                         $ s t m t 2   =   $ t h i s - > d b - > p r e p a r e ( " I N S E R T   I N T O   c u t t i n g   ( o r d e r _ i d ,   e m p l o y e e _ i d ,   a s s i g n e d _ d a t e ,   s t a t u s ,   n o t e s ,   c o m p a n y _ i d )   V A L U E S   ( ? ,   ? ,   C U R D A T E ( ) ,   ' a s s i g n e d ' ,   ? ,   ? ) " ) ; 
 
                         $ s t m t 2 - > e x e c u t e ( [ $ o r d e r _ i d ,   $ e m p l o y e e _ i d ,   $ n o t e s ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         r e t u r n   t r u e ; 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         r e t u r n   f a l s e ; 
 
                 } 
 
         } 
 
 
 
         / /   C o m p l e t e   c u t t i n g   f o r   a n   o r d e r   ( r e c e i v e   c u t   s u i t s ) 
 
         p u b l i c   f u n c t i o n   c o m p l e t e C u t t i n g ( $ o r d e r _ i d ,   $ e m p l o y e e _ i d ,   $ n o t e s   =   ' ' )   { 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         / /   U p d a t e   c u t t i n g   r e c o r d   s t a t u s 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   c u t t i n g   S E T   c o m p l e t e d _ d a t e   =   C U R D A T E ( ) ,   s t a t u s   =   ' c o m p l e t e d ' ,   n o t e s   =   C O N C A T ( n o t e s ,   '   ' ,   ? )   W H E R E   o r d e r _ i d   =   ?   A N D   e m p l o y e e _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ n o t e s ,   $ o r d e r _ i d ,   $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         
 
                         / /   U p d a t e   o r d e r   s t a t u s   t o   ' s t i t c h i n g '   ( r e a d y   f o r   s t i t c h i n g ) 
 
                         $ s t m t 2   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   o r d e r s   S E T   s t a t u s   =   ' s t i t c h i n g '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t 2 - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         
 
                         / /   C a l c u l a t e   e a r n i n g s   f o r   c u t t i n g   m a n   b a s e d   o n   s u i t   s i z e s 
 
                         $ s t m t 3   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   o s . s i z e ,   C O U N T ( * )   a s   c o u n t   
 
                                 F R O M   o r d e r _ s u i t s   o s   
 
                                 W H E R E   o s . o r d e r _ i d   =   ?   A N D   o s . c o m p a n y _ i d   =   ?   
 
                                 G R O U P   B Y   o s . s i z e 
 
                         " ) ; 
 
                         $ s t m t 3 - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         $ s i z e s   =   $ s t m t 3 - > f e t c h A l l ( ) ; 
 
                         
 
                         / /   G e t   e m p l o y e e   r a t e s 
 
                         $ s t m t 4   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   e c . r a t e _ s m a l l ,   e c . r a t e _ m e d i u m ,   e c . r a t e _ l a r g e   
 
                                 F R O M   e m p l o y e e s   e   
 
                                 L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d   
 
                                 W H E R E   e . i d   =   ?   A N D   e . c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t 4 - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         $ r a t e s   =   $ s t m t 4 - > f e t c h ( ) ; 
 
                         
 
                         $ t o t a l _ e a r n i n g   =   0 ; 
 
                         f o r e a c h   ( $ s i z e s   a s   $ s )   { 
 
                                 $ s i z e   =   $ s [ ' s i z e ' ] ; 
 
                                 $ c o u n t   =   $ s [ ' c o u n t ' ] ; 
 
                                 i f   ( $ s i z e   = =   ' S m a l l '   & &   i s s e t ( $ r a t e s [ ' r a t e _ s m a l l ' ] ) )   { 
 
                                         $ t o t a l _ e a r n i n g   + =   $ c o u n t   *   $ r a t e s [ ' r a t e _ s m a l l ' ] ; 
 
                                 }   e l s e i f   ( $ s i z e   = =   ' M e d i u m '   & &   i s s e t ( $ r a t e s [ ' r a t e _ m e d i u m ' ] ) )   { 
 
                                         $ t o t a l _ e a r n i n g   + =   $ c o u n t   *   $ r a t e s [ ' r a t e _ m e d i u m ' ] ; 
 
                                 }   e l s e i f   ( $ s i z e   = =   ' L a r g e '   & &   i s s e t ( $ r a t e s [ ' r a t e _ l a r g e ' ] ) )   { 
 
                                         $ t o t a l _ e a r n i n g   + =   $ c o u n t   *   $ r a t e s [ ' r a t e _ l a r g e ' ] ; 
 
                                 }   e l s e   { 
 
                                         / /   f a l l b a c k   t o   d e f a u l t   r a t e   i f   s i z e   n o t   f o u n d 
 
                                         $ t o t a l _ e a r n i n g   + =   $ c o u n t   *   ( $ r a t e s [ ' r a t e _ l a r g e ' ]   ? ?   0 ) ; 
 
                                 } 
 
                         } 
 
                         
 
                         / /   A d d   c r e d i t   t o   e m p l o y e e   l e d g e r 
 
                         i f   ( $ t o t a l _ e a r n i n g   >   0 )   { 
 
                                 $ l e d g e r S t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                         I N S E R T   I N T O   e m p l o y e e _ l e d g e r   ( e m p l o y e e _ i d ,   o r d e r _ i d ,   t y p e ,   a m o u n t ,   d e s c r i p t i o n ,   t r a n s a c t i o n _ d a t e ,   c o m p a n y _ i d )   
 
                                         V A L U E S   ( ? ,   ? ,   ' c r e d i t ' ,   ? ,   ? ,   C U R D A T E ( ) ,   ? ) 
 
                                 " ) ; 
 
                                 $ d e s c r i p t i o n   =   " C u t t i n g   p a y m e n t   f o r   O r d e r   # "   .   $ o r d e r _ i d   .   "   ( "   .   $ s i z e s [ 0 ] [ ' c o u n t ' ]   .   "   s u i t s ) " ; 
 
                                 $ l e d g e r S t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ o r d e r _ i d ,   $ t o t a l _ e a r n i n g ,   $ d e s c r i p t i o n ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         } 
 
                         
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         r e t u r n   [ ' s u c c e s s '   = >   t r u e ,   ' t o t a l _ e a r n i n g '   = >   $ t o t a l _ e a r n i n g ] ; 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         r e t u r n   [ ' s u c c e s s '   = >   f a l s e ,   ' e r r o r '   = >   $ e - > g e t M e s s a g e ( ) ] ; 
 
                 } 
 
         } 
 
 
 
         / /   G e t   c u t t i n g   r e c o r d s   f o r   r e p o r t   ( d a t e   r a n g e ) 
 
         p u b l i c   f u n c t i o n   g e t C u t t i n g R e p o r t ( $ s t a r t _ d a t e ,   $ e n d _ d a t e ,   $ e m p l o y e e _ i d   =   n u l l )   { 
 
                 $ s q l   =   " S E L E C T   c . * ,   o . o r d e r _ d a t e ,   o . c u s t o m e r _ i d ,   c u . n a m e   a s   c u s t o m e r _ n a m e ,   e . n a m e   a s   e m p l o y e e _ n a m e ,   e . i d   a s   e m p l o y e e _ i d , 
 
                                               ( S E L E C T   C O U N T ( * )   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   c . o r d e r _ i d   A N D   s i z e   =   ' S m a l l ' )   a s   s m a l l _ c o u n t , 
 
                                               ( S E L E C T   C O U N T ( * )   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   c . o r d e r _ i d   A N D   s i z e   =   ' M e d i u m ' )   a s   m e d i u m _ c o u n t , 
 
                                               ( S E L E C T   C O U N T ( * )   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   c . o r d e r _ i d   A N D   s i z e   =   ' L a r g e ' )   a s   l a r g e _ c o u n t , 
 
                                               ( S E L E C T   C O U N T ( * )   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   c . o r d e r _ i d )   a s   t o t a l _ s u i t s 
 
                                 F R O M   c u t t i n g   c 
 
                                 L E F T   J O I N   o r d e r s   o   O N   c . o r d e r _ i d   =   o . i d 
 
                                 L E F T   J O I N   c u s t o m e r s   c u   O N   o . c u s t o m e r _ i d   =   c u . i d 
 
                                 L E F T   J O I N   e m p l o y e e s   e   O N   c . e m p l o y e e _ i d   =   e . i d 
 
                                 W H E R E   c . c o m p a n y _ i d   =   ?   A N D   c . c o m p l e t e d _ d a t e   B E T W E E N   ?   A N D   ?   A N D   c . s t a t u s   =   ' c o m p l e t e d ' " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ,   $ s t a r t _ d a t e ,   $ e n d _ d a t e ] ; 
 
                 i f   ( $ e m p l o y e e _ i d )   { 
 
                         $ s q l   . =   "   A N D   c . e m p l o y e e _ i d   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ e m p l o y e e _ i d ; 
 
                 } 
 
                 $ s q l   . =   "   O R D E R   B Y   c . c o m p l e t e d _ d a t e   D E S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   G e t   e m p l o y e e   r a t e s 
 
         p u b l i c   f u n c t i o n   g e t E m p l o y e e R a t e s ( $ e m p l o y e e _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e c . r a t e _ s m a l l ,   e c . r a t e _ m e d i u m ,   e c . r a t e _ l a r g e   
 
                         F R O M   e m p l o y e e s   e   
 
                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d   
 
                         W H E R E   e . i d   =   ?   A N D   e . c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   D e l i v e r y   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   D E L I V E R Y   R E C O R D S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   d . * ,   o . o r d e r _ n o ,   o . o r d e r _ d a t e ,   o . t o t a l _ s u i t s ,   o . t o t a l _ a m o u n t ,   o . p a i d _ a m o u n t ,   o . d u e _ a m o u n t , 
 
                                       c . n a m e   a s   c u s t o m e r _ n a m e ,   c . p h o n e   a s   c u s t o m e r _ p h o n e 
 
                         F R O M   d e l i v e r y   d 
 
                         L E F T   J O I N   o r d e r s   o   O N   d . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   d . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   d . d e l i v e r y _ d a t e   D E S C ,   d . i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   D E L I V E R Y   B Y   O R D E R   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y O r d e r I d ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   d . * ,   o . o r d e r _ n o ,   c . n a m e   a s   c u s t o m e r _ n a m e 
 
                         F R O M   d e l i v e r y   d 
 
                         L E F T   J O I N   o r d e r s   o   O N   d . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   d . o r d e r _ i d   =   ?   A N D   d . c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   D E L I V E R Y   R E C O R D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   d e l i v e r y   ( 
 
                                         o r d e r _ i d ,   d e l i v e r y _ d a t e ,   r e c e i v e d _ b y ,   s i g n a t u r e ,   n o t e s ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' o r d e r _ i d ' ] , 
 
                         $ d a t a [ ' d e l i v e r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                         $ d a t a [ ' r e c e i v e d _ b y ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s i g n a t u r e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' n o t e s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   O R D E R S   R E A D Y   F O R   D E L I V E R Y   ( s t a t u s   =   ' r e a d y ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t R e a d y O r d e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   c . p h o n e   a s   c u s t o m e r _ p h o n e , 
 
                                       ( S E L E C T   C O U N T ( * )   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   o . i d )   a s   s u i t _ c o u n t 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   A N D   o . s t a t u s   =   ' r e a d y ' 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C ,   o . i d   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   D E L I V E R E D   O R D E R S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t D e l i v e r e d O r d e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   c . p h o n e   a s   c u s t o m e r _ p h o n e , 
 
                                       d . d e l i v e r y _ d a t e   a s   d e l i v e r e d _ d a t e ,   d . r e c e i v e d _ b y ,   d . n o t e s   a s   d e l i v e r y _ n o t e s 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   d e l i v e r y   d   O N   o . i d   =   d . o r d e r _ i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   A N D   o . s t a t u s   =   ' d e l i v e r e d ' 
 
                         O R D E R   B Y   d . d e l i v e r y _ d a t e   D E S C ,   o . i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   E m p l o y e e   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   E M P L O Y E E S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e . * ,   e c . n a m e   a s   c a t e g o r y _ n a m e ,   e c . p a y m e n t _ t y p e ,   e c . r a t e   a s   c a t e g o r y _ r a t e ,   e c . r a t e s   
 
                         F R O M   e m p l o y e e s   e   
 
                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d   
 
                         W H E R E   e . c o m p a n y _ i d   =   ?   
 
                         O R D E R   B Y   e . n a m e 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   E M P L O Y E E   B Y   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e . * ,   e c . n a m e   a s   c a t e g o r y _ n a m e ,   e c . p a y m e n t _ t y p e ,   e c . r a t e   a s   c a t e g o r y _ r a t e ,   e c . r a t e s   
 
                         F R O M   e m p l o y e e s   e   
 
                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d   
 
                         W H E R E   e . i d   =   ?   A N D   e . c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   E M P L O Y E E S   B Y   C A T E G O R Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y C a t e g o r y ( $ c a t e g o r y _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   e m p l o y e e s   
 
                         W H E R E   c a t e g o r y _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' a c t i v e ' 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c a t e g o r y _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   E M P L O Y E E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   e m p l o y e e s   ( 
 
                                         e m p _ c o d e ,   n a m e ,   p h o n e ,   a d d r e s s ,   c n i c ,   c a t e g o r y _ i d ,   
 
                                         j o i n i n g _ d a t e ,   s t a t u s ,   f i x e d _ s a l a r y ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' e m p _ c o d e ' ] , 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ] , 
 
                         $ d a t a [ ' a d d r e s s ' ] , 
 
                         $ d a t a [ ' c n i c ' ] , 
 
                         $ d a t a [ ' c a t e g o r y _ i d ' ] , 
 
                         $ d a t a [ ' j o i n i n g _ d a t e ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' f i x e d _ s a l a r y ' ]   ? ?   0 , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   E M P L O Y E E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   e m p l o y e e s   S E T   
 
                                         e m p _ c o d e = ? ,   n a m e = ? ,   p h o n e = ? ,   a d d r e s s = ? ,   c n i c = ? ,   
 
                                         c a t e g o r y _ i d = ? ,   j o i n i n g _ d a t e = ? ,   s t a t u s = ? ,   f i x e d _ s a l a r y = ?   
 
                                 W H E R E   i d = ?   A N D   c o m p a n y _ i d = ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' e m p _ c o d e ' ] , 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p h o n e ' ] , 
 
                         $ d a t a [ ' a d d r e s s ' ] , 
 
                         $ d a t a [ ' c n i c ' ] , 
 
                         $ d a t a [ ' c a t e g o r y _ i d ' ] , 
 
                         $ d a t a [ ' j o i n i n g _ d a t e ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' f i x e d _ s a l a r y ' ]   ? ?   0 , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   E M P L O Y E E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   e m p l o y e e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E N E R A T E   E M P L O Y E E   C O D E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e n e r a t e E m p C o d e ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   M A X ( C A S T ( S U B S T R I N G ( e m p _ c o d e ,   5 )   A S   U N S I G N E D ) )   a s   m a x _ n o   
 
                         F R O M   e m p l o y e e s   W H E R E   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 $ n e x t   =   ( $ r o w [ ' m a x _ n o ' ]   ? ?   0 )   +   1 ; 
 
                 r e t u r n   ' E M P - '   .   s t r _ p a d ( $ n e x t ,   3 ,   ' 0 ' ,   S T R _ P A D _ L E F T ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   E M P L O Y E E   C A T E G O R I E S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C a t e g o r i e s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   e m p l o y e e _ c a t e g o r i e s   W H E R E   c o m p a n y _ i d   =   ?   O R D E R   B Y   n a m e " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   C A T E G O R Y   B Y   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C a t e g o r y B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   e m p l o y e e _ c a t e g o r i e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   E M P L O Y E E   L E D G E R   B A L A N C E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t E m p l o y e e B a l a n c e ( $ e m p l o y e e _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' c r e d i t '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ c r e d i t , 
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' d e b i t '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ d e b i t , 
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' s a l a r y '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ s a l a r y 
 
                         F R O M   e m p l o y e e _ l e d g e r   
 
                         W H E R E   e m p l o y e e _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 r e t u r n   [ 
 
                         ' c r e d i t '   = >   $ r o w [ ' t o t a l _ c r e d i t ' ]   ? ?   0 , 
 
                         ' d e b i t '     = >   $ r o w [ ' t o t a l _ d e b i t ' ]   ? ?   0 , 
 
                         ' s a l a r y '   = >   $ r o w [ ' t o t a l _ s a l a r y ' ]   ? ?   0 , 
 
                         ' b a l a n c e '   = >   ( $ r o w [ ' t o t a l _ c r e d i t ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ s a l a r y ' ]   ? ?   0 ) 
 
                 ] ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   E M P L O Y E E   T R A N S A C T I O N S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t E m p l o y e e T r a n s a c t i o n s ( $ e m p l o y e e _ i d ,   $ l i m i t   =   2 0 )   { 
 
                 $ l i m i t   =   ( i n t ) $ l i m i t ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   e m p l o y e e _ l e d g e r   
 
                         W H E R E   e m p l o y e e _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   
 
                         O R D E R   B Y   t r a n s a c t i o n _ d a t e   D E S C ,   c r e a t e d _ a t   D E S C   
 
                         L I M I T   $ l i m i t 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A D D   T R A N S A C T I O N   T O   E M P L O Y E E   L E D G E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a d d T r a n s a c t i o n ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   e m p l o y e e _ l e d g e r   ( 
 
                                         e m p l o y e e _ i d ,   o r d e r _ i d ,   t y p e ,   a m o u n t ,   d e s c r i p t i o n ,   t r a n s a c t i o n _ d a t e ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' e m p l o y e e _ i d ' ] , 
 
                         $ d a t a [ ' o r d e r _ i d ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' t y p e ' ] , 
 
                         $ d a t a [ ' a m o u n t ' ] , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ] , 
 
                         $ d a t a [ ' t r a n s a c t i o n _ d a t e ' ] , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S T I T C H I N G   E M P L O Y E E S   ( K a r i g a r ,   T a i l o r ,   e t c . ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t S t i t c h i n g E m p l o y e e s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e . * ,   e c . n a m e   a s   c a t e g o r y _ n a m e ,   e c . p a y m e n t _ t y p e ,   e c . r a t e ,   e c . r a t e s   
 
                         F R O M   e m p l o y e e s   e 
 
                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d 
 
                         W H E R E   e . c o m p a n y _ i d   =   ?   
 
                             A N D   e . s t a t u s   =   ' a c t i v e ' 
 
                             A N D   e c . p a y m e n t _ t y p e   I N   ( ' p e r _ s u i t ' ,   ' p e r c e n t a g e ' ,   ' f i x e d ' ) 
 
                         O R D E R   B Y   e . n a m e 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U T T I N G   R E L A T E D   M E T H O D S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t P e n d i n g C u t t i n g O r d e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . i d ,   o . o r d e r _ n o ,   o . o r d e r _ d a t e ,   o . c u s t o m e r _ i d ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   
 
                                       C O U N T ( o s . i d )   a s   s u i t _ c o u n t , 
 
                                       G R O U P _ C O N C A T ( o s . s u i t _ t y p e   S E P A R A T O R   ' ,   ' )   a s   s u i t _ t y p e s 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   o r d e r _ s u i t s   o s   O N   o . i d   =   o s . o r d e r _ i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   A N D   o . s t a t u s   =   ' p e n d i n g ' 
 
                         G R O U P   B Y   o . i d 
 
                         O R D E R   B Y   o . c r e a t e d _ a t   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   a s s i g n C u t t i n g ( $ e m p l o y e e _ i d ,   $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         U P D A T E   o r d e r s   S E T   s t a t u s   =   ' c u t t i n g ' ,   a s s i g n e d _ c u t t e r   =   ?   
 
                         W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t C u t t i n g O r d e r s ( $ e m p l o y e e _ i d   =   n u l l )   { 
 
                 $ s q l   =   " S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   e . n a m e   a s   c u t t e r _ n a m e ,   
 
                                               ( S E L E C T   C O U N T ( * )   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   o . i d )   a s   s u i t _ c o u n t 
 
                                 F R O M   o r d e r s   o 
 
                                 L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                                 L E F T   J O I N   e m p l o y e e s   e   O N   o . a s s i g n e d _ c u t t e r   =   e . i d 
 
                                 W H E R E   o . c o m p a n y _ i d   =   ?   A N D   o . s t a t u s   =   ' c u t t i n g ' " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
                 i f   ( $ e m p l o y e e _ i d )   { 
 
                         $ s q l   . =   "   A N D   o . a s s i g n e d _ c u t t e r   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ e m p l o y e e _ i d ; 
 
                 } 
 
                 $ s q l   . =   "   O R D E R   B Y   o . c r e a t e d _ a t   D E S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   c o m p l e t e C u t t i n g ( $ o r d e r _ i d ,   $ e m p l o y e e _ i d ,   $ s i z e s _ d a t a )   { 
 
                 $ t h i s - > d b - > b e g i n T r a n s a c t i o n ( ) ; 
 
                 t r y   { 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 U P D A T E   o r d e r s   S E T   s t a t u s   =   ' s t i t c h i n g '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   e c . r a t e s ,   e c . n a m e   a s   c a t e g o r y _ n a m e ,   e c . p a y m e n t _ t y p e   
 
                                 F R O M   e m p l o y e e s   e 
 
                                 L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d 
 
                                 W H E R E   e . i d   =   ?   A N D   e . c o m p a n y _ i d   =   ? 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         $ e m p   =   $ s t m t - > f e t c h ( ) ; 
 
                         
 
                         i f   ( $ e m p   & &   $ e m p [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' )   { 
 
                                 $ r a t e s   =   j s o n _ d e c o d e ( $ e m p [ ' r a t e s ' ] ,   t r u e ) ; 
 
                                 i f   ( $ r a t e s )   { 
 
                                         $ t o t a l _ a m o u n t   =   0 ; 
 
                                         $ d e t a i l s   =   [ ] ; 
 
                                         f o r e a c h   ( $ s i z e s _ d a t a   a s   $ s i z e   = >   $ c o u n t )   { 
 
                                                 i f   ( $ c o u n t   >   0 )   { 
 
                                                         $ r a t e   =   $ r a t e s [ $ s i z e ]   ? ?   0 ; 
 
                                                         $ a m o u n t   =   $ r a t e   *   $ c o u n t ; 
 
                                                         $ t o t a l _ a m o u n t   + =   $ a m o u n t ; 
 
                                                         $ d e t a i l s [ ]   =   $ s i z e   .   ' :   '   .   $ c o u n t   .   '   x   R s .   '   .   $ r a t e   .   '   =   R s .   '   .   $ a m o u n t ; 
 
                                                 } 
 
                                         } 
 
                                         
 
                                         i f   ( $ t o t a l _ a m o u n t   >   0 )   { 
 
                                                 $ t h i s - > a d d T r a n s a c t i o n ( [ 
 
                                                         ' e m p l o y e e _ i d '   = >   $ e m p l o y e e _ i d , 
 
                                                         ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                                         ' t y p e '   = >   ' c r e d i t ' , 
 
                                                         ' a m o u n t '   = >   $ t o t a l _ a m o u n t , 
 
                                                         ' d e s c r i p t i o n '   = >   ' C u t t i n g   p a y m e n t   f o r   O r d e r   # '   .   $ o r d e r _ i d   .   '   -   '   .   i m p l o d e ( ' ,   ' ,   $ d e t a i l s ) , 
 
                                                         ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                                                 ] ) ; 
 
                                         } 
 
                                 } 
 
                         } 
 
 
 
                         $ t h i s - > d b - > c o m m i t ( ) ; 
 
                         r e t u r n   t r u e ; 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ t h i s - > d b - > r o l l B a c k ( ) ; 
 
                         r e t u r n   f a l s e ; 
 
                 } 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t E m p l o y e e C u t t i n g R e p o r t ( $ e m p l o y e e _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e l . * ,   o . o r d e r _ n o ,   o . c u s t o m e r _ i d ,   c . n a m e   a s   c u s t o m e r _ n a m e 
 
                         F R O M   e m p l o y e e _ l e d g e r   e l 
 
                         L E F T   J O I N   o r d e r s   o   O N   e l . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   e l . e m p l o y e e _ i d   =   ?   A N D   e l . c o m p a n y _ i d   =   ?   
 
                         A N D   e l . t y p e   =   ' c r e d i t '   
 
                         A N D   e l . t r a n s a c t i o n _ d a t e   B E T W E E N   ?   A N D   ? 
 
                         O R D E R   B Y   e l . t r a n s a c t i o n _ d a t e   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C U T T I N G   S L I P   D A T A   ( F I X E D   -   N O   U N K N O W N   C O L U M N S ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
       p u b l i c   f u n c t i o n   g e t C u t t i n g S l i p D a t a ( $ o r d e r _ i d )   { 
 
         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                 S E L E C T   
 
                         o . i d   a s   o r d e r _ i d , 
 
                         o . o r d e r _ n o , 
 
                         o . o r d e r _ d a t e , 
 
                         o . d e l i v e r y _ d a t e , 
 
                         o . t o t a l _ s u i t s , 
 
                         c . i d   a s   c u s t o m e r _ i d , 
 
                         c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                         c . p h o n e   a s   c u s t o m e r _ p h o n e , 
 
                         c . a d d r e s s   a s   c u s t o m e r _ a d d r e s s , 
 
                         e . i d   a s   e m p l o y e e _ i d , 
 
                         e . n a m e   a s   e m p l o y e e _ n a m e , 
 
                         e . e m p _ c o d e , 
 
                         o s . i d   a s   s u i t _ i d , 
 
                         o s . s u i t _ n u m b e r , 
 
                         o s . s u i t _ t y p e , 
 
                         o s . s i z e , 
 
                         o s . c o l o r , 
 
                         o s . c o l o r _ t y p e , 
 
                         o s . c u f f _ t y p e , 
 
                         o s . g h e r a _ t y p e , 
 
                         o s . p r i c e , 
 
                         o s . m e a s u r e m e n t _ i d , 
 
                         m . m e a s u r e d _ d a t e , 
 
                         m . c h e s t , 
 
                         m . w a i s t , 
 
                         m . L O O S I N G   a s   l o o s i n g , 
 
                         m . C U F F _ L E N G T H   a s   c u f f _ l e n g t h , 
 
                         m . C U F F _ W I D T H   a s   c u f f _ w i d t h , 
 
                         m . S I D E P O C K E T   a s   s i d e p o c k e t , 
 
                         m . F R O N T P O C K E T   a s   f r o n t p o c k e t , 
 
                         m . S H A L W A R P O C K E T   a s   s h a l w a r p o c k e t , 
 
                         m . S H A L W A R _ L E N G T H   a s   s h a l w a r _ l e n g t h , 
 
                         m . S H A L W A R _ B O T T O M   a s   s h a l w a r _ b o t t o m , 
 
                         m . s h o u l d e r , 
 
                         m . s l e e v e , 
 
                         m . l e n g t h   a s   s h i r t _ l e n g t h , 
 
                         m . c o l l a r , 
 
                         m . S H E R W A N I   a s   s h e r w a n i , 
 
                         m . n o t e s , 
 
                         m . R E M A R K S   a s   r e m a r k s 
 
                 F R O M   o r d e r s   o 
 
                 L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                 L E F T   J O I N   e m p l o y e e s   e   O N   o . a s s i g n e d _ c u t t e r   =   e . i d       - -    R                                      R  
 
                 L E F T   J O I N   o r d e r _ s u i t s   o s   O N   o . i d   =   o s . o r d e r _ i d 
 
                 L E F T   J O I N   m e a s u r e m e n t s   m   O N   o s . m e a s u r e m e n t _ i d   =   m . i d 
 
                 W H E R E   o . i d   =   ?   A N D   o . c o m p a n y _ i d   =   ? 
 
                 O R D E R   B Y   o s . s u i t _ n u m b e r 
 
         " ) ; 
 
         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         $ r e s u l t s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
         
 
         i f   ( e m p t y ( $ r e s u l t s ) )   r e t u r n   n u l l ; 
 
         
 
         $ f i r s t   =   $ r e s u l t s [ 0 ] ; 
 
         $ o r d e r _ d a t a   =   [ 
 
                 ' o r d e r _ i d '   = >   $ f i r s t [ ' o r d e r _ i d ' ] , 
 
                 ' o r d e r _ n o '   = >   $ f i r s t [ ' o r d e r _ n o ' ] , 
 
                 ' o r d e r _ d a t e '   = >   $ f i r s t [ ' o r d e r _ d a t e ' ] , 
 
                 ' d e l i v e r y _ d a t e '   = >   $ f i r s t [ ' d e l i v e r y _ d a t e ' ] , 
 
                 ' t o t a l _ s u i t s '   = >   $ f i r s t [ ' t o t a l _ s u i t s ' ]   ? ?   c o u n t ( $ r e s u l t s ) , 
 
                 ' c u s t o m e r '   = >   [ 
 
                         ' i d '   = >   $ f i r s t [ ' c u s t o m e r _ i d ' ] , 
 
                         ' n a m e '   = >   $ f i r s t [ ' c u s t o m e r _ n a m e ' ] , 
 
                         ' p h o n e '   = >   $ f i r s t [ ' c u s t o m e r _ p h o n e ' ] , 
 
                         ' a d d r e s s '   = >   $ f i r s t [ ' c u s t o m e r _ a d d r e s s ' ] 
 
                 ] , 
 
                 ' e m p l o y e e '   = >   [ 
 
                         ' i d '   = >   $ f i r s t [ ' e m p l o y e e _ i d ' ] , 
 
                         ' n a m e '   = >   $ f i r s t [ ' e m p l o y e e _ n a m e ' ]   ? ?   ' N o t   A s s i g n e d ' , 
 
                         ' e m p _ c o d e '   = >   $ f i r s t [ ' e m p _ c o d e ' ]   ? ?   ' ' 
 
                 ] , 
 
                 ' s u i t s '   = >   [ ] 
 
         ] ; 
 
         
 
         f o r e a c h   ( $ r e s u l t s   a s   $ r o w )   { 
 
                 $ o r d e r _ d a t a [ ' s u i t s ' ] [ ]   =   [ 
 
                         ' s u i t _ n u m b e r '   = >   $ r o w [ ' s u i t _ n u m b e r ' ] , 
 
                         ' s u i t _ t y p e '   = >   $ r o w [ ' s u i t _ t y p e ' ] , 
 
                         ' s i z e '   = >   $ r o w [ ' s i z e ' ] , 
 
                         ' c o l o r '   = >   $ r o w [ ' c o l o r ' ] , 
 
                         ' c o l o r _ t y p e '   = >   $ r o w [ ' c o l o r _ t y p e ' ] , 
 
                         ' c u f f _ t y p e '   = >   $ r o w [ ' c u f f _ t y p e ' ] , 
 
                         ' g h e r a _ t y p e '   = >   $ r o w [ ' g h e r a _ t y p e ' ] , 
 
                         ' p r i c e '   = >   $ r o w [ ' p r i c e ' ] , 
 
                         ' m e a s u r e m e n t '   = >   [ 
 
                                 ' i d '   = >   $ r o w [ ' m e a s u r e m e n t _ i d ' ] , 
 
                                 ' d a t e '   = >   $ r o w [ ' m e a s u r e d _ d a t e ' ] , 
 
                                 ' c h e s t '   = >   $ r o w [ ' c h e s t ' ] , 
 
                                 ' w a i s t '   = >   $ r o w [ ' w a i s t ' ] , 
 
                                 ' l o o s i n g '   = >   $ r o w [ ' l o o s i n g ' ] , 
 
                                 ' c u f f _ l e n g t h '   = >   $ r o w [ ' c u f f _ l e n g t h ' ] , 
 
                                 ' c u f f _ w i d t h '   = >   $ r o w [ ' c u f f _ w i d t h ' ] , 
 
                                 ' s i d e p o c k e t '   = >   $ r o w [ ' s i d e p o c k e t ' ] , 
 
                                 ' f r o n t p o c k e t '   = >   $ r o w [ ' f r o n t p o c k e t ' ] , 
 
                                 ' s h a l w a r p o c k e t '   = >   $ r o w [ ' s h a l w a r p o c k e t ' ] , 
 
                                 ' s h a l w a r _ l e n g t h '   = >   $ r o w [ ' s h a l w a r _ l e n g t h ' ] , 
 
                                 ' s h a l w a r _ b o t t o m '   = >   $ r o w [ ' s h a l w a r _ b o t t o m ' ] , 
 
                                 ' s h o u l d e r '   = >   $ r o w [ ' s h o u l d e r ' ] , 
 
                                 ' s l e e v e '   = >   $ r o w [ ' s l e e v e ' ] , 
 
                                 ' s h i r t _ l e n g t h '   = >   $ r o w [ ' s h i r t _ l e n g t h ' ] , 
 
                                 ' c o l l a r '   = >   $ r o w [ ' c o l l a r ' ] , 
 
                                 ' s h e r w a n i '   = >   $ r o w [ ' s h e r w a n i ' ] , 
 
                                 ' n o t e s '   = >   $ r o w [ ' n o t e s ' ] , 
 
                                 ' r e m a r k s '   = >   $ r o w [ ' r e m a r k s ' ] 
 
                         ] 
 
                 ] ; 
 
         } 
 
         
 
         r e t u r n   $ o r d e r _ d a t a ; 
 
 } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A U T O   S U I T   P A Y M E N T S   O N   D E L I V E R Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c a l c u l a t e S u i t P a y m e n t s ( $ o r d e r _ i d )   { 
 
                 $ o r d e r   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   o r d e r s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ o r d e r - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ o r d e r _ d a t a   =   $ o r d e r - > f e t c h ( ) ; 
 
                 i f   ( ! $ o r d e r _ d a t a   | |   $ o r d e r _ d a t a [ ' s t a t u s ' ]   ! =   ' d e l i v e r e d ' )   r e t u r n   f a l s e ; 
 
 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   s u i t _ c o u n t   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ s u i t _ c o u n t   =   $ s t m t - > f e t c h ( ) [ ' s u i t _ c o u n t ' ]   ? ?   0 ; 
 
 
 
                 i f   ( $ s u i t _ c o u n t   = =   0 )   r e t u r n   f a l s e ; 
 
 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e . i d ,   e . n a m e ,   e c . n a m e   a s   c a t e g o r y _ n a m e ,   e c . r a t e   
 
                         F R O M   e m p l o y e e s   e   
 
                         L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d   
 
                         W H E R E   e . c o m p a n y _ i d   =   ?   A N D   e c . p a y m e n t _ t y p e   =   ' p e r _ s u i t '   A N D   e . s t a t u s   =   ' a c t i v e ' 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ e m p l o y e e s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
 
 
                 f o r e a c h   ( $ e m p l o y e e s   a s   $ e m p )   { 
 
                         $ a m o u n t   =   $ s u i t _ c o u n t   *   ( $ e m p [ ' r a t e ' ]   ? ?   0 ) ; 
 
                         i f   ( $ a m o u n t   >   0 )   { 
 
                                 $ t h i s - > a d d T r a n s a c t i o n ( [ 
 
                                         ' e m p l o y e e _ i d '   = >   $ e m p [ ' i d ' ] , 
 
                                         ' o r d e r _ i d '   = >   $ o r d e r _ i d , 
 
                                         ' t y p e '   = >   ' c r e d i t ' , 
 
                                         ' a m o u n t '   = >   $ a m o u n t , 
 
                                         ' d e s c r i p t i o n '   = >   $ e m p [ ' c a t e g o r y _ n a m e ' ]   .   '   p a y m e n t   f o r   '   .   $ s u i t _ c o u n t   .   '   s u i t s   i n   O r d e r   # '   .   $ o r d e r _ i d , 
 
                                         ' t r a n s a c t i o n _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                                 ] ) ; 
 
                         } 
 
                 } 
 
                 r e t u r n   t r u e ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   E m p l o y e e C a t e g o r y   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t A l l ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   e m p l o y e e _ c a t e g o r i e s   W H E R E   c o m p a n y _ i d   =   ?   O R D E R   B Y   n a m e " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   e m p l o y e e _ c a t e g o r i e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   e m p l o y e e _ c a t e g o r i e s   ( n a m e ,   p a y m e n t _ t y p e ,   r a t e ,   r a t e s ,   c o m p a n y _ i d )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p a y m e n t _ t y p e ' ] , 
 
                         $ d a t a [ ' r a t e ' ]   ? ?   0 , 
 
                         $ d a t a [ ' r a t e s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   e m p l o y e e _ c a t e g o r i e s   S E T   n a m e = ? ,   p a y m e n t _ t y p e = ? ,   r a t e = ? ,   r a t e s = ?   W H E R E   i d = ?   A N D   c o m p a n y _ i d = ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' n a m e ' ] , 
 
                         $ d a t a [ ' p a y m e n t _ t y p e ' ] , 
 
                         $ d a t a [ ' r a t e ' ]   ? ?   0 , 
 
                         $ d a t a [ ' r a t e s ' ]   ? ?   n u l l , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   e m p l o y e e _ c a t e g o r i e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   L e d g e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   I N S E R T   L E D G E R   E N T R Y   = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   l e d g e r   ( 
 
                                         c u s t o m e r _ i d ,   o r d e r _ i d ,   t y p e ,   a m o u n t ,   m e t h o d ,   d e s c r i p t i o n ,   t r a n s a c t i o n _ d a t e ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' c u s t o m e r _ i d ' ] , 
 
                         $ d a t a [ ' o r d e r _ i d ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' t y p e ' ] , 
 
                         $ d a t a [ ' a m o u n t ' ] , 
 
                         $ d a t a [ ' m e t h o d ' ]   ? ?   ' c a s h ' , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ] , 
 
                         $ d a t a [ ' t r a n s a c t i o n _ d a t e ' ] , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   I N S E R T   C A S H   L E D G E R   E N T R Y   = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t C a s h ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   c a s h _ l e d g e r   ( 
 
                                         t r a n s a c t i o n _ d a t e ,   d e s c r i p t i o n ,   d e b i t ,   c r e d i t ,   r e f e r e n c e _ i d ,   r e f e r e n c e _ t y p e ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' t r a n s a c t i o n _ d a t e ' ] , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ] , 
 
                         $ d a t a [ ' d e b i t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' c r e d i t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' r e f e r e n c e _ i d ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' r e f e r e n c e _ t y p e ' ]   ? ?   ' o r d e r ' , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   C U S T O M E R   B A L A N C E   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C u s t o m e r B a l a n c e ( $ c u s t o m e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' r e c e i v e '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ r e c e i v e d , 
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' p a y '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ p a i d 
 
                         F R O M   l e d g e r   
 
                         W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 r e t u r n   ( $ r o w [ ' t o t a l _ r e c e i v e d ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ p a i d ' ]   ? ?   0 ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   C U S T O M E R   B A L A N C E   A S   O F   D A T E   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C u s t o m e r B a l a n c e A s O f ( $ c u s t o m e r _ i d ,   $ a s O f D a t e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' r e c e i v e '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ r e c e i v e d , 
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' p a y '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ p a i d 
 
                         F R O M   l e d g e r   
 
                         W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   t r a n s a c t i o n _ d a t e   <   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ t h i s - > c o m p a n y _ i d ,   $ a s O f D a t e ] ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 r e t u r n   ( $ r o w [ ' t o t a l _ r e c e i v e d ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ p a i d ' ]   ? ?   0 ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   C A S H   L E D G E R   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C a s h L e d g e r ( $ f r o m _ d a t e   =   n u l l ,   $ t o _ d a t e   =   n u l l )   { 
 
                 $ s q l   =   " S E L E C T   *   F R O M   c a s h _ l e d g e r   W H E R E   c o m p a n y _ i d   =   ? " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
                 
 
                 i f   ( $ f r o m _ d a t e   & &   $ t o _ d a t e )   { 
 
                         $ s q l   . =   "   A N D   t r a n s a c t i o n _ d a t e   B E T W E E N   ?   A N D   ? " ; 
 
                         $ p a r a m s [ ]   =   $ f r o m _ d a t e ; 
 
                         $ p a r a m s [ ]   =   $ t o _ d a t e ; 
 
                 } 
 
                 
 
                 $ s q l   . =   "   O R D E R   B Y   t r a n s a c t i o n _ d a t e   A S C ,   i d   A S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   C A S H   B A L A N C E   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C a s h B a l a n c e ( $ a s O f D a t e   =   n u l l )   { 
 
                 $ s q l   =   " S E L E C T   
 
                                         S U M ( d e b i t )   a s   t o t a l _ d e b i t , 
 
                                         S U M ( c r e d i t )   a s   t o t a l _ c r e d i t 
 
                                 F R O M   c a s h _ l e d g e r   
 
                                 W H E R E   c o m p a n y _ i d   =   ? " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
                 
 
                 i f   ( $ a s O f D a t e )   { 
 
                         $ s q l   . =   "   A N D   t r a n s a c t i o n _ d a t e   < =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ a s O f D a t e ; 
 
                 } 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 r e t u r n   ( $ r o w [ ' t o t a l _ d e b i t ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ c r e d i t ' ]   ? ?   0 ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   C A S H   T R A N S A C T I O N S   W I T H   R U N N I N G   B A L A N C E   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C a s h T r a n s a c t i o n s W i t h B a l a n c e ( $ f r o m _ d a t e   =   n u l l ,   $ t o _ d a t e   =   n u l l )   { 
 
                 $ s q l   =   " S E L E C T   *   F R O M   c a s h _ l e d g e r   W H E R E   c o m p a n y _ i d   =   ? " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
                 
 
                 i f   ( $ f r o m _ d a t e   & &   $ t o _ d a t e )   { 
 
                         $ s q l   . =   "   A N D   t r a n s a c t i o n _ d a t e   B E T W E E N   ?   A N D   ? " ; 
 
                         $ p a r a m s [ ]   =   $ f r o m _ d a t e ; 
 
                         $ p a r a m s [ ]   =   $ t o _ d a t e ; 
 
                 } 
 
                 
 
                 $ s q l   . =   "   O R D E R   B Y   t r a n s a c t i o n _ d a t e   A S C ,   i d   A S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 $ t r a n s a c t i o n s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 $ r u n n i n g   =   $ t h i s - > g e t C a s h B a l a n c e ( $ f r o m _ d a t e ) ; 
 
                 f o r e a c h   ( $ t r a n s a c t i o n s   a s   & $ t )   { 
 
                         $ r u n n i n g   + =   ( $ t [ ' d e b i t ' ]   ? ?   0 )   -   ( $ t [ ' c r e d i t ' ]   ? ?   0 ) ; 
 
                         $ t [ ' r u n n i n g _ b a l a n c e ' ]   =   $ r u n n i n g ; 
 
                 } 
 
                 
 
                 r e t u r n   $ t r a n s a c t i o n s ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   L e d g e r   { 
 
         p r i v a t e   $ d b ; 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ s q l   =   " I N S E R T   I N T O   l e d g e r   ( c u s t o m e r _ i d ,   o r d e r _ i d ,   t y p e ,   a m o u n t ,   m e t h o d ,   d e s c r i p t i o n ,   t r a n s a c t i o n _ d a t e )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' c u s t o m e r _ i d ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' o r d e r _ i d ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' t y p e ' ] ,   / /   ' r e c e i v e '   o r   ' p a y ' 
 
                         $ d a t a [ ' a m o u n t ' ] , 
 
                         $ d a t a [ ' m e t h o d ' ]   ? ?   ' c a s h ' , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' t r a n s a c t i o n _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   G e t   c u s t o m e r   b a l a n c e   ( t o t a l   r e c e i v e d   -   t o t a l   p a i d ) 
 
         p u b l i c   f u n c t i o n   g e t C u s t o m e r B a l a n c e ( $ c u s t o m e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' r e c e i v e '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ r e c e i v e d , 
 
                                 S U M ( C A S E   W H E N   t y p e   =   ' p a y '   T H E N   a m o u n t   E L S E   0   E N D )   a s   t o t a l _ p a i d 
 
                         F R O M   l e d g e r   
 
                         W H E R E   c u s t o m e r _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ] ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 / /   B a l a n c e   =   r e c e i v e d   -   p a i d   ( p o s i t i v e   m e a n s   c u s t o m e r   o w e s   u s ) 
 
                 r e t u r n   ( $ r o w [ ' t o t a l _ r e c e i v e d ' ]   ? ?   0 )   -   ( $ r o w [ ' t o t a l _ p a i d ' ]   ? ?   0 ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   M e a s u r e m e n t   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / * * 
 
           *   g e t B y C u s t o m e r   -          &        R     &    &   m e a s u r e m e n t s                  R  
 
           *   @ p a r a m   i n t | s t r i n g   $ c u s t o m e r _ i d     ( i n t e g e r   I D    R    c u s t o m e r _ n o   s t r i n g ) 
 
           *   @ r e t u r n   a r r a y        &    &      R                             R   R        &   l o w e r c a s e    &  R               
 
           * / 
 
         p u b l i c   f u n c t i o n   g e t B y C u s t o m e r ( $ c u s t o m e r _ i d )   { 
 
                 / /           $ c u s t o m e r _ i d           ( i n t e g e r )                        c u s t o m e r _ n o                  R  
 
                 i f   ( i s _ n u m e r i c ( $ c u s t o m e r _ i d ) )   { 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   c u s t o m e r _ n o   F R O M   c u s t o m e r s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         $ c u s t   =   $ s t m t - > f e t c h ( ) ; 
 
                         i f   ( ! $ c u s t )   { 
 
                                 r e t u r n   [ ] ;   / /          &      &               R  
 
                         } 
 
                         $ c u s t o m e r _ n o   =   $ c u s t [ ' c u s t o m e r _ n o ' ] ; 
 
                 }   e l s e   { 
 
                         / /                          R                                c u s t o m e r _ n o        R         R        
 
                         $ c u s t o m e r _ n o   =   $ c u s t o m e r _ i d ; 
 
                 } 
 
 
 
                 / /         m e a s u r e m e n t s        c u s t o m e r _ n o      R        R                           R  
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   m e a s u r e m e n t s   W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   O R D E R   B Y   m e a s u r e d _ d a t e   D E S C " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ n o ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ d a t a   =   $ s t m t - > f e t c h A l l ( ) ; 
 
 
 
                 / /      &    &          &          l o w e r c a s e    &  R           R         R              J a v a S c r i p t                    &                   
 
                 r e t u r n   a r r a y _ m a p ( f u n c t i o n ( $ r o w )   { 
 
                         $ n e w R o w   =   [ ] ; 
 
                         f o r e a c h   ( $ r o w   a s   $ k e y   = >   $ v a l u e )   { 
 
                                 $ n e w R o w [ s t r t o l o w e r ( $ k e y ) ]   =   $ v a l u e ; 
 
                         } 
 
                         r e t u r n   $ n e w R o w ; 
 
                 } ,   $ d a t a ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   S I N G L E   M E A S U R E M E N T   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   m e a s u r e m e n t s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ d a t a   =   $ s t m t - > f e t c h ( ) ; 
 
                 i f   ( $ d a t a )   { 
 
                         $ n e w R o w   =   [ ] ; 
 
                         f o r e a c h   ( $ d a t a   a s   $ k e y   = >   $ v a l u e )   { 
 
                                 $ n e w R o w [ s t r t o l o w e r ( $ k e y ) ]   =   $ v a l u e ; 
 
                         } 
 
                         r e t u r n   $ n e w R o w ; 
 
                 } 
 
                 r e t u r n   n u l l ; 
 
         } 
 
 
 
         / /   = = = = =   I N S E R T   = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
 
 
                 / /    R   R    R            R          c u s t o m e r _ i d            c u s t o m e r _ n o   ( s t r i n g )    &             
 
                 $ c u s t o m e r _ n o   =   $ d a t a [ ' c u s t o m e r _ i d ' ] ; 
 
                 i f   ( i s _ n u m e r i c ( $ c u s t o m e r _ n o ) )   { 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   c u s t o m e r _ n o   F R O M   c u s t o m e r s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ n o ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         $ c u s t   =   $ s t m t - > f e t c h ( ) ; 
 
                         i f   ( $ c u s t )   { 
 
                                 $ c u s t o m e r _ n o   =   $ c u s t [ ' c u s t o m e r _ n o ' ] ; 
 
                         }   e l s e   { 
 
                                 r e t u r n   f a l s e ;   / /          &           R     &     
 
                         } 
 
                 } 
 
 
 
                 $ s q l   =   " I N S E R T   I N T O   m e a s u r e m e n t s   ( 
 
                         c u s t o m e r _ i d ,   c h e s t ,   w a i s t ,   L O O S I N G ,   C U F F _ L E N G T H ,   C U F F _ W I D T H , 
 
                         S I D E P O C K E T ,   F R O N T P O C K E T ,   S H A L W A R P O C K E T , 
 
                         S H A L W A R _ L E N G T H ,   S H A L W A R _ B O T T O M ,   s h o u l d e r ,   s l e e v e ,   l e n g t h ,   c o l l a r , 
 
                         S H E R W A N I ,   n o t e s ,   R E M A R K S ,   m e a s u r e d _ d a t e ,   c o m p a n y _ i d 
 
                 )   V A L U E S   ( 
 
                         ? ,   ? ,   ? ,   ? ,   ? ,   ? , 
 
                         ? ,   ? ,   ? , 
 
                         ? ,   ? ,   ? ,   ? ,   ? ,   ? , 
 
                         ? ,   ? ,   ? ,   ? ,   ? 
 
                 ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ c u s t o m e r _ n o , 
 
                         $ d a t a [ ' c h e s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' w a i s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l o o s i n g ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ w i d t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s i d e p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' f r o n t p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ b o t t o m ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h o u l d e r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s l e e v e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c o l l a r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h e r w a n i ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' n o t e s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' r e m a r k s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' m e a s u r e d _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   U P D A T E   = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   m e a s u r e m e n t s   S E T   
 
                         c h e s t = ? ,   w a i s t = ? ,   L O O S I N G = ? ,   C U F F _ L E N G T H = ? ,   C U F F _ W I D T H = ? , 
 
                         S I D E P O C K E T = ? ,   F R O N T P O C K E T = ? ,   S H A L W A R P O C K E T = ? , 
 
                         S H A L W A R _ L E N G T H = ? ,   S H A L W A R _ B O T T O M = ? ,   s h o u l d e r = ? ,   s l e e v e = ? ,   l e n g t h = ? ,   c o l l a r = ? , 
 
                         S H E R W A N I = ? ,   n o t e s = ? ,   R E M A R K S = ? ,   m e a s u r e d _ d a t e = ? 
 
                         W H E R E   i d = ?   A N D   c o m p a n y _ i d = ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' c h e s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' w a i s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l o o s i n g ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ w i d t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s i d e p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' f r o n t p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ b o t t o m ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h o u l d e r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s l e e v e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c o l l a r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h e r w a n i ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' n o t e s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' r e m a r k s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' m e a s u r e d _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   D E L E T E   = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   m e a s u r e m e n t s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   N o t i f i c a t i o n   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   C R E A T E   N O T I F I C A T I O N   = = = = = 
 
         p u b l i c   f u n c t i o n   c r e a t e ( $ t y p e ,   $ m e s s a g e ,   $ l i n k   =   n u l l )   { 
 
                 $ s q l   =   " I N S E R T   I N T O   n o t i f i c a t i o n s   ( c o m p a n y _ i d ,   t y p e ,   m e s s a g e ,   l i n k )   V A L U E S   ( ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ,   $ t y p e ,   $ m e s s a g e ,   $ l i n k ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   A L L   N O T I F I C A T I O N S   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( $ l i m i t   =   1 0 )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   n o t i f i c a t i o n s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   
 
                         O R D E R   B Y   c r e a t e d _ a t   D E S C   
 
                         L I M I T   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ,   $ l i m i t ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   U N R E A D   C O U N T   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t U n r e a d C o u n t ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   n o t i f i c a t i o n s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   i s _ r e a d   =   0 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
         } 
 
 
 
         / /   = = = = =   M A R K   A S   R E A D   = = = = = 
 
         p u b l i c   f u n c t i o n   m a r k A s R e a d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         U P D A T E   n o t i f i c a t i o n s   S E T   i s _ r e a d   =   1   
 
                         W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   M A R K   A L L   A S   R E A D   = = = = = 
 
         p u b l i c   f u n c t i o n   m a r k A l l A s R e a d ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         U P D A T E   n o t i f i c a t i o n s   S E T   i s _ r e a d   =   1   
 
                         W H E R E   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   D E L E T E   N O T I F I C A T I O N   = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         D E L E T E   F R O M   n o t i f i c a t i o n s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   O r d e r   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   O R D E R S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( $ s e a r c h   =   ' ' ,   $ s t a t u s   =   ' ' )   { 
 
                 $ s q l   =   " 
 
                         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   c . p h o n e   a s   c u s t o m e r _ p h o n e 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ? 
 
                 " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
                 
 
                 i f   ( ! e m p t y ( $ s e a r c h ) )   { 
 
                         $ s q l   . =   "   A N D   ( o . o r d e r _ n o   L I K E   ?   O R   c . n a m e   L I K E   ?   O R   c . p h o n e   L I K E   ? ) " ; 
 
                         $ t e r m   =   ' % '   .   $ s e a r c h   .   ' % ' ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                         $ p a r a m s [ ]   =   $ t e r m ; 
 
                 } 
 
                 
 
                 i f   ( ! e m p t y ( $ s t a t u s ) )   { 
 
                         $ s q l   . =   "   A N D   o . s t a t u s   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ s t a t u s ; 
 
                 } 
 
                 
 
                 $ s q l   . =   "   O R D E R   B Y   o . i d   D E S C " ; 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   O R D E R   B Y   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   c . p h o n e   a s   c u s t o m e r _ p h o n e 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   o . i d   =   ?   A N D   o . c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   O R D E R   B Y   O R D E R   N O 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y O r d e r N o ( $ o r d e r _ n o )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   o r d e r s   W H E R E   o r d e r _ n o   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ n o ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E N E R A T E   O R D E R   N O   ( O R D - X X X X ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e n e r a t e O r d e r N o ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   M A X ( C A S T ( S U B S T R I N G ( o r d e r _ n o ,   5 )   A S   U N S I G N E D ) )   a s   m a x _ n o   
 
                         F R O M   o r d e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   o r d e r _ n o   L I K E   ' O R D - % ' 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
                 $ m a x   =   $ r o w [ ' m a x _ n o ' ]   ? ?   0 ; 
 
                 $ n e x t   =   i n t v a l ( $ m a x )   +   1 ; 
 
                 r e t u r n   ' O R D - '   .   s t r _ p a d ( $ n e x t ,   4 ,   ' 0 ' ,   S T R _ P A D _ L E F T ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   O R D E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   o r d e r s   ( 
 
                                         o r d e r _ n o ,   c u s t o m e r _ i d ,   o r d e r _ d a t e ,   d e l i v e r y _ d a t e ,   o r d e r _ t y p e , 
 
                                         t o t a l _ s u i t s ,   t o t a l _ a m o u n t ,   d i s c o u n t ,   n e t _ a m o u n t ,   p a i d _ a m o u n t ,   d u e _ a m o u n t , 
 
                                         s t a t u s ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' o r d e r _ n o ' ] , 
 
                         $ d a t a [ ' c u s t o m e r _ i d ' ] , 
 
                         $ d a t a [ ' o r d e r _ d a t e ' ] , 
 
                         $ d a t a [ ' d e l i v e r y _ d a t e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' o r d e r _ t y p e ' ]   ? ?   ' u n s t i t c h e d ' , 
 
                         $ d a t a [ ' t o t a l _ s u i t s ' ]   ? ?   0 , 
 
                         $ d a t a [ ' t o t a l _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' d i s c o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' n e t _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' p a i d _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' d u e _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   O R D E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   o r d e r s   S E T   
 
                                         c u s t o m e r _ i d   =   ? , 
 
                                         o r d e r _ d a t e   =   ? , 
 
                                         d e l i v e r y _ d a t e   =   ? , 
 
                                         o r d e r _ t y p e   =   ? , 
 
                                         t o t a l _ s u i t s   =   ? , 
 
                                         t o t a l _ a m o u n t   =   ? , 
 
                                         d i s c o u n t   =   ? , 
 
                                         n e t _ a m o u n t   =   ? , 
 
                                         p a i d _ a m o u n t   =   ? , 
 
                                         d u e _ a m o u n t   =   ? , 
 
                                         s t a t u s   =   ? 
 
                                 W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' c u s t o m e r _ i d ' ] , 
 
                         $ d a t a [ ' o r d e r _ d a t e ' ] , 
 
                         $ d a t a [ ' d e l i v e r y _ d a t e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' o r d e r _ t y p e ' ]   ? ?   ' u n s t i t c h e d ' , 
 
                         $ d a t a [ ' t o t a l _ s u i t s ' ]   ? ?   0 , 
 
                         $ d a t a [ ' t o t a l _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' d i s c o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' n e t _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' p a i d _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' d u e _ a m o u n t ' ]   ? ?   0 , 
 
                         $ d a t a [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   O R D E R   S T A T U S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e S t a t u s ( $ o r d e r _ i d ,   $ s t a t u s )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   o r d e r s   S E T   s t a t u s   =   ?   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ s t a t u s ,   $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   O R D E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   o r d e r s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   C U S T O M E R   B A L A N C E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C u s t o m e r B a l a n c e ( $ c u s t o m e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   t y p e   =   ' p a y '   T H E N   a m o u n t   E L S E   0   E N D ) ,   0 )   - 
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   t y p e   =   ' r e c e i v e '   T H E N   a m o u n t   E L S E   0   E N D ) ,   0 )   a s   b a l a n c e 
 
                         F R O M   l e d g e r 
 
                         W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) [ ' b a l a n c e ' ]   ? ?   0 ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   C U S T O M E R   B A L A N C E   A S   O F   D A T E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C u s t o m e r B a l a n c e A s O f ( $ c u s t o m e r _ i d ,   $ d a t e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   t y p e   =   ' p a y '   T H E N   a m o u n t   E L S E   0   E N D ) ,   0 )   - 
 
                                 C O A L E S C E ( S U M ( C A S E   W H E N   t y p e   =   ' r e c e i v e '   T H E N   a m o u n t   E L S E   0   E N D ) ,   0 )   a s   b a l a n c e 
 
                         F R O M   l e d g e r 
 
                         W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   t r a n s a c t i o n _ d a t e   < =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ t h i s - > c o m p a n y _ i d ,   $ d a t e ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) [ ' b a l a n c e ' ]   ? ?   0 ; 
 
         } 
 
 
 
       / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   G E T   O R D E R   I T E M S   W I T H   M E A S U R E M E N T S   ( F O R   R E C E I P T ) 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 p u b l i c   f u n c t i o n   g e t O r d e r I t e m s W i t h M e a s u r e m e n t s ( $ o r d e r _ i d )   { 
 
         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                 S E L E C T   
 
                         o i . * , 
 
                         o s . s i z e , 
 
                         o s . m e a s u r e m e n t _ i d , 
 
                         m . c h e s t ,   m . w a i s t ,   m . s h o u l d e r ,   m . s l e e v e ,   m . l e n g t h ,   
 
                         m . c o l l a r ,   m . L O O S I N G   a s   l o o s i n g ,   m . C U F F _ L E N G T H   a s   c u f f _ l e n g t h ,   
 
                         m . C U F F _ W I D T H   a s   c u f f _ w i d t h ,   m . S I D E P O C K E T   a s   s i d e p o c k e t ,   
 
                         m . F R O N T P O C K E T   a s   f r o n t p o c k e t ,   m . S H A L W A R P O C K E T   a s   s h a l w a r p o c k e t , 
 
                         m . S H A L W A R _ L E N G T H   a s   s h a l w a r _ l e n g t h ,   m . S H A L W A R _ B O T T O M   a s   s h a l w a r _ b o t t o m , 
 
                         m . S H E R W A N I   a s   s h e r w a n i ,   m . n o t e s ,   m . R E M A R K S   a s   r e m a r k s 
 
                 F R O M   o r d e r _ i t e m s   o i 
 
                 L E F T   J O I N   o r d e r _ s u i t s   o s   O N   o i . o r d e r _ i d   =   o s . o r d e r _ i d   
 
                         A N D   o i . i t e m _ n a m e   =   o s . s u i t _ t y p e   
 
                         A N D   o i . q u a n t i t y   =   1 
 
                 L E F T   J O I N   m e a s u r e m e n t s   m   O N   o s . m e a s u r e m e n t _ i d   =   m . i d 
 
                 W H E R E   o i . o r d e r _ i d   =   ?   A N D   o i . c o m p a n y _ i d   =   ? 
 
                 G R O U P   B Y   o i . i d 
 
                 O R D E R   B Y   o i . i d   A S C 
 
         " ) ; 
 
         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         $ i t e m s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
         
 
         / /           o r d e r _ i t e m s    &  R          R    R            R         o r d e r _ s u i t s                  R  
 
         i f   ( e m p t y ( $ i t e m s ) )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 o s . i d , 
 
                                 o s . s u i t _ t y p e   a s   i t e m _ n a m e , 
 
                                 o s . s i z e , 
 
                                 o s . p r i c e   a s   a m o u n t , 
 
                                 o s . p r i c e   a s   r a t e , 
 
                                 1   a s   q u a n t i t y , 
 
                                 o s . m e a s u r e m e n t _ i d , 
 
                                 m . c h e s t ,   m . w a i s t ,   m . s h o u l d e r ,   m . s l e e v e ,   m . l e n g t h ,   
 
                                 m . c o l l a r ,   m . L O O S I N G   a s   l o o s i n g ,   m . C U F F _ L E N G T H   a s   c u f f _ l e n g t h ,   
 
                                 m . C U F F _ W I D T H   a s   c u f f _ w i d t h ,   m . S I D E P O C K E T   a s   s i d e p o c k e t ,   
 
                                 m . F R O N T P O C K E T   a s   f r o n t p o c k e t ,   m . S H A L W A R P O C K E T   a s   s h a l w a r p o c k e t , 
 
                                 m . S H A L W A R _ L E N G T H   a s   s h a l w a r _ l e n g t h ,   m . S H A L W A R _ B O T T O M   a s   s h a l w a r _ b o t t o m , 
 
                                 m . S H E R W A N I   a s   s h e r w a n i ,   m . n o t e s ,   m . R E M A R K S   a s   r e m a r k s 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         L E F T   J O I N   m e a s u r e m e n t s   m   O N   o s . m e a s u r e m e n t _ i d   =   m . i d 
 
                         W H E R E   o s . o r d e r _ i d   =   ?   A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o s . s u i t _ n u m b e r 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ i t e m s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
         
 
         r e t u r n   $ i t e m s ; 
 
 } 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S U I T S   W I T H   M E A S U R E M E N T S   ( F O R   I N V O I C E ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t S u i t s W i t h M e a s u r e m e n t s ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * , 
 
                                       m . c h e s t ,   m . w a i s t ,   m . s h o u l d e r ,   m . s l e e v e ,   m . l e n g t h ,   
 
                                       m . c o l l a r ,   m . L O O S I N G   a s   l o o s i n g ,   m . C U F F _ L E N G T H   a s   c u f f _ l e n g t h ,   
 
                                       m . C U F F _ W I D T H   a s   c u f f _ w i d t h ,   m . S I D E P O C K E T   a s   s i d e p o c k e t ,   
 
                                       m . F R O N T P O C K E T   a s   f r o n t p o c k e t ,   m . S H A L W A R P O C K E T   a s   s h a l w a r p o c k e t , 
 
                                       m . S H A L W A R _ L E N G T H   a s   s h a l w a r _ l e n g t h ,   m . S H A L W A R _ B O T T O M   a s   s h a l w a r _ b o t t o m , 
 
                                       m . S H E R W A N I   a s   s h e r w a n i ,   m . n o t e s ,   m . R E M A R K S   a s   r e m a r k s , 
 
                                       m . m e a s u r e d _ d a t e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         L E F T   J O I N   m e a s u r e m e n t s   m   O N   o s . m e a s u r e m e n t _ i d   =   m . i d 
 
                         W H E R E   o s . o r d e r _ i d   =   ?   A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o s . s u i t _ n u m b e r 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ s u i t s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 / /   C o n v e r t   m e a s u r e m e n t   t o   a r r a y 
 
                 f o r e a c h   ( $ s u i t s   a s   & $ s u i t )   { 
 
                         $ s u i t [ ' m e a s u r e m e n t ' ]   =   [ 
 
                                 ' c h e s t '   = >   $ s u i t [ ' c h e s t ' ]   ? ?   n u l l , 
 
                                 ' w a i s t '   = >   $ s u i t [ ' w a i s t ' ]   ? ?   n u l l , 
 
                                 ' s h o u l d e r '   = >   $ s u i t [ ' s h o u l d e r ' ]   ? ?   n u l l , 
 
                                 ' s l e e v e '   = >   $ s u i t [ ' s l e e v e ' ]   ? ?   n u l l , 
 
                                 ' l e n g t h '   = >   $ s u i t [ ' l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' c o l l a r '   = >   $ s u i t [ ' c o l l a r ' ]   ? ?   n u l l , 
 
                                 ' l o o s i n g '   = >   $ s u i t [ ' l o o s i n g ' ]   ? ?   n u l l , 
 
                                 ' c u f f _ l e n g t h '   = >   $ s u i t [ ' c u f f _ l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' c u f f _ w i d t h '   = >   $ s u i t [ ' c u f f _ w i d t h ' ]   ? ?   n u l l , 
 
                                 ' s i d e p o c k e t '   = >   $ s u i t [ ' s i d e p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' f r o n t p o c k e t '   = >   $ s u i t [ ' f r o n t p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r p o c k e t '   = >   $ s u i t [ ' s h a l w a r p o c k e t ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r _ l e n g t h '   = >   $ s u i t [ ' s h a l w a r _ l e n g t h ' ]   ? ?   n u l l , 
 
                                 ' s h a l w a r _ b o t t o m '   = >   $ s u i t [ ' s h a l w a r _ b o t t o m ' ]   ? ?   n u l l , 
 
                                 ' s h e r w a n i '   = >   $ s u i t [ ' s h e r w a n i ' ]   ? ?   n u l l , 
 
                                 ' n o t e s '   = >   $ s u i t [ ' n o t e s ' ]   ? ?   n u l l , 
 
                                 ' r e m a r k s '   = >   $ s u i t [ ' r e m a r k s ' ]   ? ?   n u l l , 
 
                                 ' m e a s u r e d _ d a t e '   = >   $ s u i t [ ' m e a s u r e d _ d a t e ' ]   ? ?   n u l l 
 
                         ] ; 
 
                 } 
 
                 
 
                 r e t u r n   $ s u i t s ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   L A S T   I N S E R T   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t L a s t I n s e r t I d ( )   { 
 
                 r e t u r n   $ t h i s - > d b - > l a s t I n s e r t I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   O R D E R   C O U N T   B Y   S T A T U S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C o u n t B y S t a t u s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   s t a t u s ,   C O U N T ( * )   a s   c o u n t   
 
                         F R O M   o r d e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ? 
 
                         G R O U P   B Y   s t a t u s 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r e s u l t   =   [ ] ; 
 
                 f o r e a c h   ( $ s t m t - > f e t c h A l l ( )   a s   $ r o w )   { 
 
                         $ r e s u l t [ $ r o w [ ' s t a t u s ' ] ]   =   $ r o w [ ' c o u n t ' ] ; 
 
                 } 
 
                 r e t u r n   $ r e s u l t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   O R D E R   B Y   C U S T O M E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y C u s t o m e r ( $ c u s t o m e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   o r d e r s   
 
                         W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   T O T A L   A M O U N T   B Y   D A T E   R A N G E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t T o t a l B y D a t e R a n g e ( $ f r o m _ d a t e ,   $ t o _ d a t e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 S U M ( t o t a l _ a m o u n t )   a s   t o t a l _ a m o u n t , 
 
                                 S U M ( p a i d _ a m o u n t )   a s   p a i d _ a m o u n t , 
 
                                 S U M ( d u e _ a m o u n t )   a s   d u e _ a m o u n t , 
 
                                 C O U N T ( * )   a s   t o t a l _ o r d e r s 
 
                         F R O M   o r d e r s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   o r d e r _ d a t e   B E T W E E N   ?   A N D   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   O r d e r R a t e   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t A l l ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   o r d e r _ r a t e s   W H E R E   c o m p a n y _ i d   =   ?   O R D E R   B Y   t y p e ,   s i z e " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t R a t e ( $ t y p e ,   $ s i z e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   o r d e r _ r a t e s   W H E R E   t y p e   =   ?   A N D   s i z e   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t y p e ,   $ s i z e ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   o r d e r _ r a t e s   ( t y p e ,   s i z e ,   r a t e ,   c u t t i n g _ r a t e ,   s t i t c h i n g _ r a t e ,   s t i t c h i n g _ e x p e n s e s ,   c o m p a n y _ i d )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' t y p e ' ] , 
 
                         $ d a t a [ ' s i z e ' ] , 
 
                         $ d a t a [ ' r a t e ' ] , 
 
                         $ d a t a [ ' c u t t i n g _ r a t e ' ]   ? ?   0 , 
 
                         $ d a t a [ ' s t i t c h i n g _ r a t e ' ]   ? ?   0 , 
 
                         $ d a t a [ ' s t i t c h i n g _ e x p e n s e s ' ]   ? ?   0 , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   o r d e r _ r a t e s   S E T   t y p e = ? ,   s i z e = ? ,   r a t e = ? ,   c u t t i n g _ r a t e = ? ,   s t i t c h i n g _ r a t e = ? ,   s t i t c h i n g _ e x p e n s e s = ?   
 
                                 W H E R E   i d = ?   A N D   c o m p a n y _ i d = ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' t y p e ' ] , 
 
                         $ d a t a [ ' s i z e ' ] , 
 
                         $ d a t a [ ' r a t e ' ] , 
 
                         $ d a t a [ ' c u t t i n g _ r a t e ' ]   ? ?   0 , 
 
                         $ d a t a [ ' s t i t c h i n g _ r a t e ' ]   ? ?   0 , 
 
                         $ d a t a [ ' s t i t c h i n g _ e x p e n s e s ' ]   ? ?   0 , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   o r d e r _ r a t e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t T y p e s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   D I S T I N C T   t y p e   F R O M   o r d e r _ r a t e s   W H E R E   c o m p a n y _ i d   =   ?   O R D E R   B Y   t y p e " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         p u b l i c   f u n c t i o n   g e t S i z e s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   D I S T I N C T   s i z e   F R O M   o r d e r _ r a t e s   W H E R E   c o m p a n y _ i d   =   ?   O R D E R   B Y   s i z e " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   O r d e r S u i t   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   S U I T S   B Y   O R D E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y O r d e r ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * ,   
 
                                       m . c h e s t ,   m . w a i s t ,   m . s h o u l d e r ,   m . s l e e v e ,   m . l e n g t h , 
 
                                       m . c o l l a r ,   m . L O O S I N G   a s   l o o s i n g , 
 
                                       c u t _ e m p . n a m e   a s   c u t t e r _ n a m e , 
 
                                       s t i t c h _ e m p . n a m e   a s   s t i t c h e r _ n a m e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         L E F T   J O I N   m e a s u r e m e n t s   m   O N   o s . m e a s u r e m e n t _ i d   =   m . i d 
 
                         L E F T   J O I N   e m p l o y e e s   c u t _ e m p   O N   o s . c u t t i n g _ e m p l o y e e _ i d   =   c u t _ e m p . i d 
 
                         L E F T   J O I N   e m p l o y e e s   s t i t c h _ e m p   O N   o s . s t i t c h i n g _ e m p l o y e e _ i d   =   s t i t c h _ e m p . i d 
 
                         W H E R E   o s . o r d e r _ i d   =   ?   A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o s . s u i t _ n u m b e r 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S U I T   B Y   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * ,   o . c u s t o m e r _ i d , 
 
                                       m . c h e s t ,   m . w a i s t ,   m . s h o u l d e r ,   m . s l e e v e ,   m . l e n g t h , 
 
                                       m . c o l l a r ,   m . L O O S I N G   a s   l o o s i n g , 
 
                                       c u t _ e m p . n a m e   a s   c u t t e r _ n a m e , 
 
                                       s t i t c h _ e m p . n a m e   a s   s t i t c h e r _ n a m e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         L E F T   J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   m e a s u r e m e n t s   m   O N   o s . m e a s u r e m e n t _ i d   =   m . i d 
 
                         L E F T   J O I N   e m p l o y e e s   c u t _ e m p   O N   o s . c u t t i n g _ e m p l o y e e _ i d   =   c u t _ e m p . i d 
 
                         L E F T   J O I N   e m p l o y e e s   s t i t c h _ e m p   O N   o s . s t i t c h i n g _ e m p l o y e e _ i d   =   s t i t c h _ e m p . i d 
 
                         W H E R E   o s . i d   =   ?   A N D   o s . c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   2 :   G E T   P E N D I N G   C U T T I N G   S U I T S   ( s t a t u s   =   ' p e n d i n g ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t P e n d i n g C u t t i n g ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * ,   o . o r d e r _ n o ,   c . n a m e   a s   c u s t o m e r _ n a m e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   o s . s t a t u s   =   ' p e n d i n g '   A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   3 :   G E T   A S S I G N E D   C U T T I N G   S U I T S   ( s t a t u s   =   ' c u t t i n g '   A N D   c u t t i n g _ c o m p l e t e d _ d a t e   I S   N U L L ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A s s i g n e d C u t t i n g ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * ,   o . o r d e r _ n o ,   c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       e . n a m e   a s   c u t t e r _ n a m e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   o s . c u t t i n g _ e m p l o y e e _ i d   =   e . i d 
 
                         W H E R E   o s . s t a t u s   =   ' c u t t i n g '   
 
                             A N D   o s . c u t t i n g _ c o m p l e t e d _ d a t e   I S   N U L L 
 
                             A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   4 :   G E T   P E N D I N G   S T I T C H I N G   S U I T S   ( s t a t u s   =   ' c u t t i n g '   A N D   c u t t i n g _ c o m p l e t e d _ d a t e   I S   N O T   N U L L ) 
 
         / /               &    &                R       R                 R         &          
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t P e n d i n g S t i t c h i n g ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * ,   o . o r d e r _ n o ,   c . n a m e   a s   c u s t o m e r _ n a m e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   o s . s t a t u s   =   ' c u t t i n g '   
 
                             A N D   o s . c u t t i n g _ c o m p l e t e d _ d a t e   I S   N O T   N U L L 
 
                             A N D   o s . c u t t i n g _ e m p l o y e e _ i d   I S   N O T   N U L L 
 
                             A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   5 :   G E T   A S S I G N E D   S T I T C H I N G   S U I T S   ( s t a t u s   =   ' s t i t c h i n g ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A s s i g n e d S t i t c h i n g ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * ,   o . o r d e r _ n o ,   c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       e . n a m e   a s   s t i t c h e r _ n a m e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   o s . s t i t c h i n g _ e m p l o y e e _ i d   =   e . i d 
 
                         W H E R E   o s . s t a t u s   =   ' s t i t c h i n g '   A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   6 :   G E T   R E A D Y   S U I T S   ( s t a t u s   =   ' r e a d y ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t R e a d y S u i t s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o s . * ,   o . o r d e r _ n o ,   c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       e . n a m e   a s   s t i t c h e r _ n a m e 
 
                         F R O M   o r d e r _ s u i t s   o s 
 
                         J O I N   o r d e r s   o   O N   o s . o r d e r _ i d   =   o . i d 
 
                         J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   o s . s t i t c h i n g _ e m p l o y e e _ i d   =   e . i d 
 
                         W H E R E   o s . s t a t u s   =   ' r e a d y '   A N D   o s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o . o r d e r _ d a t e   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   N E W   S U I T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   o r d e r _ s u i t s   ( 
 
                                         o r d e r _ i d ,   s u i t _ n u m b e r ,   s u i t _ t y p e ,   s i z e ,   c o l o r ,   c o l o r _ t y p e , 
 
                                         c u f f _ t y p e ,   g h e r a _ t y p e ,   m e a s u r e m e n t _ i d ,   p r i c e ,   s t a t u s ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' o r d e r _ i d ' ] , 
 
                         $ d a t a [ ' s u i t _ n u m b e r ' ] , 
 
                         $ d a t a [ ' s u i t _ t y p e ' ] , 
 
                         $ d a t a [ ' s i z e ' ]   ? ?   ' L a r g e ' , 
 
                         $ d a t a [ ' c o l o r ' ]   ? ?   ' ' , 
 
                         $ d a t a [ ' c o l o r _ t y p e ' ]   ? ?   ' c o l o r e d ' , 
 
                         $ d a t a [ ' c u f f _ t y p e ' ]   ? ?   ' c u f f ' , 
 
                         $ d a t a [ ' g h e r a _ t y p e ' ]   ? ?   ' r o u n d ' , 
 
                         $ d a t a [ ' m e a s u r e m e n t _ i d ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' p r i c e ' ]   ? ?   0 , 
 
                         $ d a t a [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   S U I T   S T A T U S   ( w i t h   o p t i o n a l   a d d i t i o n a l   f i e l d s ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e S t a t u s ( $ i d ,   $ s t a t u s ,   $ d a t a   =   [ ] )   { 
 
                 $ s q l   =   " U P D A T E   o r d e r _ s u i t s   S E T   s t a t u s   =   ? " ; 
 
                 $ p a r a m s   =   [ $ s t a t u s ] ; 
 
 
 
                 i f   ( ! e m p t y ( $ d a t a ) )   { 
 
                         i f   ( i s s e t ( $ d a t a [ ' c u t t i n g _ e m p l o y e e _ i d ' ] ) )   { 
 
                                 $ s q l   . =   " ,   c u t t i n g _ e m p l o y e e _ i d   =   ? " ; 
 
                                 $ p a r a m s [ ]   =   $ d a t a [ ' c u t t i n g _ e m p l o y e e _ i d ' ] ; 
 
                         } 
 
                         i f   ( i s s e t ( $ d a t a [ ' s t i t c h i n g _ e m p l o y e e _ i d ' ] ) )   { 
 
                                 $ s q l   . =   " ,   s t i t c h i n g _ e m p l o y e e _ i d   =   ? " ; 
 
                                 $ p a r a m s [ ]   =   $ d a t a [ ' s t i t c h i n g _ e m p l o y e e _ i d ' ] ; 
 
                         } 
 
                         i f   ( i s s e t ( $ d a t a [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ] ) )   { 
 
                                 $ s q l   . =   " ,   c u t t i n g _ c o m p l e t e d _ d a t e   =   ? " ; 
 
                                 $ p a r a m s [ ]   =   $ d a t a [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ] ; 
 
                         } 
 
                         i f   ( i s s e t ( $ d a t a [ ' s t i t c h i n g _ c o m p l e t e d _ d a t e ' ] ) )   { 
 
                                 $ s q l   . =   " ,   s t i t c h i n g _ c o m p l e t e d _ d a t e   =   ? " ; 
 
                                 $ p a r a m s [ ]   =   $ d a t a [ ' s t i t c h i n g _ c o m p l e t e d _ d a t e ' ] ; 
 
                         } 
 
                         i f   ( i s s e t ( $ d a t a [ ' d e l i v e r y _ d a t e ' ] ) )   { 
 
                                 $ s q l   . =   " ,   d e l i v e r y _ d a t e   =   ? " ; 
 
                                 $ p a r a m s [ ]   =   $ d a t a [ ' d e l i v e r y _ d a t e ' ] ; 
 
                         } 
 
                 } 
 
 
 
                 $ s q l   . =   "   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ; 
 
                 $ p a r a m s [ ]   =   $ i d ; 
 
                 $ p a r a m s [ ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ r e s u l t   =   $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
 
 
                 i f   ( $ r e s u l t )   { 
 
                         / /   U p d a t e   o r d e r   s t a t u s   a u t o m a t i c a l l y 
 
                         $ s u i t   =   $ t h i s - > g e t B y I d ( $ i d ) ; 
 
                         i f   ( $ s u i t )   { 
 
                                 $ t h i s - > u p d a t e O r d e r S t a t u s ( $ s u i t [ ' o r d e r _ i d ' ] ) ; 
 
                         } 
 
                 } 
 
 
 
                 r e t u r n   $ r e s u l t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   2 :   A S S I G N   C U T T I N G   ( s t a t u s   - >   ' c u t t i n g ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a s s i g n C u t t i n g ( $ s u i t _ i d ,   $ e m p l o y e e _ i d )   { 
 
                 r e t u r n   $ t h i s - > u p d a t e S t a t u s ( $ s u i t _ i d ,   ' c u t t i n g ' ,   [ 
 
                         ' c u t t i n g _ e m p l o y e e _ i d '   = >   $ e m p l o y e e _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   3 :   C O M P L E T E   C U T T I N G   ( s t a t u s   r e m a i n s   ' c u t t i n g ' ,   s e t   c o m p l e t e d   d a t e ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c o m p l e t e C u t t i n g ( $ s u i t _ i d )   { 
 
                 r e t u r n   $ t h i s - > u p d a t e S t a t u s ( $ s u i t _ i d ,   ' c u t t i n g ' ,   [ 
 
                         ' c u t t i n g _ c o m p l e t e d _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   5 :   A S S I G N   S T I T C H I N G   ( s t a t u s   - >   ' s t i t c h i n g ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a s s i g n S t i t c h i n g ( $ s u i t _ i d ,   $ e m p l o y e e _ i d )   { 
 
                 r e t u r n   $ t h i s - > u p d a t e S t a t u s ( $ s u i t _ i d ,   ' s t i t c h i n g ' ,   [ 
 
                         ' s t i t c h i n g _ e m p l o y e e _ i d '   = >   $ e m p l o y e e _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   6 :   C O M P L E T E   S T I T C H I N G   ( s t a t u s   - >   ' r e a d y ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   c o m p l e t e S t i t c h i n g ( $ s u i t _ i d )   { 
 
                 r e t u r n   $ t h i s - > u p d a t e S t a t u s ( $ s u i t _ i d ,   ' r e a d y ' ,   [ 
 
                         ' s t i t c h i n g _ c o m p l e t e d _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   S T E P   7 :   D E L I V E R   S U I T   ( s t a t u s   - >   ' d e l i v e r e d ' ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l i v e r S u i t ( $ s u i t _ i d )   { 
 
                 r e t u r n   $ t h i s - > u p d a t e S t a t u s ( $ s u i t _ i d ,   ' d e l i v e r e d ' ,   [ 
 
                         ' d e l i v e r y _ d a t e '   = >   d a t e ( ' Y - m - d ' ) 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   O R D E R   S T A T U S   B A S E D   O N   I T S   S U I T S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e O r d e r S t a t u s ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   s t a t u s ,   C O U N T ( * )   a s   c o u n t   
 
                         F R O M   o r d e r _ s u i t s   
 
                         W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                         G R O U P   B Y   s t a t u s 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ s t a t u s e s   =   [ ] ; 
 
                 f o r e a c h   ( $ s t m t - > f e t c h A l l ( )   a s   $ r o w )   { 
 
                         $ s t a t u s e s [ $ r o w [ ' s t a t u s ' ] ]   =   $ r o w [ ' c o u n t ' ] ; 
 
                 } 
 
 
 
                 i f   ( e m p t y ( $ s t a t u s e s ) )   { 
 
                         $ n e w _ s t a t u s   =   ' p e n d i n g ' ; 
 
                 }   e l s e   { 
 
                         / /   A g a r   k o i   p e n d i n g   h a i 
 
                         i f   ( i s s e t ( $ s t a t u s e s [ ' p e n d i n g ' ] )   & &   $ s t a t u s e s [ ' p e n d i n g ' ]   >   0 )   { 
 
                                 $ n e w _ s t a t u s   =   ' p e n d i n g ' ; 
 
                         } 
 
                         / /   A g a r   k o i   c u t t i n g   h a i   ( a u r   c o m p l e t e   n a h i   h u i ) 
 
                         e l s e i f   ( i s s e t ( $ s t a t u s e s [ ' c u t t i n g ' ] ) )   { 
 
                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                         S E L E C T   C O U N T ( * )   a s   c u t t i n g _ n o t _ d o n e 
 
                                         F R O M   o r d e r _ s u i t s 
 
                                         W H E R E   o r d e r _ i d   =   ?   A N D   s t a t u s   =   ' c u t t i n g '   A N D   c u t t i n g _ c o m p l e t e d _ d a t e   I S   N U L L 
 
                                 " ) ; 
 
                                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ] ) ; 
 
                                 $ c u t t i n g _ n o t _ d o n e   =   $ s t m t - > f e t c h ( ) [ ' c u t t i n g _ n o t _ d o n e ' ]   ? ?   0 ; 
 
 
 
                                 i f   ( $ c u t t i n g _ n o t _ d o n e   >   0 )   { 
 
                                         $ n e w _ s t a t u s   =   ' c u t t i n g ' ; 
 
                                 }   e l s e   { 
 
                                         / /   S a b   c u t t i n g   c o m p l e t e   h o   g a y i 
 
                                         i f   ( i s s e t ( $ s t a t u s e s [ ' s t i t c h i n g ' ] )   & &   $ s t a t u s e s [ ' s t i t c h i n g ' ]   >   0 )   { 
 
                                                 $ n e w _ s t a t u s   =   ' s t i t c h i n g ' ; 
 
                                         }   e l s e i f   ( i s s e t ( $ s t a t u s e s [ ' r e a d y ' ] )   & &   $ s t a t u s e s [ ' r e a d y ' ]   >   0 )   { 
 
                                                 $ n e w _ s t a t u s   =   ' r e a d y ' ; 
 
                                         }   e l s e i f   ( i s s e t ( $ s t a t u s e s [ ' d e l i v e r e d ' ] )   & &   c o u n t ( $ s t a t u s e s )   = =   1 )   { 
 
                                                 $ n e w _ s t a t u s   =   ' d e l i v e r e d ' ; 
 
                                         }   e l s e   { 
 
                                                 $ n e w _ s t a t u s   =   ' s t i t c h i n g ' ;   / /   S t i t c h i n g   k e   l i y e   r e a d y 
 
                                         } 
 
                                 } 
 
                         } 
 
                         / /   A g a r   k o i   s t i t c h i n g   h a i 
 
                         e l s e i f   ( i s s e t ( $ s t a t u s e s [ ' s t i t c h i n g ' ] )   & &   $ s t a t u s e s [ ' s t i t c h i n g ' ]   >   0 )   { 
 
                                 $ n e w _ s t a t u s   =   ' s t i t c h i n g ' ; 
 
                         } 
 
                         / /   A g a r   k o i   r e a d y   h a i 
 
                         e l s e i f   ( i s s e t ( $ s t a t u s e s [ ' r e a d y ' ] )   & &   $ s t a t u s e s [ ' r e a d y ' ]   >   0 )   { 
 
                                 $ n e w _ s t a t u s   =   ' r e a d y ' ; 
 
                         } 
 
                         / /   A g a r   s a b   d e l i v e r e d   h a i n 
 
                         e l s e i f   ( i s s e t ( $ s t a t u s e s [ ' d e l i v e r e d ' ] )   & &   c o u n t ( $ s t a t u s e s )   = =   1 )   { 
 
                                 $ n e w _ s t a t u s   =   ' d e l i v e r e d ' ; 
 
                         } 
 
                         / /   A g a r   c a n c e l l e d 
 
                         e l s e i f   ( i s s e t ( $ s t a t u s e s [ ' c a n c e l l e d ' ] )   & &   c o u n t ( $ s t a t u s e s )   = =   1 )   { 
 
                                 $ n e w _ s t a t u s   =   ' c a n c e l l e d ' ; 
 
                         }   e l s e   { 
 
                                 $ n e w _ s t a t u s   =   ' p e n d i n g ' ; 
 
                         } 
 
                 } 
 
 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   o r d e r s   S E T   s t a t u s   =   ?   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ n e w _ s t a t u s ,   $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   S U I T S   B Y   O R D E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e B y O r d e r ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   S I N G L E   S U I T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   o r d e r _ s u i t s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 c l a s s   S h e l f   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   S H E L V E S   (    &    &      R     R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   s . * , 
 
                                       o . o r d e r _ n o , 
 
                                       o . o r d e r _ d a t e , 
 
                                       c . n a m e   a s   c u s t o m e r _ n a m e 
 
                         F R O M   s h e l v e s   s 
 
                         L E F T   J O I N   o r d e r s   o   O N   s . o r d e r _ i d   =   o . i d   A N D   o . c o m p a n y _ i d   =   s . c o m p a n y _ i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   
 
                                 C A S E   s . s t a t u s   
 
                                         W H E N   ' a v a i l a b l e '   T H E N   1 
 
                                         W H E N   ' o c c u p i e d '   T H E N   2 
 
                                         W H E N   ' m a i n t e n a n c e '   T H E N   3 
 
                                         E L S E   4 
 
                                 E N D , 
 
                                 s . s h e l f _ n u m b e r   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A V A I L A B L E   S H E L V E S   (        R         R     R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A v a i l a b l e ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   s h e l v e s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   
 
                         A N D   ( o r d e r _ i d   I S   N U L L   O R   o r d e r _ i d   =   0 ) 
 
                         A N D   s t a t u s   =   ' a v a i l a b l e ' 
 
                         O R D E R   B Y   s h e l f _ n u m b e r   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A V A I L A B L E   S H E L V E S   W I T H   D E T A I L S   (    &      R           &            R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A v a i l a b l e W i t h D e t a i l s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   i d ,   s h e l f _ n a m e ,   s h e l f _ n u m b e r ,   r a c k _ l o c a t i o n ,   c a p a c i t y ,   d e s c r i p t i o n 
 
                         F R O M   s h e l v e s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   
 
                         A N D   ( o r d e r _ i d   I S   N U L L   O R   o r d e r _ i d   =   0 ) 
 
                         A N D   s t a t u s   =   ' a v a i l a b l e ' 
 
                         O R D E R   B Y   s h e l f _ n u m b e r   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S H E L F   B Y   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   s h e l v e s   
 
                         W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S H E L F   B Y   O R D E R   I D   (             R     R    ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y O r d e r I d ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   s h e l v e s   
 
                         W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   A S S I G N   S H E L F   T O   O R D E R   (    R            R         R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   a s s i g n S h e l f T o O r d e r ( $ o r d e r _ i d ,   $ s h e l f _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         U P D A T E   s h e l v e s   
 
                         S E T   o r d e r _ i d   =   ? ,   s t a t u s   =   ' o c c u p i e d '   
 
                         W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' a v a i l a b l e ' 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ s h e l f _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U N A S S I G N   S H E L F   (    R             R       R    -     R   R    R             ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u n a s s i g n S h e l f ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         U P D A T E   s h e l v e s   
 
                         S E T   o r d e r _ i d   =   N U L L ,   s t a t u s   =   ' a v a i l a b l e '   
 
                         W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   R E L E A S E   S H E L F   ( u n a s s i g n S h e l f          &                   &   -    &                      R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   r e l e a s e S h e l f ( $ o r d e r _ i d )   { 
 
                 r e t u r n   $ t h i s - > u n a s s i g n S h e l f ( $ o r d e r _ i d ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   S H E L F   (       R     R           &          R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   s h e l v e s   ( 
 
                                         s h e l f _ n a m e ,   s h e l f _ n u m b e r ,   r a c k _ l o c a t i o n ,   c a p a c i t y ,   
 
                                         d e s c r i p t i o n ,   s t a t u s ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' s h e l f _ n a m e ' ] , 
 
                         $ d a t a [ ' s h e l f _ n u m b e r ' ] , 
 
                         $ d a t a [ ' r a c k _ l o c a t i o n ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c a p a c i t y ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s t a t u s ' ]   ? ?   ' a v a i l a b l e ' , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   S H E L F   (    R       &  R         &  R & ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   s h e l v e s   S E T   
 
                                         s h e l f _ n a m e   =   ? , 
 
                                         s h e l f _ n u m b e r   =   ? , 
 
                                         r a c k _ l o c a t i o n   =   ? , 
 
                                         c a p a c i t y   =   ? , 
 
                                         d e s c r i p t i o n   =   ? , 
 
                                         s t a t u s   =   ? 
 
                                 W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' s h e l f _ n a m e ' ] , 
 
                         $ d a t a [ ' s h e l f _ n u m b e r ' ] , 
 
                         $ d a t a [ ' r a c k _ l o c a t i o n ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c a p a c i t y ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' d e s c r i p t i o n ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s t a t u s ' ]   ? ?   ' a v a i l a b l e ' , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   S H E L F   (    R                   R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 / /                 R         R             R           R                      R               R  
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   o r d e r _ i d ,   s t a t u s   F R O M   s h e l v e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ s h e l f   =   $ s t m t - > f e t c h ( ) ; 
 
                 
 
                 i f   ( $ s h e l f   & &   ! e m p t y ( $ s h e l f [ ' o r d e r _ i d ' ] ) )   { 
 
                         r e t u r n   f a l s e ;   / /      R            R         R                R                  
 
                 } 
 
                 
 
                 i f   ( $ s h e l f   & &   $ s h e l f [ ' s t a t u s ' ]   = =   ' o c c u p i e d ' )   { 
 
                         r e t u r n   f a l s e ;   / /      R       &               R                R                  
 
                 } 
 
                 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   s h e l v e s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S H E L V E S   F O R   D R O P D O W N   (                             R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t F o r D r o p d o w n ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   i d ,   s h e l f _ n a m e ,   s h e l f _ n u m b e r ,   r a c k _ l o c a t i o n 
 
                         F R O M   s h e l v e s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   
 
                         A N D   ( o r d e r _ i d   I S   N U L L   O R   o r d e r _ i d   =   0 ) 
 
                         A N D   s t a t u s   =   ' a v a i l a b l e ' 
 
                         O R D E R   B Y   s h e l f _ n u m b e r   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S H E L V E S   C O U N T   B Y   S T A T U S   (                   &                R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t C o u n t B y S t a t u s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   s t a t u s ,   C O U N T ( * )   a s   c o u n t   
 
                         F R O M   s h e l v e s   
 
                         W H E R E   c o m p a n y _ i d   =   ? 
 
                         G R O U P   B Y   s t a t u s 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r e s u l t   =   [ ] ; 
 
                 f o r e a c h   ( $ s t m t - > f e t c h A l l ( )   a s   $ r o w )   { 
 
                         $ r e s u l t [ $ r o w [ ' s t a t u s ' ] ]   =   $ r o w [ ' c o u n t ' ] ; 
 
                 } 
 
                 r e t u r n   $ r e s u l t ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C H E C K   I F   S H E L F   I S   O C C U P I E D   (    R       &               x) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i s O c c u p i e d ( $ s h e l f _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o r d e r _ i d   F R O M   s h e l v e s   
 
                         W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' o c c u p i e d ' 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ s h e l f _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( )   ?   t r u e   :   f a l s e ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   O C C U P I E D   S H E L V E S   (  &             R     R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t O c c u p i e d ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   s . * ,   o . o r d e r _ n o ,   c . n a m e   a s   c u s t o m e r _ n a m e 
 
                         F R O M   s h e l v e s   s 
 
                         L E F T   J O I N   o r d e r s   o   O N   s . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         W H E R E   s . c o m p a n y _ i d   =   ?   A N D   s . s t a t u s   =   ' o c c u p i e d ' 
 
                         O R D E R   B Y   s . s h e l f _ n u m b e r   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   M A I N T E N A N C E   S H E L V E S   (    R                      R     R     R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t M a i n t e n a n c e ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   *   F R O M   s h e l v e s   
 
                         W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' m a i n t e n a n c e ' 
 
                         O R D E R   B Y   s h e l f _ n u m b e r   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   S H E L F   S T A T U S   (    R         R                   R         R  ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e S t a t u s ( $ s h e l f _ i d ,   $ s t a t u s )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         U P D A T E   s h e l v e s   
 
                         S E T   s t a t u s   =   ?   
 
                         W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ s t a t u s ,   $ s h e l f _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   S t i t c h i n g   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   S T I T C H I N G   O R D E R S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   s . * ,   o . o r d e r _ n o ,   o . o r d e r _ d a t e ,   o . t o t a l _ s u i t s , 
 
                                       c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       e . n a m e   a s   e m p l o y e e _ n a m e 
 
                         F R O M   s t i t c h i n g   s 
 
                         L E F T   J O I N   o r d e r s   o   O N   s . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   s . a s s i g n e d _ t o   =   e . i d 
 
                         W H E R E   s . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   s . i d   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S T I T C H I N G   B Y   O R D E R   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y O r d e r I d ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   s . * ,   o . o r d e r _ n o ,   o . o r d e r _ d a t e ,   o . t o t a l _ s u i t s , 
 
                                       c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       e . n a m e   a s   e m p l o y e e _ n a m e , 
 
                                       e . i d   a s   e m p l o y e e _ i d 
 
                         F R O M   s t i t c h i n g   s 
 
                         L E F T   J O I N   o r d e r s   o   O N   s . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   s . a s s i g n e d _ t o   =   e . i d 
 
                         W H E R E   s . o r d e r _ i d   =   ?   A N D   s . c o m p a n y _ i d   =   ? 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   P E N D I N G   S T I T C H I N G   O R D E R S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t P e n d i n g O r d e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   o . i d ,   o . o r d e r _ n o ,   o . o r d e r _ d a t e ,   o . t o t a l _ s u i t s , 
 
                                       c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       C O U N T ( o s . i d )   a s   s u i t _ c o u n t 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   o r d e r _ s u i t s   o s   O N   o . i d   =   o s . o r d e r _ i d 
 
                         L E F T   J O I N   s t i t c h i n g   s   O N   o . i d   =   s . o r d e r _ i d 
 
                         W H E R E   o . c o m p a n y _ i d   =   ?   
 
                             A N D   o . s t a t u s   =   ' s t i t c h i n g ' 
 
                             A N D   s . i d   I S   N U L L 
 
                         G R O U P   B Y   o . i d 
 
                         O R D E R   B Y   o . c r e a t e d _ a t   A S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A S S I G N E D   S T I T C H I N G   O R D E R S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A s s i g n e d O r d e r s ( $ e m p l o y e e _ i d   =   n u l l )   { 
 
                 $ s q l   =   " 
 
                         S E L E C T   s . * ,   o . o r d e r _ n o ,   o . o r d e r _ d a t e ,   o . t o t a l _ s u i t s , 
 
                                       c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       e . n a m e   a s   e m p l o y e e _ n a m e 
 
                         F R O M   s t i t c h i n g   s 
 
                         L E F T   J O I N   o r d e r s   o   O N   s . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   s . a s s i g n e d _ t o   =   e . i d 
 
                         W H E R E   s . c o m p a n y _ i d   =   ?   A N D   s . s t a t u s   ! =   ' c o m p l e t e d ' 
 
                 " ; 
 
                 $ p a r a m s   =   [ $ t h i s - > c o m p a n y _ i d ] ; 
 
                 
 
                 i f   ( $ e m p l o y e e _ i d )   { 
 
                         $ s q l   . =   "   A N D   s . a s s i g n e d _ t o   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ e m p l o y e e _ i d ; 
 
                 } 
 
                 
 
                 $ s q l   . =   "   O R D E R   B Y   s . s t i t c h i n g _ d a t e   D E S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   S T I T C H I N G   A S S I G N M E N T 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   s t i t c h i n g   ( 
 
                                         o r d e r _ i d ,   a s s i g n e d _ t o ,   s t i t c h i n g _ d a t e ,   s t a t u s ,   n o t e s ,   c o m p a n y _ i d 
 
                                 )   V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' o r d e r _ i d ' ] , 
 
                         $ d a t a [ ' a s s i g n e d _ t o ' ] , 
 
                         $ d a t a [ ' s t i t c h i n g _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                         $ d a t a [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' , 
 
                         $ d a t a [ ' n o t e s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   S T I T C H I N G 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   s t i t c h i n g   S E T   
 
                                         a s s i g n e d _ t o   =   ? , 
 
                                         s t i t c h i n g _ d a t e   =   ? , 
 
                                         s t a t u s   =   ? , 
 
                                         n o t e s   =   ? 
 
                                 W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' a s s i g n e d _ t o ' ] , 
 
                         $ d a t a [ ' s t i t c h i n g _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' n o t e s ' ]   ? ?   n u l l , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   C O M P L E T E   S T I T C H I N G 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   C O M P L E T E   S T I T C H I N G   ( N o   i n t e r n a l   t r a n s a c t i o n ) 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 p u b l i c   f u n c t i o n   c o m p l e t e S t i t c h i n g ( $ s t i t c h i n g _ i d ,   $ o r d e r _ i d ,   $ e m p l o y e e _ i d )   { 
 
         / /   1 .   S t i t c h i n g      R  s t a t u s        ' c o m p l e t e d '        R  
 
         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   s t i t c h i n g   S E T   s t a t u s   =   ' c o m p l e t e d '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
         $ s t m t - > e x e c u t e ( [ $ s t i t c h i n g _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
 
 
         / /   2 .   O r d e r      R  s t a t u s        ' r e a d y '        R  
 
         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   o r d e r s   S E T   s t a t u s   =   ' r e a d y '   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
 
 
         / /   3 .   S t i t c h i n g      R  p a y m e n t   c a l c u l a t e        R           i n s e r t        R  
 
         $ t h i s - > c a l c u l a t e S t i t c h i n g P a y m e n t ( $ o r d e r _ i d ,   $ e m p l o y e e _ i d ) ; 
 
         
 
         r e t u r n   t r u e ; 
 
 } 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   C A L C U L A T E   S T I T C H I N G   P A Y M E N T   ( D i r e c t   I n s e r t ) 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 p r i v a t e   f u n c t i o n   c a l c u l a t e S t i t c h i n g P a y m e n t ( $ o r d e r _ i d ,   $ e m p l o y e e _ i d )   { 
 
         / /   E m p l o y e e      R   &       &                      R  
 
         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                 S E L E C T   e . i d ,   e . n a m e ,   e c . p a y m e n t _ t y p e ,   e c . r a t e s ,   e c . r a t e   a s   c a t e g o r y _ r a t e 
 
                 F R O M   e m p l o y e e s   e 
 
                 L E F T   J O I N   e m p l o y e e _ c a t e g o r i e s   e c   O N   e . c a t e g o r y _ i d   =   e c . i d 
 
                 W H E R E   e . i d   =   ?   A N D   e . c o m p a n y _ i d   =   ? 
 
         " ) ; 
 
         $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         $ e m p l o y e e   =   $ s t m t - > f e t c h ( ) ; 
 
         
 
         i f   ( ! $ e m p l o y e e )   r e t u r n ; 
 
 
 
         / /   S u i t s      R                             R  
 
         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   s u i t _ c o u n t   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         $ s u i t _ c o u n t   =   $ s t m t - > f e t c h ( ) [ ' s u i t _ c o u n t ' ]   ? ?   0 ; 
 
 
 
         i f   ( $ s u i t _ c o u n t   = =   0 )   r e t u r n ; 
 
 
 
         $ t o t a l _ a m o u n t   =   0 ; 
 
         $ d e s c r i p t i o n   =   ' ' ; 
 
 
 
         / /   P a y m e n t   t y p e          &                              R  
 
         i f   ( $ e m p l o y e e [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' )   { 
 
                 $ r a t e s   =   j s o n _ d e c o d e ( $ e m p l o y e e [ ' r a t e s ' ] ,   t r u e ) ; 
 
                 i f   ( $ r a t e s   & &   i s _ a r r a y ( $ r a t e s ) )   { 
 
                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                                 S E L E C T   s i z e ,   C O U N T ( * )   a s   c o u n t   
 
                                 F R O M   o r d e r _ s u i t s   
 
                                 W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ? 
 
                                 G R O U P   B Y   s i z e 
 
                         " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                         $ s i z e s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                         
 
                         $ d e t a i l s   =   [ ] ; 
 
                         f o r e a c h   ( $ s i z e s   a s   $ s i z e )   { 
 
                                 $ s i z e _ n a m e   =   s t r t o l o w e r ( $ s i z e [ ' s i z e ' ] ) ; 
 
                                 $ r a t e   =   $ r a t e s [ $ s i z e _ n a m e ]   ? ?   $ r a t e s [ ' l a r g e ' ]   ? ?   r e s e t ( $ r a t e s )   ? ?   0 ; 
 
                                 $ a m o u n t   =   $ r a t e   *   $ s i z e [ ' c o u n t ' ] ; 
 
                                 $ t o t a l _ a m o u n t   + =   $ a m o u n t ; 
 
                                 $ d e t a i l s [ ]   =   $ s i z e [ ' s i z e ' ]   .   ' :   '   .   $ s i z e [ ' c o u n t ' ]   .   '   x   R s .   '   .   $ r a t e   .   '   =   R s .   '   .   $ a m o u n t ; 
 
                         } 
 
                         $ d e s c r i p t i o n   =   ' S t i t c h i n g   p a y m e n t   f o r   O r d e r   # '   .   $ o r d e r _ i d   .   '   -   '   .   i m p l o d e ( ' ,   ' ,   $ d e t a i l s ) ; 
 
                 }   e l s e   { 
 
                         $ t o t a l _ a m o u n t   =   $ s u i t _ c o u n t   *   ( $ e m p l o y e e [ ' c a t e g o r y _ r a t e ' ]   ? ?   0 ) ; 
 
                         $ d e s c r i p t i o n   =   ' S t i t c h i n g   p a y m e n t   f o r   '   .   $ s u i t _ c o u n t   .   '   s u i t s   i n   O r d e r   # '   .   $ o r d e r _ i d   .   '   ( f i x e d   r a t e ) ' ; 
 
                 } 
 
         }   e l s e i f   ( $ e m p l o y e e [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r c e n t a g e ' )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   t o t a l _ a m o u n t   F R O M   o r d e r s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ o r d e r   =   $ s t m t - > f e t c h ( ) ; 
 
                 $ p e r c e n t a g e   =   $ e m p l o y e e [ ' c a t e g o r y _ r a t e ' ]   ? ?   0 ; 
 
                 $ t o t a l _ a m o u n t   =   ( $ o r d e r [ ' t o t a l _ a m o u n t ' ]   ? ?   0 )   *   ( $ p e r c e n t a g e   /   1 0 0 ) ; 
 
                 $ d e s c r i p t i o n   =   $ p e r c e n t a g e   .   ' %   s t i t c h i n g   p a y m e n t   f o r   O r d e r   # '   .   $ o r d e r _ i d ; 
 
         }   e l s e i f   ( $ e m p l o y e e [ ' p a y m e n t _ t y p e ' ]   = =   ' f i x e d ' )   { 
 
                 $ t o t a l _ a m o u n t   =   $ e m p l o y e e [ ' c a t e g o r y _ r a t e ' ]   ? ?   0 ; 
 
                 $ d e s c r i p t i o n   =   ' F i x e d   s t i t c h i n g   p a y m e n t   f o r   O r d e r   # '   .   $ o r d e r _ i d ; 
 
         } 
 
 
 
         / /                &                    R                                       e m p l o y e e _ l e d g e r    &  R    i n s e r t        R  
 
         i f   ( $ t o t a l _ a m o u n t   >   0 )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         I N S E R T   I N T O   e m p l o y e e _ l e d g e r   
 
                         ( e m p l o y e e _ i d ,   o r d e r _ i d ,   t y p e ,   a m o u n t ,   d e s c r i p t i o n ,   t r a n s a c t i o n _ d a t e ,   c o m p a n y _ i d )   
 
                         V A L U E S   ( ? ,   ? ,   ' c r e d i t ' ,   ? ,   ? ,   ? ,   ? ) 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ 
 
                         $ e m p l o y e e _ i d , 
 
                         $ o r d e r _ i d , 
 
                         $ t o t a l _ a m o u n t , 
 
                         $ d e s c r i p t i o n , 
 
                         d a t e ( ' Y - m - d ' ) , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 } 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S T I T C H I N G   R E P O R T   B Y   E M P L O Y E E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t E m p l o y e e S t i t c h i n g R e p o r t ( $ e m p l o y e e _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   e l . * ,   o . o r d e r _ n o ,   o . c u s t o m e r _ i d ,   c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                       s . s t i t c h i n g _ d a t e ,   s . s t a t u s   a s   s t i t c h i n g _ s t a t u s 
 
                         F R O M   e m p l o y e e _ l e d g e r   e l 
 
                         L E F T   J O I N   o r d e r s   o   O N   e l . o r d e r _ i d   =   o . i d 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   s t i t c h i n g   s   O N   o . i d   =   s . o r d e r _ i d 
 
                         W H E R E   e l . e m p l o y e e _ i d   =   ?   A N D   e l . c o m p a n y _ i d   =   ?   
 
                         A N D   e l . t y p e   =   ' c r e d i t '   
 
                         A N D   e l . d e s c r i p t i o n   L I K E   ' % s t i t c h i n g % ' 
 
                         A N D   e l . t r a n s a c t i o n _ d a t e   B E T W E E N   ?   A N D   ? 
 
                         O R D E R   B Y   e l . t r a n s a c t i o n _ d a t e   D E S C 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ e m p l o y e e _ i d ,   $ t h i s - > c o m p a n y _ i d ,   $ f r o m _ d a t e ,   $ t o _ d a t e ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   S T I T C H I N G 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   s t i t c h i n g   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   S T I T C H I N G   S L I P   D A T A 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t S t i t c h i n g S l i p D a t a ( $ o r d e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " 
 
                         S E L E C T   
 
                                 o . i d   a s   o r d e r _ i d , 
 
                                 o . o r d e r _ n o , 
 
                                 o . o r d e r _ d a t e , 
 
                                 o . d e l i v e r y _ d a t e , 
 
                                 o . t o t a l _ s u i t s , 
 
                                 o . t o t a l _ a m o u n t , 
 
                                 c . i d   a s   c u s t o m e r _ i d , 
 
                                 c . n a m e   a s   c u s t o m e r _ n a m e , 
 
                                 c . p h o n e   a s   c u s t o m e r _ p h o n e , 
 
                                 c . a d d r e s s   a s   c u s t o m e r _ a d d r e s s , 
 
                                 e . i d   a s   e m p l o y e e _ i d , 
 
                                 e . n a m e   a s   e m p l o y e e _ n a m e , 
 
                                 s . s t i t c h i n g _ d a t e , 
 
                                 s . s t a t u s   a s   s t i t c h i n g _ s t a t u s , 
 
                                 s . n o t e s   a s   s t i t c h i n g _ n o t e s , 
 
                                 o s . i d   a s   s u i t _ i d , 
 
                                 o s . s u i t _ n u m b e r , 
 
                                 o s . s u i t _ t y p e , 
 
                                 o s . s i z e , 
 
                                 o s . p r i c e , 
 
                                 o s . m e a s u r e m e n t _ i d , 
 
                                 m . m e a s u r e d _ d a t e , 
 
                                 m . c h e s t , 
 
                                 m . w a i s t , 
 
                                 m . L O O S I N G   a s   l o o s i n g , 
 
                                 m . C U F F _ L E N G T H   a s   c u f f _ l e n g t h , 
 
                                 m . C U F F _ W I D T H   a s   c u f f _ w i d t h , 
 
                                 m . S I D E P O C K E T   a s   s i d e p o c k e t , 
 
                                 m . F R O N T P O C K E T   a s   f r o n t p o c k e t , 
 
                                 m . S H A L W A R P O C K E T   a s   s h a l w a r p o c k e t , 
 
                                 m . S H A L W A R _ L E N G T H   a s   s h a l w a r _ l e n g t h , 
 
                                 m . S H A L W A R _ B O T T O M   a s   s h a l w a r _ b o t t o m , 
 
                                 m . s h o u l d e r , 
 
                                 m . s l e e v e , 
 
                                 m . l e n g t h   a s   s h i r t _ l e n g t h , 
 
                                 m . c o l l a r , 
 
                                 m . S H E R W A N I   a s   s h e r w a n i , 
 
                                 m . n o t e s , 
 
                                 m . R E M A R K S   a s   r e m a r k s 
 
                         F R O M   o r d e r s   o 
 
                         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d 
 
                         L E F T   J O I N   s t i t c h i n g   s   O N   o . i d   =   s . o r d e r _ i d 
 
                         L E F T   J O I N   e m p l o y e e s   e   O N   s . a s s i g n e d _ t o   =   e . i d 
 
                         L E F T   J O I N   o r d e r _ s u i t s   o s   O N   o . i d   =   o s . o r d e r _ i d 
 
                         L E F T   J O I N   m e a s u r e m e n t s   m   O N   o s . m e a s u r e m e n t _ i d   =   m . i d 
 
                         W H E R E   o . i d   =   ?   A N D   o . c o m p a n y _ i d   =   ? 
 
                         O R D E R   B Y   o s . s u i t _ n u m b e r 
 
                 " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 $ r e s u l t s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
                 
 
                 i f   ( e m p t y ( $ r e s u l t s ) )   r e t u r n   n u l l ; 
 
                 
 
                 $ f i r s t   =   $ r e s u l t s [ 0 ] ; 
 
                 $ d a t a   =   [ 
 
                         ' o r d e r '   = >   [ 
 
                                 ' i d '   = >   $ f i r s t [ ' o r d e r _ i d ' ] , 
 
                                 ' o r d e r _ n o '   = >   $ f i r s t [ ' o r d e r _ n o ' ] , 
 
                                 ' o r d e r _ d a t e '   = >   $ f i r s t [ ' o r d e r _ d a t e ' ] , 
 
                                 ' d e l i v e r y _ d a t e '   = >   $ f i r s t [ ' d e l i v e r y _ d a t e ' ] , 
 
                                 ' t o t a l _ s u i t s '   = >   $ f i r s t [ ' t o t a l _ s u i t s ' ] , 
 
                                 ' t o t a l _ a m o u n t '   = >   $ f i r s t [ ' t o t a l _ a m o u n t ' ] 
 
                         ] , 
 
                         ' c u s t o m e r '   = >   [ 
 
                                 ' i d '   = >   $ f i r s t [ ' c u s t o m e r _ i d ' ] , 
 
                                 ' n a m e '   = >   $ f i r s t [ ' c u s t o m e r _ n a m e ' ] , 
 
                                 ' p h o n e '   = >   $ f i r s t [ ' c u s t o m e r _ p h o n e ' ] , 
 
                                 ' a d d r e s s '   = >   $ f i r s t [ ' c u s t o m e r _ a d d r e s s ' ] 
 
                         ] , 
 
                         ' s t i t c h i n g '   = >   [ 
 
                                 ' e m p l o y e e _ n a m e '   = >   $ f i r s t [ ' e m p l o y e e _ n a m e ' ] , 
 
                                 ' e m p l o y e e _ i d '   = >   $ f i r s t [ ' e m p l o y e e _ i d ' ] , 
 
                                 ' s t i t c h i n g _ d a t e '   = >   $ f i r s t [ ' s t i t c h i n g _ d a t e ' ] , 
 
                                 ' s t a t u s '   = >   $ f i r s t [ ' s t i t c h i n g _ s t a t u s ' ] , 
 
                                 ' n o t e s '   = >   $ f i r s t [ ' s t i t c h i n g _ n o t e s ' ] 
 
                         ] , 
 
                         ' s u i t s '   = >   [ ] 
 
                 ] ; 
 
                 
 
                 f o r e a c h   ( $ r e s u l t s   a s   $ r o w )   { 
 
                         $ d a t a [ ' s u i t s ' ] [ ]   =   [ 
 
                                 ' s u i t _ n u m b e r '   = >   $ r o w [ ' s u i t _ n u m b e r ' ] , 
 
                                 ' s u i t _ t y p e '   = >   $ r o w [ ' s u i t _ t y p e ' ] , 
 
                                 ' s i z e '   = >   $ r o w [ ' s i z e ' ] , 
 
                                 ' p r i c e '   = >   $ r o w [ ' p r i c e ' ] , 
 
                                 ' m e a s u r e m e n t '   = >   [ 
 
                                         ' c h e s t '   = >   $ r o w [ ' c h e s t ' ] , 
 
                                         ' w a i s t '   = >   $ r o w [ ' w a i s t ' ] , 
 
                                         ' l o o s i n g '   = >   $ r o w [ ' l o o s i n g ' ] , 
 
                                         ' c u f f _ l e n g t h '   = >   $ r o w [ ' c u f f _ l e n g t h ' ] , 
 
                                         ' c u f f _ w i d t h '   = >   $ r o w [ ' c u f f _ w i d t h ' ] , 
 
                                         ' s i d e p o c k e t '   = >   $ r o w [ ' s i d e p o c k e t ' ] , 
 
                                         ' f r o n t p o c k e t '   = >   $ r o w [ ' f r o n t p o c k e t ' ] , 
 
                                         ' s h a l w a r p o c k e t '   = >   $ r o w [ ' s h a l w a r p o c k e t ' ] , 
 
                                         ' s h a l w a r _ l e n g t h '   = >   $ r o w [ ' s h a l w a r _ l e n g t h ' ] , 
 
                                         ' s h a l w a r _ b o t t o m '   = >   $ r o w [ ' s h a l w a r _ b o t t o m ' ] , 
 
                                         ' s h o u l d e r '   = >   $ r o w [ ' s h o u l d e r ' ] , 
 
                                         ' s l e e v e '   = >   $ r o w [ ' s l e e v e ' ] , 
 
                                         ' s h i r t _ l e n g t h '   = >   $ r o w [ ' s h i r t _ l e n g t h ' ] , 
 
                                         ' c o l l a r '   = >   $ r o w [ ' c o l l a r ' ] , 
 
                                         ' s h e r w a n i '   = >   $ r o w [ ' s h e r w a n i ' ] , 
 
                                         ' n o t e s '   = >   $ r o w [ ' n o t e s ' ] , 
 
                                         ' r e m a r k s '   = >   $ r o w [ ' r e m a r k s ' ] , 
 
                                         ' m e a s u r e d _ d a t e '   = >   $ r o w [ ' m e a s u r e d _ d a t e ' ] 
 
                                 ] 
 
                         ] ; 
 
                 } 
 
                 
 
                 r e t u r n   $ d a t a ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p 
 
 c l a s s   U s e r   { 
 
         p r i v a t e   $ d b ; 
 
         
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   A L L   U S E R S   ( w i t h   o p t i o n a l   c o m p a n y   f i l t e r ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t A l l ( $ c o m p a n y _ i d   =   n u l l )   { 
 
                 $ s q l   =   " S E L E C T   u . * ,   c . n a m e   a s   c o m p a n y _ n a m e   
 
                                 F R O M   u s e r s   u 
 
                                 L E F T   J O I N   c o m p a n i e s   c   O N   u . c o m p a n y _ i d   =   c . i d " ; 
 
                 $ p a r a m s   =   [ ] ; 
 
                 i f   ( $ c o m p a n y _ i d )   { 
 
                         $ s q l   . =   "   W H E R E   u . c o m p a n y _ i d   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ c o m p a n y _ i d ; 
 
                 } 
 
                 $ s q l   . =   "   O R D E R   B Y   u . i d   D E S C " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   U S E R   B Y   I D 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   u s e r s   W H E R E   i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   U S E R   B Y   U S E R N A M E 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y U s e r n a m e ( $ u s e r n a m e )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   u s e r s   W H E R E   u s e r n a m e   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ u s e r n a m e ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   I N S E R T   U S E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ s q l   =   " I N S E R T   I N T O   u s e r s   ( u s e r n a m e ,   p a s s w o r d ,   f u l l _ n a m e ,   r o l e ,   s t a t u s ,   c o m p a n y _ i d )   
 
                                 V A L U E S   ( ? ,   ? ,   ? ,   ? ,   ? ,   ? ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' u s e r n a m e ' ] , 
 
                         $ d a t a [ ' p a s s w o r d ' ] , 
 
                         $ d a t a [ ' f u l l _ n a m e ' ] , 
 
                         $ d a t a [ ' r o l e ' ] , 
 
                         $ d a t a [ ' s t a t u s ' ] , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   U S E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   u s e r s   S E T   
 
                                         f u l l _ n a m e   =   ? ,   r o l e   =   ? ,   s t a t u s   =   ? ,   c o m p a n y _ i d   =   ? " ; 
 
                 $ p a r a m s   =   [ $ d a t a [ ' f u l l _ n a m e ' ] ,   $ d a t a [ ' r o l e ' ] ,   $ d a t a [ ' s t a t u s ' ] ,   $ d a t a [ ' c o m p a n y _ i d ' ] ] ; 
 
                 i f   ( i s s e t ( $ d a t a [ ' p a s s w o r d ' ] ) )   { 
 
                         $ s q l   . =   " ,   p a s s w o r d   =   ? " ; 
 
                         $ p a r a m s [ ]   =   $ d a t a [ ' p a s s w o r d ' ] ; 
 
                 } 
 
                 $ s q l   . =   "   W H E R E   i d   =   ? " ; 
 
                 $ p a r a m s [ ]   =   $ i d ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   U P D A T E   U S E R   S T A T U S 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e S t a t u s ( $ i d ,   $ s t a t u s )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " U P D A T E   u s e r s   S E T   s t a t u s   =   ?   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ s t a t u s ,   $ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   D E L E T E   U S E R 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   u s e r s   W H E R E   i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ] ) ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   T O T A L   U S E R S   ( f o r   s u p e r   a d m i n ) 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t T o t a l U s e r s ( )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > q u e r y ( " S E L E C T   C O U N T ( * )   a s   t o t a l   F R O M   u s e r s " ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) [ ' t o t a l ' ]   ? ?   0 ; 
 
         } 
 
 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         / /   G E T   U S E R S   B Y   C O M P A N Y 
 
         / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y C o m p a n y ( $ c o m p a n y _ i d )   { 
 
                 r e t u r n   $ t h i s - > g e t A l l ( $ c o m p a n y _ i d ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 2   t e x t - p r i m a r y " > < / i > A d d   N e w   C u s t o m e r   /                     !   < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u s t o m e r   N o   /          !         &     < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " c u s t o m e r _ n o "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ c u s t o m e r _ n o ;   ? > "   r e a d o n l y > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N a m e   /             < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " F u l l   n a m e   /    &    &             "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P h o n e   /         < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 3 0 0 - 1 2 3 4 5 6 7 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P r o f i l e   P i c t u r e   /         `  < / l a b e l > 
 
                                         < i n p u t   t y p e = " f i l e "   n a m e = " p r o f i l e _ p i c "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   a c c e p t = " i m a g e / * " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > L e a v e   e m p t y   t o   u s e   d e f a u l t   a v a t a r .   /          `   !    `      !    `                `             &          `      `. < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A d d r e s s   /        < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " C o m p l e t e   a d d r e s s   /    &    &          " > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e   C u s t o m e r   /    &               ` 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l   /    &         
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - e d i t   m e - 2   t e x t - p r i m a r y " > < / i > E d i t   C u s t o m e r   /          !              &  ` & < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u s t o m e r   N o   /          !         &     < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " c u s t o m e r _ n o "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' c u s t o m e r _ n o ' ]   ? ?   ' ' ) ;   ? > "   r e a d o n l y > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N a m e   /             < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P h o n e   /         < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A d d r e s s   /        < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u r r e n t   P i c t u r e   /    &        !         `  < / l a b e l > 
 
                                                 < d i v   c l a s s = " m b - 1 " > 
 
                                                         < ? p h p   
 
                                                                 $ p i c _ f i l e   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   ( $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' ) ; 
 
                                                                 i f   ( $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   = =   ' d u m m y _ c u s t o m e r . p n g '   | |   ! f i l e _ e x i s t s ( $ p i c _ f i l e ) )   { 
 
                                                                         $ p i c _ s r c   =   ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' ; 
 
                                                                 }   e l s e   { 
 
                                                                         $ p i c _ s r c   =   $ p i c _ f i l e ; 
 
                                                                 } 
 
                                                         ? > 
 
                                                         < i m g   s r c = " < ? p h p   e c h o   $ p i c _ s r c ;   ? > "   w i d t h = " 5 0 "   h e i g h t = " 5 0 "   c l a s s = " r o u n d e d - c i r c l e "   s t y l e = " o b j e c t - f i t : c o v e r ; " > 
 
                                                 < / d i v > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C h a n g e   P i c t u r e   /         `           `         ` < / l a b e l > 
 
                                                 < i n p u t   t y p e = " f i l e "   n a m e = " p r o f i l e _ p i c "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   a c c e p t = " i m a g e / * " > 
 
                                                 < s m a l l   c l a s s = " t e x t - m u t e d " > L e a v e   e m p t y   t o   k e e p   c u r r e n t .   /          `   !    `      !    &        !      !       `. < / s m a l l > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 1 " > 
 
                                                 < s m a l l > < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 " > < / i > < s t r o n g > B a l a n c e   /          `  : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e   ? ?   0 ,   0 ) ;   ? > < / s m a l l > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " d - f l e x   g a p - 1   m b - 2 " > 
 
                                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   f l e x - f i l l "   d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # m e a s u r e m e n t M o d a l " > 
 
                                                         < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 1 " > < / i >   A d d   /        &   
 
                                                 < / b u t t o n > 
 
                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ p r i n t & c u s t o m e r _ i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - i n f o   b t n - s m   r o u n d e d - p i l l   f l e x - f i l l " > 
 
                                                         < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t   A l l   /                  
 
                                                 < / a > 
 
                                         < / d i v > 
 
 
 
                                         < d i v   i d = " m e a s u r e m e n t s "   c l a s s = " m t - 2 " > 
 
                                                 < h 6   c l a s s = " f w - b o l d   s m a l l " > < i   c l a s s = " f a s   f a - l i s t   m e - 1   t e x t - p r i m a r y " > < / i > E x i s t i n g   M e a s u r e m e n t s   /    &        !    &         < / h 6 > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ m e a s u r e m e n t s ) ) :   ? > 
 
                                                         < d i v   c l a s s = " a l e r t   a l e r t - w a r n i n g   p y - 1 " > < s m a l l > N o   m e a s u r e m e n t s   a d d e d   y e t .   /                 `              !    &            &           !  `. < / s m a l l > < / d i v > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                                                 < t a b l e   c l a s s = " t a b l e   t a b l e - s m   t a b l e - b o r d e r e d " > 
 
                                                                         < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                                                 < t r > 
 
                                                                                         < t h > D a t e < / t h > 
 
                                                                                         < t h > C h e s t < / t h > 
 
                                                                                         < t h > W a i s t < / t h > 
 
                                                                                         < t h > L e n g t h < / t h > 
 
                                                                                         < t h > A c t i o n s < / t h > 
 
                                                                                 < / t r > 
 
                                                                         < / t h e a d > 
 
                                                                         < t b o d y > 
 
                                                                                 < ? p h p   f o r e a c h   ( $ m e a s u r e m e n t s   a s   $ m ) :   ? > 
 
                                                                                         < t r > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' m e a s u r e d _ d a t e ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c h e s t ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' w a i s t ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l e n g t h ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > 
 
                                                                                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y   b t n - s m   p y - 0   p x - 1   e d i t - m e a s u r e m e n t - b t n " 
 
                                                                                                                 d a t a - i d = " < ? p h p   e c h o   $ m [ ' i d ' ] ;   ? > " 
 
                                                                                                                 d a t a - c h e s t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c h e s t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - w a i s t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' w a i s t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - l o o s i n g = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l o o s i n g ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - c u f f _ l e n g t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c u f f _ l e n g t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - c u f f _ w i d t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c u f f _ w i d t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s i d e p o c k e t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s i d e p o c k e t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - f r o n t p o c k e t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' f r o n t p o c k e t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h a l w a r p o c k e t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r p o c k e t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h a l w a r _ l e n g t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r _ l e n g t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h a l w a r _ b o t t o m = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r _ b o t t o m ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h o u l d e r = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h o u l d e r ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s l e e v e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s l e e v e ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - l e n g t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l e n g t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - c o l l a r = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c o l l a r ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h e r w a n i = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h e r w a n i ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - n o t e s = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' n o t e s ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - r e m a r k s = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' r e m a r k s ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - m e a s u r e d _ d a t e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' m e a s u r e d _ d a t e ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # e d i t M e a s u r e m e n t M o d a l " > 
 
                                                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                                         < / b u t t o n > 
 
                                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ p r i n t & c u s t o m e r _ i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > & m e a s u r e m e n t _ i d = < ? p h p   e c h o   $ m [ ' i d ' ] ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - i n f o   b t n - s m   p y - 0   p x - 1 "   t i t l e = " P r i n t   t h i s   m e a s u r e m e n t " > 
 
                                                                                                                 < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                                         < / a > 
 
                                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ d e l e t e & i d = < ? p h p   e c h o   $ m [ ' i d ' ] ;   ? > "   
 
                                                                                                               c l a s s = " b t n   b t n - o u t l i n e - d a n g e r   b t n - s m   p y - 0   p x - 1 "   
 
                                                                                                               o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e ?   /    !         !                 !  `  x' ) " > 
 
                                                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                                         < / a > 
 
                                                                                                 < / t d > 
 
                                                                                         < / t r > 
 
                                                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                                         < / t b o d y > 
 
                                                                 < / t a b l e > 
 
                                                         < / d i v > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   C u s t o m e r   /          !        ` 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l   /    &         
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < ! - -   = = = = =   M O D A L :   A D D   M E A S U R E M E N T   ( s t e p = " a n y "                 )   = = = = =   - - > 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " m e a s u r e m e n t M o d a l "   t a b i n d e x = " - 1 "   a r i a - h i d d e n = " t r u e " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - l g " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t "   s t y l e = " b o r d e r - r a d i u s : 1 6 p x ;   f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; " > 
 
                         < d i v   c l a s s = " m o d a l - h e a d e r   b g - p r i m a r y   t e x t - w h i t e   p y - 2 " > 
 
                                 < h 5   c l a s s = " m o d a l - t i t l e " > < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 2 " > < / i >    &                &          `   /   A d d   M e a s u r e m e n t s < / h 5 > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - c l o s e - w h i t e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                         < / d i v > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ a d d "   i d = " m e a s u r e m e n t F o r m " > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y   p y - 1   p x - 2 " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " c u s t o m e r _ i d "   v a l u e = " < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > " > 
 
 
 
                                         < ! - -   = = = = =   Q a m e e z   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - p r i m a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - p r i m a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - p r i m a r y   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    &  `       `   &           /   Q a m e e z   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  ` `      /   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `      /   S h o u l d e r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s h o u l d e r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          /   S l e e v e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s l e e v e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    &     /   W a i s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " w a i s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >   `      /   L o o s i n g < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " l o o s i n g "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  !      `  /   C h e s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c h e s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >           /   C o l l a r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c o l l a r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `         `  /   S h e r w a n i < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " s h e r w a n i "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        `      /   C u f f   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c u f f _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >         `      /   C u f f   W i d t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c u f f _ w i d t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        ` `     `    /   S i d e   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s i d e p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >      &            `    /   F r o n t   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " f r o n t p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =   S h a l w a r   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s u c c e s s   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s u c c e s s   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - s u c c e s s   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >               `   &           /   S h a l w a r   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >             `      /   S h a l w a r   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s h a l w a r _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >              /   B o t t o m < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s h a l w a r _ b o t t o m "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >               `    /   S h a l w a r   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s h a l w a r p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 1 9 8 7 5 4 ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =    S&   E x t r a   S e c t i o n   -   L a b e l s   D A R K   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s e c o n d a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - d a r k   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    `             `        /   E x t r a   D e t a i l s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          `  /   N o t e s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    R &           /   R e m a r k s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " r e m a r k s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  &          `         `    /   D a t e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " d a t e "   n a m e = " m e a s u r e d _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r   p y - 1 " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C l o s e   /          < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l " > < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e   /    &        < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < ! - -   = = = = =   M O D A L :   E D I T   M E A S U R E M E N T   ( s t e p = " a n y "                 )   = = = = =   - - > 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " e d i t M e a s u r e m e n t M o d a l "   t a b i n d e x = " - 1 "   a r i a - h i d d e n = " t r u e " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - l g " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t "   s t y l e = " b o r d e r - r a d i u s : 1 6 p x ;   f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; " > 
 
                         < d i v   c l a s s = " m o d a l - h e a d e r   b g - w a r n i n g   t e x t - d a r k   p y - 2 " > 
 
                                 < h 5   c l a s s = " m o d a l - t i t l e " > < i   c l a s s = " f a s   f a - e d i t   m e - 2 " > < / i >    &                    &  ` &   /   E d i t   M e a s u r e m e n t s < / h 5 > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                         < / d i v > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ e d i t "   i d = " e d i t M e a s u r e m e n t F o r m " > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y   p y - 1   p x - 2 " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " m e a s u r e m e n t _ i d "   i d = " e d i t _ m e a s u r e m e n t _ i d "   v a l u e = " " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " c u s t o m e r _ i d "   v a l u e = " < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > " > 
 
 
 
                                         < ! - -   = = = = =   Q a m e e z   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - p r i m a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - p r i m a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - p r i m a r y   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    &  `       `   &           /   Q a m e e z   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  ` `      /   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " l e n g t h "   i d = " e d i t _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `      /   S h o u l d e r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s h o u l d e r "   i d = " e d i t _ s h o u l d e r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          /   S l e e v e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s l e e v e "   i d = " e d i t _ s l e e v e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    &     /   W a i s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " w a i s t "   i d = " e d i t _ w a i s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >   `      /   L o o s i n g < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " l o o s i n g "   i d = " e d i t _ l o o s i n g "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  !      `  /   C h e s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c h e s t "   i d = " e d i t _ c h e s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >           /   C o l l a r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c o l l a r "   i d = " e d i t _ c o l l a r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `         `  /   S h e r w a n i < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " s h e r w a n i "   i d = " e d i t _ s h e r w a n i "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        `      /   C u f f   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c u f f _ l e n g t h "   i d = " e d i t _ c u f f _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >         `      /   C u f f   W i d t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " c u f f _ w i d t h "   i d = " e d i t _ c u f f _ w i d t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        ` `     `    /   S i d e   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s i d e p o c k e t "   i d = " e d i t _ s i d e p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >      &            `    /   F r o n t   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " f r o n t p o c k e t "   i d = " e d i t _ f r o n t p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =   S h a l w a r   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s u c c e s s   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s u c c e s s   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - s u c c e s s   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >               `   &           /   S h a l w a r   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >             `      /   S h a l w a r   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s h a l w a r _ l e n g t h "   i d = " e d i t _ s h a l w a r _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >              /   B o t t o m < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s h a l w a r _ b o t t o m "   i d = " e d i t _ s h a l w a r _ b o t t o m "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >               `    /   S h a l w a r   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s h a l w a r p o c k e t "   i d = " e d i t _ s h a l w a r p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 1 9 8 7 5 4 ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =    S&   E x t r a   S e c t i o n   -   L a b e l s   D A R K   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s e c o n d a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - d a r k   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    `             `        /   E x t r a   D e t a i l s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          `  /   N o t e s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " n o t e s "   i d = " e d i t _ n o t e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    R &           /   R e m a r k s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " r e m a r k s "   i d = " e d i t _ r e m a r k s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  &          `         `    /   D a t e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " d a t e "   n a m e = " m e a s u r e d _ d a t e "   i d = " e d i t _ m e a s u r e d _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r   p y - 1 " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C l o s e   /          < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l " > < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   /          ! < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < ! - -   = = = = =   J A V A S C R I P T   = = = = =   - - > 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         / /   = = = = =   E d i t   M o d a l   -      &    &      R          R         R    ( D r o p d o w n s      &  R  )   = = = = = 
 
         d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . e d i t - m e a s u r e m e n t - b t n ' ) . f o r E a c h ( b t n   = >   { 
 
                 b t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                         / /      &    &   d a t a - *   a t t r i b u t e s               R    ( d a t a s e t                   l o w e r c a s e    &  R    C o n v e r t                 ) 
 
                         c o n s t   d a t a   =   t h i s . d a t a s e t ; 
 
                         
 
                         / /   H i d d e n   I D 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ m e a s u r e m e n t _ i d ' ) . v a l u e   =   d a t a . i d   | |   ' ' ; 
 
                         
 
                         / /    S&   T e x t / N u m b e r   i n p u t s 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ l e n g t h ' ) . v a l u e   =   d a t a . l e n g t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h o u l d e r ' ) . v a l u e   =   d a t a . s h o u l d e r   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s l e e v e ' ) . v a l u e   =   d a t a . s l e e v e   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ w a i s t ' ) . v a l u e   =   d a t a . w a i s t   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ l o o s i n g ' ) . v a l u e   =   d a t a . l o o s i n g   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c h e s t ' ) . v a l u e   =   d a t a . c h e s t   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c o l l a r ' ) . v a l u e   =   d a t a . c o l l a r   | |   ' ' ; 
 
                         
 
                         / /    S&   U p p e r c a s e   c o l u m n s   (    R       d a t a s e t    &  R    l o w e r c a s e    &  R         R        ) 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h e r w a n i ' ) . v a l u e   =   d a t a . s h e r w a n i   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c u f f _ l e n g t h ' ) . v a l u e   =   d a t a . c u f f _ l e n g t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c u f f _ w i d t h ' ) . v a l u e   =   d a t a . c u f f _ w i d t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h a l w a r _ l e n g t h ' ) . v a l u e   =   d a t a . s h a l w a r _ l e n g t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h a l w a r _ b o t t o m ' ) . v a l u e   =   d a t a . s h a l w a r _ b o t t o m   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ n o t e s ' ) . v a l u e   =   d a t a . n o t e s   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ r e m a r k s ' ) . v a l u e   =   d a t a . r e m a r k s   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ m e a s u r e d _ d a t e ' ) . v a l u e   =   d a t a . m e a s u r e d _ d a t e   | |   ' ' ; 
 
                         
 
                         / /    S&   D r o p d o w n s   -     R   R      R         R  
 
                         c o n s t   s i d e P o c k e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s i d e p o c k e t ' ) ; 
 
                         c o n s t   f r o n t P o c k e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ f r o n t p o c k e t ' ) ; 
 
                         c o n s t   s h a l w a r P o c k e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h a l w a r p o c k e t ' ) ; 
 
                         
 
                         i f   ( s i d e P o c k e t )   { 
 
                                 s i d e P o c k e t . v a l u e   =   d a t a . s i d e p o c k e t   | |   ' ' ; 
 
                         } 
 
                         i f   ( f r o n t P o c k e t )   { 
 
                                 f r o n t P o c k e t . v a l u e   =   d a t a . f r o n t p o c k e t   | |   ' ' ; 
 
                         } 
 
                         i f   ( s h a l w a r P o c k e t )   { 
 
                                 s h a l w a r P o c k e t . v a l u e   =   d a t a . s h a l w a r p o c k e t   | |   ' ' ; 
 
                         } 
 
                 } ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   E n t e r   =   N e x t   F i e l d ,   S h i f t + E n t e r   =   P r e v i o u s   F i e l d   = = = = = 
 
         c o n s t   i n p u t s   =   d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . m e a s u r e m e n t - i n p u t ' ) ; 
 
         c o n s t   t o t a l I n p u t s   =   i n p u t s . l e n g t h ; 
 
 
 
         i n p u t s . f o r E a c h ( f u n c t i o n ( i n p u t ,   i n d e x )   { 
 
                 i n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                         i f   ( e . k e y   = = =   ' E n t e r '   & &   ! e . s h i f t K e y )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 c o n s t   n e x t I n d e x   =   i n d e x   +   1 ; 
 
                                 i f   ( n e x t I n d e x   <   t o t a l I n p u t s )   { 
 
                                         i n p u t s [ n e x t I n d e x ] . f o c u s ( ) ; 
 
                                 }   e l s e   { 
 
                                         c o n s t   s u b m i t B t n   =   d o c u m e n t . q u e r y S e l e c t o r ( ' # m e a s u r e m e n t F o r m   b u t t o n [ t y p e = " s u b m i t " ] ' )   | |   
 
                                                                             d o c u m e n t . q u e r y S e l e c t o r ( ' # e d i t M e a s u r e m e n t F o r m   b u t t o n [ t y p e = " s u b m i t " ] ' ) ; 
 
                                         i f   ( s u b m i t B t n )   s u b m i t B t n . f o c u s ( ) ; 
 
                                 } 
 
                         } 
 
                         e l s e   i f   ( e . k e y   = = =   ' E n t e r '   & &   e . s h i f t K e y )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 c o n s t   p r e v I n d e x   =   i n d e x   -   1 ; 
 
                                 i f   ( p r e v I n d e x   > =   0 )   { 
 
                                         i n p u t s [ p r e v I n d e x ] . f o c u s ( ) ; 
 
                                 } 
 
                         } 
 
                 } ) ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - e d i t   m e - 2   t e x t - p r i m a r y " > < / i > E d i t   C u s t o m e r   /          !              &  ` & < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u s t o m e r   N o   /          !         &     < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " c u s t o m e r _ n o "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' c u s t o m e r _ n o ' ]   ? ?   ' ' ) ;   ? > "   r e a d o n l y > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N a m e   /             < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P h o n e   /         < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A d d r e s s   /        < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u r r e n t   P i c t u r e   /    &        !         `  < / l a b e l > 
 
                                                 < d i v   c l a s s = " m b - 1 " > 
 
                                                         < ? p h p   
 
                                                                 $ p i c _ f i l e   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   ( $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' ) ; 
 
                                                                 i f   ( $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   = =   ' d u m m y _ c u s t o m e r . p n g '   | |   ! f i l e _ e x i s t s ( $ p i c _ f i l e ) )   { 
 
                                                                         $ p i c _ s r c   =   ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' ; 
 
                                                                 }   e l s e   { 
 
                                                                         $ p i c _ s r c   =   $ p i c _ f i l e ; 
 
                                                                 } 
 
                                                         ? > 
 
                                                         < i m g   s r c = " < ? p h p   e c h o   $ p i c _ s r c ;   ? > "   w i d t h = " 5 0 "   h e i g h t = " 5 0 "   c l a s s = " r o u n d e d - c i r c l e "   s t y l e = " o b j e c t - f i t : c o v e r ; " > 
 
                                                 < / d i v > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C h a n g e   P i c t u r e   /         `           `         ` < / l a b e l > 
 
                                                 < i n p u t   t y p e = " f i l e "   n a m e = " p r o f i l e _ p i c "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   a c c e p t = " i m a g e / * " > 
 
                                                 < s m a l l   c l a s s = " t e x t - m u t e d " > L e a v e   e m p t y   t o   k e e p   c u r r e n t .   /          `   !    `      !    &        !      !       `. < / s m a l l > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 1 " > 
 
                                                 < s m a l l > < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 " > < / i > < s t r o n g > B a l a n c e   /          `  : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e   ? ?   0 ,   0 ) ;   ? > < / s m a l l > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " d - f l e x   g a p - 1   m b - 2 " > 
 
                                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   f l e x - f i l l "   d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # m e a s u r e m e n t M o d a l " > 
 
                                                         < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 1 " > < / i >   A d d   /        &   
 
                                                 < / b u t t o n > 
 
                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ p r i n t & c u s t o m e r _ i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - i n f o   b t n - s m   r o u n d e d - p i l l   f l e x - f i l l " > 
 
                                                         < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t   A l l   /                  
 
                                                 < / a > 
 
                                         < / d i v > 
 
 
 
                                         < d i v   i d = " m e a s u r e m e n t s "   c l a s s = " m t - 2 " > 
 
                                                 < h 6   c l a s s = " f w - b o l d   s m a l l " > < i   c l a s s = " f a s   f a - l i s t   m e - 1   t e x t - p r i m a r y " > < / i > E x i s t i n g   M e a s u r e m e n t s   /    &        !    &         < / h 6 > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ m e a s u r e m e n t s ) ) :   ? > 
 
                                                         < d i v   c l a s s = " a l e r t   a l e r t - w a r n i n g   p y - 1 " > < s m a l l > N o   m e a s u r e m e n t s   a d d e d   y e t .   /                 `              !    &            &           !  `. < / s m a l l > < / d i v > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                                                 < t a b l e   c l a s s = " t a b l e   t a b l e - s m   t a b l e - b o r d e r e d " > 
 
                                                                         < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                                                 < t r > 
 
                                                                                         < t h > D a t e < / t h > 
 
                                                                                         < t h > C h e s t < / t h > 
 
                                                                                         < t h > W a i s t < / t h > 
 
                                                                                         < t h > L e n g t h < / t h > 
 
                                                                                         < t h > A c t i o n s < / t h > 
 
                                                                                 < / t r > 
 
                                                                         < / t h e a d > 
 
                                                                         < t b o d y > 
 
                                                                                 < ? p h p   f o r e a c h   ( $ m e a s u r e m e n t s   a s   $ m ) :   ? > 
 
                                                                                         < t r > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' m e a s u r e d _ d a t e ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c h e s t ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' w a i s t ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l e n g t h ' ]   ? ?   ' ' ) ;   ? > < / t d > 
 
                                                                                                 < t d > 
 
                                                                                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y   b t n - s m   p y - 0   p x - 1   e d i t - m e a s u r e m e n t - b t n " 
 
                                                                                                                 d a t a - i d = " < ? p h p   e c h o   $ m [ ' i d ' ] ;   ? > " 
 
                                                                                                                 d a t a - c h e s t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c h e s t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - w a i s t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' w a i s t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - l o o s i n g = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l o o s i n g ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - c u f f _ l e n g t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c u f f _ l e n g t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - c u f f _ w i d t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c u f f _ w i d t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s i d e p o c k e t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s i d e p o c k e t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - f r o n t p o c k e t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' f r o n t p o c k e t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h a l w a r p o c k e t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r p o c k e t ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h a l w a r _ l e n g t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r _ l e n g t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h a l w a r _ b o t t o m = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r _ b o t t o m ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h o u l d e r = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h o u l d e r ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s l e e v e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s l e e v e ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - l e n g t h = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l e n g t h ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - c o l l a r = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c o l l a r ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - s h e r w a n i = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h e r w a n i ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - n o t e s = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' n o t e s ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - r e m a r k s = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' r e m a r k s ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - m e a s u r e d _ d a t e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' m e a s u r e d _ d a t e ' ]   ? ?   ' ' ) ;   ? > " 
 
                                                                                                                 d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # e d i t M e a s u r e m e n t M o d a l " > 
 
                                                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                                         < / b u t t o n > 
 
                                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ p r i n t & c u s t o m e r _ i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > & m e a s u r e m e n t _ i d = < ? p h p   e c h o   $ m [ ' i d ' ] ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - i n f o   b t n - s m   p y - 0   p x - 1 "   t i t l e = " P r i n t   t h i s   m e a s u r e m e n t " > 
 
                                                                                                                 < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                                         < / a > 
 
                                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ d e l e t e & i d = < ? p h p   e c h o   $ m [ ' i d ' ] ;   ? > "   
 
                                                                                                               c l a s s = " b t n   b t n - o u t l i n e - d a n g e r   b t n - s m   p y - 0   p x - 1 "   
 
                                                                                                               o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e ?   /    !         !                 !  `  x' ) " > 
 
                                                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                                         < / a > 
 
                                                                                                 < / t d > 
 
                                                                                         < / t r > 
 
                                                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                                         < / t b o d y > 
 
                                                                 < / t a b l e > 
 
                                                         < / d i v > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   C u s t o m e r   /          !        ` 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l   /    &         
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < ! - -   = = = = =   M O D A L :   A D D   M E A S U R E M E N T   = = = = =   - - > 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " m e a s u r e m e n t M o d a l "   t a b i n d e x = " - 1 "   a r i a - h i d d e n = " t r u e " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - l g " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t "   s t y l e = " b o r d e r - r a d i u s : 1 6 p x ;   f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; " > 
 
                         < d i v   c l a s s = " m o d a l - h e a d e r   b g - p r i m a r y   t e x t - w h i t e   p y - 2 " > 
 
                                 < h 5   c l a s s = " m o d a l - t i t l e " > < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 2 " > < / i >    &                &          `   /   A d d   M e a s u r e m e n t s < / h 5 > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - c l o s e - w h i t e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                         < / d i v > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ a d d "   i d = " m e a s u r e m e n t F o r m " > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y   p y - 1   p x - 2 " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " c u s t o m e r _ i d "   v a l u e = " < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > " > 
 
 
 
                                         < ! - -   = = = = =   Q a m e e z   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - p r i m a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - p r i m a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - p r i m a r y   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    &  `       `   &           /   Q a m e e z   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  ` `      /   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `      /   S h o u l d e r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y "   n a m e = " s h o u l d e r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          /   S l e e v e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " s l e e v e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    &     /   W a i s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " w a i s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >   `      /   L o o s i n g < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " l o o s i n g "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  !      `  /   C h e s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c h e s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >           /   C o l l a r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c o l l a r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `         `  /   S h e r w a n i < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " s h e r w a n i "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        `      /   C u f f   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c u f f _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >         `      /   C u f f   W i d t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c u f f _ w i d t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        ` `     `    /   S i d e   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s i d e p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >      &            `    /   F r o n t   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " f r o n t p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =   S h a l w a r   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s u c c e s s   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s u c c e s s   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - s u c c e s s   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >               `   &           /   S h a l w a r   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >             `      /   S h a l w a r   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " s h a l w a r _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >              /   B o t t o m < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " s h a l w a r _ b o t t o m "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >               `    /   S h a l w a r   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s h a l w a r p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 1 9 8 7 5 4 ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =    S&   E x t r a   S e c t i o n   -   L a b e l s   D A R K   (        R   R   R              R)   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s e c o n d a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - d a r k   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    `             `        /   E x t r a   D e t a i l s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          `  /   N o t e s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    R &           /   R e m a r k s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " r e m a r k s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  &          `         `    /   D a t e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " d a t e "   n a m e = " m e a s u r e d _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r   p y - 1 " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C l o s e   /          < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l " > < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e   /    &        < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < ! - -   = = = = =   M O D A L :   E D I T   M E A S U R E M E N T   = = = = =   - - > 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " e d i t M e a s u r e m e n t M o d a l "   t a b i n d e x = " - 1 "   a r i a - h i d d e n = " t r u e " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - l g " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t "   s t y l e = " b o r d e r - r a d i u s : 1 6 p x ;   f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; " > 
 
                         < d i v   c l a s s = " m o d a l - h e a d e r   b g - w a r n i n g   t e x t - d a r k   p y - 2 " > 
 
                                 < h 5   c l a s s = " m o d a l - t i t l e " > < i   c l a s s = " f a s   f a - e d i t   m e - 2 " > < / i >    &                    &  ` &   /   E d i t   M e a s u r e m e n t s < / h 5 > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                         < / d i v > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = m e a s u r e m e n t _ e d i t "   i d = " e d i t M e a s u r e m e n t F o r m " > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y   p y - 1   p x - 2 " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " m e a s u r e m e n t _ i d "   i d = " e d i t _ m e a s u r e m e n t _ i d "   v a l u e = " " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " c u s t o m e r _ i d "   v a l u e = " < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > " > 
 
 
 
                                         < ! - -   = = = = =   Q a m e e z   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - p r i m a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - p r i m a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - p r i m a r y   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    &  `       `   &           /   Q a m e e z   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  ` `      /   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " l e n g t h "   i d = " e d i t _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `      /   S h o u l d e r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " s h o u l d e r "   i d = " e d i t _ s h o u l d e r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          /   S l e e v e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " s l e e v e "   i d = " e d i t _ s l e e v e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    &     /   W a i s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " w a i s t "   i d = " e d i t _ w a i s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >   `      /   L o o s i n g < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " l o o s i n g "   i d = " e d i t _ l o o s i n g "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  !      `  /   C h e s t < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c h e s t "   i d = " e d i t _ c h e s t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >           /   C o l l a r < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c o l l a r "   i d = " e d i t _ c o l l a r "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    `         `  /   S h e r w a n i < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " s h e r w a n i "   i d = " e d i t _ s h e r w a n i "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        `      /   C u f f   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c u f f _ l e n g t h "   i d = " e d i t _ c u f f _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >         `      /   C u f f   W i d t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " c u f f _ w i d t h "   i d = " e d i t _ c u f f _ w i d t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >        ` `     `    /   S i d e   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s i d e p o c k e t "   i d = " e d i t _ s i d e p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >      &            `    /   F r o n t   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " f r o n t p o c k e t "   i d = " e d i t _ f r o n t p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 0 D 6 E F D ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =   S h a l w a r   M e a s u r e m e n t s   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s u c c e s s   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s u c c e s s   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - s u c c e s s   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >               `   &           /   S h a l w a r   M e a s u r e m e n t s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >             `      /   S h a l w a r   L e n g t h < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " s h a l w a r _ l e n g t h "   i d = " e d i t _ s h a l w a r _ l e n g t h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >              /   B o t t o m < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " a n y " "   n a m e = " s h a l w a r _ b o t t o m "   i d = " e d i t _ s h a l w a r _ b o t t o m "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " 0 . 0 "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - s u c c e s s "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >               `    /   S h a l w a r   P o c k e t < / l a b e l > 
 
                                                                         < s e l e c t   n a m e = " s h a l w a r p o c k e t "   i d = " e d i t _ s h a l w a r p o c k e t "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 3 p x ;   p a d d i n g : 2 p x   4 p x ;   b o r d e r - c o l o r : # 1 9 8 7 5 4 ; " > 
 
                                                                                 < o p t i o n   v a l u e = " " > - < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " D o u b l e " > D o u b l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " S i n g l e " > S i n g l e < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " Y e s " > Y e s < / o p t i o n > 
 
                                                                                 < o p t i o n   v a l u e = " N o " > N o < / o p t i o n > 
 
                                                                         < / s e l e c t > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                         < ! - -   = = = = =    S&   E x t r a   S e c t i o n   -   L a b e l s   D A R K   (        R   R   R              R)   = = = = =   - - > 
 
                                         < d i v   c l a s s = " c a r d   b o r d e r - 2   b o r d e r - s e c o n d a r y   m b - 1 " > 
 
                                                 < d i v   c l a s s = " c a r d - h e a d e r   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   p y - 0 " > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - d a r k   m b - 0 "   s t y l e = " f o n t - s i z e : 1 4 p x ; " >    `             `        /   E x t r a   D e t a i l s < / h 6 > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " c a r d - b o d y   p y - 0   p x - 1 " > 
 
                                                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >          `  /   N o t e s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " n o t e s "   i d = " e d i t _ n o t e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >    R &           /   R e m a r k s < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " t e x t "   n a m e = " r e m a r k s "   i d = " e d i t _ r e m a r k s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   p l a c e h o l d e r = " - "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - d a r k "   s t y l e = " f o n t - s i z e : 1 2 p x ;   m a r g i n - b o t t o m : 0 ; " >  &          `         `    /   D a t e < / l a b e l > 
 
                                                                         < i n p u t   t y p e = " d a t e "   n a m e = " m e a s u r e d _ d a t e "   i d = " e d i t _ m e a s u r e d _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   m e a s u r e m e n t - i n p u t "   s t y l e = " h e i g h t : 3 2 p x ;   f o n t - s i z e : 1 4 p x ;   p a d d i n g : 2 p x   6 p x ; " > 
 
                                                                 < / d i v > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r   p y - 1 " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C l o s e   /          < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l " > < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   /          ! < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < ! - -   = = = = =   J A V A S C R I P T   = = = = =   - - > 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         / /   = = = = =   E d i t   M o d a l   -      &    &      R          R         R    ( D r o p d o w n s      &  R  )   = = = = = 
 
         d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . e d i t - m e a s u r e m e n t - b t n ' ) . f o r E a c h ( b t n   = >   { 
 
                 b t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                         / /      &    &   d a t a - *   a t t r i b u t e s               R    ( d a t a s e t                   l o w e r c a s e    &  R    C o n v e r t                 ) 
 
                         c o n s t   d a t a   =   t h i s . d a t a s e t ; 
 
                         
 
                         / /   H i d d e n   I D 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ m e a s u r e m e n t _ i d ' ) . v a l u e   =   d a t a . i d   | |   ' ' ; 
 
                         
 
                         / /    S&   T e x t / N u m b e r   i n p u t s 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ l e n g t h ' ) . v a l u e   =   d a t a . l e n g t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h o u l d e r ' ) . v a l u e   =   d a t a . s h o u l d e r   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s l e e v e ' ) . v a l u e   =   d a t a . s l e e v e   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ w a i s t ' ) . v a l u e   =   d a t a . w a i s t   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ l o o s i n g ' ) . v a l u e   =   d a t a . l o o s i n g   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c h e s t ' ) . v a l u e   =   d a t a . c h e s t   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c o l l a r ' ) . v a l u e   =   d a t a . c o l l a r   | |   ' ' ; 
 
                         
 
                         / /    S&   U p p e r c a s e   c o l u m n s   (    R       d a t a s e t    &  R    l o w e r c a s e    &  R         R        ) 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h e r w a n i ' ) . v a l u e   =   d a t a . s h e r w a n i   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c u f f _ l e n g t h ' ) . v a l u e   =   d a t a . c u f f _ l e n g t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ c u f f _ w i d t h ' ) . v a l u e   =   d a t a . c u f f _ w i d t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h a l w a r _ l e n g t h ' ) . v a l u e   =   d a t a . s h a l w a r _ l e n g t h   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h a l w a r _ b o t t o m ' ) . v a l u e   =   d a t a . s h a l w a r _ b o t t o m   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ n o t e s ' ) . v a l u e   =   d a t a . n o t e s   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ r e m a r k s ' ) . v a l u e   =   d a t a . r e m a r k s   | |   ' ' ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ m e a s u r e d _ d a t e ' ) . v a l u e   =   d a t a . m e a s u r e d _ d a t e   | |   ' ' ; 
 
                         
 
                         / /    S&   D r o p d o w n s   -     R   R      R         R  
 
                         c o n s t   s i d e P o c k e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s i d e p o c k e t ' ) ; 
 
                         c o n s t   f r o n t P o c k e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ f r o n t p o c k e t ' ) ; 
 
                         c o n s t   s h a l w a r P o c k e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' e d i t _ s h a l w a r p o c k e t ' ) ; 
 
                         
 
                         i f   ( s i d e P o c k e t )   { 
 
                                 s i d e P o c k e t . v a l u e   =   d a t a . s i d e p o c k e t   | |   ' ' ; 
 
                         } 
 
                         i f   ( f r o n t P o c k e t )   { 
 
                                 f r o n t P o c k e t . v a l u e   =   d a t a . f r o n t p o c k e t   | |   ' ' ; 
 
                         } 
 
                         i f   ( s h a l w a r P o c k e t )   { 
 
                                 s h a l w a r P o c k e t . v a l u e   =   d a t a . s h a l w a r p o c k e t   | |   ' ' ; 
 
                         } 
 
                 } ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   E n t e r   =   N e x t   F i e l d ,   S h i f t + E n t e r   =   P r e v i o u s   F i e l d   = = = = = 
 
         c o n s t   i n p u t s   =   d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . m e a s u r e m e n t - i n p u t ' ) ; 
 
         c o n s t   t o t a l I n p u t s   =   i n p u t s . l e n g t h ; 
 
 
 
         i n p u t s . f o r E a c h ( f u n c t i o n ( i n p u t ,   i n d e x )   { 
 
                 i n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                         i f   ( e . k e y   = = =   ' E n t e r '   & &   ! e . s h i f t K e y )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 c o n s t   n e x t I n d e x   =   i n d e x   +   1 ; 
 
                                 i f   ( n e x t I n d e x   <   t o t a l I n p u t s )   { 
 
                                         i n p u t s [ n e x t I n d e x ] . f o c u s ( ) ; 
 
                                 }   e l s e   { 
 
                                         c o n s t   s u b m i t B t n   =   d o c u m e n t . q u e r y S e l e c t o r ( ' # m e a s u r e m e n t F o r m   b u t t o n [ t y p e = " s u b m i t " ] ' )   | |   
 
                                                                             d o c u m e n t . q u e r y S e l e c t o r ( ' # e d i t M e a s u r e m e n t F o r m   b u t t o n [ t y p e = " s u b m i t " ] ' ) ; 
 
                                         i f   ( s u b m i t B t n )   s u b m i t B t n . f o c u s ( ) ; 
 
                                 } 
 
                         } 
 
                         e l s e   i f   ( e . k e y   = = =   ' E n t e r '   & &   e . s h i f t K e y )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 c o n s t   p r e v I n d e x   =   i n d e x   -   1 ; 
 
                                 i f   ( p r e v I n d e x   > =   0 )   { 
 
                                         i n p u t s [ p r e v I n d e x ] . f o c u s ( ) ; 
 
                                 } 
 
                         } 
 
                 } ) ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < ? p h p 
 
 $ p a g e   =   $ p a g e   ? ?   1 ; 
 
 $ p e r _ p a g e   =   $ p e r _ p a g e   ? ?   1 0 ; 
 
 $ t o t a l   =   $ t o t a l   ? ?   0 ; 
 
 $ t o t a l P a g e s   =   $ t o t a l P a g e s   ? ?   c e i l ( $ t o t a l   /   $ p e r _ p a g e ) ; 
 
 $ s e a r c h   =   $ s e a r c h   ? ?   ' ' ; 
 
 $ c u s t o m e r s   =   $ c u s t o m e r s   ? ?   [ ] ; 
 
 $ p e r _ p a g e _ d i s p l a y   =   $ p e r _ p a g e _ d i s p l a y   ? ?   ( ( $ p e r _ p a g e   > =   1 0 0 0 0 )   ?   ' A l l '   :   $ p e r _ p a g e ) ; 
 
 ? > 
 
 
 
 < s t y l e > 
 
         . c u s t o m e r - l i s t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . c u s t o m e r - l i s t - c a r d   . b a d g e   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 p a d d i n g :   3 p x   8 p x ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
         } 
 
         . b t n - n e w - c u s t o m e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 8 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
                 h e i g h t :   3 4 p x ; 
 
         } 
 
         . b t n - n e w - c u s t o m e r : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ,   0   4 p x   1 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s e a r c h - b o x - w r a p p e r   { 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 f l e x :   1 ; 
 
                 m a x - w i d t h :   4 0 0 p x ; 
 
         } 
 
         . s e a r c h - b o x - w r a p p e r   . s e a r c h - i c o n   { 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 r i g h t :   1 2 p x ; 
 
                 t o p :   5 0 % ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 5 0 % ) ; 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 p o i n t e r - e v e n t s :   n o n e ; 
 
         } 
 
         . s e a r c h - b o x - w r a p p e r   i n p u t   { 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   1 8 p x   6 p x   1 8 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 p a d d i n g - r i g h t :   3 5 p x ; 
 
         } 
 
         . s e a r c h - b o x - w r a p p e r   i n p u t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
                 o u t l i n e :   n o n e ; 
 
         } 
 
         . s e a r c h - b o x - w r a p p e r   i n p u t : : p l a c e h o l d e r   { 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . s e a r c h - l o a d e r   { 
 
                 d i s p l a y :   n o n e ; 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 l e f t :   1 2 p x ; 
 
                 t o p :   5 0 % ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 5 0 % ) ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
         } 
 
         . s e a r c h - s t a t u s   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 m a r g i n - t o p :   4 p x ; 
 
                 m i n - h e i g h t :   1 8 p x ; 
 
         } 
 
         . p a g i n a t i o n   . p a g e - l i n k   { 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r - c o l o r :   # d 1 d 5 d b ; 
 
         } 
 
         . p a g i n a t i o n   . p a g e - i t e m . a c t i v e   . p a g e - l i n k   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . p e r - p a g e - s e l e c t   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   3 p x   6 p x ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 h e i g h t :   3 0 p x ; 
 
         } 
 
         . p e r - p a g e - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . c u s t o m e r - a v a t a r - s m   { 
 
                 w i d t h :   3 0 p x ; 
 
                 h e i g h t :   3 0 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 o b j e c t - f i t :   c o v e r ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . c u s t o m e r - l i s t - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . c u s t o m e r - l i s t - c a r d   . t a b l e   t h ,   . c u s t o m e r - l i s t - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . s e a r c h - b o x - w r a p p e r   {   m a x - w i d t h :   1 0 0 % ;   } 
 
                 . c u s t o m e r - l i s t - c a r d   . c a r d - b o d y   {   p a d d i n g :   8 p x ;   } 
 
                 . b t n - n e w - c u s t o m e r   {   f o n t - s i z e :   1 1 p x ;   p a d d i n g :   3 p x   1 2 p x ;   h e i g h t :   3 0 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   c u s t o m e r - l i s t - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r s   m e - 2 " > < / i > C u s t o m e r s < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ a d d "   c l a s s = " b t n - n e w - c u s t o m e r " > 
 
                         < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   N e w   C u s t o m e r 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   S E A R C H   B A R   +   P E R   P A G E   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   m b - 2   a l i g n - i t e m s - c e n t e r   g - 2 " > 
 
                         < d i v   c l a s s = " c o l - m d - 7   c o l - l g - 6 " > 
 
                                 < d i v   c l a s s = " s e a r c h - b o x - w r a p p e r " > 
 
                                         < s p a n   c l a s s = " s e a r c h - i c o n " > < i   c l a s s = " f a s   f a - s e a r c h " > < / i > < / s p a n > 
 
                                         < s p a n   c l a s s = " s e a r c h - l o a d e r "   i d = " s e a r c h L o a d e r " > < i   c l a s s = " f a s   f a - s p i n n e r   f a - s p i n " > < / i > < / s p a n > 
 
                                         < i n p u t   t y p e = " t e x t "   i d = " l i v e S e a r c h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   
 
                                                       p l a c e h o l d e r = " L i v e   S e a r c h :   N a m e ,   P h o n e ,   C u s t o m e r   # . . . "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h ) ;   ? > " 
 
                                                       a u t o c o m p l e t e = " o f f " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s e a r c h - s t a t u s "   i d = " s e a r c h S t a t u s " > 
 
                                         < ? p h p   i f   ( ! e m p t y ( $ s e a r c h ) ) :   ? > 
 
                                                 R e s u l t s   f o r :   < s t r o n g > " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h ) ;   ? > " < / s t r o n g > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > T y p e   t o   s e a r c h   c u s t o m e r s . . . 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 5   c o l - l g - 6   t e x t - e n d " > 
 
                                 < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r   j u s t i f y - c o n t e n t - e n d   g a p - 2 " > 
 
                                         < s p a n   c l a s s = " t e x t - m u t e d   s m a l l "   i d = " t o t a l C o u n t D i s p l a y " > T o t a l :   < s t r o n g > < ? p h p   e c h o   $ t o t a l ;   ? > < / s t r o n g > < / s p a n > 
 
                                         < s e l e c t   i d = " p e r P a g e S e l e c t "   c l a s s = " p e r - p a g e - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " 1 0 "   < ? p h p   e c h o   ( $ p e r _ p a g e _ d i s p l a y   = =   1 0 )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 1 0 < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " 2 5 "   < ? p h p   e c h o   ( $ p e r _ p a g e _ d i s p l a y   = =   2 5 )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 2 5 < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " 1 0 0 "   < ? p h p   e c h o   ( $ p e r _ p a g e _ d i s p l a y   = =   1 0 0 )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 1 0 0 < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " 5 0 0 "   < ? p h p   e c h o   ( $ p e r _ p a g e _ d i s p l a y   = =   5 0 0 )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 5 0 0 < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " A l l "   < ? p h p   e c h o   ( $ p e r _ p a g e _ d i s p l a y   = =   ' A l l ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A l l < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d   d - n o n e   d - s m - i n l i n e " > S o r t e d   b y   C u s t o m e r   # < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 8 % ; " > # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > I m a g e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > C u s t o m e r   # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 2 % ; " > N a m e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > P h o n e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; "   c l a s s = " t e x t - e n d " > B a l a n c e   ( R s . ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; "   c l a s s = " t e x t - c e n t e r " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y   i d = " c u s t o m e r s B o d y " > 
 
                                         < ? p h p   i f   ( e m p t y ( $ c u s t o m e r s ) ) :   ? > 
 
                                                 < t r   i d = " n o R e s u l t " > 
 
                                                         < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 "   s t y l e = " f o n t - s i z e : 1 3 p x ; " > 
 
                                                                 < ? p h p   i f   ( ! e m p t y ( $ s e a r c h ) ) :   ? > 
 
                                                                         < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                                                         N o   c u s t o m e r s   f o u n d   m a t c h i n g   " < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h ) ;   ? > < / s t r o n g > " 
 
                                                                 < ? p h p   e l s e :   ? > 
 
                                                                         < i   c l a s s = " f a s   f a - i n b o x   m e - 2 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                                                         N o   c u s t o m e r s   f o u n d . 
 
                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   $ s n   =   ( ( $ p a g e   -   1 )   *   $ p e r _ p a g e )   +   1 ;   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ c u s t o m e r s   a s   $ c u s t o m e r ) :   ? > 
 
                                                         < ? p h p   
 
                                                                 $ b a l a n c e   =   $ c u s t o m e r [ ' b a l a n c e ' ]   ? ?   0 ; 
 
                                                                 $ b a l a n c e _ c l a s s   =   $ b a l a n c e   >   0   ?   ' t e x t - s u c c e s s '   :   ( $ b a l a n c e   <   0   ?   ' t e x t - d a n g e r '   :   ' t e x t - m u t e d ' ) ; 
 
                                                                 / /    S&   I m a g e   L o g i c   ( E d i t   P a g e      R        ) 
 
                                                                 $ p r o f i l e _ p i c   =   $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' ; 
 
                                                                 $ p i c _ f i l e   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   $ p r o f i l e _ p i c ; 
 
                                                                 i f   ( $ p r o f i l e _ p i c   = =   ' d u m m y _ c u s t o m e r . p n g '   | |   ! f i l e _ e x i s t s ( $ p i c _ f i l e ) )   { 
 
                                                                         $ p i c _ s r c   =   ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' ; 
 
                                                                 }   e l s e   { 
 
                                                                         $ p i c _ s r c   =   $ p i c _ f i l e ; 
 
                                                                 } 
 
                                                         ? > 
 
                                                         < t r   d a t a - c u s t o m e r - i d = " < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > " > 
 
                                                                 < t d > < ? p h p   e c h o   $ s n + + ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < i m g   s r c = " < ? p h p   e c h o   $ p i c _ s r c ;   ? > "   
 
                                                                                   c l a s s = " c u s t o m e r - a v a t a r - s m "   
 
                                                                                   o n e r r o r = " t h i s . s r c = ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' " 
 
                                                                                   a l t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ] ) ;   ? > " > 
 
                                                                 < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   t e x t - s e c o n d a r y " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' c u s t o m e r _ n o ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > "   c l a s s = " t e x t - d e c o r a t i o n - n o n e   f w - b o l d " > 
 
                                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ] ) ;   ? > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   < ? p h p   e c h o   $ b a l a n c e _ c l a s s ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m "   r o l e = " g r o u p " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y "   t i t l e = " E d i t " > 
 
                                                                                         < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ d e l e t e & i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   t i t l e = " D e l e t e "   
 
                                                                                       o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   c u s t o m e r ? ' ) ; " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   P A G I N A T I O N   = = = = =   - - > 
 
                 < d i v   i d = " p a g i n a t i o n C o n t a i n e r " > 
 
                         < ? p h p   i f   ( $ t o t a l P a g e s   >   1 ) :   ? > 
 
                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m t - 3 " > 
 
                                         < d i v   c l a s s = " t e x t - m u t e d   s m a l l "   i d = " p a g i n a t i o n I n f o " > 
 
                                                 < ? p h p   e c h o   c o u n t ( $ c u s t o m e r s ) ;   ? >   o f   < ? p h p   e c h o   $ t o t a l ;   ? >   c u s t o m e r s 
 
                                                 < ? p h p   i f   ( ! e m p t y ( $ s e a r c h ) ) :   ? > 
 
                                                         < s p a n   c l a s s = " t e x t - p r i m a r y " > ( f i l t e r e d ) < / s p a n > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / d i v > 
 
                                         < n a v > 
 
                                                 < u l   c l a s s = " p a g i n a t i o n   p a g i n a t i o n - s m   m b - 0 "   i d = " p a g i n a t i o n L i n k s " > 
 
                                                         < l i   c l a s s = " p a g e - i t e m   < ? p h p   e c h o   ( $ p a g e   < =   1 )   ?   ' d i s a b l e d '   :   ' ' ;   ? > " > 
 
                                                                 < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " 1 " > < i   c l a s s = " f a s   f a - a n g l e - d o u b l e - l e f t " > < / i > < / a > 
 
                                                         < / l i > 
 
                                                         < l i   c l a s s = " p a g e - i t e m   < ? p h p   e c h o   ( $ p a g e   < =   1 )   ?   ' d i s a b l e d '   :   ' ' ;   ? > " > 
 
                                                                 < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " < ? p h p   e c h o   $ p a g e - 1 ;   ? > " > < i   c l a s s = " f a s   f a - c h e v r o n - l e f t " > < / i > < / a > 
 
                                                         < / l i > 
 
                                                         < ? p h p 
 
                                                         $ s t a r t   =   m a x ( 1 ,   $ p a g e   -   2 ) ; 
 
                                                         $ e n d   =   m i n ( $ t o t a l P a g e s ,   $ p a g e   +   2 ) ; 
 
                                                         i f   ( $ s t a r t   >   1 )   { 
 
                                                                 e c h o   ' < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " 1 " > 1 < / a > < / l i > ' ; 
 
                                                                 i f   ( $ s t a r t   >   2 )   e c h o   ' < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > . . . < / s p a n > < / l i > ' ; 
 
                                                         } 
 
                                                         f o r   ( $ i   =   $ s t a r t ;   $ i   < =   $ e n d ;   $ i + + )   { 
 
                                                                 $ a c t i v e   =   ( $ i   = =   $ p a g e )   ?   ' a c t i v e '   :   ' ' ; 
 
                                                                 e c h o   ' < l i   c l a s s = " p a g e - i t e m   '   .   $ a c t i v e   .   ' " > < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " '   .   $ i   .   ' " > '   .   $ i   .   ' < / a > < / l i > ' ; 
 
                                                         } 
 
                                                         i f   ( $ e n d   <   $ t o t a l P a g e s )   { 
 
                                                                 i f   ( $ e n d   <   $ t o t a l P a g e s   -   1 )   e c h o   ' < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > . . . < / s p a n > < / l i > ' ; 
 
                                                                 e c h o   ' < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " '   .   $ t o t a l P a g e s   .   ' " > '   .   $ t o t a l P a g e s   .   ' < / a > < / l i > ' ; 
 
                                                         } 
 
                                                         ? > 
 
                                                         < l i   c l a s s = " p a g e - i t e m   < ? p h p   e c h o   ( $ p a g e   > =   $ t o t a l P a g e s )   ?   ' d i s a b l e d '   :   ' ' ;   ? > " > 
 
                                                                 < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " < ? p h p   e c h o   $ p a g e + 1 ;   ? > " > < i   c l a s s = " f a s   f a - c h e v r o n - r i g h t " > < / i > < / a > 
 
                                                         < / l i > 
 
                                                         < l i   c l a s s = " p a g e - i t e m   < ? p h p   e c h o   ( $ p a g e   > =   $ t o t a l P a g e s )   ?   ' d i s a b l e d '   :   ' ' ;   ? > " > 
 
                                                                 < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " < ? p h p   e c h o   $ t o t a l P a g e s ;   ? > " > < i   c l a s s = " f a s   f a - a n g l e - d o u b l e - r i g h t " > < / i > < / a > 
 
                                                         < / l i > 
 
                                                 < / u l > 
 
                                         < / n a v > 
 
                                 < / d i v > 
 
                         < ? p h p   e l s e :   ? > 
 
                                 < d i v   c l a s s = " m t - 2   t e x t - m u t e d   s m a l l " > 
 
                                         T o t a l   C u s t o m e r s :   < s t r o n g > < ? p h p   e c h o   $ t o t a l ;   ? > < / s t r o n g > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < ! - -   = = = = =   J A V A S C R I P T :   L I V E   S E A R C H   +   A J A X   P A G I N A T I O N   = = = = =   - - > 
 
 < ! - -   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   - - > 
 
 < s c r i p t > 
 
 ( f u n c t i o n ( )   { 
 
         ' u s e   s t r i c t ' ; 
 
 
 
         c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' l i v e S e a r c h ' ) ; 
 
         c o n s t   c u s t o m e r s B o d y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r s B o d y ' ) ; 
 
         c o n s t   s e a r c h S t a t u s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h S t a t u s ' ) ; 
 
         c o n s t   s e a r c h L o a d e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h L o a d e r ' ) ; 
 
         c o n s t   p e r P a g e S e l e c t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p e r P a g e S e l e c t ' ) ; 
 
         c o n s t   t o t a l C o u n t D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' t o t a l C o u n t D i s p l a y ' ) ; 
 
         c o n s t   p a g i n a t i o n C o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p a g i n a t i o n C o n t a i n e r ' ) ; 
 
 
 
         l e t   s e a r c h T i m e o u t   =   n u l l ; 
 
         l e t   c u r r e n t P a g e   =   < ? p h p   e c h o   $ p a g e ;   ? > ; 
 
         l e t   c u r r e n t S e a r c h   =   ' < ? p h p   e c h o   a d d s l a s h e s ( $ s e a r c h ) ;   ? > ' ; 
 
         l e t   c u r r e n t P e r P a g e   =   ' < ? p h p   e c h o   $ p e r _ p a g e _ d i s p l a y ;   ? > ' ; 
 
 
 
         / /   = = = = =   E S C A P E   H T M L   = = = = = 
 
         f u n c t i o n   e s c a p e H t m l ( t e x t )   { 
 
                 i f   ( ! t e x t )   r e t u r n   ' ' ; 
 
                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                 d i v . t e x t C o n t e n t   =   t e x t ; 
 
                 r e t u r n   d i v . i n n e r H T M L ; 
 
         } 
 
 
 
         / /   = = = = =   L O A D   C U S T O M E R S   ( A J A X )   = = = = = 
 
         f u n c t i o n   l o a d C u s t o m e r s ( p a g e ,   s e a r c h ,   p e r P a g e )   { 
 
                 s e a r c h L o a d e r . s t y l e . d i s p l a y   =   ' i n l i n e - b l o c k ' ; 
 
                 
 
                 c o n s t   p a r a m s   =   n e w   U R L S e a r c h P a r a m s ( ) ; 
 
                 p a r a m s . a p p e n d ( ' a c t i o n ' ,   ' l i v e _ s e a r c h ' ) ; 
 
                 i f   ( s e a r c h )   p a r a m s . a p p e n d ( ' s e a r c h ' ,   s e a r c h ) ; 
 
                 i f   ( p e r P a g e )   p a r a m s . a p p e n d ( ' p e r _ p a g e ' ,   p e r P a g e ) ; 
 
                 p a r a m s . a p p e n d ( ' p a g e ' ,   p a g e   | |   1 ) ; 
 
 
 
                 f e t c h ( ' i n d e x . p h p ? '   +   p a r a m s . t o S t r i n g ( ) ) 
 
                         . t h e n ( r e s p o n s e   = >   { 
 
                                 i f   ( ! r e s p o n s e . o k )   { 
 
                                         t h r o w   n e w   E r r o r ( ' H T T P   e r r o r !   s t a t u s :   '   +   r e s p o n s e . s t a t u s ) ; 
 
                                 } 
 
                                 r e t u r n   r e s p o n s e . j s o n ( ) ; 
 
                         } ) 
 
                         . t h e n ( d a t a   = >   { 
 
                                 s e a r c h L o a d e r . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                 
 
                                 i f   ( d a t a . c u s t o m e r s   & &   d a t a . c u s t o m e r s . l e n g t h   >   0 )   { 
 
                                         l e t   h t m l   =   ' ' ; 
 
                                         l e t   s n   =   1 ; 
 
                                         d a t a . c u s t o m e r s . f o r E a c h ( c   = >   { 
 
                                                 c o n s t   b a l a n c e   =   p a r s e F l o a t ( c . b a l a n c e )   | |   0 ; 
 
                                                 c o n s t   b a l a n c e C l a s s   =   b a l a n c e   >   0   ?   ' t e x t - s u c c e s s '   :   ( b a l a n c e   <   0   ?   ' t e x t - d a n g e r '   :   ' t e x t - m u t e d ' ) ; 
 
                                                 / /    S&   I m a g e   L o g i c   ( E d i t   P a g e      R        )   -   A J A X    &  R         R
 
                                                 c o n s t   p r o f i l e P i c   =   c . p r o f i l e _ p i c   | |   ' d u m m y _ c u s t o m e r . p n g ' ; 
 
                                                 l e t   p i c S r c   =   ' ' ; 
 
                                                 i f   ( p r o f i l e P i c   = = =   ' d u m m y _ c u s t o m e r . p n g '   | |   ! p r o f i l e P i c )   { 
 
                                                         p i c S r c   =   ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' ; 
 
                                                 }   e l s e   { 
 
                                                         p i c S r c   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   +   p r o f i l e P i c ; 
 
                                                 } 
 
                                                 / /   E n s u r e   w e   d o n ' t   s h o w   b r o k e n   i m a g e 
 
                                                 c o n s t   a v a t a r N a m e   =   e n c o d e U R I C o m p o n e n t ( c . n a m e   | |   ' U s e r ' ) ; 
 
                                                 
 
                                                 h t m l   + =   ` 
 
                                                         < t r   d a t a - c u s t o m e r - i d = " $ { c . i d } " > 
 
                                                                 < t d > $ { s n + + } < / t d > 
 
                                                                 < t d > 
 
                                                                         < i m g   s r c = " $ { p i c S r c } "   
 
                                                                                   c l a s s = " c u s t o m e r - a v a t a r - s m "   
 
                                                                                   o n e r r o r = " t h i s . s r c = ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' " 
 
                                                                                   a l t = " $ { e s c a p e H t m l ( c . n a m e ) } " > 
 
                                                                 < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   b g - o p a c i t y - 1 0   t e x t - s e c o n d a r y " > $ { e s c a p e H t m l ( c . c u s t o m e r _ n o ) } < / s p a n > < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = $ { c . i d } "   c l a s s = " t e x t - d e c o r a t i o n - n o n e   f w - b o l d " > 
 
                                                                                 $ { e s c a p e H t m l ( c . n a m e ) } 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                                 < t d > $ { e s c a p e H t m l ( c . p h o n e   | |   ' - ' ) } < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   $ { b a l a n c e C l a s s } " > $ { N u m b e r ( b a l a n c e ) . t o L o c a l e S t r i n g ( ) } < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m "   r o l e = " g r o u p " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = $ { c . i d } "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y "   t i t l e = " E d i t " > 
 
                                                                                         < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ d e l e t e & i d = $ { c . i d } "   c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   t i t l e = " D e l e t e "   o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   c u s t o m e r ? ' ) ; " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 ` ; 
 
                                         } ) ; 
 
                                         c u s t o m e r s B o d y . i n n e r H T M L   =   h t m l ; 
 
                                         
 
                                         t o t a l C o u n t D i s p l a y . i n n e r H T M L   =   ` T o t a l :   < s t r o n g > $ { d a t a . t o t a l   | |   0 } < / s t r o n g > ` ; 
 
                                         
 
                                         i f   ( s e a r c h )   { 
 
                                                 s e a r c h S t a t u s . i n n e r H T M L   =   ` < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # 2 8 a 7 4 5 ; " > < / i >   S h o w i n g   < s t r o n g > $ { d a t a . c u s t o m e r s . l e n g t h } < / s t r o n g >   r e s u l t s   f o r   " < s t r o n g > $ { e s c a p e H t m l ( s e a r c h ) } < / s t r o n g > " ` ; 
 
                                         }   e l s e   { 
 
                                                 s e a r c h S t a t u s . i n n e r H T M L   =   ` < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i >   T y p e   t o   s e a r c h   c u s t o m e r s . . . ` ; 
 
                                         } 
 
                                         
 
                                         u p d a t e P a g i n a t i o n ( d a t a . c u r r e n t P a g e   | |   1 ,   d a t a . t o t a l P a g e s   | |   1 ,   d a t a . t o t a l   | |   0 ,   d a t a . p e r P a g e   | |   p e r P a g e ) ; 
 
                                         
 
                                 }   e l s e   { 
 
                                         c u s t o m e r s B o d y . i n n e r H T M L   =   ` 
 
                                                 < t r   i d = " n o R e s u l t " > 
 
                                                         < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 "   s t y l e = " f o n t - s i z e : 1 3 p x ; " > 
 
                                                                 < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                                                 N o   c u s t o m e r s   f o u n d   m a t c h i n g   " < s t r o n g > $ { e s c a p e H t m l ( s e a r c h ) } < / s t r o n g > " 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         ` ; 
 
                                         t o t a l C o u n t D i s p l a y . i n n e r H T M L   =   ` T o t a l :   < s t r o n g > 0 < / s t r o n g > ` ; 
 
                                         s e a r c h S t a t u s . i n n e r H T M L   =   ` < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i >   N o   r e s u l t s   f o r   " < s t r o n g > $ { e s c a p e H t m l ( s e a r c h ) } < / s t r o n g > " ` ; 
 
                                         u p d a t e P a g i n a t i o n ( 1 ,   1 ,   0 ,   p e r P a g e ) ; 
 
                                 } 
 
                         } ) 
 
                         . c a t c h ( e r r o r   = >   { 
 
                                 c o n s o l e . e r r o r ( ' S e a r c h   e r r o r : ' ,   e r r o r ) ; 
 
                                 s e a r c h L o a d e r . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                 s e a r c h S t a t u s . i n n e r H T M L   =   ' < s p a n   c l a s s = " t e x t - d a n g e r " > < i   c l a s s = " f a s   f a - e x c l a m a t i o n - c i r c l e   m e - 1 " > < / i >   E r r o r :   '   +   e r r o r . m e s s a g e   +   ' < / s p a n > ' ; 
 
                         } ) ; 
 
         } 
 
 
 
         / /   = = = = =   U P D A T E   P A G I N A T I O N   = = = = = 
 
         f u n c t i o n   u p d a t e P a g i n a t i o n ( p a g e ,   t o t a l P a g e s ,   t o t a l ,   p e r P a g e )   { 
 
                 c o n s t   c o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p a g i n a t i o n C o n t a i n e r ' ) ; 
 
                 i f   ( t o t a l P a g e s   < =   1 )   { 
 
                         c o n t a i n e r . i n n e r H T M L   =   ` 
 
                                 < d i v   c l a s s = " m t - 2   t e x t - m u t e d   s m a l l " > 
 
                                         T o t a l   C u s t o m e r s :   < s t r o n g > $ { t o t a l } < / s t r o n g > 
 
                                 < / d i v > 
 
                         ` ; 
 
                         r e t u r n ; 
 
                 } 
 
                 
 
                 l e t   h t m l   =   ` 
 
                         < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m t - 3 " > 
 
                                 < d i v   c l a s s = " t e x t - m u t e d   s m a l l "   i d = " p a g i n a t i o n I n f o " > 
 
                                         $ { t o t a l }   o f   $ { t o t a l }   c u s t o m e r s 
 
                                         $ { c u r r e n t S e a r c h   ?   ' < s p a n   c l a s s = " t e x t - p r i m a r y " > ( f i l t e r e d ) < / s p a n > '   :   ' ' } 
 
                                 < / d i v > 
 
                                 < n a v > 
 
                                         < u l   c l a s s = " p a g i n a t i o n   p a g i n a t i o n - s m   m b - 0 " > 
 
                                                 < l i   c l a s s = " p a g e - i t e m   $ { p a g e   < =   1   ?   ' d i s a b l e d '   :   ' ' } " > 
 
                                                         < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " 1 " > < i   c l a s s = " f a s   f a - a n g l e - d o u b l e - l e f t " > < / i > < / a > 
 
                                                 < / l i > 
 
                                                 < l i   c l a s s = " p a g e - i t e m   $ { p a g e   < =   1   ?   ' d i s a b l e d '   :   ' ' } " > 
 
                                                         < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " $ { p a g e - 1 } " > < i   c l a s s = " f a s   f a - c h e v r o n - l e f t " > < / i > < / a > 
 
                                                 < / l i > 
 
                 ` ; 
 
                 
 
                 c o n s t   s t a r t   =   M a t h . m a x ( 1 ,   p a g e   -   2 ) ; 
 
                 c o n s t   e n d   =   M a t h . m i n ( t o t a l P a g e s ,   p a g e   +   2 ) ; 
 
                 i f   ( s t a r t   >   1 )   { 
 
                         h t m l   + =   ` < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " 1 " > 1 < / a > < / l i > ` ; 
 
                         i f   ( s t a r t   >   2 )   h t m l   + =   ` < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > . . . < / s p a n > < / l i > ` ; 
 
                 } 
 
                 f o r   ( l e t   i   =   s t a r t ;   i   < =   e n d ;   i + + )   { 
 
                         c o n s t   a c t i v e   =   ( i   = = =   p a g e )   ?   ' a c t i v e '   :   ' ' ; 
 
                         h t m l   + =   ` < l i   c l a s s = " p a g e - i t e m   $ { a c t i v e } " > < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " $ { i } " > $ { i } < / a > < / l i > ` ; 
 
                 } 
 
                 i f   ( e n d   <   t o t a l P a g e s )   { 
 
                         i f   ( e n d   <   t o t a l P a g e s   -   1 )   h t m l   + =   ` < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > . . . < / s p a n > < / l i > ` ; 
 
                         h t m l   + =   ` < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " $ { t o t a l P a g e s } " > $ { t o t a l P a g e s } < / a > < / l i > ` ; 
 
                 } 
 
                 
 
                 h t m l   + =   ` 
 
                                                 < l i   c l a s s = " p a g e - i t e m   $ { p a g e   > =   t o t a l P a g e s   ?   ' d i s a b l e d '   :   ' ' } " > 
 
                                                         < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " $ { p a g e + 1 } " > < i   c l a s s = " f a s   f a - c h e v r o n - r i g h t " > < / i > < / a > 
 
                                                 < / l i > 
 
                                                 < l i   c l a s s = " p a g e - i t e m   $ { p a g e   > =   t o t a l P a g e s   ?   ' d i s a b l e d '   :   ' ' } " > 
 
                                                         < a   c l a s s = " p a g e - l i n k "   h r e f = " # "   d a t a - p a g e = " $ { t o t a l P a g e s } " > < i   c l a s s = " f a s   f a - a n g l e - d o u b l e - r i g h t " > < / i > < / a > 
 
                                                 < / l i > 
 
                                         < / u l > 
 
                                 < / n a v > 
 
                         < / d i v > 
 
                 ` ; 
 
                 
 
                 c o n t a i n e r . i n n e r H T M L   =   h t m l ; 
 
                 
 
                 c o n t a i n e r . q u e r y S e l e c t o r A l l ( ' . p a g e - l i n k [ d a t a - p a g e ] ' ) . f o r E a c h ( l i n k   = >   { 
 
                         l i n k . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( e )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 c o n s t   p a g e N u m   =   p a r s e I n t ( t h i s . d a t a s e t . p a g e ) ; 
 
                                 i f   ( p a g e N u m   & &   p a g e N u m   ! = =   c u r r e n t P a g e )   { 
 
                                         c u r r e n t P a g e   =   p a g e N u m ; 
 
                                         l o a d C u s t o m e r s ( p a g e N u m ,   c u r r e n t S e a r c h ,   c u r r e n t P e r P a g e ) ; 
 
                                 } 
 
                         } ) ; 
 
                 } ) ; 
 
         } 
 
 
 
         / /   = = = = =   L I V E   S E A R C H   = = = = = 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                 c o n s t   q u e r y   =   t h i s . v a l u e . t r i m ( ) ; 
 
                 
 
                 i f   ( s e a r c h T i m e o u t )   c l e a r T i m e o u t ( s e a r c h T i m e o u t ) ; 
 
                 
 
                 c u r r e n t S e a r c h   =   q u e r y ; 
 
                 c u r r e n t P a g e   =   1 ; 
 
                 
 
                 i f   ( q u e r y   = = =   ' '   & &   t h i s . v a l u e . l e n g t h   >   0 )   { 
 
                         r e t u r n ; 
 
                 } 
 
                 
 
                 s e a r c h T i m e o u t   =   s e t T i m e o u t ( f u n c t i o n ( )   { 
 
                         l o a d C u s t o m e r s ( 1 ,   q u e r y ,   c u r r e n t P e r P a g e ) ; 
 
                 } ,   3 0 0 ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   P E R   P A G E   C H A N G E   = = = = = 
 
         p e r P a g e S e l e c t . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                 c u r r e n t P e r P a g e   =   t h i s . v a l u e ; 
 
                 c u r r e n t P a g e   =   1 ; 
 
                 l o a d C u s t o m e r s ( 1 ,   c u r r e n t S e a r c h ,   c u r r e n t P e r P a g e ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   F O C U S :   s e l e c t   a l l   t e x t   = = = = = 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' f o c u s ' ,   f u n c t i o n ( )   { 
 
                 t h i s . s e l e c t ( ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   E S C   t o   c l e a r   = = = = = 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( e . k e y   = = =   ' E s c a p e ' )   { 
 
                         t h i s . v a l u e   =   ' ' ; 
 
                         c u r r e n t S e a r c h   =   ' ' ; 
 
                         c u r r e n t P a g e   =   1 ; 
 
                         l o a d C u s t o m e r s ( 1 ,   ' ' ,   c u r r e n t P e r P a g e ) ; 
 
                         t h i s . b l u r ( ) ; 
 
                 } 
 
         } ) ; 
 
 
 
         / /   = = = = =   I N I T I A L   L O A D   ( i f   s e a r c h   e x i s t s )   = = = = = 
 
         i f   ( c u r r e n t S e a r c h )   { 
 
                 l o a d C u s t o m e r s ( c u r r e n t P a g e ,   c u r r e n t S e a r c h ,   c u r r e n t P e r P a g e ) ; 
 
         } 
 
 
 
 } ) ( ) ; 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 2 " > 
 
         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r s   m e - 2   t e x t - p r i m a r y " > < / i > C u s t o m e r s < / h 5 > 
 
         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ a d d "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   C u s t o m e r 
 
         < / a > 
 
 < / d i v > 
 
 
 
 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
         < / d i v > 
 
 < ? p h p   e n d i f ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - b o d y   p - 2 " > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e   m b - 0 " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > # < / t h > 
 
                                                 < t h > I m a g e < / t h > 
 
                                                 < t h > N a m e < / t h > 
 
                                                 < t h > P h o n e < / t h > 
 
                                                 < t h > B a l a n c e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 0 p x ; " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ c u s t o m e r s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 2 " > N o   c u s t o m e r s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ c u s t o m e r s   a s   $ c ) :   ? > 
 
                                                         < ? p h p   
 
                                                                 $ b a l   =   $ c [ ' b a l a n c e ' ]   ? ?   0 ;   
 
                                                                 $ b a l C l a s s   =   $ b a l   >   0   ?   ' t e x t - d a n g e r '   :   ( $ b a l   <   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - s e c o n d a r y ' ) ; 
 
                                                                 / /         R                  :             &  R   R               &                            R                   &            R  
 
                                                                 $ p i c _ f i l e   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   $ c [ ' p r o f i l e _ p i c ' ] ; 
 
                                                                 i f   ( $ c [ ' p r o f i l e _ p i c ' ]   = =   ' d u m m y _ c u s t o m e r . p n g '   | |   ! f i l e _ e x i s t s ( $ p i c _ f i l e ) )   { 
 
                                                                         $ p i c _ s r c   =   ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' ; 
 
                                                                 }   e l s e   { 
 
                                                                         $ p i c _ s r c   =   $ p i c _ f i l e ; 
 
                                                                 } 
 
                                                         ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' c u s t o m e r _ n o ' ] ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > 
 
                                                                         < i m g   s r c = " < ? p h p   e c h o   $ p i c _ s r c ;   ? > "   w i d t h = " 3 0 "   h e i g h t = " 3 0 "   c l a s s = " r o u n d e d - c i r c l e "   s t y l e = " o b j e c t - f i t : c o v e r ; " > 
 
                                                                 < / t d > 
 
                                                                 < t d > < s m a l l > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > < / s t r o n g > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' p h o n e ' ] ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d   c l a s s = " < ? p h p   e c h o   $ b a l C l a s s ;   ? >   f w - b o l d " > < s m a l l > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l ,   0 ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ e d i t & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ d e l e t e & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - d a n g e r   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 "   o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e ? ' ) " > 
 
                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p 
 
 c l a s s   M e a s u r e m e n t   { 
 
         p r i v a t e   $ d b ; 
 
         p r i v a t e   $ c o m p a n y _ i d ; 
 
         p u b l i c   f u n c t i o n   _ _ c o n s t r u c t ( )   { 
 
                 g l o b a l   $ d b ; 
 
                 $ t h i s - > d b   =   $ d b ; 
 
                 $ t h i s - > c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   B Y   C U S T O M E R   I D   (  R    ` c u s t o m e r _ i d `                       &  R    ` c u s t o m e r _ n o `          &                       )   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y C u s t o m e r ( $ c u s t o m e r _ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   m e a s u r e m e n t s   W H E R E   c u s t o m e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   O R D E R   B Y   m e a s u r e d _ d a t e   D E S C " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ c u s t o m e r _ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h A l l ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   G E T   B Y   I D   = = = = = 
 
         p u b l i c   f u n c t i o n   g e t B y I d ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   *   F R O M   m e a s u r e m e n t s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                 r e t u r n   $ s t m t - > f e t c h ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   I N S E R T   = = = = = 
 
         p u b l i c   f u n c t i o n   i n s e r t ( $ d a t a )   { 
 
                 $ d a t a [ ' c o m p a n y _ i d ' ]   =   $ t h i s - > c o m p a n y _ i d ; 
 
                 $ s q l   =   " I N S E R T   I N T O   m e a s u r e m e n t s   ( 
 
                         c u s t o m e r _ i d ,   c h e s t ,   w a i s t ,   l o o s i n g ,   c u f f _ l e n g t h ,   c u f f _ w i d t h , 
 
                         s i d e p o c k e t ,   f r o n t p o c k e t ,   s h a l w a r p o c k e t , 
 
                         s h a l w a r _ l e n g t h ,   s h a l w a r _ b o t t o m ,   s h o u l d e r ,   s l e e v e ,   l e n g t h ,   c o l l a r , 
 
                         s h e r w a n i ,   n o t e s ,   r e m a r k s ,   m e a s u r e d _ d a t e ,   c o m p a n y _ i d 
 
                 )   V A L U E S   ( 
 
                         ? ,   ? ,   ? ,   ? ,   ? ,   ? , 
 
                         ? ,   ? ,   ? , 
 
                         ? ,   ? ,   ? ,   ? ,   ? ,   ? , 
 
                         ? ,   ? ,   ? ,   ? ,   ? 
 
                 ) " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' c u s t o m e r _ i d ' ] , 
 
                         $ d a t a [ ' c h e s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' w a i s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l o o s i n g ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ w i d t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s i d e p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' f r o n t p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ b o t t o m ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h o u l d e r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s l e e v e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c o l l a r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h e r w a n i ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' n o t e s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' r e m a r k s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' m e a s u r e d _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                         $ d a t a [ ' c o m p a n y _ i d ' ] 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   U P D A T E   = = = = = 
 
         p u b l i c   f u n c t i o n   u p d a t e ( $ i d ,   $ d a t a )   { 
 
                 $ s q l   =   " U P D A T E   m e a s u r e m e n t s   S E T   
 
                         c h e s t = ? ,   w a i s t = ? ,   l o o s i n g = ? ,   c u f f _ l e n g t h = ? ,   c u f f _ w i d t h = ? , 
 
                         s i d e p o c k e t = ? ,   f r o n t p o c k e t = ? ,   s h a l w a r p o c k e t = ? , 
 
                         s h a l w a r _ l e n g t h = ? ,   s h a l w a r _ b o t t o m = ? ,   s h o u l d e r = ? ,   s l e e v e = ? ,   l e n g t h = ? ,   c o l l a r = ? , 
 
                         s h e r w a n i = ? ,   n o t e s = ? ,   r e m a r k s = ? ,   m e a s u r e d _ d a t e = ? 
 
                         W H E R E   i d = ?   A N D   c o m p a n y _ i d = ? " ; 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( $ s q l ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ 
 
                         $ d a t a [ ' c h e s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' w a i s t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l o o s i n g ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c u f f _ w i d t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s i d e p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' f r o n t p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r p o c k e t ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h a l w a r _ b o t t o m ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h o u l d e r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s l e e v e ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' l e n g t h ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' c o l l a r ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' s h e r w a n i ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' n o t e s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' r e m a r k s ' ]   ? ?   n u l l , 
 
                         $ d a t a [ ' m e a s u r e d _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) , 
 
                         $ i d , 
 
                         $ t h i s - > c o m p a n y _ i d 
 
                 ] ) ; 
 
         } 
 
 
 
         / /   = = = = =   D E L E T E   = = = = = 
 
         p u b l i c   f u n c t i o n   d e l e t e ( $ i d )   { 
 
                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " D E L E T E   F R O M   m e a s u r e m e n t s   W H E R E   i d   =   ?   A N D   c o m p a n y _ i d   =   ? " ) ; 
 
                 r e t u r n   $ s t m t - > e x e c u t e ( [ $ i d ,   $ t h i s - > c o m p a n y _ i d ] ) ; 
 
         } 
 
 } 
 
 ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < s t y l e > 
 
         . c u t t i n g - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   6 p x   1 2 p x ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . s u i t - b a d g e   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   1 p x   6 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 4 0 a f ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . b t n - s u c c e s s - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 8 a 7 4 5   0 % ,   # 2 0 c 9 9 7   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - s u c c e s s - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - i n f o - s m   { 
 
                 b a c k g r o u n d :   # 1 7 a 2 b 8 ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - i n f o - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 1 3 8 4 9 6 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 2 3 ,   1 6 2 ,   1 8 4 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . c u t t i n g - c a r d   . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   2 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
         } 
 
         . c u t t i n g - c a r d   . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   3 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
         } 
 
         / *   = = = = =   S E A R C H   B A R   = = = = =   * / 
 
         . s e a r c h - b o x   { 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   4 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 m a x - w i d t h :   3 0 0 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 h e i g h t :   3 2 p x ; 
 
         } 
 
         . s e a r c h - b o x : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 4 f 8 a 8 b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 1 5 ) ; 
 
         } 
 
         . s e a r c h - w r a p p e r   { 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   8 p x ; 
 
                 f l e x - w r a p :   w r a p ; 
 
         } 
 
         . s e a r c h - w r a p p e r   . s e a r c h - i c o n   { 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
         } 
 
         . s e a r c h - w r a p p e r   . c l e a r - b t n   { 
 
                 b a c k g r o u n d :   n o n e ; 
 
                 b o r d e r :   n o n e ; 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 p a d d i n g :   0   4 p x ; 
 
                 d i s p l a y :   n o n e ; 
 
         } 
 
         . s e a r c h - w r a p p e r   . c l e a r - b t n : h o v e r   { 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . c u t t i n g - c a r d   . t a b l e   {   f o n t - s i z e :   9 p x ;   } 
 
                 . c u t t i n g - c a r d   . t a b l e   t h ,   . c u t t i n g - c a r d   . t a b l e   t d   {   p a d d i n g :   2 p x   2 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . s e a r c h - b o x   {   m a x - w i d t h :   1 0 0 % ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c u t t i n g - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - s c i s s o r s   m e - 2   t e x t - i n f o " > < / i > A s s i g n e d   C u t t i n g   S u i t s < / h 6 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 1 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ p e n d i n g "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - c l o c k   m e - 1 " > < / i >   P e n d i n g 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ r e p o r t "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " f o n t - s i z e : 1 1 p x ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   S E A R C H   B A R   = = = = =   - - > 
 
                 < d i v   c l a s s = " s e a r c h - w r a p p e r   m b - 2 " > 
 
                         < i   c l a s s = " f a s   f a - s e a r c h   s e a r c h - i c o n " > < / i > 
 
                         < i n p u t   t y p e = " t e x t "   i d = " s e a r c h I n p u t "   c l a s s = " s e a r c h - b o x "   p l a c e h o l d e r = " S e a r c h   b y   C u s t o m e r   o r   C u t t e r . . . " > 
 
                         < b u t t o n   c l a s s = " c l e a r - b t n "   i d = " c l e a r S e a r c h "   t i t l e = " C l e a r   s e a r c h " >  S" < / b u t t o n > 
 
                         < s p a n   c l a s s = " t e x t - m u t e d "   s t y l e = " f o n t - s i z e : 1 1 p x ; "   i d = " r e s u l t C o u n t " > 
 
                                 T o t a l :   < s t r o n g > < ? p h p   e c h o   c o u n t ( $ a s s i g n e d _ s u i t s ) ;   ? > < / s t r o n g > 
 
                         < / s p a n > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ a s s i g n e d _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - i n b o x   t e x t - m u t e d " > < / i > 
 
                                 N o   s u i t s   a s s i g n e d   f o r   c u t t i n g . 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e "   i d = " a s s i g n e d T a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S u i t   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > S u i t   T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " > C u t t e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 2 0 % ; " > C o m p l e t e < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y   i d = " t a b l e B o d y " > 
 
                                                 < ? p h p   f o r e a c h   ( $ a s s i g n e d _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r   c l a s s = " s e a r c h - r o w "   
 
                                                                 d a t a - c u s t o m e r = " < ? p h p   e c h o   s t r t o l o w e r ( h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' ' ) ) ;   ? > "   
 
                                                                 d a t a - c u t t e r = " < ? p h p   e c h o   s t r t o l o w e r ( h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u t t e r _ n a m e ' ]   ? ?   ' ' ) ) ;   ? > " > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " s u i t - b a d g e " > # < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u t t e r _ n a m e ' ]   ? ?   ' U n a s s i g n e d ' ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = c u t t i n g _ c o m p l e t e "   c l a s s = " d - f l e x   g a p - 1   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' o r d e r _ i d ' ] ;   ? > " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " e m p l o y e e _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' e m p l o y e e _ i d ' ]   ? ?   0 ;   ? > " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s i z e "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > " > 
 
                                                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s u c c e s s - s m " > 
 
                                                                                         < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   C o m p l e t e 
 
                                                                                 < / b u t t o n > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ s l i p & i d = < ? p h p   e c h o   $ s u i t [ ' o r d e r _ i d ' ] ;   ? > & s u i t _ i d = < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > "   
 
                                                                                       t a r g e t = " _ b l a n k "   c l a s s = " b t n - i n f o - s m "   t i t l e = " P r i n t   S l i p " > 
 
                                                                                         < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / f o r m > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   S E A R C H   S C R I P T   = = = = =   - - > 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h I n p u t ' ) ; 
 
         c o n s t   c l e a r B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c l e a r S e a r c h ' ) ; 
 
         c o n s t   r o w s   =   d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # t a b l e B o d y   . s e a r c h - r o w ' ) ; 
 
         c o n s t   r e s u l t C o u n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' r e s u l t C o u n t ' ) ; 
 
 
 
         f u n c t i o n   f i l t e r T a b l e ( )   { 
 
                 c o n s t   t e r m   =   s e a r c h I n p u t . v a l u e . t o L o w e r C a s e ( ) . t r i m ( ) ; 
 
                 l e t   v i s i b l e   =   0 ; 
 
 
 
                 r o w s . f o r E a c h ( r o w   = >   { 
 
                         c o n s t   c u s t o m e r   =   r o w . d a t a s e t . c u s t o m e r   | |   ' ' ; 
 
                         c o n s t   c u t t e r   =   r o w . d a t a s e t . c u t t e r   | |   ' ' ; 
 
                         c o n s t   m a t c h   =   c u s t o m e r . i n c l u d e s ( t e r m )   | |   c u t t e r . i n c l u d e s ( t e r m ) ; 
 
                         r o w . s t y l e . d i s p l a y   =   m a t c h   ?   ' '   :   ' n o n e ' ; 
 
                         i f   ( m a t c h )   v i s i b l e + + ; 
 
                 } ) ; 
 
 
 
                 / /   U p d a t e   r e s u l t   c o u n t 
 
                 r e s u l t C o u n t . i n n e r H T M L   =   ' S h o w i n g :   < s t r o n g > '   +   v i s i b l e   +   ' < / s t r o n g >   /   < s t r o n g > '   +   r o w s . l e n g t h   +   ' < / s t r o n g > ' ; 
 
                 
 
                 / /   S h o w / h i d e   c l e a r   b u t t o n 
 
                 c l e a r B t n . s t y l e . d i s p l a y   =   t e r m . l e n g t h   >   0   ?   ' i n l i n e - b l o c k '   :   ' n o n e ' ; 
 
         } 
 
 
 
         / /   S e a r c h   o n   i n p u t 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f i l t e r T a b l e ) ; 
 
 
 
         / /   C l e a r   s e a r c h 
 
         c l e a r B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 s e a r c h I n p u t . v a l u e   =   ' ' ; 
 
                 f i l t e r T a b l e ( ) ; 
 
                 s e a r c h I n p u t . f o c u s ( ) ; 
 
         } ) ; 
 
 
 
         / /   O p t i o n a l :   c l e a r   o n   E s c a p e   k e y 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( e . k e y   = = =   ' E s c a p e ' )   { 
 
                         t h i s . v a l u e   =   ' ' ; 
 
                         f i l t e r T a b l e ( ) ; 
 
                         t h i s . b l u r ( ) ; 
 
                 } 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < s t y l e > 
 
         . r e p o r t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 c 5 f 6 e   0 % ,   # 4 f 8 a 8 b   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f i l t e r - f o r m   . f o r m - c o n t r o l ,   . f i l t e r - f o r m   . f o r m - s e l e c t   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - p r i n t   { 
 
                 b a c k g r o u n d :   # 6 c 7 5 7 d ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - p r i n t : h o v e r   { 
 
                 b a c k g r o u n d :   # 5 a 6 2 6 8 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s u m m a r y - c a r d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 p a d d i n g :   1 0 p x   1 4 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . s u m m a r y - c a r d   . n u m b e r   { 
 
                 f o n t - s i z e :   2 4 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
         } 
 
         . s u m m a r y - c a r d   . l a b e l   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
         } 
 
         . s u m m a r y - c a r d   . n u m b e r . g o l d   {   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . g r e e n   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . b l u e   {   c o l o r :   # 0 d 6 e f d ;   } 
 
         . c u t t e r - t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
         } 
 
         . c u t t e r - t a b l e   t h   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9 ; 
 
                 c o l o r :   # 2 d 3 7 4 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   6 p x   8 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . c u t t e r - t a b l e   t d   { 
 
                 p a d d i n g :   5 p x   8 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . c u t t e r - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f f ; 
 
         } 
 
         . c u t t e r - t a b l e   . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . c u t t e r - t a b l e   . t o t a l - r o w   t d   { 
 
                 b o r d e r - t o p :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                 p a d d i n g :   6 p x   8 p x ; 
 
         } 
 
         . b a d g e - s i z e   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   2 p x   8 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s i z e . l a r g e   {   b a c k g r o u n d :   # d b e a f e ;   c o l o r :   # 1 e 4 0 a f ;   } 
 
         . b a d g e - s i z e . m e d i u m   {   b a c k g r o u n d :   # d 1 f a e 5 ;   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . b a d g e - s i z e . s m a l l   {   b a c k g r o u n d :   # f e f 3 c 7 ;   c o l o r :   # 9 2 4 0 0 e ;   } 
 
         . r a n k - b a d g e   { 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w i d t h :   2 4 p x ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 l i n e - h e i g h t :   2 4 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . r a n k - b a d g e . g o l d   {   b a c k g r o u n d :   # f 7 9 7 1 e ;   } 
 
         . r a n k - b a d g e . s i l v e r   {   b a c k g r o u n d :   # 9 4 a 3 b 8 ;   } 
 
         . r a n k - b a d g e . b r o n z e   {   b a c k g r o u n d :   # c d 7 f 3 2 ;   } 
 
         . r a n k - b a d g e . n o r m a l   {   b a c k g r o u n d :   # e 2 e 8 f 0 ;   c o l o r :   # 4 a 5 5 6 8 ;   } 
 
         . n o - d a t a   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . n o - d a t a   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         @ m e d i a   p r i n t   { 
 
                 . n o - p r i n t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 . r e p o r t - c a r d   {   b o x - s h a d o w :   n o n e ;   b o r d e r :   1 p x   s o l i d   # d d d ;   } 
 
                 . f i l t e r - f o r m   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 . c u t t e r - t a b l e   t h   {   b a c k g r o u n d :   # f 0 f 0 f 0   ! i m p o r t a n t ;   } 
 
                 . c u t t e r - t a b l e   . t o t a l - r o w   {   b a c k g r o u n d :   # f 0 f 0 f 0   ! i m p o r t a n t ;   } 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . c u t t e r - t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . c u t t e r - t a b l e   t h ,   . c u t t e r - t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   } 
 
                 . s u m m a r y - c a r d   . n u m b e r   {   f o n t - s i z e :   1 8 p x ;   } 
 
                 . f i l t e r - f o r m   . r o w   {   g a p :   4 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " r e p o r t - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - c u t   m e - 2 " > < / i >                    /   C u t t e r   R e p o r t < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >            /   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   F O R M   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - f o r m " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " c u t t e r _ r e p o r t " > 
 
                         < d i v   c l a s s = " r o w   g - 2   a l i g n - i t e m s - e n d " > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " >           /   F i l t e r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " f i l t e r "   c l a s s = " f o r m - s e l e c t "   o n c h a n g e = " t h i s . f o r m . s u b m i t ( ) " > 
 
                                                 < o p t i o n   v a l u e = " t o d a y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' t o d a y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T o d a y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " w e e k l y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' w e e k l y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T h i s   W e e k < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " m o n t h l y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' m o n t h l y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T h i s   M o n t h < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " d a t e _ t o _ d a t e "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > D a t e   t o   D a t e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' b l o c k '   :   ' n o n e ' ;   ? > ; " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " >          /   F r o m < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' b l o c k '   :   ' n o n e ' ;   ? > ; " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " >        `     /   T o < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - f i l t e r   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >      `       `   /   S h o w 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - p r i n t   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                                                 < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >              /   P r i n t 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 1 2   t e x t - e n d " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > 
 
                                                          /   P e r i o d :   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m _ d a t e ) ) ;   ? >   -   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o _ d a t e ) ) ;   ? > 
 
                                         < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ! - -   = = = = =   S U M M A R Y   C A R D S   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   g - 2   m t - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   b l u e " > < ? p h p   e c h o   c o u n t ( a r r a y _ f i l t e r ( $ c u t t e r _ d a t a ,   f n ( $ c )   = >   $ c [ ' t o t a l _ a m o u n t ' ]   >   0 ) ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " >          &           /   A c t i v e   C u t t e r s < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   g o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ g r a n d _ s u i t s ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " >              /   T o t a l   S u i t s < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   g r e e n " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ g r a n d _ t o t a l ,   0 ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " >                `   `  /   T o t a l   P a y m e n t < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r " > < ? p h p   e c h o   $ g r a n d _ s u i t s   >   0   ?   ' R s .   '   .   n u m b e r _ f o r m a t ( r o u n d ( $ g r a n d _ t o t a l   /   m a x ( $ g r a n d _ s u i t s ,   1 ) ,   0 ) )   :   ' R s .   0 ' ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " >    `                  /   A v g   p e r   S u i t < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   C U T T E R   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e   m t - 3 " > 
 
                         < t a b l e   c l a s s = " t a b l e   c u t t e r - t a b l e " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 6 % ; " > # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " >         /   C u t t e r < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " >     `  /   C o d e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " >      `    < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " >            < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 8 % ; " >           /   S i z e s < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " >    `         /   A v g < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 7 % ; " >            &   /   T o t a l < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ c u t t e r _ d a t a )   | |   a r r a y _ s u m ( a r r a y _ c o l u m n ( $ c u t t e r _ d a t a ,   ' t o t a l _ a m o u n t ' ) )   = =   0 ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 8 " > 
 
                                                                 < d i v   c l a s s = " n o - d a t a " > 
 
                                                                         < i   c l a s s = " f a s   f a - i n b o x " > < / i > 
 
                                                                         < p >  !             `               !                    !  `  /   N o   c u t t i n g   r e c o r d s   f o u n d . < / p > 
 
                                                                 < / d i v > 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   
 
                                                 $ r a n k   =   1 ; 
 
                                                 $ p r e v _ a m o u n t   =   - 1 ; 
 
                                                 $ d i s p l a y _ r a n k   =   1 ; 
 
                                                 f o r e a c h   ( $ c u t t e r _ d a t a   a s   $ c ) :   
 
                                                         i f   ( $ c [ ' t o t a l _ a m o u n t ' ]   = =   0 )   c o n t i n u e ; 
 
                                                         i f   ( $ c [ ' t o t a l _ a m o u n t ' ]   ! =   $ p r e v _ a m o u n t )   { 
 
                                                                 $ d i s p l a y _ r a n k   =   $ r a n k ; 
 
                                                         } 
 
                                                         $ p r e v _ a m o u n t   =   $ c [ ' t o t a l _ a m o u n t ' ] ; 
 
                                                         $ r a n k + + ; 
 
                                                         
 
                                                         $ r a n k _ c l a s s   =   ' n o r m a l ' ; 
 
                                                         i f   ( $ d i s p l a y _ r a n k   = =   1 )   $ r a n k _ c l a s s   =   ' g o l d ' ; 
 
                                                         e l s e i f   ( $ d i s p l a y _ r a n k   = =   2 )   $ r a n k _ c l a s s   =   ' s i l v e r ' ; 
 
                                                         e l s e i f   ( $ d i s p l a y _ r a n k   = =   3 )   $ r a n k _ c l a s s   =   ' b r o n z e ' ; 
 
                                                 ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s p a n   c l a s s = " r a n k - b a d g e   < ? p h p   e c h o   $ r a n k _ c l a s s ;   ? > " > < ? p h p   e c h o   $ d i s p l a y _ r a n k ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - s t a r t   f w - b o l d " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' e m p _ c o d e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   $ c [ ' t o t a l _ o r d e r s ' ] ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   $ c [ ' t o t a l _ s u i t s ' ] ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ c [ ' l a r g e _ c o u n t ' ]   >   0 ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e - s i z e   l a r g e " > L :   < ? p h p   e c h o   $ c [ ' l a r g e _ c o u n t ' ] ;   ? > < / s p a n > 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                         < ? p h p   i f   ( $ c [ ' m e d i u m _ c o u n t ' ]   >   0 ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e - s i z e   m e d i u m " > M :   < ? p h p   e c h o   $ c [ ' m e d i u m _ c o u n t ' ] ;   ? > < / s p a n > 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                         < ? p h p   i f   ( $ c [ ' s m a l l _ c o u n t ' ]   >   0 ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e - s i z e   s m a l l " > S :   < ? p h p   e c h o   $ c [ ' s m a l l _ c o u n t ' ] ;   ? > < / s p a n > 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c [ ' a v g _ p e r _ s u i t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " f w - b o l d   t e x t - s u c c e s s " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < ! - -   = = = = =   T O T A L   R O W   = = = = =   - - > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " >       /   T o t a l : < / t d > 
 
                                                         < t d > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ g r a n d _ s u i t s ) ;   ? > < / t d > 
 
                                                         < t d > < / t d > 
 
                                                         < t d > R s .   < ? p h p   e c h o   $ g r a n d _ s u i t s   >   0   ?   n u m b e r _ f o r m a t ( r o u n d ( $ g r a n d _ t o t a l   /   m a x ( $ g r a n d _ s u i t s ,   1 ) ,   0 ) )   :   ' 0 ' ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - s u c c e s s " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ g r a n d _ t o t a l ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   P R I N T   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   s m a l l   m t - 2 "   s t y l e = " d i s p l a y : n o n e ; "   i d = " p r i n t F o o t e r " > 
 
                         < h r > 
 
                         < p >               `       `         `  :   < ? p h p   e c h o   d a t e ( ' d - m - Y   h : i   A ' ) ;   ? > < / p > 
 
                         < p > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / p > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         / /   S h o w / h i d e   d a t e   r a n g e   f i e l d s 
 
         c o n s t   f i l t e r S e l e c t   =   d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " f i l t e r " ] ' ) ; 
 
         c o n s t   d a t e R a n g e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) ; 
 
         c o n s t   d a t e R a n g e T o   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) ; 
 
         
 
         f i l t e r S e l e c t . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                 i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                         d a t e R a n g e . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                         d a t e R a n g e T o . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                 }   e l s e   { 
 
                         d a t e R a n g e . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         d a t e R a n g e T o . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 } 
 
         } ) ; 
 
         
 
         / /   P r i n t   f o o t e r 
 
         w i n d o w . a d d E v e n t L i s t e n e r ( ' b e f o r e p r i n t ' ,   f u n c t i o n ( )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' p r i n t F o o t e r ' ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
         } ) ; 
 
         w i n d o w . a d d E v e n t L i s t e n e r ( ' a f t e r p r i n t ' ,   f u n c t i o n ( )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' p r i n t F o o t e r ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < s t y l e > 
 
         . r e p o r t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 c 5 f 6 e   0 % ,   # 4 f 8 a 8 b   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f i l t e r - f o r m   . f o r m - c o n t r o l ,   . f i l t e r - f o r m   . f o r m - s e l e c t   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - p r i n t   { 
 
                 b a c k g r o u n d :   # 6 c 7 5 7 d ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - p r i n t : h o v e r   { 
 
                 b a c k g r o u n d :   # 5 a 6 2 6 8 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s u m m a r y - c a r d s   { 
 
                 d i s p l a y :   g r i d ; 
 
                 g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 4 ,   1 f r ) ; 
 
                 g a p :   1 0 p x ; 
 
                 m a r g i n - t o p :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   1 6 p x ; 
 
         } 
 
         . s u m m a r y - c a r d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 p a d d i n g :   1 2 p x   1 4 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . s u m m a r y - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 8 ) ; 
 
         } 
 
         . s u m m a r y - c a r d   . n u m b e r   { 
 
                 f o n t - s i z e :   2 2 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
         } 
 
         . s u m m a r y - c a r d   . l a b e l   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 m a r g i n - t o p :   2 p x ; 
 
         } 
 
         . s u m m a r y - c a r d   . n u m b e r . b l u e   {   c o l o r :   # 0 d 6 e f d ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . g r e e n   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . o r a n g e   {   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . g o l d   {   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . p u r p l e   {   c o l o r :   # 8 e 2 4 a a ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . r e d   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
         . d e t a i l - t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . d e t a i l - t a b l e   t h   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9 ; 
 
                 c o l o r :   # 2 d 3 7 4 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . d e t a i l - t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
         } 
 
         . d e t a i l - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f f ; 
 
         } 
 
         . d e t a i l - t a b l e   . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . d e t a i l - t a b l e   . t o t a l - r o w   t d   { 
 
                 b o r d e r - t o p :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                 p a d d i n g :   6 p x   8 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . b a d g e - s t a t u s   { 
 
                 f o n t - s i z e :   8 p x ; 
 
                 p a d d i n g :   2 p x   8 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s t a t u s . c o m p l e t e d   {   b a c k g r o u n d :   # d 1 f a e 5 ;   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . b a d g e - s t a t u s . p e n d i n g   {   b a c k g r o u n d :   # f e f 3 c 7 ;   c o l o r :   # 9 2 4 0 0 e ;   } 
 
         . b a d g e - s t a t u s . c u t t i n g   {   b a c k g r o u n d :   # d b e a f e ;   c o l o r :   # 1 e 4 0 a f ;   } 
 
         . n o - d a t a   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . n o - d a t a   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         . s e l e c t e d - c u t t e r - i n f o   { 
 
                 b a c k g r o u n d :   # e 8 f 5 e 9 ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 p a d d i n g :   8 p x   1 4 p x ; 
 
                 b o r d e r - l e f t :   4 p x   s o l i d   # 2 8 a 7 4 5 ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . s e l e c t e d - c u t t e r - i n f o   i   { 
 
                 c o l o r :   # 2 8 a 7 4 5 ; 
 
                 m a r g i n - r i g h t :   6 p x ; 
 
         } 
 
         @ m e d i a   p r i n t   { 
 
                 . n o - p r i n t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 . r e p o r t - c a r d   {   b o x - s h a d o w :   n o n e ;   b o r d e r :   1 p x   s o l i d   # d d d ;   } 
 
                 . f i l t e r - f o r m   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 . d e t a i l - t a b l e   t h   {   b a c k g r o u n d :   # f 0 f 0 f 0   ! i m p o r t a n t ;   } 
 
                 . d e t a i l - t a b l e   . t o t a l - r o w   {   b a c k g r o u n d :   # f 0 f 0 f 0   ! i m p o r t a n t ;   } 
 
                 . s u m m a r y - c a r d   {   b o r d e r :   1 p x   s o l i d   # d d d ;   } 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s u m m a r y - c a r d s   {   g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 2 ,   1 f r ) ;   } 
 
                 . d e t a i l - t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . d e t a i l - t a b l e   t h ,   . d e t a i l - t a b l e   t d   {   p a d d i n g :   2 p x   3 p x ;   } 
 
                 . s e l e c t e d - c u t t e r - i n f o   {   f o n t - s i z e :   1 1 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " r e p o r t - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - c u t   m e - 2 " > < / i > C u t t e r   R e p o r t < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   F O R M   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - f o r m " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " c u t t e r _ r e p o r t " > 
 
                         < d i v   c l a s s = " r o w   g - 2   a l i g n - i t e m s - e n d " > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > C u t t e r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " c u t t e r _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   - - < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ c u t t e r s   a s   $ c ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ c u t t e r _ i d   = =   $ c [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > F i l t e r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " f i l t e r "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " t o d a y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' t o d a y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T o d a y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " w e e k l y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' w e e k l y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T h i s   W e e k < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " m o n t h l y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' m o n t h l y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T h i s   M o n t h < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " d a t e _ t o _ d a t e "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > D a t e   t o   D a t e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' b l o c k '   :   ' n o n e ' ;   ? > ; " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > F r o m < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' b l o c k '   :   ' n o n e ' ;   ? > ; " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > T o < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - f i l t e r   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   S h o w 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - p r i n t   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                                                 < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w   m t - 1 " > 
 
                                 < d i v   c l a s s = " c o l - 1 2   t e x t - e n d " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > 
 
                                                 P e r i o d :   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m _ d a t e ) ) ;   ? >   -   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o _ d a t e ) ) ;   ? > 
 
                                         < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ? p h p   i f   ( $ c u t t e r _ i d   >   0   & &   $ s e l e c t e d _ c u t t e r ) :   ? > 
 
                         < ! - -   = = = = =   S E L E C T E D   C U T T E R   I N F O   = = = = =   - - > 
 
                         < d i v   c l a s s = " s e l e c t e d - c u t t e r - i n f o " > 
 
                                 < i   c l a s s = " f a s   f a - u s e r - t i e " > < / i > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e l e c t e d _ c u t t e r [ ' n a m e ' ] ) ;   ? >   
 
                                 ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e l e c t e d _ c u t t e r [ ' e m p _ c o d e ' ] ) ;   ? > )   
 
                                 -   P e r i o d :   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m _ d a t e ) ) ;   ? >   t o   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o _ d a t e ) ) ;   ? > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S U M M A R Y   C A R D S   = = = = =   - - > 
 
                         < d i v   c l a s s = " s u m m a r y - c a r d s " > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   b l u e " > < ? p h p   e c h o   $ s u m m a r y [ ' a s s i g n e d ' ] ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > A s s i g n e d < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   g r e e n " > < ? p h p   e c h o   $ s u m m a r y [ ' c o m p l e t e d ' ] ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > C o m p l e t e d < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   o r a n g e " > < ? p h p   e c h o   $ s u m m a r y [ ' p e n d i n g ' ] ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > P e n d i n g < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   g o l d " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u m m a r y [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   A m o u n t < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   D E T A I L   T A B L E   = = = = =   - - > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " d e t a i l - t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 6 % ; " > # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > S u i t   T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > S t a t u s < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > A m o u n t < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ r e c o r d s ) ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d   c o l s p a n = " 8 " > 
 
                                                                         < d i v   c l a s s = " n o - d a t a " > 
 
                                                                                 < i   c l a s s = " f a s   f a - i n b o x " > < / i > 
 
                                                                                 < p > N o   c u t t i n g   r e c o r d s   f o u n d   f o r   t h i s   p e r i o d . < / p > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   $ s n   =   1 ;   ? > 
 
                                                         < ? p h p   f o r e a c h   ( $ r e c o r d s   a s   $ r o w ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < ? p h p   e c h o   $ s n + + ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ v i e w & i d = < ? p h p   e c h o   $ r o w [ ' o r d e r _ i d ' ] ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " t e x t - d e c o r a t i o n - n o n e " > 
 
                                                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' o r d e r _ n o ' ] ) ;   ? > 
 
                                                                                 < / a > 
 
                                                                         < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' s u i t _ t y p e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' s i z e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < ? p h p   
 
                                                                                         $ s t a t u s   =   $ r o w [ ' s u i t _ s t a t u s ' ]   ? ?   ' c o m p l e t e d ' ; 
 
                                                                                         $ b a d g e _ c l a s s   =   ' c o m p l e t e d ' ; 
 
                                                                                         i f   ( $ s t a t u s   = =   ' p e n d i n g ' )   $ b a d g e _ c l a s s   =   ' p e n d i n g ' ; 
 
                                                                                         e l s e i f   ( $ s t a t u s   = =   ' c u t t i n g ' )   $ b a d g e _ c l a s s   =   ' c u t t i n g ' ; 
 
                                                                                 ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e - s t a t u s   < ? p h p   e c h o   $ b a d g e _ c l a s s ;   ? > " > 
 
                                                                                         < ? p h p   e c h o   u c f i r s t ( $ s t a t u s ) ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / t d > 
 
                                                                         < t d   c l a s s = " f w - b o l d   t e x t - s u c c e s s " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < ! - -   = = = = =   S U B   T O T A L   R O W   = = = = =   - - > 
 
                                                         < t r   c l a s s = " t o t a l - r o w " > 
 
                                                                 < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - e n d " > S u b   T o t a l : < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - s u c c e s s " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ g r a n d _ t o t a l ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
 
 
                 < ? p h p   e l s e i f   ( $ c u t t e r _ i d   >   0   & &   ! $ s e l e c t e d _ c u t t e r ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - w a r n i n g   p y - 2   m t - 3 " > 
 
                                 < i   c l a s s = " f a s   f a - e x c l a m a t i o n - t r i a n g l e   m e - 2 " > < / i > 
 
                                 S e l e c t e d   c u t t e r   n o t   f o u n d . 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 2   m t - 3 " > 
 
                                 < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 2 " > < / i > 
 
                                 P l e a s e   s e l e c t   a   c u t t e r   a n d   a p p l y   f i l t e r . 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   P R I N T   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   s m a l l   m t - 2 "   s t y l e = " d i s p l a y : n o n e ; "   i d = " p r i n t F o o t e r " > 
 
                         < h r > 
 
                         < p > P r i n t e d   o n :   < ? p h p   e c h o   d a t e ( ' d - m - Y   h : i   A ' ) ;   ? > < / p > 
 
                         < p > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / p > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         / /   S h o w / h i d e   d a t e   r a n g e   f i e l d s 
 
         c o n s t   f i l t e r S e l e c t   =   d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " f i l t e r " ] ' ) ; 
 
         c o n s t   d a t e R a n g e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) ; 
 
         c o n s t   d a t e R a n g e T o   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) ; 
 
         
 
         i f   ( f i l t e r S e l e c t )   { 
 
                 f i l t e r S e l e c t . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                                 d a t e R a n g e . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                                 d a t e R a n g e T o . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                         }   e l s e   { 
 
                                 d a t e R a n g e . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                 d a t e R a n g e T o . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         } 
 
                 } ) ; 
 
         } 
 
         
 
         / /   P r i n t   f o o t e r 
 
         w i n d o w . a d d E v e n t L i s t e n e r ( ' b e f o r e p r i n t ' ,   f u n c t i o n ( )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' p r i n t F o o t e r ' ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
         } ) ; 
 
         w i n d o w . a d d E v e n t L i s t e n e r ( ' a f t e r p r i n t ' ,   f u n c t i o n ( )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' p r i n t F o o t e r ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < s t y l e > 
 
         . c u t t i n g - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   8 p x   1 4 p x ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . b a d g e - s t a t u s   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   3 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s t a t u s . a s s i g n e d   {   b a c k g r o u n d :   # d b e a f e ;   c o l o r :   # 1 e 4 0 a f ;   } 
 
         . b a d g e - s t a t u s . c o m p l e t e d   {   b a c k g r o u n d :   # d 1 f a e 5 ;   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . b a d g e - s t a t u s . c a n c e l l e d   {   b a c k g r o u n d :   # f c e 4 e c ;   c o l o r :   # c 6 2 8 2 8 ;   } 
 
         . f i l t e r - f o r m   . f o r m - c o n t r o l ,   . f i l t e r - f o r m   . f o r m - s e l e c t   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - r e s e t   { 
 
                 b a c k g r o u n d :   # 6 c 7 5 7 d ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - r e s e t : h o v e r   { 
 
                 b a c k g r o u n d :   # 5 a 6 2 6 8 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . c u t t i n g - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . c u t t i n g - c a r d   . t a b l e   t h ,   . c u t t i n g - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   } 
 
                 . f i l t e r - f o r m   . r o w   {   g a p :   4 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c u t t i n g - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - c u t   m e - 2   t e x t - p r i m a r y " > < / i > A l l   C u t t i n g   R e c o r d s < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ p e n d i n g "   c l a s s = " b t n   b t n - w a r n i n g   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - c l o c k   m e - 1 " > < / i >   P e n d i n g 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - i n f o   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - l i s t   m e - 1 " > < / i >   A s s i g n e d 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ r e p o r t "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t e r _ r e p o r t "   c l a s s = " b t n   b t n - d a r k   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - u s e r s   m e - 1 " > < / i >   C u t t e r   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   F O R M   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - f o r m " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " c u t t i n g " > 
 
                         < d i v   c l a s s = " r o w   g - 2   a l i g n - i t e m s - e n d " > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   - - < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " a s s i g n e d "   < ? p h p   e c h o   ( $ s t a t u s   = =   ' a s s i g n e d ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A s s i g n e d < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " c o m p l e t e d "   < ? p h p   e c h o   ( $ s t a t u s   = =   ' c o m p l e t e d ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > C o m p l e t e d < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " c a n c e l l e d "   < ? p h p   e c h o   ( $ s t a t u s   = =   ' c a n c e l l e d ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > C a n c e l l e d < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > C u t t e r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " c u t t e r _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   - - < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ c u t t e r s   a s   $ c ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ c u t t e r _ i d   = =   $ c [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > F r o m   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > T o   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - f i l t e r   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g "   c l a s s = " b t n - r e s e t   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - u n d o   m e - 1 " > < / i >   R e s e t 
 
                                         < / a > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < d i v   c l a s s = " t e x t - e n d   m t - 2   m b - 2 " > 
 
                         < s m a l l   c l a s s = " t e x t - m u t e d " > T o t a l   R e c o r d s :   < s t r o n g > < ? p h p   e c h o   c o u n t ( $ c u t t i n g _ r e c o r d s ) ;   ? > < / s t r o n g > < / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ c u t t i n g _ r e c o r d s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - i n b o x " > < / i > 
 
                                 < p > N o   c u t t i n g   r e c o r d s   f o u n d . < / p > 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S u i t < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > C u t t e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > A s s i g n e d   D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > C o m p l e t e d   D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S t a t u s < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > A c t i o n s < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ c u t t i n g _ r e c o r d s   a s   $ r e c o r d ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > # < ? p h p   e c h o   $ r e c o r d [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' c u t t e r _ n a m e ' ]   ? ?   ' U n a s s i g n e d ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r e c o r d [ ' a s s i g n e d _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   $ r e c o r d [ ' c o m p l e t e d _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r e c o r d [ ' c o m p l e t e d _ d a t e ' ] ) )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e - s t a t u s   < ? p h p   e c h o   $ r e c o r d [ ' s t a t u s ' ] ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ r e c o r d [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ s l i p & i d = < ? p h p   e c h o   $ r e c o r d [ ' o r d e r _ i d ' ] ;   ? > & s u i t _ i d = < ? p h p   e c h o   $ r e c o r d [ ' s u i t _ i d ' ] ;   ? > "   
 
                                                                                       t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   t i t l e = " S l i p " > 
 
                                                                                         < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . c u t t i n g - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   6 p x   1 2 p x ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . c u t t i n g - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
         } 
 
         / *   = = = = =      &    R         R      = = = = =   * / 
 
         . c u t t i n g - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - c a r d   . t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         / *   = = = = =      &    R         R                      = = = = =   * / 
 
         . s u i t - b a d g e   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   1 p x   6 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 b a c k g r o u n d :   # f e f 3 c 7 ; 
 
                 c o l o r :   # 9 2 4 0 0 e ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . b a d g e - c o u n t   { 
 
                 b a c k g r o u n d :   # e 2 e 8 f 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 p a d d i n g :   1 p x   8 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
         } 
 
         / *   = = = = =      &    R             &   (    R       R              &  R  )   = = = = =   * / 
 
         . c u t t i n g - c a r d   . f o r m - s e l e c t - s m   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 p a d d i n g :   1 p x   4 p x ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 w i d t h :   1 0 0 p x ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . b t n - t e a l - s m   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   1 p x   8 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - t e a l - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   8 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - t e a l - o u t l i n e - s m   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # 4 f 8 a 8 b ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   1 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - t e a l - o u t l i n e - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 2 ) ; 
 
         } 
 
         . c u t t i n g - c a r d   . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   2 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
         } 
 
         . c u t t i n g - c a r d   . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   3 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
         } 
 
         / *   = = = = =      &    R         R                  (    R       R           )   = = = = =   * / 
 
         . a s s i g n - f o r m   { 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   3 p x ; 
 
                 j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 f l e x - w r a p :   n o w r a p ; 
 
         } 
 
         . a s s i g n - f o r m   s e l e c t   { 
 
                 w i d t h :   9 0 p x   ! i m p o r t a n t ; 
 
                 f l e x - s h r i n k :   0 ; 
 
         } 
 
         . a s s i g n - f o r m   b u t t o n   { 
 
                 f l e x - s h r i n k :   0 ; 
 
         } 
 
         / *   = = = = =    &                     R    = = = = =   * / 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . c u t t i n g - c a r d   . t a b l e   {   f o n t - s i z e :   9 p x ;   } 
 
                 . c u t t i n g - c a r d   . t a b l e   t h ,   . c u t t i n g - c a r d   . t a b l e   t d   {   p a d d i n g :   2 p x   2 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . a s s i g n - f o r m   s e l e c t   {   w i d t h :   6 0 p x   ! i m p o r t a n t ;   f o n t - s i z e :   8 p x ;   } 
 
                 . b t n - t e a l - s m   {   f o n t - s i z e :   8 p x ;   p a d d i n g :   0   4 p x ;   h e i g h t :   2 0 p x ;   } 
 
                 . s u i t - b a d g e   {   f o n t - s i z e :   7 p x ;   p a d d i n g :   0   4 p x ;   } 
 
                 . a s s i g n - f o r m   {   g a p :   2 p x ;   f l e x - w r a p :   w r a p ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c u t t i n g - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - c l o c k   m e - 2   t e x t - w a r n i n g " > < / i > P e n d i n g   C u t t i n g   S u i t s < / h 6 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                         < i   c l a s s = " f a s   f a - s c i s s o r s   m e - 1 " > < / i >   A s s i g n e d 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " f o n t - s i z e : 1 1 p x ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   T O T A L   C O U N T   = = = = =   - - > 
 
                 < d i v   c l a s s = " t e x t - e n d   m b - 1 " > 
 
                         < s m a l l   c l a s s = " t e x t - m u t e d "   s t y l e = " f o n t - s i z e : 1 0 p x ; " > P e n d i n g   S u i t s :   < s t r o n g > < ? p h p   e c h o   c o u n t ( $ p e n d i n g _ s u i t s ) ;   ? > < / s t r o n g > < / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ p e n d i n g _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   t e x t - s u c c e s s " > < / i > 
 
                                 N o   p e n d i n g   s u i t s   f o r   c u t t i n g . 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S u i t < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 3 1 % ; " > A s s i g n   C u t t e r < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ p e n d i n g _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " s u i t - b a d g e " > # < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m ' ,   s t r t o t i m e ( $ s u i t [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n "   c l a s s = " a s s i g n - f o r m " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' o r d e r _ i d ' ] ;   ? > " > 
 
                                                                                 < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t - s m "   r e q u i r e d > 
 
                                                                                         < o p t i o n   v a l u e = " " > S e l e c t < / o p t i o n > 
 
                                                                                         < ? p h p   f o r e a c h   ( $ c u t t i n g _ m e n   a s   $ c m ) :   ? > 
 
                                                                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c m [ ' i d ' ] ;   ? > " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c m [ ' n a m e ' ] ) ;   ? > < / o p t i o n > 
 
                                                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                                                 < / s e l e c t > 
 
                                                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - t e a l - s m " > 
 
                                                                                         < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 1 " > < / i >   A s s i g n 
 
                                                                                 < / b u t t o n > 
 
                                                                         < / f o r m > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . r e p o r t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 8 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 4 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . r e p o r t - c a r d   . f i l t e r - r o w   { 
 
                 d i s p l a y :   f l e x ; 
 
                 f l e x - w r a p :   w r a p ; 
 
                 g a p :   8 p x ; 
 
                 m a r g i n - b o t t o m :   1 2 p x ; 
 
                 a l i g n - i t e m s :   e n d ; 
 
         } 
 
         . r e p o r t - c a r d   . f i l t e r - r o w   . f i l t e r - g r o u p   { 
 
                 d i s p l a y :   f l e x ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
 
                 g a p :   2 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . f i l t e r - r o w   . f i l t e r - g r o u p   l a b e l   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 b 5 5 6 3 ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . r e p o r t - c a r d   . f i l t e r - r o w   . f i l t e r - g r o u p   i n p u t , 
 
         . r e p o r t - c a r d   . f i l t e r - r o w   . f i l t e r - g r o u p   s e l e c t   { 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 h e i g h t :   3 4 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . f i l t e r - r o w   . f i l t e r - g r o u p   i n p u t : f o c u s , 
 
         . r e p o r t - c a r d   . f i l t e r - r o w   . f i l t e r - g r o u p   s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 ) ; 
 
         } 
 
         . b t n - b l u e - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 b o x - s h a d o w :   0   2 p x   6 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 2 ) ; 
 
                 h e i g h t :   3 4 p x ; 
 
         } 
 
         . b t n - b l u e - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 5 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 2 5 6 3 e b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 h e i g h t :   3 4 p x ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   8 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 2 ) ; 
 
         } 
 
         . r e p o r t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
         } 
 
         . r e p o r t - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   8 p x   1 0 p x ; 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   8 p x   1 0 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . r e p o r t - c a r d   . s u m m a r y - s t a t s   { 
 
                 d i s p l a y :   f l e x ; 
 
                 f l e x - w r a p :   w r a p ; 
 
                 g a p :   8 p x ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . s u m m a r y - s t a t s   . s t a t   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   4 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 b 5 5 6 3 ; 
 
         } 
 
         . r e p o r t - c a r d   . s u m m a r y - s t a t s   . s t a t   . n u m   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
         } 
 
         . r e p o r t - c a r d   . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # e f f 6 f f   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . r e p o r t - c a r d   . t o t a l - r o w   t d   { 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   8 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # 9 c a 3 a f ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
         } 
 
         . r e p o r t - c a r d   . b a d g e - s i z e   { 
 
                 b a c k g r o u n d :   # d 1 f a e 5 ; 
 
                 c o l o r :   # 0 6 5 f 4 6 ; 
 
                 p a d d i n g :   4 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . r e p o r t - c a r d   . b a d g e - t y p e   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 4 0 a f ; 
 
                 p a d d i n g :   4 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . r e p o r t - c a r d   . b a d g e - s t a t u s   { 
 
                 p a d d i n g :   4 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . r e p o r t - c a r d   . b a d g e - s t a t u s . c o m p l e t e d   {   b a c k g r o u n d :   # d 1 f a e 5 ;   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . r e p o r t - c a r d   . b a d g e - s t a t u s . c u t t i n g   {   b a c k g r o u n d :   # d b e a f e ;   c o l o r :   # 1 e 4 0 a f ;   } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . r e p o r t - c a r d   . f i l t e r - r o w   {   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   s t r e t c h ;   } 
 
                 . r e p o r t - c a r d   . t a b l e   {   f o n t - s i z e :   1 1 p x ;   } 
 
                 . r e p o r t - c a r d   . t a b l e   t h ,   . r e p o r t - c a r d   . t a b l e   t d   {   p a d d i n g :   6 p x   6 p x ;   } 
 
                 . r e p o r t - c a r d   . s u m m a r y - s t a t s   . s t a t   {   f o n t - s i z e :   1 1 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " r e p o r t - c a r d   c a r d   m b - 3 " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 2 " > < / i >                       /   C u t t i n g   R e p o r t < / h 6 > 
 
                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - b l u e - o u t l i n e - s m "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                         < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >            
 
                 < / b u t t o n > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ! - -   = = = = =   F I L T E R S   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - r o w " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " c u t t i n g _ r e p o r t " > 
 
                         
 
                         < d i v   c l a s s = " f i l t e r - g r o u p " > 
 
                                 < l a b e l >         /   C u t t e r < / l a b e l > 
 
                                 < s e l e c t   n a m e = " e m p l o y e e _ i d " > 
 
                                         < o p t i o n   v a l u e = " " >       /   A l l < / o p t i o n > 
 
                                         < ? p h p   f o r e a c h   ( $ e m p l o y e e s   a s   $ e m p ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ e m p [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ e m p l o y e e _ i d   = =   $ e m p [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ] ) ;   ? > 
 
                                                 < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         
 
                         < d i v   c l a s s = " f i l t e r - g r o u p " > 
 
                                 < l a b e l >        `             /   F r o m < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         
 
                         < d i v   c l a s s = " f i l t e r - g r o u p " > 
 
                                 < l a b e l >        `           `     /   T o < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         
 
                         < d i v   c l a s s = " f i l t e r - g r o u p " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - b l u e - s m " > < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >           < / b u t t o n > 
 
                         < / d i v > 
 
                         
 
                         < d i v   c l a s s = " f i l t e r - g r o u p "   s t y l e = " m a r g i n - l e f t : a u t o ; " > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ r e p o r t & f i l t e r = t o d a y "   c l a s s = " b t n - b l u e - o u t l i n e - s m " >     < / a > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ r e p o r t & f i l t e r = w e e k "   c l a s s = " b t n - b l u e - o u t l i n e - s m " >        < / a > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ r e p o r t & f i l t e r = m o n t h "   c l a s s = " b t n - b l u e - o u t l i n e - s m " >  &    `    < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ! - -   = = = = =   S U M M A R Y   S T A T S   = = = = =   - - > 
 
                 < ? p h p   i f   ( ! e m p t y ( $ r e p o r t s ) ) :   ? > 
 
                         < ? p h p   
 
                                 $ t o t a l _ a m o u n t   =   0 ; 
 
                                 $ t o t a l _ s u i t s   =   c o u n t ( $ r e p o r t s ) ; 
 
                                 $ c o m p l e t e d   =   0 ; 
 
                                 f o r e a c h   ( $ r e p o r t s   a s   $ r )   { 
 
                                         $ t o t a l _ a m o u n t   + =   $ r [ ' a m o u n t ' ]   ? ?   0 ; 
 
                                         i f   ( $ r [ ' s t a t u s ' ]   = =   ' c o m p l e t e d ' )   $ c o m p l e t e d + + ; 
 
                                 } 
 
                         ? > 
 
                         < d i v   c l a s s = " s u m m a r y - s t a t s " > 
 
                                 < s p a n   c l a s s = " s t a t " >              /   T o t a l :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ t o t a l _ s u i t s ;   ? > < / s p a n > < / s p a n > 
 
                                 < s p a n   c l a s s = " s t a t " >  &    &     /   C o m p l e t e d :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ c o m p l e t e d ;   ? > < / s p a n > < / s p a n > 
 
                                 < s p a n   c l a s s = " s t a t " >    `                 /   P e n d i n g :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ t o t a l _ s u i t s   -   $ c o m p l e t e d ;   ? > < / s p a n > < / s p a n > 
 
                                 < s p a n   c l a s s = " s t a t " >            &   /   T o t a l   A m o u n t :   < s p a n   c l a s s = " n u m " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ a m o u n t ,   0 ) ;   ? > < / s p a n > < / s p a n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ r e p o r t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - i n b o x   t e x t - m u t e d " > < / i > 
 
                                          !                    !  `  /   N o   r e p o r t s   f o u n d 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " >        `  < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " >      `  < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " >        !   < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " >     &      < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " >        `  < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " >       < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " >         < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " >      & < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ r e p o r t s   a s   $ r o w ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   $ r o w [ ' s u i t _ n u m b e r ' ]   ? ?   ' - ' ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' t r a n s a c t i o n _ d a t e ' ]   ? ?   $ r o w [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? > < / t d > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - t y p e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' s u i t _ t y p e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s i z e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' s i z e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' c u t t e r _ n a m e ' ]   ? ?   $ r o w [ ' e m p l o y e e _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e - s t a t u s   < ? p h p   e c h o   ( $ r o w [ ' s t a t u s ' ]   = =   ' c o m p l e t e d '   | |   $ r o w [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ] )   ?   ' c o m p l e t e d '   :   ' c u t t i n g ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   ( $ r o w [ ' s t a t u s ' ]   = =   ' c o m p l e t e d '   | |   $ r o w [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ] )   ?   '  &    &   '   :   '        `' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d > < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' a m o u n t ' ]   ? ?   0 ,   0 ) ;   ? > < / s t r o n g > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 8 "   c l a s s = " t e x t - e n d " >            &   /   T o t a l : < / t d > 
 
                                                         < t d > < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ a m o u n t ,   0 ) ;   ? > < / s t r o n g > < / t d > 
 
                                                 < / t r > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p 
 
 i f   ( e m p t y ( $ s l i p _ d a t a ) )   { 
 
         d i e ( ' C u t t i n g   s l i p   d a t a   n o t   f o u n d . ' ) ; 
 
 } 
 
 
 
 $ o r d e r _ n o   =   $ s l i p _ d a t a [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ; 
 
 $ o r d e r _ d a t e   =   $ s l i p _ d a t a [ ' o r d e r _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ d e l i v e r y _ d a t e   =   $ s l i p _ d a t a [ ' d e l i v e r y _ d a t e ' ]   ? ?   n u l l ; 
 
 $ c u s t o m e r   =   $ s l i p _ d a t a [ ' c u s t o m e r ' ]   ? ?   [ ' n a m e '   = >   ' N / A ' ,   ' p h o n e '   = >   ' ' ,   ' a d d r e s s '   = >   ' ' ] ; 
 
 $ s u i t s   =   $ s l i p _ d a t a [ ' s u i t s ' ]   ? ?   [ ] ; 
 
 $ e m p l o y e e _ n a m e   =   $ s l i p _ d a t a [ ' e m p l o y e e ' ] [ ' n a m e ' ]   ? ?   ' N o t   A s s i g n e d ' ; 
 
 $ s u i t _ n u m b e r   =   $ s u i t s [ 0 ] [ ' s u i t _ n u m b e r ' ]   ? ?   ' 1 ' ; 
 
 $ s u i t _ t y p e   =   $ s u i t s [ 0 ] [ ' s u i t _ t y p e ' ]   ? ?   ' N / A ' ; 
 
 $ s u i t _ s i z e   =   $ s u i t s [ 0 ] [ ' s i z e ' ]   ? ?   ' N / A ' ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e >                    -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < l i n k   h r e f = " h t t p s : / / f o n t s . g o o g l e a p i s . c o m / c s s 2 ? f a m i l y = N o t o + S a n s + A r a b i c : w g h t @ 4 0 0 ; 7 0 0 & d i s p l a y = s w a p "   r e l = " s t y l e s h e e t " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   # f 5 f 7 f a ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         m a x - w i d t h :   8 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         p a d d i n g :   8 p x   6 p x ; 
 
                         d i r e c t i o n :   r t l ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   m a r g i n :   0   a u t o ;   p a d d i n g :   0 ;   } 
 
                 
 
                 / *   = = = = =   H E A D E R   = = = = =   * / 
 
                 . h e a d e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                         p a d d i n g - b o t t o m :   6 p x ; 
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         g a p :   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   2 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   i m g   { 
 
                         m a x - h e i g h t :   5 0 p x ; 
 
                         m a x - w i d t h :   5 0 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         b o r d e r :   2 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                         p a d d i n g :   2 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   { 
 
                         f o n t - s i z e :   2 0 p x ; 
 
                         c o l o r :   # 1 a 1 a 2 e ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         m a r g i n :   0 ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . h e a d e r   . s u b   { 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                         l i n e - h e i g h t :   1 . 4 ; 
 
                         m a r g i n - t o p :   2 p x ; 
 
                 } 
 
                 . h e a d e r   . t i t l e   { 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 4 f 8 a 8 b ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                         b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         p a d d i n g :   3 p x   1 4 p x ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                 } 
 
                 
 
                 / *   = = = = =   B A R C O D E   = = = = =   * / 
 
                 . b a r c o d e - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   4 p x   0   6 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   { 
 
                         m a x - w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   4 5 p x ; 
 
                 } 
 
                 
 
                 / *   = = = = =   I N F O   G R I D   -   4          &   ( 1 0 %   -   4 0 %   -   4 0 %   -   1 0 % )   = = = = =   * / 
 
                 . i n f o - g r i d   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 0 %   4 0 %   4 0 %   1 0 % ; 
 
                         g a p :   0 p x   2 p x ; 
 
                         b o r d e r :   1 . 5 p x   s o l i d   # 3 3 3 ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         p a d d i n g :   3 p x   4 p x ; 
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - w e i g h t :   5 0 0 ; 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m   { 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   1 p x   0 ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                 } 
 
                 . i n f o - g r i d   . e m p t y   {   
 
                         v i s i b i l i t y :   h i d d e n ;   
 
                 } 
 
                 . i n f o - g r i d   . l a b e l   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 c 5 f 6 e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . v a l u e   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         d i r e c t i o n :   l t r ; 
 
                 } 
 
                 . i n f o - g r i d   . v a l u e - r t l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 
 
                 / *   = = = = =   M E A S U R E M E N T S   -   4          &   = = = = =   * / 
 
                 . m e a s u r e m e n t s   { 
 
                         m a r g i n - t o p :   4 p x ; 
 
                         p a d d i n g :   3 p x   6 p x ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         b o r d e r :   1 . 5 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . l a b e l - t i t l e   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 c 5 f 6 e ; 
 
                         d i s p l a y :   b l o c k ; 
 
                         m a r g i n - b o t t o m :   3 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ; 
 
                         p a d d i n g - b o t t o m :   2 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 0 %   4 0 %   4 0 %   1 0 % ; 
 
                         g a p :   0 p x   1 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . e m p t y - c o l   { 
 
                         v i s i b i l i t y :   h i d d e n ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . l a b e l - c o l   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   f l e x - s t a r t ; 
 
                         p a d d i n g :   0 p x   2 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         h e i g h t :   1 8 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . v a l u e - c o l   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   f l e x - s t a r t ; 
 
                         p a d d i n g :   0 p x   2 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         d i r e c t i o n :   l t r ; 
 
                         t e x t - a l i g n :   l e f t ; 
 
                         h e i g h t :   1 8 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   { 
 
                         g r i d - c o l u m n :   2   /   4 ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   0 p x   2 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         h e i g h t :   1 8 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   . f - l a b e l   { 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   . f - v a l u e   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 
 
                 / *   = = = = =   F O O T E R   = = = = =   * / 
 
                 . f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                         p a d d i n g - t o p :   6 p x ; 
 
                         m a r g i n - t o p :   8 p x ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # 6 6 6 ; 
 
                 } 
 
                 . f o o t e r   . t h a n k y o u   { 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 8 a 7 4 5 ; 
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                 } 
 
                 . f o o t e r   . s o f t w a r e   { 
 
                         f o n t - s i z e :   9 p x ; 
 
                         c o l o r :   # a a a ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                 } 
 
                 
 
                 / *   = = = = =   B U T T O N S   = = = = =   * / 
 
                 . b t n - g r o u p   { 
 
                         d i s p l a y :   f l e x ; 
 
                         g a p :   8 p x ; 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 } 
 
                 . b t n - g r o u p   b u t t o n ,   . b t n - g r o u p   a   { 
 
                         p a d d i n g :   6 p x   1 6 p x ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                         t e x t - d e c o r a t i o n :   n o n e ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . b t n - p r i n t   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 4 f 8 a 8 b   0 % ,   # 2 c 5 f 6 e   1 0 0 % ) ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . b t n - p r i n t : h o v e r   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                         b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 4 ) ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . b t n - c l o s e   { 
 
                         b a c k g r o u n d :   # e 2 e 8 f 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . b t n - c l o s e : h o v e r   { 
 
                         b a c k g r o u n d :   # c b d 5 e 1 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 
 
                 / *   = = = = =   P R I N T   = = = = =   * / 
 
                 @ m e d i a   p r i n t   { 
 
                         b o d y   { 
 
                                 b a c k g r o u n d :   # f f f ; 
 
                                 p a d d i n g :   0 ; 
 
                                 m a r g i n :   0 ; 
 
                                 d i s p l a y :   b l o c k ; 
 
                                 m i n - h e i g h t :   a u t o ; 
 
                                 f o n t - s i z e :   1 2 p x ; 
 
                         } 
 
                         . p r i n t - w r a p p e r   { 
 
                                 b o x - s h a d o w :   n o n e ; 
 
                                 b o r d e r - r a d i u s :   0 ; 
 
                                 p a d d i n g :   6 p x   4 p x ; 
 
                                 m a x - w i d t h :   8 0 m m ; 
 
                         } 
 
                         . b t n - g r o u p   { 
 
                                 d i s p l a y :   n o n e   ! i m p o r t a n t ; 
 
                         } 
 
                         . m e a s u r e m e n t s   . g r i d - 4   . l a b e l - c o l , 
 
                         . m e a s u r e m e n t s   . g r i d - 4   . v a l u e - c o l , 
 
                         . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   { 
 
                                 p a d d i n g :   0 p x   2 p x ; 
 
                                 f o n t - s i z e :   9 p x ; 
 
                                 h e i g h t :   1 6 p x ; 
 
                         } 
 
                         . i n f o - g r i d   { 
 
                                 f o n t - s i z e :   9 p x ; 
 
                         } 
 
                         . i n f o - g r i d   . l a b e l , 
 
                         . i n f o - g r i d   . v a l u e , 
 
                         . i n f o - g r i d   . v a l u e - r t l   { 
 
                                 f o n t - s i z e :   9 p x ; 
 
                         } 
 
                 } 
 
                 @ p a g e   { 
 
                         s i z e :   8 0 m m   a u t o ; 
 
                         m a r g i n :   0 ; 
 
                 } 
 
                 @ m e d i a   ( m a x - w i d t h :   4 0 0 p x )   { 
 
                         . p r i n t - w r a p p e r   {   p a d d i n g :   4 p x   3 p x ;   } 
 
                         . i n f o - g r i d   {   f o n t - s i z e :   9 p x ;   p a d d i n g :   2 p x   3 p x ;   } 
 
                         . m e a s u r e m e n t s   {   p a d d i n g :   2 p x   4 p x ;   } 
 
                         . h e a d e r   h 2   {   f o n t - s i z e :   1 7 p x ;   } 
 
                         . b a r c o d e - c o n t a i n e r   s v g   {   h e i g h t :   3 5 p x ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
 
 
                 < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < d i v   c l a s s = " l o g o - r o w " > 
 
                                 < ? p h p   
 
                                         $ l o g o _ p a t h   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                         i f   ( f i l e _ e x i s t s ( $ l o g o _ p a t h )   & &   ! e m p t y ( $ c o m p a n y [ ' l o g o ' ] )   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                 e c h o   ' < i m g   s r c = " '   .   $ l o g o _ p a t h   .   ' "   a l t = "       " > ' ; 
 
                                         } 
 
                                 ? > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   '      `    `     `    ' ) ;   ? > < / h 2 > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " s u b " > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' a d d r e s s ' ] ) ) :   ? > 
 
                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ] ) ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' p h o n e ' ] ) ) :   ? > 
 
                                         < b r >       :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ] ) ;   ? > < / s p a n > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " t i t l e " >                  < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   B A R C O D E   = = = = =   - - > 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   I N F O   -   4          &   (                 `       &                      &   )   = = = = =   - - > 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < ! - -        `    #   - - > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " >      `    # < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < ! - -          `    - - > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " >        `  < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r _ d a t e ) ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < ! - -          !     - - > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " >        !   < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e - r t l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < ! - -           - - > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " >       < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e - r t l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e _ n a m e ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < ! - -          #   - - > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " >        # < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   $ s u i t _ n u m b e r ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < ! - -    x  "             `       &   ( S u i t   T y p e )   - - > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " >           `       & < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e - r t l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t _ t y p e ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < ! - -    x  "             ( S i z e )   - - > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " >         < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t _ s i z e ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   M E A S U R E M E N T S   -   4          &   = = = = =   - - > 
 
                 < ? p h p   
 
                         $ f i r s t _ s u i t   =   $ s u i t s [ 0 ]   ? ?   [ ] ; 
 
                         $ m   =   $ f i r s t _ s u i t [ ' m e a s u r e m e n t ' ]   ? ?   [ ] ; 
 
                 ? > 
 
                 < ? p h p   
 
                         $ f i l t e r e d F i e l d s   =   [ ] ; 
 
                         $ f i e l d s   =   [ 
 
                                 ' s h i r t _ l e n g t h '   = >   '  ` `    ' , 
 
                                 ' s h o u l d e r '   = >   '    `    ' , 
 
                                 ' s l e e v e '   = >   '        ' , 
 
                                 ' l o o s i n g '   = >   '   `    ' , 
 
                                 ' c h e s t '   = >   '  !      `' , 
 
                                 ' w a i s t '   = >   '    &   ' , 
 
                                 ' c o l l a r '   = >   '         ' , 
 
                                 ' s h e r w a n i '   = >   '    `         `' , 
 
                                 ' c u f f _ l e n g t h '   = >   '        `         `' , 
 
                                 ' c u f f _ w i d t h '   = >   '         `    ' , 
 
                                 ' s i d e p o c k e t '   = >   '        ` `     `  ' , 
 
                                 ' f r o n t p o c k e t '   = >   '      &            `  ' , 
 
                                 ' s h a l w a r _ l e n g t h '   = >   '             `         `' , 
 
                                 ' s h a l w a r _ b o t t o m '   = >   '            ' , 
 
                                 ' s h a l w a r p o c k e t '   = >   '               `  ' 
 
                         ] ; 
 
                         f o r e a c h   ( $ f i e l d s   a s   $ k e y   = >   $ l a b e l )   { 
 
                                 $ v a l   =   $ m [ $ k e y ]   ? ?   ' - ' ; 
 
                                 i f   ( $ v a l   ! = =   ' - ' )   { 
 
                                         $ f i l t e r e d F i e l d s [ ]   =   [ ' l a b e l '   = >   $ l a b e l ,   ' v a l u e '   = >   $ v a l ] ; 
 
                                 } 
 
                         } 
 
                 ? > 
 
                 < ? p h p   i f   ( ! e m p t y ( $ f i l t e r e d F i e l d s ) ) :   ? > 
 
                         < d i v   c l a s s = " m e a s u r e m e n t s " > 
 
                                 < s p a n   c l a s s = " l a b e l - t i t l e " > < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 1 " > < / i >    &         < / s p a n > 
 
                                 < d i v   c l a s s = " g r i d - 4 " > 
 
                                         < ? p h p   f o r e a c h   ( $ f i l t e r e d F i e l d s   a s   $ f i e l d ) :   ? > 
 
                                                 < d i v   c l a s s = " e m p t y - c o l " > < / d i v > 
 
                                                 < d i v   c l a s s = " l a b e l - c o l " > < ? p h p   e c h o   $ f i e l d [ ' l a b e l ' ] ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ f i e l d [ ' v a l u e ' ] ) ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " e m p t y - c o l " > < / d i v > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         
 
                                         < ? p h p   i f   ( ! e m p t y ( $ m [ ' n o t e s ' ] )   & &   $ m [ ' n o t e s ' ]   ! = =   ' - ' ) :   ? > 
 
                                                 < d i v   c l a s s = " f i e l d - f u l l " > 
 
                                                         < s p a n   c l a s s = " f - l a b e l " >          `        : < / s p a n > 
 
                                                         < s p a n   c l a s s = " f - v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' n o t e s ' ] ) ;   ? > < / s p a n > 
 
                                                 < / d i v > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                         < ? p h p   i f   ( ! e m p t y ( $ m [ ' r e m a r k s ' ] )   & &   $ m [ ' r e m a r k s ' ]   ! = =   ' - ' ) :   ? > 
 
                                                 < d i v   c l a s s = " f i e l d - f u l l " > 
 
                                                         < s p a n   c l a s s = " f - l a b e l " >    R &         : < / s p a n > 
 
                                                         < s p a n   c l a s s = " f - v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' r e m a r k s ' ] ) ;   ? > < / s p a n > 
 
                                                 < / d i v > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < d i v   c l a s s = " t h a n k y o u " >        `  ! < / d i v > 
 
                         < d i v   c l a s s = " s o f t w a r e " > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / d i v > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
         < d i v   c l a s s = " b t n - g r o u p   n o - p r i n t " > 
 
                 < b u t t o n   c l a s s = " b t n - p r i n t "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t " > < / i >            < / b u t t o n > 
 
                 < b u t t o n   c l a s s = " b t n - c l o s e "   o n c l i c k = " w i n d o w . c l o s e ( ) " > < i   c l a s s = " f a s   f a - t i m e s " > < / i >          < / b u t t o n > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
         J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > " ,   { 
 
                 f o r m a t :   " C O D E 1 2 8 " , 
 
                 w i d t h :   2 . 5 , 
 
                 h e i g h t :   4 5 , 
 
                 d i s p l a y V a l u e :   t r u e , 
 
                 f o n t :   " m o n o s p a c e " , 
 
                 f o n t S i z e :   1 6 , 
 
                 m a r g i n :   0 , 
 
                 b a c k g r o u n d :   " # f f f f f f " , 
 
                 l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
         } ) ; 
 
         d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                         e . p r e v e n t D e f a u l t ( ) ; 
 
                         w i n d o w . p r i n t ( ) ; 
 
                 } 
 
         } ) ; 
 
 < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < s t y l e > 
 
         . c u t t i n g - s u i t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 8 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 c o l o r :   # f f f ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 4 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . b a d g e - s u i t   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . b a d g e - s i z e   { 
 
                 b a c k g r o u n d :   # d 1 f a e 5 ; 
 
                 c o l o r :   # 0 6 5 f 4 6 ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - t y p e   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 4 0 a f ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s t a t u s . c u t t i n g   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 4 0 a f ; 
 
         } 
 
         . b a d g e - s t a t u s . c o m p l e t e d   { 
 
                 b a c k g r o u n d :   # d 1 f a e 5 ; 
 
                 c o l o r :   # 0 6 5 f 4 6 ; 
 
         } 
 
         . b t n - s u c c e s s - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 0 5 9 6 6 9   0 % ,   # 1 0 b 9 8 1   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 5 ,   1 5 0 ,   1 0 5 ,   0 . 3 ) ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - s u c c e s s - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 5 ,   1 5 0 ,   1 0 5 ,   0 . 6 ) ,   0   4 p x   1 5 p x   r g b a ( 5 ,   1 5 0 ,   1 0 5 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - i n f o - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 0 d 6 e f d   0 % ,   # 0 a 5 8 c a   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 1 3 ,   1 1 0 ,   2 5 3 ,   0 . 3 ) ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . b t n - i n f o - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 1 3 ,   1 1 0 ,   2 5 3 ,   0 . 6 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 2 5 6 3 e b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   8 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 5 ) ; 
 
         } 
 
         . c u t t e r - c a r d   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   6 p x   1 4 p x ; 
 
                 m a r g i n - b o t t o m :   6 p x ; 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 f l e x - w r a p :   w r a p ; 
 
         } 
 
         . c u t t e r - c a r d   . c u t t e r - n a m e   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
         } 
 
         . c u t t e r - c a r d   . c u t t e r - s t a t s   { 
 
                 d i s p l a y :   f l e x ; 
 
                 g a p :   1 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . c u t t e r - c a r d   . c u t t e r - s t a t s   . s t a t   { 
 
                 b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                 p a d d i n g :   2 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
         } 
 
         . c u t t e r - c a r d   . c u t t e r - s t a t s   . s t a t   . n u m   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
         } 
 
         . c u t t e r - c a r d   . c u t t e r - s t a t s   . s t a t . p e n d i n g   . n u m   {   c o l o r :   # 9 2 4 0 0 e ;   } 
 
         . c u t t e r - c a r d   . c u t t e r - s t a t s   . s t a t . c o m p l e t e d   . n u m   {   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # 9 c a 3 a f ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . c u t t i n g - s u i t - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . c u t t i n g - s u i t - c a r d   . t a b l e   t h ,   . c u t t i n g - s u i t - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . c u t t e r - c a r d   {   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   f l e x - s t a r t ;   g a p :   4 p x ;   } 
 
                 . b t n - s u c c e s s - s m ,   . b t n - i n f o - s m ,   . b t n - b l u e - o u t l i n e - s m   {   f o n t - s i z e :   1 1 p x ;   p a d d i n g :   3 p x   1 0 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c u t t i n g - s u i t - c a r d   c a r d   m b - 3 " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - s c i s s o r s   m e - 2 " > < / i > A s s i g n e d   C u t t i n g   S u i t s < / h 6 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 1 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ p e n d i n g "   c l a s s = " b t n - b l u e - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   P e n d i n g 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ r e p o r t "   c l a s s = " b t n - b l u e - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " b o r d e r - r a d i u s : 6 p x ;   b a c k g r o u n d : # e 6 f 7 e d ;   b o r d e r - l e f t : 4 p x   s o l i d   # 2 8 a 7 4 5 ;   f o n t - s i z e : 1 2 p x ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   C U T T E R   W I S E   S U M M A R Y   = = = = =   - - > 
 
                 < ? p h p   i f   ( ! e m p t y ( $ a s s i g n e d _ s u i t s ) ) :   ? > 
 
                         < ? p h p   
 
                                 $ c u t t e r _ s u m m a r y   =   [ ] ; 
 
                                 f o r e a c h   ( $ a s s i g n e d _ s u i t s   a s   $ s )   { 
 
                                         $ c u t t e r   =   $ s [ ' c u t t e r _ n a m e ' ]   ? ?   ' U n a s s i g n e d ' ; 
 
                                         i f   ( ! i s s e t ( $ c u t t e r _ s u m m a r y [ $ c u t t e r ] ) )   { 
 
                                                 $ c u t t e r _ s u m m a r y [ $ c u t t e r ]   =   [ ' t o t a l '   = >   0 ,   ' c o m p l e t e d '   = >   0 ,   ' p e n d i n g '   = >   0 ] ; 
 
                                         } 
 
                                         $ c u t t e r _ s u m m a r y [ $ c u t t e r ] [ ' t o t a l ' ] + + ; 
 
                                         / /   C h e c k   i f   c u t t i n g   i s   c o m p l e t e d   ( h a s   c u t t i n g _ c o m p l e t e d _ d a t e ) 
 
                                         i f   ( ! e m p t y ( $ s [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ] ) )   { 
 
                                                 $ c u t t e r _ s u m m a r y [ $ c u t t e r ] [ ' c o m p l e t e d ' ] + + ; 
 
                                         }   e l s e   { 
 
                                                 $ c u t t e r _ s u m m a r y [ $ c u t t e r ] [ ' p e n d i n g ' ] + + ; 
 
                                         } 
 
                                 } 
 
                         ? > 
 
                         < d i v   c l a s s = " m b - 2 " > 
 
                                 < ? p h p   f o r e a c h   ( $ c u t t e r _ s u m m a r y   a s   $ c u t t e r   = >   $ s t a t s ) :   ? > 
 
                                         < d i v   c l a s s = " c u t t e r - c a r d " > 
 
                                                 < s p a n   c l a s s = " c u t t e r - n a m e " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 1 " > < / i >   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u t t e r ) ;   ? > < / s p a n > 
 
                                                 < d i v   c l a s s = " c u t t e r - s t a t s " > 
 
                                                         < s p a n   c l a s s = " s t a t " > T o t a l :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ s t a t s [ ' t o t a l ' ] ;   ? > < / s p a n > < / s p a n > 
 
                                                         < s p a n   c l a s s = " s t a t   p e n d i n g " > P e n d i n g :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ s t a t s [ ' p e n d i n g ' ] ;   ? > < / s p a n > < / s p a n > 
 
                                                         < s p a n   c l a s s = " s t a t   c o m p l e t e d " > C o m p l e t e d :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ s t a t s [ ' c o m p l e t e d ' ] ;   ? > < / s p a n > < / s p a n > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ a s s i g n e d _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - i n b o x   t e x t - m u t e d " > < / i > 
 
                                 N o   a s s i g n e d   c u t t i n g   s u i t s 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 6 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 6 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > C u t t e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S t a t u s < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 6 % ; " > A c t i o n < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ a s s i g n e d _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s u i t " > # < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - t y p e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s i z e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u t t e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( ! e m p t y ( $ s u i t [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ] ) ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e - s t a t u s   c o m p l e t e d " > C o m p l e t e d < / s p a n > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e - s t a t u s   c u t t i n g " > I n   P r o g r e s s < / s p a n > 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( e m p t y ( $ s u i t [ ' c u t t i n g _ c o m p l e t e d _ d a t e ' ] ) ) :   ? > 
 
                                                                                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = c u t t i n g _ c o m p l e t e "   c l a s s = " d - i n l i n e " > 
 
                                                                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > " > 
 
                                                                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s u c c e s s - s m "   o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e ? ' ) " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   C o m p l e t e 
 
                                                                                         < / b u t t o n > 
 
                                                                                 < / f o r m > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 < s p a n   c l a s s = " t e x t - s u c c e s s   f w - b o l d " > < i   c l a s s = " f a s   f a - c h e c k - c i r c l e " > < / i >   D o n e < / s p a n > 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . c u t t i n g - s u i t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 8 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 c o l o r :   # f f f ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 4 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . c u t t i n g - s u i t - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . b a d g e - s u i t   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . b a d g e - s i z e   { 
 
                 b a c k g r o u n d :   # d 1 f a e 5 ; 
 
                 c o l o r :   # 0 6 5 f 4 6 ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - t y p e   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 4 0 a f ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s t a t u s . p e n d i n g   { 
 
                 b a c k g r o u n d :   # f e f 3 c 7 ; 
 
                 c o l o r :   # 9 2 4 0 0 e ; 
 
         } 
 
         . b t n - b l u e - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - b l u e - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ,   0   4 p x   1 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 2 5 6 3 e b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   8 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 5 ) ; 
 
         } 
 
         . f o r m - s e l e c t - s m - c u s t o m   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 p a d d i n g :   3 p x   8 p x ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 m i n - w i d t h :   1 4 0 p x ; 
 
         } 
 
         . f o r m - s e l e c t - s m - c u s t o m : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . s u m m a r y - b a r   { 
 
                 d i s p l a y :   f l e x ; 
 
                 f l e x - w r a p :   w r a p ; 
 
                 g a p :   8 p x ; 
 
                 p a d d i n g :   6 p x   0 ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
         } 
 
         . s u m m a r y - b a r   . s t a t   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   4 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 b 5 5 6 3 ; 
 
         } 
 
         . s u m m a r y - b a r   . s t a t   . n u m   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
         } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # 9 c a 3 a f ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . c u t t i n g - s u i t - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . c u t t i n g - s u i t - c a r d   . t a b l e   t h ,   . c u t t i n g - s u i t - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . f o r m - s e l e c t - s m - c u s t o m   {   m i n - w i d t h :   1 0 0 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c u t t i n g - s u i t - c a r d   c a r d   m b - 3 " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - c u t   m e - 2 " > < / i > P e n d i n g   C u t t i n g   S u i t s < / h 6 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 1 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n e d "   c l a s s = " b t n - b l u e - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - s c i s s o r s   m e - 1 " > < / i >   A s s i g n e d 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g _ r e p o r t "   c l a s s = " b t n - b l u e - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " b o r d e r - r a d i u s : 6 p x ;   b a c k g r o u n d : # e 6 f 7 e d ;   b o r d e r - l e f t : 4 p x   s o l i d   # 2 8 a 7 4 5 ;   f o n t - s i z e : 1 2 p x ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   S U M M A R Y   B A R   = = = = =   - - > 
 
                 < ? p h p   i f   ( ! e m p t y ( $ p e n d i n g _ s u i t s ) ) :   ? > 
 
                         < ? p h p   
 
                                 $ t o t a l _ s u i t s   =   c o u n t ( $ p e n d i n g _ s u i t s ) ; 
 
                                 $ t y p e s   =   [ ] ; 
 
                                 $ s i z e s   =   [ ] ; 
 
                                 f o r e a c h   ( $ p e n d i n g _ s u i t s   a s   $ s )   { 
 
                                         $ t y p e s [ $ s [ ' s u i t _ t y p e ' ] ]   =   ( $ t y p e s [ $ s [ ' s u i t _ t y p e ' ] ]   ? ?   0 )   +   1 ; 
 
                                         $ s i z e s [ $ s [ ' s i z e ' ] ]   =   ( $ s i z e s [ $ s [ ' s i z e ' ] ]   ? ?   0 )   +   1 ; 
 
                                 } 
 
                         ? > 
 
                         < d i v   c l a s s = " s u m m a r y - b a r " > 
 
                                 < s p a n   c l a s s = " s t a t " > T o t a l   S u i t s :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ t o t a l _ s u i t s ;   ? > < / s p a n > < / s p a n > 
 
                                 < ? p h p   f o r e a c h   ( $ t y p e s   a s   $ t y p e   = >   $ c o u n t ) :   ? > 
 
                                         < s p a n   c l a s s = " s t a t " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t y p e ) ;   ? > :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ c o u n t ;   ? > < / s p a n > < / s p a n > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < ? p h p   f o r e a c h   ( $ s i z e s   a s   $ s i z e   = >   $ c o u n t ) :   ? > 
 
                                         < s p a n   c l a s s = " s t a t " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s i z e ) ;   ? > :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ c o u n t ;   ? > < / s p a n > < / s p a n > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ p e n d i n g _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   t e x t - s u c c e s s " > < / i > 
 
                                 N o   s u i t s   p e n d i n g   f o r   c u t t i n g 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S t a t u s < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 2 4 % ; " > A s s i g n   C u t t e r < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ p e n d i n g _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s u i t " > # < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - t y p e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s i z e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e - s t a t u s   p e n d i n g " > P e n d i n g < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = c u t t i n g _ a s s i g n "   c l a s s = " d - f l e x   g a p - 1   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > " > 
 
                                                                                 < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t - s m - c u s t o m "   r e q u i r e d > 
 
                                                                                         < o p t i o n   v a l u e = " " > S e l e c t   C u t t e r < / o p t i o n > 
 
                                                                                         < ? p h p   f o r e a c h   ( $ c u t t i n g _ m e n   a s   $ c m ) :   ? > 
 
                                                                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c m [ ' i d ' ] ;   ? > " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c m [ ' n a m e ' ] ) ;   ? > < / o p t i o n > 
 
                                                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                                                 < / s e l e c t > 
 
                                                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - b l u e - s m " > 
 
                                                                                         < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 1 " > < / i >   A s s i g n 
 
                                                                                 < / b u t t o n > 
 
                                                                         < / f o r m > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - s u c c e s s   t e x t - w h i t e " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - t r u c k   m e - 2 " > < / i > D e l i v e r   S u i t s   ( P a r t i a l   D e l i v e r y ) < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 2 " > 
 
                         < s t r o n g > O r d e r   # < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g >   |   
 
                         C u s t o m e r :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? >   |   
 
                         D u e :   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d u e _ a m o u n t ' ] ,   0 ) ;   ? > 
 
                 < / d i v > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = d e l i v e r y _ p r o c e s s " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   v a l u e = " < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > " > 
 
                         
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                         < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                 < t r > 
 
                                                         < t h > < i n p u t   t y p e = " c h e c k b o x "   i d = " s e l e c t A l l " > < / t h > 
 
                                                         < t h > # < / t h > 
 
                                                         < t h > S u i t   T y p e < / t h > 
 
                                                         < t h > S i z e < / t h > 
 
                                                         < t h > P r i c e   ( R s . ) < / t h > 
 
                                                         < t h > S t a t u s < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ r e a d y _ s u i t s ) ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                         N o   r e a d y   s u i t s   a v a i l a b l e   f o r   d e l i v e r y . 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   f o r e a c h   ( $ r e a d y _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < i n p u t   t y p e = " c h e c k b o x "   n a m e = " s u i t _ i d s [ ] "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > "   c l a s s = " s u i t - c h e c k b o x " > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u i t [ ' p r i c e ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                         < t d > < s p a n   c l a s s = " b a d g e   b g - s u c c e s s " > R e a d y < / s p a n > < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " r o w   g - 3   m t - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > D e l i v e r y   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " d e l i v e r y _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > A m o u n t   R e c e i v e d   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " a m o u n t _ r e c e i v e d "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " 0 "   r e q u i r e d > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > E n t e r   a m o u n t   c u s t o m e r   i s   p a y i n g   t o d a y . < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > P a y m e n t   M e t h o d < / l a b e l > 
 
                                         < s e l e c t   n a m e = " p a y m e n t _ m e t h o d "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " c a s h " > C a s h < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " b a n k " > B a n k   T r a n s f e r < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " o n l i n e " > O n l i n e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > R e c e i v e d   B y < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " r e c e i v e d _ b y "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > N o t e s < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 2 "   p l a c e h o l d e r = " A n y   s p e c i a l   i n s t r u c t i o n s   o r   r e m a r k s . . . " > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " m t - 3 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   r o u n d e d - p i l l   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   D e l i v e r   S e l e c t e d   S u i t s 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = d e l i v e r y "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         c o n s t   s e l e c t A l l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t A l l ' ) ; 
 
         c o n s t   s u i t C h e c k b o x e s   =   d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . s u i t - c h e c k b o x ' ) ; 
 
         
 
         s e l e c t A l l . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                 s u i t C h e c k b o x e s . f o r E a c h ( c b   = >   c b . c h e c k e d   =   t h i s . c h e c k e d ) ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - t r u c k   m e - 2   t e x t - p r i m a r y " > < / i > D e l i v e r y   S y s t e m < / h 5 > 
 
                 < s p a n   c l a s s = " b a d g e   b g - p r i m a r y " > R e a d y   O r d e r s :   < ? p h p   e c h o   c o u n t ( $ r e a d y _ o r d e r s ) ;   ? > < / s p a n > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   T A B   1 :   R e a d y   f o r   D e l i v e r y   = = = = =   - - > 
 
                 < u l   c l a s s = " n a v   n a v - t a b s   n a v - t a b s - c u s t o m "   i d = " d e l i v e r y T a b s "   r o l e = " t a b l i s t " > 
 
                         < l i   c l a s s = " n a v - i t e m "   r o l e = " p r e s e n t a t i o n " > 
 
                                 < b u t t o n   c l a s s = " n a v - l i n k   a c t i v e "   i d = " r e a d y - t a b "   d a t a - b s - t o g g l e = " t a b "   d a t a - b s - t a r g e t = " # r e a d y "   t y p e = " b u t t o n "   r o l e = " t a b " > 
 
                                         < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   t e x t - s u c c e s s " > < / i >   R e a d y   f o r   D e l i v e r y 
 
                                         < s p a n   c l a s s = " b a d g e   b g - s u c c e s s   m s - 1 " > < ? p h p   e c h o   c o u n t ( $ r e a d y _ o r d e r s ) ;   ? > < / s p a n > 
 
                                 < / b u t t o n > 
 
                         < / l i > 
 
                         < l i   c l a s s = " n a v - i t e m "   r o l e = " p r e s e n t a t i o n " > 
 
                                 < b u t t o n   c l a s s = " n a v - l i n k "   i d = " h i s t o r y - t a b "   d a t a - b s - t o g g l e = " t a b "   d a t a - b s - t a r g e t = " # h i s t o r y "   t y p e = " b u t t o n "   r o l e = " t a b " > 
 
                                         < i   c l a s s = " f a s   f a - h i s t o r y   t e x t - s e c o n d a r y " > < / i >   D e l i v e r y   H i s t o r y 
 
                                         < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   m s - 1 " > < ? p h p   e c h o   c o u n t ( $ d e l i v e r e d _ o r d e r s ) ;   ? > < / s p a n > 
 
                                 < / b u t t o n > 
 
                         < / l i > 
 
                 < / u l > 
 
 
 
                 < d i v   c l a s s = " t a b - c o n t e n t   p t - 3 " > 
 
                         
 
                         < ! - -   = = = = =   R E A D Y   F O R   D E L I V E R Y   T A B   = = = = =   - - > 
 
                         < d i v   c l a s s = " t a b - p a n e   f a d e   s h o w   a c t i v e "   i d = " r e a d y "   r o l e = " t a b p a n e l " > 
 
                                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                         < t r > 
 
                                                                 < t h > O r d e r   # < / t h > 
 
                                                                 < t h > C u s t o m e r < / t h > 
 
                                                                 < t h > P h o n e < / t h > 
 
                                                                 < t h > S u i t s < / t h > 
 
                                                                 < t h > T o t a l   ( R s . ) < / t h > 
 
                                                                 < t h > P a i d   ( R s . ) < / t h > 
 
                                                                 < t h > D u e   ( R s . ) < / t h > 
 
                                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                                         < / t r > 
 
                                                 < / t h e a d > 
 
                                                 < t b o d y > 
 
                                                         < ? p h p   i f   ( e m p t y ( $ r e a d y _ o r d e r s ) ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d   c o l s p a n = " 8 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                                 < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   t e x t - s u c c e s s   m e - 2 " > < / i > 
 
                                                                                 N o   o r d e r s   r e a d y   f o r   d e l i v e r y . 
 
                                                                         < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e l s e :   ? > 
 
                                                                 < ? p h p   f o r e a c h   ( $ r e a d y _ o r d e r s   a s   $ o r d e r ) :   ? > 
 
                                                                         < t r > 
 
                                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' s u i t _ c o u n t ' ] ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                                 < t d > < s t r o n g   c l a s s = " t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d u e _ a m o u n t ' ] ,   0 ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = d e l i v e r y _ d e l i v e r & i d = < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > "   
 
                                                                                               c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - t r u c k   m e - 1 " > < / i >   D e l i v e r 
 
                                                                                         < / a > 
 
                                                                                 < / t d > 
 
                                                                         < / t r > 
 
                                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < ? p h p   e n d i f ;   ? > 
 
                                                 < / t b o d y > 
 
                                         < / t a b l e > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   D E L I V E R Y   H I S T O R Y   T A B   = = = = =   - - > 
 
                         < d i v   c l a s s = " t a b - p a n e   f a d e "   i d = " h i s t o r y "   r o l e = " t a b p a n e l " > 
 
                                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                         < t r > 
 
                                                                 < t h > O r d e r   # < / t h > 
 
                                                                 < t h > C u s t o m e r < / t h > 
 
                                                                 < t h > P h o n e < / t h > 
 
                                                                 < t h > D e l i v e r y   D a t e < / t h > 
 
                                                                 < t h > R e c e i v e d   B y < / t h > 
 
                                                                 < t h > A m o u n t   ( R s . ) < / t h > 
 
                                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n s < / t h > 
 
                                                         < / t r > 
 
                                                 < / t h e a d > 
 
                                                 < t b o d y > 
 
                                                         < ? p h p   i f   ( e m p t y ( $ d e l i v e r e d _ o r d e r s ) ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                                 < i   c l a s s = " f a s   f a - i n b o x   m e - 2 " > < / i > 
 
                                                                                 N o   d e l i v e r y   h i s t o r y   f o u n d . 
 
                                                                         < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e l s e :   ? > 
 
                                                                 < ? p h p   f o r e a c h   ( $ d e l i v e r e d _ o r d e r s   a s   $ o r d e r ) :   ? > 
 
                                                                         < t r > 
 
                                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   $ o r d e r [ ' d e l i v e r e d _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r e d _ d a t e ' ] ) )   :   ' - ' ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' r e c e i v e d _ b y ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                                 < t d > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m " > 
 
                                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = d e l i v e r y _ s l i p & i d = < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > "   
 
                                                                                                       t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   t i t l e = " P r i n t   S l i p " > 
 
                                                                                                         < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                                 < / a > 
 
                                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = d e l i v e r y _ d e l e t e & i d = < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > "   
 
                                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   t i t l e = " C a n c e l   D e l i v e r y "   
 
                                                                                                       o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e   y o u   w a n t   t o   c a n c e l   t h i s   d e l i v e r y ?   T h i s   w i l l   r e v e r t   t h e   o r d e r   t o   R e a d y   s t a t u s . ' ) ; " > 
 
                                                                                                         < i   c l a s s = " f a s   f a - u n d o " > < / i > 
 
                                                                                                 < / a > 
 
                                                                                         < / d i v > 
 
                                                                                 < / t d > 
 
                                                                         < / t r > 
 
                                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < ? p h p   e n d i f ;   ? > 
 
                                                 < / t b o d y > 
 
                                         < / t a b l e > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s t y l e > 
 
         . n a v - t a b s - c u s t o m   . n a v - l i n k   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   1 8 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 6 c 7 5 7 d ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . n a v - t a b s - c u s t o m   . n a v - l i n k : h o v e r   { 
 
                 b a c k g r o u n d :   # f 1 f 5 f 9 ; 
 
         } 
 
         . n a v - t a b s - c u s t o m   . n a v - l i n k . a c t i v e   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 3 ) ; 
 
         } 
 
         . n a v - t a b s - c u s t o m   . n a v - l i n k   . b a d g e   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   2 p x   8 p x ; 
 
         } 
 
 < / s t y l e > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e > R e c e i p t   V o u c h e r   -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   {   
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   ' C o u r i e r   N e w ' ,   m o n o s p a c e ;   
 
                         b a c k g r o u n d :   # f 4 f 4 f 4 ;   
 
                         p a d d i n g :   2 0 p x ;   
 
                         m a r g i n :   0 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   4 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         m a x - w i d t h :   9 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                 } 
 
                 . c o n t a i n e r   {   
 
                         w i d t h :   8 0 m m ;   
 
                         m a r g i n :   0   a u t o ; 
 
                         p a d d i n g :   2 m m   2 m m ;   
 
                         b a c k g r o u n d :   # f f f ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         l i n e - h e i g h t :   1 . 4 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . h e a d e r   {   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         b o r d e r - b o t t o m :   2 p x   d a s h e d   # 3 3 3 ;   
 
                         p a d d i n g - b o t t o m :   6 p x ;   
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   {   f o n t - s i z e :   1 6 p x ;   f o n t - w e i g h t :   7 0 0 ;   m a r g i n :   0 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . h e a d e r   s m a l l   {   f o n t - s i z e :   9 p x ;   c o l o r :   # 5 5 5 ;   d i s p l a y :   b l o c k ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . b a r c o d e - c o n t a i n e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n :   4 p x   0 ;   p a d d i n g :   4 p x   0 ;   } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   {   m a x - w i d t h :   7 0 m m ;   h e i g h t :   a u t o ;   } 
 
                 . i n f o - g r i d   {   
 
                         d i s p l a y :   g r i d ;   
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   
 
                         g a p :   3 p x   8 p x ;   
 
                         p a d d i n g :   5 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ; 
 
                         m a r g i n - b o t t o m :   5 p x ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . l a b e l   {   f o n t - w e i g h t :   7 0 0 ;   c o l o r :   # 4 4 4 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . i n f o - g r i d   . v a l u e   {   c o l o r :   # 0 0 0 ;   f o n t - w e i g h t :   6 0 0 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . b a l a n c e - s e c t i o n   { 
 
                         b a c k g r o u n d :   # f 8 f 9 f a ; 
 
                         p a d d i n g :   6 p x   8 p x ; 
 
                         b o r d e r - r a d i u s :   4 p x ; 
 
                         m a r g i n :   5 p x   0 ; 
 
                         b o r d e r - r i g h t :   3 p x   s o l i d   # 6 6 7 e e a ; 
 
                 } 
 
                 . b a l a n c e - s e c t i o n   . r o w   {   d i s p l a y :   f l e x ;   j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   p a d d i n g :   2 p x   0 ;   f o n t - s i z e :   1 0 p x ;   } 
 
                 . b a l a n c e - s e c t i o n   . r o w . t o t a l   {   f o n t - w e i g h t :   7 0 0 ;   f o n t - s i z e :   1 2 p x ;   b o r d e r - t o p :   1 p x   d a s h e d   # d d d ;   p a d d i n g - t o p :   4 p x ;   m a r g i n - t o p :   2 p x ;   } 
 
                 . f o o t e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n - t o p :   6 p x ;   p a d d i n g - t o p :   6 p x ;   b o r d e r - t o p :   2 p x   d a s h e d   # 3 3 3 ;   c o l o r :   # 5 5 5 ;   f o n t - s i z e :   9 p x ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . f o o t e r   p   {   m a r g i n :   1 p x   0 ;   } 
 
                 . p r i n t - b t n - c o n t a i n e r   {   t e x t - a l i g n :   c e n t e r ;   p a d d i n g :   1 5 p x   0   5 p x   0 ;   b o r d e r - t o p :   1 p x   s o l i d   # e e e ;   m a r g i n - t o p :   1 0 p x ;   } 
 
                 . p r i n t - b t n   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 8 a 7 4 5   0 % ,   # 2 0 c 9 9 7   1 0 0 % ) ; 
 
                         c o l o r :   # f f f ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   5 0 p x ; 
 
                         p a d d i n g :   1 2 p x   4 0 p x ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                         b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 3 5 ) ; 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
                 } 
 
                 . p r i n t - b t n : h o v e r   {   t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ;   b o x - s h a d o w :   0   6 p x   2 5 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 4 5 ) ;   } 
 
                 . s h o r t c u t - h i n t   {   t e x t - a l i g n :   c e n t e r ;   f o n t - s i z e :   1 0 p x ;   c o l o r :   # a a a ;   m a r g i n - t o p :   6 p x ;   f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ;   d i r e c t i o n :   l t r ;   } 
 
                 . s h o r t c u t - h i n t   k b d   {   b a c k g r o u n d :   # f 0 f 0 f 0 ;   p a d d i n g :   2 p x   8 p x ;   b o r d e r - r a d i u s :   4 p x ;   b o r d e r :   1 p x   s o l i d   # d d d ;   f o n t - s i z e :   1 0 p x ;   f o n t - w e i g h t :   6 0 0 ;   } 
 
                 . v o u c h e r - t y p e   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 8 a 7 4 5 ; 
 
                         m a r g i n :   3 p x   0 ; 
 
                         p a d d i n g :   4 p x ; 
 
                         b o r d e r :   1 p x   d a s h e d   # 2 8 a 7 4 5 ; 
 
                         b o r d e r - r a d i u s :   4 p x ; 
 
                 } 
 
                 @ p a g e   {   s i z e :   8 0 m m   a u t o ;   m a r g i n :   0 ;   } 
 
                 @ m e d i a   p r i n t   {   
 
                         b o d y   {   b a c k g r o u n d :   # f f f ;   p a d d i n g :   0 ;   m a r g i n :   0 ;   d i s p l a y :   b l o c k ;   } 
 
                         . p r i n t - w r a p p e r   {   b o x - s h a d o w :   n o n e ;   b o r d e r - r a d i u s :   0 ;   p a d d i n g :   0 ;   m a x - w i d t h :   1 0 0 % ;   } 
 
                         . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   p a d d i n g :   2 m m   3 m m ;   } 
 
                         . p r i n t - b t n - c o n t a i n e r   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                         . s h o r t c u t - h i n t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
                 < d i v   c l a s s = " c o n t a i n e r " > 
 
                         < d i v   c l a s s = " h e a d e r " > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   '    `            ' ) ;   ? > < / h 2 > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < s m a l l >       :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " v o u c h e r - t y p e " > 
 
                                 < i   c l a s s = " f a s   f a - r e c e i p t   m e - 1 " > < / i >        `                ( R e c e i p t   V o u c h e r ) 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                                 < s v g   i d = " b a r c o d e " > < / s v g > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " i n f o - g r i d " > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >             # : < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >        `  : < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ d e l i v e r y [ ' d e l i v e r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >        !   : < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >       : < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v   s t y l e = " g r i d - c o l u m n :   s p a n   2 ; " > < s p a n   c l a s s = " l a b e l " >                 "!: < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ d e l i v e r y [ ' r e c e i v e d _ b y ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   B A L A N C E   D E T A I L S   = = = = =   - - > 
 
                         < d i v   c l a s s = " b a l a n c e - s e c t i o n " > 
 
                                 < d i v   c l a s s = " r o w " > < s p a n >          `         ( T o t a l   B a l a n c e ) : < / s p a n >   < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v   c l a s s = " r o w " > < s p a n >  !           `       `         `       &   ( D u e ) : < / s p a n >   < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d u e _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v   c l a s s = " r o w "   s t y l e = " c o l o r :   # 2 8 a 7 4 5 ; " > < s p a n >            `         &   ( R e c e i v e d ) : < / s p a n >   < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v   c l a s s = " r o w   t o t a l "   s t y l e = " c o l o r :   < ? p h p   e c h o   $ o r d e r [ ' d u e _ a m o u n t ' ]   >   0   ?   ' # d c 3 5 4 5 '   :   ' # 2 8 a 7 4 5 ' ;   ? > ; " > 
 
                                         < s p a n >        `     `         ( R e m a i n i n g   B a l a n c e ) : < / s p a n > 
 
                                         < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e   -   $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " f o o t e r " > 
 
                                 < p >     !           `                        &  !           `! < / p > 
 
                                 < p >    ` !           < / p > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " p r i n t - b t n - c o n t a i n e r   n o - p r i n t " > 
 
                         < b u t t o n   c l a s s = " p r i n t - b t n "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                                 < i   c l a s s = " f a s   f a - p r i n t " > < / i >   P r i n t   R e c e i p t 
 
                         < / b u t t o n > 
 
                         < d i v   c l a s s = " s h o r t c u t - h i n t " > < k b d > C t r l < / k b d >   +   < k b d > P < / k b d >   t o   p r i n t < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < s c r i p t > 
 
                 J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > " ,   { 
 
                         f o r m a t :   " C O D E 1 2 8 " , 
 
                         w i d t h :   2 , 
 
                         h e i g h t :   3 5 , 
 
                         d i s p l a y V a l u e :   t r u e , 
 
                         f o n t :   " m o n o s p a c e " , 
 
                         f o n t S i z e :   1 1 , 
 
                         m a r g i n :   0 , 
 
                         b a c k g r o u n d :   " # f f f f f f " , 
 
                         l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
                 } ) ; 
 
                 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                         i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 w i n d o w . p r i n t ( ) ; 
 
                         } 
 
                 } ) ; 
 
         < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 2   t e x t - p r i m a r y " > < / i > A d d   E m p l o y e e < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > E m p l o y e e   C o d e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " e m p _ c o d e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ e m p _ c o d e ;   ? > "   r e a d o n l y > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " F u l l   n a m e "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P h o n e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 3 0 0 - 1 2 3 4 5 6 7 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C N I C < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " c n i c "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " X X X X X - X X X X X X X - X " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C a t e g o r y   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < s e l e c t   n a m e = " c a t e g o r y _ i d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   r e q u i r e d > 
 
                                                 < o p t i o n   v a l u e = " " > S e l e c t   C a t e g o r y < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ c a t e g o r i e s   a s   $ c a t ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c a t [ ' i d ' ] ;   ? > " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c a t [ ' n a m e ' ] ) ;   ? > < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > J o i n i n g   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " j o i n i n g _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < o p t i o n   v a l u e = " a c t i v e " > A c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " i n a c t i v e " > I n a c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " t e r m i n a t e d " > T e r m i n a t e d < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A d d r e s s < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r o w s = " 1 "   p l a c e h o l d e r = " C o m p l e t e   a d d r e s s " > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F i x e d   S a l a r y   ( i f   a p p l i c a b l e ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " f i x e d _ s a l a r y "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > O n l y   f o r   f i x e d   s a l a r y   e m p l o y e e s < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e   E m p l o y e e 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 2 " > 
 
         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - t a g s   m e - 2   t e x t - p r i m a r y " > < / i > E m p l o y e e   C a t e g o r i e s < / h 5 > 
 
         < d i v > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r y _ a d d "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   C a t e g o r y 
 
                 < / a > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
         < / d i v > 
 
 < ? p h p   e n d i f ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - b o d y   p - 2 " > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e   m b - 0 " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > N a m e < / t h > 
 
                                                 < t h > P a y m e n t   T y p e < / t h > 
 
                                                 < t h > R a t e < / t h > 
 
                                                 < t h > L a r g e < / t h > 
 
                                                 < t h > M e d i u m < / t h > 
 
                                                 < t h > S m a l l < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 0 p x ; " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ c a t e g o r i e s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 2 " > N o   c a t e g o r i e s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ c a t e g o r i e s   a s   $ c a t ) :   
 
                                                         / /   D e c o d e   r a t e s   J S O N 
 
                                                         $ r a t e s   =   j s o n _ d e c o d e ( $ c a t [ ' r a t e s ' ] ,   t r u e ) ; 
 
                                                         $ l a r g e   =   $ r a t e s [ ' l a r g e ' ]   ? ?   0 ; 
 
                                                         $ m e d i u m   =   $ r a t e s [ ' m e d i u m ' ]   ? ?   0 ; 
 
                                                         $ s m a l l   =   $ r a t e s [ ' s m a l l ' ]   ? ?   0 ; 
 
                                                 ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c a t [ ' n a m e ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   u c f i r s t ( $ c a t [ ' p a y m e n t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   
 
                                                                                 i f   ( $ c a t [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' )   { 
 
                                                                                         e c h o   ' P e r   S u i t ' ; 
 
                                                                                 }   e l s e i f   ( $ c a t [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r c e n t a g e ' )   { 
 
                                                                                         e c h o   $ c a t [ ' r a t e ' ]   .   ' % ' ; 
 
                                                                                 }   e l s e   { 
 
                                                                                         e c h o   ' F i x e d ' ; 
 
                                                                                 } 
 
                                                                         ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ c a t [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' ) :   ? > 
 
                                                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ l a r g e ,   0 ) ;   ? > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 - 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ c a t [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' ) :   ? > 
 
                                                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ m e d i u m ,   0 ) ;   ? > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 - 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ c a t [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' ) :   ? > 
 
                                                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s m a l l ,   0 ) ;   ? > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 - 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r y _ e d i t & i d = < ? p h p   e c h o   $ c a t [ ' i d ' ] ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r y _ d e l e t e & i d = < ? p h p   e c h o   $ c a t [ ' i d ' ] ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - d a n g e r   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 "   o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e ? ' ) " > 
 
                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - p l u s - c i r c l e   m e - 2   t e x t - p r i m a r y " > < / i > A d d   E m p l o y e e   C a t e g o r y < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C a t e g o r y   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " e . g .   C u t t i n g   M e n "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P a y m e n t   T y p e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < s e l e c t   n a m e = " p a y m e n t _ t y p e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   i d = " p a y m e n t T y p e "   r e q u i r e d > 
 
                                                 < o p t i o n   v a l u e = " f i x e d " > F i x e d   S a l a r y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " p e r _ s u i t " > P e r   S u i t   ( w i t h   s i z e s ) < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " p e r c e n t a g e " > P e r c e n t a g e   o f   C o l l e c t i o n < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 "   i d = " r a t e F i e l d " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a t e   ( o p t i o n a l ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d "   i d = " r a t e H i n t " > F o r   f i x e d   o r   p e r c e n t a g e < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         
 
                         < ! - -   S i z e   R a t e s   ( f o r   p e r _ s u i t )   - - > 
 
                         < d i v   i d = " s i z e R a t e s "   s t y l e = " d i s p l a y : n o n e ; "   c l a s s = " m t - 2 " > 
 
                                 < d i v   c l a s s = " r o w   g - 2 " > 
 
                                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > L a r g e   S i z e   R a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e _ l a r g e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > M e d i u m   S i z e   R a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e _ m e d i u m "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S m a l l   S i z e   R a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e _ s m a l l "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > S e t   r a t e s   f o r   L a r g e ,   M e d i u m ,   a n d   S m a l l   s u i t s < / s m a l l > 
 
                         < / d i v > 
 
                         
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e   C a t e g o r y 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' p a y m e n t T y p e ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         c o n s t   s i z e R a t e s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s i z e R a t e s ' ) ; 
 
         c o n s t   r a t e F i e l d   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' r a t e F i e l d ' ) ; 
 
         c o n s t   l a b e l   =   r a t e F i e l d . q u e r y S e l e c t o r ( ' l a b e l ' ) ; 
 
         c o n s t   i n p u t   =   r a t e F i e l d . q u e r y S e l e c t o r ( ' i n p u t ' ) ; 
 
         c o n s t   s m a l l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' r a t e H i n t ' ) ; 
 
         
 
         i f   ( t h i s . v a l u e   = =   ' p e r _ s u i t ' )   { 
 
                 s i z e R a t e s . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                 l a b e l . t e x t C o n t e n t   =   ' B a s e   R a t e   ( o p t i o n a l ) ' ; 
 
                 i n p u t . p l a c e h o l d e r   =   ' 0 . 0 0 ' ; 
 
                 s m a l l . t e x t C o n t e n t   =   ' W i l l   u s e   s i z e   r a t e s   i f   s e t ' ; 
 
         }   e l s e   i f   ( t h i s . v a l u e   = =   ' p e r c e n t a g e ' )   { 
 
                 s i z e R a t e s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 l a b e l . t e x t C o n t e n t   =   ' P e r c e n t a g e   ( % ) ' ; 
 
                 i n p u t . p l a c e h o l d e r   =   ' 0 . 0 0 ' ; 
 
                 s m a l l . t e x t C o n t e n t   =   ' P e r c e n t a g e   o f   d a i l y   c o l l e c t i o n ' ; 
 
         }   e l s e   { 
 
                 s i z e R a t e s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 l a b e l . t e x t C o n t e n t   =   ' F i x e d   S a l a r y ' ; 
 
                 i n p u t . p l a c e h o l d e r   =   ' 0 . 0 0 ' ; 
 
                 s m a l l . t e x t C o n t e n t   =   ' M o n t h l y   f i x e d   s a l a r y ' ; 
 
         } 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - e d i t   m e - 2   t e x t - p r i m a r y " > < / i > E d i t   E m p l o y e e   C a t e g o r y < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C a t e g o r y   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c a t e g o r y [ ' n a m e ' ] ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P a y m e n t   T y p e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < s e l e c t   n a m e = " p a y m e n t _ t y p e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   i d = " p a y m e n t T y p e "   r e q u i r e d > 
 
                                                 < o p t i o n   v a l u e = " f i x e d "   < ? p h p   e c h o   $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' f i x e d '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > F i x e d   S a l a r y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " p e r _ s u i t "   < ? p h p   e c h o   $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > P e r   S u i t   ( w i t h   s i z e s ) < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " p e r c e n t a g e "   < ? p h p   e c h o   $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r c e n t a g e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > P e r c e n t a g e   o f   C o l l e c t i o n < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 "   i d = " r a t e F i e l d " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ c a t e g o r y [ ' r a t e ' ] ;   ? > "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d "   i d = " r a t e H i n t " > 
 
                                                 < ? p h p   
 
                                                         i f   ( $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' )   e c h o   ' B a s e   r a t e   ( s i z e   r a t e s   o v e r r i d e   t h i s ) ' ; 
 
                                                         e l s e i f   ( $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r c e n t a g e ' )   e c h o   ' P e r c e n t a g e   o f   d a i l y   c o l l e c t i o n ' ; 
 
                                                         e l s e   e c h o   ' F i x e d   m o n t h l y   s a l a r y ' ; 
 
                                                 ? > 
 
                                         < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         
 
                         < ! - -   S i z e   R a t e s   ( f o r   p e r _ s u i t )   - - > 
 
                         < ? p h p   
 
                                 / /   D e c o d e   r a t e s   J S O N 
 
                                 $ r a t e s   =   j s o n _ d e c o d e ( $ c a t e g o r y [ ' r a t e s ' ] ,   t r u e ) ; 
 
                                 $ r a t e _ l a r g e   =   $ r a t e s [ ' l a r g e ' ]   ? ?   0 ; 
 
                                 $ r a t e _ m e d i u m   =   $ r a t e s [ ' m e d i u m ' ]   ? ?   0 ; 
 
                                 $ r a t e _ s m a l l   =   $ r a t e s [ ' s m a l l ' ]   ? ?   0 ; 
 
                         ? > 
 
                         < d i v   i d = " s i z e R a t e s "   s t y l e = " d i s p l a y : < ? p h p   e c h o   $ c a t e g o r y [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t '   ?   ' b l o c k '   :   ' n o n e ' ;   ? > ; "   c l a s s = " m t - 2 " > 
 
                                 < d i v   c l a s s = " r o w   g - 2 " > 
 
                                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > L a r g e   S i z e   R a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e _ l a r g e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ r a t e _ l a r g e ;   ? > "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > M e d i u m   S i z e   R a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e _ m e d i u m "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ r a t e _ m e d i u m ;   ? > "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S m a l l   S i z e   R a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e _ s m a l l "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ r a t e _ s m a l l ;   ? > "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > S e t   r a t e s   f o r   L a r g e ,   M e d i u m ,   a n d   S m a l l   s u i t s < / s m a l l > 
 
                         < / d i v > 
 
                         
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   C a t e g o r y 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . g e t E l e m e n t B y I d ( ' p a y m e n t T y p e ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         c o n s t   s i z e R a t e s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s i z e R a t e s ' ) ; 
 
         c o n s t   r a t e F i e l d   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' r a t e F i e l d ' ) ; 
 
         c o n s t   l a b e l   =   r a t e F i e l d . q u e r y S e l e c t o r ( ' l a b e l ' ) ; 
 
         c o n s t   i n p u t   =   r a t e F i e l d . q u e r y S e l e c t o r ( ' i n p u t ' ) ; 
 
         c o n s t   s m a l l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' r a t e H i n t ' ) ; 
 
         
 
         i f   ( t h i s . v a l u e   = =   ' p e r _ s u i t ' )   { 
 
                 s i z e R a t e s . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                 l a b e l . t e x t C o n t e n t   =   ' B a s e   R a t e   ( o p t i o n a l ) ' ; 
 
                 i n p u t . p l a c e h o l d e r   =   ' 0 . 0 0 ' ; 
 
                 s m a l l . t e x t C o n t e n t   =   ' W i l l   u s e   s i z e   r a t e s   i f   s e t ' ; 
 
         }   e l s e   i f   ( t h i s . v a l u e   = =   ' p e r c e n t a g e ' )   { 
 
                 s i z e R a t e s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 l a b e l . t e x t C o n t e n t   =   ' P e r c e n t a g e   ( % ) ' ; 
 
                 i n p u t . p l a c e h o l d e r   =   ' 0 . 0 0 ' ; 
 
                 s m a l l . t e x t C o n t e n t   =   ' P e r c e n t a g e   o f   d a i l y   c o l l e c t i o n ' ; 
 
         }   e l s e   { 
 
                 s i z e R a t e s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 l a b e l . t e x t C o n t e n t   =   ' F i x e d   S a l a r y ' ; 
 
                 i n p u t . p l a c e h o l d e r   =   ' 0 . 0 0 ' ; 
 
                 s m a l l . t e x t C o n t e n t   =   ' M o n t h l y   f i x e d   s a l a r y ' ; 
 
         } 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - e d i t   m e - 2   t e x t - p r i m a r y " > < / i > E d i t   E m p l o y e e < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > E m p l o y e e   C o d e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " e m p _ c o d e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' e m p _ c o d e ' ] ) ;   ? > "   r e a d o n l y > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' n a m e ' ] ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P h o n e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' p h o n e ' ] ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C N I C < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " c n i c "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' c n i c ' ] ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C a t e g o r y   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < s e l e c t   n a m e = " c a t e g o r y _ i d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   r e q u i r e d > 
 
                                                 < o p t i o n   v a l u e = " " > S e l e c t   C a t e g o r y < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ c a t e g o r i e s   a s   $ c a t ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c a t [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   $ c a t [ ' i d ' ]   = =   $ e m p l o y e e [ ' c a t e g o r y _ i d ' ]   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c a t [ ' n a m e ' ] ) ;   ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > J o i n i n g   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " j o i n i n g _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ e m p l o y e e [ ' j o i n i n g _ d a t e ' ] ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < o p t i o n   v a l u e = " a c t i v e "   < ? p h p   e c h o   $ e m p l o y e e [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " i n a c t i v e "   < ? p h p   e c h o   $ e m p l o y e e [ ' s t a t u s ' ]   = =   ' i n a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > I n a c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " t e r m i n a t e d "   < ? p h p   e c h o   $ e m p l o y e e [ ' s t a t u s ' ]   = =   ' t e r m i n a t e d '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T e r m i n a t e d < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A d d r e s s < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r o w s = " 1 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' a d d r e s s ' ] ) ;   ? > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F i x e d   S a l a r y   ( i f   a p p l i c a b l e ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " f i x e d _ s a l a r y "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ e m p l o y e e [ ' f i x e d _ s a l a r y ' ] ;   ? > " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > O n l y   f o r   f i x e d   s a l a r y   e m p l o y e e s < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   E m p l o y e e 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e   m e - 2   t e x t - p r i m a r y " > < / i > G e n e r a t e   M o n t h l y   S a l a r y < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 2 " > 
 
                         < s m a l l > 
 
                                 < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 2 " > < / i > 
 
                                 T h i s   w i l l   g e n e r a t e   s a l a r i e s   f o r   a l l   < s t r o n g > f i x e d   s a l a r y < / s t r o n g >   a n d   < s t r o n g > p e r c e n t a g e   b a s e d < / s t r o n g >   e m p l o y e e s . 
 
                                 < b r > 
 
                                 < s t r o n g > P e r   s u i t < / s t r o n g >   e m p l o y e e s   a r e   p a i d   a u t o m a t i c a l l y   w h e n   o r d e r s   a r e   d e l i v e r e d . 
 
                         < / s m a l l > 
 
                 < / d i v > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > M o n t h < / l a b e l > 
 
                                         < s e l e c t   n a m e = " m o n t h "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < ? p h p   f o r   ( $ m   =   1 ;   $ m   < =   1 2 ;   $ m + + ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   s t r _ p a d ( $ m ,   2 ,   ' 0 ' ,   S T R _ P A D _ L E F T ) ;   ? > "   < ? p h p   e c h o   $ m   = =   d a t e ( ' m ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   d a t e ( ' F ' ,   m k t i m e ( 0 , 0 , 0 , $ m , 1 ) ) ;   ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > Y e a r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " y e a r "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < ? p h p   f o r   ( $ y   =   d a t e ( ' Y ' )   -   2 ;   $ y   < =   d a t e ( ' Y ' ) ;   $ y + + ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ y ;   ? > "   < ? p h p   e c h o   $ y   = =   d a t e ( ' Y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > < ? p h p   e c h o   $ y ;   ? > < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4   d - f l e x   a l i g n - i t e m s - e n d " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - w a r n i n g   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - c a l c u l a t o r   m e - 1 " > < / i >   G e n e r a t e   S a l a r y 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 2 " > 
 
         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 2   t e x t - p r i m a r y " > < / i > E m p l o y e e s < / h 5 > 
 
         < d i v > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ a d d "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   E m p l o y e e 
 
                 < / a > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ c a t e g o r i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - t a g s   m e - 1 " > < / i >   C a t e g o r i e s 
 
                 < / a > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ g e n e r a t e _ s a l a r y "   c l a s s = " b t n   b t n - w a r n i n g   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e   m e - 1 " > < / i >   G e n e r a t e   S a l a r y 
 
                 < / a > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
         < / d i v > 
 
 < ? p h p   e n d i f ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - b o d y   p - 2 " > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e   m b - 0 " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > C o d e < / t h > 
 
                                                 < t h > N a m e < / t h > 
 
                                                 < t h > C a t e g o r y < / t h > 
 
                                                 < t h > P a y m e n t   T y p e < / t h > 
 
                                                 < t h > L a r g e < / t h > 
 
                                                 < t h > M e d i u m < / t h > 
 
                                                 < t h > S m a l l < / t h > 
 
                                                 < t h > S t a t u s < / t h > 
 
                                                 < t h > B a l a n c e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 0 p x ; " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ e m p l o y e e s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 1 0 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 2 " > N o   e m p l o y e e s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ e m p l o y e e s   a s   $ e ) :   
 
                                                         $ b a l   =   $ t h i s - > e m p l o y e e M o d e l - > g e t E m p l o y e e B a l a n c e ( $ e [ ' i d ' ] ) ; 
 
                                                         $ b a l C l a s s   =   $ b a l [ ' b a l a n c e ' ]   >   0   ?   ' t e x t - s u c c e s s '   :   ( $ b a l [ ' b a l a n c e ' ]   <   0   ?   ' t e x t - d a n g e r '   :   ' t e x t - s e c o n d a r y ' ) ; 
 
                                                         
 
                                                         $ p a y m e n t _ t y p e   =   $ e [ ' p a y m e n t _ t y p e ' ]   ? ?   ' f i x e d ' ; 
 
                                                         
 
                                                         / /    x  "   F i x :   n u l l   c h e c k   f o r   r a t e s 
 
                                                         $ r a t e s   =   [ ] ; 
 
                                                         i f   ( ! e m p t y ( $ e [ ' r a t e s ' ] )   & &   $ e [ ' r a t e s ' ]   ! = =   n u l l )   { 
 
                                                                 $ r a t e s   =   j s o n _ d e c o d e ( $ e [ ' r a t e s ' ] ,   t r u e ) ; 
 
                                                                 i f   ( ! i s _ a r r a y ( $ r a t e s ) )   { 
 
                                                                         $ r a t e s   =   [ ] ; 
 
                                                                 } 
 
                                                         } 
 
                                                         
 
                                                         $ l a r g e   =   $ r a t e s [ ' l a r g e ' ]   ? ?   0 ; 
 
                                                         $ m e d i u m   =   $ r a t e s [ ' m e d i u m ' ]   ? ?   0 ; 
 
                                                         $ s m a l l   =   $ r a t e s [ ' s m a l l ' ]   ? ?   0 ; 
 
                                                         $ c a t e g o r y _ r a t e   =   $ e [ ' c a t e g o r y _ r a t e ' ]   ? ?   0 ; 
 
                                                         $ f i x e d _ s a l a r y   =   $ e [ ' f i x e d _ s a l a r y ' ]   ? ?   0 ; 
 
                                                 ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' e m p _ c o d e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > < / s t r o n g > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' c a t e g o r y _ n a m e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s m a l l > 
 
                                                                                 < ? p h p   
 
                                                                                         i f   ( $ p a y m e n t _ t y p e   = =   ' p e r _ s u i t ' )   { 
 
                                                                                                 e c h o   ' P e r   S u i t ' ; 
 
                                                                                         }   e l s e i f   ( $ p a y m e n t _ t y p e   = =   ' p e r c e n t a g e ' )   { 
 
                                                                                                 e c h o   ( f l o a t ) $ c a t e g o r y _ r a t e   .   ' % ' ; 
 
                                                                                         }   e l s e   { 
 
                                                                                                 e c h o   ' F i x e d ' ; 
 
                                                                                         } 
 
                                                                                 ? > 
 
                                                                         < / s m a l l > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < s m a l l > 
 
                                                                                 < ? p h p   i f   ( $ p a y m e n t _ t y p e   = =   ' p e r _ s u i t ' ) :   ? > 
 
                                                                                         R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( f l o a t ) $ l a r g e ,   0 ) ;   ? > 
 
                                                                                 < ? p h p   e l s e :   ? > 
 
                                                                                         - 
 
                                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                                         < / s m a l l > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < s m a l l > 
 
                                                                                 < ? p h p   i f   ( $ p a y m e n t _ t y p e   = =   ' p e r _ s u i t ' ) :   ? > 
 
                                                                                         R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( f l o a t ) $ m e d i u m ,   0 ) ;   ? > 
 
                                                                                 < ? p h p   e l s e :   ? > 
 
                                                                                         - 
 
                                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                                         < / s m a l l > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < s m a l l > 
 
                                                                                 < ? p h p   i f   ( $ p a y m e n t _ t y p e   = =   ' p e r _ s u i t ' ) :   ? > 
 
                                                                                         R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( f l o a t ) $ s m a l l ,   0 ) ;   ? > 
 
                                                                                 < ? p h p   e l s e :   ? > 
 
                                                                                         - 
 
                                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                                         < / s m a l l > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e   b g - < ? p h p   e c h o   ( $ e [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' a c t i v e '   ?   ' s u c c e s s '   :   ( ( $ e [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' i n a c t i v e '   ?   ' w a r n i n g '   :   ' d a n g e r ' ) ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ e [ ' s t a t u s ' ]   ? ?   ' N / A ' ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " < ? p h p   e c h o   $ b a l C l a s s ;   ? >   f w - b o l d " > 
 
                                                                         < s m a l l > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( f l o a t ) ( $ b a l [ ' b a l a n c e ' ]   ? ?   0 ) ,   0 ) ;   ? > < / s m a l l > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ v i e w & i d = < ? p h p   e c h o   ( i n t ) ( $ e [ ' i d ' ]   ? ?   0 ) ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - i n f o   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 "   t i t l e = " V i e w " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e y e " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ e d i t & i d = < ? p h p   e c h o   ( i n t ) ( $ e [ ' i d ' ]   ? ?   0 ) ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 "   t i t l e = " E d i t " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ d e l e t e & i d = < ? p h p   e c h o   ( i n t ) ( $ e [ ' i d ' ]   ? ?   0 ) ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - d a n g e r   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 "   o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e ? ' ) "   t i t l e = " D e l e t e " > 
 
                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 2 " > 
 
         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r   m e - 2   t e x t - p r i m a r y " > < / i > E m p l o y e e   D e t a i l s < / h 5 > 
 
         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
         < / a > 
 
 < / d i v > 
 
 
 
 < d i v   c l a s s = " r o w   g - 3 " > 
 
         < ! - -   E m p l o y e e   I n f o   - - > 
 
         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
                         < d i v   c l a s s = " c a r d - b o d y " > 
 
                                 < d i v   c l a s s = " t e x t - c e n t e r   m b - 3 " > 
 
                                         < d i v   s t y l e = " w i d t h : 8 0 p x ;   h e i g h t : 8 0 p x ;   b o r d e r - r a d i u s : 5 0 % ;   b a c k g r o u n d : # 6 6 7 e e a ;   d i s p l a y : f l e x ;   a l i g n - i t e m s : c e n t e r ;   j u s t i f y - c o n t e n t : c e n t e r ;   m a r g i n : 0   a u t o ;   f o n t - s i z e : 3 2 p x ;   c o l o r : # f f f ;   f o n t - w e i g h t : b o l d ; " > 
 
                                                 < ? p h p   e c h o   s t r t o u p p e r ( s u b s t r ( $ e m p l o y e e [ ' n a m e ' ] ,   0 ,   1 ) ) ;   ? > 
 
                                         < / d i v > 
 
                                         < h 5   c l a s s = " m t - 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' n a m e ' ] ) ;   ? > < / h 5 > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - < ? p h p   e c h o   $ e m p l o y e e [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' s u c c e s s '   :   ' w a r n i n g ' ;   ? > " > < ? p h p   e c h o   u c f i r s t ( $ e m p l o y e e [ ' s t a t u s ' ] ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                                 < t a b l e   c l a s s = " t a b l e   t a b l e - s m   t a b l e - b o r d e r e d " > 
 
                                         < t r > 
 
                                                 < t d   c l a s s = " f w - b o l d " > C o d e < / t d > 
 
                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' e m p _ c o d e ' ] ) ;   ? > < / t d > 
 
                                         < / t r > 
 
                                         < t r > 
 
                                                 < t d   c l a s s = " f w - b o l d " > C a t e g o r y < / t d > 
 
                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' c a t e g o r y _ n a m e ' ] ) ;   ? > < / t d > 
 
                                         < / t r > 
 
                                         < t r > 
 
                                                 < t d   c l a s s = " f w - b o l d " > P h o n e < / t d > 
 
                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' p h o n e ' ] ) ;   ? > < / t d > 
 
                                         < / t r > 
 
                                         < t r > 
 
                                                 < t d   c l a s s = " f w - b o l d " > C N I C < / t d > 
 
                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' c n i c ' ] ) ;   ? > < / t d > 
 
                                         < / t r > 
 
                                         < t r > 
 
                                                 < t d   c l a s s = " f w - b o l d " > J o i n i n g < / t d > 
 
                                                 < t d > < ? p h p   e c h o   $ e m p l o y e e [ ' j o i n i n g _ d a t e ' ] ;   ? > < / t d > 
 
                                         < / t r > 
 
                                         < t r > 
 
                                                 < t d   c l a s s = " f w - b o l d " > P a y m e n t   T y p e < / t d > 
 
                                                 < t d > < ? p h p   e c h o   u c f i r s t ( $ e m p l o y e e [ ' p a y m e n t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                         < / t r > 
 
                                         < t r > 
 
                                                 < t d   c l a s s = " f w - b o l d " > R a t e < / t d > 
 
                                                 < t d > 
 
                                                         < ? p h p   
 
                                                                 i f   ( $ e m p l o y e e [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r _ s u i t ' )   e c h o   ' R s .   '   .   n u m b e r _ f o r m a t ( $ e m p l o y e e [ ' c a t e g o r y _ r a t e ' ] ,   0 )   .   '   p e r   s u i t ' ; 
 
                                                                 e l s e i f   ( $ e m p l o y e e [ ' p a y m e n t _ t y p e ' ]   = =   ' p e r c e n t a g e ' )   e c h o   $ e m p l o y e e [ ' c a t e g o r y _ r a t e ' ]   .   ' %   o f   c o l l e c t i o n ' ; 
 
                                                                 e l s e   e c h o   ' F i x e d :   R s .   '   .   n u m b e r _ f o r m a t ( $ e m p l o y e e [ ' f i x e d _ s a l a r y ' ] ,   0 ) ; 
 
                                                         ? > 
 
                                                 < / t d > 
 
                                         < / t r > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < ! - -   B a l a n c e   &   T r a n s a c t i o n s   - - > 
 
         < d i v   c l a s s = " c o l - m d - 8 " > 
 
                 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
                         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2 " > 
 
                                 < h 6   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - w a l l e t   m e - 2   t e x t - p r i m a r y " > < / i > F i n a n c i a l   S u m m a r y < / h 6 > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c a r d - b o d y " > 
 
                                 < d i v   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                                         < d i v   c l a s s = " c o l - 4 " > 
 
                                                 < d i v   c l a s s = " b g - s u c c e s s   b g - o p a c i t y - 1 0   p - 2   r o u n d e d - 3   t e x t - c e n t e r " > 
 
                                                         < s m a l l   c l a s s = " t e x t - m u t e d " > C r e d i t < / s m a l l > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - s u c c e s s " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e [ ' c r e d i t ' ] ,   0 ) ;   ? > < / h 6 > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - 4 " > 
 
                                                 < d i v   c l a s s = " b g - d a n g e r   b g - o p a c i t y - 1 0   p - 2   r o u n d e d - 3   t e x t - c e n t e r " > 
 
                                                         < s m a l l   c l a s s = " t e x t - m u t e d " > D e b i t < / s m a l l > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - d a n g e r " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e [ ' d e b i t ' ] ,   0 ) ;   ? > < / h 6 > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - 4 " > 
 
                                                 < d i v   c l a s s = " b g - p r i m a r y   b g - o p a c i t y - 1 0   p - 2   r o u n d e d - 3   t e x t - c e n t e r " > 
 
                                                         < s m a l l   c l a s s = " t e x t - m u t e d " > B a l a n c e < / s m a l l > 
 
                                                         < h 6   c l a s s = " f w - b o l d   t e x t - p r i m a r y " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e [ ' b a l a n c e ' ] ,   0 ) ;   ? > < / h 6 > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
 
 
                                 < h 6   c l a s s = " f w - b o l d   s m a l l " > < i   c l a s s = " f a s   f a - h i s t o r y   m e - 2   t e x t - p r i m a r y " > < / i > R e c e n t   T r a n s a c t i o n s < / h 6 > 
 
                                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                         < t a b l e   c l a s s = " t a b l e   t a b l e - s m   t a b l e - h o v e r " > 
 
                                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                         < t r > 
 
                                                                 < t h > D a t e < / t h > 
 
                                                                 < t h > T y p e < / t h > 
 
                                                                 < t h > A m o u n t < / t h > 
 
                                                                 < t h > D e s c r i p t i o n < / t h > 
 
                                                         < / t r > 
 
                                                 < / t h e a d > 
 
                                                 < t b o d y > 
 
                                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                                 < t r > < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 2 " > N o   t r a n s a c t i o n s   f o u n d . < / t d > < / t r > 
 
                                                         < ? p h p   e l s e :   ? > 
 
                                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                                         < t r > 
 
                                                                                 < t d > < ? p h p   e c h o   $ t [ ' t r a n s a c t i o n _ d a t e ' ] ;   ? > < / t d > 
 
                                                                                 < t d > 
 
                                                                                         < s p a n   c l a s s = " b a d g e   b g - < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' c r e d i t '   ?   ' s u c c e s s '   :   ( $ t [ ' t y p e ' ]   = =   ' s a l a r y '   ?   ' w a r n i n g '   :   ' d a n g e r ' ) ;   ? > " > 
 
                                                                                                 < ? p h p   e c h o   u c f i r s t ( $ t [ ' t y p e ' ] ) ;   ? > 
 
                                                                                         < / s p a n > 
 
                                                                                 < / t d > 
 
                                                                                 < t d   c l a s s = " f w - b o l d " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                                 < t d > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / s m a l l > < / t d > 
 
                                                                         < / t r > 
 
                                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < ? p h p   e n d i f ;   ? > 
 
                                                 < / t b o d y > 
 
                                         < / t a b l e > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
                 < / d i v >   < ! - -   / p a g e - c o n t e n t   - - > 
 
         < / d i v >   < ! - -   / m a i n - c o n t e n t   - - > 
 
 < / d i v >   < ! - -   / w r a p p e r   - - > 
 
 
 
 < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / j s / b o o t s t r a p . b u n d l e . m i n . j s " > < / s c r i p t > 
 
 < s c r i p t > 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   = = = = =   S I D E B A R   T O G G L E   = = = = = 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 f u n c t i o n   t o g g l e S i d e b a r ( )   { 
 
         c o n s t   s i d e b a r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s i d e b a r ' ) ; 
 
         s i d e b a r . c l a s s L i s t . t o g g l e ( ' s h o w ' ) ; 
 
 } 
 
 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( e )   { 
 
         c o n s t   s i d e b a r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s i d e b a r ' ) ; 
 
         c o n s t   t o g g l e B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' t o g g l e S i d e b a r B t n ' ) ; 
 
         c o n s t   i s M o b i l e   =   w i n d o w . i n n e r W i d t h   < =   9 9 2 ; 
 
         i f   ( i s M o b i l e   & &   ! s i d e b a r . c o n t a i n s ( e . t a r g e t )   & &   ! t o g g l e B t n . c o n t a i n s ( e . t a r g e t ) )   { 
 
                 s i d e b a r . c l a s s L i s t . r e m o v e ( ' s h o w ' ) ; 
 
         } 
 
 } ) ; 
 
 
 
 w i n d o w . a d d E v e n t L i s t e n e r ( ' r e s i z e ' ,   f u n c t i o n ( )   { 
 
         c o n s t   s i d e b a r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s i d e b a r ' ) ; 
 
         i f   ( w i n d o w . i n n e r W i d t h   >   9 9 2 )   { 
 
                 s i d e b a r . c l a s s L i s t . r e m o v e ( ' s h o w ' ) ; 
 
         } 
 
 } ) ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   = = = = =   G L O B A L   S E A R C H   = = = = = 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' g l o b a l S e a r c h ' ) ; 
 
 c o n s t   s e a r c h R e s u l t s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h R e s u l t s ' ) ; 
 
 
 
 s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
         c o n s t   q   =   t h i s . v a l u e . t r i m ( ) ; 
 
         i f   ( q . l e n g t h   <   2 )   { 
 
                 s e a r c h R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 r e t u r n ; 
 
         } 
 
         f e t c h ( ' i n d e x . p h p ? a c t i o n = g l o b a l _ s e a r c h & q = '   +   e n c o d e U R I C o m p o n e n t ( q ) ) 
 
                 . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                 . t h e n ( d a t a   = >   { 
 
                         s e a r c h R e s u l t s . i n n e r H T M L   =   ' ' ; 
 
                         i f   ( d a t a . l e n g t h   = = =   0 )   { 
 
                                 s e a r c h R e s u l t s . i n n e r H T M L   =   ' < d i v   c l a s s = " d r o p d o w n - i t e m   t e x t - m u t e d   s m a l l " > N o   r e s u l t s   f o u n d < / d i v > ' ; 
 
                         }   e l s e   { 
 
                                 d a t a . f o r E a c h ( i t e m   = >   { 
 
                                         c o n s t   a   =   d o c u m e n t . c r e a t e E l e m e n t ( ' a ' ) ; 
 
                                         a . c l a s s N a m e   =   ' d r o p d o w n - i t e m ' ; 
 
                                         l e t   i c o n   =   ' f a - s e a r c h ' ; 
 
                                         i f   ( i t e m . t y p e   = = =   ' c u s t o m e r ' )   i c o n   =   ' f a - u s e r ' ; 
 
                                         e l s e   i f   ( i t e m . t y p e   = = =   ' o r d e r ' )   i c o n   =   ' f a - s h o p p i n g - b a g ' ; 
 
                                         e l s e   i f   ( i t e m . t y p e   = = =   ' r a t e ' )   i c o n   =   ' f a - d o l l a r - s i g n ' ; 
 
                                         e l s e   i f   ( i t e m . t y p e   = = =   ' e m p l o y e e ' )   i c o n   =   ' f a - u s e r - t i e ' ; 
 
                                         e l s e   i f   ( i t e m . t y p e   = = =   ' c o m p a n y ' )   i c o n   =   ' f a - b u i l d i n g ' ; 
 
                                         a . i n n e r H T M L   =   ` < i   c l a s s = " f a s   $ { i c o n }   m e - 2   t e x t - p r i m a r y " > < / i >   $ { i t e m . n a m e } ` ; 
 
                                         a . h r e f   =   i t e m . l i n k   | |   ' # ' ; 
 
                                         s e a r c h R e s u l t s . a p p e n d C h i l d ( a ) ; 
 
                                 } ) ; 
 
                         } 
 
                         s e a r c h R e s u l t s . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                 } ) ; 
 
 } ) ; 
 
 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( e )   { 
 
         i f   ( ! e . t a r g e t . c l o s e s t ( ' # g l o b a l S e a r c h ' )   & &   ! e . t a r g e t . c l o s e s t ( ' # s e a r c h R e s u l t s ' ) )   { 
 
                 s e a r c h R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } 
 
 } ) ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   = = = = =   N O T I F I C A T I O N S   S Y S T E M   = = = = = 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 f u n c t i o n   l o a d N o t i f i c a t i o n s ( )   { 
 
         f e t c h ( ' i n d e x . p h p ? a c t i o n = g e t _ n o t i f i c a t i o n s ' ) 
 
                 . t h e n ( r e s p o n s e   = >   r e s p o n s e . j s o n ( ) ) 
 
                 . t h e n ( d a t a   = >   { 
 
                         c o n s t   l i s t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' n o t i f i c a t i o n L i s t ' ) ; 
 
                         c o n s t   b a d g e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' n o t i f i c a t i o n B a d g e ' ) ; 
 
                         c o n s t   n o M s g   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' n o N o t i f i c a t i o n s ' ) ; 
 
                         
 
                         / /   U p d a t e   b a d g e 
 
                         i f   ( d a t a . u n r e a d   >   0 )   { 
 
                                 b a d g e . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                                 b a d g e . t e x t C o n t e n t   =   d a t a . u n r e a d ; 
 
                         }   e l s e   { 
 
                                 b a d g e . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         } 
 
                         
 
                         / /   R e m o v e   o l d   n o t i f i c a t i o n   i t e m s   ( k e e p   h e a d e r ,   d i v i d e r ,   a n d   n o M s g ) 
 
                         c o n s t   i t e m s   =   l i s t . q u e r y S e l e c t o r A l l ( ' . n o t i f i c a t i o n - i t e m ' ) ; 
 
                         i t e m s . f o r E a c h ( e l   = >   e l . r e m o v e ( ) ) ; 
 
                         
 
                         / /   S h o w / h i d e   n o   n o t i f i c a t i o n   m e s s a g e 
 
                         i f   ( d a t a . n o t i f i c a t i o n s . l e n g t h   = = =   0 )   { 
 
                                 i f   ( n o M s g )   n o M s g . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                                 r e t u r n ; 
 
                         } 
 
                         i f   ( n o M s g )   n o M s g . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         
 
                         / /   A d d   n o t i f i c a t i o n s 
 
                         d a t a . n o t i f i c a t i o n s . f o r E a c h ( n   = >   { 
 
                                 c o n s t   l i   =   d o c u m e n t . c r e a t e E l e m e n t ( ' l i ' ) ; 
 
                                 l i . c l a s s N a m e   =   ' n o t i f i c a t i o n - i t e m ' ; 
 
                                 i f   ( n . i s _ r e a d   = =   0 )   l i . c l a s s L i s t . a d d ( ' u n r e a d ' ) ; 
 
                                 
 
                                 l e t   i c o n   =   ' b e l l ' ; 
 
                                 i f   ( n . t y p e   = = =   ' o r d e r _ n e w ' )   i c o n   =   ' p l u s - c i r c l e   t e x t - p r i m a r y ' ; 
 
                                 e l s e   i f   ( n . t y p e   = = =   ' o r d e r _ u p d a t e ' )   i c o n   =   ' e d i t   t e x t - w a r n i n g ' ; 
 
                                 e l s e   i f   ( n . t y p e   = = =   ' o r d e r _ d e l i v e r e d ' )   i c o n   =   ' c h e c k - c i r c l e   t e x t - s u c c e s s ' ; 
 
                                 e l s e   i f   ( n . t y p e   = = =   ' o r d e r _ c a n c e l l e d ' )   i c o n   =   ' t i m e s - c i r c l e   t e x t - d a n g e r ' ; 
 
                                 
 
                                 l i . i n n e r H T M L   =   ` 
 
                                         < i   c l a s s = " f a s   f a - $ { i c o n }   m t - 1 "   s t y l e = " f o n t - s i z e : 1 8 p x ; " > < / i > 
 
                                         < d i v   c l a s s = " f l e x - g r o w - 1 " > 
 
                                                 < d i v   c l a s s = " m s g " > $ { n . m e s s a g e } < / d i v > 
 
                                                 < d i v   c l a s s = " t i m e " > < i   c l a s s = " f a r   f a - c l o c k   m e - 1 " > < / i > $ { n . c r e a t e d _ a t } < / d i v > 
 
                                         < / d i v > 
 
                                         $ { n . i s _ r e a d   = =   0   ?   ' < s p a n   c l a s s = " b a d g e - n e w " > N E W < / s p a n > '   :   ' ' } 
 
                                 ` ; 
 
                                 
 
                                 l i . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( e )   { 
 
                                         / /   M a r k   a s   r e a d 
 
                                         f e t c h ( ' i n d e x . p h p ? a c t i o n = m a r k _ n o t i f i c a t i o n _ r e a d ' ,   { 
 
                                                 m e t h o d :   ' P O S T ' , 
 
                                                 h e a d e r s :   {   ' C o n t e n t - T y p e ' :   ' a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d '   } , 
 
                                                 b o d y :   ' i d = '   +   n . i d 
 
                                         } ) ; 
 
                                         / /   R e m o v e   u n r e a d   c l a s s   a n d   b a d g e 
 
                                         t h i s . c l a s s L i s t . r e m o v e ( ' u n r e a d ' ) ; 
 
                                         c o n s t   b a d g e N e w   =   t h i s . q u e r y S e l e c t o r ( ' . b a d g e - n e w ' ) ; 
 
                                         i f   ( b a d g e N e w )   b a d g e N e w . r e m o v e ( ) ; 
 
                                         / /   R e d i r e c t   i f   l i n k   e x i s t s 
 
                                         i f   ( n . l i n k )   { 
 
                                                 w i n d o w . l o c a t i o n . h r e f   =   n . l i n k ; 
 
                                         } 
 
                                 } ) ; 
 
                                 
 
                                 l i s t . a p p e n d C h i l d ( l i ) ; 
 
                         } ) ; 
 
                 } ) 
 
                 . c a t c h ( e r r o r   = >   c o n s o l e . e r r o r ( ' E r r o r   l o a d i n g   n o t i f i c a t i o n s : ' ,   e r r o r ) ) ; 
 
 } 
 
 
 
 / /   = = = = =   M A R K   A L L   A S   R E A D   = = = = = 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         c o n s t   m a r k A l l B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' m a r k A l l R e a d ' ) ; 
 
         i f   ( m a r k A l l B t n )   { 
 
                 m a r k A l l B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( e )   { 
 
                         e . s t o p P r o p a g a t i o n ( ) ; 
 
                         f e t c h ( ' i n d e x . p h p ? a c t i o n = m a r k _ a l l _ n o t i f i c a t i o n s _ r e a d ' ,   { 
 
                                 m e t h o d :   ' P O S T ' 
 
                         } ) 
 
                         . t h e n ( r e s p o n s e   = >   r e s p o n s e . j s o n ( ) ) 
 
                         . t h e n ( d a t a   = >   { 
 
                                 i f   ( d a t a . s u c c e s s )   { 
 
                                         l o a d N o t i f i c a t i o n s ( ) ; 
 
                                 } 
 
                         } ) 
 
                         . c a t c h ( e r r o r   = >   c o n s o l e . e r r o r ( ' E r r o r : ' ,   e r r o r ) ) ; 
 
                 } ) ; 
 
         } 
 
         
 
         / /   L o a d   n o t i f i c a t i o n s   o n   p a g e   l o a d 
 
         l o a d N o t i f i c a t i o n s ( ) ; 
 
         
 
         / /   R e l o a d   e v e r y   3 0   s e c o n d s 
 
         s e t I n t e r v a l ( l o a d N o t i f i c a t i o n s ,   3 0 0 0 0 ) ; 
 
 } ) ; 
 
 
 
 / /   = = = = =   K E Y B O A R D   S H O R T C U T S   = = = = = 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
         / /   C t r l + /   f o r   s e a r c h 
 
         i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' / ' )   { 
 
                 e . p r e v e n t D e f a u l t ( ) ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' g l o b a l S e a r c h ' ) . f o c u s ( ) ; 
 
         } 
 
         / /   A l t + N   f o r   n o t i f i c a t i o n s 
 
         i f   ( e . a l t K e y   & &   e . k e y   = = =   ' n ' )   { 
 
                 e . p r e v e n t D e f a u l t ( ) ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' n o t i f i c a t i o n B e l l ' ) . c l i c k ( ) ; 
 
         } 
 
 } ) ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   = = = = =   A U T O - S I Z E   S I D E B A R   H E I G H T   = = = = = 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 f u n c t i o n   a d j u s t S i d e b a r H e i g h t ( )   { 
 
         c o n s t   s i d e b a r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s i d e b a r ' ) ; 
 
         i f   ( w i n d o w . i n n e r W i d t h   < =   9 9 2 )   { 
 
                 s i d e b a r . s t y l e . h e i g h t   =   ' 1 0 0 v h ' ; 
 
         }   e l s e   { 
 
                 s i d e b a r . s t y l e . h e i g h t   =   ' 1 0 0 v h ' ; 
 
         } 
 
 } 
 
 a d j u s t S i d e b a r H e i g h t ( ) ; 
 
 w i n d o w . a d d E v e n t L i s t e n e r ( ' r e s i z e ' ,   a d j u s t S i d e b a r H e i g h t ) ; 
 
 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 / /   = = = = =   T O O L T I P   F O R   N O T I F I C A T I O N   B E L L   = = = = = 
 
 / /   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 c o n s t   b e l l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' n o t i f i c a t i o n B e l l ' ) ; 
 
 i f   ( b e l l )   { 
 
         b e l l . a d d E v e n t L i s t e n e r ( ' m o u s e e n t e r ' ,   f u n c t i o n ( )   { 
 
                 t h i s . t i t l e   =   ' N o t i f i c a t i o n s   ( A l t + N ) ' ; 
 
         } ) ; 
 
 } 
 
 < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < ? p h p 
 
 i f   ( s e s s i o n _ s t a t u s ( )   = = =   P H P _ S E S S I O N _ N O N E )   s e s s i o n _ s t a r t ( ) ; 
 
 i f   ( ! i s s e t ( $ _ S E S S I O N [ ' u s e r _ i d ' ] ) )   {   h e a d e r ( ' L o c a t i o n :   l o g i n . p h p ' ) ;   e x i t ;   } 
 
 
 
 / /   = = = = =   F I X :   E n s u r e   $ d b   i s   a v a i l a b l e   = = = = = 
 
 g l o b a l   $ d b ; 
 
 i f   ( ! i s s e t ( $ d b )   | |   ! $ d b )   { 
 
         r e q u i r e _ o n c e   _ _ D I R _ _   .   ' / . . / c o n f i g / d a t a b a s e . p h p ' ; 
 
         g l o b a l   $ d b ; 
 
 } 
 
 
 
 / /   = = = = =   S A F E   B A D G E   C O U N T   F U N C T I O N   = = = = = 
 
 f u n c t i o n   g e t S a f e B a d g e C o u n t ( $ q u e r y ,   $ p a r a m s   =   [ ] )   { 
 
         g l o b a l   $ d b ; 
 
         i f   ( ! i s s e t ( $ d b )   | |   ! $ d b )   r e t u r n   0 ; 
 
         t r y   { 
 
                 i f   ( ! e m p t y ( $ p a r a m s ) )   { 
 
                         $ s t m t   =   $ d b - > p r e p a r e ( $ q u e r y ) ; 
 
                         $ s t m t - > e x e c u t e ( $ p a r a m s ) ; 
 
                         $ r e s u l t   =   $ s t m t - > f e t c h ( ) ; 
 
                         r e t u r n   $ r e s u l t [ ' c o u n t ' ]   ? ?   0 ; 
 
                 }   e l s e   { 
 
                         $ s t m t   =   $ d b - > q u e r y ( $ q u e r y ) ; 
 
                         $ r e s u l t   =   $ s t m t - > f e t c h ( ) ; 
 
                         r e t u r n   $ r e s u l t [ ' c o u n t ' ]   ? ?   0 ; 
 
                 } 
 
         }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                 r e t u r n   0 ; 
 
         } 
 
 } 
 
 
 
 / /   = = = = =   U S E R   I N F O   = = = = = 
 
 $ f u l l _ n a m e   =   $ _ S E S S I O N [ ' f u l l _ n a m e ' ]   ? ?   ' G u e s t ' ; 
 
 $ p r o f i l e _ p i c   =   $ _ S E S S I O N [ ' p r o f i l e _ p i c ' ]   ? ?   ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = U s e r & b a c k g r o u n d = 0 D 6 E F D & c o l o r = f f f ' ; 
 
 $ r o l e   =   $ _ S E S S I O N [ ' r o l e ' ]   ? ?   ' w o r k e r ' ; 
 
 $ c o m p a n y _ i d   =   $ _ S E S S I O N [ ' c o m p a n y _ i d ' ]   ? ?   n u l l ; 
 
 $ c u r r e n t _ a c t i o n   =   i s s e t ( $ _ G E T [ ' a c t i o n ' ] )   ?   $ _ G E T [ ' a c t i o n ' ]   :   ' d a s h b o a r d ' ; 
 
 
 
 $ c o m p a n y   =   n u l l ; 
 
 i f   ( ! A u t h : : i s S u p e r A d m i n ( )   & &   $ c o m p a n y _ i d )   { 
 
         g l o b a l   $ d b ; 
 
         i f   ( i s s e t ( $ d b )   & &   $ d b )   { 
 
                 t r y   { 
 
                         $ s t m t   =   $ d b - > p r e p a r e ( " S E L E C T   *   F R O M   c o m p a n i e s   W H E R E   i d   =   ? " ) ; 
 
                         $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                         $ c o m p a n y   =   $ s t m t - > f e t c h ( ) ; 
 
                 }   c a t c h   ( E x c e p t i o n   $ e )   { 
 
                         $ c o m p a n y   =   n u l l ; 
 
                 } 
 
         } 
 
 } 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l   l a n g = " e n " > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < m e t a   n a m e = " v i e w p o r t "   c o n t e n t = " w i d t h = d e v i c e - w i d t h ,   i n i t i a l - s c a l e = 1 . 0 " > 
 
         < t i t l e > B i z T e c h   T a i l o r < / t i t l e > 
 
         < l i n k   h r e f = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / b o o t s t r a p @ 5 . 3 . 0 / d i s t / c s s / b o o t s t r a p . m i n . c s s "   r e l = " s t y l e s h e e t " > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < l i n k   h r e f = " h t t p s : / / f o n t s . g o o g l e a p i s . c o m / c s s 2 ? f a m i l y = N o t o + S a n s + A r a b i c : w g h t @ 4 0 0 ; 6 0 0 ; 7 0 0 & d i s p l a y = s w a p "   r e l = " s t y l e s h e e t " > 
 
         < s t y l e > 
 
                 : r o o t   {   - - s i d e b a r - w i d t h :   2 3 0 p x ;   - - p r i m a r y - c o l o r :   # 0 D 6 E F D ;   - - s i d e b a r - b g :   # 1 a 1 a 2 e ;   - - s i d e b a r - h o v e r :   # 2 d 2 d 4 4 ;   - - t e x t - m u t e d :   # a 0 a e c 0 ;   - - t o p b a r - b g :   # f f f f f f ;   } 
 
                 *   {   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   ' S e g o e   U I ' ,   T a h o m a ,   s a n s - s e r i f ;   } 
 
                 b o d y   {   b a c k g r o u n d :   # f 4 f 7 f b ;   m a r g i n :   0 ;   p a d d i n g :   0 ;   m i n - h e i g h t :   1 0 0 v h ;   } 
 
                 . w r a p p e r   {   d i s p l a y :   f l e x ;   m i n - h e i g h t :   1 0 0 v h ;   } 
 
                 
 
                 . s i d e b a r   { 
 
                         w i d t h :   v a r ( - - s i d e b a r - w i d t h ) ; 
 
                         h e i g h t :   1 0 0 v h ; 
 
                         b a c k g r o u n d :   v a r ( - - s i d e b a r - b g ) ; 
 
                         c o l o r :   # f f f ; 
 
                         p o s i t i o n :   f i x e d ; 
 
                         t o p :   0 ; 
 
                         l e f t :   0 ; 
 
                         z - i n d e x :   1 0 0 0 ; 
 
                         t r a n s i t i o n :   t r a n s f o r m   0 . 3 s   e a s e ; 
 
                         o v e r f l o w - y :   a u t o ; 
 
                         o v e r f l o w - x :   h i d d e n ; 
 
                         b o x - s h a d o w :   2 p x   0   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 ) ; 
 
                         w i l l - c h a n g e :   t r a n s f o r m ; 
 
                         t r a n s f o r m :   t r a n s l a t e X ( 0 ) ; 
 
                         d i s p l a y :   f l e x ; 
 
                         f l e x - d i r e c t i o n :   c o l u m n ; 
 
                         p a d d i n g - b o t t o m :   2 0 p x ; 
 
                 } 
 
                 . s i d e b a r : : - w e b k i t - s c r o l l b a r   {   w i d t h :   4 p x ;   } 
 
                 . s i d e b a r : : - w e b k i t - s c r o l l b a r - t h u m b   {   b a c k g r o u n d :   # 6 6 7 e e a ;   b o r d e r - r a d i u s :   1 0 p x ;   } 
 
                 . s i d e b a r : : - w e b k i t - s c r o l l b a r - t r a c k   {   b a c k g r o u n d :   t r a n s p a r e n t ;   } 
 
                 
 
                 . s i d e b a r   . b r a n d   { 
 
                         p a d d i n g :   1 5 p x   1 5 p x   1 0 p x   1 5 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f l e x - s h r i n k :   0 ; 
 
                 } 
 
                 . s i d e b a r   . b r a n d   . l o g o - w r a p p e r   { 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         w i d t h :   5 0 p x ; 
 
                         h e i g h t :   5 0 p x ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b a c k g r o u n d :   # 6 6 7 e e a ; 
 
                         o v e r f l o w :   h i d d e n ; 
 
                         l i n e - h e i g h t :   5 0 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   2 4 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # f f f ; 
 
                         m a r g i n - b o t t o m :   5 p x ; 
 
                 } 
 
                 . s i d e b a r   . b r a n d   . l o g o - w r a p p e r   i m g   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   1 0 0 % ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         d i s p l a y :   b l o c k ; 
 
                 } 
 
                 . s i d e b a r   . b r a n d   h 4   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         m a r g i n - t o p :   5 p x ; 
 
                         f o n t - s i z e :   1 7 p x ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . s i d e b a r   . b r a n d   h 4   s p a n   {   c o l o r :   # 6 6 7 e e a ;   } 
 
                 . s i d e b a r   . b r a n d   s m a l l   { 
 
                         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         d i s p l a y :   b l o c k ; 
 
                 } 
 
                 
 
                 . s i d e b a r   . u s e r - i n f o   { 
 
                         p a d d i n g :   1 2 p x   1 5 p x ; 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         g a p :   1 0 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 ) ; 
 
                         f l e x - s h r i n k :   0 ; 
 
                 } 
 
                 . s i d e b a r   . u s e r - i n f o   i m g   { 
 
                         w i d t h :   3 8 p x ; 
 
                         h e i g h t :   3 8 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         b o r d e r :   2 p x   s o l i d   # 6 6 7 e e a ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         f l e x - s h r i n k :   0 ; 
 
                         b a c k g r o u n d :   # 2 d 2 d 4 4 ; 
 
                 } 
 
                 . s i d e b a r   . u s e r - i n f o   . n a m e   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . s i d e b a r   . u s e r - i n f o   . r o l e   { 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 
                 } 
 
                 . s i d e b a r   . u s e r - i n f o   . r o l e   i   { 
 
                         c o l o r :   # 2 e c c 7 1 ; 
 
                         f o n t - s i z e :   7 p x ; 
 
                         m a r g i n - r i g h t :   4 p x ; 
 
                 } 
 
                 
 
                 . s i d e b a r   . n a v - i t e m   { 
 
                         p a d d i n g :   8 p x   1 6 p x ; 
 
                         m a r g i n :   3 p x   1 0 p x ; 
 
                         b o r d e r - r a d i u s :   1 0 p x ; 
 
                         t r a n s i t i o n :   0 . 3 s ; 
 
                         c o l o r :   # b 0 b 8 c 8 ; 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         g a p :   1 2 p x ; 
 
                         t e x t - d e c o r a t i o n :   n o n e ; 
 
                         f o n t - w e i g h t :   5 0 0 ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         w h i t e - s p a c e :   n o w r a p ; 
 
                 } 
 
                 . s i d e b a r   . n a v - i t e m   i   { 
 
                         w i d t h :   2 0 p x ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         f l e x - s h r i n k :   0 ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                 } 
 
                 . s i d e b a r   . n a v - i t e m : h o v e r   {   b a c k g r o u n d :   v a r ( - - s i d e b a r - h o v e r ) ;   c o l o r :   # f f f ;   } 
 
                 . s i d e b a r   . n a v - i t e m . a c t i v e   {   b a c k g r o u n d :   v a r ( - - p r i m a r y - c o l o r ) ;   c o l o r :   # f f f ;   b o x - s h a d o w :   0   5 p x   1 5 p x   r g b a ( 1 3 , 1 1 0 , 2 5 3 , 0 . 3 ) ;   } 
 
                 . s i d e b a r   . n a v - i t e m   . b a d g e   {   m a r g i n - l e f t :   a u t o ;   b a c k g r o u n d :   # d c 3 5 4 5 ;   f o n t - s i z e :   9 p x ;   p a d d i n g :   2 p x   6 p x ;   b o r d e r - r a d i u s :   1 0 p x ;   } 
 
                 . s i d e b a r   . n a v - d i v i d e r   {   h e i g h t :   1 p x ;   b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 6 ) ;   m a r g i n :   8 p x   1 5 p x ;   } 
 
                 
 
                 . m a i n - c o n t e n t   { 
 
                         m a r g i n - l e f t :   v a r ( - - s i d e b a r - w i d t h ) ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         p a d d i n g :   0 ; 
 
                         t r a n s i t i o n :   m a r g i n - l e f t   0 . 3 s   e a s e ; 
 
                         b a c k g r o u n d :   # f 4 f 7 f b ; 
 
                 } 
 
                 
 
                 . t o p - b a r   { 
 
                         b a c k g r o u n d :   v a r ( - - t o p b a r - b g ) ; 
 
                         p a d d i n g :   0   2 4 p x ; 
 
                         b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         p o s i t i o n :   s t i c k y ; 
 
                         t o p :   0 ; 
 
                         z - i n d e x :   9 9 9 ; 
 
                         h e i g h t :   6 4 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                 } 
 
                 . t o p - b a r   . n a v b a r - b r a n d   {   f o n t - w e i g h t :   7 0 0 ;   f o n t - s i z e :   1 8 p x ;   c o l o r :   # 1 a 1 a 2 e ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   g a p :   8 p x ;   } 
 
                 . t o p - b a r   . n a v b a r - b r a n d   i   {   c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;   } 
 
                 
 
                 . t o g g l e - s i d e b a r   { 
 
                         d i s p l a y :   n o n e ; 
 
                         b a c k g r o u n d :   n o n e ; 
 
                         b o r d e r :   n o n e ; 
 
                         f o n t - s i z e :   2 2 p x ; 
 
                         c o l o r :   # 4 9 5 0 5 7 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         m a r g i n - r i g h t :   1 0 p x ; 
 
                 } 
 
                 
 
                 . t o p - b a r   . s e a r c h - c o n t a i n e r   { 
 
                         p o s i t i o n :   r e l a t i v e ; 
 
                         f l e x :   1 ; 
 
                         m a x - w i d t h :   3 6 0 p x ; 
 
                         m a r g i n :   0   1 5 p x ; 
 
                 } 
 
                 . t o p - b a r   . s e a r c h - c o n t a i n e r   i n p u t   { 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         p a d d i n g :   6 p x   1 8 p x   6 p x   3 8 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         t r a n s i t i o n :   0 . 3 s ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   3 8 p x ; 
 
                 } 
 
                 . t o p - b a r   . s e a r c h - c o n t a i n e r   i n p u t : f o c u s   { 
 
                         b o r d e r - c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ; 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 1 3 , 1 1 0 , 2 5 3 , 0 . 1 ) ; 
 
                         o u t l i n e :   n o n e ; 
 
                 } 
 
                 . t o p - b a r   . s e a r c h - c o n t a i n e r   . s e a r c h - i c o n   { 
 
                         p o s i t i o n :   a b s o l u t e ; 
 
                         l e f t :   1 4 p x ; 
 
                         t o p :   5 0 % ; 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 5 0 % ) ; 
 
                         c o l o r :   # 9 4 a 3 b 8 ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                 } 
 
                 . t o p - b a r   . s e a r c h - r e s u l t s   { 
 
                         p o s i t i o n :   a b s o l u t e ; 
 
                         t o p :   c a l c ( 1 0 0 %   +   4 p x ) ; 
 
                         l e f t :   0 ; 
 
                         r i g h t :   0 ; 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   1 0 p x   4 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         m a x - h e i g h t :   3 2 0 p x ; 
 
                         o v e r f l o w - y :   a u t o ; 
 
                         d i s p l a y :   n o n e ; 
 
                         z - i n d e x :   1 0 5 0 ; 
 
                         p a d d i n g :   6 p x   0 ; 
 
                 } 
 
                 . t o p - b a r   . s e a r c h - r e s u l t s   . d r o p d o w n - i t e m   { 
 
                         p a d d i n g :   8 p x   1 6 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # f 1 f 5 f 9 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t e x t - d e c o r a t i o n :   n o n e ; 
 
                         c o l o r :   # 1 e 2 9 3 b ; 
 
                         d i s p l a y :   b l o c k ; 
 
                 } 
 
                 . t o p - b a r   . s e a r c h - r e s u l t s   . d r o p d o w n - i t e m : h o v e r   {   b a c k g r o u n d :   # f 1 f 5 f 9 ;   } 
 
                 . t o p - b a r   . s e a r c h - r e s u l t s   . d r o p d o w n - i t e m   i   {   w i d t h :   2 0 p x ;   c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;   } 
 
                 
 
                 . t o p - b a r   . n a v - i c o n s   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         g a p :   1 2 p x ; 
 
                 } 
 
                 . t o p - b a r   . n a v - i c o n s   . i c o n - b t n   { 
 
                         w i d t h :   3 8 p x ; 
 
                         h e i g h t :   3 8 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         c o l o r :   # 4 7 5 5 6 9 ; 
 
                         t r a n s i t i o n :   0 . 2 s ; 
 
                         p o s i t i o n :   r e l a t i v e ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                 } 
 
                 . t o p - b a r   . n a v - i c o n s   . i c o n - b t n : h o v e r   {   b a c k g r o u n d :   # e e f 2 f 6 ;   b o r d e r - c o l o r :   # c b d 5 e 1 ;   } 
 
                 . t o p - b a r   . n a v - i c o n s   . i c o n - b t n   . b a d g e - d o t   { 
 
                         p o s i t i o n :   a b s o l u t e ; 
 
                         t o p :   6 p x ; 
 
                         r i g h t :   6 p x ; 
 
                         w i d t h :   1 0 p x ; 
 
                         h e i g h t :   1 0 p x ; 
 
                         b a c k g r o u n d :   # d c 3 5 4 5 ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         b o r d e r :   2 p x   s o l i d   # f f f ; 
 
                         d i s p l a y :   n o n e ; 
 
                 } 
 
                 . t o p - b a r   . n a v - i c o n s   . u s e r - d r o p d o w n   i m g   { 
 
                         w i d t h :   3 6 p x ; 
 
                         h e i g h t :   3 6 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         b o r d e r :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         t r a n s i t i o n :   0 . 2 s ; 
 
                 } 
 
                 . t o p - b a r   . n a v - i c o n s   . u s e r - d r o p d o w n   i m g : h o v e r   {   b o r d e r - c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;   } 
 
                 
 
                 . p a g e - c o n t e n t   {   p a d d i n g :   2 4 p x ;   } 
 
                 
 
                 . n o t i f i c a t i o n - d r o p d o w n   { 
 
                         m i n - w i d t h :   3 4 0 p x ; 
 
                         m a x - h e i g h t :   4 2 0 p x ; 
 
                         o v e r f l o w - y :   a u t o ; 
 
                         p a d d i n g :   0 ; 
 
                         b o r d e r - r a d i u s :   1 4 p x ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o x - s h a d o w :   0   1 0 p x   4 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                 } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . d r o p d o w n - h e a d e r   { 
 
                         p a d d i n g :   1 2 p x   1 6 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         b o r d e r - r a d i u s :   1 4 p x   1 4 p x   0   0 ; 
 
                 } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . d r o p d o w n - h e a d e r   . b t n - m a r k - a l l   { 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         p a d d i n g :   2 p x   1 2 p x ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # 6 6 7 e e a ; 
 
                         c o l o r :   # 6 6 7 e e a ; 
 
                         b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                         t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . d r o p d o w n - h e a d e r   . b t n - m a r k - a l l : h o v e r   { 
 
                         b a c k g r o u n d :   # 6 6 7 e e a ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o t i f i c a t i o n - i t e m   { 
 
                         p a d d i n g :   1 0 p x   1 6 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # f 1 f 5 f 9 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   0 . 1 5 s ; 
 
                         d i s p l a y :   f l e x ; 
 
                         g a p :   1 2 p x ; 
 
                         a l i g n - i t e m s :   f l e x - s t a r t ; 
 
                 } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o t i f i c a t i o n - i t e m : h o v e r   {   b a c k g r o u n d :   # f 8 f a f c ;   } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o t i f i c a t i o n - i t e m . u n r e a d   {   b a c k g r o u n d :   # f 0 f 7 f f ;   } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o t i f i c a t i o n - i t e m   . m s g   {   f o n t - s i z e :   1 3 p x ;   c o l o r :   # 1 e 2 9 3 b ;   } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o t i f i c a t i o n - i t e m   . t i m e   {   f o n t - s i z e :   1 1 p x ;   c o l o r :   # 9 4 a 3 b 8 ;   m a r g i n - t o p :   2 p x ;   } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o t i f i c a t i o n - i t e m   . b a d g e - n e w   { 
 
                         b a c k g r o u n d :   # 0 D 6 E F D ; 
 
                         c o l o r :   # f f f ; 
 
                         f o n t - s i z e :   8 p x ; 
 
                         p a d d i n g :   2 p x   1 0 p x ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         m a r g i n - l e f t :   a u t o ; 
 
                 } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o - n o t i f i c a t i o n s   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   3 0 p x   2 0 p x ; 
 
                         c o l o r :   # 9 4 a 3 b 8 ; 
 
                 } 
 
                 . n o t i f i c a t i o n - d r o p d o w n   . n o - n o t i f i c a t i o n s   i   { 
 
                         f o n t - s i z e :   3 2 p x ; 
 
                         d i s p l a y :   b l o c k ; 
 
                         m a r g i n - b o t t o m :   1 0 p x ; 
 
                         c o l o r :   # d 1 d 5 d b ; 
 
                 } 
 
                 
 
                 @ m e d i a   ( m a x - w i d t h :   9 9 2 p x )   { 
 
                         . s i d e b a r   {   t r a n s f o r m :   t r a n s l a t e X ( - 1 0 0 % ) ;   } 
 
                         . s i d e b a r . s h o w   {   t r a n s f o r m :   t r a n s l a t e X ( 0 ) ;   } 
 
                         . m a i n - c o n t e n t   {   m a r g i n - l e f t :   0 ;   } 
 
                         . t o g g l e - s i d e b a r   {   d i s p l a y :   b l o c k ;   } 
 
                         . t o p - b a r   . s e a r c h - c o n t a i n e r   {   m a x - w i d t h :   1 8 0 p x ;   } 
 
                         . n o t i f i c a t i o n - d r o p d o w n   {   m i n - w i d t h :   3 0 0 p x ;   } 
 
                 } 
 
                 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                         . t o p - b a r   . n a v b a r - b r a n d   s p a n   {   d i s p l a y :   n o n e ;   } 
 
                         . t o p - b a r   . s e a r c h - c o n t a i n e r   {   m a x - w i d t h :   1 4 0 p x ;   } 
 
                         . n o t i f i c a t i o n - d r o p d o w n   {   m i n - w i d t h :   2 8 0 p x ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " w r a p p e r " > 
 
         
 
         < ! - -   = = = = =   S I D E B A R   = = = = =   - - > 
 
         < n a v   c l a s s = " s i d e b a r "   i d = " s i d e b a r " > 
 
                 < d i v   c l a s s = " b r a n d " > 
 
                         < d i v   c l a s s = " l o g o - w r a p p e r " > 
 
                                 < ? p h p   i f   ( $ c o m p a n y   & &   ! e m p t y ( $ c o m p a n y [ ' l o g o ' ] )   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' ) :   ? > 
 
                                         < i m g   s r c = " < ? p h p   e c h o   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   $ c o m p a n y [ ' l o g o ' ] ;   ? > "   
 
                                                   a l t = " L o g o "   
 
                                                   o n e r r o r = " t h i s . s t y l e . d i s p l a y = ' n o n e ' ;   t h i s . p a r e n t E l e m e n t . t e x t C o n t e n t = ' < ? p h p   e c h o   s t r t o u p p e r ( s u b s t r ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' B ' ,   0 ,   1 ) ) ;   ? > ' ; " > 
 
                                 < ? p h p   e l s e :   ? > 
 
                                         < s p a n > B < / s p a n > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                         < ? p h p   i f   ( A u t h : : i s S u p e r A d m i n ( ) ) :   ? > 
 
                                 < h 4 > B i z < s p a n > T e c h < / s p a n > < / h 4 > 
 
                                 < s m a l l > S u p e r   A d m i n < / s m a l l > 
 
                         < ? p h p   e l s e i f   ( $ c o m p a n y ) :   ? > 
 
                                 < h 4 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' B i z T e c h ' ) ;   ? > < / h 4 > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                         < ? p h p   e l s e :   ? > 
 
                                 < h 4 > B i z < s p a n > T e c h < / s p a n > < / h 4 > 
 
                                 < s m a l l > T a i l o r   M a n a g e m e n t < / s m a l l > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / d i v > 
 
                 
 
                 < d i v   c l a s s = " u s e r - i n f o " > 
 
                         < i m g   s r c = " < ? p h p   e c h o   $ p r o f i l e _ p i c ;   ? > "   
 
                                   a l t = " U s e r "   
 
                                   o n e r r o r = " t h i s . s r c = ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = < ? p h p   e c h o   u r l e n c o d e ( $ f u l l _ n a m e ) ;   ? > & b a c k g r o u n d = 0 D 6 E F D & c o l o r = f f f & s i z e = 3 8 ' " > 
 
                         < d i v > 
 
                                 < d i v   c l a s s = " n a m e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ f u l l _ n a m e ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " r o l e " > < i   c l a s s = " f a s   f a - c i r c l e " > < / i >   < ? p h p   e c h o   u c f i r s t ( $ r o l e ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 
 
                 < d i v   s t y l e = " f l e x : 1 ;   o v e r f l o w - y : a u t o ;   p a d d i n g - b o t t o m : 2 0 p x ; " > 
 
                         
 
                         < ? p h p   i f   ( A u t h : : i s S u p e r A d m i n ( ) ) :   ? > 
 
                                 < ! - -   = = = = =   S U P E R   A D M I N   M E N U   = = = = =   - - > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( $ c u r r e n t _ a c t i o n   = =   ' s u p e r a d m i n ' )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - c h a r t - p i e " > < / i >   D a s h b o a r d 
 
                                 < / a > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' s u p e r a d m i n _ c o m p a n i e s ' ,   ' s u p e r a d m i n _ c o m p a n y _ a d d ' ,   ' s u p e r a d m i n _ c o m p a n y _ e d i t ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - b u i l d i n g " > < / i >   C o m p a n i e s 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c o m p a n i e s " ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' s u p e r a d m i n _ p a c k a g e s ' ,   ' s u p e r a d m i n _ p a c k a g e _ a d d ' ,   ' s u p e r a d m i n _ p a c k a g e _ e d i t ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - b o x " > < / i >   P a c k a g e s 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   p a c k a g e s " ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' s u p e r a d m i n _ u s e r s ' ,   ' s u p e r a d m i n _ u s e r _ a d d ' ,   ' s u p e r a d m i n _ u s e r _ e d i t ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - u s e r s - c o g " > < / i >   U s e r s 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   u s e r s " ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 < d i v   c l a s s = " n a v - d i v i d e r " > < / d i v > 
 
                                 < a   h r e f = " l o g o u t . p h p "   c l a s s = " n a v - i t e m "   s t y l e = " c o l o r : # f f 6 b 6 b ; " > 
 
                                         < i   c l a s s = " f a s   f a - s i g n - o u t - a l t " > < / i >   L o g o u t 
 
                                 < / a > 
 
                                 
 
                         < ? p h p   e l s e :   ? > 
 
                                 < ! - -   = = = = =   C O M P A N Y   A D M I N   M E N U   = = = = =   - - > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = d a s h b o a r d "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( $ c u r r e n t _ a c t i o n   = =   ' d a s h b o a r d ' )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - c h a r t - p i e " > < / i >   D a s h b o a r d 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' c u s t o m e r s ' ,   ' c u s t o m e r _ a d d ' ,   ' c u s t o m e r _ e d i t ' ,   ' c u s t o m e r _ p r o f i l e ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - u s e r s " > < / i >   C u s t o m e r s 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c u s t o m e r s   W H E R E   c o m p a n y _ i d   =   ? " ,   [ $ c o m p a n y _ i d ] ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' o r d e r s ' ,   ' o r d e r _ a d d ' ,   ' o r d e r _ e d i t ' ,   ' o r d e r _ v i e w ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - s h o p p i n g - b a g " > < / i >   O r d e r s 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   N O T   I N   ( ' d e l i v e r e d ' , ' c a n c e l l e d ' ) " ,   [ $ c o m p a n y _ i d ] ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u t t i n g "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' c u t t i n g ' ,   ' c u t t i n g _ p e n d i n g ' ,   ' c u t t i n g _ a s s i g n e d ' ,   ' c u t t i n g _ r e p o r t ' ,   ' c u t t i n g _ s l i p ' ,   ' c u t t e r _ r e p o r t ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - c u t " > < / i >   C u t t i n g 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r _ s u i t s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' c u t t i n g ' " ,   [ $ c o m p a n y _ i d ] ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' s t i t c h i n g ' ,   ' s t i t c h i n g _ p e n d i n g ' ,   ' s t i t c h i n g _ a s s i g n e d ' ,   ' s t i t c h i n g _ r e p o r t ' ,   ' s t i t c h i n g _ s l i p ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - t s h i r t " > < / i >   S t i t c h i n g 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r _ s u i t s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' s t i t c h i n g ' " ,   [ $ c o m p a n y _ i d ] ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = d e l i v e r y "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' d e l i v e r y ' ,   ' d e l i v e r y _ d e l i v e r ' ,   ' d e l i v e r y _ s l i p ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - t r u c k " > < / i >   D e l i v e r y 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   o r d e r s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' r e a d y ' " ,   [ $ c o m p a n y _ i d ] ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = t r a c k "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( $ c u r r e n t _ a c t i o n   = =   ' t r a c k ' )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - s e a r c h - l o c a t i o n " > < / i >   T r a c k   O r d e r 
 
                                 < / a > 
 
                                 
 
                                 < d i v   c l a s s = " n a v - d i v i d e r " > < / d i v > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' e m p l o y e e s ' ,   ' e m p l o y e e _ a d d ' ,   ' e m p l o y e e _ e d i t ' ,   ' e m p l o y e e _ v i e w ' ,   ' e m p l o y e e _ c a t e g o r i e s ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - u s e r - t i e " > < / i >   E m p l o y e e s 
 
                                         < s p a n   c l a s s = " b a d g e " > < ? p h p   e c h o   g e t S a f e B a d g e C o u n t ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   e m p l o y e e s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' a c t i v e ' " ,   [ $ c o m p a n y _ i d ] ) ;   ? > < / s p a n > 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = l e d g e r s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( $ c u r r e n t _ a c t i o n   = =   ' l e d g e r s ' )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - b o o k " > < / i >   L e d g e r 
 
                                 < / a > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ l e d g e r _ s e a r c h "   c l a s s = " n a v - i t e m " > 
 
         < i   c l a s s = " f a s   f a - b o o k   m e - 2 " > < / i >   C u s t o m e r   L e d g e r   S e a r c h 
 
 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = r a t e s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( i n _ a r r a y ( $ c u r r e n t _ a c t i o n ,   [ ' r a t e s ' ,   ' r a t e _ a d d ' ,   ' r a t e _ e d i t ' ] ) )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - d o l l a r - s i g n " > < / i >   R a t e s 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = r e p o r t s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( $ c u r r e n t _ a c t i o n   = =   ' r e p o r t s ' )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - f i l e - a l t " > < / i >   R e p o r t s 
 
                                 < / a > 
 
                                 
 
                                 < d i v   c l a s s = " n a v - d i v i d e r " > < / d i v > 
 
                                 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s "   c l a s s = " n a v - i t e m   < ? p h p   e c h o   ( $ c u r r e n t _ a c t i o n   = =   ' s e t t i n g s ' )   ?   ' a c t i v e '   :   ' ' ;   ? > " > 
 
                                         < i   c l a s s = " f a s   f a - c o g " > < / i >   S e t t i n g s 
 
                                 < / a > 
 
                                 
 
                                 < a   h r e f = " l o g o u t . p h p "   c l a s s = " n a v - i t e m "   s t y l e = " c o l o r : # f f 6 b 6 b ; " > 
 
                                         < i   c l a s s = " f a s   f a - s i g n - o u t - a l t " > < / i >   L o g o u t 
 
                                 < / a > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                         
 
                 < / d i v > 
 
         < / n a v > 
 
         
 
         < ! - -   = = = = =   M A I N   C O N T E N T   = = = = =   - - > 
 
         < d i v   c l a s s = " m a i n - c o n t e n t " > 
 
                 
 
                 < ! - -   = = = = =   T O P   B A R   = = = = =   - - > 
 
                 < n a v   c l a s s = " t o p - b a r " > 
 
                         < d i v   c l a s s = " d - f l e x   a l i g n - i t e m s - c e n t e r "   s t y l e = " f l e x : 1 ; " > 
 
                                 < b u t t o n   c l a s s = " t o g g l e - s i d e b a r "   i d = " t o g g l e S i d e b a r B t n "   o n c l i c k = " t o g g l e S i d e b a r ( ) " > 
 
                                         < i   c l a s s = " f a s   f a - b a r s " > < / i > 
 
                                 < / b u t t o n > 
 
                                 
 
                                 < s p a n   c l a s s = " n a v b a r - b r a n d   d - l g - n o n e " > 
 
                                         < i   c l a s s = " f a s   f a - s c r o l l " > < / i > 
 
                                         < s p a n > B i z T e c h < / s p a n > 
 
                                 < / s p a n > 
 
                                 
 
                                 < d i v   c l a s s = " s e a r c h - c o n t a i n e r " > 
 
                                         < i   c l a s s = " f a s   f a - s e a r c h   s e a r c h - i c o n " > < / i > 
 
                                         < i n p u t   t y p e = " t e x t "   i d = " g l o b a l S e a r c h "   p l a c e h o l d e r = " S e a r c h   c u s t o m e r s ,   o r d e r s ,   e m p l o y e e s . . . "   a u t o c o m p l e t e = " o f f " > 
 
                                         < d i v   c l a s s = " s e a r c h - r e s u l t s "   i d = " s e a r c h R e s u l t s " > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         
 
                         < d i v   c l a s s = " n a v - i c o n s " > 
 
                                 < ! - -   = = = = =   N O T I F I C A T I O N   B E L L   = = = = =   - - > 
 
                                 < d i v   c l a s s = " d r o p d o w n " > 
 
                                         < b u t t o n   c l a s s = " i c o n - b t n "   i d = " n o t i f i c a t i o n B e l l "   d a t a - b s - t o g g l e = " d r o p d o w n "   a r i a - e x p a n d e d = " f a l s e "   t i t l e = " N o t i f i c a t i o n s   ( A l t + N ) " > 
 
                                                 < i   c l a s s = " f a s   f a - b e l l " > < / i > 
 
                                                 < s p a n   c l a s s = " b a d g e - d o t "   i d = " n o t i f i c a t i o n B a d g e " > < / s p a n > 
 
                                         < / b u t t o n > 
 
                                         < u l   c l a s s = " d r o p d o w n - m e n u   d r o p d o w n - m e n u - e n d   n o t i f i c a t i o n - d r o p d o w n "   i d = " n o t i f i c a t i o n L i s t " > 
 
                                                 < l i   c l a s s = " d r o p d o w n - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                                                         < s p a n > < i   c l a s s = " f a s   f a - b e l l   m e - 2 " > < / i > N o t i f i c a t i o n s < / s p a n > 
 
                                                         < b u t t o n   c l a s s = " b t n - m a r k - a l l "   i d = " m a r k A l l R e a d " > M a r k   a l l   r e a d < / b u t t o n > 
 
                                                 < / l i > 
 
                                                 < l i > < h r   c l a s s = " d r o p d o w n - d i v i d e r " > < / l i > 
 
                                                 < l i   c l a s s = " n o - n o t i f i c a t i o n s "   i d = " n o N o t i f i c a t i o n s " > 
 
                                                         < i   c l a s s = " f a s   f a - i n b o x " > < / i > 
 
                                                         N o   n e w   n o t i f i c a t i o n s 
 
                                                 < / l i > 
 
                                         < / u l > 
 
                                 < / d i v > 
 
                                 
 
                                 < d i v   c l a s s = " d r o p d o w n   u s e r - d r o p d o w n " > 
 
                                         < i m g   s r c = " < ? p h p   e c h o   $ p r o f i l e _ p i c ;   ? > "   
 
                                                   a l t = " U s e r "   
 
                                                   d a t a - b s - t o g g l e = " d r o p d o w n " 
 
                                                   o n e r r o r = " t h i s . s r c = ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = < ? p h p   e c h o   u r l e n c o d e ( $ f u l l _ n a m e ) ;   ? > & b a c k g r o u n d = 0 D 6 E F D & c o l o r = f f f & s i z e = 3 6 ' " > 
 
                                         < u l   c l a s s = " d r o p d o w n - m e n u   d r o p d o w n - m e n u - e n d " > 
 
                                                 < l i > < a   c l a s s = " d r o p d o w n - i t e m "   h r e f = " # " > < i   c l a s s = " f a s   f a - u s e r   m e - 2 " > < / i >   P r o f i l e < / a > < / l i > 
 
                                                 < l i > < a   c l a s s = " d r o p d o w n - i t e m "   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s " > < i   c l a s s = " f a s   f a - c o g   m e - 2 " > < / i >   S e t t i n g s < / a > < / l i > 
 
                                                 < l i > < h r   c l a s s = " d r o p d o w n - d i v i d e r " > < / l i > 
 
                                                 < l i > < a   c l a s s = " d r o p d o w n - i t e m   t e x t - d a n g e r "   h r e f = " l o g o u t . p h p " > < i   c l a s s = " f a s   f a - s i g n - o u t - a l t   m e - 2 " > < / i >   L o g o u t < / a > < / l i > 
 
                                         < / u l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / n a v > 
 
                 
 
                 < ! - -   = = = = =   P A G E   C O N T E N T   = = = = =   - - > 
 
                 < d i v   c l a s s = " p a g e - c o n t e n t " > 
 
 < ? p h p 
 
 / /     R            R   R        R         R  
 
 $ t r a n s a c t i o n s   =   $ t r a n s a c t i o n s   ? ?   [ ] ; 
 
 $ o p e n i n g _ b a l a n c e   =   $ o p e n i n g _ b a l a n c e   ? ?   0 ; 
 
 $ c l o s i n g _ b a l a n c e   =   $ c l o s i n g _ b a l a n c e   ? ?   0 ; 
 
 $ t o t a l _ d e b i t   =   $ t o t a l _ d e b i t   ? ?   0 ; 
 
 $ t o t a l _ c r e d i t   =   $ t o t a l _ c r e d i t   ? ?   0 ; 
 
 $ f r o m _ d a t e   =   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
 $ t o _ d a t e   =   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 ? > 
 
 
 
 < s t y l e > 
 
         . c a s h - l e d g e r - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . c a s h - l e d g e r - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 7 9 7 1 e   0 % ,   # f f d 2 0 0   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 6 p x   2 4 p x ; 
 
         } 
 
         . c a s h - l e d g e r - c a r d   . c a r d - h e a d e r   h 5   {   c o l o r :   # f f f ;   } 
 
         . c a s h - b a l a n c e - b o x   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 p a d d i n g :   1 2 p x   2 0 p x ; 
 
                 m a r g i n - b o t t o m :   1 6 p x ; 
 
                 b o r d e r - r i g h t :   4 p x   s o l i d   # f 7 9 7 1 e ; 
 
         } 
 
         . c a s h - b a l a n c e - b o x   . l a b e l   {   f o n t - s i z e :   1 2 p x ;   c o l o r :   # 6 c 7 5 7 d ;   f o n t - w e i g h t :   6 0 0 ;   } 
 
         . c a s h - b a l a n c e - b o x   . v a l u e   {   f o n t - s i z e :   1 8 p x ;   f o n t - w e i g h t :   7 0 0 ;   } 
 
         . c a s h - b a l a n c e - b o x   . v a l u e . p o s i t i v e   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . c a s h - b a l a n c e - b o x   . v a l u e . n e g a t i v e   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
         . c a s h - t a b l e   t h e a d   t h   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9 ; 
 
                 c o l o r :   # 2 d 3 7 4 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   1 0 p x   1 2 p x ; 
 
         } 
 
         . c a s h - t a b l e   t b o d y   t d   { 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
         } 
 
         . c a s h - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f f ; 
 
         } 
 
         . c a s h - t a b l e   t b o d y   t r . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . c a s h - t a b l e   t b o d y   t r . t o t a l - r o w   t d   { 
 
                 b o r d e r - t o p :   2 p x   s o l i d   # d e e 2 e 6 ; 
 
                 p a d d i n g :   1 0 p x   1 2 p x ; 
 
         } 
 
         . b t n - p r i n t - c a s h   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 c 7 5 7 d   0 % ,   # 4 9 5 0 5 7   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   2 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . b t n - p r i n t - c a s h : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s t a t u s - b a d g e - c a s h   { 
 
                 p a d d i n g :   3 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . s t a t u s - b a d g e - c a s h . d e b i t   {   b a c k g r o u n d :   # d 4 e d d a ;   c o l o r :   # 1 5 5 7 2 4 ;   } 
 
         . s t a t u s - b a d g e - c a s h . c r e d i t   {   b a c k g r o u n d :   # f 8 d 7 d a ;   c o l o r :   # 7 2 1 c 2 4 ;   } 
 
         . r e f e r e n c e - l i n k   { 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
         } 
 
         . r e f e r e n c e - l i n k : h o v e r   { 
 
                 t e x t - d e c o r a t i o n :   u n d e r l i n e ; 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   c a s h - l e d g e r - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < d i v > 
 
                         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e   m e - 2 " > < / i > C a s h   L e d g e r < / h 5 > 
 
                         < s m a l l   s t y l e = " o p a c i t y : 0 . 8 ; " > A l l   c a s h   t r a n s a c t i o n s   r e c o r d < / s m a l l > 
 
                 < / d i v > 
 
                 < d i v > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - p r i n t - c a s h "   o n c l i c k = " w i n d o w . o p e n ( ' i n d e x . p h p ? a c t i o n = p r i n t _ l e d g e r & t y p e = c a s h & f r o m _ d a t e = < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > & t o _ d a t e = < ? p h p   e c h o   $ t o _ d a t e ;   ? > ' ,   ' _ b l a n k ' ) " > 
 
                                 < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t 
 
                         < / b u t t o n > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   B A L A N C E   S U M M A R Y   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   g - 3   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " c a s h - b a l a n c e - b o x " > 
 
                                         < d i v   c l a s s = " l a b e l " > O p e n i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ o p e n i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o p e n i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " c a s h - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # 2 8 a 7 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   D e b i t   ( R e c e i v e d ) < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   p o s i t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " c a s h - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # d c 3 5 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   C r e d i t   ( P a i d ) < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   n e g a t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " c a s h - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' # 2 8 a 7 4 5 '   :   ' # d c 3 5 4 5 ' ;   ? > ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > C l o s i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   D A T E   F I L T E R   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " c a s h _ l e d g e r " > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2   d - f l e x   a l i g n - i t e m s - e n d " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > 
 
                                         < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r 
 
                                 < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ! - -   = = = = =   T R A N S A C T I O N S   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   c a s h - t a b l e   m b - 0 " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h > D a t e < / t h > 
 
                                                 < t h > D e s c r i p t i o n < / t h > 
 
                                                 < t h > R e f e r e n c e < / t h > 
 
                                                 < t h > T y p e < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > D e b i t   ( R e c e i v e d ) < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > C r e d i t   ( P a i d ) < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > B a l a n c e < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   c a s h   t r a n s a c t i o n s   f o u n d   f o r   t h i s   p e r i o d . < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                         < ? p h p 
 
                                                         $ r e f _ t y p e   =   u c f i r s t ( $ t [ ' r e f e r e n c e _ t y p e ' ]   ? ?   ' ' ) ; 
 
                                                         $ r e f _ l i n k   =   ' ' ; 
 
                                                         i f   ( $ t [ ' r e f e r e n c e _ t y p e ' ]   = =   ' a d v a n c e '   | |   $ t [ ' r e f e r e n c e _ t y p e ' ]   = =   ' d e l i v e r y '   | |   $ t [ ' r e f e r e n c e _ t y p e ' ]   = =   ' o r d e r ' )   { 
 
                                                                 $ r e f _ l i n k   =   ' i n d e x . p h p ? a c t i o n = o r d e r _ v i e w & i d = '   .   $ t [ ' r e f e r e n c e _ i d ' ] ; 
 
                                                         } 
 
                                                         ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ r e f _ l i n k ) :   ? > 
 
                                                                                 < a   h r e f = " < ? p h p   e c h o   $ r e f _ l i n k ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " r e f e r e n c e - l i n k " > 
 
                                                                                         # < ? p h p   e c h o   $ t [ ' r e f e r e n c e _ i d ' ] ;   ? > 
 
                                                                                 < / a > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 - 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e - c a s h   < ? p h p   e c h o   ( $ t [ ' d e b i t ' ]   ? ?   0 )   >   0   ?   ' d e b i t '   :   ' c r e d i t ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   ( $ t [ ' d e b i t ' ]   ? ?   0 )   >   0   ?   ' R e c e i v e d '   :   ' P a i d ' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   ( $ t [ ' d e b i t ' ]   ? ?   0 )   >   0   ?   n u m b e r _ f o r m a t ( $ t [ ' d e b i t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   ( $ t [ ' c r e d i t ' ]   ? ?   0 )   >   0   ?   n u m b e r _ f o r m a t ( $ t [ ' c r e d i t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   f w - b o l d   < ? p h p   e c h o   ( $ t [ ' r u n n i n g _ b a l a n c e ' ]   ? ?   0 )   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' r u n n i n g _ b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l s : < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   f w - b o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 / /     R            R   R        R         R  
 
 $ c u s t o m e r   =   $ c u s t o m e r   ? ?   n u l l ; 
 
 $ f r o m _ d a t e   =   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
 $ t o _ d a t e   =   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ t r a n s a c t i o n s   =   $ t r a n s a c t i o n s   ? ?   [ ] ; 
 
 $ o p e n i n g _ b a l a n c e   =   $ o p e n i n g _ b a l a n c e   ? ?   0 ; 
 
 $ c l o s i n g _ b a l a n c e   =   $ c l o s i n g _ b a l a n c e   ? ?   0 ; 
 
 $ t o t a l _ r e c e i v e d   =   $ t o t a l _ r e c e i v e d   ? ?   0 ; 
 
 $ t o t a l _ p a i d   =   $ t o t a l _ p a i d   ? ?   0 ; 
 
 $ b a l a n c e   =   $ b a l a n c e   ? ?   0 ; 
 
 ? > 
 
 
 
 < s t y l e > 
 
         . l e d g e r - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . l e d g e r - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 6 p x   2 4 p x ; 
 
         } 
 
         . l e d g e r - c a r d   . c a r d - h e a d e r   h 5   {   c o l o r :   # f f f ;   } 
 
         . l e d g e r - b a l a n c e - b o x   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 p a d d i n g :   1 2 p x   2 0 p x ; 
 
                 m a r g i n - b o t t o m :   1 6 p x ; 
 
                 b o r d e r - r i g h t :   4 p x   s o l i d   # 2 5 6 3 e b ; 
 
         } 
 
         . l e d g e r - b a l a n c e - b o x   . l a b e l   {   f o n t - s i z e :   1 2 p x ;   c o l o r :   # 6 c 7 5 7 d ;   f o n t - w e i g h t :   6 0 0 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e   {   f o n t - s i z e :   1 8 p x ;   f o n t - w e i g h t :   7 0 0 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e . p o s i t i v e   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e . n e g a t i v e   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
         . l e d g e r - t a b l e   t h e a d   t h   { 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   8 p x   1 0 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t d   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f f ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r . t o t a l - r o w   t d   { 
 
                 b o r d e r - t o p :   2 p x   s o l i d   # d e e 2 e 6 ; 
 
                 p a d d i n g :   1 0 p x   1 2 p x ; 
 
         } 
 
         . b t n - r e c e i v e   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 8 a 7 4 5   0 % ,   # 2 0 c 9 9 7   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   2 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 3 ) ; 
 
         } 
 
         . b t n - r e c e i v e : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 6 ) ,   0   4 p x   1 5 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - p r i n t   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 c 7 5 7 d   0 % ,   # 4 9 5 0 5 7   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   2 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 3 ) ; 
 
         } 
 
         . b t n - p r i n t : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 6 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s t a t u s - b a d g e   { 
 
                 p a d d i n g :   4 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . s t a t u s - b a d g e . r e c e i v e   {   b a c k g r o u n d :   # d 4 e d d a ;   c o l o r :   # 1 5 5 7 2 4 ;   } 
 
         . s t a t u s - b a d g e . p a y   {   b a c k g r o u n d :   # f 8 d 7 d a ;   c o l o r :   # 7 2 1 c 2 4 ;   } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . l e d g e r - t a b l e   t h e a d   t h ,   . l e d g e r - t a b l e   t b o d y   t d   { 
 
                         p a d d i n g :   4 p x   6 p x ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         w h i t e - s p a c e :   n o r m a l ; 
 
                 } 
 
                 . l e d g e r - b a l a n c e - b o x   . v a l u e   {   f o n t - s i z e :   1 5 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   l e d g e r - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < d i v > 
 
                         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r   m e - 2 " > < / i > C u s t o m e r   L e d g e r < / h 5 > 
 
                         < s m a l l   s t y l e = " o p a c i t y : 0 . 8 ; " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? >   ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' c u s t o m e r _ n o ' ]   ? ?   ' N / A ' ) ;   ? > ) < / s m a l l > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 2 " > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - r e c e i v e "   d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # r e c e i v e M o d a l " > 
 
                                 < i   c l a s s = " f a s   f a - h a n d - h o l d i n g - u s d   m e - 1 " > < / i >   R e c e i v e   P a y m e n t 
 
                         < / b u t t o n > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - p r i n t "   o n c l i c k = " w i n d o w . o p e n ( ' i n d e x . p h p ? a c t i o n = p r i n t _ l e d g e r & t y p e = c u s t o m e r & i d = < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ]   ? ?   0 ;   ? > & f r o m _ d a t e = < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > & t o _ d a t e = < ? p h p   e c h o   $ t o _ d a t e ;   ? > ' ,   ' _ b l a n k ' ) " > 
 
                                 < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t 
 
                         < / b u t t o n > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   B A L A N C E   S U M M A R Y   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   g - 3   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x " > 
 
                                         < d i v   c l a s s = " l a b e l " > O p e n i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ o p e n i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o p e n i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # 2 8 a 7 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   R e c e i v e d < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   p o s i t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e c e i v e d ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # d c 3 5 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   P a i d < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   n e g a t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' # 2 8 a 7 4 5 '   :   ' # d c 3 5 4 5 ' ;   ? > ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > C l o s i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   D A T E   F I L T E R   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " c u s t o m e r _ l e d g e r " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " i d "   v a l u e = " < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ]   ? ?   0 ;   ? > " > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2   d - f l e x   a l i g n - i t e m s - e n d " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   s t y l e = " b o x - s h a d o w : 0   0   1 2 p x   r g b a ( 3 7 , 9 9 , 2 3 5 , 0 . 3 ) ;   t r a n s i t i o n : a l l   0 . 3 s ; " > 
 
                                         < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r 
 
                                 < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ! - -   = = = = =   T R A N S A C T I O N S   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   l e d g e r - t a b l e   m b - 0 " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r   # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 8 % ; " > D e s c r i p t i o n < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > T y p e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 3 % ; "   c l a s s = " t e x t - e n d " > D e b i t   ( P a y ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 3 % ; "   c l a s s = " t e x t - e n d " > C r e d i t   ( R e c e i v e ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; "   c l a s s = " t e x t - e n d " > B a l a n c e < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   t r a n s a c t i o n s   f o u n d   f o r   t h i s   p e r i o d . < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' o r d e r _ n o ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e   < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   ' r e c e i v e '   :   ' p a y ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   ' R e c e i v e '   :   ' P a y ' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > 
 
                                                                         < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' p a y '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > 
 
                                                                         < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   f w - b o l d   < ? p h p   e c h o   $ t [ ' r u n n i n g _ b a l a n c e ' ]   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' r u n n i n g _ b a l a n c e ' ] ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l s : < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e c e i v e d ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   f w - b o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   R E C E I V E   P A Y M E N T   M O D A L   = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " r e c e i v e M o d a l "   t a b i n d e x = " - 1 " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - d i a l o g - c e n t e r e d " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t " > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = r e c e i v e _ p a y m e n t " > 
 
                                 < d i v   c l a s s = " m o d a l - h e a d e r   b g - s u c c e s s   t e x t - w h i t e " > 
 
                                         < h 6   c l a s s = " m o d a l - t i t l e   f w - b o l d " > < i   c l a s s = " f a s   f a - h a n d - h o l d i n g - u s d   m e - 2 " > < / i > R e c e i v e   P a y m e n t < / h 6 > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " c u s t o m e r _ i d "   v a l u e = " < ? p h p   e c h o   $ c u s t o m e r [ ' i d ' ]   ? ?   0 ;   ? > " > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u s t o m e r < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > "   r e a d o n l y > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u r r e n t   B a l a n c e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e ,   0 ) ;   ? > "   r e a d o n l y > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A m o u n t   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " a m o u n t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   
 
                                                               p l a c e h o l d e r = " E n t e r   a m o u n t . . . "   r e q u i r e d   m i n = " 0 . 0 1 " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P a y m e n t   M e t h o d < / l a b e l > 
 
                                                 < s e l e c t   n a m e = " m e t h o d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                         < o p t i o n   v a l u e = " c a s h " > C a s h < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " b a n k " > B a n k   T r a n s f e r < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " o n l i n e " > O n l i n e < / o p t i o n > 
 
                                                 < / s e l e c t > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T r a n s a c t i o n   D a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " d a t e "   n a m e = " t r a n s a c t i o n _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N o t e s < / l a b e l > 
 
                                                 < t e x t a r e a   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r o w s = " 2 "   p l a c e h o l d e r = " P a y m e n t   r e m a r k s . . . " > < / t e x t a r e a > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C a n c e l < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l " > 
 
                                                 < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   C o n f i r m   P a y m e n t 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p 
 
 / /     R            R   R   
 
 $ c u s t o m e r _ i d   =   $ c u s t o m e r _ i d   ? ?   0 ; 
 
 $ f r o m _ d a t e   =   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
 $ t o _ d a t e   =   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ c u s t o m e r s   =   $ c u s t o m e r s   ? ?   [ ] ; 
 
 $ c u s t o m e r   =   $ c u s t o m e r   ? ?   n u l l ; 
 
 $ t r a n s a c t i o n s   =   $ t r a n s a c t i o n s   ? ?   [ ] ; 
 
 $ o p e n i n g _ b a l a n c e   =   $ o p e n i n g _ b a l a n c e   ? ?   0 ; 
 
 $ c l o s i n g _ b a l a n c e   =   $ c l o s i n g _ b a l a n c e   ? ?   0 ; 
 
 $ t o t a l _ r e c e i v e d   =   $ t o t a l _ r e c e i v e d   ? ?   0 ; 
 
 $ t o t a l _ p a i d   =   $ t o t a l _ p a i d   ? ?   0 ; 
 
 $ b a l a n c e   =   $ b a l a n c e   ? ?   0 ; 
 
 ? > 
 
 
 
 < s t y l e > 
 
         . l e d g e r - s e a r c h - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . l e d g e r - s e a r c h - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 6 p x   2 4 p x ; 
 
         } 
 
         . l e d g e r - s e a r c h - c a r d   . c a r d - h e a d e r   h 5   {   c o l o r :   # f f f ;   } 
 
         . l e d g e r - s e a r c h - c a r d   . c a r d - b o d y   {   p a d d i n g :   2 0 p x ;   b a c k g r o u n d :   # f 8 f a f c ;   } 
 
         . l e d g e r - s e a r c h - c a r d   . f i l t e r - f o r m   . f o r m - c o n t r o l , 
 
         . l e d g e r - s e a r c h - c a r d   . f i l t e r - f o r m   . f o r m - s e l e c t   { 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
         } 
 
         . l e d g e r - s e a r c h - c a r d   . f i l t e r - f o r m   . f o r m - c o n t r o l : f o c u s , 
 
         . l e d g e r - s e a r c h - c a r d   . f i l t e r - f o r m   . f o r m - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - s e a r c h   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   8 p x   2 8 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 h e i g h t :   4 2 p x ; 
 
         } 
 
         . b t n - s e a r c h : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - p r i n t   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 c 7 5 7 d   0 % ,   # 4 9 5 0 5 7   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   2 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 3 ) ; 
 
         } 
 
         . b t n - p r i n t : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 6 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . l e d g e r - b a l a n c e - b o x   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 p a d d i n g :   1 2 p x   2 0 p x ; 
 
                 b o r d e r - r i g h t :   4 p x   s o l i d   # 2 5 6 3 e b ; 
 
         } 
 
         . l e d g e r - b a l a n c e - b o x   . l a b e l   {   f o n t - s i z e :   1 2 p x ;   c o l o r :   # 6 c 7 5 7 d ;   f o n t - w e i g h t :   6 0 0 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e   {   f o n t - s i z e :   1 8 p x ;   f o n t - w e i g h t :   7 0 0 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e . p o s i t i v e   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e . n e g a t i v e   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
 
 
         . l e d g e r - t a b l e   t h e a d   t h   { 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   8 p x   1 0 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t d   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f f ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r . t o t a l - r o w   t d   { 
 
                 b o r d e r - t o p :   2 p x   s o l i d   # d e e 2 e 6 ; 
 
                 p a d d i n g :   1 0 p x   1 2 p x ; 
 
         } 
 
         . s t a t u s - b a d g e   { 
 
                 p a d d i n g :   4 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . s t a t u s - b a d g e . r e c e i v e   {   b a c k g r o u n d :   # d 4 e d d a ;   c o l o r :   # 1 5 5 7 2 4 ;   } 
 
         . s t a t u s - b a d g e . p a y   {   b a c k g r o u n d :   # f 8 d 7 d a ;   c o l o r :   # 7 2 1 c 2 4 ;   } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   4 0 p x   0 ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 8 p x ; 
 
                 c o l o r :   # d 1 d 5 d b ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 2 p x ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . l e d g e r - t a b l e   t h e a d   t h ,   . l e d g e r - t a b l e   t b o d y   t d   { 
 
                         p a d d i n g :   4 p x   6 p x ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         w h i t e - s p a c e :   n o r m a l ; 
 
                 } 
 
                 . l e d g e r - b a l a n c e - b o x   . v a l u e   {   f o n t - s i z e :   1 5 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   l e d g e r - s e a r c h - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 " > < / i > C u s t o m e r   L e d g e r   S e a r c h < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   F O R M   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - f o r m   r o w   g - 3   m b - 4 " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " c u s t o m e r _ l e d g e r _ s e a r c h " > 
 
 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S e l e c t   C u s t o m e r   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                 < s e l e c t   n a m e = " c u s t o m e r _ i d "   c l a s s = " f o r m - s e l e c t "   r e q u i r e d > 
 
                                         < o p t i o n   v a l u e = " " > - -   S e l e c t   C u s t o m e r   - - < / o p t i o n > 
 
                                         < ? p h p   f o r e a c h   ( $ c u s t o m e r s   a s   $ c ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ c u s t o m e r _ i d   = =   $ c [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' c u s t o m e r _ n o ' ]   .   '   -   '   .   $ c [ ' n a m e ' ] ) ;   ? > 
 
                                                 < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > F r o m   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > T o   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " c o l - m d - 2   d - f l e x   a l i g n - i t e m s - e n d " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s e a r c h   w - 1 0 0 " > 
 
                                         < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   S e a r c h 
 
                                 < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ? p h p   i f   ( $ c u s t o m e r _ i d   >   0   & &   $ c u s t o m e r ) :   ? > 
 
 
 
                 < ! - -   = = = = =   C U S T O M E R   I N F O   = = = = =   - - > 
 
                 < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 2   m b - 3 "   s t y l e = " b o r d e r - l e f t : 4 p x   s o l i d   # 2 5 6 3 e b ; " > 
 
                         < s t r o n g > < i   c l a s s = " f a s   f a - u s e r   m e - 2 " > < / i >   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ] ) ;   ? > < / s t r o n g > 
 
                         ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' c u s t o m e r _ n o ' ] ) ;   ? > ) 
 
                         < s p a n   c l a s s = " m s - 3 " > < i   c l a s s = " f a s   f a - p h o n e   m e - 1 " > < / i >   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > 
 
                         < s p a n   c l a s s = " m s - 3 " > < i   c l a s s = " f a s   f a - w a l l e t   m e - 1 " > < / i >   T o t a l   B a l a n c e :   < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e ,   0 ) ;   ? > < / s t r o n g > < / s p a n > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   B A L A N C E   S U M M A R Y   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   g - 3   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x " > 
 
                                         < d i v   c l a s s = " l a b e l " > O p e n i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ o p e n i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o p e n i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # 2 8 a 7 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   R e c e i v e d < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   p o s i t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e c e i v e d ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # d c 3 5 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   P a i d < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   n e g a t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' # 2 8 a 7 4 5 '   :   ' # d c 3 5 4 5 ' ;   ? > ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > C l o s i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   P R I N T   B U T T O N   = = = = =   - - > 
 
                 < d i v   c l a s s = " t e x t - e n d   m b - 2 " > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - p r i n t "   o n c l i c k = " w i n d o w . o p e n ( ' i n d e x . p h p ? a c t i o n = p r i n t _ l e d g e r & t y p e = c u s t o m e r & i d = < ? p h p   e c h o   $ c u s t o m e r _ i d ;   ? > & f r o m _ d a t e = < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > & t o _ d a t e = < ? p h p   e c h o   $ t o _ d a t e ;   ? > ' ,   ' _ b l a n k ' ) " > 
 
                                 < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t 
 
                         < / b u t t o n > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   T R A N S A C T I O N S   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   l e d g e r - t a b l e   m b - 0 " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r   # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 8 % ; " > D e s c r i p t i o n < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > T y p e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 3 % ; "   c l a s s = " t e x t - e n d " > D e b i t   ( P a y ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 3 % ; "   c l a s s = " t e x t - e n d " > C r e d i t   ( R e c e i v e ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; "   c l a s s = " t e x t - e n d " > B a l a n c e < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 7 " > 
 
                                                                 < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                                                         < i   c l a s s = " f a s   f a - i n b o x " > < / i > 
 
                                                                         N o   t r a n s a c t i o n s   f o u n d   f o r   t h i s   p e r i o d . 
 
                                                                 < / d i v > 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' o r d e r _ n o ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e   < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   ' r e c e i v e '   :   ' p a y ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   ' R e c e i v e '   :   ' P a y ' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > 
 
                                                                         < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' p a y '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > 
 
                                                                         < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   f w - b o l d   < ? p h p   e c h o   $ t [ ' r u n n i n g _ b a l a n c e ' ]   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' r u n n i n g _ b a l a n c e ' ] ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l s : < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e c e i v e d ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   f w - b o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   e l s e i f   ( $ c u s t o m e r _ i d   >   0   & &   ! $ c u s t o m e r ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r " > C u s t o m e r   n o t   f o u n d . < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( $ c u s t o m e r _ i d   = =   0 ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - s e a r c h " > < / i > 
 
                                 < p > P l e a s e   s e l e c t   a   c u s t o m e r   a n d   d a t e   r a n g e   t o   v i e w   l e d g e r . < / p > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r s   m e - 2   t e x t - p r i m a r y " > < / i > C u s t o m e r   L e d g e r < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = l e d g e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ! - -   = = = = =   S M A R T   S E A R C H   B A R   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 6   c o l - l g - 5 " > 
 
                                 < d i v   c l a s s = " i n p u t - g r o u p " > 
 
                                         < s p a n   c l a s s = " i n p u t - g r o u p - t e x t   b g - w h i t e " > < i   c l a s s = " f a s   f a - s e a r c h   t e x t - p r i m a r y " > < / i > < / s p a n > 
 
                                         < i n p u t   t y p e = " t e x t "   i d = " s m a r t S e a r c h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   
 
                                                       p l a c e h o l d e r = " L i v e   S e a r c h :   N a m e ,   P h o n e ,   C u s t o m e r   # . . . "   
 
                                                       a u t o c o m p l e t e = " o f f " > 
 
                                         < b u t t o n   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y   b t n - s m "   t y p e = " b u t t o n "   i d = " c l e a r S e a r c h "   t i t l e = " C l e a r   S e a r c h " > 
 
                                                 < i   c l a s s = " f a s   f a - t i m e s " > < / i > 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d "   i d = " s e a r c h S t a t u s " > 
 
                                         < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                         T y p e   t o   s e a r c h   c u s t o m e r s . . . 
 
                                 < / s m a l l > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 6   c o l - l g - 7   t e x t - e n d " > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > T o t a l   C u s t o m e r s :   < s t r o n g   i d = " t o t a l C o u n t " > < ? p h p   e c h o   c o u n t ( $ c u s t o m e r s ) ;   ? > < / s t r o n g > < / s m a l l > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e "   i d = " c u s t o m e r T a b l e " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > C u s t o m e r   # < / t h > 
 
                                                 < t h > N a m e < / t h > 
 
                                                 < t h > P h o n e < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > B a l a n c e   ( R s . ) < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y   i d = " c u s t o m e r B o d y " > 
 
                                         < ? p h p   i f   ( e m p t y ( $ c u s t o m e r s ) ) :   ? > 
 
                                                 < t r   i d = " n o R e s u l t " > 
 
                                                         < t d   c o l s p a n = " 5 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   c u s t o m e r s   f o u n d . < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ c u s t o m e r s   a s   $ c ) :   ? > 
 
                                                         < t r   d a t a - n a m e = " < ? p h p   e c h o   s t r t o l o w e r ( $ c [ ' n a m e ' ] ) ;   ? > "   
 
                                                                 d a t a - p h o n e = " < ? p h p   e c h o   s t r t o l o w e r ( $ c [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > "   
 
                                                                 d a t a - c u s t o m e r _ n o = " < ? p h p   e c h o   s t r t o l o w e r ( $ c [ ' c u s t o m e r _ n o ' ] ) ;   ? > " > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' c u s t o m e r _ n o ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ l e d g e r & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   c l a s s = " t e x t - d e c o r a t i o n - n o n e   f w - b o l d " > 
 
                                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   < ? p h p   e c h o   ( $ c [ ' b a l a n c e ' ]   ? ?   0 )   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c [ ' b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ l e d g e r & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   
 
                                                                               c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > 
 
                                                                                 < i   c l a s s = " f a s   f a - b o o k   m e - 1 " > < / i >   V i e w   L e d g e r 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 ( f u n c t i o n ( )   { 
 
         ' u s e   s t r i c t ' ; 
 
 
 
         c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s m a r t S e a r c h ' ) ; 
 
         c o n s t   c l e a r B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c l e a r S e a r c h ' ) ; 
 
         c o n s t   t a b l e B o d y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r B o d y ' ) ; 
 
         c o n s t   t o t a l C o u n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' t o t a l C o u n t ' ) ; 
 
         c o n s t   s e a r c h S t a t u s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h S t a t u s ' ) ; 
 
         l e t   s e a r c h T i m e o u t   =   n u l l ; 
 
 
 
         / /   A l l   r o w s   d a t a 
 
         c o n s t   a l l R o w s   =   A r r a y . f r o m ( d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # c u s t o m e r B o d y   t r : n o t ( # n o R e s u l t ) ' ) ) ; 
 
 
 
         / /   = = = = =   S M A R T   S E A R C H   F U N C T I O N   = = = = = 
 
         f u n c t i o n   p e r f o r m S e a r c h ( q u e r y )   { 
 
                 c o n s t   t r i m m e d   =   q u e r y . t r i m ( ) . t o L o w e r C a s e ( ) ; 
 
                 l e t   v i s i b l e C o u n t   =   0 ; 
 
                 l e t   h t m l   =   ' ' ; 
 
 
 
                 i f   ( t r i m m e d   = = =   ' ' )   { 
 
                         / /   S h o w   a l l   r o w s 
 
                         a l l R o w s . f o r E a c h ( r o w   = >   { 
 
                                 r o w . s t y l e . d i s p l a y   =   ' ' ; 
 
                                 v i s i b l e C o u n t + + ; 
 
                         } ) ; 
 
                         s e a r c h S t a t u s . i n n e r H T M L   =   ' < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i >   T y p e   t o   s e a r c h   c u s t o m e r s . . . ' ; 
 
                         t o t a l C o u n t . t e x t C o n t e n t   =   v i s i b l e C o u n t ; 
 
                         r e t u r n ; 
 
                 } 
 
 
 
                 / /   F i l t e r   r o w s 
 
                 a l l R o w s . f o r E a c h ( r o w   = >   { 
 
                         c o n s t   n a m e   =   r o w . d a t a s e t . n a m e   | |   ' ' ; 
 
                         c o n s t   p h o n e   =   r o w . d a t a s e t . p h o n e   | |   ' ' ; 
 
                         c o n s t   c u s t o m e r N o   =   r o w . d a t a s e t . c u s t o m e r _ n o   | |   ' ' ; 
 
                         
 
                         i f   ( n a m e . i n c l u d e s ( t r i m m e d )   | |   p h o n e . i n c l u d e s ( t r i m m e d )   | |   c u s t o m e r N o . i n c l u d e s ( t r i m m e d ) )   { 
 
                                 r o w . s t y l e . d i s p l a y   =   ' ' ; 
 
                                 v i s i b l e C o u n t + + ; 
 
                         }   e l s e   { 
 
                                 r o w . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         } 
 
                 } ) ; 
 
 
 
                 / /   U p d a t e   s t a t u s 
 
                 i f   ( v i s i b l e C o u n t   = = =   0 )   { 
 
                         / /   C h e c k   i f   n o R e s u l t   r o w   e x i s t s ,   i f   n o t   a d d   i t 
 
                         i f   ( ! d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) )   { 
 
                                 c o n s t   t r   =   d o c u m e n t . c r e a t e E l e m e n t ( ' t r ' ) ; 
 
                                 t r . i d   =   ' n o R e s u l t ' ; 
 
                                 t r . i n n e r H T M L   =   ` < t d   c o l s p a n = " 5 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                         N o   c u s t o m e r s   f o u n d   m a t c h i n g   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " . 
 
                                 < / t d > ` ; 
 
                                 t a b l e B o d y . a p p e n d C h i l d ( t r ) ; 
 
                         }   e l s e   { 
 
                                 d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) . s t y l e . d i s p l a y   =   ' ' ; 
 
                                 d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) . i n n e r H T M L   =   ` < t d   c o l s p a n = " 5 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                         N o   c u s t o m e r s   f o u n d   m a t c h i n g   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " . 
 
                                 < / t d > ` ; 
 
                         } 
 
                         s e a r c h S t a t u s . i n n e r H T M L   =   ` < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i >   N o   r e s u l t s   f o r   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " ` ; 
 
                 }   e l s e   { 
 
                         / /   R e m o v e   n o R e s u l t   r o w   i f   e x i s t s 
 
                         c o n s t   n o R e s u l t   =   d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) ; 
 
                         i f   ( n o R e s u l t )   n o R e s u l t . r e m o v e ( ) ; 
 
                         s e a r c h S t a t u s . i n n e r H T M L   =   ` < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # 2 8 a 7 4 5 ; " > < / i >   S h o w i n g   < s t r o n g > $ { v i s i b l e C o u n t } < / s t r o n g >   r e s u l t s   f o r   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " ` ; 
 
                 } 
 
 
 
                 t o t a l C o u n t . t e x t C o n t e n t   =   v i s i b l e C o u n t ; 
 
         } 
 
 
 
         / /   = = = = =   E S C A P E   H T M L   = = = = = 
 
         f u n c t i o n   e s c a p e H t m l ( t e x t )   { 
 
                 i f   ( ! t e x t )   r e t u r n   ' ' ; 
 
                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                 d i v . t e x t C o n t e n t   =   t e x t ; 
 
                 r e t u r n   d i v . i n n e r H T M L ; 
 
         } 
 
 
 
         / /   = = = = =   S E A R C H   I N P U T   E V E N T   ( w i t h   d e b o u n c e )   = = = = = 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                 c o n s t   q u e r y   =   t h i s . v a l u e ; 
 
                 i f   ( q u e r y . t r i m ( )   = = =   ' '   & &   q u e r y . l e n g t h   >   0 )   { 
 
                         / /   O n l y   s p a c e s ,   d o   n o t h i n g 
 
                         r e t u r n ; 
 
                 } 
 
                 i f   ( s e a r c h T i m e o u t )   { 
 
                         c l e a r T i m e o u t ( s e a r c h T i m e o u t ) ; 
 
                 } 
 
                 s e a r c h T i m e o u t   =   s e t T i m e o u t ( f u n c t i o n ( )   { 
 
                         p e r f o r m S e a r c h ( q u e r y ) ; 
 
                 } ,   2 0 0 ) ;   / /   2 0 0 m s   d e b o u n c e   f o r   s m o o t h   e x p e r i e n c e 
 
         } ) ; 
 
 
 
         / /   = = = = =   C L E A R   S E A R C H   = = = = = 
 
         c l e a r B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 s e a r c h I n p u t . v a l u e   =   ' ' ; 
 
                 p e r f o r m S e a r c h ( ' ' ) ; 
 
                 s e a r c h I n p u t . f o c u s ( ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   K E Y B O A R D   S H O R T C U T :   E S C   t o   c l e a r   = = = = = 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( e . k e y   = = =   ' E s c a p e ' )   { 
 
                         t h i s . v a l u e   =   ' ' ; 
 
                         p e r f o r m S e a r c h ( ' ' ) ; 
 
                         t h i s . b l u r ( ) ; 
 
                 } 
 
         } ) ; 
 
 
 
         / /   = = = = =   F O C U S :   s e l e c t   a l l   t e x t   = = = = = 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' f o c u s ' ,   f u n c t i o n ( )   { 
 
                 t h i s . s e l e c t ( ) ; 
 
         } ) ; 
 
 
 
 } ) ( ) ; 
 
 < / s c r i p t > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 / /   = = = = =     R            R   R        R         R    = = = = = 
 
 $ e m p l o y e e   =   $ e m p l o y e e   ? ?   n u l l ; 
 
 $ f r o m _ d a t e   =   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
 $ t o _ d a t e   =   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ t r a n s a c t i o n s   =   $ t r a n s a c t i o n s   ? ?   [ ] ; 
 
 $ o p e n i n g _ b a l a n c e   =   $ o p e n i n g _ b a l a n c e   ? ?   0 ; 
 
 $ c l o s i n g _ b a l a n c e   =   $ c l o s i n g _ b a l a n c e   ? ?   0 ; 
 
 $ t o t a l _ c r e d i t   =   $ t o t a l _ c r e d i t   ? ?   0 ; 
 
 $ t o t a l _ d e b i t   =   $ t o t a l _ d e b i t   ? ?   0 ; 
 
 $ b a l a n c e   =   $ b a l a n c e   ? ?   [ ' b a l a n c e '   = >   0 ] ; 
 
 ? > 
 
 
 
 < s t y l e > 
 
         . l e d g e r - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . l e d g e r - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 6 p x   2 4 p x ; 
 
         } 
 
         . l e d g e r - c a r d   . c a r d - h e a d e r   h 5   {   c o l o r :   # f f f ;   } 
 
         . l e d g e r - b a l a n c e - b o x   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 p a d d i n g :   1 2 p x   2 0 p x ; 
 
                 m a r g i n - b o t t o m :   1 6 p x ; 
 
                 b o r d e r - r i g h t :   4 p x   s o l i d   # 1 1 9 9 8 e ; 
 
         } 
 
         . l e d g e r - b a l a n c e - b o x   . l a b e l   {   f o n t - s i z e :   1 2 p x ;   c o l o r :   # 6 c 7 5 7 d ;   f o n t - w e i g h t :   6 0 0 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e   {   f o n t - s i z e :   1 8 p x ;   f o n t - w e i g h t :   7 0 0 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e . p o s i t i v e   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . l e d g e r - b a l a n c e - b o x   . v a l u e . n e g a t i v e   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
         . l e d g e r - t a b l e   t h e a d   t h   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9 ; 
 
                 c o l o r :   # 2 d 3 7 4 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   1 0 p x   1 2 p x ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t d   { 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f f ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # f 8 f 9 f a   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . l e d g e r - t a b l e   t b o d y   t r . t o t a l - r o w   t d   { 
 
                 b o r d e r - t o p :   2 p x   s o l i d   # d e e 2 e 6 ; 
 
                 p a d d i n g :   1 0 p x   1 2 p x ; 
 
         } 
 
         . b t n - p a y   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # d c 3 5 4 5   0 % ,   # c 8 2 3 3 3   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   2 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . b t n - p a y : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 2 0 ,   5 3 ,   6 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - p r i n t   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 c 7 5 7 d   0 % ,   # 4 9 5 0 5 7   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   6 p x   2 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . b t n - p r i n t : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s t a t u s - b a d g e   { 
 
                 p a d d i n g :   4 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . s t a t u s - b a d g e . c r e d i t   {   b a c k g r o u n d :   # d 4 e d d a ;   c o l o r :   # 1 5 5 7 2 4 ;   } 
 
         . s t a t u s - b a d g e . d e b i t   {   b a c k g r o u n d :   # f 8 d 7 d a ;   c o l o r :   # 7 2 1 c 2 4 ;   } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   l e d g e r - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < d i v > 
 
                         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 2 " > < / i > E m p l o y e e   L e d g e r < / h 5 > 
 
                         < s m a l l   s t y l e = " o p a c i t y : 0 . 8 ; " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? >   ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' e m p _ c o d e ' ]   ? ?   ' N / A ' ) ;   ? > ) < / s m a l l > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 2 " > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - p a y "   d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # p a y m e n t M o d a l " > 
 
                                 < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e   m e - 1 " > < / i >   M a k e   P a y m e n t 
 
                         < / b u t t o n > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - p r i n t "   o n c l i c k = " w i n d o w . o p e n ( ' i n d e x . p h p ? a c t i o n = p r i n t _ l e d g e r & t y p e = e m p l o y e e & i d = < ? p h p   e c h o   $ e m p l o y e e [ ' i d ' ]   ? ?   0 ;   ? > & f r o m _ d a t e = < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > & t o _ d a t e = < ? p h p   e c h o   $ t o _ d a t e ;   ? > ' ,   ' _ b l a n k ' ) " > 
 
                                 < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t 
 
                         < / b u t t o n > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   B A L A N C E   S U M M A R Y   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   g - 3   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x " > 
 
                                         < d i v   c l a s s = " l a b e l " > O p e n i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ o p e n i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o p e n i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # 2 8 a 7 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   C r e d i t < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   p o s i t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   # d c 3 5 4 5 ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   D e b i t < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   n e g a t i v e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < d i v   c l a s s = " l e d g e r - b a l a n c e - b o x "   s t y l e = " b o r d e r - r i g h t - c o l o r :   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' # 2 8 a 7 4 5 '   :   ' # d c 3 5 4 5 ' ;   ? > ; " > 
 
                                         < d i v   c l a s s = " l a b e l " > C l o s i n g   B a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " v a l u e   < ? p h p   e c h o   $ c l o s i n g _ b a l a n c e   > =   0   ?   ' p o s i t i v e '   :   ' n e g a t i v e ' ;   ? > " > 
 
                                                 R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   D A T E   F I L T E R   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " e m p l o y e e _ l e d g e r " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " i d "   v a l u e = " < ? p h p   e c h o   $ e m p l o y e e [ ' i d ' ]   ? ?   0 ;   ? > " > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2   d - f l e x   a l i g n - i t e m s - e n d " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > 
 
                                         < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r 
 
                                 < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ! - -   = = = = =   T R A N S A C T I O N S   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   l e d g e r - t a b l e   m b - 0 " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h > D a t e < / t h > 
 
                                                 < t h > O r d e r   # < / t h > 
 
                                                 < t h > D e s c r i p t i o n < / t h > 
 
                                                 < t h > T y p e < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > D e b i t < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > C r e d i t < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > B a l a n c e < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   t r a n s a c t i o n s   f o u n d   f o r   t h i s   p e r i o d . < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' o r d e r _ n o ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e   < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' c r e d i t '   ?   ' c r e d i t '   :   ' d e b i t ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' c r e d i t '   ?   ' C r e d i t '   :   ' D e b i t ' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' d e b i t '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' c r e d i t '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   f w - b o l d   < ? p h p   e c h o   $ t [ ' r u n n i n g _ b a l a n c e ' ]   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' r u n n i n g _ b a l a n c e ' ] ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l s : < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   f w - b o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   P A Y M E N T   M O D A L   = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " p a y m e n t M o d a l "   t a b i n d e x = " - 1 " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - d i a l o g - c e n t e r e d " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t " > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ p a y m e n t " > 
 
                                 < d i v   c l a s s = " m o d a l - h e a d e r   b g - d a n g e r   t e x t - w h i t e " > 
 
                                         < h 6   c l a s s = " m o d a l - t i t l e   f w - b o l d " > < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e   m e - 2 " > < / i > M a k e   P a y m e n t < / h 6 > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " e m p l o y e e _ i d "   v a l u e = " < ? p h p   e c h o   $ e m p l o y e e [ ' i d ' ]   ? ?   0 ;   ? > " > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > E m p l o y e e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > "   r e a d o n l y > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u r r e n t   B a l a n c e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ b a l a n c e [ ' b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > "   r e a d o n l y > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A m o u n t   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " a m o u n t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   
 
                                                               p l a c e h o l d e r = " E n t e r   a m o u n t . . . "   r e q u i r e d   m i n = " 0 . 0 1 " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P a y m e n t   M e t h o d < / l a b e l > 
 
                                                 < s e l e c t   n a m e = " m e t h o d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                         < o p t i o n   v a l u e = " c a s h " > C a s h < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " b a n k " > B a n k   T r a n s f e r < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " o n l i n e " > O n l i n e < / o p t i o n > 
 
                                                 < / s e l e c t > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T r a n s a c t i o n   D a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " d a t e "   n a m e = " t r a n s a c t i o n _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N o t e s < / l a b e l > 
 
                                                 < t e x t a r e a   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r o w s = " 2 "   p l a c e h o l d e r = " P a y m e n t   r e m a r k s . . . " > < / t e x t a r e a > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C a n c e l < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - d a n g e r   b t n - s m   r o u n d e d - p i l l " > 
 
                                                 < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   C o n f i r m   P a y m e n t 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 2   t e x t - p r i m a r y " > < / i > E m p l o y e e   L e d g e r < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = l e d g e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ! - -   = = = = =   S M A R T   S E A R C H   B A R   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 6   c o l - l g - 5 " > 
 
                                 < d i v   c l a s s = " i n p u t - g r o u p " > 
 
                                         < s p a n   c l a s s = " i n p u t - g r o u p - t e x t   b g - w h i t e " > < i   c l a s s = " f a s   f a - s e a r c h   t e x t - p r i m a r y " > < / i > < / s p a n > 
 
                                         < i n p u t   t y p e = " t e x t "   i d = " s m a r t S e a r c h "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   
 
                                                       p l a c e h o l d e r = " L i v e   S e a r c h :   N a m e ,   P h o n e ,   C o d e . . . "   
 
                                                       a u t o c o m p l e t e = " o f f " > 
 
                                         < b u t t o n   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y   b t n - s m "   t y p e = " b u t t o n "   i d = " c l e a r S e a r c h "   t i t l e = " C l e a r   S e a r c h " > 
 
                                                 < i   c l a s s = " f a s   f a - t i m e s " > < / i > 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d "   i d = " s e a r c h S t a t u s " > 
 
                                         < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                         T y p e   t o   s e a r c h   e m p l o y e e s . . . 
 
                                 < / s m a l l > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 6   c o l - l g - 7   t e x t - e n d " > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > T o t a l   E m p l o y e e s :   < s t r o n g   i d = " t o t a l C o u n t " > < ? p h p   e c h o   c o u n t ( $ e m p l o y e e s ) ;   ? > < / s t r o n g > < / s m a l l > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e "   i d = " e m p l o y e e T a b l e " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > C o d e < / t h > 
 
                                                 < t h > N a m e < / t h > 
 
                                                 < t h > C a t e g o r y < / t h > 
 
                                                 < t h > P h o n e < / t h > 
 
                                                 < t h   c l a s s = " t e x t - e n d " > B a l a n c e   ( R s . ) < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y   i d = " e m p l o y e e B o d y " > 
 
                                         < ? p h p   i f   ( e m p t y ( $ e m p l o y e e s ) ) :   ? > 
 
                                                 < t r   i d = " n o R e s u l t " > 
 
                                                         < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   e m p l o y e e s   f o u n d . < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ e m p l o y e e s   a s   $ e ) :   ? > 
 
                                                         < t r   d a t a - n a m e = " < ? p h p   e c h o   s t r t o l o w e r ( $ e [ ' n a m e ' ] ) ;   ? > "   
 
                                                                 d a t a - p h o n e = " < ? p h p   e c h o   s t r t o l o w e r ( $ e [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > "   
 
                                                                 d a t a - c o d e = " < ? p h p   e c h o   s t r t o l o w e r ( $ e [ ' e m p _ c o d e ' ] ) ;   ? > " > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' e m p _ c o d e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ l e d g e r & i d = < ? p h p   e c h o   $ e [ ' i d ' ] ;   ? > "   c l a s s = " t e x t - d e c o r a t i o n - n o n e   f w - b o l d " > 
 
                                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' n a m e ' ] ) ;   ? > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' c a t e g o r y _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   < ? p h p   e c h o   ( $ e [ ' b a l a n c e ' ]   ? ?   0 )   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ e [ ' b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ l e d g e r & i d = < ? p h p   e c h o   $ e [ ' i d ' ] ;   ? > "   
 
                                                                               c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > 
 
                                                                                 < i   c l a s s = " f a s   f a - b o o k   m e - 1 " > < / i >   V i e w   L e d g e r 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 ( f u n c t i o n ( )   { 
 
         ' u s e   s t r i c t ' ; 
 
 
 
         c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s m a r t S e a r c h ' ) ; 
 
         c o n s t   c l e a r B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c l e a r S e a r c h ' ) ; 
 
         c o n s t   t a b l e B o d y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' e m p l o y e e B o d y ' ) ; 
 
         c o n s t   t o t a l C o u n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' t o t a l C o u n t ' ) ; 
 
         c o n s t   s e a r c h S t a t u s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h S t a t u s ' ) ; 
 
         l e t   s e a r c h T i m e o u t   =   n u l l ; 
 
 
 
         c o n s t   a l l R o w s   =   A r r a y . f r o m ( d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # e m p l o y e e B o d y   t r : n o t ( # n o R e s u l t ) ' ) ) ; 
 
 
 
         f u n c t i o n   p e r f o r m S e a r c h ( q u e r y )   { 
 
                 c o n s t   t r i m m e d   =   q u e r y . t r i m ( ) . t o L o w e r C a s e ( ) ; 
 
                 l e t   v i s i b l e C o u n t   =   0 ; 
 
                 l e t   h t m l   =   ' ' ; 
 
 
 
                 i f   ( t r i m m e d   = = =   ' ' )   { 
 
                         a l l R o w s . f o r E a c h ( r o w   = >   { 
 
                                 r o w . s t y l e . d i s p l a y   =   ' ' ; 
 
                                 v i s i b l e C o u n t + + ; 
 
                         } ) ; 
 
                         s e a r c h S t a t u s . i n n e r H T M L   =   ' < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i >   T y p e   t o   s e a r c h   e m p l o y e e s . . . ' ; 
 
                         t o t a l C o u n t . t e x t C o n t e n t   =   v i s i b l e C o u n t ; 
 
                         r e t u r n ; 
 
                 } 
 
 
 
                 a l l R o w s . f o r E a c h ( r o w   = >   { 
 
                         c o n s t   n a m e   =   r o w . d a t a s e t . n a m e   | |   ' ' ; 
 
                         c o n s t   p h o n e   =   r o w . d a t a s e t . p h o n e   | |   ' ' ; 
 
                         c o n s t   c o d e   =   r o w . d a t a s e t . c o d e   | |   ' ' ; 
 
                         
 
                         i f   ( n a m e . i n c l u d e s ( t r i m m e d )   | |   p h o n e . i n c l u d e s ( t r i m m e d )   | |   c o d e . i n c l u d e s ( t r i m m e d ) )   { 
 
                                 r o w . s t y l e . d i s p l a y   =   ' ' ; 
 
                                 v i s i b l e C o u n t + + ; 
 
                         }   e l s e   { 
 
                                 r o w . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         } 
 
                 } ) ; 
 
 
 
                 i f   ( v i s i b l e C o u n t   = = =   0 )   { 
 
                         i f   ( ! d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) )   { 
 
                                 c o n s t   t r   =   d o c u m e n t . c r e a t e E l e m e n t ( ' t r ' ) ; 
 
                                 t r . i d   =   ' n o R e s u l t ' ; 
 
                                 t r . i n n e r H T M L   =   ` < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                         N o   e m p l o y e e s   f o u n d   m a t c h i n g   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " . 
 
                                 < / t d > ` ; 
 
                                 t a b l e B o d y . a p p e n d C h i l d ( t r ) ; 
 
                         }   e l s e   { 
 
                                 d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) . s t y l e . d i s p l a y   =   ' ' ; 
 
                                 d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) . i n n e r H T M L   =   ` < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i > 
 
                                         N o   e m p l o y e e s   f o u n d   m a t c h i n g   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " . 
 
                                 < / t d > ` ; 
 
                         } 
 
                         s e a r c h S t a t u s . i n n e r H T M L   =   ` < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # a 0 a e c 0 ; " > < / i >   N o   r e s u l t s   f o r   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " ` ; 
 
                 }   e l s e   { 
 
                         c o n s t   n o R e s u l t   =   d o c u m e n t . q u e r y S e l e c t o r ( ' # n o R e s u l t ' ) ; 
 
                         i f   ( n o R e s u l t )   n o R e s u l t . r e m o v e ( ) ; 
 
                         s e a r c h S t a t u s . i n n e r H T M L   =   ` < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 1 "   s t y l e = " c o l o r : # 2 8 a 7 4 5 ; " > < / i >   S h o w i n g   < s t r o n g > $ { v i s i b l e C o u n t } < / s t r o n g >   r e s u l t s   f o r   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " ` ; 
 
                 } 
 
 
 
                 t o t a l C o u n t . t e x t C o n t e n t   =   v i s i b l e C o u n t ; 
 
         } 
 
 
 
         f u n c t i o n   e s c a p e H t m l ( t e x t )   { 
 
                 i f   ( ! t e x t )   r e t u r n   ' ' ; 
 
                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                 d i v . t e x t C o n t e n t   =   t e x t ; 
 
                 r e t u r n   d i v . i n n e r H T M L ; 
 
         } 
 
 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                 c o n s t   q u e r y   =   t h i s . v a l u e ; 
 
                 i f   ( q u e r y . t r i m ( )   = = =   ' '   & &   q u e r y . l e n g t h   >   0 )   r e t u r n ; 
 
                 i f   ( s e a r c h T i m e o u t )   c l e a r T i m e o u t ( s e a r c h T i m e o u t ) ; 
 
                 s e a r c h T i m e o u t   =   s e t T i m e o u t ( f u n c t i o n ( )   { 
 
                         p e r f o r m S e a r c h ( q u e r y ) ; 
 
                 } ,   2 0 0 ) ; 
 
         } ) ; 
 
 
 
         c l e a r B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 s e a r c h I n p u t . v a l u e   =   ' ' ; 
 
                 p e r f o r m S e a r c h ( ' ' ) ; 
 
                 s e a r c h I n p u t . f o c u s ( ) ; 
 
         } ) ; 
 
 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( e . k e y   = = =   ' E s c a p e ' )   { 
 
                         t h i s . v a l u e   =   ' ' ; 
 
                         p e r f o r m S e a r c h ( ' ' ) ; 
 
                         t h i s . b l u r ( ) ; 
 
                 } 
 
         } ) ; 
 
 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' f o c u s ' ,   f u n c t i o n ( )   { 
 
                 t h i s . s e l e c t ( ) ; 
 
         } ) ; 
 
 
 
 } ) ( ) ; 
 
 < / s c r i p t > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e > P a y m e n t   V o u c h e r   -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t r a n s a c t i o n [ ' e m p _ c o d e ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   {   
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   ' C o u r i e r   N e w ' ,   m o n o s p a c e ;   
 
                         b a c k g r o u n d :   # f 4 f 4 f 4 ;   
 
                         p a d d i n g :   2 0 p x ;   
 
                         m a r g i n :   0 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   4 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         m a x - w i d t h :   9 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                 } 
 
                 . c o n t a i n e r   {   
 
                         w i d t h :   8 0 m m ;   
 
                         m a r g i n :   0   a u t o ; 
 
                         p a d d i n g :   2 m m   2 m m ;   
 
                         b a c k g r o u n d :   # f f f ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         l i n e - h e i g h t :   1 . 4 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . h e a d e r   {   t e x t - a l i g n :   c e n t e r ;   b o r d e r - b o t t o m :   2 p x   d a s h e d   # 3 3 3 ;   p a d d i n g - b o t t o m :   6 p x ;   m a r g i n - b o t t o m :   6 p x ;   } 
 
                 . h e a d e r   h 2   {   f o n t - s i z e :   1 6 p x ;   f o n t - w e i g h t :   7 0 0 ;   m a r g i n :   0 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . h e a d e r   s m a l l   {   f o n t - s i z e :   9 p x ;   c o l o r :   # 5 5 5 ;   d i s p l a y :   b l o c k ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . b a r c o d e - c o n t a i n e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n :   4 p x   0 ;   p a d d i n g :   4 p x   0 ;   } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   {   m a x - w i d t h :   7 0 m m ;   h e i g h t :   a u t o ;   } 
 
                 . i n f o - g r i d   {   d i s p l a y :   g r i d ;   g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   g a p :   3 p x   8 p x ;   p a d d i n g :   5 p x   0 ;   b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ;   m a r g i n - b o t t o m :   5 p x ;   f o n t - s i z e :   1 0 p x ;   } 
 
                 . i n f o - g r i d   . l a b e l   {   f o n t - w e i g h t :   7 0 0 ;   c o l o r :   # 4 4 4 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . i n f o - g r i d   . v a l u e   {   c o l o r :   # 0 0 0 ;   f o n t - w e i g h t :   6 0 0 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . v o u c h e r - t y p e   {   t e x t - a l i g n :   c e n t e r ;   f o n t - s i z e :   1 4 p x ;   f o n t - w e i g h t :   7 0 0 ;   c o l o r :   # d c 3 5 4 5 ;   m a r g i n :   3 p x   0 ;   p a d d i n g :   4 p x ;   b o r d e r :   1 p x   d a s h e d   # d c 3 5 4 5 ;   b o r d e r - r a d i u s :   4 p x ;   } 
 
                 . a m o u n t - s e c t i o n   {   b a c k g r o u n d :   # f 8 f 9 f a ;   p a d d i n g :   6 p x   8 p x ;   b o r d e r - r a d i u s :   4 p x ;   m a r g i n :   5 p x   0 ;   b o r d e r - r i g h t :   3 p x   s o l i d   # d c 3 5 4 5 ;   } 
 
                 . a m o u n t - s e c t i o n   . r o w   {   d i s p l a y :   f l e x ;   j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   p a d d i n g :   2 p x   0 ;   f o n t - s i z e :   1 1 p x ;   } 
 
                 . a m o u n t - s e c t i o n   . r o w . t o t a l   {   f o n t - w e i g h t :   7 0 0 ;   f o n t - s i z e :   1 4 p x ;   c o l o r :   # d c 3 5 4 5 ;   b o r d e r - t o p :   1 p x   d a s h e d   # d d d ;   p a d d i n g - t o p :   4 p x ;   m a r g i n - t o p :   2 p x ;   } 
 
                 . f o o t e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n - t o p :   6 p x ;   p a d d i n g - t o p :   6 p x ;   b o r d e r - t o p :   2 p x   d a s h e d   # 3 3 3 ;   c o l o r :   # 5 5 5 ;   f o n t - s i z e :   9 p x ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . f o o t e r   p   {   m a r g i n :   1 p x   0 ;   } 
 
                 . p r i n t - b t n - c o n t a i n e r   {   t e x t - a l i g n :   c e n t e r ;   p a d d i n g :   1 5 p x   0   5 p x   0 ;   b o r d e r - t o p :   1 p x   s o l i d   # e e e ;   m a r g i n - t o p :   1 0 p x ;   } 
 
                 . p r i n t - b t n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # d c 3 5 4 5   0 % ,   # c 8 2 3 3 3   1 0 0 % ) ;   c o l o r :   # f f f ;   b o r d e r :   n o n e ;   b o r d e r - r a d i u s :   5 0 p x ;   p a d d i n g :   1 2 p x   4 0 p x ;   f o n t - s i z e :   1 6 p x ;   f o n t - w e i g h t :   6 0 0 ;   c u r s o r :   p o i n t e r ;   t r a n s i t i o n :   a l l   0 . 3 s   e a s e ;   b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 2 0 ,   5 3 ,   6 9 ,   0 . 3 5 ) ;   f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ;   } 
 
                 . p r i n t - b t n : h o v e r   {   t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ;   b o x - s h a d o w :   0   6 p x   2 5 p x   r g b a ( 2 2 0 ,   5 3 ,   6 9 ,   0 . 4 5 ) ;   } 
 
                 . s h o r t c u t - h i n t   {   t e x t - a l i g n :   c e n t e r ;   f o n t - s i z e :   1 0 p x ;   c o l o r :   # a a a ;   m a r g i n - t o p :   6 p x ;   f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ;   d i r e c t i o n :   l t r ;   } 
 
                 . s h o r t c u t - h i n t   k b d   {   b a c k g r o u n d :   # f 0 f 0 f 0 ;   p a d d i n g :   2 p x   8 p x ;   b o r d e r - r a d i u s :   4 p x ;   b o r d e r :   1 p x   s o l i d   # d d d ;   f o n t - s i z e :   1 0 p x ;   f o n t - w e i g h t :   6 0 0 ;   } 
 
                 @ p a g e   {   s i z e :   8 0 m m   a u t o ;   m a r g i n :   0 ;   } 
 
                 @ m e d i a   p r i n t   {   
 
                         b o d y   {   b a c k g r o u n d :   # f f f ;   p a d d i n g :   0 ;   m a r g i n :   0 ;   d i s p l a y :   b l o c k ;   } 
 
                         . p r i n t - w r a p p e r   {   b o x - s h a d o w :   n o n e ;   b o r d e r - r a d i u s :   0 ;   p a d d i n g :   0 ;   m a x - w i d t h :   1 0 0 % ;   } 
 
                         . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   p a d d i n g :   2 m m   3 m m ;   } 
 
                         . p r i n t - b t n - c o n t a i n e r   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                         . s h o r t c u t - h i n t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
                 < d i v   c l a s s = " c o n t a i n e r " > 
 
                         < d i v   c l a s s = " h e a d e r " > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   '    `            ' ) ;   ? > < / h 2 > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < s m a l l >       :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " v o u c h e r - t y p e " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - i n v o i c e   m e - 1 " > < / i >            `   `              ( P a y m e n t   V o u c h e r ) 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                                 < s v g   i d = " b a r c o d e " > < / s v g > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " i n f o - g r i d " > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >             # : < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   ' P V - '   .   s t r _ p a d ( $ t r a n s a c t i o n [ ' i d ' ] ,   4 ,   ' 0 ' ,   S T R _ P A D _ L E F T ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >        `  : < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t r a n s a c t i o n [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >  &        & : < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t r a n s a c t i o n [ ' e m p l o y e e _ n a m e ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >     `: < / s p a n >   < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t r a n s a c t i o n [ ' e m p _ c o d e ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " a m o u n t - s e c t i o n " > 
 
                                 < d i v   c l a s s = " r o w " > < s p a n >          `   `             : < / s p a n >   < s p a n > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t r a n s a c t i o n [ ' d e s c r i p t i o n ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v   c l a s s = " r o w   t o t a l " > < s p a n >            `         & : < / s p a n >   < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t r a n s a c t i o n [ ' a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < d i v   c l a s s = " f o o t e r " > 
 
                                 < p >     !           `                        &  !           `! < / p > 
 
                                 < p >    ` !           < / p > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " p r i n t - b t n - c o n t a i n e r   n o - p r i n t " > 
 
                         < b u t t o n   c l a s s = " p r i n t - b t n "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                                 < i   c l a s s = " f a s   f a - p r i n t " > < / i >   P r i n t   V o u c h e r 
 
                         < / b u t t o n > 
 
                         < d i v   c l a s s = " s h o r t c u t - h i n t " > < k b d > C t r l < / k b d >   +   < k b d > P < / k b d >   t o   p r i n t < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < s c r i p t > 
 
                 J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   ' P V - '   .   s t r _ p a d ( $ t r a n s a c t i o n [ ' i d ' ] ,   4 ,   ' 0 ' ,   S T R _ P A D _ L E F T ) ;   ? > " ,   { 
 
                         f o r m a t :   " C O D E 1 2 8 " , 
 
                         w i d t h :   2 , 
 
                         h e i g h t :   3 5 , 
 
                         d i s p l a y V a l u e :   t r u e , 
 
                         f o n t :   " m o n o s p a c e " , 
 
                         f o n t S i z e :   1 1 , 
 
                         m a r g i n :   0 , 
 
                         b a c k g r o u n d :   " # f f f f f f " , 
 
                         l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
                 } ) ; 
 
                 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                         i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 w i n d o w . p r i n t ( ) ; 
 
                         } 
 
                 } ) ; 
 
         < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < d i v   c l a s s = " r o w   g - 3 " > 
 
         < ! - -   = = = = =   C U S T O M E R S   = = = = =   - - > 
 
         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
                         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r s   m e - 2   t e x t - p r i m a r y " > < / i > C u s t o m e r   L e d g e r < / h 5 > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > C l i c k   o n   c u s t o m e r   n a m e   t o   v i e w   l e d g e r < / s m a l l > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c a r d - b o d y   p - 0 " > 
 
                                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   m b - 0 " > 
 
                                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                         < t r > 
 
                                                                 < t h > C u s t o m e r < / t h > 
 
                                                                 < t h   c l a s s = " t e x t - e n d " > B a l a n c e   ( R s . ) < / t h > 
 
                                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                                         < / t r > 
 
                                                 < / t h e a d > 
 
                                                 < t b o d y > 
 
                                                         < ? p h p   i f   ( e m p t y ( $ c u s t o m e r s ) ) :   ? > 
 
                                                                 < t r > < t d   c o l s p a n = " 3 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   c u s t o m e r s   f o u n d . < / t d > < / t r > 
 
                                                         < ? p h p   e l s e :   ? > 
 
                                                                 < ? p h p   f o r e a c h   ( $ c u s t o m e r s   a s   $ c ) :   ? > 
 
                                                                         < t r > 
 
                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > < / t d > 
 
                                                                                 < t d   c l a s s = " t e x t - e n d   < ? p h p   e c h o   ( $ c [ ' b a l a n c e ' ]   ? ?   0 )   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c [ ' b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > 
 
                                                                                 < / t d > 
 
                                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ l e d g e r & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   
 
                                                                                               c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - b o o k   m e - 1 " > < / i >   V i e w 
 
                                                                                         < / a > 
 
                                                                                 < / t d > 
 
                                                                         < / t r > 
 
                                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < ? p h p   e n d i f ;   ? > 
 
                                                 < / t b o d y > 
 
                                         < / t a b l e > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   E M P L O Y E E S   = = = = =   - - > 
 
         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
                         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 2   t e x t - p r i m a r y " > < / i > E m p l o y e e   L e d g e r < / h 5 > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > C l i c k   o n   e m p l o y e e   n a m e   t o   v i e w   l e d g e r < / s m a l l > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c a r d - b o d y   p - 0 " > 
 
                                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   m b - 0 " > 
 
                                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                         < t r > 
 
                                                                 < t h > E m p l o y e e < / t h > 
 
                                                                 < t h   c l a s s = " t e x t - e n d " > B a l a n c e   ( R s . ) < / t h > 
 
                                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                                         < / t r > 
 
                                                 < / t h e a d > 
 
                                                 < t b o d y > 
 
                                                         < ? p h p   i f   ( e m p t y ( $ e m p l o y e e s ) ) :   ? > 
 
                                                                 < t r > < t d   c o l s p a n = " 3 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   e m p l o y e e s   f o u n d . < / t d > < / t r > 
 
                                                         < ? p h p   e l s e :   ? > 
 
                                                                 < ? p h p   f o r e a c h   ( $ e m p l o y e e s   a s   $ e ) :   ? > 
 
                                                                         < t r > 
 
                                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e [ ' n a m e ' ] ) ;   ? > < / t d > 
 
                                                                                 < t d   c l a s s = " t e x t - e n d   < ? p h p   e c h o   ( $ e [ ' b a l a n c e ' ]   ? ?   0 )   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ e [ ' b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > 
 
                                                                                 < / t d > 
 
                                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ l e d g e r & i d = < ? p h p   e c h o   $ e [ ' i d ' ] ;   ? > "   
 
                                                                                               c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - b o o k   m e - 1 " > < / i >   V i e w 
 
                                                                                         < / a > 
 
                                                                                 < / t d > 
 
                                                                         < / t r > 
 
                                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < ? p h p   e n d i f ;   ? > 
 
                                                 < / t b o d y > 
 
                                         < / t a b l e > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 / /     R            R   R        R         R  
 
 $ t y p e   =   $ t y p e   ? ?   ' c u s t o m e r ' ;   / /   ' c u s t o m e r ' ,   ' e m p l o y e e ' ,   o r   ' c a s h ' 
 
 $ t r a n s a c t i o n s   =   $ t r a n s a c t i o n s   ? ?   [ ] ; 
 
 $ o p e n i n g _ b a l a n c e   =   $ o p e n i n g _ b a l a n c e   ? ?   0 ; 
 
 $ c l o s i n g _ b a l a n c e   =   $ c l o s i n g _ b a l a n c e   ? ?   0 ; 
 
 $ t o t a l _ d e b i t   =   $ t o t a l _ d e b i t   ? ?   0 ; 
 
 $ t o t a l _ c r e d i t   =   $ t o t a l _ c r e d i t   ? ?   0 ; 
 
 $ t i t l e   =   $ t i t l e   ? ?   ' L e d g e r ' ; 
 
 $ e n t i t y   =   $ e n t i t y   ? ?   n u l l ; 
 
 $ f r o m _ d a t e   =   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - 0 1 ' ) ; 
 
 $ t o _ d a t e   =   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ c o m p a n y   =   $ c o m p a n y   ? ?   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
 ? > 
 
 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e > < ? p h p   e c h o   $ t i t l e ;   ? > < / t i t l e > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   {   f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ;   b a c k g r o u n d :   # f f f ;   p a d d i n g :   2 0 p x ;   } 
 
                 . c o n t a i n e r   {   m a x - w i d t h :   1 1 0 0 p x ;   m a r g i n :   0   a u t o ;   } 
 
                 . h e a d e r   {   t e x t - a l i g n :   c e n t e r ;   b o r d e r - b o t t o m :   3 p x   s o l i d   # 3 3 3 ;   p a d d i n g - b o t t o m :   1 5 p x ;   m a r g i n - b o t t o m :   2 0 p x ;   } 
 
                 . h e a d e r   h 2   {   f o n t - s i z e :   2 4 p x ;   m a r g i n :   0 ;   } 
 
                 . h e a d e r   s m a l l   {   f o n t - s i z e :   1 4 p x ;   c o l o r :   # 6 6 6 ;   } 
 
                 . i n f o - b o x   {   b a c k g r o u n d :   # f 8 f 9 f a ;   p a d d i n g :   1 5 p x ;   b o r d e r - r a d i u s :   8 p x ;   m a r g i n - b o t t o m :   2 0 p x ;   d i s p l a y :   f l e x ;   j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   f l e x - w r a p :   w r a p ;   } 
 
                 . i n f o - b o x   . i t e m   {   f o n t - s i z e :   1 4 p x ;   } 
 
                 . i n f o - b o x   . i t e m   s t r o n g   {   c o l o r :   # 3 3 3 ;   } 
 
                 t a b l e   {   w i d t h :   1 0 0 % ;   b o r d e r - c o l l a p s e :   c o l l a p s e ;   f o n t - s i z e :   1 3 p x ;   } 
 
                 t h e a d   t h   {   b a c k g r o u n d :   # 2 d 3 7 4 8 ;   c o l o r :   # f f f ;   p a d d i n g :   1 0 p x   1 2 p x ;   t e x t - a l i g n :   l e f t ;   } 
 
                 t h e a d   t h . t e x t - e n d   {   t e x t - a l i g n :   r i g h t ;   } 
 
                 t b o d y   t d   {   p a d d i n g :   8 p x   1 2 p x ;   b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ;   } 
 
                 t b o d y   t r : n t h - c h i l d ( e v e n )   {   b a c k g r o u n d :   # f 7 f a f c ;   } 
 
                 t b o d y   t r . t o t a l - r o w   {   b a c k g r o u n d :   # e d f 2 f 7   ! i m p o r t a n t ;   f o n t - w e i g h t :   7 0 0 ;   } 
 
                 t b o d y   t r . t o t a l - r o w   t d   {   b o r d e r - t o p :   2 p x   s o l i d   # 3 3 3 ;   p a d d i n g :   1 0 p x   1 2 p x ;   } 
 
                 . t e x t - e n d   {   t e x t - a l i g n :   r i g h t ;   } 
 
                 . t e x t - c e n t e r   {   t e x t - a l i g n :   c e n t e r ;   } 
 
                 . t e x t - s u c c e s s   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
                 . t e x t - d a n g e r   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
                 . f o o t e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n - t o p :   3 0 p x ;   p a d d i n g - t o p :   1 5 p x ;   b o r d e r - t o p :   2 p x   s o l i d   # e 2 e 8 f 0 ;   c o l o r :   # 6 6 6 ;   f o n t - s i z e :   1 2 p x ;   } 
 
                 . s t a t u s - b a d g e   {   p a d d i n g :   2 p x   1 2 p x ;   b o r d e r - r a d i u s :   3 0 p x ;   f o n t - s i z e :   1 1 p x ;   f o n t - w e i g h t :   6 0 0 ;   d i s p l a y :   i n l i n e - b l o c k ;   } 
 
                 . s t a t u s - b a d g e . r e c e i v e   {   b a c k g r o u n d :   # d 4 e d d a ;   c o l o r :   # 1 5 5 7 2 4 ;   } 
 
                 . s t a t u s - b a d g e . p a y   {   b a c k g r o u n d :   # f 8 d 7 d a ;   c o l o r :   # 7 2 1 c 2 4 ;   } 
 
                 . s t a t u s - b a d g e . c r e d i t   {   b a c k g r o u n d :   # d 4 e d d a ;   c o l o r :   # 1 5 5 7 2 4 ;   } 
 
                 . s t a t u s - b a d g e . d e b i t   {   b a c k g r o u n d :   # f 8 d 7 d a ;   c o l o r :   # 7 2 1 c 2 4 ;   } 
 
                 . p r i n t - b t n   {   d i s p l a y :   b l o c k ;   m a r g i n :   2 0 p x   a u t o ;   p a d d i n g :   1 0 p x   3 0 p x ;   b a c k g r o u n d :   # 6 6 7 e e a ;   c o l o r :   # f f f ;   b o r d e r :   n o n e ;   b o r d e r - r a d i u s :   3 0 p x ;   f o n t - s i z e :   1 4 p x ;   c u r s o r :   p o i n t e r ;   } 
 
                 . p r i n t - b t n : h o v e r   {   b a c k g r o u n d :   # 5 a 6 f d 6 ;   } 
 
                 @ m e d i a   p r i n t   { 
 
                         . p r i n t - b t n   {   d i s p l a y :   n o n e ;   } 
 
                         b o d y   {   p a d d i n g :   0 ;   } 
 
                         . c o n t a i n e r   {   m a x - w i d t h :   1 0 0 % ;   } 
 
                         . h e a d e r   {   b o r d e r - b o t t o m - c o l o r :   # 0 0 0 ;   } 
 
                         t h e a d   t h   {   b a c k g r o u n d :   # 0 0 0   ! i m p o r t a n t ;   c o l o r :   # f f f   ! i m p o r t a n t ;   - w e b k i t - p r i n t - c o l o r - a d j u s t :   e x a c t ;   p r i n t - c o l o r - a d j u s t :   e x a c t ;   } 
 
                         t b o d y   t r : n t h - c h i l d ( e v e n )   {   b a c k g r o u n d :   # f 7 f a f c   ! i m p o r t a n t ;   - w e b k i t - p r i n t - c o l o r - a d j u s t :   e x a c t ;   p r i n t - c o l o r - a d j u s t :   e x a c t ;   } 
 
                         . s t a t u s - b a d g e   {   - w e b k i t - p r i n t - c o l o r - a d j u s t :   e x a c t ;   p r i n t - c o l o r - a d j u s t :   e x a c t ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
                 < b u t t o n   c l a s s = " p r i n t - b t n "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t " > < / i >   P r i n t   L e d g e r < / b u t t o n > 
 
 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' B i z T e c h   T a i l o r ' ) ;   ? > < / h 2 > 
 
                         < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   P h o n e :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " i n f o - b o x " > 
 
                         < d i v   c l a s s = " i t e m " > < s t r o n g > T i t l e : < / s t r o n g >   < ? p h p   e c h o   $ t i t l e ;   ? > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s t r o n g > P e r i o d : < / s t r o n g >   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m _ d a t e ) ) ;   ? >   t o   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o _ d a t e ) ) ;   ? > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s t r o n g > P r i n t e d : < / s t r o n g >   < ? p h p   e c h o   d a t e ( ' d - m - Y   H : i : s ' ) ;   ? > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( $ t y p e   = =   ' c u s t o m e r ' ) :   ? > 
 
                         < ! - -   = = = = =   C U S T O M E R   L E D G E R   S U M M A R Y   = = = = =   - - > 
 
                         < d i v   c l a s s = " i n f o - b o x "   s t y l e = " b a c k g r o u n d :   # e 8 f 5 e 9 ; " > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > O p e n i n g   B a l a n c e : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o p e n i n g _ b a l a n c e ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > T o t a l   R e c e i v e d : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e c e i v e d   ? ?   0 ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > T o t a l   P a i d : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d   ? ?   0 ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > C l o s i n g   B a l a n c e : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < t a b l e > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > O r d e r   # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 8 % ; " > D e s c r i p t i o n < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > T y p e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; t e x t - a l i g n : r i g h t ; " > D e b i t   ( P a y ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; t e x t - a l i g n : r i g h t ; " > C r e d i t   ( R e c e i v e ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 1 % ; t e x t - a l i g n : r i g h t ; " > B a l a n c e < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d " > N o   t r a n s a c t i o n s   f o u n d   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' o r d e r _ n o ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e   < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   ' r e c e i v e '   :   ' p a y ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   ' R e c e i v e '   :   ' P a y ' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' p a y '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' r e c e i v e '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   f w - b o l d   < ? p h p   e c h o   $ t [ ' r u n n i n g _ b a l a n c e ' ]   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' r u n n i n g _ b a l a n c e ' ] ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l s : < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ r e c e i v e d   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   f w - b o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
 
 
                 < ? p h p   e l s e i f   ( $ t y p e   = =   ' e m p l o y e e ' ) :   ? > 
 
                         < ! - -   = = = = =   E M P L O Y E E   L E D G E R   S U M M A R Y   = = = = =   - - > 
 
                         < d i v   c l a s s = " i n f o - b o x "   s t y l e = " b a c k g r o u n d :   # e 8 f 5 e 9 ; " > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > O p e n i n g   B a l a n c e : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o p e n i n g _ b a l a n c e ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > T o t a l   C r e d i t : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t   ? ?   0 ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > T o t a l   D e b i t : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t   ? ?   0 ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > C l o s i n g   B a l a n c e : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < t a b l e > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > O r d e r   # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 8 % ; " > D e s c r i p t i o n < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > T y p e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; t e x t - a l i g n : r i g h t ; " > D e b i t < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; t e x t - a l i g n : r i g h t ; " > C r e d i t < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 1 % ; t e x t - a l i g n : r i g h t ; " > B a l a n c e < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d " > N o   t r a n s a c t i o n s   f o u n d   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' o r d e r _ n o ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e   < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' c r e d i t '   ?   ' c r e d i t '   :   ' d e b i t ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' c r e d i t '   ?   ' C r e d i t '   :   ' D e b i t ' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' d e b i t '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t [ ' t y p e ' ]   = =   ' c r e d i t '   ?   n u m b e r _ f o r m a t ( $ t [ ' a m o u n t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   f w - b o l d   < ? p h p   e c h o   $ t [ ' r u n n i n g _ b a l a n c e ' ]   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' r u n n i n g _ b a l a n c e ' ] ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l s : < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   f w - b o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
 
 
                 < ? p h p   e l s e :   ? > 
 
                         < ! - -   = = = = =   C A S H   L E D G E R   S U M M A R Y   = = = = =   - - > 
 
                         < d i v   c l a s s = " i n f o - b o x "   s t y l e = " b a c k g r o u n d :   # f f f 3 e 0 ; " > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > O p e n i n g   B a l a n c e : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o p e n i n g _ b a l a n c e ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > T o t a l   D e b i t   ( R e c e i v e d ) : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > T o t a l   C r e d i t   ( P a i d ) : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " i t e m " > < s t r o n g > C l o s i n g   B a l a n c e : < / s t r o n g >   R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < t a b l e > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 3 0 % ; " > D e s c r i p t i o n < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > R e f e r e n c e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > T y p e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; t e x t - a l i g n : r i g h t ; " > D e b i t   ( R e c e i v e d ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; t e x t - a l i g n : r i g h t ; " > C r e d i t   ( P a i d ) < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 9 % ; t e x t - a l i g n : r i g h t ; " > B a l a n c e < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ t r a n s a c t i o n s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d " > N o   c a s h   t r a n s a c t i o n s   f o u n d   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ t r a n s a c t i o n s   a s   $ t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ t [ ' r e f e r e n c e _ i d ' ] ) :   ? > 
 
                                                                                 # < ? p h p   e c h o   $ t [ ' r e f e r e n c e _ i d ' ] ;   ? > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 - 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e   < ? p h p   e c h o   ( $ t [ ' d e b i t ' ]   ? ?   0 )   >   0   ?   ' r e c e i v e '   :   ' p a y ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   ( $ t [ ' d e b i t ' ]   ? ?   0 )   >   0   ?   ' R e c e i v e d '   :   ' P a i d ' ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   ( $ t [ ' d e b i t ' ]   ? ?   0 )   >   0   ?   n u m b e r _ f o r m a t ( $ t [ ' d e b i t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   ( $ t [ ' c r e d i t ' ]   ? ?   0 )   >   0   ?   n u m b e r _ f o r m a t ( $ t [ ' c r e d i t ' ] ,   0 )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   f w - b o l d   < ? p h p   e c h o   ( $ t [ ' r u n n i n g _ b a l a n c e ' ]   ? ?   0 )   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t [ ' r u n n i n g _ b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t o t a l - r o w " > 
 
                                                         < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l s : < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   f w - b o l d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c l o s i n g _ b a l a n c e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < p > G e n e r a t e d   b y   B i z T e c h   T a i l o r   M a n a g e m e n t   S y s t e m < / p > 
 
                         < p > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / p > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < s t y l e > 
 
         . l e d g e r - s e l e c t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   2 0 p x ; 
 
                 b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 8 ) ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   c u b i c - b e z i e r ( 0 . 2 5 ,   0 . 4 6 ,   0 . 4 5 ,   0 . 9 4 ) ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 p a d d i n g :   4 0 p x   2 0 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 h e i g h t :   1 0 0 % ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . l e d g e r - s e l e c t - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 8 p x ) ; 
 
                 b o x - s h a d o w :   0   1 6 p x   5 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
         } 
 
         . l e d g e r - s e l e c t - c a r d   . i c o n   { 
 
                 f o n t - s i z e :   7 2 p x ; 
 
                 m a r g i n - b o t t o m :   2 0 p x ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w i d t h :   1 0 0 p x ; 
 
                 h e i g h t :   1 0 0 p x ; 
 
                 l i n e - h e i g h t :   1 0 0 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 b a c k g r o u n d :   # f 0 f 4 f f ; 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   e a s e ; 
 
         } 
 
         . l e d g e r - s e l e c t - c a r d : h o v e r   . i c o n   { 
 
                 t r a n s f o r m :   s c a l e ( 1 . 1 )   r o t a t e ( - 6 d e g ) ; 
 
         } 
 
         . l e d g e r - s e l e c t - c a r d   . t i t l e   { 
 
                 f o n t - s i z e :   2 2 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
         } 
 
         . l e d g e r - s e l e c t - c a r d   . d e s c   { 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
         } 
 
         . l e d g e r - s e l e c t - c a r d   . b a d g e - c o u n t   { 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 t o p :   1 5 p x ; 
 
                 r i g h t :   1 5 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . l e d g e r - s e l e c t - c a r d . c u s t o m e r   . i c o n   {   c o l o r :   # 6 6 7 e e a ;   } 
 
         . l e d g e r - s e l e c t - c a r d . c u s t o m e r   . b a d g e - c o u n t   {   b a c k g r o u n d :   # 6 6 7 e e a ;   } 
 
         . l e d g e r - s e l e c t - c a r d . e m p l o y e e   . i c o n   {   c o l o r :   # 1 1 9 9 8 e ;   } 
 
         . l e d g e r - s e l e c t - c a r d . e m p l o y e e   . b a d g e - c o u n t   {   b a c k g r o u n d :   # 1 1 9 9 8 e ;   } 
 
         . l e d g e r - s e l e c t - c a r d . c a s h   . i c o n   {   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . l e d g e r - s e l e c t - c a r d . c a s h   . b a d g e - c o u n t   {   b a c k g r o u n d :   # f 7 9 7 1 e ;   } 
 
         . l e d g e r - s e l e c t - c a r d . c a s h   {   b o r d e r :   2 p x   s o l i d   r g b a ( 2 4 7 ,   1 5 1 ,   3 0 ,   0 . 1 5 ) ;   } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c o n t a i n e r   p y - 4 " > 
 
         < d i v   c l a s s = " t e x t - c e n t e r   m b - 5 " > 
 
                 < h 3   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - b o o k   m e - 2   t e x t - p r i m a r y " > < / i > L e d g e r   M a n a g e m e n t < / h 3 > 
 
                 < p   c l a s s = " t e x t - m u t e d " > S e l e c t   a   l e d g e r   t y p e   t o   v i e w   d e t a i l e d   t r a n s a c t i o n s < / p > 
 
         < / d i v > 
 
 
 
         < d i v   c l a s s = " r o w   g - 4   j u s t i f y - c o n t e n t - c e n t e r " > 
 
                 
 
                 < ! - -   C u s t o m e r   L e d g e r   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c u s t o m e r _ l e d g e r _ l i s t "   c l a s s = " t e x t - d e c o r a t i o n - n o n e " > 
 
                                 < d i v   c l a s s = " l e d g e r - s e l e c t - c a r d   c u s t o m e r " > 
 
                                         < s p a n   c l a s s = " b a d g e - c o u n t " > 
 
                                                 < i   c l a s s = " f a s   f a - u s e r s   m e - 1 " > < / i >   
 
                                                 < ? p h p   
 
                                                 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
                                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c u s t o m e r s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                                                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                                                 e c h o   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                                 ? > 
 
                                         < / s p a n > 
 
                                         < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - u s e r s " > < / i > < / d i v > 
 
                                         < d i v   c l a s s = " t i t l e " > C u s t o m e r   L e d g e r < / d i v > 
 
                                         < d i v   c l a s s = " d e s c " > V i e w   c u s t o m e r   t r a n s a c t i o n s   &   r e c e i v e   p a y m e n t s < / d i v > 
 
                                         < d i v   c l a s s = " m t - 3 " > 
 
                                                 < s p a n   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l   p x - 4 " > O p e n   < i   c l a s s = " f a s   f a - a r r o w - r i g h t   m s - 2 " > < / i > < / s p a n > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   E m p l o y e e   L e d g e r   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = e m p l o y e e _ l e d g e r _ l i s t "   c l a s s = " t e x t - d e c o r a t i o n - n o n e " > 
 
                                 < d i v   c l a s s = " l e d g e r - s e l e c t - c a r d   e m p l o y e e " > 
 
                                         < s p a n   c l a s s = " b a d g e - c o u n t " > 
 
                                                 < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 1 " > < / i >   
 
                                                 < ? p h p   
 
                                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   e m p l o y e e s   W H E R E   c o m p a n y _ i d   =   ?   A N D   s t a t u s   =   ' a c t i v e ' " ) ; 
 
                                                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                                                 e c h o   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                                 ? > 
 
                                         < / s p a n > 
 
                                         < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - u s e r - t i e " > < / i > < / d i v > 
 
                                         < d i v   c l a s s = " t i t l e " > E m p l o y e e   L e d g e r < / d i v > 
 
                                         < d i v   c l a s s = " d e s c " > V i e w   e m p l o y e e   t r a n s a c t i o n s   &   m a k e   p a y m e n t s < / d i v > 
 
                                         < d i v   c l a s s = " m t - 3 " > 
 
                                                 < s p a n   c l a s s = " b t n   b t n - o u t l i n e - s u c c e s s   r o u n d e d - p i l l   p x - 4 " > O p e n   < i   c l a s s = " f a s   f a - a r r o w - r i g h t   m s - 2 " > < / i > < / s p a n > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   C a s h   L e d g e r   ( N e w )   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c a s h _ l e d g e r "   c l a s s = " t e x t - d e c o r a t i o n - n o n e " > 
 
                                 < d i v   c l a s s = " l e d g e r - s e l e c t - c a r d   c a s h " > 
 
                                         < s p a n   c l a s s = " b a d g e - c o u n t " > 
 
                                                 < i   c l a s s = " f a s   f a - c o i n s   m e - 1 " > < / i >   
 
                                                 < ? p h p   
 
                                                 $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   c a s h _ l e d g e r   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                                                 $ s t m t - > e x e c u t e ( [ $ c o m p a n y _ i d ] ) ; 
 
                                                 e c h o   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                                 ? > 
 
                                         < / s p a n > 
 
                                         < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e " > < / i > < / d i v > 
 
                                         < d i v   c l a s s = " t i t l e " > C a s h   L e d g e r < / d i v > 
 
                                         < d i v   c l a s s = " d e s c " > V i e w   a l l   c a s h   t r a n s a c t i o n s   &   b a l a n c e < / d i v > 
 
                                         < d i v   c l a s s = " m t - 3 " > 
 
                                                 < s p a n   c l a s s = " b t n   b t n - o u t l i n e - w a r n i n g   r o u n d e d - p i l l   p x - 4 "   s t y l e = " c o l o r : # f 7 9 7 1 e ;   b o r d e r - c o l o r : # f 7 9 7 1 e ; " > O p e n   < i   c l a s s = " f a s   f a - a r r o w - r i g h t   m s - 2 " > < / i > < / s p a n > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p 
 
 / /                R   -   8 0 m m          &                           R  
 
 / /   $ c u s t o m e r ,   $ m e a s u r e m e n t s ,   $ c o m p a n y                    &            R  
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l   l a n g = " s d " > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e >  &           -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   '       &       & ' ) ;   ? > < / t i t l e > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         w i d t h :   8 0 m m ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         p a d d i n g :   0 ; 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . r e c e i p t   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         p a d d i n g :   4 p x   4 p x ; 
 
                 } 
 
                 / *   = = = =      R     = = = =   * / 
 
                 . h e a d e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   2 . 5 p x   s o l i d   # 8 5 7 9 7 9 ; 
 
                         p a d d i n g - b o t t o m :   8 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   { 
 
                         f o n t - s i z e :   2 2 p x ; 
 
                         m a r g i n :   0 ; 
 
                         c o l o r :   # 1 a 1 a 2 e ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . h e a d e r   . s u b   { 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                         l i n e - h e i g h t :   1 . 4 ; 
 
                 } 
 
                 / *   = = = =          &        R   &       &       -   4          &   G r i d   ( 5 % ,   2 0 % ,   7 0 % ,   5 % )   = = = =   * / 
 
                 . c u s t o m e r - i n f o   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   5 %   2 0 %   7 0 %   5 % ; 
 
                         g a p :   2 p x   0 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                         b o r d e r - b o t t o m :   1 . 5 p x   s o l i d   # c c c ; 
 
                         p a d d i n g - b o t t o m :   6 p x ; 
 
                         a l i g n - i t e m s :   b a s e l i n e ; 
 
                 } 
 
                 . c u s t o m e r - i n f o   . e m p t y   { 
 
                         v i s i b i l i t y :   h i d d e n ; 
 
                 } 
 
                 . c u s t o m e r - i n f o   . l a b e l   { 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 0 0 0 0 0 0 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         f o n t - s i z e :   1 5 p x ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         p a d d i n g - l e f t :   4 p x ; 
 
                         w h i t e - s p a c e :   n o w r a p ; 
 
                         g r i d - c o l u m n :   2   /   3 ; 
 
                 } 
 
                 . c u s t o m e r - i n f o   . v a l u e   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 1 a 2 e ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         f o n t - s i z e :   1 5 p x ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         d i r e c t i o n :   r t l ; 
 
                         u n i c o d e - b i d i :   e m b e d ; 
 
                         w h i t e - s p a c e :   n o w r a p ; 
 
                         g r i d - c o l u m n :   3   /   4 ; 
 
                         p a d d i n g - r i g h t :   4 p x ; 
 
                 } 
 
                 . c u s t o m e r - i n f o   . r o w 1   {   g r i d - r o w :   1 ;   } 
 
                 . c u s t o m e r - i n f o   . r o w 2   {   g r i d - r o w :   2 ;   } 
 
                 . c u s t o m e r - i n f o   . r o w 3   {   g r i d - r o w :   3 ;   } 
 
                 
 
                 / *   = = = =    &                       = = = =   * / 
 
                 . m e a s u r e m e n t - b l o c k   { 
 
                         m a r g i n - t o p :   8 p x ; 
 
                         b o r d e r :   2 p x   s o l i d   # d d d ; 
 
                         b o r d e r - r a d i u s :   8 p x ; 
 
                         p a d d i n g :   6 p x   8 p x ; 
 
                         b a c k g r o u n d :   # f a f a f a ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t - t i t l e   { 
 
                         f o n t - s i z e :   1 7 p x ; 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 0 0 0 0 0 0 ; 
 
                         b o r d e r - b o t t o m :   2 p x   s o l i d   # d d d ; 
 
                         p a d d i n g - b o t t o m :   4 p x ; 
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = =   4          &      R      (  &                   R                    -      R        B o l d )   = = = =   * / 
 
                 . m e a s u r e m e n t - t a b l e   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t - t a b l e   t r   { 
 
                         b o r d e r - b o t t o m :   0 . 5 p x   d a s h e d   # d d d ; 
 
                 } 
 
                 . m e a s u r e m e n t - t a b l e   t r : l a s t - c h i l d   { 
 
                         b o r d e r - b o t t o m :   n o n e ; 
 
                 } 
 
                 . m e a s u r e m e n t - t a b l e   t d   { 
 
                         p a d d i n g :   1 p x   3 p x ; 
 
                         w h i t e - s p a c e :   n o w r a p ; 
 
                         v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 } 
 
                 . m e a s u r e m e n t - t a b l e   . e m p t y - l e f t   { 
 
                         w i d t h :   1 0 % ; 
 
                         m i n - w i d t h :   1 0 % ; 
 
                         t e x t - a l i g n :   l e f t ; 
 
                         c o l o r :   t r a n s p a r e n t ; 
 
                 } 
 
                 . m e a s u r e m e n t - t a b l e   . l a b e l - c o l   { 
 
                         f o n t - w e i g h t :   7 0 0 ;   / *    S&             5 0 0          R        B o l d   * / 
 
                         c o l o r :   # 0 0 0 0 0 0 ;     / *    S&      R      * / 
 
                         w i d t h :   4 0 % ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         p a d d i n g - l e f t :   6 p x ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . m e a s u r e m e n t - t a b l e   . v a l u e - c o l   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 1 a 2 e ; 
 
                         d i r e c t i o n :   l t r ; 
 
                         u n i c o d e - b i d i :   e m b e d ; 
 
                         t e x t - a l i g n :   l e f t ; 
 
                         w i d t h :   4 0 % ; 
 
                         p a d d i n g - r i g h t :   6 p x ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t - t a b l e   . e m p t y - r i g h t   { 
 
                         w i d t h :   1 0 % ; 
 
                         m i n - w i d t h :   1 0 % ; 
 
                         t e x t - a l i g n :   l e f t ; 
 
                         c o l o r :   t r a n s p a r e n t ; 
 
                 } 
 
                 / *   = = = =            R            (          `  /   N o t e s   +      R &           /   R e m a r k s )   = = = =   * / 
 
                 . e x t r a - n o t e s   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 0 %   4 0 %   4 0 %   1 0 % ; 
 
                         g a p :   2 p x   6 p x ; 
 
                         m a r g i n - t o p :   6 p x ; 
 
                         p a d d i n g - t o p :   4 p x ; 
 
                         b o r d e r - t o p :   2 p x   d a s h e d   # d d d ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                 } 
 
                 . e x t r a - n o t e s   . l a b e l - c o l   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 0 0 0 0 0 0 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         p a d d i n g - l e f t :   6 p x ; 
 
                         g r i d - c o l u m n :   2   /   3 ; 
 
                 } 
 
                 . e x t r a - n o t e s   . v a l u e - c o l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 1 a 2 e ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         p a d d i n g - r i g h t :   6 p x ; 
 
                         g r i d - c o l u m n :   3   /   4 ; 
 
                         d i r e c t i o n :   l t r ; 
 
                         u n i c o d e - b i d i :   e m b e d ; 
 
                 } 
 
                 . e x t r a - n o t e s   . e m p t y   { 
 
                         v i s i b i l i t y :   h i d d e n ; 
 
                 } 
 
                 . n o - d a t a   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         c o l o r :   # 8 8 8 ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = =            = = = =   * / 
 
                 . f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - t o p :   2 . 5 p x   s o l i d   # 3 3 3 ; 
 
                         p a d d i n g - t o p :   8 p x ; 
 
                         m a r g i n - t o p :   8 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         c o l o r :   # 6 6 6 ; 
 
                         l i n e - h e i g h t :   1 . 5 ; 
 
                 } 
 
                 . f o o t e r   . t h a n k y o u   { 
 
                         f o n t - s i z e :   1 8 p x ; 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 0 0 0 0 0 0 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . f o o t e r   . t i m e   { 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         c o l o r :   # 9 9 9 ; 
 
                 } 
 
                 . f o o t e r   . s o f t w a r e   { 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         c o l o r :   # a a a ; 
 
                 } 
 
                 @ p a g e   { 
 
                         s i z e :   8 0 m m   a u t o ; 
 
                         m a r g i n :   0 ; 
 
                 } 
 
                 @ m e d i a   p r i n t   { 
 
                         b o d y   { 
 
                                 m a r g i n :   0 ; 
 
                                 p a d d i n g :   0 ; 
 
                                 w i d t h :   8 0 m m ; 
 
                         } 
 
                         . r e c e i p t   { 
 
                                 p a d d i n g :   3 p x ; 
 
                         } 
 
                         . n o - p r i n t   {   d i s p l a y :   n o n e ;   } 
 
                         . m e a s u r e m e n t - b l o c k   { 
 
                                 b a c k g r o u n d :   # f f f ; 
 
                                 b o r d e r - c o l o r :   # a a a ; 
 
                         } 
 
                         . r e c e i p t : a f t e r   { 
 
                                 c o n t e n t :   ' ' ; 
 
                                 d i s p l a y :   b l o c k ; 
 
                                 p a g e - b r e a k - a f t e r :   a l w a y s ; 
 
                         } 
 
                 } 
 
                 . n o - p r i n t   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                 } 
 
                 . n o - p r i n t   b u t t o n   { 
 
                         p a d d i n g :   8 p x   2 0 p x ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   4 p x ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         m a r g i n :   0   4 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                 } 
 
                 . b t n - p r i n t   {   b a c k g r o u n d :   # 0 D 6 E F D ;   c o l o r :   # f f f ;   } 
 
                 . b t n - c l o s e   {   b a c k g r o u n d :   # 6 c 7 5 7 d ;   c o l o r :   # f f f ;   } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " r e c e i p t " > 
 
 
 
         < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
         < d i v   c l a s s = " h e a d e r " > 
 
                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   '      `    `     `    ' ) ;   ? > < / h 2 > 
 
                 < d i v   c l a s s = " s u b " > 
 
                         < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' a d d r e s s ' ] ) ) :   ? > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ] ) ;   ? > < b r > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                         < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' p h o n e ' ] ) ) :   ? > 
 
                                       :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ] ) ;   ? > < / s p a n > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   C U S T O M E R   I N F O   -   4          &   G r i d   ( 5 % ,   2 0 % ,   7 0 % ,   5 % )   = = = = =   - - > 
 
         < d i v   c l a s s = " c u s t o m e r - i n f o " > 
 
                 < s p a n   c l a s s = " e m p t y   r o w 1 " > < / s p a n > 
 
                 < s p a n   c l a s s = " l a b e l   r o w 1 " >        !     # : < / s p a n > 
 
                 < s p a n   c l a s s = " v a l u e   r o w 1 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' c u s t o m e r _ n o ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                 < s p a n   c l a s s = " e m p t y   r o w 1 " > < / s p a n > 
 
 
 
                 < s p a n   c l a s s = " e m p t y   r o w 2 " > < / s p a n > 
 
                 < s p a n   c l a s s = " l a b e l   r o w 2 " >         : < / s p a n > 
 
                 < s p a n   c l a s s = " v a l u e   r o w 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                 < s p a n   c l a s s = " e m p t y   r o w 2 " > < / s p a n > 
 
 
 
                 < s p a n   c l a s s = " e m p t y   r o w 3 " > < / s p a n > 
 
                 < s p a n   c l a s s = " l a b e l   r o w 3 " >       : < / s p a n > 
 
                 < s p a n   c l a s s = " v a l u e   r o w 3 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                 < s p a n   c l a s s = " e m p t y   r o w 3 " > < / s p a n > 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   M E A S U R E M E N T S   = = = = =   - - > 
 
         < ? p h p   i f   ( e m p t y ( $ m e a s u r e m e n t s ) ) :   ? > 
 
                 < d i v   c l a s s = " n o - d a t a " >          !    &            &           !  `< / d i v > 
 
         < ? p h p   e l s e :   ? > 
 
                 < ? p h p   f o r e a c h   ( $ m e a s u r e m e n t s   a s   $ m ) :   ? > 
 
                         < d i v   c l a s s = " m e a s u r e m e n t - b l o c k " > 
 
                                 < d i v   c l a s s = " m e a s u r e m e n t - t i t l e " > 
 
                                                `  :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' m e a s u r e d _ d a t e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                                 < t a b l e   c l a s s = " m e a s u r e m e n t - t a b l e " > 
 
                                         < t b o d y > 
 
                                                 < ! - -   1 .    ` `      /   L e n g t h   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >  ` `    < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l e n g t h ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   2 .      `      /   S h o u l d e r   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >    `    < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h o u l d e r ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   3 .            /   S l e e v e   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >        < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s l e e v e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   4 .      &     /   W a i s t   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >    &   < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' w a i s t ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   5 .     `      /   L o o s i n g   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >   `    < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' l o o s i n g ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   6 .    !      `  /   C h e s t   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >  !      `< / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c h e s t ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   7 .             /   C o l l a r   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >         < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c o l l a r ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   8 .      `         `  /   S h e r w a n i   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >    `         `< / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h e r w a n i ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   9 .          `         `  /   C u f f   L e n g t h   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >        `         `< / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c u f f _ l e n g t h ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   1 0 .           `      /   C u f f   W i d t h   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >         `    < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' c u f f _ w i d t h ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   1 1 .          ` `     `    /   S i d e   P o c k e t   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >        ` `     `  < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s i d e p o c k e t ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   1 2 .        &            `    /   F r o n t   P o c k e t   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >      &            `  < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' f r o n t p o c k e t ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   1 3 .               `         `  /   S h a l w a r   L e n g t h   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >             `         `< / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r _ l e n g t h ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   1 4 .                /   B o t t o m   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >            < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r _ b o t t o m ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                                 < ! - -   1 5 .                 `    /   S h a l w a r   P o c k e t   - - > 
 
                                                 < t r > 
 
                                                         < t d   c l a s s = " e m p t y - l e f t " > < / t d > 
 
                                                         < t d   c l a s s = " l a b e l - c o l " >               `  < / t d > 
 
                                                         < t d   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' s h a l w a r p o c k e t ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " e m p t y - r i g h t " > < / t d > 
 
                                                 < / t r > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                                 
 
                                 < ! - -   = = = = =            R            (          `  +      R &         )   = = = = =   - - > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ m [ ' n o t e s ' ] )   | |   ! e m p t y ( $ m [ ' r e m a r k s ' ] ) ) :   ? > 
 
                                         < d i v   c l a s s = " e x t r a - n o t e s " > 
 
                                                 < d i v   c l a s s = " e m p t y " > < / d i v > 
 
                                                 
 
                                                 < ? p h p   i f   ( ! e m p t y ( $ m [ ' n o t e s ' ] ) ) :   ? > 
 
                                                         < d i v   c l a s s = " l a b e l - c o l " >          `: < / d i v > 
 
                                                         < d i v   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' n o t e s ' ] ) ;   ? > < / d i v > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < d i v   c l a s s = " l a b e l - c o l " >          `: < / d i v > 
 
                                                         < d i v   c l a s s = " v a l u e - c o l " > - < / d i v > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                                 
 
                                                 < ? p h p   i f   ( ! e m p t y ( $ m [ ' r e m a r k s ' ] ) ) :   ? > 
 
                                                         < d i v   c l a s s = " l a b e l - c o l " >    R &         : < / d i v > 
 
                                                         < d i v   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' r e m a r k s ' ] ) ;   ? > < / d i v > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < d i v   c l a s s = " l a b e l - c o l " >    R &         : < / d i v > 
 
                                                         < d i v   c l a s s = " v a l u e - c o l " > - < / d i v > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                                 
 
                                                 < d i v   c l a s s = " e m p t y " > < / d i v > 
 
                                         < / d i v > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                 < ? p h p   e n d f o r e a c h ;   ? > 
 
         < ? p h p   e n d i f ;   ? > 
 
 
 
         < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
         < d i v   c l a s s = " f o o t e r " > 
 
                 < d i v   c l a s s = " t h a n k y o u " >        `  ! < / d i v > 
 
               
 
                 < d i v   c l a s s = " s o f t w a r e " > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / d i v > 
 
         < / d i v > 
 
 
 
 < / d i v > 
 
 < ! - -   = = = = =   P R I N T   B U T T O N S   = = = = =   - - > 
 
 < d i v   c l a s s = " n o - p r i n t " > 
 
         < b u t t o n   c l a s s = " b t n - p r i n t "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t " > < / i >            < / b u t t o n > 
 
         < b u t t o n   c l a s s = " b t n - c l o s e "   o n c l i c k = " w i n d o w . c l o s e ( ) " > < i   c l a s s = " f a s   f a - t i m e s " > < / i >          < / b u t t o n > 
 
 < / d i v > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < s t y l e > 
 
         . o r d e r - f o r m - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . o r d e r - f o r m - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . o r d e r - f o r m - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . o r d e r - f o r m - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . f o r m - l a b e l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 m a r g i n - b o t t o m :   2 p x ; 
 
         } 
 
         . f o r m - l a b e l   . e n   { 
 
                 f o n t - w e i g h t :   4 0 0 ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
         } 
 
         . f o r m - c o n t r o l ,   . f o r m - s e l e c t   { 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   5 p x   8 p x ; 
 
         } 
 
         . f o r m - c o n t r o l : f o c u s ,   . f o r m - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - s u c c e s s - c u s t o m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   5 p x   2 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - s u c c e s s - c u s t o m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ,   0   4 p x   1 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   { 
 
                 b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   6 p x   1 2 p x ; 
 
                 b o r d e r - l e f t :   4 p x   s o l i d   # 2 5 6 3 e b ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   1 0 p x ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   i m g   { 
 
                 w i d t h :   3 2 p x ; 
 
                 h e i g h t :   3 2 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 o b j e c t - f i t :   c o v e r ; 
 
                 b o r d e r :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . i n f o   { 
 
                 f l e x :   1 ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . i n f o   s t r o n g   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . i n f o   s m a l l   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 5 5 5 ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . b a l a n c e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . i t e m - c a r d   { 
 
                 b a c k g r o u n d :   # f a f c f c ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 m a r g i n - b o t t o m :   6 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
         } 
 
         . i t e m - c a r d : h o v e r   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
         } 
 
         . i t e m - c a r d   . i t e m - h e a d e r   { 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 m a r g i n - b o t t o m :   3 p x ; 
 
         } 
 
         . i t e m - c a r d   . i t e m - h e a d e r   s m a l l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
                 p a d d i n g :   3 p x   6 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 m a r g i n - t o p :   3 p x ; 
 
                 d i s p l a y :   g r i d ; 
 
                 g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 3 ,   1 f r ) ; 
 
                 g a p :   1 p x   4 p x ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   . f i e l d   { 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 p a d d i n g :   1 p x   0 ; 
 
                 b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   . f i e l d   . l a b e l   { 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   . f i e l d   . v a l u e   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . s u m m a r y - b o x   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 m a r g i n - t o p :   6 p x ; 
 
         } 
 
         . s u m m a r y - b o x   . l a b e l   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
         } 
 
         . s u m m a r y - b o x   . v a l u e   { 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . s u m m a r y - b o x   . v a l u e . n e t   { 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
         } 
 
         . s u m m a r y - b o x   . v a l u e . b a l a n c e   { 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
         } 
 
         . a d v a n c e - i n p u t   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r :   2 p x   s o l i d   # d 1 d 5 d b ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
                 p a d d i n g :   3 p x   8 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
         } 
 
         . a d v a n c e - i n p u t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - o u t l i n e - p r i m a r y - c u s t o m   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 2 5 6 3 e b ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 b o x - s h a d o w :   0   0   8 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - o u t l i n e - p r i m a r y - c u s t o m : h o v e r   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 5 ) ; 
 
         } 
 
         . b t n - o u t l i n e - d a n g e r - s m   { 
 
                 b o r d e r :   n o n e ; 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   0   4 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
         } 
 
         . b t n - o u t l i n e - d a n g e r - s m : h o v e r   { 
 
                 c o l o r :   # a 7 1 d 2 a ; 
 
                 t r a n s f o r m :   s c a l e ( 1 . 2 ) ; 
 
         } 
 
         . c u s t o m e r - s e a r c h - i n p u t   { 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 p a d d i n g :   5 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
         } 
 
         . c u s t o m e r - s e a r c h - i n p u t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   { 
 
                 m a x - h e i g h t :   1 4 0 p x ; 
 
                 o v e r f l o w - y :   a u t o ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # d 1 d 5 d b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 m a r g i n - t o p :   3 p x ; 
 
                 d i s p l a y :   n o n e ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   { 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   8 p x ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m : h o v e r   { 
 
                 b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   i m g   { 
 
                 w i d t h :   2 4 p x ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 o b j e c t - f i t :   c o v e r ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   . i n f o   { 
 
                 f l e x :   1 ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   . i n f o   . n a m e   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   . i n f o   . p h o n e   { 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 m a r g i n - l e f t :   6 p x ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . m e a s u r e m e n t - p r e v i e w   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   } 
 
                 . s u m m a r y - b o x   . r o w   {   f l e x - d i r e c t i o n :   c o l u m n ;   } 
 
                 . c u s t o m e r - i n f o - b o x   {   f l e x - w r a p :   w r a p ;   } 
 
                 . o r d e r - f o r m - c a r d   . c a r d - b o d y   {   p a d d i n g :   8 p x   1 0 p x ;   } 
 
                 . f o r m - c o n t r o l ,   . f o r m - s e l e c t   {   f o n t - s i z e :   1 1 p x ;   p a d d i n g :   4 p x   6 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   o r d e r - f o r m - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - p l u s - c i r c l e   m e - 2 " > < / i > N e w   O r d e r < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   i d = " o r d e r F o r m " > 
 
                         < ! - -   = = = = =   C U S T O M E R   = = = = =   - - > 
 
                         < d i v   c l a s s = " r o w   g - 1   m b - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 5 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > C u s t o m e r   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < d i v   c l a s s = " i n p u t - g r o u p " > 
 
                                                 < i n p u t   t y p e = " t e x t "   i d = " c u s t o m e r S e a r c h "   c l a s s = " c u s t o m e r - s e a r c h - i n p u t "   
 
                                                               p l a c e h o l d e r = " S e a r c h   b y   n a m e   o r   p h o n e . . . "   a u t o c o m p l e t e = " o f f " > 
 
                                                 < s p a n   c l a s s = " i n p u t - g r o u p - t e x t "   s t y l e = " b a c k g r o u n d : t r a n s p a r e n t ;   b o r d e r : n o n e ;   p a d d i n g - l e f t : 0 ; " > 
 
                                                         < b u t t o n   t y p e = " b u t t o n "   i d = " c l e a r C u s t o m e r "   c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - s e c o n d a r y "   s t y l e = " b o r d e r - r a d i u s : 3 0 p x ; " >  S" < / b u t t o n > 
 
                                                 < / s p a n > 
 
                                         < / d i v > 
 
                                         < d i v   i d = " c u s t o m e r R e s u l t s "   c l a s s = " c u s t o m e r - r e s u l t s " > < / d i v > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " c u s t o m e r _ i d "   i d = " s e l e c t e d C u s t o m e r I d "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > O r d e r   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " o r d e r _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > D e l i v e r y   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " d e l i v e r y _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " p e n d i n g " > P e n d i n g < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " c u t t i n g " > C u t t i n g < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " s t i t c h i n g " > S t i t c h i n g < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " r e a d y " > R e a d y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " d e l i v e r e d " > D e l i v e r e d < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S E L E C T E D   C U S T O M E R   I N F O   = = = = =   - - > 
 
                         < d i v   i d = " c u s t o m e r I n f o "   s t y l e = " d i s p l a y : n o n e ; "   c l a s s = " c u s t o m e r - i n f o - b o x " > 
 
                                 < i m g   i d = " s e l e c t e d C u s t o m e r P i c "   s r c = " "   a l t = " " > 
 
                                 < d i v   c l a s s = " i n f o " > 
 
                                         < s t r o n g   i d = " s e l e c t e d C u s t o m e r N a m e " > < / s t r o n g > 
 
                                         < s m a l l   i d = " s e l e c t e d C u s t o m e r P h o n e "   c l a s s = " t e x t - m u t e d " > < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   O R D E R   I T E M S   = = = = =   - - > 
 
                         < d i v   i d = " i t e m s C o n t a i n e r " > 
 
                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 1 " > 
 
                                         < h 6   c l a s s = " f w - b o l d   m b - 0 "   s t y l e = " f o n t - s i z e : 1 3 p x ; " > 
 
                                                 < i   c l a s s = " f a s   f a - l i s t   m e - 2 "   s t y l e = " c o l o r : # 2 5 6 3 e b ; " > < / i > 
 
                                                 O r d e r   I t e m s 
 
                                         < / h 6 > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - o u t l i n e - p r i m a r y - c u s t o m "   i d = " a d d I t e m B t n " > 
 
                                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   i d = " i t e m s L i s t " > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S U M M A R Y   = = = = =   - - > 
 
                         < d i v   c l a s s = " r o w   g - 1   m t - 2 " > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < d i v   c l a s s = " s u m m a r y - b o x " > 
 
                                                 < d i v   c l a s s = " r o w   g - 1   a l i g n - i t e m s - e n d " > 
 
                                                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                 < d i v   c l a s s = " l a b e l " > S u b   T o t a l < / d i v > 
 
                                                                 < d i v   c l a s s = " v a l u e "   i d = " s u b T o t a l D i s p l a y " > R s .   0 . 0 0 < / d i v > 
 
                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u b _ t o t a l "   i d = " s u b T o t a l "   v a l u e = " 0 " > 
 
                                                         < / d i v > 
 
                                                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                 < d i v   c l a s s = " l a b e l " > N e t   T o t a l < / d i v > 
 
                                                                 < d i v   c l a s s = " v a l u e   n e t "   i d = " n e t T o t a l D i s p l a y " > R s .   0 . 0 0 < / d i v > 
 
                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " n e t _ t o t a l "   i d = " n e t T o t a l "   v a l u e = " 0 " > 
 
                                                         < / d i v > 
 
                                                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                 < d i v   c l a s s = " l a b e l " > A d v a n c e < / d i v > 
 
                                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " a d v a n c e "   i d = " a d v a n c e "   
 
                                                                               c l a s s = " a d v a n c e - i n p u t "   v a l u e = " 0 " > 
 
                                                         < / d i v > 
 
                                                         < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                                                 < d i v   c l a s s = " l a b e l   t e x t - d a n g e r " > B a l a n c e < / d i v > 
 
                                                                 < d i v   c l a s s = " v a l u e   b a l a n c e "   i d = " f i n a l B a l a n c e D i s p l a y " > R s .   0 . 0 0 < / d i v > 
 
                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " f i n a l _ b a l a n c e "   i d = " f i n a l B a l a n c e "   v a l u e = " 0 " > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
                         < d i v   c l a s s = " m t - 2   d - f l e x   g a p - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s u c c e s s - c u s t o m   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   S a v e 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 2 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 ( f u n c t i o n ( )   { 
 
         ' u s e   s t r i c t ' ; 
 
 
 
         / /   D O M   R e f e r e n c e s 
 
         c o n s t   c u s t o m e r S e a r c h   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r S e a r c h ' ) ; 
 
         c o n s t   c u s t o m e r R e s u l t s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r R e s u l t s ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r I d   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r I d ' ) ; 
 
         c o n s t   c u s t o m e r I n f o   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r I n f o ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r P i c   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r P i c ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r N a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r N a m e ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r P h o n e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r P h o n e ' ) ; 
 
         c o n s t   i t e m s L i s t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' i t e m s L i s t ' ) ; 
 
         c o n s t   a d d I t e m B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' a d d I t e m B t n ' ) ; 
 
         c o n s t   a d v a n c e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' a d v a n c e ' ) ; 
 
 
 
         c o n s t   s u b T o t a l D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b T o t a l D i s p l a y ' ) ; 
 
         c o n s t   n e t T o t a l D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' n e t T o t a l D i s p l a y ' ) ; 
 
         c o n s t   f i n a l B a l a n c e D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' f i n a l B a l a n c e D i s p l a y ' ) ; 
 
 
 
         c o n s t   s u b T o t a l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b T o t a l ' ) ; 
 
         c o n s t   n e t T o t a l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' n e t T o t a l ' ) ; 
 
         c o n s t   f i n a l B a l a n c e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' f i n a l B a l a n c e ' ) ; 
 
 
 
         l e t   s e l e c t e d C u s t I d   =   0 ; 
 
         l e t   i t e m C o u n t e r   =   0 ; 
 
         l e t   c u s t o m e r M e a s u r e m e n t s   =   [ ] ; 
 
         l e t   r a t e s   =   [ ] ; 
 
         t r y   { 
 
                 r a t e s   =   < ? p h p   e c h o   j s o n _ e n c o d e ( $ r a t e s   ? ?   [ ] ) ;   ? > ; 
 
                 i f   ( ! A r r a y . i s A r r a y ( r a t e s ) )   r a t e s   =   [ ] ; 
 
         }   c a t c h ( e )   {   r a t e s   =   [ ] ;   } 
 
 
 
         / /   = = = = =   F I E L D   L A B E L S   = = = = = 
 
         c o n s t   f i e l d L a b e l s   =   [ 
 
                 {   k e y :   ' l e n g t h ' ,   l a b e l :   ' L e n g t h '   } , 
 
                 {   k e y :   ' s h o u l d e r ' ,   l a b e l :   ' S h o u l d e r '   } , 
 
                 {   k e y :   ' s l e e v e ' ,   l a b e l :   ' S l e e v e '   } , 
 
                 {   k e y :   ' w a i s t ' ,   l a b e l :   ' W a i s t '   } , 
 
                 {   k e y :   ' l o o s i n g ' ,   l a b e l :   ' L o o s i n g '   } , 
 
                 {   k e y :   ' c h e s t ' ,   l a b e l :   ' C h e s t '   } , 
 
                 {   k e y :   ' c o l l a r ' ,   l a b e l :   ' C o l l a r '   } , 
 
                 {   k e y :   ' s h e r w a n i ' ,   l a b e l :   ' S h e r w a n i '   } , 
 
                 {   k e y :   ' c u f f _ l e n g t h ' ,   l a b e l :   ' C u f f   L e n g t h '   } , 
 
                 {   k e y :   ' c u f f _ w i d t h ' ,   l a b e l :   ' C u f f   W i d t h '   } , 
 
                 {   k e y :   ' s i d e p o c k e t ' ,   l a b e l :   ' S i d e   P o c k e t '   } , 
 
                 {   k e y :   ' f r o n t p o c k e t ' ,   l a b e l :   ' F r o n t   P o c k e t '   } , 
 
                 {   k e y :   ' s h a l w a r _ l e n g t h ' ,   l a b e l :   ' S h a l w a r   L e n g t h '   } , 
 
                 {   k e y :   ' s h a l w a r _ b o t t o m ' ,   l a b e l :   ' S h a l w a r   B o t t o m '   } , 
 
                 {   k e y :   ' s h a l w a r p o c k e t ' ,   l a b e l :   ' S h a l w a r   P o c k e t '   } 
 
         ] ; 
 
 
 
         / /   = = = = =   C U S T O M E R   S E A R C H   = = = = = 
 
         c u s t o m e r S e a r c h . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                 c o n s t   t e r m   =   t h i s . v a l u e . t r i m ( ) ; 
 
                 i f   ( t e r m . l e n g t h   <   2 )   {   c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ;   r e t u r n ;   } 
 
                 f e t c h ( ' i n d e x . p h p ? a c t i o n = c u s t o m e r _ s e a r c h & t e r m = '   +   e n c o d e U R I C o m p o n e n t ( t e r m ) ) 
 
                         . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                         . t h e n ( d a t a   = >   { 
 
                                 c u s t o m e r R e s u l t s . i n n e r H T M L   =   ' ' ; 
 
                                 i f   ( d a t a . l e n g t h   = = =   0 )   { 
 
                                         c u s t o m e r R e s u l t s . i n n e r H T M L   =   ' < d i v   c l a s s = " l i s t - i t e m " > < s m a l l   c l a s s = " t e x t - m u t e d " > N o   c u s t o m e r s   f o u n d . < / s m a l l > < / d i v > ' ; 
 
                                 }   e l s e   { 
 
                                         d a t a . f o r E a c h ( c   = >   { 
 
                                                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                                                 d i v . c l a s s N a m e   =   ' l i s t - i t e m ' ; 
 
                                                 d i v . i n n e r H T M L   =   ` 
 
                                                         < i m g   s r c = " $ { c . p r o f i l e _ p i c } "   o n e r r o r = " t h i s . s r c = ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = $ { e n c o d e U R I C o m p o n e n t ( c . n a m e ) } & b a c k g r o u n d = 2 5 6 3 e b & c o l o r = f f f & s i z e = 2 8 ' " > 
 
                                                         < d i v   c l a s s = " i n f o " > 
 
                                                                 < s p a n   c l a s s = " n a m e " > $ { c . n a m e } < / s p a n > 
 
                                                                 < s p a n   c l a s s = " p h o n e " > $ { c . p h o n e } < / s p a n > 
 
                                                         < / d i v > 
 
                                                 ` ; 
 
                                                 d i v . o n c l i c k   =   f u n c t i o n ( )   {   s e l e c t C u s t o m e r ( c ) ;   } ; 
 
                                                 c u s t o m e r R e s u l t s . a p p e n d C h i l d ( d i v ) ; 
 
                                         } ) ; 
 
                                 } 
 
                                 c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                         } ) ; 
 
         } ) ; 
 
 
 
         f u n c t i o n   s e l e c t C u s t o m e r ( c )   { 
 
                 s e l e c t e d C u s t I d   =   c . i d ; 
 
                 s e l e c t e d C u s t o m e r I d . v a l u e   =   c . i d ; 
 
                 c u s t o m e r S e a r c h . v a l u e   =   c . n a m e   +   '   ( '   +   c . p h o n e   +   ' ) ' ; 
 
                 c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 c u s t o m e r I n f o . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 s e l e c t e d C u s t o m e r P i c . s r c   =   c . p r o f i l e _ p i c   | |   ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' ; 
 
                 s e l e c t e d C u s t o m e r N a m e . t e x t C o n t e n t   =   c . n a m e ; 
 
                 s e l e c t e d C u s t o m e r P h o n e . t e x t C o n t e n t   =   c . p h o n e ; 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
                 l o a d C u s t o m e r M e a s u r e m e n t s ( c . i d ) ; 
 
         } 
 
 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c l e a r C u s t o m e r ' ) . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 c u s t o m e r S e a r c h . v a l u e   =   ' ' ; 
 
                 s e l e c t e d C u s t o m e r I d . v a l u e   =   ' ' ; 
 
                 c u s t o m e r I n f o . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 s e l e c t e d C u s t I d   =   0 ; 
 
                 c u s t o m e r M e a s u r e m e n t s   =   [ ] ; 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
                 d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . m e a s u r e m e n t - s e l e c t ' ) . f o r E a c h ( s e l   = >   { 
 
                         s e l . i n n e r H T M L   =   ' < o p t i o n   v a l u e = " " > S e l e c t < / o p t i o n > ' ; 
 
                 } ) ; 
 
         } ) ; 
 
 
 
         f u n c t i o n   l o a d C u s t o m e r M e a s u r e m e n t s ( c u s t o m e r I d )   { 
 
                 f e t c h ( ' i n d e x . p h p ? a c t i o n = g e t _ m e a s u r e m e n t s & c u s t o m e r _ i d = '   +   c u s t o m e r I d ) 
 
                         . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                         . t h e n ( d a t a   = >   { 
 
                                 c u s t o m e r M e a s u r e m e n t s   =   d a t a ; 
 
                                 d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . m e a s u r e m e n t - s e l e c t ' ) . f o r E a c h ( s e l   = >   p o p u l a t e M e a s u r e m e n t S e l e c t ( s e l ) ) ; 
 
                         } ) ; 
 
         } 
 
 
 
         f u n c t i o n   p o p u l a t e M e a s u r e m e n t S e l e c t ( s e l e c t )   { 
 
                 c o n s t   c u r r e n t V a l   =   s e l e c t . v a l u e ; 
 
                 s e l e c t . i n n e r H T M L   =   ' < o p t i o n   v a l u e = " " > S e l e c t < / o p t i o n > ' ; 
 
                 c o n s t   s o r t e d   =   [ . . . c u s t o m e r M e a s u r e m e n t s ] . s o r t ( ( a ,   b )   = >   b . m e a s u r e d _ d a t e . l o c a l e C o m p a r e ( a . m e a s u r e d _ d a t e ) ) ; 
 
                 s o r t e d . f o r E a c h ( m   = >   { 
 
                         c o n s t   o p t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' o p t i o n ' ) ; 
 
                         o p t . v a l u e   =   m . i d ; 
 
                         o p t . t e x t C o n t e n t   =   m . m e a s u r e d _ d a t e   +   '   ( C h e s t :   '   +   ( m . c h e s t   | |   ' N / A ' )   +   ' ,   W a i s t :   '   +   ( m . w a i s t   | |   ' N / A ' )   +   ' ) ' ; 
 
                         s e l e c t . a p p e n d C h i l d ( o p t ) ; 
 
                 } ) ; 
 
                 i f   ( c u r r e n t V a l )   s e l e c t . v a l u e   =   c u r r e n t V a l ; 
 
                 u p d a t e M e a s u r e m e n t P r e v i e w ( s e l e c t ) ; 
 
         } 
 
 
 
         / /   = = = = =   A D D   I T E M   = = = = = 
 
         f u n c t i o n   a d d I t e m ( d a t a )   { 
 
                 i t e m C o u n t e r + + ; 
 
                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                 d i v . c l a s s N a m e   =   ' i t e m - c a r d ' ; 
 
                 d i v . i d   =   ' i t e m - '   +   i t e m C o u n t e r ; 
 
                 d i v . i n n e r H T M L   =   ` 
 
                         < d i v   c l a s s = " i t e m - h e a d e r " > 
 
                                 < s m a l l > I t e m   # $ { i t e m C o u n t e r } < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - o u t l i n e - d a n g e r - s m   r e m o v e - i t e m - b t n " >  S" < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > T y p e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " t y p e [ ] "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   i t e m - t y p e " > 
 
                                                 < o p t i o n   v a l u e = " " > S e l e c t < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ t y p e s   a s   $ t ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' t y p e ' ] ) ;   ? > " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' t y p e ' ] ) ;   ? > < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S i z e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s i z e [ ] "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   i t e m - s i z e " > 
 
                                                 < o p t i o n   v a l u e = " S m a l l " > S m a l l < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " M e d i u m " > M e d i u m < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " L a r g e "   s e l e c t e d > L a r g e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " E x t r a   L a r g e " > E x t r a   L a r g e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > Q t y < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " q t y [ ] "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   i t e m - q t y "   v a l u e = " 1 "   m i n = " 1 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > R a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e [ ] "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   i t e m - r a t e "   v a l u e = " 0 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > T o t a l < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " i t e m _ t o t a l [ ] "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   i t e m - t o t a l "   v a l u e = " 0 "   r e a d o n l y > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w   g - 1   m t - 1 " > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y   f w - b o l d " > 
 
                                                 < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 1 " > < / i >   M e a s u r e m e n t 
 
                                         < / l a b e l > 
 
                                         < s e l e c t   n a m e = " m e a s u r e m e n t _ i d [ ] "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > S e l e c t < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m e a s u r e m e n t - p r e v i e w "   s t y l e = " d i s p l a y : n o n e ; " > < / d i v > 
 
                 ` ; 
 
                 i t e m s L i s t . a p p e n d C h i l d ( d i v ) ; 
 
 
 
                 d i v . q u e r y S e l e c t o r ( ' . r e m o v e - i t e m - b t n ' ) . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                         d i v . r e m o v e ( ) ; 
 
                         c a l c u l a t e T o t a l s ( ) ; 
 
                 } ) ; 
 
 
 
                 c o n s t   t y p e S e l   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - t y p e ' ) ; 
 
                 c o n s t   s i z e S e l   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - s i z e ' ) ; 
 
                 c o n s t   q t y I n p   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - q t y ' ) ; 
 
                 c o n s t   r a t e I n p   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - r a t e ' ) ; 
 
                 c o n s t   t o t a l I n p   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - t o t a l ' ) ; 
 
                 c o n s t   m e a s u r e S e l   =   d i v . q u e r y S e l e c t o r ( ' . m e a s u r e m e n t - s e l e c t ' ) ; 
 
                 c o n s t   p r e v i e w D i v   =   d i v . q u e r y S e l e c t o r ( ' . m e a s u r e m e n t - p r e v i e w ' ) ; 
 
 
 
                 r a t e I n p . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                 } ) ; 
 
 
 
                 t y p e S e l . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                         g e t R a t e ( t y p e S e l ,   s i z e S e l ,   r a t e I n p ,   q t y I n p ,   t o t a l I n p ) ; 
 
                 } ) ; 
 
 
 
                 s i z e S e l . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                         g e t R a t e ( t y p e S e l ,   s i z e S e l ,   r a t e I n p ,   q t y I n p ,   t o t a l I n p ) ; 
 
                 } ) ; 
 
 
 
                 q t y I n p . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                 } ) ; 
 
 
 
                 m e a s u r e S e l . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                         u p d a t e M e a s u r e m e n t P r e v i e w ( m e a s u r e S e l ) ; 
 
                 } ) ; 
 
 
 
                 i f   ( c u s t o m e r M e a s u r e m e n t s . l e n g t h   >   0 )   { 
 
                         p o p u l a t e M e a s u r e m e n t S e l e c t ( m e a s u r e S e l ) ; 
 
                 } 
 
 
 
                 i f   ( d a t a )   { 
 
                         c o n s t   f i e l d s   =   [ ' t y p e ' ,   ' s i z e ' ,   ' q t y ' ,   ' r a t e ' ,   ' m e a s u r e m e n t _ i d ' ] ; 
 
                         f i e l d s . f o r E a c h ( f   = >   { 
 
                                 c o n s t   e l   =   d i v . q u e r y S e l e c t o r ( ` [ n a m e = " $ { f } [ ] " ] ` ) ; 
 
                                 i f   ( e l   & &   d a t a [ f ]   ! = =   u n d e f i n e d )   e l . v a l u e   =   d a t a [ f ] ; 
 
                         } ) ; 
 
                         i f   ( d a t a . t o t a l   ! = =   u n d e f i n e d )   t o t a l I n p . v a l u e   =   d a t a . t o t a l ; 
 
                         i f   ( d a t a . m e a s u r e m e n t _ i d )   { 
 
                                 s e t T i m e o u t ( ( )   = >   { 
 
                                         m e a s u r e S e l . v a l u e   =   d a t a . m e a s u r e m e n t _ i d ; 
 
                                         u p d a t e M e a s u r e m e n t P r e v i e w ( m e a s u r e S e l ) ; 
 
                                 } ,   1 0 0 ) ; 
 
                         } 
 
                 } 
 
 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
         } 
 
 
 
         a d d I t e m B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   {   a d d I t e m ( ) ;   } ) ; 
 
 
 
         f u n c t i o n   g e t R a t e ( t y p e S e l ,   s i z e S e l ,   r a t e I n p ,   q t y I n p ,   t o t a l I n p )   { 
 
                 c o n s t   t y p e   =   t y p e S e l . v a l u e ; 
 
                 c o n s t   s i z e   =   s i z e S e l . v a l u e ; 
 
                 i f   ( ! t y p e   | |   ! s i z e )   { 
 
                         r a t e I n p . v a l u e   =   0 ; 
 
                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                         r e t u r n ; 
 
                 } 
 
                 l e t   r a t e   =   0 ; 
 
                 f o r   ( l e t   r   o f   r a t e s )   { 
 
                         i f   ( r . t y p e   = = =   t y p e   & &   r . s i z e   = = =   s i z e )   {   r a t e   =   p a r s e F l o a t ( r . r a t e ) ;   b r e a k ;   } 
 
                 } 
 
                 i f   ( r a t e   >   0 )   { 
 
                         r a t e I n p . v a l u e   =   r a t e ; 
 
                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                 }   e l s e   { 
 
                         f e t c h ( ' i n d e x . p h p ? a c t i o n = g e t _ r a t e & t y p e = '   +   e n c o d e U R I C o m p o n e n t ( t y p e )   +   ' & s i z e = '   +   e n c o d e U R I C o m p o n e n t ( s i z e ) ) 
 
                                 . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                                 . t h e n ( d a t a   = >   { 
 
                                         r a t e I n p . v a l u e   =   d a t a . r a t e   | |   0 ; 
 
                                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                                 } ) ; 
 
                 } 
 
         } 
 
 
 
         f u n c t i o n   c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p )   { 
 
                 c o n s t   q t y   =   p a r s e F l o a t ( q t y I n p . v a l u e )   | |   0 ; 
 
                 c o n s t   r a t e   =   p a r s e F l o a t ( r a t e I n p . v a l u e )   | |   0 ; 
 
                 t o t a l I n p . v a l u e   =   ( q t y   *   r a t e ) . t o F i x e d ( 2 ) ; 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
         } 
 
 
 
         f u n c t i o n   u p d a t e M e a s u r e m e n t P r e v i e w ( s e l e c t )   { 
 
                 c o n s t   c a r d   =   s e l e c t . c l o s e s t ( ' . i t e m - c a r d ' ) ; 
 
                 c o n s t   p r e v i e w D i v   =   c a r d . q u e r y S e l e c t o r ( ' . m e a s u r e m e n t - p r e v i e w ' ) ; 
 
                 c o n s t   m e a s u r e m e n t I d   =   s e l e c t . v a l u e ; 
 
                 i f   ( ! m e a s u r e m e n t I d )   {   p r e v i e w D i v . s t y l e . d i s p l a y   =   ' n o n e ' ;   r e t u r n ;   } 
 
                 c o n s t   m e a s u r e m e n t   =   c u s t o m e r M e a s u r e m e n t s . f i n d ( m   = >   m . i d   = =   m e a s u r e m e n t I d ) ; 
 
                 i f   ( ! m e a s u r e m e n t )   {   p r e v i e w D i v . s t y l e . d i s p l a y   =   ' n o n e ' ;   r e t u r n ;   } 
 
                 
 
                 p r e v i e w D i v . s t y l e . d i s p l a y   =   ' g r i d ' ; 
 
                 p r e v i e w D i v . i n n e r H T M L   =   ' ' ; 
 
                 
 
                 f i e l d L a b e l s . f o r E a c h ( f   = >   { 
 
                         l e t   v a l   =   m e a s u r e m e n t [ f . k e y ] ; 
 
                         i f   ( v a l   = = =   u n d e f i n e d   | |   v a l   = = =   n u l l   | |   v a l   = = =   ' ' )   v a l   =   ' - ' ; 
 
                         c o n s t   f i e l d D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                         f i e l d D i v . c l a s s N a m e   =   ' f i e l d ' ; 
 
                         f i e l d D i v . i n n e r H T M L   =   ` < s p a n   c l a s s = " l a b e l " > $ { f . l a b e l } < / s p a n > < s p a n   c l a s s = " v a l u e " > $ { v a l } < / s p a n > ` ; 
 
                         p r e v i e w D i v . a p p e n d C h i l d ( f i e l d D i v ) ; 
 
                 } ) ; 
 
         } 
 
 
 
         / /   = = = = =   C A L C U L A T E   T O T A L S   = = = = = 
 
         f u n c t i o n   c a l c u l a t e T o t a l s ( )   { 
 
                 l e t   s u b T o t a l V a l   =   0 ; 
 
                 d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # i t e m s L i s t   . i t e m - c a r d ' ) . f o r E a c h ( r o w   = >   { 
 
                         c o n s t   t o t a l   =   p a r s e F l o a t ( r o w . q u e r y S e l e c t o r ( ' . i t e m - t o t a l ' ) . v a l u e )   | |   0 ; 
 
                         s u b T o t a l V a l   + =   t o t a l ; 
 
                 } ) ; 
 
                 
 
                 c o n s t   n e t   =   s u b T o t a l V a l ; 
 
                 c o n s t   a d v   =   p a r s e F l o a t ( a d v a n c e . v a l u e )   | |   0 ; 
 
                 c o n s t   f i n a l B a l   =   n e t   -   a d v ; 
 
 
 
                 s u b T o t a l . v a l u e   =   s u b T o t a l V a l . t o F i x e d ( 2 ) ; 
 
                 n e t T o t a l . v a l u e   =   n e t . t o F i x e d ( 2 ) ; 
 
                 f i n a l B a l a n c e . v a l u e   =   f i n a l B a l . t o F i x e d ( 2 ) ; 
 
 
 
                 s u b T o t a l D i s p l a y . t e x t C o n t e n t   =   ' R s .   '   +   s u b T o t a l V a l . t o F i x e d ( 2 ) ; 
 
                 n e t T o t a l D i s p l a y . t e x t C o n t e n t   =   ' R s .   '   +   n e t . t o F i x e d ( 2 ) ; 
 
                 f i n a l B a l a n c e D i s p l a y . t e x t C o n t e n t   =   ' R s .   '   +   f i n a l B a l . t o F i x e d ( 2 ) ; 
 
         } 
 
 
 
         / /   = = = = =   F O R M   V A L I D A T I O N   = = = = = 
 
         c o n s t   o r d e r F o r m   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' o r d e r F o r m ' ) ; 
 
         o r d e r F o r m . a d d E v e n t L i s t e n e r ( ' s u b m i t ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ! s e l e c t e d C u s t o m e r I d . v a l u e )   {   a l e r t ( ' P l e a s e   s e l e c t   a   c u s t o m e r . ' ) ;   e . p r e v e n t D e f a u l t ( ) ;   r e t u r n   f a l s e ;   } 
 
                 i f   ( d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # i t e m s L i s t   . i t e m - c a r d ' ) . l e n g t h   = = =   0 )   {   a l e r t ( ' P l e a s e   a d d   a t   l e a s t   o n e   i t e m . ' ) ;   e . p r e v e n t D e f a u l t ( ) ;   r e t u r n   f a l s e ;   } 
 
                 r e t u r n   t r u e ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   I N I T   = = = = = 
 
         a d d I t e m ( ) ; 
 
 
 
         a d v a n c e . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
         } ) ; 
 
 
 
 } ) ( ) ; 
 
 < / s c r i p t > 
 
 < s t y l e > 
 
         . o r d e r - f o r m - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . o r d e r - f o r m - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 4 f 8 a 8 b   0 % ,   # 2 c 5 f 6 e   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
         } 
 
         . o r d e r - f o r m - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . o r d e r - f o r m - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f o r m - l a b e l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 m a r g i n - b o t t o m :   2 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . f o r m - l a b e l   . e n   { 
 
                 f o n t - w e i g h t :   4 0 0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
         } 
 
         . f o r m - c o n t r o l ,   . f o r m - s e l e c t   { 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   5 p x   8 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . f o r m - c o n t r o l : f o c u s ,   . f o r m - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 4 f 8 a 8 b ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - s u c c e s s - c u s t o m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 c 5 f 6 e   0 % ,   # 4 f 8 a 8 b   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   5 p x   1 8 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . b t n - s u c c e s s - c u s t o m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   { 
 
                 b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   6 p x   1 2 p x ; 
 
                 b o r d e r - l e f t :   4 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   1 0 p x ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   i m g   { 
 
                 w i d t h :   3 2 p x ; 
 
                 h e i g h t :   3 2 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 o b j e c t - f i t :   c o v e r ; 
 
                 b o r d e r :   2 p x   s o l i d   # 4 f 8 a 8 b ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . i n f o   { 
 
                 f l e x :   1 ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . i n f o   s t r o n g   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . i n f o   s m a l l   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 5 5 5 ; 
 
         } 
 
         . c u s t o m e r - i n f o - b o x   . b a l a n c e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . i t e m - c a r d   { 
 
                 b a c k g r o u n d :   # f a f c f c ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 m a r g i n - b o t t o m :   6 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
         } 
 
         . i t e m - c a r d : h o v e r   { 
 
                 b o r d e r - c o l o r :   # 4 f 8 a 8 b ; 
 
         } 
 
         . i t e m - c a r d   . i t e m - h e a d e r   { 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 m a r g i n - b o t t o m :   3 p x ; 
 
         } 
 
         . i t e m - c a r d   . i t e m - h e a d e r   s m a l l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 f 8 a 8 b ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
                 p a d d i n g :   3 p x   6 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 m a r g i n - t o p :   3 p x ; 
 
                 d i s p l a y :   g r i d ; 
 
                 g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 3 ,   1 f r ) ; 
 
                 g a p :   1 p x   4 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   . f i e l d   { 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 p a d d i n g :   1 p x   0 ; 
 
                 b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   . f i e l d   . l a b e l   { 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
         } 
 
         . m e a s u r e m e n t - p r e v i e w   . f i e l d   . v a l u e   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . s u m m a r y - b o x   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 m a r g i n - t o p :   6 p x ; 
 
         } 
 
         . s u m m a r y - b o x   . l a b e l   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . s u m m a r y - b o x   . v a l u e   { 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . s u m m a r y - b o x   . v a l u e . n e t   { 
 
                 c o l o r :   # 4 f 8 a 8 b ; 
 
         } 
 
         . s u m m a r y - b o x   . v a l u e . b a l a n c e   { 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
         } 
 
         . a d v a n c e - i n p u t   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
                 p a d d i n g :   3 p x   8 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . a d v a n c e - i n p u t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 4 f 8 a 8 b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - o u t l i n e - p r i m a r y - c u s t o m   { 
 
                 b o r d e r - c o l o r :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # 4 f 8 a 8 b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . b t n - o u t l i n e - p r i m a r y - c u s t o m : h o v e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   8 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 2 ) ; 
 
         } 
 
         . b t n - o u t l i n e - d a n g e r - s m   { 
 
                 b o r d e r :   n o n e ; 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   0   4 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
         } 
 
         . b t n - o u t l i n e - d a n g e r - s m : h o v e r   { 
 
                 c o l o r :   # a 7 1 d 2 a ; 
 
                 t r a n s f o r m :   s c a l e ( 1 . 2 ) ; 
 
         } 
 
         . c u s t o m e r - s e a r c h - i n p u t   { 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   5 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s   e a s e ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . c u s t o m e r - s e a r c h - i n p u t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 4 f 8 a 8 b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 1 5 ) ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   { 
 
                 m a x - h e i g h t :   1 4 0 p x ; 
 
                 o v e r f l o w - y :   a u t o ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 m a r g i n - t o p :   3 p x ; 
 
                 d i s p l a y :   n o n e ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   { 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   8 p x ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m : h o v e r   { 
 
                 b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   i m g   { 
 
                 w i d t h :   2 4 p x ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 o b j e c t - f i t :   c o v e r ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   . i n f o   { 
 
                 f l e x :   1 ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   . i n f o   . n a m e   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . c u s t o m e r - r e s u l t s   . l i s t - i t e m   . i n f o   . p h o n e   { 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 m a r g i n - l e f t :   6 p x ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . m e a s u r e m e n t - p r e v i e w   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   } 
 
                 . s u m m a r y - b o x   . r o w   {   f l e x - d i r e c t i o n :   c o l u m n ;   } 
 
                 . c u s t o m e r - i n f o - b o x   {   f l e x - w r a p :   w r a p ;   } 
 
                 . o r d e r - f o r m - c a r d   . c a r d - b o d y   {   p a d d i n g :   8 p x   1 0 p x ;   } 
 
                 . f o r m - c o n t r o l ,   . f o r m - s e l e c t   {   f o n t - s i z e :   1 1 p x ;   p a d d i n g :   4 p x   6 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   o r d e r - f o r m - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - e d i t   m e - 2 " > < / i >      `             &  ` &   /   E d i t   O r d e r   # < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   i d = " o r d e r F o r m " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   v a l u e = " < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > " > 
 
                         
 
                         < ! - -   = = = = =   C U S T O M E R   = = = = =   - - > 
 
                         < d i v   c l a s s = " r o w   g - 1   m b - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 5 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >        !     /   C u s t o m e r   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < d i v   c l a s s = " i n p u t - g r o u p " > 
 
                                                 < i n p u t   t y p e = " t e x t "   i d = " c u s t o m e r S e a r c h "   c l a s s = " c u s t o m e r - s e a r c h - i n p u t "   
 
                                                               p l a c e h o l d e r = "       &   /                          !  `   /   S e a r c h   b y   n a m e   o r   p h o n e . . . "   a u t o c o m p l e t e = " o f f " 
 
                                                               v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' ' ) . '   ( ' . ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' ' ) . ' ) ' ;   ? > " > 
 
                                                 < s p a n   c l a s s = " i n p u t - g r o u p - t e x t "   s t y l e = " b a c k g r o u n d : t r a n s p a r e n t ;   b o r d e r : n o n e ;   p a d d i n g - l e f t : 0 ; " > 
 
                                                         < b u t t o n   t y p e = " b u t t o n "   i d = " c l e a r C u s t o m e r "   c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - s e c o n d a r y "   s t y l e = " b o r d e r - r a d i u s : 3 0 p x ; " >  S" < / b u t t o n > 
 
                                                 < / s p a n > 
 
                                         < / d i v > 
 
                                         < d i v   i d = " c u s t o m e r R e s u l t s "   c l a s s = " c u s t o m e r - r e s u l t s " > < / d i v > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " c u s t o m e r _ i d "   i d = " s e l e c t e d C u s t o m e r I d "   v a l u e = " < ? p h p   e c h o   $ o r d e r [ ' c u s t o m e r _ i d ' ] ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >      `           `    < s p a n   c l a s s = " e n " > /   O r d e r   D a t e < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " o r d e r _ d a t e "   i d = " o r d e r D a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >        `           `    < s p a n   c l a s s = " e n " > /   D e l i v e r y   D a t e < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " d e l i v e r y _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >           < s p a n   c l a s s = " e n " > /   S t a t u s < / s p a n > < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " p e n d i n g "   < ? p h p   e c h o   $ o r d e r [ ' s t a t u s ' ] = = ' p e n d i n g ' ? ' s e l e c t e d ' : ' ' ;   ? > > P e n d i n g   /      `               < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " c u t t i n g "   < ? p h p   e c h o   $ o r d e r [ ' s t a t u s ' ] = = ' c u t t i n g ' ? ' s e l e c t e d ' : ' ' ;   ? > > C u t t i n g   /            `< / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " s t i t c h i n g "   < ? p h p   e c h o   $ o r d e r [ ' s t a t u s ' ] = = ' s t i t c h i n g ' ? ' s e l e c t e d ' : ' ' ;   ? > > S t i t c h i n g   /            `< / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " r e a d y "   < ? p h p   e c h o   $ o r d e r [ ' s t a t u s ' ] = = ' r e a d y ' ? ' s e l e c t e d ' : ' ' ;   ? > > R e a d y   /      `    < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " d e l i v e r e d "   < ? p h p   e c h o   $ o r d e r [ ' s t a t u s ' ] = = ' d e l i v e r e d ' ? ' s e l e c t e d ' : ' ' ;   ? > > D e l i v e r e d   /          `  < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S E L E C T E D   C U S T O M E R   I N F O   = = = = =   - - > 
 
                         < d i v   i d = " c u s t o m e r I n f o "   s t y l e = " d i s p l a y : b l o c k ; "   c l a s s = " c u s t o m e r - i n f o - b o x " > 
 
                                 < i m g   i d = " s e l e c t e d C u s t o m e r P i c "   s r c = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' a s s e t s / u p l o a d s / c u s t o m e r s / d u m m y _ c u s t o m e r . p n g ' ) ;   ? > "   
 
                                           o n e r r o r = " t h i s . s r c = ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = < ? p h p   e c h o   u r l e n c o d e ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' U s e r ' ) ;   ? > & b a c k g r o u n d = 4 f 8 a 8 b & c o l o r = f f f & s i z e = 3 2 ' " > 
 
                                 < d i v   c l a s s = " i n f o " > 
 
                                         < s t r o n g   i d = " s e l e c t e d C u s t o m e r N a m e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > < / s t r o n g > 
 
                                         < s m a l l   i d = " s e l e c t e d C u s t o m e r P h o n e "   c l a s s = " t e x t - m u t e d " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < / d i v > 
 
                                 < ! - -   R e m o v e d   P r e v i o u s   B a l a n c e   d i s p l a y   f r o m   h e r e   a s   w e l l   - - > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   O R D E R   I T E M S   = = = = =   - - > 
 
                         < d i v   i d = " i t e m s C o n t a i n e r " > 
 
                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 1 " > 
 
                                         < h 6   c l a s s = " f w - b o l d   m b - 0 "   s t y l e = " f o n t - s i z e : 1 3 p x ;   f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; " > 
 
                                                 < i   c l a s s = " f a s   f a - l i s t   m e - 2 "   s t y l e = " c o l o r : # 4 f 8 a 8 b ; " > < / i > 
 
                                                      `               `      /   O r d e r   I t e m s 
 
                                         < / h 6 > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - o u t l i n e - p r i m a r y - c u s t o m "   i d = " a d d I t e m B t n " > 
 
                                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >        &          `   /   A d d 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   i d = " i t e m s L i s t " > < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S U M M A R Y   ( R E M O V E D   P R E V   B A L A N C E   &   N E T   T O T A L )   = = = = =   - - > 
 
                         < d i v   c l a s s = " r o w   g - 1   m t - 2 " > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < d i v   c l a s s = " s u m m a r y - b o x " > 
 
                                                 < d i v   c l a s s = " r o w   g - 1   a l i g n - i t e m s - e n d " > 
 
                                                         < d i v   c l a s s = " c o l - m d - 4   c o l - 6 " > 
 
                                                                 < d i v   c l a s s = " l a b e l " >    R   R   &    &       < s p a n   c l a s s = " e n " > /   S u b   T o t a l < / s p a n > < / d i v > 
 
                                                                 < d i v   c l a s s = " v a l u e "   i d = " s u b T o t a l D i s p l a y " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] ,   2 ) ;   ? > < / d i v > 
 
                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u b _ t o t a l "   i d = " s u b T o t a l "   v a l u e = " < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] ,   2 ) ;   ? > " > 
 
                                                         < / d i v > 
 
                                                         < d i v   c l a s s = " c o l - m d - 4   c o l - 6 " > 
 
                                                                 < d i v   c l a s s = " l a b e l " >                 &   < s p a n   c l a s s = " e n " > /   A d v a n c e < / s p a n > < / d i v > 
 
                                                                 < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " a d v a n c e "   i d = " a d v a n c e "   
 
                                                                               c l a s s = " a d v a n c e - i n p u t "   v a l u e = " < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   2 ) ;   ? > "   
 
                                                                               o n f o c u s = " o n A d v a n c e F o c u s ( ) " 
 
                                                                               o n b l u r = " o n A d v a n c e B l u r ( ) " 
 
                                                                               o n i n p u t = " c a l c u l a t e T o t a l s ( ) " > 
 
                                                         < / d i v > 
 
                                                         < d i v   c l a s s = " c o l - m d - 4   c o l - 6 " > 
 
                                                                 < d i v   c l a s s = " l a b e l   t e x t - d a n g e r " >        `    < s p a n   c l a s s = " e n " > /   B a l a n c e < / s p a n > < / d i v > 
 
                                                                 < d i v   c l a s s = " v a l u e   b a l a n c e "   i d = " f i n a l B a l a n c e D i s p l a y " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] )   -   $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   2 ) ;   ? > < / d i v > 
 
                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " f i n a l _ b a l a n c e "   i d = " f i n a l B a l a n c e "   v a l u e = " < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] )   -   $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   2 ) ;   ? > " > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
                         < d i v   c l a s s = " m t - 2   d - f l e x   g a p - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s - c u s t o m   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >          !        `   /   U p d a t e 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 "   s t y l e = " f o n t - s i z e : 1 2 p x ;   f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 2 " > < / i >    &           /   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 ( f u n c t i o n ( )   { 
 
         ' u s e   s t r i c t ' ; 
 
 
 
         / /   = = = = =   P A S S   P H P   D A T A   = = = = = 
 
         c o n s t   i n i t i a l S u i t s   =   < ? p h p   e c h o   j s o n _ e n c o d e ( $ s u i t s ) ;   ? > ; 
 
         c o n s t   c u s t o m e r D a t a   =   { 
 
                 i d :   < ? p h p   e c h o   $ o r d e r [ ' c u s t o m e r _ i d ' ] ;   ? > , 
 
                 n a m e :   ' < ? p h p   e c h o   a d d s l a s h e s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > ' , 
 
                 p h o n e :   ' < ? p h p   e c h o   a d d s l a s h e s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > ' , 
 
                 p r o f i l e _ p i c :   ' < ? p h p   e c h o   a d d s l a s h e s ( $ c u s t o m e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' a s s e t s / u p l o a d s / c u s t o m e r s / d u m m y _ c u s t o m e r . p n g ' ) ;   ? > ' 
 
         } ; 
 
 
 
         / /   = = = = =   D O M   R E F E R E N C E S   = = = = = 
 
         c o n s t   c u s t o m e r S e a r c h   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r S e a r c h ' ) ; 
 
         c o n s t   c u s t o m e r R e s u l t s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r R e s u l t s ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r I d   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r I d ' ) ; 
 
         c o n s t   c u s t o m e r I n f o   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c u s t o m e r I n f o ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r P i c   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r P i c ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r N a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r N a m e ' ) ; 
 
         c o n s t   s e l e c t e d C u s t o m e r P h o n e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e l e c t e d C u s t o m e r P h o n e ' ) ; 
 
         c o n s t   i t e m s L i s t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' i t e m s L i s t ' ) ; 
 
         c o n s t   a d d I t e m B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' a d d I t e m B t n ' ) ; 
 
         c o n s t   a d v a n c e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' a d v a n c e ' ) ; 
 
         c o n s t   o r d e r D a t e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' o r d e r D a t e ' ) ; 
 
 
 
         / /   D i s p l a y   e l e m e n t s 
 
         c o n s t   s u b T o t a l D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b T o t a l D i s p l a y ' ) ; 
 
         c o n s t   f i n a l B a l a n c e D i s p l a y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' f i n a l B a l a n c e D i s p l a y ' ) ; 
 
 
 
         / /   H i d d e n   i n p u t s 
 
         c o n s t   s u b T o t a l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s u b T o t a l ' ) ; 
 
         c o n s t   f i n a l B a l a n c e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' f i n a l B a l a n c e ' ) ; 
 
         c o n s t   o r d e r F o r m   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' o r d e r F o r m ' ) ; 
 
 
 
         l e t   s e l e c t e d C u s t I d   =   c u s t o m e r D a t a . i d ; 
 
         l e t   i t e m C o u n t e r   =   0 ; 
 
         l e t   c u s t o m e r M e a s u r e m e n t s   =   [ ] ; 
 
         l e t   r a t e s   =   [ ] ; 
 
         t r y   { 
 
                 r a t e s   =   < ? p h p   e c h o   j s o n _ e n c o d e ( $ r a t e s   ? ?   [ ] ) ;   ? > ; 
 
                 i f   ( ! A r r a y . i s A r r a y ( r a t e s ) )   r a t e s   =   [ ] ; 
 
         }   c a t c h ( e )   {   r a t e s   =   [ ] ;   } 
 
 
 
         / /   = = = = =             R     R        (          R   &      R         &         )   = = = = = 
 
         c o n s t   f i e l d L a b e l s   =   [ 
 
                 {   k e y :   ' l e n g t h ' ,   l a b e l :   '  ` `    '   } , 
 
                 {   k e y :   ' s h o u l d e r ' ,   l a b e l :   '    `    '   } , 
 
                 {   k e y :   ' s l e e v e ' ,   l a b e l :   '        '   } , 
 
                 {   k e y :   ' w a i s t ' ,   l a b e l :   '    &   '   } , 
 
                 {   k e y :   ' l o o s i n g ' ,   l a b e l :   '   `    '   } , 
 
                 {   k e y :   ' c h e s t ' ,   l a b e l :   '  !      `'   } , 
 
                 {   k e y :   ' c o l l a r ' ,   l a b e l :   '         '   } , 
 
                 {   k e y :   ' s h e r w a n i ' ,   l a b e l :   '    `         `'   } , 
 
                 {   k e y :   ' c u f f _ l e n g t h ' ,   l a b e l :   '        `         `'   } , 
 
                 {   k e y :   ' c u f f _ w i d t h ' ,   l a b e l :   '         `    '   } , 
 
                 {   k e y :   ' s i d e p o c k e t ' ,   l a b e l :   '        ` `     `  '   } , 
 
                 {   k e y :   ' f r o n t p o c k e t ' ,   l a b e l :   '      &            `  '   } , 
 
                 {   k e y :   ' s h a l w a r _ l e n g t h ' ,   l a b e l :   '             `         `'   } , 
 
                 {   k e y :   ' s h a l w a r _ b o t t o m ' ,   l a b e l :   '            '   } , 
 
                 {   k e y :   ' s h a l w a r p o c k e t ' ,   l a b e l :   '               `  '   } 
 
         ] ; 
 
 
 
         / /   = = = = =   A D V A N C E   F O C U S   = = = = = 
 
         w i n d o w . o n A d v a n c e F o c u s   =   f u n c t i o n ( )   { 
 
                 f i n a l B a l a n c e D i s p l a y . t e x t C o n t e n t   =   ' R s .   0 . 0 0 ' ; 
 
                 f i n a l B a l a n c e . v a l u e   =   ' 0 ' ; 
 
         } 
 
 
 
         w i n d o w . o n A d v a n c e B l u r   =   f u n c t i o n ( )   { 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   C U S T O M E R   S E A R C H   = = = = = 
 
         c u s t o m e r S e a r c h . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                 c o n s t   t e r m   =   t h i s . v a l u e . t r i m ( ) ; 
 
                 i f   ( t e r m . l e n g t h   <   2 )   {   c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ;   r e t u r n ;   } 
 
                 f e t c h ( ' i n d e x . p h p ? a c t i o n = c u s t o m e r _ s e a r c h & t e r m = '   +   e n c o d e U R I C o m p o n e n t ( t e r m ) ) 
 
                         . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                         . t h e n ( d a t a   = >   { 
 
                                 c u s t o m e r R e s u l t s . i n n e r H T M L   =   ' ' ; 
 
                                 i f   ( d a t a . l e n g t h   = = =   0 )   { 
 
                                         c u s t o m e r R e s u l t s . i n n e r H T M L   =   ' < d i v   c l a s s = " l i s t - i t e m " > < s m a l l   c l a s s = " t e x t - m u t e d " >         !          !           !  `  /   N o   c u s t o m e r s   f o u n d . < / s m a l l > < / d i v > ' ; 
 
                                 }   e l s e   { 
 
                                         d a t a . f o r E a c h ( c   = >   { 
 
                                                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                                                 d i v . c l a s s N a m e   =   ' l i s t - i t e m ' ; 
 
                                                 d i v . i n n e r H T M L   =   ` 
 
                                                         < i m g   s r c = " $ { c . p r o f i l e _ p i c } "   o n e r r o r = " t h i s . s r c = ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = $ { e n c o d e U R I C o m p o n e n t ( c . n a m e ) } & b a c k g r o u n d = 4 f 8 a 8 b & c o l o r = f f f & s i z e = 2 4 ' " > 
 
                                                         < d i v   c l a s s = " i n f o " > 
 
                                                                 < s p a n   c l a s s = " n a m e " > $ { c . n a m e } < / s p a n > 
 
                                                                 < s p a n   c l a s s = " p h o n e " > $ { c . p h o n e } < / s p a n > 
 
                                                         < / d i v > 
 
                                                 ` ; 
 
                                                 d i v . o n c l i c k   =   f u n c t i o n ( )   {   s e l e c t C u s t o m e r ( c ) ;   } ; 
 
                                                 c u s t o m e r R e s u l t s . a p p e n d C h i l d ( d i v ) ; 
 
                                         } ) ; 
 
                                 } 
 
                                 c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                         } ) ; 
 
         } ) ; 
 
 
 
         f u n c t i o n   s e l e c t C u s t o m e r ( c )   { 
 
                 s e l e c t e d C u s t I d   =   c . i d ; 
 
                 s e l e c t e d C u s t o m e r I d . v a l u e   =   c . i d ; 
 
                 c u s t o m e r S e a r c h . v a l u e   =   c . n a m e   +   '   ( '   +   c . p h o n e   +   ' ) ' ; 
 
                 c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 c u s t o m e r I n f o . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 s e l e c t e d C u s t o m e r P i c . s r c   =   c . p r o f i l e _ p i c   | |   ' a s s e t s / i m a g e s / d e f a u l t _ a v a t a r . p n g ' ; 
 
                 s e l e c t e d C u s t o m e r N a m e . t e x t C o n t e n t   =   c . n a m e ; 
 
                 s e l e c t e d C u s t o m e r P h o n e . t e x t C o n t e n t   =   c . p h o n e ; 
 
                 l o a d C u s t o m e r M e a s u r e m e n t s ( c . i d ) ; 
 
                 c a l c u l a t e T o t a l s ( ) ;   / /   b a l a n c e   i s   n o w   j u s t   s u b T o t a l   -   a d v a n c e ,   n o   p r e v   b a l a n c e 
 
         } 
 
 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' c l e a r C u s t o m e r ' ) . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 c u s t o m e r S e a r c h . v a l u e   =   ' ' ; 
 
                 s e l e c t e d C u s t o m e r I d . v a l u e   =   ' ' ; 
 
                 c u s t o m e r I n f o . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 c u s t o m e r R e s u l t s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 s e l e c t e d C u s t I d   =   0 ; 
 
                 c u s t o m e r M e a s u r e m e n t s   =   [ ] ; 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
                 d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . m e a s u r e m e n t - s e l e c t ' ) . f o r E a c h ( s e l   = >   { 
 
                         s e l . i n n e r H T M L   =   ' < o p t i o n   v a l u e = " " >                     `   /   S e l e c t < / o p t i o n > ' ; 
 
                 } ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   L O A D   M E A S U R E M E N T S   = = = = = 
 
         f u n c t i o n   l o a d C u s t o m e r M e a s u r e m e n t s ( c u s t o m e r I d )   { 
 
                 f e t c h ( ' i n d e x . p h p ? a c t i o n = g e t _ m e a s u r e m e n t s & c u s t o m e r _ i d = '   +   c u s t o m e r I d ) 
 
                         . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                         . t h e n ( d a t a   = >   { 
 
                                 c u s t o m e r M e a s u r e m e n t s   =   d a t a ; 
 
                                 d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . m e a s u r e m e n t - s e l e c t ' ) . f o r E a c h ( s e l   = >   p o p u l a t e M e a s u r e m e n t S e l e c t ( s e l ) ) ; 
 
                         } ) ; 
 
         } 
 
 
 
         f u n c t i o n   p o p u l a t e M e a s u r e m e n t S e l e c t ( s e l e c t )   { 
 
                 c o n s t   c u r r e n t V a l   =   s e l e c t . v a l u e ; 
 
                 s e l e c t . i n n e r H T M L   =   ' < o p t i o n   v a l u e = " " >                     `   /   S e l e c t < / o p t i o n > ' ; 
 
                 c o n s t   s o r t e d   =   [ . . . c u s t o m e r M e a s u r e m e n t s ] . s o r t ( ( a ,   b )   = >   b . m e a s u r e d _ d a t e . l o c a l e C o m p a r e ( a . m e a s u r e d _ d a t e ) ) ; 
 
                 s o r t e d . f o r E a c h ( m   = >   { 
 
                         c o n s t   o p t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' o p t i o n ' ) ; 
 
                         o p t . v a l u e   =   m . i d ; 
 
                         o p t . t e x t C o n t e n t   =   m . m e a s u r e d _ d a t e   +   '   (    `    / C h e s t :   '   +   ( m . c h e s t   | |   ' N / A ' )   +   ' ,      &   / W a i s t :   '   +   ( m . w a i s t   | |   ' N / A ' )   +   ' ) ' ; 
 
                         s e l e c t . a p p e n d C h i l d ( o p t ) ; 
 
                 } ) ; 
 
                 i f   ( c u r r e n t V a l )   s e l e c t . v a l u e   =   c u r r e n t V a l ; 
 
                 u p d a t e M e a s u r e m e n t P r e v i e w ( s e l e c t ) ; 
 
         } 
 
 
 
         / /   = = = = =   A D D   I T E M   = = = = = 
 
         f u n c t i o n   a d d I t e m ( d a t a )   { 
 
                 i t e m C o u n t e r + + ; 
 
                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                 d i v . c l a s s N a m e   =   ' i t e m - c a r d ' ; 
 
                 d i v . i d   =   ' i t e m - '   +   i t e m C o u n t e r ; 
 
                 d i v . i n n e r H T M L   =   ` 
 
                         < d i v   c l a s s = " i t e m - h e a d e r " > 
 
                                 < s m a l l >    &       # $ { i t e m C o u n t e r }   /   I t e m   # $ { i t e m C o u n t e r } < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - o u t l i n e - d a n g e r - s m   r e m o v e - i t e m - b t n " >  S" < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w   g - 1 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >     &        < s p a n   c l a s s = " e n " > /   T y p e < / s p a n > < / l a b e l > 
 
                                         < s e l e c t   n a m e = " t y p e [ ] "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   i t e m - t y p e " > 
 
                                                 < o p t i o n   v a l u e = " " >                /   S e l e c t < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ t y p e s   a s   $ t ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' t y p e ' ] ) ;   ? > " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' t y p e ' ] ) ;   ? > < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >        `    < s p a n   c l a s s = " e n " > /   S i z e < / s p a n > < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s i z e [ ] "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   i t e m - s i z e " > 
 
                                                 < o p t i o n   v a l u e = " S m a l l " > S m a l l < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " M e d i u m " > M e d i u m < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " L a r g e "   s e l e c t e d > L a r g e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " E x t r a   L a r g e " > E x t r a   L a r g e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >             < s p a n   c l a s s = " e n " > /   Q t y < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " q t y [ ] "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   i t e m - q t y "   v a l u e = " 1 "   m i n = " 1 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >    ` &     < s p a n   c l a s s = " e n " > /   R a t e < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e [ ] "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   i t e m - r a t e "   v a l u e = " 0 "   > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 3   c o l - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " >  &    &       < s p a n   c l a s s = " e n " > /   T o t a l < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " i t e m _ t o t a l [ ] "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m   i t e m - t o t a l "   v a l u e = " 0 "   r e a d o n l y > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w   g - 1   m t - 1 " > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   t e x t - p r i m a r y   f w - b o l d " > 
 
                                                 < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 1 " > < / i >    &       /   M e a s u r e m e n t 
 
                                         < / l a b e l > 
 
                                         < s e l e c t   n a m e = " m e a s u r e m e n t _ i d [ ] "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m   m e a s u r e m e n t - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " >                     `   /   S e l e c t < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m e a s u r e m e n t - p r e v i e w "   s t y l e = " d i s p l a y : n o n e ; " > < / d i v > 
 
                 ` ; 
 
                 i t e m s L i s t . a p p e n d C h i l d ( d i v ) ; 
 
 
 
                 d i v . q u e r y S e l e c t o r ( ' . r e m o v e - i t e m - b t n ' ) . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                         d i v . r e m o v e ( ) ; 
 
                         c a l c u l a t e T o t a l s ( ) ; 
 
                 } ) ; 
 
 
 
                 c o n s t   t y p e S e l   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - t y p e ' ) ; 
 
                 c o n s t   s i z e S e l   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - s i z e ' ) ; 
 
                 c o n s t   q t y I n p   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - q t y ' ) ; 
 
                 c o n s t   r a t e I n p   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - r a t e ' ) ; 
 
                 c o n s t   t o t a l I n p   =   d i v . q u e r y S e l e c t o r ( ' . i t e m - t o t a l ' ) ; 
 
                 c o n s t   m e a s u r e S e l   =   d i v . q u e r y S e l e c t o r ( ' . m e a s u r e m e n t - s e l e c t ' ) ; 
 
                 c o n s t   p r e v i e w D i v   =   d i v . q u e r y S e l e c t o r ( ' . m e a s u r e m e n t - p r e v i e w ' ) ; 
 
 
 
                 t y p e S e l . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   {   g e t R a t e ( t y p e S e l ,   s i z e S e l ,   r a t e I n p ,   q t y I n p ,   t o t a l I n p ) ;   } ) ; 
 
                 s i z e S e l . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   {   g e t R a t e ( t y p e S e l ,   s i z e S e l ,   r a t e I n p ,   q t y I n p ,   t o t a l I n p ) ;   } ) ; 
 
                 q t y I n p . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   {   c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ;   } ) ; 
 
                 m e a s u r e S e l . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   {   u p d a t e M e a s u r e m e n t P r e v i e w ( m e a s u r e S e l ) ;   } ) ; 
 
 
 
                 i f   ( c u s t o m e r M e a s u r e m e n t s . l e n g t h   >   0 )   { 
 
                         p o p u l a t e M e a s u r e m e n t S e l e c t ( m e a s u r e S e l ) ; 
 
                 } 
 
 
 
                 i f   ( d a t a )   { 
 
                         c o n s t   f i e l d s   =   [ ' t y p e ' ,   ' s i z e ' ,   ' q t y ' ,   ' r a t e ' ,   ' m e a s u r e m e n t _ i d ' ] ; 
 
                         f i e l d s . f o r E a c h ( f   = >   { 
 
                                 c o n s t   e l   =   d i v . q u e r y S e l e c t o r ( ` [ n a m e = " $ { f } [ ] " ] ` ) ; 
 
                                 i f   ( e l   & &   d a t a [ f ]   ! = =   u n d e f i n e d )   e l . v a l u e   =   d a t a [ f ] ; 
 
                         } ) ; 
 
                         i f   ( d a t a . t o t a l   ! = =   u n d e f i n e d )   t o t a l I n p . v a l u e   =   d a t a . t o t a l ; 
 
                         i f   ( d a t a . m e a s u r e m e n t _ i d )   { 
 
                                 s e t T i m e o u t ( ( )   = >   { 
 
                                         m e a s u r e S e l . v a l u e   =   d a t a . m e a s u r e m e n t _ i d ; 
 
                                         u p d a t e M e a s u r e m e n t P r e v i e w ( m e a s u r e S e l ) ; 
 
                                 } ,   1 0 0 ) ; 
 
                         } 
 
                 } 
 
 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
         } 
 
 
 
         a d d I t e m B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   {   a d d I t e m ( ) ;   } ) ; 
 
 
 
         / /   = = = = =   G E T   R A T E   = = = = = 
 
         f u n c t i o n   g e t R a t e ( t y p e S e l ,   s i z e S e l ,   r a t e I n p ,   q t y I n p ,   t o t a l I n p )   { 
 
                 c o n s t   t y p e   =   t y p e S e l . v a l u e ; 
 
                 c o n s t   s i z e   =   s i z e S e l . v a l u e ; 
 
                 i f   ( ! t y p e   | |   ! s i z e )   { 
 
                         r a t e I n p . v a l u e   =   0 ; 
 
                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                         r e t u r n ; 
 
                 } 
 
                 l e t   r a t e   =   0 ; 
 
                 f o r   ( l e t   r   o f   r a t e s )   { 
 
                         i f   ( r . t y p e   = = =   t y p e   & &   r . s i z e   = = =   s i z e )   {   r a t e   =   p a r s e F l o a t ( r . r a t e ) ;   b r e a k ;   } 
 
                 } 
 
                 i f   ( r a t e   >   0 )   { 
 
                         r a t e I n p . v a l u e   =   r a t e ; 
 
                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                 }   e l s e   { 
 
                         f e t c h ( ' i n d e x . p h p ? a c t i o n = g e t _ r a t e & t y p e = '   +   e n c o d e U R I C o m p o n e n t ( t y p e )   +   ' & s i z e = '   +   e n c o d e U R I C o m p o n e n t ( s i z e ) ) 
 
                                 . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                                 . t h e n ( d a t a   = >   { 
 
                                         r a t e I n p . v a l u e   =   d a t a . r a t e   | |   0 ; 
 
                                         c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p ) ; 
 
                                 } ) ; 
 
                 } 
 
         } 
 
 
 
         f u n c t i o n   c a l c u l a t e I t e m T o t a l ( q t y I n p ,   r a t e I n p ,   t o t a l I n p )   { 
 
                 c o n s t   q t y   =   p a r s e F l o a t ( q t y I n p . v a l u e )   | |   0 ; 
 
                 c o n s t   r a t e   =   p a r s e F l o a t ( r a t e I n p . v a l u e )   | |   0 ; 
 
                 t o t a l I n p . v a l u e   =   ( q t y   *   r a t e ) . t o F i x e d ( 2 ) ; 
 
                 c a l c u l a t e T o t a l s ( ) ; 
 
         } 
 
 
 
         / /   = = = = =   U P D A T E   M E A S U R E M E N T   P R E V I E W   = = = = = 
 
         f u n c t i o n   u p d a t e M e a s u r e m e n t P r e v i e w ( s e l e c t )   { 
 
                 c o n s t   c a r d   =   s e l e c t . c l o s e s t ( ' . i t e m - c a r d ' ) ; 
 
                 c o n s t   p r e v i e w D i v   =   c a r d . q u e r y S e l e c t o r ( ' . m e a s u r e m e n t - p r e v i e w ' ) ; 
 
                 c o n s t   m e a s u r e m e n t I d   =   s e l e c t . v a l u e ; 
 
                 i f   ( ! m e a s u r e m e n t I d )   {   p r e v i e w D i v . s t y l e . d i s p l a y   =   ' n o n e ' ;   r e t u r n ;   } 
 
                 c o n s t   m e a s u r e m e n t   =   c u s t o m e r M e a s u r e m e n t s . f i n d ( m   = >   m . i d   = =   m e a s u r e m e n t I d ) ; 
 
                 i f   ( ! m e a s u r e m e n t )   {   p r e v i e w D i v . s t y l e . d i s p l a y   =   ' n o n e ' ;   r e t u r n ;   } 
 
                 
 
                 p r e v i e w D i v . s t y l e . d i s p l a y   =   ' g r i d ' ; 
 
                 p r e v i e w D i v . i n n e r H T M L   =   ' ' ; 
 
                 
 
                 f i e l d L a b e l s . f o r E a c h ( f   = >   { 
 
                         l e t   v a l   =   m e a s u r e m e n t [ f . k e y ] ; 
 
                         i f   ( v a l   = = =   u n d e f i n e d   | |   v a l   = = =   n u l l   | |   v a l   = = =   ' ' )   v a l   =   ' - ' ; 
 
                         c o n s t   f i e l d D i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                         f i e l d D i v . c l a s s N a m e   =   ' f i e l d ' ; 
 
                         f i e l d D i v . i n n e r H T M L   =   ` < s p a n   c l a s s = " l a b e l " > $ { f . l a b e l } < / s p a n > < s p a n   c l a s s = " v a l u e " > $ { v a l } < / s p a n > ` ; 
 
                         p r e v i e w D i v . a p p e n d C h i l d ( f i e l d D i v ) ; 
 
                 } ) ; 
 
         } 
 
 
 
         / /   = = = = =   U P D A T E   B A L A N C E   W H E N   O R D E R   D A T E   C H A N G E S   ( N O   P R E V   B A L A N C E ,   S O   N O T   N E E D E D )   = = = = = 
 
         / /   W e   c a n   r e m o v e   t h e   d a t e   c h a n g e   l i s t e n e r   a s   i t   o n l y   u p d a t e d   p r e v   b a l a n c e . 
 
 
 
         / /   = = = = =   C A L C U L A T E   T O T A L S   = = = = = 
 
         f u n c t i o n   c a l c u l a t e T o t a l s ( )   { 
 
                 l e t   s u b T o t a l V a l   =   0 ; 
 
                 d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # i t e m s L i s t   . i t e m - c a r d ' ) . f o r E a c h ( r o w   = >   { 
 
                         c o n s t   t o t a l   =   p a r s e F l o a t ( r o w . q u e r y S e l e c t o r ( ' . i t e m - t o t a l ' ) . v a l u e )   | |   0 ; 
 
                         s u b T o t a l V a l   + =   t o t a l ; 
 
                 } ) ; 
 
                 
 
                 / /   N o   p r e v i o u s   b a l a n c e ,   n e t   =   s u b T o t a l 
 
                 c o n s t   a d v   =   p a r s e F l o a t ( a d v a n c e . v a l u e )   | |   0 ; 
 
                 c o n s t   f i n a l B a l   =   s u b T o t a l V a l   -   a d v ; 
 
 
 
                 / /   U p d a t e   h i d d e n   i n p u t s 
 
                 s u b T o t a l . v a l u e   =   s u b T o t a l V a l . t o F i x e d ( 2 ) ; 
 
                 f i n a l B a l a n c e . v a l u e   =   f i n a l B a l . t o F i x e d ( 2 ) ; 
 
 
 
                 / /   U p d a t e   d i s p l a y 
 
                 s u b T o t a l D i s p l a y . t e x t C o n t e n t   =   ' R s .   '   +   s u b T o t a l V a l . t o F i x e d ( 2 ) ; 
 
                 
 
                 / /   O n l y   u p d a t e   f i n a l   b a l a n c e   i f   n o t   f o c u s e d 
 
                 i f   ( d o c u m e n t . a c t i v e E l e m e n t   ! = =   a d v a n c e )   { 
 
                         f i n a l B a l a n c e D i s p l a y . t e x t C o n t e n t   =   ' R s .   '   +   f i n a l B a l . t o F i x e d ( 2 ) ; 
 
                 } 
 
         } 
 
 
 
         / /   = = = = =   F O R M   V A L I D A T I O N   = = = = = 
 
         o r d e r F o r m . a d d E v e n t L i s t e n e r ( ' s u b m i t ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ! s e l e c t e d C u s t o m e r I d . v a l u e )   {   a l e r t ( '  &  !           `       `         !             ` `   /   P l e a s e   s e l e c t   a   c u s t o m e r . ' ) ;   e . p r e v e n t D e f a u l t ( ) ;   r e t u r n   f a l s e ;   } 
 
                 i f   ( d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # i t e m s L i s t   . i t e m - c a r d ' ) . l e n g t h   = = =   0 )   {   a l e r t ( '  &  !           `       `     !            !      !          `       &          `   /   P l e a s e   a d d   a t   l e a s t   o n e   i t e m . ' ) ;   e . p r e v e n t D e f a u l t ( ) ;   r e t u r n   f a l s e ;   } 
 
                 r e t u r n   t r u e ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   I N I T   = = = = = 
 
         l o a d C u s t o m e r M e a s u r e m e n t s ( c u s t o m e r D a t a . i d ) ; 
 
 
 
         i f   ( i n i t i a l S u i t s   & &   i n i t i a l S u i t s . l e n g t h   >   0 )   { 
 
                 s e t T i m e o u t ( ( )   = >   { 
 
                         i n i t i a l S u i t s . f o r E a c h ( s u i t   = >   { 
 
                                 c o n s t   i t e m D a t a   =   { 
 
                                         t y p e :   s u i t . s u i t _ t y p e , 
 
                                         s i z e :   s u i t . s i z e   | |   ' L a r g e ' , 
 
                                         q t y :   1 , 
 
                                         r a t e :   s u i t . p r i c e , 
 
                                         t o t a l :   s u i t . p r i c e , 
 
                                         m e a s u r e m e n t _ i d :   s u i t . m e a s u r e m e n t _ i d 
 
                                 } ; 
 
                                 a d d I t e m ( i t e m D a t a ) ; 
 
                         } ) ; 
 
                         c a l c u l a t e T o t a l s ( ) ; 
 
                 } ,   5 0 0 ) ; 
 
         }   e l s e   { 
 
                 a d d I t e m ( ) ; 
 
         } 
 
 
 
 } ) ( ) ; 
 
 < / s c r i p t > 
 
 < s t y l e > 
 
         . o r d e r - l i s t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . f o r m - c o n t r o l - s m   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . f o r m - c o n t r o l - s m : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . i n p u t - g r o u p - t e x t   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - c o l o r :   # d 1 d 5 d b ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . o r d e r - l i s t - c a r d   . b a d g e   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 p a d d i n g :   3 p x   8 p x ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
         } 
 
         . b t n - n e w - o r d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 8 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
                 h e i g h t :   3 4 p x ; 
 
         } 
 
         . b t n - n e w - o r d e r : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ,   0   4 p x   1 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - o u t l i n e - p r i m a r y - c u s t o m   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 2 5 6 3 e b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 2 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   8 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - o u t l i n e - p r i m a r y - c u s t o m : h o v e r   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 5 ) ; 
 
         } 
 
         . p a g i n a t i o n   . p a g e - l i n k   { 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r - c o l o r :   # d 1 d 5 d b ; 
 
         } 
 
         . p a g i n a t i o n   . p a g e - i t e m . a c t i v e   . p a g e - l i n k   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s e a r c h - s t a t u s   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 m a r g i n - t o p :   4 p x ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . o r d e r - l i s t - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . o r d e r - l i s t - c a r d   . t a b l e   t h ,   . o r d e r - l i s t - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . o r d e r - l i s t - c a r d   . c a r d - b o d y   {   p a d d i n g :   8 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   o r d e r - l i s t - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - l i s t   m e - 2 " > < / i > O r d e r s < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ a d d "   c l a s s = " b t n - n e w - o r d e r " > 
 
                         < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   N e w   O r d e r 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   S E A R C H   B A R   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   g - 1   m b - 2   a l i g n - i t e m s - c e n t e r " > 
 
                         < d i v   c l a s s = " c o l - m d - 6   c o l - l g - 5 " > 
 
                                 < d i v   c l a s s = " i n p u t - g r o u p   i n p u t - g r o u p - s m " > 
 
                                         < s p a n   c l a s s = " i n p u t - g r o u p - t e x t   b g - w h i t e   b o r d e r - e n d - 0 " > < i   c l a s s = " f a s   f a - s e a r c h   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > < / i > < / s p a n > 
 
                                         < i n p u t   t y p e = " t e x t "   i d = " s e a r c h I n p u t "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   
 
                                                       p l a c e h o l d e r = " S e a r c h   b y   O r d e r   # ,   C u s t o m e r ,   P h o n e . . . "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h ) ;   ? > " 
 
                                                       a u t o c o m p l e t e = " o f f "   s t y l e = " b o r d e r - l e f t : 0 ; " > 
 
                                         < b u t t o n   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y   b t n - s m "   t y p e = " b u t t o n "   i d = " c l e a r S e a r c h "   t i t l e = " C l e a r " > 
 
                                                 < i   c l a s s = " f a s   f a - t i m e s "   s t y l e = " f o n t - s i z e : 1 0 p x ; " > < / i > 
 
                                         < / b u t t o n > 
 
                                         < s p a n   c l a s s = " i n p u t - g r o u p - t e x t   b g - w h i t e "   i d = " s e a r c h L o a d e r "   s t y l e = " d i s p l a y : n o n e ; " > 
 
                                                 < i   c l a s s = " f a s   f a - s p i n n e r   f a - s p i n   t e x t - p r i m a r y "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > < / i > 
 
                                         < / s p a n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s e a r c h - s t a t u s "   i d = " s e a r c h S t a t u s " > 
 
                                         < ? p h p   i f   ( ! e m p t y ( $ s e a r c h ) ) :   ? > 
 
                                                 R e s u l t s   f o r :   < s t r o n g > " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h ) ;   ? > " < / s t r o n g > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 T y p e   t o   s e a r c h   o r d e r s . . . 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 6   c o l - l g - 7   t e x t - e n d " > 
 
                                 < d i v   c l a s s = " d - f l e x   g a p - 1   f l e x - w r a p   j u s t i f y - c o n t e n t - e n d " > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - w a r n i n g   t e x t - d a r k " > P e n d i n g < / s p a n > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - i n f o   t e x t - d a r k " > C u t t i n g < / s p a n > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - p r i m a r y " > S t i t c h i n g < / s p a n > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - s u c c e s s " > R e a d y < / s p a n > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > D e l i v e r e d < / s p a n > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - d a n g e r " > C a n c e l l e d < / s p a n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r   # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 8 % ; " > C u s t o m e r < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r   D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > D e l i v e r y < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 8 % ; "   c l a s s = " t e x t - c e n t e r " > S u i t s < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; "   c l a s s = " t e x t - e n d " > T o t a l < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 4 % ; " > S t a t u s < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; "   c l a s s = " t e x t - c e n t e r " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y   i d = " o r d e r s B o d y " > 
 
                                         < ? p h p   i f   ( e m p t y ( $ o r d e r s ) ) :   ? > 
 
                                                 < t r   i d = " n o O r d e r s R o w " > 
 
                                                         < t d   c o l s p a n = " 8 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 2 "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > 
 
                                                                 < ? p h p   i f   ( ! e m p t y ( $ s e a r c h ) ) :   ? > 
 
                                                                         N o   o r d e r s   f o u n d   f o r   " < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h ) ;   ? > < / s t r o n g > " 
 
                                                                 < ? p h p   e l s e :   ? > 
 
                                                                         N o   o r d e r s   f o u n d . 
 
                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ o r d e r s   a s   $ o r d e r ) :   ? > 
 
                                                         < t r   d a t a - o r d e r - i d = " < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > " > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   $ o r d e r [ ' d e l i v e r y _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' t o t a l _ s u i t s ' ] ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p 
 
                                                                         $ s t a t u s _ c l a s s   =   ' ' ; 
 
                                                                         $ s t a t u s _ i c o n   =   ' ' ; 
 
                                                                         s w i t c h   ( $ o r d e r [ ' s t a t u s ' ] )   { 
 
                                                                                 c a s e   ' p e n d i n g ' :       $ s t a t u s _ c l a s s   =   ' b g - w a r n i n g   t e x t - d a r k ' ;   $ s t a t u s _ i c o n   =   ' f a - c l o c k ' ;   b r e a k ; 
 
                                                                                 c a s e   ' c u t t i n g ' :       $ s t a t u s _ c l a s s   =   ' b g - i n f o   t e x t - d a r k ' ;   $ s t a t u s _ i c o n   =   ' f a - c u t ' ;   b r e a k ; 
 
                                                                                 c a s e   ' s t i t c h i n g ' :   $ s t a t u s _ c l a s s   =   ' b g - p r i m a r y   t e x t - w h i t e ' ;   $ s t a t u s _ i c o n   =   ' f a - t s h i r t ' ;   b r e a k ; 
 
                                                                                 c a s e   ' r e a d y ' :           $ s t a t u s _ c l a s s   =   ' b g - s u c c e s s   t e x t - w h i t e ' ;   $ s t a t u s _ i c o n   =   ' f a - c h e c k - c i r c l e ' ;   b r e a k ; 
 
                                                                                 c a s e   ' d e l i v e r e d ' :   $ s t a t u s _ c l a s s   =   ' b g - s e c o n d a r y   t e x t - w h i t e ' ;   $ s t a t u s _ i c o n   =   ' f a - t r u c k ' ;   b r e a k ; 
 
                                                                                 c a s e   ' c a n c e l l e d ' :   $ s t a t u s _ c l a s s   =   ' b g - d a n g e r   t e x t - w h i t e ' ;   $ s t a t u s _ i c o n   =   ' f a - t i m e s - c i r c l e ' ;   b r e a k ; 
 
                                                                                 d e f a u l t :                     $ s t a t u s _ c l a s s   =   ' b g - s e c o n d a r y   t e x t - w h i t e ' ;   $ s t a t u s _ i c o n   =   ' f a - q u e s t i o n - c i r c l e ' ; 
 
                                                                         } 
 
                                                                         ? > 
 
                                                                         < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ s t a t u s _ c l a s s ;   ? >   r o u n d e d - p i l l   p x - 2   p y - 1 " > 
 
                                                                                 < i   c l a s s = " f a s   < ? p h p   e c h o   $ s t a t u s _ i c o n ;   ? >   m e - 1 "   s t y l e = " f o n t - s i z e : 9 p x ; " > < / i > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m "   r o l e = " g r o u p " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ v i e w & i d = < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > "   
 
                                                                                       t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   t i t l e = " V i e w " > 
 
                                                                                         < i   c l a s s = " f a s   f a - e y e " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ e d i t & i d = < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y "   t i t l e = " E d i t " > 
 
                                                                                         < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ d e l e t e & i d = < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   t i t l e = " D e l e t e "   
 
                                                                                       o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e   y o u   w a n t   t o   d e l e t e   t h i s   o r d e r ? ' ) ; " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   P A G I N A T I O N   = = = = =   - - > 
 
                 < ? p h p   i f   ( $ t o t a l P a g e s   >   1 ) :   ? > 
 
                         < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m t - 2 "   i d = " p a g i n a t i o n C o n t a i n e r " > 
 
                                 < d i v   c l a s s = " t e x t - m u t e d   s m a l l "   i d = " p a g i n a t i o n I n f o " > 
 
                                         < ? p h p   e c h o   c o u n t ( $ o r d e r s ) ;   ? >   o f   < ? p h p   e c h o   $ t o t a l ;   ? >   o r d e r s 
 
                                         < ? p h p   i f   ( ! e m p t y ( $ s e a r c h ) ) :   ? > 
 
                                                 ( f i l t e r e d ) 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / d i v > 
 
                                 < n a v > 
 
                                         < u l   c l a s s = " p a g i n a t i o n   p a g i n a t i o n - s m   m b - 0 " > 
 
                                                 < ? p h p   i f   ( $ p a g e   >   1 ) :   ? > 
 
                                                         < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " ? a c t i o n = o r d e r s & s e a r c h = < ? p h p   e c h o   u r l e n c o d e ( $ s e a r c h ) ;   ? > & p a g e = < ? p h p   e c h o   $ p a g e - 1 ;   ? > " > < i   c l a s s = " f a s   f a - c h e v r o n - l e f t " > < / i > < / a > < / l i > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > < i   c l a s s = " f a s   f a - c h e v r o n - l e f t " > < / i > < / s p a n > < / l i > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
 
 
                                                 < ? p h p 
 
                                                 $ s t a r t   =   m a x ( 1 ,   $ p a g e   -   2 ) ; 
 
                                                 $ e n d   =   m i n ( $ t o t a l P a g e s ,   $ p a g e   +   2 ) ; 
 
                                                 i f   ( $ s t a r t   >   1 )   { 
 
                                                         e c h o   ' < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " ? a c t i o n = o r d e r s & s e a r c h = '   .   u r l e n c o d e ( $ s e a r c h )   .   ' & p a g e = 1 " > 1 < / a > < / l i > ' ; 
 
                                                         i f   ( $ s t a r t   >   2 )   e c h o   ' < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > . . . < / s p a n > < / l i > ' ; 
 
                                                 } 
 
                                                 f o r   ( $ i   =   $ s t a r t ;   $ i   < =   $ e n d ;   $ i + + )   { 
 
                                                         i f   ( $ i   = =   $ p a g e )   { 
 
                                                                 e c h o   ' < l i   c l a s s = " p a g e - i t e m   a c t i v e " > < s p a n   c l a s s = " p a g e - l i n k " > '   .   $ i   .   ' < / s p a n > < / l i > ' ; 
 
                                                         }   e l s e   { 
 
                                                                 e c h o   ' < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " ? a c t i o n = o r d e r s & s e a r c h = '   .   u r l e n c o d e ( $ s e a r c h )   .   ' & p a g e = '   .   $ i   .   ' " > '   .   $ i   .   ' < / a > < / l i > ' ; 
 
                                                         } 
 
                                                 } 
 
                                                 i f   ( $ e n d   <   $ t o t a l P a g e s )   { 
 
                                                         i f   ( $ e n d   <   $ t o t a l P a g e s   -   1 )   e c h o   ' < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > . . . < / s p a n > < / l i > ' ; 
 
                                                         e c h o   ' < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " ? a c t i o n = o r d e r s & s e a r c h = '   .   u r l e n c o d e ( $ s e a r c h )   .   ' & p a g e = '   .   $ t o t a l P a g e s   .   ' " > '   .   $ t o t a l P a g e s   .   ' < / a > < / l i > ' ; 
 
                                                 } 
 
                                                 ? > 
 
 
 
                                                 < ? p h p   i f   ( $ p a g e   <   $ t o t a l P a g e s ) :   ? > 
 
                                                         < l i   c l a s s = " p a g e - i t e m " > < a   c l a s s = " p a g e - l i n k "   h r e f = " ? a c t i o n = o r d e r s & s e a r c h = < ? p h p   e c h o   u r l e n c o d e ( $ s e a r c h ) ;   ? > & p a g e = < ? p h p   e c h o   $ p a g e + 1 ;   ? > " > < i   c l a s s = " f a s   f a - c h e v r o n - r i g h t " > < / i > < / a > < / l i > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < l i   c l a s s = " p a g e - i t e m   d i s a b l e d " > < s p a n   c l a s s = " p a g e - l i n k " > < i   c l a s s = " f a s   f a - c h e v r o n - r i g h t " > < / i > < / s p a n > < / l i > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / u l > 
 
                                 < / n a v > 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " m t - 2   t e x t - m u t e d   s m a l l "   i d = " p a g i n a t i o n I n f o " > 
 
                                 T o t a l   O r d e r s :   < s t r o n g > < ? p h p   e c h o   $ t o t a l ;   ? > < / s t r o n g > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   S E A R C H   S C R I P T   ( L I V E   S E A R C H )   = = = = =   - - > 
 
 < s c r i p t > 
 
 ( f u n c t i o n ( )   { 
 
         ' u s e   s t r i c t ' ; 
 
 
 
         c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h I n p u t ' ) ; 
 
         c o n s t   c l e a r S e a r c h   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c l e a r S e a r c h ' ) ; 
 
         c o n s t   o r d e r s B o d y   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' o r d e r s B o d y ' ) ; 
 
         c o n s t   s e a r c h S t a t u s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h S t a t u s ' ) ; 
 
         c o n s t   s e a r c h L o a d e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h L o a d e r ' ) ; 
 
         c o n s t   p a g i n a t i o n C o n t a i n e r   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p a g i n a t i o n C o n t a i n e r ' ) ; 
 
         c o n s t   p a g i n a t i o n I n f o   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p a g i n a t i o n I n f o ' ) ; 
 
 
 
         l e t   s e a r c h T i m e o u t   =   n u l l ; 
 
 
 
         f u n c t i o n   p e r f o r m S e a r c h ( q u e r y )   { 
 
                 c o n s t   t r i m m e d   =   q u e r y . t r i m ( ) ; 
 
                 i f   ( t r i m m e d   = = =   ' ' )   { 
 
                         i f   ( q u e r y . l e n g t h   >   0   & &   t r i m m e d   = = =   ' ' )   r e t u r n ; 
 
                         w i n d o w . l o c a t i o n . h r e f   =   ' i n d e x . p h p ? a c t i o n = o r d e r s ' ; 
 
                         r e t u r n ; 
 
                 } 
 
 
 
                 s e a r c h L o a d e r . s t y l e . d i s p l a y   =   ' i n l i n e - b l o c k ' ; 
 
                 s e a r c h S t a t u s . i n n e r H T M L   =   ' S e a r c h i n g . . . ' ; 
 
 
 
                 f e t c h ( ' i n d e x . p h p ? a c t i o n = o r d e r _ s e a r c h & s e a r c h = '   +   e n c o d e U R I C o m p o n e n t ( t r i m m e d ) ) 
 
                         . t h e n ( r e s p o n s e   = >   r e s p o n s e . j s o n ( ) ) 
 
                         . t h e n ( d a t a   = >   { 
 
                                 s e a r c h L o a d e r . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                 i f   ( p a g i n a t i o n C o n t a i n e r )   p a g i n a t i o n C o n t a i n e r . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
 
 
                                 i f   ( d a t a . l e n g t h   = = =   0 )   { 
 
                                         o r d e r s B o d y . i n n e r H T M L   =   ` 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 8 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 2 "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > 
 
                                                                 N o   o r d e r s   f o u n d   f o r   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         ` ; 
 
                                         i f   ( p a g i n a t i o n I n f o )   p a g i n a t i o n I n f o . i n n e r H T M L   =   ' T o t a l   O r d e r s :   < s t r o n g > 0 < / s t r o n g > ' ; 
 
                                         s e a r c h S t a t u s . i n n e r H T M L   =   ' N o   r e s u l t s   f o r   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " ' ; 
 
                                         r e t u r n ; 
 
                                 } 
 
 
 
                                 l e t   h t m l   =   ' ' ; 
 
                                 d a t a . f o r E a c h ( o r d e r   = >   { 
 
                                         l e t   s t a t u s C l a s s   =   ' ' ,   s t a t u s I c o n   =   ' ' ; 
 
                                         s w i t c h   ( o r d e r . s t a t u s )   { 
 
                                                 c a s e   ' p e n d i n g ' :       s t a t u s C l a s s   =   ' b g - w a r n i n g   t e x t - d a r k ' ;   s t a t u s I c o n   =   ' f a - c l o c k ' ;   b r e a k ; 
 
                                                 c a s e   ' c u t t i n g ' :       s t a t u s C l a s s   =   ' b g - i n f o   t e x t - d a r k ' ;   s t a t u s I c o n   =   ' f a - c u t ' ;   b r e a k ; 
 
                                                 c a s e   ' s t i t c h i n g ' :   s t a t u s C l a s s   =   ' b g - p r i m a r y   t e x t - w h i t e ' ;   s t a t u s I c o n   =   ' f a - t s h i r t ' ;   b r e a k ; 
 
                                                 c a s e   ' r e a d y ' :           s t a t u s C l a s s   =   ' b g - s u c c e s s   t e x t - w h i t e ' ;   s t a t u s I c o n   =   ' f a - c h e c k - c i r c l e ' ;   b r e a k ; 
 
                                                 c a s e   ' d e l i v e r e d ' :   s t a t u s C l a s s   =   ' b g - s e c o n d a r y   t e x t - w h i t e ' ;   s t a t u s I c o n   =   ' f a - t r u c k ' ;   b r e a k ; 
 
                                                 c a s e   ' c a n c e l l e d ' :   s t a t u s C l a s s   =   ' b g - d a n g e r   t e x t - w h i t e ' ;   s t a t u s I c o n   =   ' f a - t i m e s - c i r c l e ' ;   b r e a k ; 
 
                                                 d e f a u l t :                     s t a t u s C l a s s   =   ' b g - s e c o n d a r y   t e x t - w h i t e ' ;   s t a t u s I c o n   =   ' f a - q u e s t i o n - c i r c l e ' ; 
 
                                         } 
 
 
 
                                         h t m l   + =   ` 
 
                                                 < t r   d a t a - o r d e r - i d = " $ { o r d e r . i d } " > 
 
                                                         < t d > < s t r o n g > $ { e s c a p e H t m l ( o r d e r . o r d e r _ n o ) } < / s t r o n g > < / t d > 
 
                                                         < t d > $ { e s c a p e H t m l ( o r d e r . c u s t o m e r _ n a m e   | |   ' N / A ' ) } < / t d > 
 
                                                         < t d > $ { f o r m a t D a t e ( o r d e r . o r d e r _ d a t e ) } < / t d > 
 
                                                         < t d > $ { o r d e r . d e l i v e r y _ d a t e   ?   f o r m a t D a t e ( o r d e r . d e l i v e r y _ d a t e )   :   ' - ' } < / t d > 
 
                                                         < t d   c l a s s = " t e x t - c e n t e r " > $ { p a r s e I n t ( o r d e r . t o t a l _ s u i t s ) } < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > $ { N u m b e r ( o r d e r . t o t a l _ a m o u n t ) . t o L o c a l e S t r i n g ( ) } < / t d > 
 
                                                         < t d > 
 
                                                                 < s p a n   c l a s s = " b a d g e   $ { s t a t u s C l a s s }   r o u n d e d - p i l l   p x - 2   p y - 1 " > 
 
                                                                         < i   c l a s s = " f a s   $ { s t a t u s I c o n }   m e - 1 "   s t y l e = " f o n t - s i z e : 9 p x ; " > < / i > 
 
                                                                         $ { o r d e r . s t a t u s . c h a r A t ( 0 ) . t o U p p e r C a s e ( )   +   o r d e r . s t a t u s . s l i c e ( 1 ) } 
 
                                                                 < / s p a n > 
 
                                                         < / t d > 
 
                                                         < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                 < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m "   r o l e = " g r o u p " > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ v i e w & i d = $ { o r d e r . i d } "   t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   t i t l e = " V i e w " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e y e " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ e d i t & i d = $ { o r d e r . i d } "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y "   t i t l e = " E d i t " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ d e l e t e & i d = $ { o r d e r . i d } "   c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   t i t l e = " D e l e t e "   o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e   y o u   w a n t   t o   d e l e t e   t h i s   o r d e r ? ' ) ; " > 
 
                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                         < / a > 
 
                                                                 < / d i v > 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         ` ; 
 
                                 } ) ; 
 
 
 
                                 o r d e r s B o d y . i n n e r H T M L   =   h t m l ; 
 
                                 i f   ( p a g i n a t i o n I n f o )   p a g i n a t i o n I n f o . i n n e r H T M L   =   ' T o t a l   O r d e r s :   < s t r o n g > '   +   d a t a . l e n g t h   +   ' < / s t r o n g > ' ; 
 
                                 s e a r c h S t a t u s . i n n e r H T M L   =   ' R e s u l t s :   < s t r o n g > '   +   d a t a . l e n g t h   +   ' < / s t r o n g >   f o r   " < s t r o n g > $ { e s c a p e H t m l ( t r i m m e d ) } < / s t r o n g > " ' ; 
 
                         } ) 
 
                         . c a t c h ( e r r o r   = >   { 
 
                                 c o n s o l e . e r r o r ( ' S e a r c h   e r r o r : ' ,   e r r o r ) ; 
 
                                 s e a r c h L o a d e r . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                 s e a r c h S t a t u s . t e x t C o n t e n t   =   ' E r r o r   s e a r c h i n g .   P l e a s e   t r y   a g a i n . ' ; 
 
                         } ) ; 
 
         } 
 
 
 
         f u n c t i o n   e s c a p e H t m l ( t e x t )   { 
 
                 i f   ( ! t e x t )   r e t u r n   ' ' ; 
 
                 c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                 d i v . t e x t C o n t e n t   =   t e x t ; 
 
                 r e t u r n   d i v . i n n e r H T M L ; 
 
         } 
 
 
 
         f u n c t i o n   f o r m a t D a t e ( d a t e S t r )   { 
 
                 i f   ( ! d a t e S t r )   r e t u r n   ' - ' ; 
 
                 c o n s t   d   =   n e w   D a t e ( d a t e S t r ) ; 
 
                 i f   ( i s N a N ( d ) )   r e t u r n   d a t e S t r ; 
 
                 r e t u r n   d . g e t D a t e ( ) . t o S t r i n g ( ) . p a d S t a r t ( 2 , ' 0 ' )   +   ' - '   +   
 
                               ( d . g e t M o n t h ( ) + 1 ) . t o S t r i n g ( ) . p a d S t a r t ( 2 , ' 0 ' )   +   ' - '   +   
 
                               d . g e t F u l l Y e a r ( ) ; 
 
         } 
 
 
 
         / /   E v e n t :   i n p u t   w i t h   d e b o u n c e 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( e )   { 
 
                 c o n s t   q u e r y   =   t h i s . v a l u e ; 
 
                 i f   ( q u e r y . t r i m ( )   = = =   ' '   & &   q u e r y . l e n g t h   >   0 )   r e t u r n ; 
 
                 i f   ( s e a r c h T i m e o u t )   c l e a r T i m e o u t ( s e a r c h T i m e o u t ) ; 
 
                 i f   ( q u e r y . t r i m ( )   = = =   ' ' )   { 
 
                         w i n d o w . l o c a t i o n . h r e f   =   ' i n d e x . p h p ? a c t i o n = o r d e r s ' ; 
 
                         r e t u r n ; 
 
                 } 
 
                 s e a r c h T i m e o u t   =   s e t T i m e o u t ( f u n c t i o n ( )   { 
 
                         p e r f o r m S e a r c h ( q u e r y ) ; 
 
                 } ,   3 0 0 ) ; 
 
         } ) ; 
 
 
 
         / /   C l e a r   b u t t o n 
 
         c l e a r S e a r c h . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 s e a r c h I n p u t . v a l u e   =   ' ' ; 
 
                 w i n d o w . l o c a t i o n . h r e f   =   ' i n d e x . p h p ? a c t i o n = o r d e r s ' ; 
 
         } ) ; 
 
 
 
         / /   E n t e r   k e y 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( e . k e y   = = =   ' E n t e r ' )   { 
 
                         e . p r e v e n t D e f a u l t ( ) ; 
 
                         c o n s t   q u e r y   =   t h i s . v a l u e ; 
 
                         i f   ( s e a r c h T i m e o u t )   c l e a r T i m e o u t ( s e a r c h T i m e o u t ) ; 
 
                         i f   ( q u e r y . t r i m ( )   = = =   ' ' )   { 
 
                                 w i n d o w . l o c a t i o n . h r e f   =   ' i n d e x . p h p ? a c t i o n = o r d e r s ' ; 
 
                         }   e l s e   { 
 
                                 p e r f o r m S e a r c h ( q u e r y ) ; 
 
                         } 
 
                 } 
 
         } ) ; 
 
 
 
         / /   F o c u s :   s e l e c t   a l l 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' f o c u s ' ,   f u n c t i o n ( )   { 
 
                 t h i s . s e l e c t ( ) ; 
 
         } ) ; 
 
 
 
         / /   H i d e   p a g i n a t i o n   i f   s e a r c h   i s   a c t i v e   o n   l o a d 
 
         < ? p h p   i f   ( ! e m p t y ( $ s e a r c h ) ) :   ? > 
 
                 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
                         i f   ( p a g i n a t i o n C o n t a i n e r )   p a g i n a t i o n C o n t a i n e r . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 } ) ; 
 
         < ? p h p   e n d i f ;   ? > 
 
 
 
 } ) ( ) ; 
 
 < / s c r i p t > 
 
 < ? p h p 
 
 / /   = = = = =   C A L C U L A T I O N S   = = = = = 
 
 $ s u b _ t o t a l   =   $ o r d e r [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ; 
 
 $ a d v a n c e   =   $ o r d e r [ ' p a i d _ a m o u n t ' ]   ? ?   0 ; 
 
 $ f i n a l _ b a l a n c e   =   $ s u b _ t o t a l   -   $ a d v a n c e ; 
 
 
 
 / /   = = = = =   C O M P A N Y   I N F O   = = = = = 
 
 i f   ( ! i s s e t ( $ c o m p a n y ) )   { 
 
         $ c o m p a n y   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
 } 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e > I n v o i c e   -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   # f 5 f 7 f a ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         m a x - w i d t h :   1 0 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         p a d d i n g :   1 2 p x   1 0 p x ; 
 
                 } 
 
                 . c o n t a i n e r   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         p a d d i n g :   0 ; 
 
                 } 
 
                 . h e a d e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g - b o t t o m :   8 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         g a p :   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   4 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   i m g   { 
 
                         m a x - h e i g h t :   6 0 p x ; 
 
                         m a x - w i d t h :   6 0 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         b o r d e r :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g :   2 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   { 
 
                         f o n t - s i z e :   2 2 p x ; 
 
                         c o l o r :   # 1 a 3 a 6 e ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         m a r g i n :   0 ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . h e a d e r   . s u b   { 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                         l i n e - h e i g h t :   1 . 3 ; 
 
                         m a r g i n - t o p :   2 p x ; 
 
                 } 
 
                 . h e a d e r   . o r d e r - n o   { 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 2 5 6 3 e b ; 
 
                         m a r g i n - t o p :   4 p x ; 
 
                         b a c k g r o u n d :   # e f f 6 f f ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         p a d d i n g :   3 p x   1 4 p x ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   6 p x   0   8 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   { 
 
                         m a x - w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   4 5 p x ; 
 
                 } 
 
                 . i n f o - g r i d   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r   1 f r ; 
 
                         g a p :   4 p x   1 2 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         p a d d i n g :   6 p x   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m   { 
 
                         d i s p l a y :   f l e x ; 
 
                         f l e x - d i r e c t i o n :   c o l u m n ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m   . l a b e l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                         l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m   . v a l u e   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                 } 
 
                 t a b l e   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
                         m a r g i n :   6 p x   0 ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 t h e a d   t h   { 
 
                         b a c k g r o u n d :   # e f f 6 f f ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         p a d d i n g :   6 p x   8 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         c o l o r :   # 1 e 3 a 8 a ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                 } 
 
                 t b o d y   t d   { 
 
                         p a d d i n g :   6 p x   8 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 t b o d y   t r : n t h - c h i l d ( e v e n )   { 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                 } 
 
                 . t o t a l s   { 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g - t o p :   6 p x ; 
 
                         m a r g i n - t o p :   6 p x ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         b o r d e r - r a d i u s :   0   0   6 p x   6 p x ; 
 
                         p a d d i n g :   8 p x   1 2 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   2 p x   0 ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w   . l a b e l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . t o t a l s   . r o w   . v a l u e   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 . t o t a l s   . r o w . b a l a n c e   . v a l u e   { 
 
                         c o l o r :   # d c 3 5 4 5 ; 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w . a d v a n c e   . v a l u e   { 
 
                         c o l o r :   # 2 5 6 3 e b ; 
 
                 } 
 
                 . f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g - t o p :   8 p x ; 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # 6 6 6 ; 
 
                 } 
 
                 . f o o t e r   . t h a n k y o u   { 
 
                         f o n t - s i z e :   1 8 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 8 a 7 4 5 ; 
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                 } 
 
                 . f o o t e r   . s o f t w a r e   { 
 
                         f o n t - s i z e :   9 p x ; 
 
                         c o l o r :   # a a a ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                 } 
 
                 . b t n - g r o u p   { 
 
                         d i s p l a y :   f l e x ; 
 
                         g a p :   8 p x ; 
 
                         m a r g i n - t o p :   1 2 p x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 } 
 
                 . b t n - g r o u p   b u t t o n ,   . b t n - g r o u p   a   { 
 
                         p a d d i n g :   8 p x   2 4 p x ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                         t e x t - d e c o r a t i o n :   n o n e ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                 } 
 
                 . b t n - p r i n t   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                         c o l o r :   # f f f ; 
 
                         b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 } 
 
                 . b t n - p r i n t : h o v e r   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                         b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . b t n - c l o s e   { 
 
                         b a c k g r o u n d :   # e 2 e 8 f 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . b t n - c l o s e : h o v e r   { 
 
                         b a c k g r o u n d :   # c b d 5 e 1 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 @ p a g e   { 
 
                         s i z e :   a u t o ; 
 
                         m a r g i n :   1 0 m m ; 
 
                 } 
 
                 @ m e d i a   p r i n t   { 
 
                         b o d y   {   b a c k g r o u n d :   # f f f ;   p a d d i n g :   0 ;   m a r g i n :   0 ;   d i s p l a y :   b l o c k ;   } 
 
                         . p r i n t - w r a p p e r   {   b o x - s h a d o w :   n o n e ;   b o r d e r - r a d i u s :   0 ;   p a d d i n g :   1 0 p x ;   m a x - w i d t h :   1 0 0 % ;   } 
 
                         . b t n - g r o u p   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 } 
 
                 @ m e d i a   ( m a x - w i d t h :   6 0 0 p x )   { 
 
                         . i n f o - g r i d   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   } 
 
                         . p r i n t - w r a p p e r   {   p a d d i n g :   8 p x ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
 
 
                 < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < d i v   c l a s s = " l o g o - r o w " > 
 
                                 < ? p h p   
 
                                         $ l o g o _ p a t h   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                         i f   ( f i l e _ e x i s t s ( $ l o g o _ p a t h )   & &   ! e m p t y ( $ c o m p a n y [ ' l o g o ' ] )   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                 e c h o   ' < i m g   s r c = " '   .   $ l o g o _ p a t h   .   ' "   a l t = " L o g o " > ' ; 
 
                                         } 
 
                                 ? > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' H u s s a i n i   T a i l o r s ' ) ;   ? > < / h 2 > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " s u b " > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' a d d r e s s ' ] ) ) :   ? > 
 
                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ] ) ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' p h o n e ' ] ) ) :   ? > 
 
                                         < b r > P h o n e :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ] ) ;   ? > < / s p a n > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " o r d e r - n o " > I n v o i c e   # :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   B A R C O D E   = = = = =   - - > 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   I N F O   = = = = =   - - > 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > O r d e r   D a t e < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > D e l i v e r y   D a t e < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   $ o r d e r [ ' d e l i v e r y _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) )   :   ' - ' ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > S t a t u s < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > C u s t o m e r < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > P h o n e < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > T o t a l   S u i t s < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' t o t a l _ s u i t s ' ] ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   S U I T S   T A B L E   = = = = =   - - > 
 
                 < t a b l e > 
 
                         < t h e a d > 
 
                                 < t r > 
 
                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > # < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 4 0 % ; " > S u i t < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 2 0 % ; " > S i z e < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 3 0 % ; " > P r i c e < / t h > 
 
                                 < / t r > 
 
                         < / t h e a d > 
 
                         < t b o d y > 
 
                                 < ? p h p   i f   ( e m p t y ( $ s u i t s ) ) :   ? > 
 
                                         < t r > 
 
                                                 < t d   c o l s p a n = " 4 "   s t y l e = " t e x t - a l i g n : c e n t e r ;   p a d d i n g : 1 0 p x   0 ;   c o l o r : # 9 9 9 ; " > 
 
                                                         N o   s u i t s   f o u n d . 
 
                                                 < / t d > 
 
                                         < / t r > 
 
                                 < ? p h p   e l s e :   ? > 
 
                                         < ? p h p   f o r e a c h   ( $ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d > < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u i t [ ' p r i c e ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / t b o d y > 
 
                 < / t a b l e > 
 
 
 
                 < ! - -   = = = = =   T O T A L S   = = = = =   - - > 
 
                 < d i v   c l a s s = " t o t a l s " > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " > S u b   T o t a l : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u b _ t o t a l ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " > D i s c o u n t : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d i s c o u n t ' ] ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " > N e t   T o t a l : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e "   s t y l e = " c o l o r : # 2 5 6 3 e b ; " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' n e t _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < ? p h p   i f   ( $ a d v a n c e   >   0 ) :   ? > 
 
                                 < d i v   c l a s s = " r o w   a d v a n c e " > 
 
                                         < s p a n   c l a s s = " l a b e l " > A d v a n c e : < / s p a n > 
 
                                         < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ a d v a n c e ,   0 ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                         < d i v   c l a s s = " r o w   b a l a n c e " > 
 
                                 < s p a n   c l a s s = " l a b e l " > B a l a n c e   D u e : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ f i n a l _ b a l a n c e ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < d i v   c l a s s = " t h a n k y o u " > T h a n k   y o u   f o r   y o u r   b u s i n e s s ! < / d i v > 
 
                         < d i v > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / d i v > 
 
                         < d i v   c l a s s = " s o f t w a r e " > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / d i v > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
         < d i v   c l a s s = " b t n - g r o u p   n o - p r i n t " > 
 
                 < b u t t o n   c l a s s = " b t n - p r i n t "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                         < i   c l a s s = " f a s   f a - p r i n t " > < / i >   P r i n t 
 
                 < / b u t t o n > 
 
                 < b u t t o n   c l a s s = " b t n - c l o s e "   o n c l i c k = " w i n d o w . c l o s e ( ) " > 
 
                         < i   c l a s s = " f a s   f a - t i m e s " > < / i >   C l o s e 
 
                 < / b u t t o n > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r s "   c l a s s = " b t n - c l o s e " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
         J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > " ,   { 
 
                 f o r m a t :   " C O D E 1 2 8 " , 
 
                 w i d t h :   2 . 5 , 
 
                 h e i g h t :   5 0 , 
 
                 d i s p l a y V a l u e :   t r u e , 
 
                 f o n t :   " m o n o s p a c e " , 
 
                 f o n t S i z e :   1 5 , 
 
                 m a r g i n :   0 , 
 
                 b a c k g r o u n d :   " # f f f f f f " , 
 
                 l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
         } ) ; 
 
         d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                         e . p r e v e n t D e f a u l t ( ) ; 
 
                         w i n d o w . p r i n t ( ) ; 
 
                 } 
 
         } ) ; 
 
 < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < ? p h p 
 
 / /   = = = = =   C A L C U L A T I O N S   = = = = = 
 
 $ s u b _ t o t a l   =   $ o r d e r [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ; 
 
 $ a d v a n c e   =   $ o r d e r [ ' p a i d _ a m o u n t ' ]   ? ?   0 ; 
 
 $ f i n a l _ b a l a n c e   =   $ s u b _ t o t a l   -   $ a d v a n c e ; 
 
 
 
 / /   = = = = =   C O M P A N Y   I N F O   = = = = = 
 
 i f   ( ! i s s e t ( $ c o m p a n y ) )   { 
 
         $ c o m p a n y   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
 } 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e > R e c e i p t   -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   # f 5 f 7 f a ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         m a x - w i d t h :   8 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         p a d d i n g :   1 0 p x   8 p x ; 
 
                         d i r e c t i o n :   l t r ; 
 
                 } 
 
                 . c o n t a i n e r   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         p a d d i n g :   0 ; 
 
                 } 
 
                 . h e a d e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g - b o t t o m :   8 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         g a p :   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   4 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   i m g   { 
 
                         m a x - h e i g h t :   6 0 p x ; 
 
                         m a x - w i d t h :   6 0 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         b o r d e r :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g :   2 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   { 
 
                         f o n t - s i z e :   2 0 p x ; 
 
                         c o l o r :   # 1 a 3 a 6 e ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         m a r g i n :   0 ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . h e a d e r   . s u b   { 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                         l i n e - h e i g h t :   1 . 3 ; 
 
                         m a r g i n - t o p :   2 p x ; 
 
                 } 
 
                 . h e a d e r   . o r d e r - n o   { 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 2 5 6 3 e b ; 
 
                         m a r g i n - t o p :   4 p x ; 
 
                         b a c k g r o u n d :   # e f f 6 f f ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         p a d d i n g :   3 p x   1 4 p x ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                 } 
 
                 . h e a d e r   . s t a t u s - b a d g e   { 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # f f f ; 
 
                         b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         p a d d i n g :   3 p x   1 4 p x ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                         m a r g i n - t o p :   4 p x ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   6 p x   0   8 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   { 
 
                         m a x - w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   4 5 p x ; 
 
                 } 
 
                 . i n f o - g r i d   { 
 
                         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         p a d d i n g :   6 p x   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m   { 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   2 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e f 2 f 6 ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m : l a s t - c h i l d   { 
 
                         b o r d e r - b o t t o m :   n o n e ; 
 
                 } 
 
                 . i n f o - g r i d   . l a b e l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . i n f o - g r i d   . v a l u e   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 t a b l e   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
                         m a r g i n :   6 p x   0 ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                 } 
 
                 t h e a d   t h   { 
 
                         b a c k g r o u n d :   # e f f 6 f f ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         p a d d i n g :   4 p x   4 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         c o l o r :   # 1 e 3 a 8 a ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                 } 
 
                 t b o d y   t d   { 
 
                         p a d d i n g :   4 p x   4 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                 } 
 
                 t b o d y   t r : n t h - c h i l d ( e v e n )   { 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                 } 
 
                 . t o t a l s   { 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g - t o p :   6 p x ; 
 
                         m a r g i n - t o p :   6 p x ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         b o r d e r - r a d i u s :   0   0   6 p x   6 p x ; 
 
                         p a d d i n g :   8 p x   1 0 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   2 p x   0 ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w   . l a b e l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . t o t a l s   . r o w   . v a l u e   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 . t o t a l s   . r o w . b a l a n c e   . v a l u e   { 
 
                         c o l o r :   # d c 3 5 4 5 ; 
 
                         f o n t - s i z e :   1 5 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w . a d v a n c e   . v a l u e   { 
 
                         c o l o r :   # 2 5 6 3 e b ; 
 
                 } 
 
                 . f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 5 6 3 e b ; 
 
                         p a d d i n g - t o p :   8 p x ; 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         c o l o r :   # 6 6 6 ; 
 
                 } 
 
                 . f o o t e r   . t h a n k y o u   { 
 
                         f o n t - s i z e :   1 8 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 8 a 7 4 5 ; 
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                 } 
 
                 . f o o t e r   . s o f t w a r e   { 
 
                         f o n t - s i z e :   8 p x ; 
 
                         c o l o r :   # a a a ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                 } 
 
                 . b t n - g r o u p   { 
 
                         d i s p l a y :   f l e x ; 
 
                         g a p :   8 p x ; 
 
                         m a r g i n - t o p :   1 2 p x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 } 
 
                 . b t n - g r o u p   b u t t o n ,   . b t n - g r o u p   a   { 
 
                         p a d d i n g :   8 p x   2 4 p x ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                         t e x t - d e c o r a t i o n :   n o n e ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                 } 
 
                 . b t n - p r i n t   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                         c o l o r :   # f f f ; 
 
                         b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 } 
 
                 . b t n - p r i n t : h o v e r   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                         b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . b t n - c l o s e   { 
 
                         b a c k g r o u n d :   # e 2 e 8 f 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . b t n - c l o s e : h o v e r   { 
 
                         b a c k g r o u n d :   # c b d 5 e 1 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 @ p a g e   { 
 
                         s i z e :   8 0 m m   a u t o ; 
 
                         m a r g i n :   0 ; 
 
                 } 
 
                 @ m e d i a   p r i n t   { 
 
                         b o d y   {   b a c k g r o u n d :   # f f f ;   p a d d i n g :   0 ;   m a r g i n :   0 ;   d i s p l a y :   b l o c k ;   } 
 
                         . p r i n t - w r a p p e r   {   b o x - s h a d o w :   n o n e ;   b o r d e r - r a d i u s :   0 ;   p a d d i n g :   6 p x   5 p x ;   m a x - w i d t h :   8 0 m m ;   } 
 
                         . b t n - g r o u p   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 } 
 
                 @ m e d i a   ( m a x - w i d t h :   4 0 0 p x )   { 
 
                         . p r i n t - w r a p p e r   {   p a d d i n g :   6 p x   3 p x ;   } 
 
                         . i n f o - g r i d   {   f o n t - s i z e :   9 p x ;   p a d d i n g :   3 p x   4 p x ;   } 
 
                         t a b l e   {   f o n t - s i z e :   8 p x ;   } 
 
                         t h e a d   t h ,   t b o d y   t d   {   p a d d i n g :   2 p x   2 p x ;   } 
 
                         . t o t a l s   . r o w   {   f o n t - s i z e :   1 0 p x ;   } 
 
                         . h e a d e r   h 2   {   f o n t - s i z e :   1 8 p x ;   } 
 
                         . b a r c o d e - c o n t a i n e r   s v g   {   h e i g h t :   3 5 p x ;   } 
 
                         . f o o t e r   . t h a n k y o u   {   f o n t - s i z e :   1 6 p x ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
 
 
                 < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < d i v   c l a s s = " l o g o - r o w " > 
 
                                 < ? p h p   
 
                                         $ l o g o _ p a t h   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                         i f   ( f i l e _ e x i s t s ( $ l o g o _ p a t h )   & &   ! e m p t y ( $ c o m p a n y [ ' l o g o ' ] )   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                 e c h o   ' < i m g   s r c = " '   .   $ l o g o _ p a t h   .   ' "   a l t = " L o g o " > ' ; 
 
                                         } 
 
                                 ? > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' H u s s a i n i   T a i l o r s ' ) ;   ? > < / h 2 > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " s u b " > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' a d d r e s s ' ] ) ) :   ? > 
 
                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ] ) ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' p h o n e ' ] ) ) :   ? > 
 
                                         < b r > P h o n e :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ] ) ;   ? > < / s p a n > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " o r d e r - n o " > O r d e r   # :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / d i v > 
 
                         < d i v   c l a s s = " s t a t u s - b a d g e " > < ? p h p   e c h o   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   B A R C O D E   = = = = =   - - > 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   O R D E R   I N F O   = = = = =   - - > 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > C u s t o m e r : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > P h o n e : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > D a t e : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > D e l i v e r y : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   $ o r d e r [ ' d e l i v e r y _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) )   :   ' - ' ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > S t a t u s : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > S u i t s : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' t o t a l _ s u i t s ' ] ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   S U I T S   T A B L E   = = = = =   - - > 
 
                 < t a b l e > 
 
                         < t h e a d > 
 
                                 < t r > 
 
                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > # < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 4 0 % ; " > S u i t < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 2 0 % ; " > S i z e < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 3 0 % ; " > P r i c e < / t h > 
 
                                 < / t r > 
 
                         < / t h e a d > 
 
                         < t b o d y > 
 
                                 < ? p h p   i f   ( e m p t y ( $ s u i t s ) ) :   ? > 
 
                                         < t r > 
 
                                                 < t d   c o l s p a n = " 4 "   s t y l e = " t e x t - a l i g n : c e n t e r ;   p a d d i n g : 1 0 p x   0 ;   c o l o r : # 9 9 9 ;   f o n t - s i z e : 1 1 p x ; " > 
 
                                                         N o   s u i t s   f o u n d . 
 
                                                 < / t d > 
 
                                         < / t r > 
 
                                 < ? p h p   e l s e :   ? > 
 
                                         < ? p h p   f o r e a c h   ( $ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d > < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u i t [ ' p r i c e ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / t b o d y > 
 
                 < / t a b l e > 
 
 
 
                 < ! - -   = = = = =   T O T A L S   = = = = =   - - > 
 
                 < d i v   c l a s s = " t o t a l s " > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " > S u b   T o t a l : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u b _ t o t a l ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < ? p h p   i f   ( $ a d v a n c e   >   0 ) :   ? > 
 
                                 < d i v   c l a s s = " r o w   a d v a n c e " > 
 
                                         < s p a n   c l a s s = " l a b e l " > A d v a n c e : < / s p a n > 
 
                                         < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ a d v a n c e ,   0 ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                         < d i v   c l a s s = " r o w   b a l a n c e " > 
 
                                 < s p a n   c l a s s = " l a b e l " > B a l a n c e : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ f i n a l _ b a l a n c e ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < d i v   c l a s s = " t h a n k y o u " > T h a n k   y o u ! < / d i v > 
 
                         < d i v > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / d i v > 
 
                         < d i v   c l a s s = " s o f t w a r e " > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / d i v > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
         < d i v   c l a s s = " b t n - g r o u p   n o - p r i n t " > 
 
                 < b u t t o n   c l a s s = " b t n - p r i n t "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                         < i   c l a s s = " f a s   f a - p r i n t " > < / i >   P r i n t 
 
                 < / b u t t o n > 
 
                 < b u t t o n   c l a s s = " b t n - c l o s e "   o n c l i c k = " w i n d o w . c l o s e ( ) " > 
 
                         < i   c l a s s = " f a s   f a - t i m e s " > < / i >   C l o s e 
 
                 < / b u t t o n > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r s "   c l a s s = " b t n - c l o s e " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
         J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > " ,   { 
 
                 f o r m a t :   " C O D E 1 2 8 " , 
 
                 w i d t h :   2 . 5 , 
 
                 h e i g h t :   5 0 , 
 
                 d i s p l a y V a l u e :   t r u e , 
 
                 f o n t :   " m o n o s p a c e " , 
 
                 f o n t S i z e :   1 5 , 
 
                 m a r g i n :   0 , 
 
                 b a c k g r o u n d :   " # f f f f f f " , 
 
                 l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
         } ) ; 
 
         d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                         e . p r e v e n t D e f a u l t ( ) ; 
 
                         w i n d o w . p r i n t ( ) ; 
 
                 } 
 
         } ) ; 
 
 < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < ? p h p 
 
 / /   = = = = =   C A L C U L A T I O N S   = = = = = 
 
 $ s u b _ t o t a l   =   $ o r d e r [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ; 
 
 $ a d v a n c e   =   $ o r d e r [ ' p a i d _ a m o u n t ' ]   ? ?   0 ; 
 
 $ f i n a l _ b a l a n c e   =   $ s u b _ t o t a l   -   $ a d v a n c e ; 
 
 
 
 / /   = = = = =   S H E L F   I N F O   = = = = = 
 
 $ s h e l f   =   n u l l ; 
 
 i f   ( ! e m p t y ( $ o r d e r [ ' s h e l f _ i d ' ] ) )   { 
 
         r e q u i r e _ o n c e   ' a p p / m o d e l s / S h e l f . p h p ' ; 
 
         $ s h e l f M o d e l   =   n e w   S h e l f ( ) ; 
 
         $ s h e l f   =   $ s h e l f M o d e l - > g e t B y I d ( $ o r d e r [ ' s h e l f _ i d ' ] ) ; 
 
 } 
 
 
 
 / /   = = = = =   C O M P A N Y   I N F O   = = = = = 
 
 i f   ( ! i s s e t ( $ c o m p a n y ) )   { 
 
         $ c o m p a n y   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
 } 
 
 
 
 / /   = = = = =   S T A T U S   N A M E S   I N   S I N D H I   = = = = = 
 
 $ s t a t u s _ n a m e s   =   [ 
 
         ' p e n d i n g '       = >   '    `               ' , 
 
         ' c u t t i n g '       = >   '          ' , 
 
         ' s t i t c h i n g '   = >   '          `' , 
 
         ' r e a d y '           = >   '    `    ' , 
 
         ' d e l i v e r e d '   = >   '  `   `        `  ' , 
 
         ' c a n c e l l e d '   = >   '  &         ' 
 
 ] ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e >      `    -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < l i n k   h r e f = " h t t p s : / / f o n t s . g o o g l e a p i s . c o m / c s s 2 ? f a m i l y = N o t o + S a n s + A r a b i c : w g h t @ 4 0 0 ; 7 0 0 & d i s p l a y = s w a p "   r e l = " s t y l e s h e e t " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   # f 5 f 7 f a ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         m a x - w i d t h :   8 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         p a d d i n g :   1 0 p x   8 p x ; 
 
                         d i r e c t i o n :   r t l ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . c o n t a i n e r   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         p a d d i n g :   0 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = = =   H E A D E R   = = = = =   * / 
 
                 . h e a d e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                         p a d d i n g - b o t t o m :   8 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         g a p :   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   4 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   i m g   { 
 
                         m a x - h e i g h t :   6 0 p x ; 
 
                         m a x - w i d t h :   6 0 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         b o r d e r :   2 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                         p a d d i n g :   2 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   { 
 
                         f o n t - s i z e :   2 2 p x ; 
 
                         c o l o r :   # 1 a 1 a 2 e ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         m a r g i n :   0 ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . h e a d e r   . s u b   { 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                         l i n e - h e i g h t :   1 . 3 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         m a r g i n - t o p :   2 p x ; 
 
                 } 
 
                 . h e a d e r   . o r d e r - n o   { 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 4 f 8 a 8 b ; 
 
                         m a r g i n - t o p :   4 p x ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         p a d d i n g :   3 p x   1 4 p x ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . h e a d e r   . s t a t u s - b a d g e   { 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # f f f ; 
 
                         b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         p a d d i n g :   3 p x   1 4 p x ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                         m a r g i n - t o p :   4 p x ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = = =   B A R C O D E   = = = = =   * / 
 
                 . b a r c o d e - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   6 p x   0   8 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   { 
 
                         m a x - w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   4 5 p x ; 
 
                 } 
 
                 / *   = = = = =   I N F O   G R I D   = = = = =   * / 
 
                 . i n f o - g r i d   { 
 
                         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         p a d d i n g :   6 p x   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                         d i s p l a y :   f l e x ; 
 
                         f l e x - d i r e c t i o n :   c o l u m n ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m   { 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   2 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e f 2 f 6 ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m : l a s t - c h i l d   { 
 
                         b o r d e r - b o t t o m :   n o n e ; 
 
                 } 
 
                 . i n f o - g r i d   . l a b e l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . v a l u e   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         t e x t - a l i g n :   l e f t ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . s h e l f - b o x   { 
 
                         b a c k g r o u n d :   # f 0 f d f 4 ; 
 
                         p a d d i n g :   4 p x   8 p x ; 
 
                         b o r d e r - r a d i u s :   4 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d c f c e 7 ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                         b o r d e r - b o t t o m :   n o n e ; 
 
                 } 
 
                 . i n f o - g r i d   . s h e l f - b o x   . l a b e l   { 
 
                         c o l o r :   # 1 6 a 3 4 a ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . s h e l f - b o x   . v a l u e   { 
 
                         c o l o r :   # 1 6 a 3 4 a ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 / *   = = = = =   T A B L E   = = = = =   * / 
 
                 t a b l e   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
                         m a r g i n :   6 p x   0 ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t h e a d   t h   { 
 
                         b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         p a d d i n g :   4 p x   4 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         c o l o r :   # 2 c 5 f 6 e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                 } 
 
                 t b o d y   t d   { 
 
                         p a d d i n g :   4 p x   4 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                 } 
 
                 t b o d y   t r : n t h - c h i l d ( e v e n )   { 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                 } 
 
                 / *   = = = = =   T O T A L S   = = = = =   * / 
 
                 . t o t a l s   { 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                         p a d d i n g - t o p :   6 p x ; 
 
                         m a r g i n - t o p :   6 p x ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         b o r d e r - r a d i u s :   0   0   6 p x   6 p x ; 
 
                         p a d d i n g :   8 p x   1 0 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   2 p x   0 ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . t o t a l s   . r o w   . l a b e l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . t o t a l s   . r o w   . v a l u e   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 . t o t a l s   . r o w . b a l a n c e   . v a l u e   { 
 
                         c o l o r :   # d c 3 5 4 5 ; 
 
                         f o n t - s i z e :   1 5 p x ; 
 
                 } 
 
                 . t o t a l s   . r o w . a d v a n c e   . v a l u e   { 
 
                         c o l o r :   # 0 d 6 e f d ; 
 
                 } 
 
                 / *   = = = = =   F O O T E R   = = = = =   * / 
 
                 . f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                         p a d d i n g - t o p :   8 p x ; 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         c o l o r :   # 6 6 6 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . f o o t e r   . t h a n k y o u   { 
 
                         f o n t - s i z e :   1 8 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 8 a 7 4 5 ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                 } 
 
                 . f o o t e r   . s o f t w a r e   { 
 
                         f o n t - s i z e :   8 p x ; 
 
                         c o l o r :   # a a a ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                 } 
 
                 / *   = = = = =   P R I N T   B U T T O N   = = = = =   * / 
 
                 . p r i n t - b t n - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g - t o p :   1 2 p x ; 
 
                         m a r g i n - t o p :   8 p x ; 
 
                         b o r d e r - t o p :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 } 
 
                 . p r i n t - b t n   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 4 f 8 a 8 b   0 % ,   # 2 c 5 f 6 e   1 0 0 % ) ; 
 
                         c o l o r :   # f f f ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         p a d d i n g :   8 p x   3 0 p x ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                         b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 3 5 ) ; 
 
                         f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' S e g o e   U I ' ,   s a n s - s e r i f ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . p r i n t - b t n : h o v e r   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                         b o x - s h a d o w :   0   6 p x   2 5 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 4 5 ) ; 
 
                 } 
 
                 . p r i n t - b t n   i   { 
 
                         m a r g i n - l e f t :   8 p x ; 
 
                 } 
 
                 . s h o r t c u t - h i n t   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # a a a ; 
 
                         m a r g i n - t o p :   6 p x ; 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
                         d i r e c t i o n :   l t r ; 
 
                 } 
 
                 . s h o r t c u t - h i n t   k b d   { 
 
                         b a c k g r o u n d :   # f 0 f 0 f 0 ; 
 
                         p a d d i n g :   2 p x   1 0 p x ; 
 
                         b o r d e r - r a d i u s :   4 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                 } 
 
                 / *   = = = = =   P R I N T   S T Y L E S   = = = = =   * / 
 
                 @ p a g e   { 
 
                         s i z e :   8 0 m m   a u t o ; 
 
                         m a r g i n :   0 ; 
 
                 } 
 
                 @ m e d i a   p r i n t   { 
 
                         b o d y   { 
 
                                 b a c k g r o u n d :   # f f f ; 
 
                                 p a d d i n g :   0 ; 
 
                                 m a r g i n :   0 ; 
 
                                 d i s p l a y :   b l o c k ; 
 
                                 m i n - h e i g h t :   a u t o ; 
 
                         } 
 
                         . p r i n t - w r a p p e r   { 
 
                                 b o x - s h a d o w :   n o n e ; 
 
                                 b o r d e r - r a d i u s :   0 ; 
 
                                 p a d d i n g :   6 p x   5 p x ; 
 
                                 m a x - w i d t h :   8 0 m m ; 
 
                         } 
 
                         . p r i n t - b t n - c o n t a i n e r   { 
 
                                 d i s p l a y :   n o n e   ! i m p o r t a n t ; 
 
                         } 
 
                         . s h o r t c u t - h i n t   { 
 
                                 d i s p l a y :   n o n e   ! i m p o r t a n t ; 
 
                         } 
 
                         . h e a d e r   h 2   { 
 
                                 f o n t - s i z e :   2 4 p x ; 
 
                         } 
 
                         . t o t a l s   . r o w . b a l a n c e   . v a l u e   { 
 
                                 f o n t - s i z e :   1 7 p x ; 
 
                         } 
 
                         t a b l e   { 
 
                                 f o n t - s i z e :   1 1 p x ; 
 
                         } 
 
                         . i n f o - g r i d   { 
 
                                 f o n t - s i z e :   1 2 p x ; 
 
                         } 
 
                         . b a r c o d e - c o n t a i n e r   s v g   { 
 
                                 h e i g h t :   5 0 p x ; 
 
                         } 
 
                         . f o o t e r   . t h a n k y o u   { 
 
                                 f o n t - s i z e :   2 0 p x ; 
 
                         } 
 
                 } 
 
                 @ m e d i a   ( m a x - w i d t h :   4 0 0 p x )   { 
 
                         . p r i n t - w r a p p e r   {   p a d d i n g :   6 p x   3 p x ;   } 
 
                         . i n f o - g r i d   {   f o n t - s i z e :   9 p x ;   p a d d i n g :   3 p x   4 p x ;   } 
 
                         t a b l e   {   f o n t - s i z e :   8 p x ;   } 
 
                         t h e a d   t h ,   t b o d y   t d   {   p a d d i n g :   2 p x   2 p x ;   } 
 
                         . t o t a l s   . r o w   {   f o n t - s i z e :   1 0 p x ;   } 
 
                         . h e a d e r   h 2   {   f o n t - s i z e :   1 8 p x ;   } 
 
                         . h e a d e r   . o r d e r - n o   {   f o n t - s i z e :   1 2 p x ;   } 
 
                         . b a r c o d e - c o n t a i n e r   s v g   {   h e i g h t :   3 5 p x ;   } 
 
                         . f o o t e r   . t h a n k y o u   {   f o n t - s i z e :   1 6 p x ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
 
 
                 < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < d i v   c l a s s = " l o g o - r o w " > 
 
                                 < ? p h p   
 
                                         $ l o g o _ p a t h   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                         i f   ( f i l e _ e x i s t s ( $ l o g o _ p a t h )   & &   ! e m p t y ( $ c o m p a n y [ ' l o g o ' ] )   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                 e c h o   ' < i m g   s r c = " '   .   $ l o g o _ p a t h   .   ' "   a l t = "       " > ' ; 
 
                                         } 
 
                                 ? > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   '      `    `     `    ' ) ;   ? > < / h 2 > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " s u b " > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' a d d r e s s ' ] ) ) :   ? > 
 
                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ] ) ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' p h o n e ' ] ) ) :   ? > 
 
                                         < b r >       :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ] ) ;   ? > < / s p a n > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " o r d e r - n o " >      `        &     :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / d i v > 
 
                         < d i v   c l a s s = " s t a t u s - b a d g e " > < ? p h p   e c h o   $ s t a t u s _ n a m e s [ $ o r d e r [ ' s t a t u s ' ] ]   ? ?   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   B A R C O D E   = = = = =   - - > 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   O R D E R   I N F O   = = = = =   - - > 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " >        !   : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " >       : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " >        `  : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " >        `  : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   $ o r d e r [ ' d e l i v e r y _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) )   :   ' - ' ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " >         : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   $ s t a t u s _ n a m e s [ $ o r d e r [ ' s t a t u s ' ] ]   ? ?   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " >      : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' t o t a l _ s u i t s ' ] ;   ? > < / s p a n > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S H E L F   I N F O   = = = = =   - - > 
 
                         < ? p h p   i f   ( $ s h e l f   & &   ( $ o r d e r [ ' s t a t u s ' ]   = =   ' r e a d y '   | |   $ o r d e r [ ' s t a t u s ' ]   = =   ' d e l i v e r e d ' ) ) :   ? > 
 
                                 < d i v   c l a s s = " s h e l f - b o x " > 
 
                                         < s p a n   c l a s s = " l a b e l " > < i   c l a s s = " f a s   f a - a r c h i v e   m e - 1 " > < / i >      `       &      & : < / s p a n > 
 
                                         < s p a n   c l a s s = " v a l u e " > 
 
                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n a m e ' ]   .   '   -   '   .   $ s h e l f [ ' s h e l f _ n u m b e r ' ] ) ;   ? > 
 
                                                 < ? p h p   i f   ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) :   ? > 
 
                                                         ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) ;   ? > ) 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / s p a n > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   S U I T S   T A B L E   = = = = =   - - > 
 
                 < t a b l e > 
 
                         < t h e a d > 
 
                                 < t r > 
 
                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > # < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 4 0 % ; " >      < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 2 0 % ; " >         < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 3 0 % ; " >      & < / t h > 
 
                                 < / t r > 
 
                         < / t h e a d > 
 
                         < t b o d y > 
 
                                 < ? p h p   i f   ( e m p t y ( $ s u i t s ) ) :   ? > 
 
                                         < t r > 
 
                                                 < t d   c o l s p a n = " 4 "   s t y l e = " t e x t - a l i g n : c e n t e r ;   p a d d i n g : 1 0 p x   0 ;   c o l o r : # 9 9 9 ;   f o n t - s i z e : 1 1 p x ; " > 
 
                                                            `     !              !    &    `  
 
                                                 < / t d > 
 
                                         < / t r > 
 
                                 < ? p h p   e l s e :   ? > 
 
                                         < ? p h p   f o r e a c h   ( $ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d > < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u i t [ ' p r i c e ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / t b o d y > 
 
                 < / t a b l e > 
 
 
 
                 < ! - -   = = = = =   T O T A L S   = = = = =   - - > 
 
                 < d i v   c l a s s = " t o t a l s " > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " >            &   ( S u b   T o t a l ) : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u b _ t o t a l ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < ? p h p   i f   ( $ a d v a n c e   >   0 ) :   ? > 
 
                                 < d i v   c l a s s = " r o w   a d v a n c e " > 
 
                                         < s p a n   c l a s s = " l a b e l " >          `  ( A d v a n c e ) : < / s p a n > 
 
                                         < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ a d v a n c e ,   0 ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                         < d i v   c l a s s = " r o w   b a l a n c e " > 
 
                                 < s p a n   c l a s s = " l a b e l " >        `       &   ( B a l a n c e ) : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ f i n a l _ b a l a n c e ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < d i v   c l a s s = " t h a n k y o u " >        `  ! < / d i v > 
 
                         < d i v > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / d i v > 
 
                         < d i v   c l a s s = " s o f t w a r e " > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / d i v > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   P R I N T   B U T T O N   = = = = =   - - > 
 
         < d i v   c l a s s = " p r i n t - b t n - c o n t a i n e r   n o - p r i n t " > 
 
                 < b u t t o n   c l a s s = " p r i n t - b t n "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                         < i   c l a s s = " f a s   f a - p r i n t " > < / i >                   ` 
 
                 < / b u t t o n > 
 
                 < d i v   c l a s s = " s h o r t c u t - h i n t " > 
 
                         < k b d > C t r l < / k b d >   +   < k b d > P < / k b d >   t o   p r i n t 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
         / /   = = = = =   G E N E R A T E   B A R C O D E   = = = = = 
 
         J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > " ,   { 
 
                 f o r m a t :   " C O D E 1 2 8 " , 
 
                 w i d t h :   2 . 5 , 
 
                 h e i g h t :   5 0 , 
 
                 d i s p l a y V a l u e :   t r u e , 
 
                 f o n t :   " m o n o s p a c e " , 
 
                 f o n t S i z e :   1 5 , 
 
                 m a r g i n :   0 , 
 
                 b a c k g r o u n d :   " # f f f f f f " , 
 
                 l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
         } ) ; 
 
 
 
         / /   = = = = =   C T R L + P   H A N D L E R   = = = = = 
 
         d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                         e . p r e v e n t D e f a u l t ( ) ; 
 
                         w i n d o w . p r i n t ( ) ; 
 
                 } 
 
         } ) ; 
 
 < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < s t y l e > 
 
         . o r d e r - v i e w - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . i n f o - g r i d   { 
 
                 d i s p l a y :   g r i d ; 
 
                 g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r   1 f r ; 
 
                 g a p :   8 p x ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 p a d d i n g :   1 2 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 m a r g i n - b o t t o m :   1 2 p x ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . i n f o - g r i d   . i t e m   { 
 
                 d i s p l a y :   f l e x ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . i n f o - g r i d   . i t e m   . l a b e l   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . i n f o - g r i d   . i t e m   . v a l u e   { 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t o t a l - b o x   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 m a r g i n - t o p :   1 0 p x ; 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 f l e x - w r a p :   w r a p ; 
 
                 g a p :   8 p x ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t o t a l - b o x   . t o t - i t e m   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t o t a l - b o x   . t o t - i t e m   . l a b e l   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t o t a l - b o x   . t o t - i t e m   . v a l u e   { 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . o r d e r - v i e w - c a r d   . t o t a l - b o x   . t o t - i t e m   . v a l u e . a d v a n c e   {   c o l o r :   # 2 5 6 3 e b ;   } 
 
         . o r d e r - v i e w - c a r d   . t o t a l - b o x   . t o t - i t e m   . v a l u e . b a l a n c e   {   c o l o r :   # d c 3 5 4 5 ;   } 
 
         . b t n - p r i n t   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 c 7 5 7 d   0 % ,   # 4 9 5 0 5 7   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 8 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 3 ) ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - p r i n t : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 6 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . o r d e r - v i e w - c a r d   . i n f o - g r i d   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   } 
 
                 . o r d e r - v i e w - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . o r d e r - v i e w - c a r d   . t a b l e   t h ,   . o r d e r - v i e w - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . o r d e r - v i e w - c a r d   . t o t a l - b o x   {   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   s t r e t c h ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c a r d   o r d e r - v i e w - c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5 > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g   m e - 2 " > < / i >   O r d e r   D e t a i l s < / h 5 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 1 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ r e c e i p t & i d = < ? p h p   e c h o   $ i d ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " b t n - p r i n t " > 
 
                                 < i   c l a s s = " f a s   f a - r e c e i p t   m e - 1 " > < / i >   R e c e i p t 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = i n v o i c e & i d = < ? p h p   e c h o   $ i d ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " b t n - p r i n t " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - i n v o i c e   m e - 1 " > < / i >   I n v o i c e 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ e d i t & i d = < ? p h p   e c h o   $ i d ;   ? > "   c l a s s = " b t n   b t n - p r i m a r y   r o u n d e d - p i l l "   s t y l e = " f o n t - s i z e : 1 2 p x ;   h e i g h t : 3 4 p x ;   l i n e - h e i g h t : 1 . 4 ;   b o x - s h a d o w : 0   0   1 2 p x   r g b a ( 3 7 , 9 9 , 2 3 5 , 0 . 3 ) ;   t r a n s i t i o n : a l l   0 . 3 s ; " > 
 
                                 < i   c l a s s = " f a s   f a - e d i t   m e - 1 " > < / i >   E d i t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ! - -   = = = = =   O R D E R   I N F O   = = = = =   - - > 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > O r d e r   # < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > O r d e r   D a t e < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > D e l i v e r y   D a t e < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   $ o r d e r [ ' d e l i v e r y _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) )   :   ' - ' ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > C u s t o m e r < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > P h o n e < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > S t a t u s < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > 
 
                                         < s p a n   c l a s s = " b a d g e   b g - < ? p h p   e c h o   $ o r d e r [ ' s t a t u s ' ] = = ' p e n d i n g ' ? ' w a r n i n g ' : ( $ o r d e r [ ' s t a t u s ' ] = = ' c u t t i n g ' ? ' i n f o ' : ( $ o r d e r [ ' s t a t u s ' ] = = ' s t i t c h i n g ' ? ' p r i m a r y ' : ( $ o r d e r [ ' s t a t u s ' ] = = ' r e a d y ' ? ' s u c c e s s ' : ( $ o r d e r [ ' s t a t u s ' ] = = ' d e l i v e r e d ' ? ' s e c o n d a r y ' : ' d a n g e r ' ) ) ) ) ;   ? > " > 
 
                                                 < ? p h p   e c h o   u c f i r s t ( $ o r d e r [ ' s t a t u s ' ] ) ;   ? > 
 
                                         < / s p a n > 
 
                                 < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " l a b e l " > T o t a l   S u i t s < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' t o t a l _ s u i t s ' ] ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   S U I T S   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 8 % ; " > # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 5 % ; " > T y p e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > S i z e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > P r i c e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > S t a t u s < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 5 % ; " > C u t t e r   /   T a i l o r < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ s u i t s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d " > N o   s u i t s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u i t [ ' p r i c e ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e   b g - < ? p h p   e c h o   $ s u i t [ ' s t a t u s ' ] = = ' p e n d i n g ' ? ' w a r n i n g ' : ( $ s u i t [ ' s t a t u s ' ] = = ' c u t t i n g ' ? ' i n f o ' : ( $ s u i t [ ' s t a t u s ' ] = = ' s t i t c h i n g ' ? ' p r i m a r y ' : ( $ s u i t [ ' s t a t u s ' ] = = ' r e a d y ' ? ' s u c c e s s ' : ( $ s u i t [ ' s t a t u s ' ] = = ' d e l i v e r e d ' ? ' s e c o n d a r y ' : ' d a n g e r ' ) ) ) ) ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ s u i t [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   
 
                                                                                 $ c u t   =   $ s u i t [ ' c u t t e r _ n a m e ' ]   ? ?   ' ' ; 
 
                                                                                 $ s t i t c h   =   $ s u i t [ ' s t i t c h e r _ n a m e ' ]   ? ?   ' ' ; 
 
                                                                                 e c h o   ( $ c u t   ?   ' C u t t e r :   '   .   h t m l s p e c i a l c h a r s ( $ c u t )   :   ' ' ) ; 
 
                                                                                 e c h o   ( $ c u t   & &   $ s t i t c h )   ?   '   /   '   :   ' ' ; 
 
                                                                                 e c h o   ( $ s t i t c h   ?   ' T a i l o r :   '   .   h t m l s p e c i a l c h a r s ( $ s t i t c h )   :   ' ' ) ; 
 
                                                                                 i f   ( ! $ c u t   & &   ! $ s t i t c h )   e c h o   ' - ' ; 
 
                                                                         ? > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   T O T A L S   = = = = =   - - > 
 
                 < d i v   c l a s s = " t o t a l - b o x " > 
 
                         < d i v   c l a s s = " t o t - i t e m " > 
 
                                 < d i v   c l a s s = " l a b e l " > S u b   T o t a l < / d i v > 
 
                                 < d i v   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " t o t - i t e m " > 
 
                                 < d i v   c l a s s = " l a b e l " > D i s c o u n t < / d i v > 
 
                                 < d i v   c l a s s = " v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d i s c o u n t ' ] ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " t o t - i t e m " > 
 
                                 < d i v   c l a s s = " l a b e l " > N e t   T o t a l < / d i v > 
 
                                 < d i v   c l a s s = " v a l u e "   s t y l e = " c o l o r : # 2 5 6 3 e b ; " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' n e t _ a m o u n t ' ] ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " t o t - i t e m " > 
 
                                 < d i v   c l a s s = " l a b e l " > A d v a n c e < / d i v > 
 
                                 < d i v   c l a s s = " v a l u e   a d v a n c e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " t o t - i t e m " > 
 
                                 < d i v   c l a s s = " l a b e l " > B a l a n c e < / d i v > 
 
                                 < d i v   c l a s s = " v a l u e   b a l a n c e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d u e _ a m o u n t ' ] ,   0 ) ;   ? > < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   S H E L F   I N F O   I F   R E A D Y   = = = = =   - - > 
 
                 < ? p h p   i f   ( $ o r d e r [ ' s t a t u s ' ]   = =   ' r e a d y '   & &   i s s e t ( $ s h e l f )   & &   $ s h e l f ) :   ? > 
 
                         < d i v   c l a s s = " m t - 2   a l e r t   a l e r t - s u c c e s s   p y - 1 " > 
 
                                 < s t r o n g > < i   c l a s s = " f a s   f a - a r c h i v e   m e - 1 " > < / i >   S h e l f : < / s t r o n g >   
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n a m e ' ]   .   '   -   '   .   $ s h e l f [ ' s h e l f _ n u m b e r ' ] ) ;   ? > 
 
                                 < ? p h p   i f   ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) :   ? > 
 
                                         ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) ;   ? > ) 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p   $ r a n g e _ o p t i o n s   =   [ ' t o d a y '   = >   ' T o d a y ' ,   ' y e s t e r d a y '   = >   ' Y e s t e r d a y ' ,   ' l a s t 7 '   = >   ' L a s t   7   D a y s ' ,   ' m o n t h l y '   = >   ' T h i s   M o n t h ' ,   ' d a t e _ t o _ d a t e '   = >   ' D a t e   t o   D a t e ' ] ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e   m e - 2   t e x t - p r i m a r y " > < / i > C a s h   L e d g e r   R e p o r t < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3   a l i g n - i t e m s - e n d " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " r e p o r t _ c a s h " > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a n g e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r a n g e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   o n c h a n g e = " t h i s . f o r m . s u b m i t ( ) " > 
 
                                         < ? p h p   f o r e a c h   ( $ r a n g e _ o p t i o n s   a s   $ v a l   = >   $ l a b e l ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ v a l ;   ? > "   < ? p h p   e c h o   ( $ r a n g e   = =   $ v a l )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > < ? p h p   e c h o   $ l a b e l ;   ? > < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < h 6   c l a s s = " f w - b o l d   m b - 3 " > < ? p h p   e c h o   $ r e p o r t _ t i t l e ;   ? > < / h 6 > 
 
 
 
                 < ? p h p 
 
                 $ t o t a l _ d e b i t   =   $ t o t a l _ c r e d i t   =   0 ; 
 
                 f o r e a c h   ( $ d a t a   a s   $ r o w )   { 
 
                         $ t o t a l _ d e b i t   + =   $ r o w [ ' d e b i t ' ]   ? ?   0 ; 
 
                         $ t o t a l _ c r e d i t   + =   $ r o w [ ' c r e d i t ' ]   ? ?   0 ; 
 
                 } 
 
                 $ n e t   =   $ t o t a l _ d e b i t   -   $ t o t a l _ c r e d i t ; 
 
                 ? > 
 
                 < d i v   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > T o t a l   D e b i t < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > T o t a l   C r e d i t < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > N e t   C a s h < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ n e t ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > < t h > D a t e < / t h > < t h   c l a s s = " t e x t - e n d " > D e b i t < / t h > < t h   c l a s s = " t e x t - e n d " > C r e d i t < / t h > < t h   c l a s s = " t e x t - e n d " > N e t < / t h > < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ d a t a ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   c a s h   d a t a   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ d a t a   a s   $ r o w ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' d e b i t ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' c r e d i t ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d   < ? p h p   e c h o   ( $ r o w [ ' n e t ' ]   ? ?   0 )   > =   0   ?   ' t e x t - s u c c e s s '   :   ' t e x t - d a n g e r ' ;   ? > " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' n e t ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t a b l e - s e c o n d a r y   f w - b o l d " > 
 
                                                         < t d > T o t a l < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - s u c c e s s " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d e b i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d   t e x t - d a n g e r " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ c r e d i t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ n e t ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         }   e l s e   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } 
 
 } ) ; 
 
 i f   ( d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
 } 
 
 < / s c r i p t > 
 
 < ? p h p   $ r a n g e _ o p t i o n s   =   [ ' t o d a y '   = >   ' T o d a y ' ,   ' y e s t e r d a y '   = >   ' Y e s t e r d a y ' ,   ' l a s t 7 '   = >   ' L a s t   7   D a y s ' ,   ' m o n t h l y '   = >   ' T h i s   M o n t h ' ,   ' d a t e _ t o _ d a t e '   = >   ' D a t e   t o   D a t e ' ] ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r s   m e - 2   t e x t - p r i m a r y " > < / i > C u s t o m e r   R e p o r t < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3   a l i g n - i t e m s - e n d " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " r e p o r t _ c u s t o m e r s " > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a n g e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r a n g e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   o n c h a n g e = " t h i s . f o r m . s u b m i t ( ) " > 
 
                                         < ? p h p   f o r e a c h   ( $ r a n g e _ o p t i o n s   a s   $ v a l   = >   $ l a b e l ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ v a l ;   ? > "   < ? p h p   e c h o   ( $ r a n g e   = =   $ v a l )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > < ? p h p   e c h o   $ l a b e l ;   ? > < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < h 6   c l a s s = " f w - b o l d   m b - 3 " > < ? p h p   e c h o   $ r e p o r t _ t i t l e ;   ? > < / h 6 > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > < t h > C u s t o m e r   # < / t h > < t h > N a m e < / t h > < t h > P h o n e < / t h > < t h   c l a s s = " t e x t - e n d " > O r d e r s < / t h > < t h   c l a s s = " t e x t - e n d " > T o t a l   S p e n t < / t h > < t h   c l a s s = " t e x t - e n d " > P a i d < / t h > < t h   c l a s s = " t e x t - e n d " > D u e < / t h > < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ d a t a ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   c u s t o m e r   d a t a   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ d a t a   a s   $ r o w ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' c u s t o m e r _ n o ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ r o w [ ' o r d e r _ c o u n t ' ] ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ s p e n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ p a i d ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ d u e ' ] ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s c r i p t > 
 
 d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         }   e l s e   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } 
 
 } ) ; 
 
 i f   ( d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
 } 
 
 < / s c r i p t > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   $ r a n g e _ o p t i o n s   =   [ ' t o d a y '   = >   ' T o d a y ' ,   ' y e s t e r d a y '   = >   ' Y e s t e r d a y ' ,   ' l a s t 7 '   = >   ' L a s t   7   D a y s ' ,   ' m o n t h l y '   = >   ' T h i s   M o n t h ' ,   ' d a t e _ t o _ d a t e '   = >   ' D a t e   t o   D a t e ' ] ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 2   t e x t - p r i m a r y " > < / i > E m p l o y e e   R e p o r t < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3   a l i g n - i t e m s - e n d " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " r e p o r t _ e m p l o y e e s " > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a n g e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r a n g e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   o n c h a n g e = " t h i s . f o r m . s u b m i t ( ) " > 
 
                                         < ? p h p   f o r e a c h   ( $ r a n g e _ o p t i o n s   a s   $ v a l   = >   $ l a b e l ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ v a l ;   ? > "   < ? p h p   e c h o   ( $ r a n g e   = =   $ v a l )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > < ? p h p   e c h o   $ l a b e l ;   ? > < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < h 6   c l a s s = " f w - b o l d   m b - 3 " > < ? p h p   e c h o   $ r e p o r t _ t i t l e ;   ? > < / h 6 > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > < t h > C o d e < / t h > < t h > N a m e < / t h > < t h > C a t e g o r y < / t h > < t h   c l a s s = " t e x t - e n d " > C r e d i t < / t h > < t h   c l a s s = " t e x t - e n d " > D e b i t < / t h > < t h   c l a s s = " t e x t - e n d " > T o t a l   C r e d i t < / t h > < t h   c l a s s = " t e x t - e n d " > T o t a l   D e b i t < / t h > < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ d a t a ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   e m p l o y e e   d a t a . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ d a t a   a s   $ r o w ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' e m p _ c o d e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' c a t e g o r y _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ c r e d i t ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ d e b i t ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ c r e d i t _ a l l ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ d e b i t _ a l l ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         }   e l s e   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } 
 
 } ) ; 
 
 i f   ( d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
 } 
 
 < / s c r i p t > 
 
 < s t y l e > 
 
         . r e p o r t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   c u b i c - b e z i e r ( 0 . 2 5 ,   0 . 4 6 ,   0 . 4 5 ,   0 . 9 4 ) ; 
 
                 p a d d i n g :   2 4 p x   2 0 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 h e i g h t :   1 0 0 % ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 c o l o r :   i n h e r i t ; 
 
         } 
 
         . r e p o r t - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 8 p x ) ; 
 
                 b o x - s h a d o w :   0   1 6 p x   5 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 0 ) ; 
 
         } 
 
         . r e p o r t - c a r d   . i c o n   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 m a r g i n - b o t t o m :   1 2 p x ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w i d t h :   7 0 p x ; 
 
                 h e i g h t :   7 0 p x ; 
 
                 l i n e - h e i g h t :   7 0 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 b a c k g r o u n d :   # f 0 f 4 f f ; 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   e a s e ; 
 
         } 
 
         . r e p o r t - c a r d : h o v e r   . i c o n   { 
 
                 t r a n s f o r m :   s c a l e ( 1 . 1 )   r o t a t e ( - 6 d e g ) ; 
 
         } 
 
         . r e p o r t - c a r d   . t i t l e   { 
 
                 f o n t - s i z e :   1 8 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 m a r g i n - b o t t o m :   6 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . c o u n t   { 
 
                 f o n t - s i z e :   2 8 p x ; 
 
                 f o n t - w e i g h t :   8 0 0 ; 
 
                 c o l o r :   # 2 d 3 7 4 8 ; 
 
                 m a r g i n - b o t t o m :   4 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . d e s c   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . r e p o r t - c a r d   . a r r o w   { 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 b o t t o m :   1 2 p x ; 
 
                 r i g h t :   1 6 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 f o n t - s i z e :   1 8 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . r e p o r t - c a r d : h o v e r   . a r r o w   { 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
                 t r a n s f o r m :   t r a n s l a t e X ( 4 p x ) ; 
 
         } 
 
         . r e p o r t - c a r d . s a l e s   . i c o n   {   b a c k g r o u n d :   # e 8 f 5 e 9 ;   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . r e p o r t - c a r d . r e v e n u e   . i c o n   {   b a c k g r o u n d :   # f f f 3 e 0 ;   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . r e p o r t - c a r d . c u s t o m e r s   . i c o n   {   b a c k g r o u n d :   # e 3 f 2 f d ;   c o l o r :   # 0 d 6 e f d ;   } 
 
         . r e p o r t - c a r d . e m p l o y e e s   . i c o n   {   b a c k g r o u n d :   # f c e 4 e c ;   c o l o r :   # d c 3 5 4 5 ;   } 
 
         . r e p o r t - c a r d . s u i t s   . i c o n   {   b a c k g r o u n d :   # f 3 e 5 f 5 ;   c o l o r :   # 8 e 2 4 a a ;   } 
 
         . r e p o r t - c a r d . c a s h   . i c o n   {   b a c k g r o u n d :   # e 0 f 7 f a ;   c o l o r :   # 0 0 a c c 1 ;   } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c o n t a i n e r - f l u i d " > 
 
         < d i v   c l a s s = " m b - 4 " > 
 
                 < h 4   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 2   t e x t - p r i m a r y " > < / i > R e p o r t s   D a s h b o a r d < / h 4 > 
 
                 < p   c l a s s = " t e x t - m u t e d " > S e l e c t   a   r e p o r t   t o   v i e w   d e t a i l e d   a n a l y t i c s < / p > 
 
         < / d i v > 
 
 
 
         < d i v   c l a s s = " r o w   g - 4 " > 
 
                 < ! - -   S a l e s   R e p o r t   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r e p o r t _ s a l e s "   c l a s s = " r e p o r t - c a r d   s a l e s " > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - s h o p p i n g - c a r t " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > S a l e s   R e p o r t < / d i v > 
 
                                 < d i v   c l a s s = " c o u n t " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u m m a r y [ ' t o d a y _ o r d e r s ' ]   ? ?   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > T o d a y ' s   O r d e r s < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   R e v e n u e   R e p o r t   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r e p o r t _ r e v e n u e "   c l a s s = " r e p o r t - c a r d   r e v e n u e " > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - w a l l e t " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > R e v e n u e   R e p o r t < / d i v > 
 
                                 < d i v   c l a s s = " c o u n t " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u m m a r y [ ' t o d a y _ r e v e n u e ' ]   ? ?   0 ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > T o d a y ' s   R e v e n u e < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   C u s t o m e r   R e p o r t   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r e p o r t _ c u s t o m e r s "   c l a s s = " r e p o r t - c a r d   c u s t o m e r s " > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - u s e r s " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > C u s t o m e r   R e p o r t < / d i v > 
 
                                 < d i v   c l a s s = " c o u n t " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u m m a r y [ ' t o t a l _ c u s t o m e r s ' ]   ? ?   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > T o t a l   C u s t o m e r s < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   E m p l o y e e   R e p o r t   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r e p o r t _ e m p l o y e e s "   c l a s s = " r e p o r t - c a r d   e m p l o y e e s " > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - u s e r - t i e " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > E m p l o y e e   R e p o r t < / d i v > 
 
                                 < d i v   c l a s s = " c o u n t " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u m m a r y [ ' t o t a l _ e m p l o y e e s ' ]   ? ?   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > A c t i v e   E m p l o y e e s < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   S u i t s   R e p o r t   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r e p o r t _ s u i t s "   c l a s s = " r e p o r t - c a r d   s u i t s " > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - t s h i r t " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > S u i t s   R e p o r t < / d i v > 
 
                                 < d i v   c l a s s = " c o u n t " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u m m a r y [ ' t o t a l _ s u i t s ' ]   ? ?   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > T o t a l   S u i t s < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   C a s h   R e p o r t   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r e p o r t _ c a s h "   c l a s s = " r e p o r t - c a r d   c a s h " > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - m o n e y - b i l l - w a v e " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > C a s h   L e d g e r < / d i v > 
 
                                 < d i v   c l a s s = " c o u n t " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u m m a r y [ ' c a s h _ b a l a n c e ' ]   ? ?   0 ,   0 ) ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > T o t a l   C a s h   B a l a n c e < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p   $ r a n g e _ o p t i o n s   =   [ ' t o d a y '   = >   ' T o d a y ' ,   ' y e s t e r d a y '   = >   ' Y e s t e r d a y ' ,   ' l a s t 7 '   = >   ' L a s t   7   D a y s ' ,   ' m o n t h l y '   = >   ' T h i s   M o n t h ' ,   ' d a t e _ t o _ d a t e '   = >   ' D a t e   t o   D a t e ' ] ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - w a l l e t   m e - 2   t e x t - p r i m a r y " > < / i > R e v e n u e   R e p o r t < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3   a l i g n - i t e m s - e n d " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " r e p o r t _ r e v e n u e " > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a n g e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r a n g e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   o n c h a n g e = " t h i s . f o r m . s u b m i t ( ) " > 
 
                                         < ? p h p   f o r e a c h   ( $ r a n g e _ o p t i o n s   a s   $ v a l   = >   $ l a b e l ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ v a l ;   ? > "   < ? p h p   e c h o   ( $ r a n g e   = =   $ v a l )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > < ? p h p   e c h o   $ l a b e l ;   ? > < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < h 6   c l a s s = " f w - b o l d   m b - 3 " > < ? p h p   e c h o   $ r e p o r t _ t i t l e ;   ? > < / h 6 > 
 
 
 
                 < ? p h p 
 
                 $ t o t a l _ a m o u n t   =   $ t o t a l _ p a i d   =   $ t o t a l _ d u e   =   0 ; 
 
                 f o r e a c h   ( $ d a t a   a s   $ r o w )   { 
 
                         $ t o t a l _ a m o u n t   + =   $ r o w [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ; 
 
                         $ t o t a l _ p a i d   + =   $ r o w [ ' t o t a l _ p a i d ' ]   ? ?   0 ; 
 
                         $ t o t a l _ d u e   + =   $ r o w [ ' t o t a l _ d u e ' ]   ? ?   0 ; 
 
                 } 
 
                 ? > 
 
                 < d i v   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > T o t a l   R e v e n u e < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ a m o u n t ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > T o t a l   P a i d < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > T o t a l   D u e < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d u e ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > < t h > D a t e < / t h > < t h   c l a s s = " t e x t - e n d " > R e v e n u e < / t h > < t h   c l a s s = " t e x t - e n d " > P a i d < / t h > < t h   c l a s s = " t e x t - e n d " > D u e < / t h > < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ d a t a ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   r e v e n u e   d a t a   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ d a t a   a s   $ r o w ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ p a i d ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ d u e ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t a b l e - s e c o n d a r y   f w - b o l d " > 
 
                                                         < t d > T o t a l < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ a m o u n t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d u e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         }   e l s e   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } 
 
 } ) ; 
 
 i f   ( d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
 } 
 
 < / s c r i p t > 
 
 < ? p h p 
 
 $ r a n g e _ o p t i o n s   =   [ ' t o d a y '   = >   ' T o d a y ' ,   ' y e s t e r d a y '   = >   ' Y e s t e r d a y ' ,   ' l a s t 7 '   = >   ' L a s t   7   D a y s ' ,   ' m o n t h l y '   = >   ' T h i s   M o n t h ' ,   ' d a t e _ t o _ d a t e '   = >   ' D a t e   t o   D a t e ' ] ; 
 
 ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - s h o p p i n g - c a r t   m e - 2   t e x t - p r i m a r y " > < / i > S a l e s   R e p o r t < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3   a l i g n - i t e m s - e n d " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " r e p o r t _ s a l e s " > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a n g e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r a n g e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   o n c h a n g e = " t h i s . f o r m . s u b m i t ( ) " > 
 
                                         < ? p h p   f o r e a c h   ( $ r a n g e _ o p t i o n s   a s   $ v a l   = >   $ l a b e l ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ v a l ;   ? > "   < ? p h p   e c h o   ( $ r a n g e   = =   $ v a l )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > < ? p h p   e c h o   $ l a b e l ;   ? > < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < h 6   c l a s s = " f w - b o l d   m b - 3 " > < ? p h p   e c h o   $ r e p o r t _ t i t l e ;   ? > < / h 6 > 
 
 
 
                 < ? p h p 
 
                 $ t o t a l _ o r d e r s   =   $ t o t a l _ s u i t s   =   $ t o t a l _ a m o u n t   =   $ t o t a l _ p a i d   =   $ t o t a l _ d u e   =   0 ; 
 
                 f o r e a c h   ( $ d a t a   a s   $ r o w )   { 
 
                         $ t o t a l _ o r d e r s   + =   $ r o w [ ' t o t a l _ o r d e r s ' ] ; 
 
                         $ t o t a l _ s u i t s   + =   $ r o w [ ' t o t a l _ s u i t s ' ] ; 
 
                         $ t o t a l _ a m o u n t   + =   $ r o w [ ' t o t a l _ a m o u n t ' ] ; 
 
                         $ t o t a l _ p a i d   + =   $ r o w [ ' t o t a l _ p a i d ' ] ; 
 
                         $ t o t a l _ d u e   + =   $ r o w [ ' t o t a l _ d u e ' ] ; 
 
                 } 
 
                 ? > 
 
                 < d i v   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > O r d e r s < / s t r o n g > < b r > < ? p h p   e c h o   $ t o t a l _ o r d e r s ;   ? > < / d i v > < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > S u i t s < / s t r o n g > < b r > < ? p h p   e c h o   $ t o t a l _ s u i t s ;   ? > < / d i v > < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > T o t a l   A m o u n t < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ a m o u n t ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > < s t r o n g > P a i d < / s t r o n g > < b r > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / d i v > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > < t h > D a t e < / t h > < t h   c l a s s = " t e x t - e n d " > O r d e r s < / t h > < t h   c l a s s = " t e x t - e n d " > S u i t s < / t h > < t h   c l a s s = " t e x t - e n d " > A m o u n t < / t h > < t h   c l a s s = " t e x t - e n d " > P a i d < / t h > < t h   c l a s s = " t e x t - e n d " > D u e < / t h > < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ d a t a ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   s a l e s   d a t a   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ d a t a   a s   $ r o w ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ r o w [ ' t o t a l _ o r d e r s ' ] ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ r o w [ ' t o t a l _ s u i t s ' ] ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ p a i d ' ] ,   0 ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ d u e ' ] ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t a b l e - s e c o n d a r y   f w - b o l d " > 
 
                                                         < t d > T o t a l < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t o t a l _ o r d e r s ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t o t a l _ s u i t s ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ a m o u n t ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ p a i d ,   0 ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l _ d u e ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         }   e l s e   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } 
 
 } ) ; 
 
 i f   ( d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
 } 
 
 < / s c r i p t > 
 
 < ? p h p   $ r a n g e _ o p t i o n s   =   [ ' t o d a y '   = >   ' T o d a y ' ,   ' y e s t e r d a y '   = >   ' Y e s t e r d a y ' ,   ' l a s t 7 '   = >   ' L a s t   7   D a y s ' ,   ' m o n t h l y '   = >   ' T h i s   M o n t h ' ,   ' d a t e _ t o _ d a t e '   = >   ' D a t e   t o   D a t e ' ] ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - p r i m a r y " > < / i > S u i t s   R e p o r t < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3   a l i g n - i t e m s - e n d " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " r e p o r t _ s u i t s " > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a n g e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r a n g e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   o n c h a n g e = " t h i s . f o r m . s u b m i t ( ) " > 
 
                                         < ? p h p   f o r e a c h   ( $ r a n g e _ o p t i o n s   a s   $ v a l   = >   $ l a b e l ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ v a l ;   ? > "   < ? p h p   e c h o   ( $ r a n g e   = =   $ v a l )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > < ? p h p   e c h o   $ l a b e l ;   ? > < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ r a n g e   = =   ' d a t e _ t o _ d a t e ' )   ?   ' f l e x '   :   ' n o n e ' ;   ? > ; " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < h 6   c l a s s = " f w - b o l d   m b - 3 " > < ? p h p   e c h o   $ r e p o r t _ t i t l e ;   ? > < / h 6 > 
 
 
 
                 < ? p h p 
 
                 $ t o t a l s   =   [ ] ; 
 
                 f o r e a c h   ( $ d a t a   a s   $ r o w )   { 
 
                         $ t y p e   =   $ r o w [ ' s u i t _ t y p e ' ] ; 
 
                         i f   ( ! i s s e t ( $ t o t a l s [ $ t y p e ] ) )   $ t o t a l s [ $ t y p e ]   =   [ ' c o u n t '   = >   0 ,   ' p r i c e '   = >   0 ] ; 
 
                         $ t o t a l s [ $ t y p e ] [ ' c o u n t ' ]   + =   $ r o w [ ' s u i t _ c o u n t ' ] ; 
 
                         $ t o t a l s [ $ t y p e ] [ ' p r i c e ' ]   + =   $ r o w [ ' t o t a l _ p r i c e ' ] ; 
 
                 } 
 
                 ? > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > < t h > D a t e < / t h > < t h > S u i t   T y p e < / t h > < t h   c l a s s = " t e x t - e n d " > C o u n t < / t h > < t h   c l a s s = " t e x t - e n d " > T o t a l   P r i c e < / t h > < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ d a t a ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   s u i t s   d a t a   f o r   t h i s   p e r i o d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ d a t a   a s   $ r o w ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ r o w [ ' s u i t _ c o u n t ' ] ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' t o t a l _ p r i c e ' ] ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < t r   c l a s s = " t a b l e - s e c o n d a r y   f w - b o l d " > 
 
                                                         < t d   c o l s p a n = " 2 " > T o t a l   b y   T y p e < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   a r r a y _ s u m ( a r r a y _ c o l u m n ( $ t o t a l s ,   ' c o u n t ' ) ) ;   ? > < / t d > 
 
                                                         < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( a r r a y _ s u m ( a r r a y _ c o l u m n ( $ t o t a l s ,   ' p r i c e ' ) ) ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                                 < ? p h p   f o r e a c h   ( $ t o t a l s   a s   $ t y p e   = >   $ t o t a l ) :   ? > 
 
                                                         < t r > < t d   c o l s p a n = " 2 "   c l a s s = " p s - 4 " > < ? p h p   e c h o   $ t y p e ;   ? > < / t d > < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   $ t o t a l [ ' c o u n t ' ] ;   ? > < / t d > < t d   c l a s s = " t e x t - e n d " > < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l [ ' p r i c e ' ] ,   0 ) ;   ? > < / t d > < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         }   e l s e   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } 
 
 } ) ; 
 
 i f   ( d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " r a n g e " ] ' ) . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
         d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) . s t y l e . d i s p l a y   =   ' f l e x ' ; 
 
 } 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - d a t a b a s e   m e - 2   t e x t - p r i m a r y " > < / i > B a c k u p   &   R e s t o r e < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   t e x t - c e n t e r   p y - 5 " > 
 
                 < i   c l a s s = " f a s   f a - d a t a b a s e   f a - 5 x   t e x t - p r i m a r y   m b - 4 " > < / i > 
 
                 < h 4 > D a t a b a s e   B a c k u p < / h 4 > 
 
                 < p   c l a s s = " t e x t - m u t e d " > D o w n l o a d   a   c o m p l e t e   b a c k u p   o f   y o u r   d a t a b a s e . < / p > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = b a c k u p "   c l a s s = " b t n   b t n - p r i m a r y   r o u n d e d - p i l l   p x - 5   p y - 2 " > 
 
                         < i   c l a s s = " f a s   f a - d o w n l o a d   m e - 2 " > < / i >   D o w n l o a d   B a c k u p 
 
                 < / a > 
 
                 < d i v   c l a s s = " m t - 4 " > 
 
                         < s m a l l   c l a s s = " t e x t - m u t e d " > 
 
                                 < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 " > < / i >   
 
                                 B a c k u p   i n c l u d e s   a l l   d a t a :   C u s t o m e r s ,   O r d e r s ,   E m p l o y e e s ,   L e d g e r ,   e t c . 
 
                         < / s m a l l > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c o n t a i n e r - f l u i d " > 
 
         < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
                 < d i v   c l a s s = " c a r d - h e a d e r   b g - w h i t e   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p   p y - 2 " > 
 
                         < h 5   c l a s s = " f w - b o l d   m b - 0 " > 
 
                                 < i   c l a s s = " f a s   f a - b u i l d i n g   m e - 2   t e x t - p r i m a r y " > < / i > C o m p a n i e s   M a n a g e m e n t 
 
                                 < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   m s - 2 " > < ? p h p   e c h o   c o u n t ( $ c o m p a n i e s ) ;   ? > < / s p a n > 
 
                         < / h 5 > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n y _ a d d "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   C o m p a n y 
 
                         < / a > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c a r d - b o d y " > 
 
                         
 
                         < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                                 < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                         < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 5 0 p x ; " > # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 6 0 p x ; " > L o g o < / t h > 
 
                                                         < t h > C o m p a n y   N a m e < / t h > 
 
                                                         < t h > P h o n e < / t h > 
 
                                                         < t h > U s e r s < / t h > 
 
                                                         < t h > O r d e r s < / t h > 
 
                                                         < t h > S t a t u s < / t h > 
 
                                                         < t h   c l a s s = " t e x t - c e n t e r "   s t y l e = " w i d t h : 1 2 0 p x ; " > A c t i o n s < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ c o m p a n i e s ) ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d   c o l s p a n = " 8 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                         < i   c l a s s = " f a s   f a - b u i l d i n g   m e - 2 " > < / i >   N o   c o m p a n i e s   f o u n d . 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   $ s n   =   1 ;   ? > 
 
                                                         < ? p h p   f o r e a c h   ( $ c o m p a n i e s   a s   $ c o m p a n y ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < ? p h p   e c h o   $ s n + + ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < ? p h p   
 
                                                                                         $ l o g o   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                                                                         i f   ( ! f i l e _ e x i s t s ( $ l o g o )   | |   $ c o m p a n y [ ' l o g o ' ]   = =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                                                                 $ l o g o   =   ' a s s e t s / i m a g e s / d e f a u l t _ c o m p a n y . p n g ' ; 
 
                                                                                         } 
 
                                                                                 ? > 
 
                                                                                 < i m g   s r c = " < ? p h p   e c h o   $ l o g o ;   ? > "   
 
                                                                                           s t y l e = " w i d t h : 4 0 p x ;   h e i g h t : 4 0 p x ;   o b j e c t - f i t : c o v e r ;   b o r d e r - r a d i u s : 8 p x ;   b o r d e r : 1 p x   s o l i d   # e 2 e 8 f 0 ; " 
 
                                                                                           o n e r r o r = " t h i s . s r c = ' a s s e t s / i m a g e s / d e f a u l t _ c o m p a n y . p n g ' " 
 
                                                                                           a l t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ] ) ;   ? > " > 
 
                                                                         < / t d > 
 
                                                                         < t d > 
 
                                                                                 < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ] ) ;   ? > < / s t r o n g > 
 
                                                                                 < b r > < s m a l l   c l a s s = " t e x t - m u t e d " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                                                         < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n y _ u s e r s & i d = < ? p h p   e c h o   $ c o m p a n y [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " t e x t - d e c o r a t i o n - n o n e " > 
 
                                                                                         < s p a n   c l a s s = " b a d g e   b g - i n f o   r o u n d e d - p i l l " > < ? p h p   e c h o   ( i n t ) ( $ c o m p a n y [ ' u s e r _ c o u n t ' ]   ? ?   0 ) ;   ? > < / s p a n > 
 
                                                                                 < / a > 
 
                                                                         < / t d > 
 
                                                                         < t d > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   r o u n d e d - p i l l " > < ? p h p   e c h o   ( i n t ) ( $ c o m p a n y [ ' o r d e r _ c o u n t ' ]   ? ?   0 ) ;   ? > < / s p a n > 
 
                                                                         < / t d > 
 
                                                                         < t d > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ c o m p a n y [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' b g - s u c c e s s '   :   ' b g - d a n g e r ' ;   ? >   r o u n d e d - p i l l " > 
 
                                                                                         < ? p h p   e c h o   u c f i r s t ( $ c o m p a n y [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / t d > 
 
                                                                         < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                 < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m "   r o l e = " g r o u p " > 
 
                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n y _ e d i t & i d = < ? p h p   e c h o   $ c o m p a n y [ ' i d ' ] ;   ? > "   
 
                                                                                               c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y "   t i t l e = " E d i t " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                         < / a > 
 
                                                                                         < ? p h p   i f   ( ( $ c o m p a n y [ ' o r d e r _ c o u n t ' ]   ? ?   0 )   = =   0 ) :   ? > 
 
                                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n y _ d e l e t e & i d = < ? p h p   e c h o   $ c o m p a n y [ ' i d ' ] ;   ? > "   
 
                                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   t i t l e = " D e l e t e "   
 
                                                                                                       o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   c o m p a n y ?   A l l   d a t a   w i l l   b e   l o s t . ' ) ; " > 
 
                                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                                 < / a > 
 
                                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                                 < b u t t o n   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   d i s a b l e d   t i t l e = " C a n n o t   d e l e t e   -   h a s   o r d e r s " > 
 
                                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                                 < / b u t t o n > 
 
                                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                                 < / d i v > 
 
                                                                         < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - b u i l d i n g   m e - 2   t e x t - p r i m a r y " > < / i > C o m p a n y   P r o f i l e < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = c o m p a n y _ s e t t i n g s "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C o m p a n y   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > P h o n e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > E m a i l < / l a b e l > 
 
                                         < i n p u t   t y p e = " e m a i l "   n a m e = " e m a i l "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' c o m p a n y _ e m a i l ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > W e b s i t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " w e b s i t e "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' c o m p a n y _ w e b s i t e ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C N I C < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " c n i c "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' c o m p a n y _ c n i c ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > N T N < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n t n "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' c o m p a n y _ n t n ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > A d d r e s s < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > L o g o < / l a b e l > 
 
                                         < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' l o g o ' ] )   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' ) :   ? > 
 
                                                 < d i v   c l a s s = " m b - 2 " > 
 
                                                         < i m g   s r c = " a s s e t s / u p l o a d s / c o m p a n i e s / < ? p h p   e c h o   $ c o m p a n y [ ' l o g o ' ] ;   ? > "   
 
                                                                   a l t = " L o g o "   s t y l e = " m a x - h e i g h t : 8 0 p x ;   b o r d e r - r a d i u s : 8 p x ;   b o r d e r : 1 p x   s o l i d   # e 2 e 8 f 0 ;   p a d d i n g : 4 p x ; " > 
 
                                                 < / d i v > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                         < i n p u t   t y p e = " f i l e "   n a m e = " l o g o "   c l a s s = " f o r m - c o n t r o l "   a c c e p t = " i m a g e / * " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > L e a v e   e m p t y   t o   k e e p   c u r r e n t   l o g o . < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   S a v e   C o m p a n y   S e t t i n g s 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c o n t a i n e r - f l u i d " > 
 
         < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " m a x - w i d t h : 7 0 0 p x ;   m a r g i n : 0   a u t o ; " > 
 
                 < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 3   p b - 0 " > 
 
                         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - p l u s - c i r c l e   m e - 2   t e x t - p r i m a r y " > < / i > A d d   N e w   C o m p a n y < / h 5 > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c a r d - b o d y " > 
 
                         
 
                         < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                                 < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                                 < d i v   c l a s s = " r o w   g - 3 " > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C o m p a n y   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " e . g .   H u s s a i n   T a i l o r s "   r e q u i r e d > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > P h o n e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 0 3 0 0 - 1 2 3 4 5 6 7 " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S t a t u s < / l a b e l > 
 
                                                 < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                         < o p t i o n   v a l u e = " a c t i v e " > A c t i v e < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " i n a c t i v e " > I n a c t i v e < / o p t i o n > 
 
                                                 < / s e l e c t > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > A d d r e s s < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " C o m p l e t e   a d d r e s s " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > L o g o < / l a b e l > 
 
                                                 < i n p u t   t y p e = " f i l e "   n a m e = " l o g o "   c l a s s = " f o r m - c o n t r o l "   a c c e p t = " i m a g e / * " > 
 
                                                 < s m a l l   c l a s s = " t e x t - m u t e d " > R e c o m m e n d e d :   1 5 0 x 5 0   p i x e l s < / s m a l l > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   r o u n d e d - p i l l   p x - 4 " > 
 
                                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e   C o m p a n y 
 
                                                 < / b u t t o n > 
 
                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                                 < / a > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c o n t a i n e r - f l u i d " > 
 
         < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " m a x - w i d t h : 7 0 0 p x ;   m a r g i n : 0   a u t o ; " > 
 
                 < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 3   p b - 0 " > 
 
                         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - e d i t   m e - 2   t e x t - p r i m a r y " > < / i > E d i t   C o m p a n y < / h 5 > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c a r d - b o d y " > 
 
                         
 
                         < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                                 < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                                 < d i v   c l a s s = " r o w   g - 3 " > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C o m p a n y   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > P h o n e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S t a t u s < / l a b e l > 
 
                                                 < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                         < o p t i o n   v a l u e = " a c t i v e "   < ? p h p   e c h o   ( $ c o m p a n y [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A c t i v e < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " i n a c t i v e "   < ? p h p   e c h o   ( $ c o m p a n y [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' i n a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > I n a c t i v e < / o p t i o n > 
 
                                                 < / s e l e c t > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > A d d r e s s < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C u r r e n t   L o g o < / l a b e l > 
 
                                                 < d i v   c l a s s = " m b - 2 " > 
 
                                                         < ? p h p   
 
                                                                 $ l o g o   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                                                 i f   ( ! f i l e _ e x i s t s ( $ l o g o )   | |   $ c o m p a n y [ ' l o g o ' ]   = =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                                         $ l o g o   =   ' a s s e t s / i m a g e s / d e f a u l t _ c o m p a n y . p n g ' ; 
 
                                                                 } 
 
                                                         ? > 
 
                                                         < i m g   s r c = " < ? p h p   e c h o   $ l o g o ;   ? > "   s t y l e = " m a x - h e i g h t : 6 0 p x ;   b o r d e r : 1 p x   s o l i d   # e 2 e 8 f 0 ;   b o r d e r - r a d i u s : 8 p x ;   p a d d i n g : 4 p x ; " > 
 
                                                 < / d i v > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C h a n g e   L o g o < / l a b e l > 
 
                                                 < i n p u t   t y p e = " f i l e "   n a m e = " l o g o "   c l a s s = " f o r m - c o n t r o l "   a c c e p t = " i m a g e / * " > 
 
                                                 < s m a l l   c l a s s = " t e x t - m u t e d " > L e a v e   e m p t y   t o   k e e p   c u r r e n t   l o g o . < / s m a l l > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   r o u n d e d - p i l l   p x - 4 " > 
 
                                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   C o m p a n y 
 
                                                 < / b u t t o n > 
 
                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                                 < / a > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c o n t a i n e r - f l u i d " > 
 
         < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
                 < d i v   c l a s s = " c a r d - h e a d e r   b g - w h i t e   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p   p y - 2 " > 
 
                         < h 5   c l a s s = " f w - b o l d   m b - 0 " > 
 
                                 < i   c l a s s = " f a s   f a - u s e r s   m e - 2   t e x t - p r i m a r y " > < / i > 
 
                                 U s e r s   o f   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ] ) ;   ? > 
 
                                 < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   m s - 2 " > < ? p h p   e c h o   c o u n t ( $ u s e r s ) ;   ? > < / s p a n > 
 
                         < / h 5 > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k   t o   C o m p a n i e s 
 
                         < / a > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c a r d - b o d y " > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                         < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                 < t r > 
 
                                                         < t h > # < / t h > 
 
                                                         < t h > U s e r n a m e < / t h > 
 
                                                         < t h > F u l l   N a m e < / t h > 
 
                                                         < t h > R o l e < / t h > 
 
                                                         < t h > S t a t u s < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ u s e r s ) ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d   c o l s p a n = " 5 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   u s e r s   f o u n d   f o r   t h i s   c o m p a n y . < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   $ s n   =   1 ;   ? > 
 
                                                         < ? p h p   f o r e a c h   ( $ u s e r s   a s   $ u s e r ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < ? p h p   e c h o   $ s n + + ;   ? > < / t d > 
 
                                                                         < t d > < c o d e > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u s e r [ ' u s e r n a m e ' ] ) ;   ? > < / c o d e > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u s e r [ ' f u l l _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ u s e r [ ' r o l e ' ]   = =   ' a d m i n '   ?   ' b g - p r i m a r y '   :   ' b g - s e c o n d a r y ' ;   ? >   r o u n d e d - p i l l " > 
 
                                                                                         < ? p h p   e c h o   u c f i r s t ( $ u s e r [ ' r o l e ' ] ) ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / t d > 
 
                                                                         < t d > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ u s e r [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' b g - s u c c e s s '   :   ' b g - d a n g e r ' ;   ? >   r o u n d e d - p i l l " > 
 
                                                                                         < ? p h p   e c h o   u c f i r s t ( $ u s e r [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . s e t t i n g s - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   c u b i c - b e z i e r ( 0 . 2 5 ,   0 . 4 6 ,   0 . 4 5 ,   0 . 9 4 ) ; 
 
                 p a d d i n g :   3 0 p x   2 0 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 h e i g h t :   1 0 0 % ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 c o l o r :   i n h e r i t ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 b o r d e r :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
         } 
 
         . s e t t i n g s - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 8 p x ) ; 
 
                 b o x - s h a d o w :   0   1 6 p x   5 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 0 ) ; 
 
                 b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
         } 
 
         . s e t t i n g s - c a r d   . i c o n   { 
 
                 f o n t - s i z e :   4 4 p x ; 
 
                 m a r g i n - b o t t o m :   1 2 p x ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w i d t h :   8 0 p x ; 
 
                 h e i g h t :   8 0 p x ; 
 
                 l i n e - h e i g h t :   8 0 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 b a c k g r o u n d :   # f 0 f 4 f f ; 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   e a s e ; 
 
         } 
 
         . s e t t i n g s - c a r d : h o v e r   . i c o n   { 
 
                 t r a n s f o r m :   s c a l e ( 1 . 1 )   r o t a t e ( - 6 d e g ) ; 
 
         } 
 
         . s e t t i n g s - c a r d   . t i t l e   { 
 
                 f o n t - s i z e :   1 8 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 m a r g i n - b o t t o m :   6 p x ; 
 
         } 
 
         . s e t t i n g s - c a r d   . d e s c   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . s e t t i n g s - c a r d   . a r r o w   { 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 b o t t o m :   1 2 p x ; 
 
                 r i g h t :   1 6 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 f o n t - s i z e :   1 8 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . s e t t i n g s - c a r d : h o v e r   . a r r o w   { 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
                 t r a n s f o r m :   t r a n s l a t e X ( 4 p x ) ; 
 
         } 
 
         . s e t t i n g s - c a r d   . b a d g e - c o u n t   { 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 t o p :   1 2 p x ; 
 
                 r i g h t :   1 2 p x ; 
 
                 b a c k g r o u n d :   # 6 6 7 e e a ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   2 p x   1 2 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . s e t t i n g s - c a r d . c o m p a n y   . i c o n   {   b a c k g r o u n d :   # e 3 f 2 f d ;   c o l o r :   # 0 d 6 e f d ;   } 
 
         . s e t t i n g s - c a r d . s y s t e m   . i c o n   {   b a c k g r o u n d :   # f f f 3 e 0 ;   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . s e t t i n g s - c a r d . i n v o i c e   . i c o n   {   b a c k g r o u n d :   # e 8 f 5 e 9 ;   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . s e t t i n g s - c a r d . u s e r s   . i c o n   {   b a c k g r o u n d :   # f c e 4 e c ;   c o l o r :   # d c 3 5 4 5 ;   } 
 
         . s e t t i n g s - c a r d . b a c k u p   . i c o n   {   b a c k g r o u n d :   # e 0 f 7 f a ;   c o l o r :   # 0 0 a c c 1 ;   } 
 
         . s e t t i n g s - c a r d . s h e l f   . i c o n   {   b a c k g r o u n d :   # f 3 e 5 f 5 ;   c o l o r :   # 8 e 2 4 a a ;   } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c o n t a i n e r - f l u i d " > 
 
         < d i v   c l a s s = " m b - 4 " > 
 
                 < h 4   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - c o g   m e - 2   t e x t - p r i m a r y " > < / i > S e t t i n g s < / h 4 > 
 
                 < p   c l a s s = " t e x t - m u t e d " > S e l e c t   a   s e t t i n g   c a t e g o r y   t o   c o n f i g u r e < / p > 
 
         < / d i v > 
 
 
 
         < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                 < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                 < / d i v > 
 
         < ? p h p   e n d i f ;   ? > 
 
 
 
         < d i v   c l a s s = " r o w   g - 4 " > 
 
                 < ! - -   C o m p a n y   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = c o m p a n y _ s e t t i n g s "   c l a s s = " s e t t i n g s - c a r d   c o m p a n y " > 
 
                                 < s p a n   c l a s s = " b a d g e - c o u n t " > < i   c l a s s = " f a s   f a - e d i t " > < / i > < / s p a n > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - b u i l d i n g " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > C o m p a n y   P r o f i l e < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > U p d a t e   c o m p a n y   i n f o r m a t i o n < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   S y s t e m   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s y s t e m _ s e t t i n g s "   c l a s s = " s e t t i n g s - c a r d   s y s t e m " > 
 
                                 < s p a n   c l a s s = " b a d g e - c o u n t " > < i   c l a s s = " f a s   f a - s l i d e r s - h " > < / i > < / s p a n > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - s l i d e r s - h " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > S y s t e m   S e t t i n g s < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > C u r r e n c y ,   l a n g u a g e ,   t i m e z o n e < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   I n v o i c e   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = i n v o i c e _ s e t t i n g s "   c l a s s = " s e t t i n g s - c a r d   i n v o i c e " > 
 
                                 < s p a n   c l a s s = " b a d g e - c o u n t " > < i   c l a s s = " f a s   f a - r e c e i p t " > < / i > < / s p a n > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - r e c e i p t " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > I n v o i c e   S e t t i n g s < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > I n v o i c e   p r e f i x ,   f o o t e r ,   t e r m s < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   U s e r s   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = u s e r _ m a n a g e m e n t "   c l a s s = " s e t t i n g s - c a r d   u s e r s " > 
 
                                 < s p a n   c l a s s = " b a d g e - c o u n t " > 
 
                                         < i   c l a s s = " f a s   f a - u s e r s " > < / i >   
 
                                         < ? p h p   
 
                                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   u s e r s   W H E R E   c o m p a n y _ i d   =   ?   O R   c o m p a n y _ i d   I S   N U L L " ) ; 
 
                                         $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                                         e c h o   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                         ? > 
 
                                 < / s p a n > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - u s e r s - c o g " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > U s e r   M a n a g e m e n t < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > M a n a g e   s y s t e m   u s e r s < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   B a c k u p   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = b a c k u p _ s e t t i n g s "   c l a s s = " s e t t i n g s - c a r d   b a c k u p " > 
 
                                 < s p a n   c l a s s = " b a d g e - c o u n t " > < i   c l a s s = " f a s   f a - d a t a b a s e " > < / i > < / s p a n > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - d a t a b a s e " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > B a c k u p   &   R e s t o r e < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > D a t a b a s e   b a c k u p < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
 
 
                 < ! - -   S h e l f   M a n a g e m e n t   - - > 
 
                 < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s "   c l a s s = " s e t t i n g s - c a r d   s h e l f " > 
 
                                 < s p a n   c l a s s = " b a d g e - c o u n t " > 
 
                                         < i   c l a s s = " f a s   f a - a r c h i v e " > < / i >   
 
                                         < ? p h p   
 
                                         $ s t m t   =   $ t h i s - > d b - > p r e p a r e ( " S E L E C T   C O U N T ( * )   a s   c o u n t   F R O M   s h e l v e s   W H E R E   c o m p a n y _ i d   =   ? " ) ; 
 
                                         $ s t m t - > e x e c u t e ( [ $ t h i s - > c o m p a n y _ i d ] ) ; 
 
                                         e c h o   $ s t m t - > f e t c h ( ) [ ' c o u n t ' ]   ? ?   0 ; 
 
                                         ? > 
 
                                 < / s p a n > 
 
                                 < d i v   c l a s s = " i c o n " > < i   c l a s s = " f a s   f a - a r c h i v e " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " t i t l e " > S h e l f   M a n a g e m e n t < / d i v > 
 
                                 < d i v   c l a s s = " d e s c " > M a n a g e   s h e l v e s   a n d   r a c k   l o c a t i o n s < / d i v > 
 
                                 < d i v   c l a s s = " a r r o w " > < i   c l a s s = " f a s   f a - a r r o w - r i g h t " > < / i > < / d i v > 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - r e c e i p t   m e - 2   t e x t - p r i m a r y " > < / i > I n v o i c e   S e t t i n g s < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = i n v o i c e _ s e t t i n g s " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > I n v o i c e   P r e f i x < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " i n v o i c e _ p r e f i x "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' i n v o i c e _ p r e f i x ' ]   ? ?   ' I N V - ' ) ;   ? > " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > E x a m p l e :   I N V - 0 0 1 < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > R e c e i p t   F o o t e r < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " r e c e i p t _ f o o t e r "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' r e c e i p t _ f o o t e r ' ]   ? ?   ' T h a n k   y o u   f o r   y o u r   b u s i n e s s ! ' ) ;   ? > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > I n v o i c e   T e r m s   &   C o n d i t i o n s < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " i n v o i c e _ t e r m s "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 3 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' i n v o i c e _ t e r m s ' ]   ? ?   ' A l l   g o o d s   s o l d   a r e   n o n - r e t u r n a b l e . ' ) ;   ? > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   S a v e   I n v o i c e   S e t t i n g s 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 2 " > 
 
         < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - d o l l a r - s i g n   m e - 2   t e x t - p r i m a r y " > < / i > O r d e r   R a t e s < / h 5 > 
 
         < a   h r e f = " i n d e x . p h p ? a c t i o n = r a t e _ a d d "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   R a t e 
 
         < / a > 
 
 < / d i v > 
 
 
 
 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
         < / d i v > 
 
 < ? p h p   e n d i f ;   ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - b o d y   p - 2 " > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e   m b - 0 " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > T y p e < / t h > 
 
                                                 < t h > S i z e < / t h > 
 
                                                 < t h > R a t e < / t h > 
 
                                                 < t h > C u t t i n g   R a t e < / t h > 
 
                                                 < t h > S t i t c h i n g   R a t e < / t h > 
 
                                                 < t h > S t i t c h i n g   E x p e n s e s < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 0 p x ; " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ r a t e s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 2 " > N o   r a t e s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ r a t e s   a s   $ r ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r [ ' t y p e ' ] ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r [ ' s i z e ' ] ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r [ ' r a t e ' ] ,   0 ) ;   ? > < / s t r o n g > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r [ ' c u t t i n g _ r a t e ' ]   ? ?   0 ,   0 ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r [ ' s t i t c h i n g _ r a t e ' ]   ? ?   0 ,   0 ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > < s m a l l > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r [ ' s t i t c h i n g _ e x p e n s e s ' ]   ? ?   0 ,   0 ) ;   ? > < / s m a l l > < / t d > 
 
                                                                 < t d > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r a t e _ e d i t & i d = < ? p h p   e c h o   $ r [ ' i d ' ] ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = r a t e _ d e l e t e & i d = < ? p h p   e c h o   $ r [ ' i d ' ] ;   ? > "   c l a s s = " b t n   b t n - o u t l i n e - d a n g e r   b t n - s m   r o u n d e d - p i l l   p y - 0   p x - 2 "   o n c l i c k = " r e t u r n   c o n f i r m ( ' A r e   y o u   s u r e ? ' ) " > 
 
                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - p l u s - c i r c l e   m e - 2   t e x t - p r i m a r y " > < / i > A d d   R a t e < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T y p e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " t y p e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " e . g .   S h a l w a r   K a m e e z "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S i z e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s i z e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < o p t i o n   v a l u e = " S m a l l " > S m a l l < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " M e d i u m " > M e d i u m < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " L a r g e "   s e l e c t e d > L a r g e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " E x t r a   L a r g e " > E x t r a   L a r g e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a t e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u t t i n g   R a t e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " c u t t i n g _ r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S t i t c h i n g   R a t e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " s t i t c h i n g _ r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S t i t c h i n g   E x p e n s e s   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " s t i t c h i n g _ e x p e n s e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   p l a c e h o l d e r = " 0 . 0 0 " > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e   R a t e 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = r a t e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m "   s t y l e = " b o r d e r - r a d i u s : 1 2 p x ; " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 2   p b - 0 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - e d i t   m e - 2   t e x t - p r i m a r y " > < / i > E d i t   R a t e < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y   p y - 2 " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / s m a l l > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 2 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T y p e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " t y p e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r a t e [ ' t y p e ' ] ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S i z e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s i z e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < o p t i o n   v a l u e = " S m a l l "   < ? p h p   e c h o   $ r a t e [ ' s i z e ' ]   = =   ' S m a l l '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > S m a l l < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " M e d i u m "   < ? p h p   e c h o   $ r a t e [ ' s i z e ' ]   = =   ' M e d i u m '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > M e d i u m < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " L a r g e "   < ? p h p   e c h o   $ r a t e [ ' s i z e ' ]   = =   ' L a r g e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > L a r g e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " E x t r a   L a r g e "   < ? p h p   e c h o   $ r a t e [ ' s i z e ' ]   = =   ' E x t r a   L a r g e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > E x t r a   L a r g e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R a t e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ r a t e [ ' r a t e ' ] ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > C u t t i n g   R a t e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " c u t t i n g _ r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ r a t e [ ' c u t t i n g _ r a t e ' ]   ? ?   0 ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S t i t c h i n g   R a t e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " s t i t c h i n g _ r a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ r a t e [ ' s t i t c h i n g _ r a t e ' ]   ? ?   0 ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S t i t c h i n g   E x p e n s e s   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " s t i t c h i n g _ e x p e n s e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ r a t e [ ' s t i t c h i n g _ e x p e n s e s ' ]   ? ?   0 ;   ? > " > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m t - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e   R a t e 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = r a t e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   p x - 3 " > 
 
                                         < i   c l a s s = " f a s   f a - t i m e s   m e - 1 " > < / i >   C a n c e l 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p 
 
 $ s h e l f   =   $ s h e l f   ? ?   n u l l ; 
 
 $ i s _ e d i t   =   ! i s _ n u l l ( $ s h e l f ) ; 
 
 $ t i t l e   =   $ i s _ e d i t   ?   ' E d i t   S h e l f '   :   ' A d d   N e w   S h e l f ' ; 
 
 $ a c t i o n   =   $ i s _ e d i t   ?   ' s h e l f _ e d i t & i d = '   .   $ s h e l f [ ' i d ' ]   :   ' s h e l f _ a d d ' ; 
 
 ? > 
 
 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - a r c h i v e   m e - 2   t e x t - p r i m a r y " > < / i > < ? p h p   e c h o   $ t i t l e ;   ? > < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s h e l f _ s e t t i n g s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = < ? p h p   e c h o   $ a c t i o n ;   ? > " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S h e l f   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " s h e l f _ n a m e "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S h e l f   N u m b e r   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " s h e l f _ n u m b e r "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n u m b e r ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > R a c k   L o c a t i o n < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " r a c k _ l o c a t i o n "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " a v a i l a b l e "   < ? p h p   e c h o   ( $ s h e l f [ ' s t a t u s ' ]   ? ?   ' a v a i l a b l e ' )   = =   ' a v a i l a b l e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A v a i l a b l e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " o c c u p i e d "   < ? p h p   e c h o   ( $ s h e l f [ ' s t a t u s ' ]   ? ?   ' a v a i l a b l e ' )   = =   ' o c c u p i e d '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > O c c u p i e d < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " m a i n t e n a n c e "   < ? p h p   e c h o   ( $ s h e l f [ ' s t a t u s ' ]   ? ?   ' a v a i l a b l e ' )   = =   ' m a i n t e n a n c e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > M a i n t e n a n c e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   < ? p h p   e c h o   $ i s _ e d i t   ?   ' U p d a t e   S h e l f '   :   ' A d d   S h e l f ' ;   ? > 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - a r c h i v e   m e - 2   t e x t - p r i m a r y " > < / i > S h e l f   M a n a g e m e n t < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s h e l f _ a d d "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   S h e l f 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   m s - 2 " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > # < / t h > 
 
                                                 < t h > S h e l f   N a m e < / t h > 
 
                                                 < t h > S h e l f   N u m b e r < / t h > 
 
                                                 < t h > R a c k   L o c a t i o n < / t h > 
 
                                                 < t h > S t a t u s < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ s h e l v e s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   s h e l v e s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   $ i   =   1 ;   f o r e a c h   ( $ s h e l v e s   a s   $ s ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   $ i + + ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s [ ' s h e l f _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s [ ' s h e l f _ n u m b e r ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s [ ' r a c k _ l o c a t i o n ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e   < ? p h p   
 
                                                                                 e c h o   $ s [ ' s t a t u s ' ]   = =   ' a v a i l a b l e '   ?   ' b g - s u c c e s s '   :   
 
                                                                                         ( $ s [ ' s t a t u s ' ]   = =   ' o c c u p i e d '   ?   ' b g - d a n g e r '   :   ' b g - w a r n i n g ' ) ;   
 
                                                                         ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ s [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s h e l f _ e d i t & i d = < ? p h p   e c h o   $ s [ ' i d ' ] ;   ? > "   
 
                                                                               c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > 
 
                                                                                 < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                         < / a > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s h e l f _ d e l e t e & i d = < ? p h p   e c h o   $ s [ ' i d ' ] ;   ? > "   
 
                                                                               c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - d a n g e r   r o u n d e d - p i l l " 
 
                                                                               o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   s h e l f ? ' ) ; " > 
 
                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - s l i d e r s - h   m e - 2   t e x t - p r i m a r y " > < / i > S y s t e m   S e t t i n g s < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s y s t e m _ s e t t i n g s " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C u r r e n c y   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " c u r r e n c y "   c l a s s = " f o r m - c o n t r o l "   
 
                                                       v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e t t i n g s [ ' c u r r e n c y ' ]   ? ?   ' R s . ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > L a n g u a g e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " l a n g u a g e "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " e n "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' l a n g u a g e ' ]   ? ?   ' e n ' )   = =   ' e n '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > E n g l i s h < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " u r "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' l a n g u a g e ' ]   ? ?   ' e n ' )   = =   ' u r '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > U r d u < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " s d "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' l a n g u a g e ' ]   ? ?   ' e n ' )   = =   ' s d '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > S i n d h i < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > T i m e z o n e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " t i m e z o n e "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " A s i a / K a r a c h i "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' t i m e z o n e ' ]   ? ?   ' A s i a / K a r a c h i ' )   = =   ' A s i a / K a r a c h i '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A s i a / K a r a c h i < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " A s i a / D u b a i "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' t i m e z o n e ' ]   ? ?   ' A s i a / K a r a c h i ' )   = =   ' A s i a / D u b a i '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A s i a / D u b a i < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " U T C "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' t i m e z o n e ' ]   ? ?   ' A s i a / K a r a c h i ' )   = =   ' U T C '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > U T C < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > D a t e   F o r m a t < / l a b e l > 
 
                                         < s e l e c t   n a m e = " d a t e _ f o r m a t "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " d - m - Y "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' d a t e _ f o r m a t ' ]   ? ?   ' d - m - Y ' )   = =   ' d - m - Y '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > D D - M M - Y Y Y Y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " m - d - Y "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' d a t e _ f o r m a t ' ]   ? ?   ' d - m - Y ' )   = =   ' m - d - Y '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > M M - D D - Y Y Y Y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " Y - m - d "   < ? p h p   e c h o   ( $ s e t t i n g s [ ' d a t e _ f o r m a t ' ]   ? ?   ' d - m - Y ' )   = =   ' Y - m - d '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > Y Y Y Y - M M - D D < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   S a v e   S y s t e m   S e t t i n g s 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r s - c o g   m e - 2   t e x t - p r i m a r y " > < / i > U s e r   M a n a g e m e n t < / h 5 > 
 
                 < d i v > 
 
                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # a d d U s e r M o d a l " > 
 
                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   U s e r 
 
                         < / b u t t o n > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s e t t i n g s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   m s - 2 " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > U s e r n a m e < / t h > 
 
                                                 < t h > F u l l   N a m e < / t h > 
 
                                                 < t h > R o l e < / t h > 
 
                                                 < t h > S t a t u s < / t h > 
 
                                                 < t h > C r e a t e d < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ u s e r s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   u s e r s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ u s e r s   a s   $ u ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u [ ' u s e r n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u [ ' f u l l _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > < ? p h p   e c h o   u c f i r s t ( $ u [ ' r o l e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ u [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' b g - s u c c e s s '   :   ' b g - d a n g e r ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ u [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ u [ ' c r e a t e d _ a t ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = d e l e t e _ u s e r & i d = < ? p h p   e c h o   $ u [ ' i d ' ] ;   ? > "   
 
                                                                               c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - d a n g e r   r o u n d e d - p i l l " 
 
                                                                               o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   u s e r ? ' ) ; " > 
 
                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                         < / a > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   A D D   U S E R   M O D A L   = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " a d d U s e r M o d a l "   t a b i n d e x = " - 1 " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - d i a l o g - c e n t e r e d " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t " > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = u s e r _ m a n a g e m e n t " > 
 
                                 < d i v   c l a s s = " m o d a l - h e a d e r   b g - p r i m a r y   t e x t - w h i t e " > 
 
                                         < h 6   c l a s s = " m o d a l - t i t l e   f w - b o l d " > < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 2 " > < / i > A d d   N e w   U s e r < / h 6 > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y " > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > U s e r n a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " u s e r n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r e q u i r e d > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F u l l   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   n a m e = " f u l l _ n a m e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r e q u i r e d > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > P a s s w o r d   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < i n p u t   t y p e = " p a s s w o r d "   n a m e = " p a s s w o r d "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r e q u i r e d > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > R o l e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < s e l e c t   n a m e = " r o l e "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                         < o p t i o n   v a l u e = " a d m i n " > A d m i n < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " m a n a g e r " > M a n a g e r < / o p t i o n > 
 
                                                         < o p t i o n   v a l u e = " w o r k e r "   s e l e c t e d > W o r k e r < / o p t i o n > 
 
                                                 < / s e l e c t > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C a n c e l < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                                 < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   A d d   U s e r 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > 
 
                         < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - p r i m a r y " > < / i > A s s i g n e d   S t i t c h i n g   O r d e r s 
 
                 < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ p e n d i n g "   c l a s s = " b t n   b t n - w a r n i n g   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - c l o c k   m e - 1 " > < / i >   P e n d i n g 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ r e p o r t "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   B Y   E M P L O Y E E   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   m b - 3   a l i g n - i t e m s - c e n t e r " > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                 < f o r m   m e t h o d = " G E T "   a c t i o n = " "   c l a s s = " d - f l e x   g a p - 2 " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " s t i t c h i n g _ a s s i g n e d " > 
 
                                         < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   S t i t c h e r s   - - < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ s t i t c h i n g _ e m p l o y e e s   a s   $ e m p ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ e m p [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( i s s e t ( $ _ G E T [ ' e m p l o y e e _ i d ' ] )   & &   $ _ G E T [ ' e m p l o y e e _ i d ' ]   = =   $ e m p [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ] ) ;   ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > F i l t e r < / b u t t o n > 
 
                                         < ? p h p   i f   ( i s s e t ( $ _ G E T [ ' e m p l o y e e _ i d ' ] )   & &   $ _ G E T [ ' e m p l o y e e _ i d ' ] ) :   ? > 
 
                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > C l e a r < / a > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / f o r m > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 8   t e x t - e n d " > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > T o t a l   a s s i g n e d :   < s t r o n g > < ? p h p   e c h o   c o u n t ( $ a s s i g n e d _ o r d e r s ) ;   ? > < / s t r o n g > < / s m a l l > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > O r d e r   # < / t h > 
 
                                                 < t h > C u s t o m e r < / t h > 
 
                                                 < t h > S t i t c h e r < / t h > 
 
                                                 < t h > A s s i g n e d   D a t e < / t h > 
 
                                                 < t h > S t a t u s < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r "   s t y l e = " w i d t h : 1 5 0 p x ; " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ a s s i g n e d _ o r d e r s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                 < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 2   t e x t - s u c c e s s " > < / i > 
 
                                                                 N o   a s s i g n e d   o r d e r s   f o u n d . 
 
                                                                 < ? p h p   i f   ( i s s e t ( $ _ G E T [ ' e m p l o y e e _ i d ' ] )   & &   $ _ G E T [ ' e m p l o y e e _ i d ' ] ) :   ? > 
 
                                                                         < b r > < s m a l l > T r y   c l e a r i n g   t h e   f i l t e r . < / s m a l l > 
 
                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ a s s i g n e d _ o r d e r s   a s   $ r e c o r d ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' e m p l o y e e _ n a m e ' ]   ? ?   ' U n a s s i g n e d ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r e c o r d [ ' s t i t c h i n g _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ r e c o r d [ ' s t a t u s ' ]   = =   ' p e n d i n g '   ?   ' b g - w a r n i n g '   :   ' b g - s u c c e s s ' ;   ? >   r o u n d e d - p i l l " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ r e c o r d [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m "   r o l e = " g r o u p " > 
 
                                                                                 < ? p h p   i f   ( $ r e c o r d [ ' s t a t u s ' ]   ! =   ' c o m p l e t e d ' ) :   ? > 
 
                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ c o m p l e t e _ f o r m & i d = < ? p h p   e c h o   $ r e c o r d [ ' i d ' ] ;   ? > & o r d e r _ i d = < ? p h p   e c h o   $ r e c o r d [ ' o r d e r _ i d ' ] ;   ? > & e m p l o y e e _ i d = < ? p h p   e c h o   $ r e c o r d [ ' a s s i g n e d _ t o ' ] ;   ? > "   
 
                                                                                               c l a s s = " b t n   b t n - s u c c e s s "   t i t l e = " C o m p l e t e   S t i t c h i n g   w i t h   S h e l f " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - c h e c k " > < / i > 
 
                                                                                         < / a > 
 
                                                                                 < ? p h p   e l s e :   ? > 
 
                                                                                         < s p a n   c l a s s = " b a d g e   b g - s u c c e s s   p - 2 " > D o n e < / s p a n > 
 
                                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ s l i p & i d = < ? p h p   e c h o   $ r e c o r d [ ' o r d e r _ i d ' ] ;   ? > "   
 
                                                                                       t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   t i t l e = " S l i p " > 
 
                                                                                         < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ d e l e t e & i d = < ? p h p   e c h o   $ r e c o r d [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   s t i t c h i n g   r e c o r d ? ' ) ; " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - s u c c e s s   t e x t - w h i t e " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 2 " > < / i > C o m p l e t e   S t i t c h i n g   &   A s s i g n   S h e l f < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - i n f o   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ c o m p l e t e " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " s t i t c h i n g _ i d "   v a l u e = " < ? p h p   e c h o   $ s t i t c h i n g _ i d ;   ? > " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   v a l u e = " < ? p h p   e c h o   $ o r d e r _ i d ;   ? > " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " e m p l o y e e _ i d "   v a l u e = " < ? p h p   e c h o   $ e m p l o y e e _ i d ;   ? > " > 
 
 
 
                         < ! - -   = = = = =   O R D E R   S U M M A R Y   = = = = =   - - > 
 
                         < d i v   c l a s s = " r o w   g - 3   m b - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " b g - l i g h t   p - 3   r o u n d e d   b o r d e r " > 
 
                                                 < h 6   c l a s s = " f w - b o l d   m b - 2 " > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g   m e - 2   t e x t - p r i m a r y " > < / i > O r d e r   D e t a i l s < / h 6 > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > O r d e r   # : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > C u s t o m e r : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > T o t a l   S u i t s : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   ( i n t ) ( $ o r d e r [ ' t o t a l _ s u i t s ' ]   ? ?   0 ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > T o t a l   A m o u n t : < / s p a n >   
 
                                                         < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ,   0 ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " b g - l i g h t   p - 3   r o u n d e d   b o r d e r " > 
 
                                                 < h 6   c l a s s = " f w - b o l d   m b - 2 " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 2   t e x t - p r i m a r y " > < / i > S t i t c h e r < / h 6 > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > N a m e : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > C o d e : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' e m p _ c o d e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > C a t e g o r y : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' c a t e g o r y _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S H E L F   S E L E C T I O N   (  &                 )   = = = = =   - - > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > 
 
                                         < i   c l a s s = " f a s   f a - w a r e h o u s e   m e - 1   t e x t - p r i m a r y " > < / i > A s s i g n   S h e l f   
 
                                         < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > 
 
                                 < / l a b e l > 
 
                                 < s e l e c t   n a m e = " s h e l f _ i d "   c l a s s = " f o r m - s e l e c t "   r e q u i r e d > 
 
                                         < o p t i o n   v a l u e = " " > - -   S e l e c t   a   s h e l f   - - < / o p t i o n > 
 
                                         < ? p h p   i f   ( e m p t y ( $ a v a i l a b l e _ s h e l v e s ) ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " "   d i s a b l e d >  a      N o   a v a i l a b l e   s h e l v e s .   P l e a s e   a d d   a   s h e l f   f i r s t . < / o p t i o n > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ a v a i l a b l e _ s h e l v e s   a s   $ s h e l f ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ s h e l f [ ' i d ' ] ;   ? > " > 
 
                                                                 < ? p h p   
 
                                                                         $ s h e l f _ d i s p l a y   =   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n a m e ' ]   ? ?   ' ' )   .   '   -   '   .   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n u m b e r ' ]   ? ?   ' ' ) ; 
 
                                                                         i f   ( ! e m p t y ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) )   { 
 
                                                                                 $ s h e l f _ d i s p l a y   . =   '   ( '   .   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] )   .   ' ) ' ; 
 
                                                                         } 
 
                                                                         / /                           &  R    c a p a c i t y        &          R               R     &            
 
                                                                         i f   ( i s s e t ( $ s h e l f [ ' c a p a c i t y ' ] )   & &   $ s h e l f [ ' c a p a c i t y ' ]   >   0 )   { 
 
                                                                                 $ s h e l f _ d i s p l a y   . =   '   -   C a p a c i t y :   '   .   ( i n t ) $ s h e l f [ ' c a p a c i t y ' ] ; 
 
                                                                         } 
 
                                                                         e c h o   $ s h e l f _ d i s p l a y ; 
 
                                                                 ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / s e l e c t > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > 
 
                                         < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 " > < / i > 
 
                                         S e l e c t   a   s h e l f   t o   s t o r e   t h e   c o m p l e t e d   o r d e r .   I f   n o   s h e l f   i s   s e l e c t e d ,   o r d e r   w i l l   b e   m a r k e d   r e a d y   w i t h o u t   s h e l f . 
 
                                 < / s m a l l > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   N O T E S   = = = = =   - - > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > N o t e s   ( O p t i o n a l ) < / l a b e l > 
 
                                 < t e x t a r e a   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 2 "   p l a c e h o l d e r = " A n y   r e m a r k s   a b o u t   t h i s   c o m p l e t i o n . . . " > < / t e x t a r e a > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
                         < d i v   c l a s s = " d - f l e x   g a p - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   r o u n d e d - p i l l   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   C o m p l e t e   &   A s s i g n   S h e l f 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k   t o   A s s i g n e d 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - w h i t e   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p   p y - 2 " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > 
 
                         < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - p r i m a r y " > < / i > A l l   S t i t c h i n g   R e c o r d s 
 
                         < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y   m s - 2 " > < ? p h p   e c h o   c o u n t ( $ s t i t c h i n g _ r e c o r d s ) ;   ? > < / s p a n > 
 
                 < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ p e n d i n g "   c l a s s = " b t n   b t n - w a r n i n g   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - c l o c k   m e - 1 " > < / i >   P e n d i n g 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - i n f o   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - l i s t   m e - 1 " > < / i >   A s s i g n e d 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ r e p o r t "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   B Y   S T A T U S   = = = = =   - - > 
 
                 < d i v   c l a s s = " r o w   m b - 3   a l i g n - i t e m s - c e n t e r " > 
 
                         < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                 < f o r m   m e t h o d = " G E T "   a c t i o n = " "   c l a s s = " d - f l e x   g a p - 2 " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " s t i t c h i n g " > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   S t a t u s   - - < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " p e n d i n g "   < ? p h p   e c h o   ( i s s e t ( $ _ G E T [ ' s t a t u s ' ] )   & &   $ _ G E T [ ' s t a t u s ' ]   = =   ' p e n d i n g ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > P e n d i n g < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " c o m p l e t e d "   < ? p h p   e c h o   ( i s s e t ( $ _ G E T [ ' s t a t u s ' ] )   & &   $ _ G E T [ ' s t a t u s ' ]   = =   ' c o m p l e t e d ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > C o m p l e t e d < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > F i l t e r < / b u t t o n > 
 
                                         < ? p h p   i f   ( i s s e t ( $ _ G E T [ ' s t a t u s ' ] )   & &   $ _ G E T [ ' s t a t u s ' ] ) :   ? > 
 
                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > C l e a r < / a > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / f o r m > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 8   t e x t - e n d " > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > 
 
                                         < ? p h p   
 
                                                 $ t o t a l   =   c o u n t ( $ s t i t c h i n g _ r e c o r d s ) ; 
 
                                                 $ p e n d i n g   =   a r r a y _ f i l t e r ( $ s t i t c h i n g _ r e c o r d s ,   f u n c t i o n ( $ r )   {   r e t u r n   $ r [ ' s t a t u s ' ]   = =   ' p e n d i n g ' ;   } ) ; 
 
                                                 $ c o m p l e t e d   =   a r r a y _ f i l t e r ( $ s t i t c h i n g _ r e c o r d s ,   f u n c t i o n ( $ r )   {   r e t u r n   $ r [ ' s t a t u s ' ]   = =   ' c o m p l e t e d ' ;   } ) ; 
 
                                                 e c h o   " P e n d i n g :   < s t r o n g > "   .   c o u n t ( $ p e n d i n g )   .   " < / s t r o n g >   |   C o m p l e t e d :   < s t r o n g > "   .   c o u n t ( $ c o m p l e t e d )   .   " < / s t r o n g >   |   T o t a l :   < s t r o n g > $ t o t a l < / s t r o n g > " ; 
 
                                         ? > 
 
                                 < / s m a l l > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   T A B L E   = = = = =   - - > 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > O r d e r   # < / t h > 
 
                                                 < t h > C u s t o m e r < / t h > 
 
                                                 < t h > S t i t c h e r < / t h > 
 
                                                 < t h > A s s i g n e d   D a t e < / t h > 
 
                                                 < t h > S t a t u s < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r "   s t y l e = " w i d t h : 1 5 0 p x ; " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ s t i t c h i n g _ r e c o r d s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                 < i   c l a s s = " f a s   f a - i n b o x   m e - 2 " > < / i >   N o   s t i t c h i n g   r e c o r d s   f o u n d . 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   
 
                                                         $ f i l t e r _ s t a t u s   =   $ _ G E T [ ' s t a t u s ' ]   ? ?   ' ' ; 
 
                                                         $ f i l t e r e d _ r e c o r d s   =   $ s t i t c h i n g _ r e c o r d s ; 
 
                                                         i f   ( $ f i l t e r _ s t a t u s )   { 
 
                                                                 $ f i l t e r e d _ r e c o r d s   =   a r r a y _ f i l t e r ( $ s t i t c h i n g _ r e c o r d s ,   f u n c t i o n ( $ r )   u s e   ( $ f i l t e r _ s t a t u s )   { 
 
                                                                         r e t u r n   $ r [ ' s t a t u s ' ]   = =   $ f i l t e r _ s t a t u s ; 
 
                                                                 } ) ; 
 
                                                         } 
 
                                                 ? > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ f i l t e r e d _ r e c o r d s ) ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                         N o   r e c o r d s   f o u n d   f o r   s t a t u s :   < s t r o n g > < ? p h p   e c h o   u c f i r s t ( $ f i l t e r _ s t a t u s ) ;   ? > < / s t r o n g > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   f o r e a c h   ( $ f i l t e r e d _ r e c o r d s   a s   $ r e c o r d ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' e m p l o y e e _ n a m e ' ]   ? ?   ' U n a s s i g n e d ' ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r e c o r d [ ' s t i t c h i n g _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ r e c o r d [ ' s t a t u s ' ]   = =   ' p e n d i n g '   ?   ' b g - w a r n i n g '   :   ' b g - s u c c e s s ' ;   ? >   r o u n d e d - p i l l " > 
 
                                                                                         < ? p h p   e c h o   u c f i r s t ( $ r e c o r d [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / t d > 
 
                                                                         < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                 < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m "   r o l e = " g r o u p " > 
 
                                                                                         < ? p h p   i f   ( $ r e c o r d [ ' s t a t u s ' ]   = =   ' p e n d i n g ' ) :   ? > 
 
                                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ c o m p l e t e _ f o r m & i d = < ? p h p   e c h o   $ r e c o r d [ ' i d ' ] ;   ? > & o r d e r _ i d = < ? p h p   e c h o   $ r e c o r d [ ' o r d e r _ i d ' ] ;   ? > & e m p l o y e e _ i d = < ? p h p   e c h o   $ r e c o r d [ ' a s s i g n e d _ t o ' ] ;   ? > "   
 
                                                                                                       c l a s s = " b t n   b t n - s u c c e s s "   t i t l e = " C o m p l e t e   w i t h   S h e l f " > 
 
                                                                                                         < i   c l a s s = " f a s   f a - c h e c k " > < / i > 
 
                                                                                                 < / a > 
 
                                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                                 < s p a n   c l a s s = " b a d g e   b g - s u c c e s s   p - 2 " >  S   D o n e < / s p a n > 
 
                                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ s l i p & i d = < ? p h p   e c h o   $ r e c o r d [ ' o r d e r _ i d ' ] ;   ? > "   
 
                                                                                               t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   t i t l e = " S l i p " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                         < / a > 
 
                                                                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ d e l e t e & i d = < ? p h p   e c h o   $ r e c o r d [ ' i d ' ] ;   ? > "   
 
                                                                                               c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   s t i t c h i n g   r e c o r d ? ' ) ; " > 
 
                                                                                                 < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                         < / a > 
 
                                                                                 < / d i v > 
 
                                                                         < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - p r i m a r y " > < / i > P e n d i n g   S t i t c h i n g   O r d e r s < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - i n f o   b t n - s m   r o u n d e d - p i l l " > 
 
                         < i   c l a s s = " f a s   f a - l i s t   m e - 1 " > < / i >   A s s i g n e d   O r d e r s 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m   a l i g n - m i d d l e " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > O r d e r   # < / t h > 
 
                                                 < t h > C u s t o m e r < / t h > 
 
                                                 < t h > O r d e r   D a t e < / t h > 
 
                                                 < t h > S u i t s < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ p e n d i n g _ o r d e r s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 5 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                 < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 2   t e x t - s u c c e s s " > < / i > 
 
                                                                 N o   p e n d i n g   o r d e r s   f o r   s t i t c h i n g . 
 
                                                         < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ p e n d i n g _ o r d e r s   a s   $ o r d e r ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' s u i t _ c o u n t ' ] ;   ? > < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   a s s i g n - b t n "   
 
                                                                                         d a t a - o r d e r - i d = " < ? p h p   e c h o   $ o r d e r [ ' i d ' ] ;   ? > " 
 
                                                                                         d a t a - o r d e r - n o = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > " 
 
                                                                                         d a t a - c u s t o m e r = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > " 
 
                                                                                         d a t a - s u i t s = " < ? p h p   e c h o   ( i n t ) $ o r d e r [ ' s u i t _ c o u n t ' ] ;   ? > " 
 
                                                                                         d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # a s s i g n M o d a l " > 
 
                                                                                 < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 1 " > < / i >   A s s i g n 
 
                                                                         < / b u t t o n > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   A S S I G N   M O D A L   = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " a s s i g n M o d a l "   t a b i n d e x = " - 1 " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - d i a l o g - c e n t e r e d " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t " > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n " > 
 
                                 < d i v   c l a s s = " m o d a l - h e a d e r " > 
 
                                         < h 6   c l a s s = " m o d a l - t i t l e   f w - b o l d " > < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 2   t e x t - p r i m a r y " > < / i > A s s i g n   S t i t c h i n g < / h 6 > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y " > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > O r d e r < / l a b e l > 
 
                                                 < i n p u t   t y p e = " t e x t "   i d = " m o d a l O r d e r I n f o "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r e a d o n l y > 
 
                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   i d = " m o d a l O r d e r I d " > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A s s i g n   T o   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                                 < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m "   r e q u i r e d > 
 
                                                         < o p t i o n   v a l u e = " " > S e l e c t   E m p l o y e e . . . < / o p t i o n > 
 
                                                         < ? p h p   f o r e a c h   ( $ s t i t c h i n g _ e m p l o y e e s   a s   $ e m p ) :   ? > 
 
                                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ e m p [ ' i d ' ] ;   ? > " > 
 
                                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ] ) ;   ? >   
 
                                                                         ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' c a t e g o r y _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > ) 
 
                                                                 < / o p t i o n > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < / s e l e c t > 
 
                                         < / d i v > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > S t i t c h i n g   D a t e < / l a b e l > 
 
                                                 < i n p u t   t y p e = " d a t e "   n a m e = " s t i t c h i n g _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                         < / d i v > 
 
                                         < d i v > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > N o t e s < / l a b e l > 
 
                                                 < t e x t a r e a   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   r o w s = " 2 "   p l a c e h o l d e r = " A n y   s p e c i a l   i n s t r u c t i o n s . . . " > < / t e x t a r e a > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C a n c e l < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                                 < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   A s s i g n 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . a s s i g n - b t n ' ) . f o r E a c h ( b t n   = >   { 
 
                 b t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' m o d a l O r d e r I d ' ) . v a l u e   =   t h i s . d a t a s e t . o r d e r I d ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' m o d a l O r d e r I n f o ' ) . v a l u e   =   t h i s . d a t a s e t . o r d e r N o   +   '   -   '   +   t h i s . d a t a s e t . c u s t o m e r   +   '   ( '   +   t h i s . d a t a s e t . s u i t s   +   '   s u i t s ) ' ; 
 
                 } ) ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - p r i m a r y " > < / i > S t i t c h i n g   R e p o r t < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ! - -   = = = = =   F I L T E R   F O R M   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " r o w   g - 2   m b - 3   a l i g n - i t e m s - e n d " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " s t i t c h i n g _ r e p o r t " > 
 
                         < d i v   c l a s s = " c o l - m d - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > E m p l o y e e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                         < o p t i o n   v a l u e = " " > A l l   E m p l o y e e s < / o p t i o n > 
 
                                         < ? p h p   f o r e a c h   ( $ e m p l o y e e s   a s   $ e m p ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ e m p [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ e m p l o y e e _ i d   = =   $ e m p [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ] ) ;   ? > 
 
                                                 < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > F r o m   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ f r o m _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > T o   D a t e < / l a b e l > 
 
                                 < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l   f o r m - c o n t r o l - s m "   v a l u e = " < ? p h p   e c h o   $ t o _ d a t e ;   ? > " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 " > 
 
                                         < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   G e n e r a t e 
 
                                 < / b u t t o n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " c o l - m d - 2 " > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                                         < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t 
 
                                 < / b u t t o n > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ? p h p   i f   ( ! e m p t y ( $ e m p l o y e e _ i d )   | |   ! e m p t y ( $ r e p o r t s ) ) :   ? > 
 
                         < ! - -   = = = = =   S U M M A R Y   C A R D S   = = = = =   - - > 
 
                         < d i v   c l a s s = " r o w   g - 2   m b - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > 
 
                                                 < s t r o n g > T o t a l   E n t r i e s < / s t r o n g > < b r > 
 
                                                 < ? p h p   e c h o   c o u n t ( $ r e p o r t s ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > 
 
                                                 < s t r o n g > T o t a l   A m o u n t   ( R s . ) < / s t r o n g > < b r > 
 
                                                 < ? p h p   
 
                                                 $ t o t a l   =   0 ; 
 
                                                 f o r e a c h   ( $ r e p o r t s   a s   $ r )   $ t o t a l   + =   $ r [ ' a m o u n t ' ] ; 
 
                                                 e c h o   n u m b e r _ f o r m a t ( $ t o t a l ,   0 ) ; 
 
                                                 ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < d i v   c l a s s = " b g - l i g h t   p - 2   r o u n d e d   t e x t - c e n t e r " > 
 
                                                 < s t r o n g > P e r i o d < / s t r o n g > < b r > 
 
                                                 < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m _ d a t e ) ) ;   ? >   t o   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o _ d a t e ) ) ;   ? > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   T A B L E   = = = = =   - - > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                         < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                 < t r > 
 
                                                         < t h > D a t e < / t h > 
 
                                                         < t h > O r d e r   # < / t h > 
 
                                                         < t h > C u s t o m e r < / t h > 
 
                                                         < t h > D e s c r i p t i o n < / t h > 
 
                                                         < t h   c l a s s = " t e x t - e n d " > A m o u n t   ( R s . ) < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ r e p o r t s ) ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d   c o l s p a n = " 5 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > 
 
                                                                         N o   s t i t c h i n g   r e c o r d s   f o u n d   f o r   t h i s   p e r i o d . 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   f o r e a c h   ( $ r e p o r t s   a s   $ r o w ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' t r a n s a c t i o n _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ v i e w & i d = < ? p h p   e c h o   $ r o w [ ' o r d e r _ i d ' ] ;   ? > "   t a r g e t = " _ b l a n k " > 
 
                                                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' o r d e r _ n o ' ] ) ;   ? > 
 
                                                                                 < / a > 
 
                                                                         < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' d e s c r i p t i o n ' ] ) ;   ? > < / t d > 
 
                                                                         < t d   c l a s s = " t e x t - e n d " > < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ r o w [ ' a m o u n t ' ] ,   0 ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < t r   c l a s s = " t a b l e - s e c o n d a r y   f w - b o l d " > 
 
                                                                 < t d   c o l s p a n = " 4 "   c l a s s = " t e x t - e n d " > T o t a l : < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - e n d " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ t o t a l ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 2   t e x t - c e n t e r " > 
 
                                 < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 2 " > < / i > 
 
                                 S e l e c t   a n   e m p l o y e e   a n d   d a t e   r a n g e   t o   v i e w   s t i t c h i n g   r e p o r t . 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < ? p h p 
 
 i f   ( e m p t y ( $ s l i p _ d a t a ) )   { 
 
         d i e ( ' S t i t c h i n g   s l i p   d a t a   n o t   f o u n d . ' ) ; 
 
 } 
 
 
 
 $ o r d e r   =   $ s l i p _ d a t a [ ' o r d e r ' ]   ? ?   [ ] ; 
 
 $ c u s t o m e r   =   $ s l i p _ d a t a [ ' c u s t o m e r ' ]   ? ?   [ ] ; 
 
 $ s t i t c h i n g   =   $ s l i p _ d a t a [ ' s t i t c h i n g ' ]   ? ?   [ ] ; 
 
 $ s u i t s   =   $ s l i p _ d a t a [ ' s u i t s ' ]   ? ?   [ ] ; 
 
 
 
 $ o r d e r _ n o   =   $ o r d e r [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ; 
 
 $ o r d e r _ d a t e   =   $ o r d e r [ ' o r d e r _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ t o t a l _ s u i t s   =   $ o r d e r [ ' t o t a l _ s u i t s ' ]   ? ?   c o u n t ( $ s u i t s ) ; 
 
 $ e m p l o y e e _ n a m e   =   $ s t i t c h i n g [ ' e m p l o y e e _ n a m e ' ]   ? ?   ' N o t   A s s i g n e d ' ; 
 
 $ s t i t c h i n g _ d a t e   =   $ s t i t c h i n g [ ' s t i t c h i n g _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ s t a t u s   =   $ s t i t c h i n g [ ' s t a t u s ' ]   ? ?   ' p e n d i n g ' ; 
 
 $ n o t e s   =   $ s t i t c h i n g [ ' n o t e s ' ]   ? ?   ' ' ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e > S t i t c h i n g   S l i p   -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < s t y l e > 
 
                 / *   = = = = =   R E S E T   = = = = =   * / 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   ' C o u r i e r   N e w ' ,   m o n o s p a c e ; 
 
                         b a c k g r o u n d :   # f 4 f 4 f 4 ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         m a r g i n :   0 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 6 p x ; 
 
                         b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         p a d d i n g :   2 4 p x ; 
 
                         m a x - w i d t h :   1 0 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                 } 
 
                 . c o n t a i n e r   { 
 
                         w i d t h :   8 0 m m ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         p a d d i n g :   2 m m   2 m m ; 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         l i n e - h e i g h t :   1 . 6 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 / *   = = = = =   H E A D E R   = = = = =   * / 
 
                 . h e a d e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   2 p x   d a s h e d   # 3 3 3 ; 
 
                         p a d d i n g - b o t t o m :   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   1 0 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   { 
 
                         f o n t - s i z e :   2 2 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         m a r g i n :   0 ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 . h e a d e r   s m a l l   { 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         c o l o r :   # 6 6 6 ; 
 
                         d i s p l a y :   b l o c k ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . h e a d e r   . s l i p - t i t l e   { 
 
                         f o n t - s i z e :   1 8 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 6 6 7 e e a ; 
 
                         m a r g i n - t o p :   4 p x ; 
 
                 } 
 
                 / *   = = = = =   B A R C O D E   = = = = =   * / 
 
                 . b a r c o d e - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         m a r g i n :   8 p x   0 ; 
 
                         p a d d i n g :   6 p x   0 ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   { 
 
                         m a x - w i d t h :   7 0 m m ; 
 
                         h e i g h t :   a u t o ; 
 
                 } 
 
                 / *   = = = = =   I N F O   G R I D   = = = = =   * / 
 
                 . i n f o - g r i d   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ; 
 
                         g a p :   6 p x   1 4 p x ; 
 
                         p a d d i n g :   8 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ; 
 
                         m a r g i n - b o t t o m :   8 p x ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . l a b e l   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 4 4 4 ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . i n f o - g r i d   . v a l u e   { 
 
                         c o l o r :   # 0 0 0 ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = = =   T A B L E   = = = = =   * / 
 
                 t a b l e   { 
 
                         w i d t h :   1 0 0 % ; 
 
                         b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
                         m a r g i n :   8 p x   0 ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                 } 
 
                 t h e a d   t h   { 
 
                         b a c k g r o u n d :   # f 0 f 0 f 0 ; 
 
                         p a d d i n g :   6 p x   8 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         b o r d e r - b o t t o m :   2 p x   s o l i d   # 3 3 3 ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t b o d y   t d   { 
 
                         p a d d i n g :   6 p x   8 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # d d d ; 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = = =   M E A S U R E M E N T S   = = = = =   * / 
 
                 . m e a s u r e m e n t s   { 
 
                         m a r g i n - t o p :   8 p x ; 
 
                         p a d d i n g :   8 p x ; 
 
                         b a c k g r o u n d :   # f 9 f 9 f 9 ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         b o r d e r - r i g h t :   3 p x   s o l i d   # 6 6 7 e e a ; 
 
                 } 
 
                 . m e a s u r e m e n t s   s t r o n g   { 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         d i s p l a y :   b l o c k ; 
 
                         m a r g i n - b o t t o m :   4 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . m e a s u r e m e n t s   t a b l e   { 
 
                         m a r g i n :   0 ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   t d   { 
 
                         p a d d i n g :   2 p x   6 p x ; 
 
                         b o r d e r :   n o n e ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = = =   F O O T E R   = = = = =   * / 
 
                 . f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                         p a d d i n g - t o p :   1 0 p x ; 
 
                         b o r d e r - t o p :   2 p x   d a s h e d   # 3 3 3 ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . f o o t e r   p   {   m a r g i n :   2 p x   0 ;   } 
 
                 / *   = = = = =   P R I N T   B U T T O N   = = = = =   * / 
 
                 . p r i n t - b t n - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   2 0 p x   0   5 p x   0 ; 
 
                         b o r d e r - t o p :   1 p x   s o l i d   # e e e ; 
 
                         m a r g i n - t o p :   1 2 p x ; 
 
                 } 
 
                 . p r i n t - b t n   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ; 
 
                         c o l o r :   # f f f ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   5 0 p x ; 
 
                         p a d d i n g :   1 4 p x   4 5 p x ; 
 
                         f o n t - s i z e :   1 8 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                         b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 7 ,   1 5 3 ,   1 4 2 ,   0 . 3 5 ) ; 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . p r i n t - b t n : h o v e r   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                         b o x - s h a d o w :   0   6 p x   2 5 p x   r g b a ( 1 7 ,   1 5 3 ,   1 4 2 ,   0 . 4 5 ) ; 
 
                 } 
 
                 . p r i n t - b t n   i   {   m a r g i n - l e f t :   1 0 p x ;   } 
 
                 . s h o r t c u t - h i n t   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         c o l o r :   # a a a ; 
 
                         m a r g i n - t o p :   8 p x ; 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
                         d i r e c t i o n :   l t r ; 
 
                 } 
 
                 . s h o r t c u t - h i n t   k b d   { 
 
                         b a c k g r o u n d :   # f 0 f 0 f 0 ; 
 
                         p a d d i n g :   2 p x   1 0 p x ; 
 
                         b o r d e r - r a d i u s :   4 p x ; 
 
                         b o r d e r :   1 p x   s o l i d   # d d d ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                 } 
 
                 / *   = = = = =   P R I N T   S T Y L E S   = = = = =   * / 
 
                 @ p a g e   {   s i z e :   8 0 m m   a u t o ;   m a r g i n :   0 ;   } 
 
                 @ m e d i a   p r i n t   { 
 
                         b o d y   {   b a c k g r o u n d :   # f f f ;   p a d d i n g :   0 ;   m a r g i n :   0 ;   d i s p l a y :   b l o c k ;   } 
 
                         . p r i n t - w r a p p e r   {   b o x - s h a d o w :   n o n e ;   b o r d e r - r a d i u s :   0 ;   p a d d i n g :   0 ;   m a x - w i d t h :   1 0 0 % ;   } 
 
                         . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   p a d d i n g :   2 m m   3 m m ;   } 
 
                         . p r i n t - b t n - c o n t a i n e r   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                         . s h o r t c u t - h i n t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
                 < d i v   c l a s s = " c o n t a i n e r " > 
 
 
 
                         < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
                         < d i v   c l a s s = " h e a d e r " > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   '    `            ' ) ;   ? > < / h 2 > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < d i v   c l a s s = " s l i p - t i t l e " >          `        < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   B A R C O D E   = = = = =   - - > 
 
                         < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                                 < s v g   i d = " b a r c o d e " > < / s v g > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   I N F O   = = = = =   - - > 
 
                         < d i v   c l a s s = " i n f o - g r i d " > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >      `    # < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >        `  < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r _ d a t e ) ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >        !   < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >       < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >          `          "!< / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e _ n a m e ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v > < s p a n   c l a s s = " l a b e l " >          `         `  < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ s t i t c h i n g _ d a t e ) ) ;   ? > < / s p a n > < / d i v > 
 
                                 < d i v   s t y l e = " g r i d - c o l u m n :   s p a n   2 ; " > 
 
                                         < s p a n   c l a s s = " l a b e l " >        `    < / s p a n > < b r > 
 
                                         < s p a n   c l a s s = " v a l u e "   s t y l e = " c o l o r :   < ? p h p   e c h o   $ s t a t u s   = =   ' c o m p l e t e d '   ?   ' # 2 8 a 7 4 5 '   :   ' # f f c 1 0 7 ' ;   ? > ; " > 
 
                                                 < ? p h p   e c h o   $ s t a t u s   = =   ' c o m p l e t e d '   ?   '  &    &        `  '   :   '    `               ' ;   ? > 
 
                                         < / s p a n > 
 
                                 < / d i v > 
 
                                 < ? p h p   i f   ( $ n o t e s ) :   ? > 
 
                                 < d i v   s t y l e = " g r i d - c o l u m n :   s p a n   2 ; " > 
 
                                         < s p a n   c l a s s = " l a b e l " >         < / s p a n > < b r > 
 
                                         < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ n o t e s ) ;   ? > < / s p a n > 
 
                                 < / d i v > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S U I T S   T A B L E   = = = = =   - - > 
 
                         < t a b l e > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 4 0 % ; " >      < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 2 0 % ; " >         < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 3 0 % ; " >    ` &   < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ s u i t s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 4 "   s t y l e = " t e x t - a l i g n : c e n t e r ;   p a d d i n g : 1 0 p x   0 ; " >    `     !              !    &    `  < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u i t [ ' p r i c e ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
 
 
                         < ! - -   = = = = =   M E A S U R E M E N T S   = = = = =   - - > 
 
                         < ? p h p   i f   ( ! e m p t y ( $ s u i t s )   & &   ! e m p t y ( $ s u i t s [ 0 ] [ ' m e a s u r e m e n t ' ] ) ) :   ? > 
 
                                 < d i v   c l a s s = " m e a s u r e m e n t s " > 
 
                                         < s t r o n g >  &       (    !    `               `) : < / s t r o n g > 
 
                                         < t a b l e > 
 
                                                 < ? p h p 
 
                                                 $ m   =   $ s u i t s [ 0 ] [ ' m e a s u r e m e n t ' ] ; 
 
                                                 $ f i e l d s   =   [ 
 
                                                         ' c h e s t '   = >   '    `    ' , 
 
                                                         ' w a i s t '   = >   '    &   ' , 
 
                                                         ' l o o s i n g '   = >   '           ' , 
 
                                                         ' s h o u l d e r '   = >   '            ' , 
 
                                                         ' s l e e v e '   = >   '        `   ' , 
 
                                                         ' s h i r t _ l e n g t h '   = >   '  `         `' , 
 
                                                         ' c o l l a r '   = >   '         ' , 
 
                                                         ' c u f f _ l e n g t h '   = >   '        `         `' , 
 
                                                         ' c u f f _ w i d t h '   = >   '         `    ' , 
 
                                                         ' s i d e p o c k e t '   = >   '        `          `   ' , 
 
                                                         ' f r o n t p o c k e t '   = >   '      `         `   ' , 
 
                                                         ' s h a l w a r p o c k e t '   = >   '               `   ' , 
 
                                                         ' s h a l w a r _ l e n g t h '   = >   '             `         `' , 
 
                                                         ' s h a l w a r _ b o t t o m '   = >   '                         ' , 
 
                                                         ' s h e r w a n i '   = >   '    `         `' , 
 
                                                         ' n o t e s '   = >   '         ' , 
 
                                                         ' r e m a r k s '   = >   '    R &         ' 
 
                                                 ] ; 
 
                                                 $ i   =   0 ; 
 
                                                 f o r e a c h   ( $ f i e l d s   a s   $ k e y   = >   $ l a b e l ) : 
 
                                                         i f   ( $ i   %   3   = =   0 )   e c h o   ' < t r > ' ; 
 
                                                         $ v a l   =   $ m [ $ k e y ]   ? ?   ' - ' ; 
 
                                                 ? > 
 
                                                         < t d > < s t r o n g > < ? p h p   e c h o   $ l a b e l ;   ? > : < / s t r o n g >   < ? p h p   e c h o   $ v a l ;   ? > < / t d > 
 
                                                 < ? p h p 
 
                                                         $ i + + ; 
 
                                                         i f   ( $ i   %   3   = =   0 )   e c h o   ' < / t r > ' ; 
 
                                                 e n d f o r e a c h ; 
 
                                                 i f   ( $ i   %   3   ! =   0 )   e c h o   ' < / t r > ' ; 
 
                                                 ? > 
 
                                         < / t a b l e > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
 
 
                         < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
                         < d i v   c l a s s = " f o o t e r " > 
 
                                 < p >     !           `                        &  !           `! < / p > 
 
                         < / d i v > 
 
 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   P R I N T   B U T T O N   = = = = =   - - > 
 
                 < d i v   c l a s s = " p r i n t - b t n - c o n t a i n e r   n o - p r i n t " > 
 
                         < b u t t o n   c l a s s = " p r i n t - b t n "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                                 < i   c l a s s = " f a s   f a - p r i n t " > < / i >                    
 
                         < / b u t t o n > 
 
                         < d i v   c l a s s = " s h o r t c u t - h i n t " > 
 
                                 < k b d > C t r l < / k b d >   +   < k b d > P < / k b d >   t o   p r i n t 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < s c r i p t > 
 
                 J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > " ,   { 
 
                         f o r m a t :   " C O D E 1 2 8 " , 
 
                         w i d t h :   2 , 
 
                         h e i g h t :   4 5 , 
 
                         d i s p l a y V a l u e :   t r u e , 
 
                         f o n t :   " m o n o s p a c e " , 
 
                         f o n t S i z e :   1 4 , 
 
                         m a r g i n :   0 , 
 
                         b a c k g r o u n d :   " # f f f f f f " , 
 
                         l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
                 } ) ; 
 
                 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                         i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                                 e . p r e v e n t D e f a u l t ( ) ; 
 
                                 w i n d o w . p r i n t ( ) ; 
 
                         } 
 
                 } ) ; 
 
         < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < s t y l e > 
 
         . s t i t c h i n g - s u i t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 3 b   0 % ,   # 2 c 5 f 6 e   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 8 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - f a m i l y :   ' M B   L a t e e f i ' ,   ' L a t e e f i ' ,   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 4 p x ; 
 
                 b a c k g r o u n d :   # f 9 f b f c ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   6 p x   8 p x ; 
 
                 b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   6 p x   8 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . b a d g e - s u i t   { 
 
                 b a c k g r o u n d :   # e 8 e d f 0 ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 p a d d i n g :   3 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . b a d g e - s i z e   { 
 
                 b a c k g r o u n d :   # d 1 f a e 5 ; 
 
                 c o l o r :   # 0 6 5 f 4 6 ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b t n - s u c c e s s - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 0 f 9 b 5 e   0 % ,   # 2 8 a 7 4 5   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 2 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 b o x - s h a d o w :   0   2 p x   8 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 2 5 ) ; 
 
         } 
 
         . b t n - s u c c e s s - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   6 p x   2 0 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s t i t c h i n g - s u i t - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . s t i t c h i n g - s u i t - c a r d   . t a b l e   t h ,   . s t i t c h i n g - s u i t - c a r d   . t a b l e   t d   {   p a d d i n g :   4 p x   4 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " s t i t c h i n g - s u i t - c a r d   c a r d   m b - 3 " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2 " > < / i >        `           R         /   A s s i g n e d   S t i t c h i n g   S u i t s < / h 6 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u i t _ s t i t c h i n g _ p e n d i n g "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >      `                 /   P e n d i n g 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " b o r d e r - r a d i u s : 8 p x ;   b a c k g r o u n d : # e 6 f 7 e d ;   b o r d e r - l e f t : 4 p x   s o l i d   # 2 8 a 7 4 5 ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ a s s i g n e d _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - i n b o x   t e x t - m u t e d " > < / i > 
 
                                          !          `           R        !  `  /   N o   a s s i g n e d   s t i t c h i n g   s u i t s 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " >        # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " >      `    # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 2 0 % ; " >        !   < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " >        `  < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 2 0 % ; " >    `    < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 2 0 % ; " >    &     /   A c t i o n < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ a s s i g n e d _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s u i t " > # < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s i z e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s t i t c h e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s u i t _ s t i t c h i n g _ c o m p l e t e "   c l a s s = " d - i n l i n e " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > " > 
 
                                                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s u c c e s s - s m "   o n c l i c k = " r e t u r n   c o n f i r m ( '  !         !                 !  `  x  /   A r e   y o u   s u r e ? ' ) " > 
 
                                                                                         < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >    &    &     /   C o m p l e t e 
 
                                                                                 < / b u t t o n > 
 
                                                                         < / f o r m > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . s t i t c h i n g - s u i t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   ' N o t o   S a n s   A r a b i c ' ,   ' A r i a l   U n i c o d e   M S ' ,   s a n s - s e r i f ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 a 3 a 6 e   0 % ,   # 2 5 6 3 e b   1 0 0 % ) ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 8 p x ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 c o l o r :   # f f f ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 4 p x   1 6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   1 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 0 4 ) ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # b f d b f e ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # e f f 6 f f ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . s t i t c h i n g - s u i t - c a r d   . t a b l e   t b o d y   t r : h o v e r   t d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . b a d g e - s u i t   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . b a d g e - s i z e   { 
 
                 b a c k g r o u n d :   # d 1 f a e 5 ; 
 
                 c o l o r :   # 0 6 5 f 4 6 ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - t y p e   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 4 0 a f ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s t a t u s . c u t t i n g _ d o n e   { 
 
                 b a c k g r o u n d :   # f e f 3 c 7 ; 
 
                 c o l o r :   # 9 2 4 0 0 e ; 
 
         } 
 
         . b t n - b l u e - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 5 6 3 e b   0 % ,   # 3 b 8 2 f 6   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   1 2 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 3 ) ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - b l u e - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 6 ) ,   0   4 p x   1 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 4 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # 2 5 6 3 e b ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 2 5 6 3 e b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   3 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b o x - s h a d o w :   0   0   8 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 4 ; 
 
         } 
 
         . b t n - b l u e - o u t l i n e - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 2 5 6 3 e b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   0   2 5 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 5 ) ; 
 
         } 
 
         . f o r m - s e l e c t - s m - c u s t o m   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 p a d d i n g :   3 p x   8 p x ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # d 1 d 5 d b ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 h e i g h t :   3 4 p x ; 
 
                 m i n - w i d t h :   1 4 0 p x ; 
 
         } 
 
         . f o r m - s e l e c t - s m - c u s t o m : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 2 5 6 3 e b ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 3 7 ,   9 9 ,   2 3 5 ,   0 . 1 5 ) ; 
 
         } 
 
         . s u m m a r y - b a r   { 
 
                 d i s p l a y :   f l e x ; 
 
                 f l e x - w r a p :   w r a p ; 
 
                 g a p :   8 p x ; 
 
                 p a d d i n g :   6 p x   0 ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
         } 
 
         . s u m m a r y - b a r   . s t a t   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 5 e 7 e b ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   4 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 b 5 5 6 3 ; 
 
         } 
 
         . s u m m a r y - b a r   . s t a t   . n u m   { 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 e 3 a 8 a ; 
 
         } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 6 b 7 2 8 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # 9 c a 3 a f ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
                 o p a c i t y :   0 . 7 ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s t i t c h i n g - s u i t - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . s t i t c h i n g - s u i t - c a r d   . t a b l e   t h ,   . s t i t c h i n g - s u i t - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . f o r m - s e l e c t - s m - c u s t o m   {   m i n - w i d t h :   1 0 0 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " s t i t c h i n g - s u i t - c a r d   c a r d   m b - 3 " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2 " > < / i > P e n d i n g   S t i t c h i n g   S u i t s < / h 6 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 1 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n - b l u e - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - l i s t   m e - 1 " > < / i >   A s s i g n e d 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ r e p o r t "   c l a s s = " b t n - b l u e - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " b o r d e r - r a d i u s : 6 p x ;   b a c k g r o u n d : # e 6 f 7 e d ;   b o r d e r - l e f t : 4 p x   s o l i d   # 2 8 a 7 4 5 ;   f o n t - s i z e : 1 2 p x ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   S U M M A R Y   B A R   = = = = =   - - > 
 
                 < ? p h p   i f   ( ! e m p t y ( $ p e n d i n g _ s u i t s ) ) :   ? > 
 
                         < ? p h p   
 
                                 $ t o t a l _ s u i t s   =   c o u n t ( $ p e n d i n g _ s u i t s ) ; 
 
                                 $ t y p e s   =   [ ] ; 
 
                                 $ s i z e s   =   [ ] ; 
 
                                 f o r e a c h   ( $ p e n d i n g _ s u i t s   a s   $ s )   { 
 
                                         $ t y p e s [ $ s [ ' s u i t _ t y p e ' ] ]   =   ( $ t y p e s [ $ s [ ' s u i t _ t y p e ' ] ]   ? ?   0 )   +   1 ; 
 
                                         $ s i z e s [ $ s [ ' s i z e ' ] ]   =   ( $ s i z e s [ $ s [ ' s i z e ' ] ]   ? ?   0 )   +   1 ; 
 
                                 } 
 
                         ? > 
 
                         < d i v   c l a s s = " s u m m a r y - b a r " > 
 
                                 < s p a n   c l a s s = " s t a t " > T o t a l   S u i t s :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ t o t a l _ s u i t s ;   ? > < / s p a n > < / s p a n > 
 
                                 < ? p h p   f o r e a c h   ( $ t y p e s   a s   $ t y p e   = >   $ c o u n t ) :   ? > 
 
                                         < s p a n   c l a s s = " s t a t " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t y p e ) ;   ? > :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ c o u n t ;   ? > < / s p a n > < / s p a n > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < ? p h p   f o r e a c h   ( $ s i z e s   a s   $ s i z e   = >   $ c o u n t ) :   ? > 
 
                                         < s p a n   c l a s s = " s t a t " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s i z e ) ;   ? > :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   $ c o u n t ;   ? > < / s p a n > < / s p a n > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ p e n d i n g _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   t e x t - s u c c e s s " > < / i > 
 
                                 N o   s u i t s   p e n d i n g   f o r   s t i t c h i n g   ( a l l   c u t t i n g   c o m p l e t e d   s u i t s   a r e   a s s i g n e d   o r   n o t   a v a i l a b l e ) 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S t a t u s < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 2 4 % ; " > A s s i g n   T a i l o r < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ p e n d i n g _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s u i t " > # < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - t y p e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e - s i z e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e - s t a t u s   c u t t i n g _ d o n e " > C u t t i n g   D o n e < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n "   c l a s s = " d - f l e x   g a p - 1   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > " > 
 
                                                                                 < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t - s m - c u s t o m "   r e q u i r e d > 
 
                                                                                         < o p t i o n   v a l u e = " " > S e l e c t   T a i l o r < / o p t i o n > 
 
                                                                                         < ? p h p   f o r e a c h   ( $ s t i t c h i n g _ e m p l o y e e s   a s   $ e m p ) :   ? > 
 
                                                                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ e m p [ ' i d ' ] ;   ? > " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ] ) ;   ? > < / o p t i o n > 
 
                                                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                                                 < / s e l e c t > 
 
                                                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - b l u e - s m " > 
 
                                                                                         < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 1 " > < / i >   A s s i g n 
 
                                                                                 < / b u t t o n > 
 
                                                                         < / f o r m > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . s t i t c h i n g - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   6 p x   1 2 p x ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . s u i t - b a d g e   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   1 p x   6 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 e 4 0 a f ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . b t n - s u c c e s s - s m   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 8 a 7 4 5   0 % ,   # 2 0 c 9 9 7   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - s u c c e s s - s m : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - i n f o - s m   { 
 
                 b a c k g r o u n d :   # 1 7 a 2 b 8 ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - i n f o - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 1 3 8 4 9 6 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 2 3 ,   1 6 2 ,   1 8 4 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - d a n g e r - s m   { 
 
                 b a c k g r o u n d :   # d c 3 5 4 5 ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - d a n g e r - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # c 8 2 3 3 3 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 2 2 0 ,   5 3 ,   6 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   2 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   3 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
         } 
 
         . f i l t e r - f o r m   { 
 
                 d i s p l a y :   f l e x ; 
 
                 g a p :   6 p x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 f l e x - w r a p :   w r a p ; 
 
         } 
 
         . f i l t e r - f o r m   s e l e c t ,   . f i l t e r - f o r m   . b t n   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 p a d d i n g :   2 p x   8 p x ; 
 
                 h e i g h t :   2 8 p x ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   2 p x   1 2 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 h e i g h t :   2 8 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s t i t c h i n g - c a r d   . t a b l e   {   f o n t - s i z e :   9 p x ;   } 
 
                 . s t i t c h i n g - c a r d   . t a b l e   t h ,   . s t i t c h i n g - c a r d   . t a b l e   t d   {   p a d d i n g :   2 p x   2 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . b t n - s u c c e s s - s m ,   . b t n - i n f o - s m ,   . b t n - d a n g e r - s m   {   f o n t - s i z e :   8 p x ;   p a d d i n g :   0   6 p x ;   h e i g h t :   2 0 p x ;   } 
 
                 . s u i t - b a d g e   {   f o n t - s i z e :   7 p x ;   p a d d i n g :   0   4 p x ;   } 
 
                 . f i l t e r - f o r m   s e l e c t   {   f o n t - s i z e :   8 p x ;   p a d d i n g :   1 p x   4 p x ;   h e i g h t :   2 2 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " s t i t c h i n g - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - p r i m a r y " > < / i > A s s i g n e d   S t i t c h i n g   S u i t s < / h 6 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 1 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ p e n d i n g "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - c l o c k   m e - 1 " > < / i >   P e n d i n g 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ r e p o r t "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " f o n t - s i z e : 1 1 p x ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - f o r m   m b - 2 " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " s t i t c h i n g _ a s s i g n e d " > 
 
                         < s e l e c t   n a m e = " e m p l o y e e _ i d " > 
 
                                 < o p t i o n   v a l u e = " " > - -   A l l   T a i l o r s   - - < / o p t i o n > 
 
                                 < ? p h p   f o r e a c h   ( $ t a i l o r s   a s   $ e m p ) :   ? > 
 
                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   ( i n t ) ( $ e m p [ ' i d ' ]   ? ?   0 ) ;   ? > "   < ? p h p   e c h o   ( i s s e t ( $ _ G E T [ ' e m p l o y e e _ i d ' ] )   & &   $ _ G E T [ ' e m p l o y e e _ i d ' ]   = =   ( $ e m p [ ' i d ' ]   ? ?   0 ) )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > 
 
                                         < / o p t i o n > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                         < / s e l e c t > 
 
                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - f i l t e r " > F i l t e r < / b u t t o n > 
 
                         < ? p h p   i f   ( i s s e t ( $ _ G E T [ ' e m p l o y e e _ i d ' ] )   & &   $ _ G E T [ ' e m p l o y e e _ i d ' ] ) :   ? > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > C l e a r < / a > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / f o r m > 
 
 
 
                 < d i v   c l a s s = " t e x t - e n d   m b - 1 " > 
 
                         < s m a l l   c l a s s = " t e x t - m u t e d "   s t y l e = " f o n t - s i z e : 1 0 p x ; " > A s s i g n e d   S u i t s :   < s t r o n g > < ? p h p   e c h o   c o u n t ( $ a s s i g n e d _ s u i t s ) ;   ? > < / s t r o n g > < / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ a s s i g n e d _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - i n b o x   t e x t - m u t e d " > < / i > 
 
                                 N o   s u i t s   a s s i g n e d   f o r   s t i t c h i n g . 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S u i t < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > T a i l o r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 2 5 % ; " > A c t i o n s < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ a s s i g n e d _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " s u i t - b a d g e " > # < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' s u i t _ n u m b e r ' ]   ? ?   0 ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' t a i l o r _ n a m e ' ]   ? ?   ' U n a s s i g n e d ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m ' ,   s t r t o t i m e ( $ s u i t [ ' s t i t c h i n g _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < d i v   c l a s s = " d - f l e x   g a p - 1   j u s t i f y - c o n t e n t - c e n t e r " > 
 
                                                                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - s u c c e s s - s m   c o m p l e t e - b t n "   
 
                                                                                                 d a t a - s t i t c h i n g - i d = " < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' i d ' ]   ? ?   0 ) ;   ? > " 
 
                                                                                                 d a t a - s u i t - i d = " < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' s u i t _ i d ' ]   ? ?   0 ) ;   ? > " 
 
                                                                                                 d a t a - o r d e r - i d = " < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' o r d e r _ i d ' ]   ? ?   0 ) ;   ? > " 
 
                                                                                                 d a t a - e m p l o y e e - i d = " < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' a s s i g n e d _ t o ' ]   ? ?   0 ) ;   ? > " 
 
                                                                                                 d a t a - s i z e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ]   ? ?   ' L a r g e ' ) ;   ? > " 
 
                                                                                                 d a t a - b s - t o g g l e = " m o d a l "   d a t a - b s - t a r g e t = " # c o m p l e t e M o d a l " > 
 
                                                                                         < i   c l a s s = " f a s   f a - c h e c k " > < / i >   C o m p l e t e 
 
                                                                                 < / b u t t o n > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ s l i p & i d = < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' o r d e r _ i d ' ]   ? ?   0 ) ;   ? > & s u i t _ i d = < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' s u i t _ i d ' ]   ? ?   0 ) ;   ? > "   
 
                                                                                       t a r g e t = " _ b l a n k "   c l a s s = " b t n - i n f o - s m "   t i t l e = " S l i p " > 
 
                                                                                         < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ d e l e t e & i d = < ? p h p   e c h o   ( i n t ) ( $ s u i t [ ' i d ' ]   ? ?   0 ) ;   ? > "   
 
                                                                                       c l a s s = " b t n - d a n g e r - s m "   o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   r e c o r d ? ' ) ; "   t i t l e = " D e l e t e " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   C O M P L E T E   M O D A L   = = = = =   - - > 
 
 < d i v   c l a s s = " m o d a l   f a d e "   i d = " c o m p l e t e M o d a l "   t a b i n d e x = " - 1 " > 
 
         < d i v   c l a s s = " m o d a l - d i a l o g   m o d a l - d i a l o g - c e n t e r e d " > 
 
                 < d i v   c l a s s = " m o d a l - c o n t e n t " > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ c o m p l e t e " > 
 
                                 < d i v   c l a s s = " m o d a l - h e a d e r   b g - s u c c e s s   t e x t - w h i t e " > 
 
                                         < h 6   c l a s s = " m o d a l - t i t l e   f w - b o l d " > < i   c l a s s = " f a s   f a - c h e c k   m e - 2 " > < / i > C o m p l e t e   S t i t c h i n g < / h 6 > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " m o d a l " > < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - b o d y " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " s t i t c h i n g _ i d "   i d = " m o d a l S t i t c h i n g I d " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   i d = " m o d a l S u i t I d " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   i d = " m o d a l O r d e r I d " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " e m p l o y e e _ i d "   i d = " m o d a l E m p l o y e e I d " > 
 
                                         < i n p u t   t y p e = " h i d d e n "   n a m e = " s i z e "   i d = " m o d a l S i z e " > 
 
                                         
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d " > A s s i g n   S h e l f   ( O p t i o n a l ) < / l a b e l > 
 
                                                 < s e l e c t   n a m e = " s h e l f _ i d "   c l a s s = " f o r m - s e l e c t   f o r m - s e l e c t - s m " > 
 
                                                         < o p t i o n   v a l u e = " " > - -   N o   S h e l f   - - < / o p t i o n > 
 
                                                         < ? p h p   f o r e a c h   ( $ a v a i l a b l e _ s h e l v e s   a s   $ s h e l f ) :   ? > 
 
                                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   ( i n t ) ( $ s h e l f [ ' i d ' ]   ? ?   0 ) ;   ? > " > 
 
                                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( ( $ s h e l f [ ' s h e l f _ n a m e ' ]   ? ?   ' ' )   .   '   -   '   .   ( $ s h e l f [ ' s h e l f _ n u m b e r ' ]   ? ?   ' ' ) ) ;   ? > 
 
                                                                         < ? p h p   i f   ( ! e m p t y ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) ) :   ? > 
 
                                                                                 ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) ;   ? > ) 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / o p t i o n > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < / s e l e c t > 
 
                                                 < s m a l l   c l a s s = " t e x t - m u t e d " > S e l e c t   a   s h e l f   t o   s t o r e   t h e   c o m p l e t e d   o r d e r . < / s m a l l > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " m o d a l - f o o t e r " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l "   d a t a - b s - d i s m i s s = " m o d a l " > C a n c e l < / b u t t o n > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   b t n - s m   r o u n d e d - p i l l " > 
 
                                                 < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   C o m p l e t e 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / f o r m > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         d o c u m e n t . q u e r y S e l e c t o r A l l ( ' . c o m p l e t e - b t n ' ) . f o r E a c h ( b t n   = >   { 
 
                 b t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' m o d a l S t i t c h i n g I d ' ) . v a l u e   =   t h i s . d a t a s e t . s t i t c h i n g I d ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' m o d a l S u i t I d ' ) . v a l u e   =   t h i s . d a t a s e t . s u i t I d ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' m o d a l O r d e r I d ' ) . v a l u e   =   t h i s . d a t a s e t . o r d e r I d ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' m o d a l E m p l o y e e I d ' ) . v a l u e   =   t h i s . d a t a s e t . e m p l o y e e I d ; 
 
                         d o c u m e n t . g e t E l e m e n t B y I d ( ' m o d a l S i z e ' ) . v a l u e   =   t h i s . d a t a s e t . s i z e ; 
 
                 } ) ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - s u c c e s s   t e x t - w h i t e " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 2 " > < / i > C o m p l e t e   S t i t c h i n g   &   A s s i g n   S h e l f < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - i n f o   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1 "   r o l e = " a l e r t " > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ c o m p l e t e " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " s t i t c h i n g _ i d "   v a l u e = " < ? p h p   e c h o   $ s t i t c h i n g _ i d ;   ? > " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   v a l u e = " < ? p h p   e c h o   $ o r d e r _ i d ;   ? > " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " e m p l o y e e _ i d "   v a l u e = " < ? p h p   e c h o   $ e m p l o y e e _ i d ;   ? > " > 
 
 
 
                         < ! - -   = = = = =   O R D E R   S U M M A R Y   = = = = =   - - > 
 
                         < d i v   c l a s s = " r o w   g - 3   m b - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " b g - l i g h t   p - 3   r o u n d e d   b o r d e r " > 
 
                                                 < h 6   c l a s s = " f w - b o l d   m b - 2 " > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g   m e - 2   t e x t - p r i m a r y " > < / i > O r d e r   D e t a i l s < / h 6 > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > O r d e r   # : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > C u s t o m e r : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > T o t a l   S u i t s : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   ( i n t ) ( $ o r d e r [ ' t o t a l _ s u i t s ' ]   ? ?   0 ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > T o t a l   A m o u n t : < / s p a n >   
 
                                                         < s t r o n g > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ,   0 ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < d i v   c l a s s = " b g - l i g h t   p - 3   r o u n d e d   b o r d e r " > 
 
                                                 < h 6   c l a s s = " f w - b o l d   m b - 2 " > < i   c l a s s = " f a s   f a - u s e r - t i e   m e - 2   t e x t - p r i m a r y " > < / i > S t i t c h e r < / h 6 > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > N a m e : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > C o d e : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' e m p _ c o d e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                                 < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   p y - 1 " > 
 
                                                         < s p a n   c l a s s = " t e x t - m u t e d " > C a t e g o r y : < / s p a n >   
 
                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e [ ' c a t e g o r y _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S H E L F   S E L E C T I O N   (  &                 )   = = = = =   - - > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > 
 
                                         < i   c l a s s = " f a s   f a - w a r e h o u s e   m e - 1   t e x t - p r i m a r y " > < / i > A s s i g n   S h e l f   
 
                                         < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > 
 
                                 < / l a b e l > 
 
                                 < s e l e c t   n a m e = " s h e l f _ i d "   c l a s s = " f o r m - s e l e c t "   r e q u i r e d > 
 
                                         < o p t i o n   v a l u e = " " > - -   S e l e c t   a   s h e l f   - - < / o p t i o n > 
 
                                         < ? p h p   i f   ( e m p t y ( $ a v a i l a b l e _ s h e l v e s ) ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " "   d i s a b l e d >  a      N o   a v a i l a b l e   s h e l v e s .   P l e a s e   a d d   a   s h e l f   f i r s t . < / o p t i o n > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ a v a i l a b l e _ s h e l v e s   a s   $ s h e l f ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ s h e l f [ ' i d ' ] ;   ? > " > 
 
                                                                 < ? p h p   
 
                                                                         $ s h e l f _ d i s p l a y   =   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n a m e ' ]   ? ?   ' ' )   .   '   -   '   .   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n u m b e r ' ]   ? ?   ' ' ) ; 
 
                                                                         i f   ( ! e m p t y ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) )   { 
 
                                                                                 $ s h e l f _ d i s p l a y   . =   '   ( '   .   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] )   .   ' ) ' ; 
 
                                                                         } 
 
                                                                         / /                           &  R    c a p a c i t y        &          R               R     &            
 
                                                                         i f   ( i s s e t ( $ s h e l f [ ' c a p a c i t y ' ] )   & &   $ s h e l f [ ' c a p a c i t y ' ]   >   0 )   { 
 
                                                                                 $ s h e l f _ d i s p l a y   . =   '   -   C a p a c i t y :   '   .   ( i n t ) $ s h e l f [ ' c a p a c i t y ' ] ; 
 
                                                                         } 
 
                                                                         e c h o   $ s h e l f _ d i s p l a y ; 
 
                                                                 ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / s e l e c t > 
 
                                 < s m a l l   c l a s s = " t e x t - m u t e d " > 
 
                                         < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 1 " > < / i > 
 
                                         S e l e c t   a   s h e l f   t o   s t o r e   t h e   c o m p l e t e d   o r d e r .   I f   n o   s h e l f   i s   s e l e c t e d ,   o r d e r   w i l l   b e   m a r k e d   r e a d y   w i t h o u t   s h e l f . 
 
                                 < / s m a l l > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   N O T E S   = = = = =   - - > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > N o t e s   ( O p t i o n a l ) < / l a b e l > 
 
                                 < t e x t a r e a   n a m e = " n o t e s "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 2 "   p l a c e h o l d e r = " A n y   r e m a r k s   a b o u t   t h i s   c o m p l e t i o n . . . " > < / t e x t a r e a > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
                         < d i v   c l a s s = " d - f l e x   g a p - 2 " > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - s u c c e s s   r o u n d e d - p i l l   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - c h e c k   m e - 1 " > < / i >   C o m p l e t e   &   A s s i g n   S h e l f 
 
                                 < / b u t t o n > 
 
                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k   t o   A s s i g n e d 
 
                                 < / a > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . s t i t c h i n g - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   8 p x   1 4 p x ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . b a d g e - s t a t u s   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   3 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s t a t u s . c o m p l e t e d   {   b a c k g r o u n d :   # d 1 f a e 5 ;   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . b a d g e - s t a t u s . i n _ p r o g r e s s   {   b a c k g r o u n d :   # d b e a f e ;   c o l o r :   # 1 e 4 0 a f ;   } 
 
         . f i l t e r - f o r m   . f o r m - c o n t r o l ,   . f i l t e r - f o r m   . f o r m - s e l e c t   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - r e s e t   { 
 
                 b a c k g r o u n d :   # 6 c 7 5 7 d ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - r e s e t : h o v e r   { 
 
                 b a c k g r o u n d :   # 5 a 6 2 6 8 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s t i t c h i n g - c a r d   . t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . s t i t c h i n g - c a r d   . t a b l e   t h ,   . s t i t c h i n g - c a r d   . t a b l e   t d   {   p a d d i n g :   3 p x   4 p x ;   } 
 
                 . f i l t e r - f o r m   . r o w   {   g a p :   4 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " s t i t c h i n g - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - p r i m a r y " > < / i > A l l   S t i t c h i n g   R e c o r d s < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ p e n d i n g "   c l a s s = " b t n   b t n - w a r n i n g   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - c l o c k   m e - 1 " > < / i >   P e n d i n g 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - i n f o   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - l i s t   m e - 1 " > < / i >   A s s i g n e d 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ r e p o r t "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   F O R M   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - f o r m " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " s t i t c h i n g " > 
 
                         < d i v   c l a s s = " r o w   g - 2   a l i g n - i t e m s - e n d " > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   - - < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " i n _ p r o g r e s s "   < ? p h p   e c h o   ( $ s t a t u s   = =   ' i n _ p r o g r e s s ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > I n   P r o g r e s s < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " c o m p l e t e d "   < ? p h p   e c h o   ( $ s t a t u s   = =   ' c o m p l e t e d ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > C o m p l e t e d < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > T a i l o r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " t a i l o r _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   - - < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ t a i l o r s   a s   $ t ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   ( i n t ) $ t [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ t a i l o r _ i d   = =   $ t [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > F r o m   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ f r o m _ d a t e   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > T o   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t o _ d a t e   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - f i l t e r   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   F i l t e r 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g "   c l a s s = " b t n - r e s e t   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - u n d o   m e - 1 " > < / i >   R e s e t 
 
                                         < / a > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < d i v   c l a s s = " t e x t - e n d   m t - 2   m b - 2 " > 
 
                         < s m a l l   c l a s s = " t e x t - m u t e d " > T o t a l   R e c o r d s :   < s t r o n g > < ? p h p   e c h o   c o u n t ( $ s t i t c h i n g _ r e c o r d s ) ;   ? > < / s t r o n g > < / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ s t i t c h i n g _ r e c o r d s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - i n b o x " > < / i > 
 
                                 < p > N o   s t i t c h i n g   r e c o r d s   f o u n d . < / p > 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S u i t < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > T a i l o r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S t a t u s < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > A c t i o n s < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   f o r e a c h   ( $ s t i t c h i n g _ r e c o r d s   a s   $ r e c o r d ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > # < ? p h p   e c h o   ( i n t ) ( $ r e c o r d [ ' s u i t _ n u m b e r ' ]   ? ?   0 ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' s u i t _ t y p e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' s i z e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r e c o r d [ ' t a i l o r _ n a m e ' ]   ? ?   ' U n a s s i g n e d ' ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r e c o r d [ ' s t i t c h i n g _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e - s t a t u s   < ? p h p   e c h o   ( $ r e c o r d [ ' s t a t u s ' ]   ? ?   ' c o m p l e t e d ' ) ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( s t r _ r e p l a c e ( ' _ ' ,   '   ' ,   $ r e c o r d [ ' s t a t u s ' ]   ? ?   ' c o m p l e t e d ' ) ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ s l i p & i d = < ? p h p   e c h o   ( i n t ) ( $ r e c o r d [ ' o r d e r _ i d ' ]   ? ?   0 ) ;   ? > & s u i t _ i d = < ? p h p   e c h o   ( i n t ) ( $ r e c o r d [ ' s u i t _ i d ' ]   ? ?   0 ) ;   ? > "   
 
                                                                                       t a r g e t = " _ b l a n k "   c l a s s = " b t n   b t n - o u t l i n e - s e c o n d a r y "   t i t l e = " S l i p " > 
 
                                                                                         < i   c l a s s = " f a s   f a - p r i n t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ d e l e t e & i d = < ? p h p   e c h o   ( i n t ) ( $ r e c o r d [ ' i d ' ]   ? ?   0 ) ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   r e c o r d ? ' ) ; "   t i t l e = " D e l e t e " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . s t i t c h i n g - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 5 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   6 p x   1 2 p x ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - h e a d e r   h 6   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t h   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   3 p x   4 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . s t i t c h i n g - c a r d   . t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . s u i t - b a d g e   { 
 
                 f o n t - s i z e :   9 p x ; 
 
                 p a d d i n g :   1 p x   6 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 b a c k g r o u n d :   # f e f 3 c 7 ; 
 
                 c o l o r :   # 9 2 4 0 0 e ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . b t n - t e a l - s m   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   1 p x   8 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - t e a l - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   8 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - t e a l - o u t l i n e - s m   { 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
                 c o l o r :   # 4 f 8 a 8 b ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   1 p x   1 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
                 h e i g h t :   2 4 p x ; 
 
                 l i n e - h e i g h t :   1 . 6 ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . b t n - t e a l - o u t l i n e - s m : h o v e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 2 ) ; 
 
         } 
 
         . a s s i g n - f o r m   { 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   3 p x ; 
 
                 j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 f l e x - w r a p :   n o w r a p ; 
 
         } 
 
         . a s s i g n - f o r m   s e l e c t   { 
 
                 w i d t h :   9 0 p x   ! i m p o r t a n t ; 
 
                 f l e x - s h r i n k :   0 ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 p a d d i n g :   1 p x   4 p x ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 h e i g h t :   2 4 p x ; 
 
         } 
 
         . a s s i g n - f o r m   b u t t o n   { 
 
                 f l e x - s h r i n k :   0 ; 
 
         } 
 
         . e m p t y - s t a t e   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   2 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
         } 
 
         . e m p t y - s t a t e   i   { 
 
                 f o n t - s i z e :   3 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   8 p x ; 
 
         } 
 
         / *   = = = = =   S E A R C H   B A R   = = = = =   * / 
 
         . s e a r c h - b o x   { 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   4 p x   1 4 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 m a x - w i d t h :   2 8 0 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 h e i g h t :   3 2 p x ; 
 
         } 
 
         . s e a r c h - b o x : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 4 f 8 a 8 b ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 1 5 ) ; 
 
         } 
 
         . s e a r c h - w r a p p e r   { 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   8 p x ; 
 
                 f l e x - w r a p :   w r a p ; 
 
         } 
 
         . s e a r c h - w r a p p e r   . s e a r c h - i c o n   { 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
         } 
 
         . s e a r c h - w r a p p e r   . c l e a r - b t n   { 
 
                 b a c k g r o u n d :   n o n e ; 
 
                 b o r d e r :   n o n e ; 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 p a d d i n g :   0   4 p x ; 
 
                 d i s p l a y :   n o n e ; 
 
         } 
 
         . s e a r c h - w r a p p e r   . c l e a r - b t n : h o v e r   { 
 
                 c o l o r :   # d c 3 5 4 5 ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s t i t c h i n g - c a r d   . t a b l e   {   f o n t - s i z e :   9 p x ;   } 
 
                 . s t i t c h i n g - c a r d   . t a b l e   t h ,   . s t i t c h i n g - c a r d   . t a b l e   t d   {   p a d d i n g :   2 p x   2 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . a s s i g n - f o r m   s e l e c t   {   w i d t h :   6 0 p x   ! i m p o r t a n t ;   f o n t - s i z e :   8 p x ;   } 
 
                 . b t n - t e a l - s m   {   f o n t - s i z e :   8 p x ;   p a d d i n g :   0   4 p x ;   h e i g h t :   2 0 p x ;   } 
 
                 . s u i t - b a d g e   {   f o n t - s i z e :   7 p x ;   p a d d i n g :   0   4 p x ;   } 
 
                 . s e a r c h - b o x   {   m a x - w i d t h :   1 0 0 % ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " s t i t c h i n g - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 6   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2   t e x t - w a r n i n g " > < / i > P e n d i n g   S t i t c h i n g   S u i t s < / h 6 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 1 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - l i s t   m e - 1 " > < / i >   A s s i g n e d 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ r e p o r t "   c l a s s = " b t n - t e a l - o u t l i n e - s m " > 
 
                                 < i   c l a s s = " f a s   f a - f i l e - a l t   m e - 1 " > < / i >   R e p o r t 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t "   s t y l e = " f o n t - s i z e : 1 1 p x ; " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   S E A R C H   B A R   = = = = =   - - > 
 
                 < d i v   c l a s s = " s e a r c h - w r a p p e r   m b - 2 " > 
 
                         < i   c l a s s = " f a s   f a - s e a r c h   s e a r c h - i c o n " > < / i > 
 
                         < i n p u t   t y p e = " t e x t "   i d = " s e a r c h I n p u t "   c l a s s = " s e a r c h - b o x "   p l a c e h o l d e r = " S e a r c h   b y   C u s t o m e r . . . " > 
 
                         < b u t t o n   c l a s s = " c l e a r - b t n "   i d = " c l e a r S e a r c h "   t i t l e = " C l e a r   s e a r c h " >  S" < / b u t t o n > 
 
                         < s p a n   c l a s s = " t e x t - m u t e d "   s t y l e = " f o n t - s i z e : 1 1 p x ; "   i d = " r e s u l t C o u n t " > 
 
                                 T o t a l :   < s t r o n g > < ? p h p   e c h o   c o u n t ( $ p e n d i n g _ s u i t s ) ;   ? > < / s t r o n g > 
 
                         < / s p a n > 
 
                 < / d i v > 
 
 
 
                 < ? p h p   i f   ( e m p t y ( $ p e n d i n g _ s u i t s ) ) :   ? > 
 
                         < d i v   c l a s s = " e m p t y - s t a t e " > 
 
                                 < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   t e x t - s u c c e s s " > < / i > 
 
                                 N o   p e n d i n g   s u i t s   f o r   s t i t c h i n g . 
 
                                 < b r > < s m a l l   s t y l e = " f o n t - s i z e : 1 1 p x ;   c o l o r : # 6 c 7 5 7 d ; " > A l l   c u t t i n g   c o m p l e t e d   s u i t s   a r e   r e a d y   f o r   s t i t c h i n g   a s s i g n m e n t . < / s m a l l > 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e "   i d = " p e n d i n g T a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 5 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S u i t < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 8 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 3 1 % ; " > A s s i g n   T a i l o r < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y   i d = " t a b l e B o d y " > 
 
                                                 < ? p h p   f o r e a c h   ( $ p e n d i n g _ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                         < t r   c l a s s = " s e a r c h - r o w "   
 
                                                                 d a t a - c u s t o m e r = " < ? p h p   e c h o   s t r t o l o w e r ( h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' ' ) ) ;   ? > " > 
 
                                                                 < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' o r d e r _ n o ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " s u i t - b a d g e " > # < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   d a t e ( ' d - m ' ,   s t r t o t i m e ( $ s u i t [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n "   c l a s s = " a s s i g n - f o r m " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " s u i t _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' i d ' ] ;   ? > " > 
 
                                                                                 < i n p u t   t y p e = " h i d d e n "   n a m e = " o r d e r _ i d "   v a l u e = " < ? p h p   e c h o   $ s u i t [ ' o r d e r _ i d ' ] ;   ? > " > 
 
                                                                                 < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t - s m "   r e q u i r e d > 
 
                                                                                         < o p t i o n   v a l u e = " " > S e l e c t < / o p t i o n > 
 
                                                                                         < ? p h p   f o r e a c h   ( $ t a i l o r s   a s   $ e m p ) :   ? > 
 
                                                                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ e m p [ ' i d ' ] ;   ? > " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ] ) ;   ? > < / o p t i o n > 
 
                                                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                                                 < / s e l e c t > 
 
                                                                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - t e a l - s m " > 
 
                                                                                         < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 1 " > < / i >   A s s i g n 
 
                                                                                 < / b u t t o n > 
 
                                                                         < / f o r m > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < ! - -   = = = = =   S E A R C H   S C R I P T   = = = = =   - - > 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h I n p u t ' ) ; 
 
         c o n s t   c l e a r B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' c l e a r S e a r c h ' ) ; 
 
         c o n s t   r o w s   =   d o c u m e n t . q u e r y S e l e c t o r A l l ( ' # t a b l e B o d y   . s e a r c h - r o w ' ) ; 
 
         c o n s t   r e s u l t C o u n t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' r e s u l t C o u n t ' ) ; 
 
 
 
         f u n c t i o n   f i l t e r T a b l e ( )   { 
 
                 c o n s t   t e r m   =   s e a r c h I n p u t . v a l u e . t o L o w e r C a s e ( ) . t r i m ( ) ; 
 
                 l e t   v i s i b l e   =   0 ; 
 
 
 
                 r o w s . f o r E a c h ( r o w   = >   { 
 
                         c o n s t   c u s t o m e r   =   r o w . d a t a s e t . c u s t o m e r   | |   ' ' ; 
 
                         c o n s t   m a t c h   =   c u s t o m e r . i n c l u d e s ( t e r m ) ; 
 
                         r o w . s t y l e . d i s p l a y   =   m a t c h   ?   ' '   :   ' n o n e ' ; 
 
                         i f   ( m a t c h )   v i s i b l e + + ; 
 
                 } ) ; 
 
 
 
                 r e s u l t C o u n t . i n n e r H T M L   =   ' S h o w i n g :   < s t r o n g > '   +   v i s i b l e   +   ' < / s t r o n g >   /   < s t r o n g > '   +   r o w s . l e n g t h   +   ' < / s t r o n g > ' ; 
 
                 c l e a r B t n . s t y l e . d i s p l a y   =   t e r m . l e n g t h   >   0   ?   ' i n l i n e - b l o c k '   :   ' n o n e ' ; 
 
         } 
 
 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f i l t e r T a b l e ) ; 
 
 
 
         c l e a r B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 s e a r c h I n p u t . v a l u e   =   ' ' ; 
 
                 f i l t e r T a b l e ( ) ; 
 
                 s e a r c h I n p u t . f o c u s ( ) ; 
 
         } ) ; 
 
 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( e . k e y   = = =   ' E s c a p e ' )   { 
 
                         t h i s . v a l u e   =   ' ' ; 
 
                         f i l t e r T a b l e ( ) ; 
 
                         t h i s . b l u r ( ) ; 
 
                 } 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < s t y l e > 
 
         . r e p o r t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 c 5 f 6 e   0 % ,   # 4 f 8 a 8 b   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 0 p x   1 6 p x ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - s i z e :   1 5 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . r e p o r t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f i l t e r - f o r m   . f o r m - c o n t r o l ,   . f i l t e r - f o r m   . f o r m - s e l e c t   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 p a d d i n g :   4 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r   { 
 
                 b a c k g r o u n d :   # 4 f 8 a 8 b ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - f i l t e r : h o v e r   { 
 
                 b a c k g r o u n d :   # 3 a 6 e 6 f ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - p r i n t   { 
 
                 b a c k g r o u n d :   # 6 c 7 5 7 d ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . f i l t e r - f o r m   . b t n - p r i n t : h o v e r   { 
 
                 b a c k g r o u n d :   # 5 a 6 2 6 8 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s u m m a r y - c a r d s   { 
 
                 d i s p l a y :   g r i d ; 
 
                 g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 4 ,   1 f r ) ; 
 
                 g a p :   1 0 p x ; 
 
                 m a r g i n - t o p :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   1 6 p x ; 
 
         } 
 
         . s u m m a r y - c a r d   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 b o r d e r - r a d i u s :   1 0 p x ; 
 
                 p a d d i n g :   1 2 p x   1 4 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . s u m m a r y - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 8 ) ; 
 
         } 
 
         . s u m m a r y - c a r d   . n u m b e r   { 
 
                 f o n t - s i z e :   2 2 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 2 c 5 f 6 e ; 
 
         } 
 
         . s u m m a r y - c a r d   . l a b e l   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 m a r g i n - t o p :   2 p x ; 
 
         } 
 
         . s u m m a r y - c a r d   . n u m b e r . b l u e   {   c o l o r :   # 0 d 6 e f d ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . g r e e n   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . o r a n g e   {   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . s u m m a r y - c a r d   . n u m b e r . g o l d   {   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . d e t a i l - t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
                 w i d t h :   1 0 0 % ; 
 
                 b o r d e r - c o l l a p s e :   c o l l a p s e ; 
 
         } 
 
         . d e t a i l - t a b l e   t h   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9 ; 
 
                 c o l o r :   # 2 d 3 7 4 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   5 p x   6 p x ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . d e t a i l - t a b l e   t d   { 
 
                 p a d d i n g :   4 p x   6 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
         } 
 
         . d e t a i l - t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f f ; 
 
         } 
 
         . d e t a i l - t a b l e   . t o t a l - r o w   { 
 
                 b a c k g r o u n d :   # f 1 f 4 f 9   ! i m p o r t a n t ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . d e t a i l - t a b l e   . t o t a l - r o w   t d   { 
 
                 b o r d e r - t o p :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                 p a d d i n g :   6 p x   8 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
         } 
 
         . b a d g e - s t a t u s   { 
 
                 f o n t - s i z e :   8 p x ; 
 
                 p a d d i n g :   2 p x   8 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . b a d g e - s t a t u s . c o m p l e t e d   {   b a c k g r o u n d :   # d 1 f a e 5 ;   c o l o r :   # 0 6 5 f 4 6 ;   } 
 
         . b a d g e - s t a t u s . i n _ p r o g r e s s   {   b a c k g r o u n d :   # d b e a f e ;   c o l o r :   # 1 e 4 0 a f ;   } 
 
         . n o - d a t a   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   3 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . n o - d a t a   i   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         . s e l e c t e d - t a i l o r - i n f o   { 
 
                 b a c k g r o u n d :   # e 8 f 5 e 9 ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 p a d d i n g :   8 p x   1 4 p x ; 
 
                 b o r d e r - l e f t :   4 p x   s o l i d   # 2 8 a 7 4 5 ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
         } 
 
         . s e l e c t e d - t a i l o r - i n f o   i   { 
 
                 c o l o r :   # 2 8 a 7 4 5 ; 
 
                 m a r g i n - r i g h t :   6 p x ; 
 
         } 
 
         @ m e d i a   p r i n t   { 
 
                 . n o - p r i n t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 . r e p o r t - c a r d   {   b o x - s h a d o w :   n o n e ;   b o r d e r :   1 p x   s o l i d   # d d d ;   } 
 
                 . f i l t e r - f o r m   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                 . d e t a i l - t a b l e   t h   {   b a c k g r o u n d :   # f 0 f 0 f 0   ! i m p o r t a n t ;   } 
 
                 . d e t a i l - t a b l e   . t o t a l - r o w   {   b a c k g r o u n d :   # f 0 f 0 f 0   ! i m p o r t a n t ;   } 
 
                 . s u m m a r y - c a r d   {   b o r d e r :   1 p x   s o l i d   # d d d ;   } 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s u m m a r y - c a r d s   {   g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 2 ,   1 f r ) ;   } 
 
                 . d e t a i l - t a b l e   {   f o n t - s i z e :   1 0 p x ;   } 
 
                 . d e t a i l - t a b l e   t h ,   . d e t a i l - t a b l e   t d   {   p a d d i n g :   2 p x   3 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " r e p o r t - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " m b - 0 " > < i   c l a s s = " f a s   f a - t s h i r t   m e - 2 " > < / i > S t i t c h i n g   R e p o r t < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s t i t c h i n g _ a s s i g n e d "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F I L T E R   F O R M   = = = = =   - - > 
 
                 < f o r m   m e t h o d = " G E T "   a c t i o n = " i n d e x . p h p "   c l a s s = " f i l t e r - f o r m " > 
 
                         < i n p u t   t y p e = " h i d d e n "   n a m e = " a c t i o n "   v a l u e = " s t i t c h i n g _ r e p o r t " > 
 
                         < d i v   c l a s s = " r o w   g - 2   a l i g n - i t e m s - e n d " > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > T a i l o r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " e m p l o y e e _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   A l l   - - < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ t a i l o r s   a s   $ e m p ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   ( i n t ) ( $ e m p [ ' i d ' ]   ? ?   0 ) ;   ? > "   < ? p h p   e c h o   ( $ e m p l o y e e _ i d   = =   ( $ e m p [ ' i d ' ]   ? ?   0 ) )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > F i l t e r < / l a b e l > 
 
                                         < s e l e c t   n a m e = " f i l t e r "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " t o d a y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' t o d a y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T o d a y < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " w e e k l y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' w e e k l y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T h i s   W e e k < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " m o n t h l y "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' m o n t h l y ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > T h i s   M o n t h < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " d a t e _ t o _ d a t e "   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > D a t e   t o   D a t e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 "   i d = " d a t e _ r a n g e "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' b l o c k '   :   ' n o n e ' ;   ? > ; " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > F r o m < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " f r o m _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 "   i d = " d a t e _ r a n g e _ t o "   s t y l e = " d i s p l a y :   < ? p h p   e c h o   ( $ f i l t e r   = =   ' d a t e _ t o _ d a t e ' )   ?   ' b l o c k '   :   ' n o n e ' ;   ? > ; " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l   s m a l l   f w - b o l d   m b - 0 " > T o < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " t o _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - f i l t e r   w - 1 0 0 " > 
 
                                                 < i   c l a s s = " f a s   f a - f i l t e r   m e - 1 " > < / i >   S h o w 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 2   c o l - 6 " > 
 
                                         < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - p r i n t   w - 1 0 0 "   o n c l i c k = " w i n d o w . p r i n t ( ) " > 
 
                                                 < i   c l a s s = " f a s   f a - p r i n t   m e - 1 " > < / i >   P r i n t 
 
                                         < / b u t t o n > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w   m t - 1 " > 
 
                                 < d i v   c l a s s = " c o l - 1 2   t e x t - e n d " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > 
 
                                                 P e r i o d :   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? >   -   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? > 
 
                                         < / s m a l l > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
 
 
                 < ? p h p   i f   ( $ e m p l o y e e _ i d   >   0   & &   $ s e l e c t e d _ t a i l o r ) :   ? > 
 
                         < ! - -   = = = = =   S E L E C T E D   T A I L O R   I N F O   = = = = =   - - > 
 
                         < d i v   c l a s s = " s e l e c t e d - t a i l o r - i n f o " > 
 
                                 < i   c l a s s = " f a s   f a - u s e r - t i e " > < / i > 
 
                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e l e c t e d _ t a i l o r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? >   
 
                                 ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e l e c t e d _ t a i l o r [ ' e m p _ c o d e ' ]   ? ?   ' N / A ' ) ;   ? > )   
 
                                 -   P e r i o d :   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ f r o m _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? >   t o   < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ t o _ d a t e   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   S U M M A R Y   C A R D S   = = = = =   - - > 
 
                         < d i v   c l a s s = " s u m m a r y - c a r d s " > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   b l u e " > < ? p h p   e c h o   ( i n t ) ( $ s u m m a r y [ ' a s s i g n e d ' ]   ? ?   0 ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > A s s i g n e d < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   g r e e n " > < ? p h p   e c h o   ( i n t ) ( $ s u m m a r y [ ' c o m p l e t e d ' ]   ? ?   0 ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > C o m p l e t e d < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   o r a n g e " > < ? p h p   e c h o   ( i n t ) ( $ s u m m a r y [ ' p e n d i n g ' ]   ? ?   0 ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > P e n d i n g < / d i v > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " s u m m a r y - c a r d " > 
 
                                         < d i v   c l a s s = " n u m b e r   g o l d " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( f l o a t ) ( $ s u m m a r y [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ) ,   0 ) ;   ? > < / d i v > 
 
                                         < d i v   c l a s s = " l a b e l " > T o t a l   A m o u n t < / d i v > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
 
 
                         < ! - -   = = = = =   D E T A I L   T A B L E   = = = = =   - - > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " d e t a i l - t a b l e " > 
 
                                         < t h e a d > 
 
                                                 < t r > 
 
                                                         < t h   s t y l e = " w i d t h : 6 % ; " > # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > D a t e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > O r d e r   # < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > C u s t o m e r < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 8 % ; " > S u i t   T y p e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > S i z e < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > S t a t u s < / t h > 
 
                                                         < t h   s t y l e = " w i d t h : 1 2 % ; " > A m o u n t < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ r e c o r d s ) ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d   c o l s p a n = " 8 " > 
 
                                                                         < d i v   c l a s s = " n o - d a t a " > 
 
                                                                                 < i   c l a s s = " f a s   f a - i n b o x " > < / i > 
 
                                                                                 < p > N o   s t i t c h i n g   r e c o r d s   f o u n d   f o r   t h i s   p e r i o d . < / p > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   $ s n   =   1 ;   ? > 
 
                                                         < ? p h p   f o r e a c h   ( $ r e c o r d s   a s   $ r o w ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < ? p h p   e c h o   $ s n + + ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ r o w [ ' t r a n s a c t i o n _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ) ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = o r d e r _ v i e w & i d = < ? p h p   e c h o   ( i n t ) ( $ r o w [ ' o r d e r _ i d ' ]   ? ?   0 ) ;   ? > "   t a r g e t = " _ b l a n k "   c l a s s = " t e x t - d e c o r a t i o n - n o n e " > 
 
                                                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ) ;   ? > 
 
                                                                                 < / a > 
 
                                                                         < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' s u i t _ t y p e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ r o w [ ' s i z e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < ? p h p   
 
                                                                                         $ s t a t u s   =   $ r o w [ ' s u i t _ s t a t u s ' ]   ? ?   ' c o m p l e t e d ' ; 
 
                                                                                         $ b a d g e _ c l a s s   =   ' c o m p l e t e d ' ; 
 
                                                                                         i f   ( $ s t a t u s   = =   ' i n _ p r o g r e s s ' )   $ b a d g e _ c l a s s   =   ' i n _ p r o g r e s s ' ; 
 
                                                                                 ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e - s t a t u s   < ? p h p   e c h o   $ b a d g e _ c l a s s ;   ? > " > 
 
                                                                                         < ? p h p   e c h o   u c f i r s t ( s t r _ r e p l a c e ( ' _ ' ,   '   ' ,   $ s t a t u s ) ) ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / t d > 
 
                                                                         < t d   c l a s s = " f w - b o l d   t e x t - s u c c e s s " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( f l o a t ) ( $ r o w [ ' a m o u n t ' ]   ? ?   0 ) ,   0 ) ;   ? > < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                         < ! - -   = = = = =   S U B   T O T A L   R O W   = = = = =   - - > 
 
                                                         < t r   c l a s s = " t o t a l - r o w " > 
 
                                                                 < t d   c o l s p a n = " 7 "   c l a s s = " t e x t - e n d " > S u b   T o t a l : < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - s u c c e s s " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( ( f l o a t ) ( $ g r a n d _ t o t a l   ? ?   0 ) ,   0 ) ;   ? > < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
 
 
                 < ? p h p   e l s e i f   ( $ e m p l o y e e _ i d   >   0   & &   ! $ s e l e c t e d _ t a i l o r ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - w a r n i n g   p y - 2   m t - 3 " > 
 
                                 < i   c l a s s = " f a s   f a - e x c l a m a t i o n - t r i a n g l e   m e - 2 " > < / i > 
 
                                 S e l e c t e d   t a i l o r   n o t   f o u n d . 
 
                         < / d i v > 
 
                 < ? p h p   e l s e :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 2   m t - 3 " > 
 
                                 < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m e - 2 " > < / i > 
 
                                 P l e a s e   s e l e c t   a   t a i l o r   a n d   a p p l y   f i l t e r . 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   P R I N T   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   s m a l l   m t - 2 "   s t y l e = " d i s p l a y : n o n e ; "   i d = " p r i n t F o o t e r " > 
 
                         < h r > 
 
                         < p > P r i n t e d   o n :   < ? p h p   e c h o   d a t e ( ' d - m - Y   h : i   A ' ) ;   ? > < / p > 
 
                         < p > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / p > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         / /   S h o w / h i d e   d a t e   r a n g e   f i e l d s 
 
         c o n s t   f i l t e r S e l e c t   =   d o c u m e n t . q u e r y S e l e c t o r ( ' s e l e c t [ n a m e = " f i l t e r " ] ' ) ; 
 
         c o n s t   d a t e R a n g e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e ' ) ; 
 
         c o n s t   d a t e R a n g e T o   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' d a t e _ r a n g e _ t o ' ) ; 
 
         
 
         i f   ( f i l t e r S e l e c t )   { 
 
                 f i l t e r S e l e c t . a d d E v e n t L i s t e n e r ( ' c h a n g e ' ,   f u n c t i o n ( )   { 
 
                         i f   ( t h i s . v a l u e   = = =   ' d a t e _ t o _ d a t e ' )   { 
 
                                 d a t e R a n g e . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                                 d a t e R a n g e T o . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                         }   e l s e   { 
 
                                 d a t e R a n g e . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                 d a t e R a n g e T o . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         } 
 
                 } ) ; 
 
         } 
 
         
 
         / /   P r i n t   f o o t e r 
 
         w i n d o w . a d d E v e n t L i s t e n e r ( ' b e f o r e p r i n t ' ,   f u n c t i o n ( )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' p r i n t F o o t e r ' ) . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
         } ) ; 
 
         w i n d o w . a d d E v e n t L i s t e n e r ( ' a f t e r p r i n t ' ,   f u n c t i o n ( )   { 
 
                 d o c u m e n t . g e t E l e m e n t B y I d ( ' p r i n t F o o t e r ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < ? p h p 
 
 i f   ( e m p t y ( $ s l i p _ d a t a ) )   { 
 
         d i e ( ' S t i t c h i n g   s l i p   d a t a   n o t   f o u n d . ' ) ; 
 
 } 
 
 
 
 $ o r d e r _ n o   =   $ s l i p _ d a t a [ ' o r d e r _ n o ' ]   ? ?   ' N / A ' ; 
 
 $ o r d e r _ d a t e   =   $ s l i p _ d a t a [ ' o r d e r _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ d e l i v e r y _ d a t e   =   $ s l i p _ d a t a [ ' d e l i v e r y _ d a t e ' ]   ? ?   n u l l ; 
 
 $ c u s t o m e r   =   $ s l i p _ d a t a [ ' c u s t o m e r ' ]   ? ?   [ ' n a m e '   = >   ' N / A ' ,   ' p h o n e '   = >   ' ' ,   ' a d d r e s s '   = >   ' ' ] ; 
 
 $ e m p l o y e e _ n a m e   =   $ s l i p _ d a t a [ ' e m p l o y e e ' ] [ ' n a m e ' ]   ? ?   ' N o t   A s s i g n e d ' ; 
 
 $ s t i t c h i n g _ d a t e   =   $ s l i p _ d a t a [ ' s t i t c h i n g ' ] [ ' d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ; 
 
 $ s t i t c h i n g _ s t a t u s   =   $ s l i p _ d a t a [ ' s t i t c h i n g ' ] [ ' s t a t u s ' ]   ? ?   ' i n _ p r o g r e s s ' ; 
 
 $ s t i t c h i n g _ n o t e s   =   $ s l i p _ d a t a [ ' s t i t c h i n g ' ] [ ' n o t e s ' ]   ? ?   ' ' ; 
 
 $ s u i t s   =   $ s l i p _ d a t a [ ' s u i t s ' ]   ? ?   [ ] ; 
 
 $ s u i t _ n u m b e r   =   $ s u i t s [ 0 ] [ ' s u i t _ n u m b e r ' ]   ? ?   ' 1 ' ; 
 
 $ s u i t _ t y p e   =   $ s u i t s [ 0 ] [ ' s u i t _ t y p e ' ]   ? ?   ' N / A ' ; 
 
 $ s u i t _ s i z e   =   $ s u i t s [ 0 ] [ ' s i z e ' ]   ? ?   ' N / A ' ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e > S t i t c h i n g   S l i p   -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < l i n k   r e l = " s t y l e s h e e t "   h r e f = " h t t p s : / / c d n j s . c l o u d f l a r e . c o m / a j a x / l i b s / f o n t - a w e s o m e / 6 . 0 . 0 / c s s / a l l . m i n . c s s " > 
 
         < l i n k   h r e f = " h t t p s : / / f o n t s . g o o g l e a p i s . c o m / c s s 2 ? f a m i l y = N o t o + S a n s + A r a b i c : w g h t @ 4 0 0 ; 7 0 0 & d i s p l a y = s w a p "   r e l = " s t y l e s h e e t " > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   { 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
                         b a c k g r o u n d :   # f 5 f 7 f a ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         m i n - h e i g h t :   1 0 0 v h ; 
 
                         p a d d i n g :   2 0 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                 } 
 
                 . p r i n t - w r a p p e r   { 
 
                         b a c k g r o u n d :   # f f f ; 
 
                         b o r d e r - r a d i u s :   1 2 p x ; 
 
                         b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                         m a x - w i d t h :   8 0 m m ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         p a d d i n g :   8 p x   6 p x ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   m a r g i n :   0   a u t o ;   p a d d i n g :   0 ;   } 
 
                 
 
                 . h e a d e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                         p a d d i n g - b o t t o m :   6 p x ; 
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         g a p :   1 0 p x ; 
 
                         m a r g i n - b o t t o m :   2 p x ; 
 
                 } 
 
                 . h e a d e r   . l o g o - r o w   i m g   { 
 
                         m a x - h e i g h t :   5 0 p x ; 
 
                         m a x - w i d t h :   5 0 p x ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         o b j e c t - f i t :   c o v e r ; 
 
                         b o r d e r :   2 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                         p a d d i n g :   2 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   { 
 
                         f o n t - s i z e :   2 0 p x ; 
 
                         c o l o r :   # 1 a 1 a 2 e ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         m a r g i n :   0 ; 
 
                         l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 } 
 
                 . h e a d e r   . s u b   { 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # 5 5 5 ; 
 
                         l i n e - h e i g h t :   1 . 4 ; 
 
                         m a r g i n - t o p :   2 p x ; 
 
                 } 
 
                 . h e a d e r   . t i t l e   { 
 
                         f o n t - s i z e :   1 4 p x ; 
 
                         f o n t - w e i g h t :   b o l d ; 
 
                         c o l o r :   # 4 f 8 a 8 b ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                         b a c k g r o u n d :   # f 0 f 7 f 8 ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         p a d d i n g :   3 p x   1 4 p x ; 
 
                         b o r d e r - r a d i u s :   2 0 p x ; 
 
                 } 
 
                 
 
                 . b a r c o d e - c o n t a i n e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         p a d d i n g :   4 p x   0   6 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   { 
 
                         m a x - w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   4 5 p x ; 
 
                 } 
 
                 
 
                 . i n f o - g r i d   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 0 %   4 0 %   4 0 %   1 0 % ; 
 
                         g a p :   0 p x   2 p x ; 
 
                         b o r d e r :   1 . 5 p x   s o l i d   # 3 3 3 ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         p a d d i n g :   3 p x   4 p x ; 
 
                         m a r g i n - b o t t o m :   6 p x ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - w e i g h t :   5 0 0 ; 
 
                         b a c k g r o u n d :   # f a f c f c ; 
 
                 } 
 
                 . i n f o - g r i d   . i t e m   { 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   1 p x   0 ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                 } 
 
                 . i n f o - g r i d   . e m p t y   {   v i s i b i l i t y :   h i d d e n ;   } 
 
                 . i n f o - g r i d   . l a b e l   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 c 5 f 6 e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . v a l u e   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         d i r e c t i o n :   l t r ; 
 
                 } 
 
                 . i n f o - g r i d   . v a l u e - r t l   { 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 
 
                 . m e a s u r e m e n t s   { 
 
                         m a r g i n - t o p :   4 p x ; 
 
                         p a d d i n g :   3 p x   6 p x ; 
 
                         b a c k g r o u n d :   # f 8 f a f c ; 
 
                         b o r d e r - r a d i u s :   6 p x ; 
 
                         b o r d e r :   1 . 5 p x   s o l i d   # 4 f 8 a 8 b ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . l a b e l - t i t l e   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 c 5 f 6 e ; 
 
                         d i s p l a y :   b l o c k ; 
 
                         m a r g i n - b o t t o m :   3 p x ; 
 
                         f o n t - s i z e :   1 3 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ; 
 
                         p a d d i n g - b o t t o m :   2 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   { 
 
                         d i s p l a y :   g r i d ; 
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 0 %   4 0 %   4 0 %   1 0 % ; 
 
                         g a p :   0 p x   1 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . e m p t y - c o l   {   v i s i b i l i t y :   h i d d e n ;   } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . l a b e l - c o l   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   f l e x - s t a r t ; 
 
                         p a d d i n g :   0 p x   2 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                         t e x t - a l i g n :   r i g h t ; 
 
                         h e i g h t :   1 8 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . v a l u e - c o l   { 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   f l e x - s t a r t ; 
 
                         p a d d i n g :   0 p x   2 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                         d i r e c t i o n :   l t r ; 
 
                         t e x t - a l i g n :   l e f t ; 
 
                         h e i g h t :   1 8 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   { 
 
                         g r i d - c o l u m n :   2   /   4 ; 
 
                         d i s p l a y :   f l e x ; 
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                         p a d d i n g :   0 p x   2 p x ; 
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # e e e ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         h e i g h t :   1 8 p x ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   . f - l a b e l   { 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                 } 
 
                 . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   . f - v a l u e   { 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 
 
                 . f o o t e r   { 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 2 c 5 f 6 e ; 
 
                         p a d d i n g - t o p :   6 p x ; 
 
                         m a r g i n - t o p :   8 p x ; 
 
                         f o n t - s i z e :   1 1 p x ; 
 
                         c o l o r :   # 6 6 6 ; 
 
                 } 
 
                 . f o o t e r   . t h a n k y o u   { 
 
                         f o n t - s i z e :   1 6 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 2 8 a 7 4 5 ; 
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                 } 
 
                 . f o o t e r   . s o f t w a r e   { 
 
                         f o n t - s i z e :   9 p x ; 
 
                         c o l o r :   # a a a ; 
 
                         m a r g i n - t o p :   3 p x ; 
 
                 } 
 
                 
 
                 . b t n - g r o u p   { 
 
                         d i s p l a y :   f l e x ; 
 
                         g a p :   8 p x ; 
 
                         m a r g i n - t o p :   1 0 p x ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 } 
 
                 . b t n - g r o u p   b u t t o n ,   . b t n - g r o u p   a   { 
 
                         p a d d i n g :   6 p x   1 6 p x ; 
 
                         b o r d e r :   n o n e ; 
 
                         b o r d e r - r a d i u s :   3 0 p x ; 
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                         t e x t - d e c o r a t i o n :   n o n e ; 
 
                         d i s p l a y :   i n l i n e - b l o c k ; 
 
                         f o n t - f a m i l y :   ' S e g o e   U I ' ,   A r i a l ,   s a n s - s e r i f ; 
 
                 } 
 
                 . b t n - p r i n t   { 
 
                         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 4 f 8 a 8 b   0 % ,   # 2 c 5 f 6 e   1 0 0 % ) ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . b t n - p r i n t : h o v e r   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                         b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 7 9 ,   1 3 8 ,   1 3 9 ,   0 . 4 ) ; 
 
                         c o l o r :   # f f f ; 
 
                 } 
 
                 . b t n - c l o s e   { 
 
                         b a c k g r o u n d :   # e 2 e 8 f 0 ; 
 
                         c o l o r :   # 4 a 5 5 6 8 ; 
 
                 } 
 
                 . b t n - c l o s e : h o v e r   { 
 
                         b a c k g r o u n d :   # c b d 5 e 1 ; 
 
                         c o l o r :   # 1 a 2 0 2 c ; 
 
                 } 
 
                 
 
                 @ m e d i a   p r i n t   { 
 
                         b o d y   { 
 
                                 b a c k g r o u n d :   # f f f ; 
 
                                 p a d d i n g :   0 ; 
 
                                 m a r g i n :   0 ; 
 
                                 d i s p l a y :   b l o c k ; 
 
                                 m i n - h e i g h t :   a u t o ; 
 
                                 f o n t - s i z e :   1 2 p x ; 
 
                         } 
 
                         . p r i n t - w r a p p e r   { 
 
                                 b o x - s h a d o w :   n o n e ; 
 
                                 b o r d e r - r a d i u s :   0 ; 
 
                                 p a d d i n g :   6 p x   4 p x ; 
 
                                 m a x - w i d t h :   8 0 m m ; 
 
                         } 
 
                         . b t n - g r o u p   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
 
                         . m e a s u r e m e n t s   . g r i d - 4   . l a b e l - c o l , 
 
                         . m e a s u r e m e n t s   . g r i d - 4   . v a l u e - c o l , 
 
                         . m e a s u r e m e n t s   . g r i d - 4   . f i e l d - f u l l   { 
 
                                 p a d d i n g :   0 p x   2 p x ; 
 
                                 f o n t - s i z e :   9 p x ; 
 
                                 h e i g h t :   1 6 p x ; 
 
                         } 
 
                         . i n f o - g r i d   {   f o n t - s i z e :   9 p x ;   } 
 
                         . i n f o - g r i d   . l a b e l , 
 
                         . i n f o - g r i d   . v a l u e , 
 
                         . i n f o - g r i d   . v a l u e - r t l   {   f o n t - s i z e :   9 p x ;   } 
 
                 } 
 
                 @ p a g e   {   s i z e :   8 0 m m   a u t o ;   m a r g i n :   0 ;   } 
 
                 @ m e d i a   ( m a x - w i d t h :   4 0 0 p x )   { 
 
                         . p r i n t - w r a p p e r   {   p a d d i n g :   4 p x   3 p x ;   } 
 
                         . i n f o - g r i d   {   f o n t - s i z e :   9 p x ;   p a d d i n g :   2 p x   3 p x ;   } 
 
                         . m e a s u r e m e n t s   {   p a d d i n g :   2 p x   4 p x ;   } 
 
                         . h e a d e r   h 2   {   f o n t - s i z e :   1 7 p x ;   } 
 
                         . b a r c o d e - c o n t a i n e r   s v g   {   h e i g h t :   3 5 p x ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
 < d i v   c l a s s = " p r i n t - w r a p p e r " > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
 
 
                 < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < d i v   c l a s s = " l o g o - r o w " > 
 
                                 < ? p h p   
 
                                         $ l o g o _ p a t h   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                         i f   ( f i l e _ e x i s t s ( $ l o g o _ p a t h )   & &   ! e m p t y ( $ c o m p a n y [ ' l o g o ' ] )   & &   $ c o m p a n y [ ' l o g o ' ]   ! =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                 e c h o   ' < i m g   s r c = " '   .   $ l o g o _ p a t h   .   ' "   a l t = " L o g o " > ' ; 
 
                                         } 
 
                                 ? > 
 
                                 < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' T a i l o r   S h o p ' ) ;   ? > < / h 2 > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " s u b " > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' a d d r e s s ' ] ) ) :   ? > 
 
                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ] ) ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                                 < ? p h p   i f   ( ! e m p t y ( $ c o m p a n y [ ' p h o n e ' ] ) ) :   ? > 
 
                                         < b r > P h o n e :   < s p a n   c l a s s = " n u m " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ] ) ;   ? > < / s p a n > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " t i t l e " > S t i t c h i n g   S l i p < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   B A R C O D E   = = = = =   - - > 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   I N F O   G R I D   = = = = =   - - > 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > O r d e r   # < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > D a t e < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r _ d a t e ) ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > C u s t o m e r < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e - r t l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c u s t o m e r [ ' n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > T a i l o r < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e - r t l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e m p l o y e e _ n a m e ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > S u i t   # < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   $ s u i t _ n u m b e r ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > S u i t   T y p e < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e - r t l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t _ t y p e ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > S i z e < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t _ s i z e ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > < s p a n   c l a s s = " l a b e l " > S t a t u s < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " i t e m " > 
 
                                 < s p a n   c l a s s = " v a l u e "   s t y l e = " c o l o r :   < ? p h p   e c h o   ( $ s t i t c h i n g _ s t a t u s   = =   ' c o m p l e t e d ' )   ?   ' # 2 8 a 7 4 5 '   :   ' # f 7 9 7 1 e ' ;   ? > ; " > 
 
                                         < ? p h p   e c h o   u c f i r s t ( s t r _ r e p l a c e ( ' _ ' ,   '   ' ,   $ s t i t c h i n g _ s t a t u s ) ) ;   ? > 
 
                                 < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " i t e m   e m p t y " > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   M E A S U R E M E N T S   = = = = =   - - > 
 
                 < ? p h p   
 
                         $ f i r s t _ s u i t   =   $ s u i t s [ 0 ]   ? ?   [ ] ; 
 
                         $ m   =   $ f i r s t _ s u i t [ ' m e a s u r e m e n t ' ]   ? ?   [ ] ; 
 
                 ? > 
 
                 < ? p h p   
 
                         $ f i l t e r e d F i e l d s   =   [ ] ; 
 
                         $ f i e l d s   =   [ 
 
                                 ' s h i r t _ l e n g t h '   = >   ' L e n g t h ' , 
 
                                 ' s h o u l d e r '   = >   ' S h o u l d e r ' , 
 
                                 ' s l e e v e '   = >   ' S l e e v e ' , 
 
                                 ' l o o s i n g '   = >   ' L o o s i n g ' , 
 
                                 ' c h e s t '   = >   ' C h e s t ' , 
 
                                 ' w a i s t '   = >   ' W a i s t ' , 
 
                                 ' c o l l a r '   = >   ' C o l l a r ' , 
 
                                 ' s h e r w a n i '   = >   ' S h e r w a n i ' , 
 
                                 ' c u f f _ l e n g t h '   = >   ' C u f f   L e n g t h ' , 
 
                                 ' c u f f _ w i d t h '   = >   ' C u f f   W i d t h ' , 
 
                                 ' s i d e p o c k e t '   = >   ' S i d e   P o c k e t ' , 
 
                                 ' f r o n t p o c k e t '   = >   ' F r o n t   P o c k e t ' , 
 
                                 ' s h a l w a r _ l e n g t h '   = >   ' S h a l w a r   L e n g t h ' , 
 
                                 ' s h a l w a r _ b o t t o m '   = >   ' S h a l w a r   B o t t o m ' , 
 
                                 ' s h a l w a r p o c k e t '   = >   ' S h a l w a r   P o c k e t ' 
 
                         ] ; 
 
                         f o r e a c h   ( $ f i e l d s   a s   $ k e y   = >   $ l a b e l )   { 
 
                                 $ v a l   =   $ m [ $ k e y ]   ? ?   ' - ' ; 
 
                                 i f   ( $ v a l   ! = =   ' - ' )   { 
 
                                         $ f i l t e r e d F i e l d s [ ]   =   [ ' l a b e l '   = >   $ l a b e l ,   ' v a l u e '   = >   $ v a l ] ; 
 
                                 } 
 
                         } 
 
                 ? > 
 
                 < ? p h p   i f   ( ! e m p t y ( $ f i l t e r e d F i e l d s ) ) :   ? > 
 
                         < d i v   c l a s s = " m e a s u r e m e n t s " > 
 
                                 < s p a n   c l a s s = " l a b e l - t i t l e " > < i   c l a s s = " f a s   f a - r u l e r - c o m b i n e d   m e - 1 " > < / i >   M e a s u r e m e n t s < / s p a n > 
 
                                 < d i v   c l a s s = " g r i d - 4 " > 
 
                                         < ? p h p   f o r e a c h   ( $ f i l t e r e d F i e l d s   a s   $ f i e l d ) :   ? > 
 
                                                 < d i v   c l a s s = " e m p t y - c o l " > < / d i v > 
 
                                                 < d i v   c l a s s = " l a b e l - c o l " > < ? p h p   e c h o   $ f i e l d [ ' l a b e l ' ] ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " v a l u e - c o l " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ f i e l d [ ' v a l u e ' ] ) ;   ? > < / d i v > 
 
                                                 < d i v   c l a s s = " e m p t y - c o l " > < / d i v > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         
 
                                         < ? p h p   i f   ( ! e m p t y ( $ m [ ' n o t e s ' ] )   & &   $ m [ ' n o t e s ' ]   ! = =   ' - ' ) :   ? > 
 
                                                 < d i v   c l a s s = " f i e l d - f u l l " > 
 
                                                         < s p a n   c l a s s = " f - l a b e l " > N o t e : < / s p a n > 
 
                                                         < s p a n   c l a s s = " f - v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' n o t e s ' ] ) ;   ? > < / s p a n > 
 
                                                 < / d i v > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                         < ? p h p   i f   ( ! e m p t y ( $ m [ ' r e m a r k s ' ] )   & &   $ m [ ' r e m a r k s ' ]   ! = =   ' - ' ) :   ? > 
 
                                                 < d i v   c l a s s = " f i e l d - f u l l " > 
 
                                                         < s p a n   c l a s s = " f - l a b e l " > R e m a r k s : < / s p a n > 
 
                                                         < s p a n   c l a s s = " f - v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m [ ' r e m a r k s ' ] ) ;   ? > < / s p a n > 
 
                                                 < / d i v > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < d i v   c l a s s = " t h a n k y o u " > T h a n k   Y o u ! < / d i v > 
 
                         < d i v   c l a s s = " s o f t w a r e " > S o f t w a r e   b y :   B i z T e c h   S o l u t i o n s < / d i v > 
 
                 < / d i v > 
 
 
 
         < / d i v > 
 
 
 
         < ! - -   = = = = =   B U T T O N S   = = = = =   - - > 
 
         < d i v   c l a s s = " b t n - g r o u p   n o - p r i n t " > 
 
                 < b u t t o n   c l a s s = " b t n - p r i n t "   o n c l i c k = " w i n d o w . p r i n t ( ) " > < i   c l a s s = " f a s   f a - p r i n t " > < / i >   P r i n t < / b u t t o n > 
 
                 < b u t t o n   c l a s s = " b t n - c l o s e "   o n c l i c k = " w i n d o w . c l o s e ( ) " > < i   c l a s s = " f a s   f a - t i m e s " > < / i >   C l o s e < / b u t t o n > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
         J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r _ n o ) ;   ? > " ,   { 
 
                 f o r m a t :   " C O D E 1 2 8 " , 
 
                 w i d t h :   2 . 5 , 
 
                 h e i g h t :   4 5 , 
 
                 d i s p l a y V a l u e :   t r u e , 
 
                 f o n t :   " m o n o s p a c e " , 
 
                 f o n t S i z e :   1 6 , 
 
                 m a r g i n :   0 , 
 
                 b a c k g r o u n d :   " # f f f f f f " , 
 
                 l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
         } ) ; 
 
         d o c u m e n t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ( e . c t r l K e y   | |   e . m e t a K e y )   & &   e . k e y   = = =   ' p ' )   { 
 
                         e . p r e v e n t D e f a u l t ( ) ; 
 
                         w i n d o w . p r i n t ( ) ; 
 
                 } 
 
         } ) ; 
 
 < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < s t y l e > 
 
         . c o m p a n y - l i s t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . c o m p a n y - l i s t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . c o m p a n y - l i s t - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . c o m p a n y - l i s t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . c o m p a n y - l i s t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
         } 
 
         . c o m p a n y - l i s t - c a r d   . t a b l e   t h   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   8 p x   1 0 p x ; 
 
         } 
 
         . c o m p a n y - l i s t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
         } 
 
         . c o m p a n y - l i s t - c a r d   . t a b l e   t b o d y   t r : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . s t a t u s - b a d g e   { 
 
                 p a d d i n g :   3 p x   1 2 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . s t a t u s - b a d g e . a c t i v e   {   b a c k g r o u n d :   # d 4 e d d a ;   c o l o r :   # 1 5 5 7 2 4 ;   } 
 
         . s t a t u s - b a d g e . i n a c t i v e   {   b a c k g r o u n d :   # f 8 d 7 d a ;   c o l o r :   # 7 2 1 c 2 4 ;   } 
 
         . s t a t u s - b a d g e . e x p i r e d   {   b a c k g r o u n d :   # f f f 3 c d ;   c o l o r :   # 8 5 6 4 0 4 ;   } 
 
         . b t n - b a c k   { 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
         } 
 
         . b t n - b a c k : h o v e r   { 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c o m p a n y - l i s t - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5 > < i   c l a s s = " f a s   f a - b u i l d i n g   m e - 2 " > < / i > C o m p a n i e s   M a n a g e m e n t < / h 5 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 2 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n y _ a d d "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   C o m p a n y 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                                 < i   c l a s s = " f a s   f a - b o x   m e - 1 " > < / i >   P a c k a g e s 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e " > 
 
                                 < t h e a d > 
 
                                         < t r > 
 
                                                 < t h   s t y l e = " w i d t h : 5 % ; " > # < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 5 % ; " > C o m p a n y < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > P h o n e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > P a c k a g e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > U s e r s < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > S t a r t   D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; " > E x p i r y   D a t e < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 0 % ; " > S t a t u s < / t h > 
 
                                                 < t h   s t y l e = " w i d t h : 1 2 % ; "   c l a s s = " t e x t - c e n t e r " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ c o m p a n i e s ) ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d   c o l s p a n = " 9 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   c o m p a n i e s   f o u n d . < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   $ s n   =   1 ;   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ c o m p a n i e s   a s   $ c ) :   ? > 
 
                                                         < ? p h p 
 
                                                         $ s t a t u s _ c l a s s   =   ' a c t i v e ' ; 
 
                                                         i f   ( $ c [ ' s t a t u s ' ]   = =   ' i n a c t i v e ' )   $ s t a t u s _ c l a s s   =   ' i n a c t i v e ' ; 
 
                                                         i f   ( $ c [ ' e x p i r y _ d a t e ' ]   & &   s t r t o t i m e ( $ c [ ' e x p i r y _ d a t e ' ] )   <   t i m e ( ) )   $ s t a t u s _ c l a s s   =   ' e x p i r e d ' ; 
 
                                                         ? > 
 
                                                         < t r > 
 
                                                                 < t d > < ? p h p   e c h o   $ s n + + ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > < / s t r o n g > 
 
                                                                         < b r > < s m a l l   c l a s s = " t e x t - m u t e d " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                                                                 < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ c [ ' p a c k a g e _ n a m e ' ] ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   b g - i n f o " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' p a c k a g e _ n a m e ' ] ) ;   ? > < / s p a n > 
 
                                                                                 < b r > < s m a l l   c l a s s = " t e x t - m u t e d " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ c [ ' p a c k a g e _ p r i c e ' ]   ? ?   0 ,   0 ) ;   ? > < / s m a l l > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > N o n e < / s p a n > 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > < ? p h p   e c h o   ( i n t ) ( $ c [ ' u s e r _ c o u n t ' ]   ? ?   0 ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   $ c [ ' s t a r t _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ c [ ' s t a r t _ d a t e ' ] ) )   :   ' - ' ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < ? p h p   i f   ( $ c [ ' e x p i r y _ d a t e ' ] ) :   ? > 
 
                                                                                 < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ c [ ' e x p i r y _ d a t e ' ] ) ) ;   ? > 
 
                                                                                 < ? p h p   i f   ( s t r t o t i m e ( $ c [ ' e x p i r y _ d a t e ' ] )   <   t i m e ( ) ) :   ? > 
 
                                                                                         < s p a n   c l a s s = " b a d g e   b g - d a n g e r   m s - 1 " > E x p i r e d < / s p a n > 
 
                                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 - 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " s t a t u s - b a d g e   < ? p h p   e c h o   $ s t a t u s _ c l a s s ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ c [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n y _ e d i t & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y "   t i t l e = " E d i t " > 
 
                                                                                         < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s & c o m p a n y _ i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - i n f o "   t i t l e = " U s e r s " > 
 
                                                                                         < i   c l a s s = " f a s   f a - u s e r s " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n y _ d e l e t e & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   t i t l e = " D e l e t e "   
 
                                                                                       o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   c o m p a n y ?   A l l   d a t a   w i l l   b e   l o s t . ' ) ; " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . f o r m - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 m a x - w i d t h :   8 0 0 p x ; 
 
                 m a r g i n :   0   a u t o ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   2 0 p x ; 
 
         } 
 
         . f o r m - l a b e l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
         } 
 
         . f o r m - c o n t r o l ,   . f o r m - s e l e c t   { 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . f o r m - c o n t r o l : f o c u s ,   . f o r m - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - b a c k   { 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
         } 
 
         . b t n - b a c k : h o v e r   { 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - s a v e   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 8 a 7 4 5   0 % ,   # 2 0 c 9 9 7   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   8 p x   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . b t n - s a v e : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " f o r m - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5 > < i   c l a s s = " f a s   f a - p l u s   m e - 2 " > < / i > A d d   N e w   C o m p a n y < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " b t n - b a c k " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > C o m p a n y   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " E n t e r   c o m p a n y   n a m e "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P h o n e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 0 3 0 0 - 1 2 3 4 5 6 7 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " a c t i v e " > A c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " i n a c t i v e " > I n a c t i v e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S t a r t   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " s t a r t _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > E x p i r y   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " e x p i r y _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' + 1   y e a r ' ) ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P a c k a g e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " p a c k a g e _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   S e l e c t   P a c k a g e   - - < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ p a c k a g e s   a s   $ p ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ p [ ' i d ' ] ;   ? > " > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p [ ' n a m e ' ] ) ;   ? >   
 
                                                                 ( R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ p [ ' p r i c e ' ] ,   0 ) ;   ? >   /   < ? p h p   e c h o   $ p [ ' d u r a t i o n _ m o n t h s ' ] ;   ? >   m o n t h s ) 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > A d d r e s s < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " C o m p l e t e   a d d r e s s " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > L o g o < / l a b e l > 
 
                                         < i n p u t   t y p e = " f i l e "   n a m e = " l o g o "   c l a s s = " f o r m - c o n t r o l "   a c c e p t = " i m a g e / * " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > R e c o m m e n d e d :   1 5 0 x 5 0   p i x e l s < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s a v e " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   S a v e   C o m p a n y 
 
                                         < / b u t t o n > 
 
                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - t i m e s   m e - 2 " > < / i >   C a n c e l 
 
                                         < / a > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . f o r m - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 m a x - w i d t h :   8 0 0 p x ; 
 
                 m a r g i n :   0   a u t o ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 6 6 7 e e a   0 % ,   # 7 6 4 b a 2   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   2 0 p x ; 
 
         } 
 
         . f o r m - l a b e l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
         } 
 
         . f o r m - c o n t r o l ,   . f o r m - s e l e c t   { 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . f o r m - c o n t r o l : f o c u s ,   . f o r m - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - b a c k   { 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   4 p x   1 6 p x ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
         } 
 
         . b t n - b a c k : h o v e r   { 
 
                 b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . b t n - s a v e   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 7 9 7 1 e   0 % ,   # f f d 2 0 0   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   8 p x   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 3 3 3 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . b t n - s a v e : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 4 7 ,   1 5 1 ,   3 0 ,   0 . 3 ) ; 
 
                 c o l o r :   # 3 3 3 ; 
 
         } 
 
         . l o g o - p r e v i e w   { 
 
                 m a x - h e i g h t :   6 0 p x ; 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   4 p x ; 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " f o r m - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5 > < i   c l a s s = " f a s   f a - e d i t   m e - 2 " > < / i > E d i t   C o m p a n y < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " b t n - b a c k " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > C o m p a n y   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P h o n e < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " p h o n e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " a c t i v e "   < ? p h p   e c h o   ( $ c o m p a n y [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " i n a c t i v e "   < ? p h p   e c h o   ( $ c o m p a n y [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' i n a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > I n a c t i v e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S t a r t   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " s t a r t _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ c o m p a n y [ ' s t a r t _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > E x p i r y   D a t e < / l a b e l > 
 
                                         < i n p u t   t y p e = " d a t e "   n a m e = " e x p i r y _ d a t e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   $ c o m p a n y [ ' e x p i r y _ d a t e ' ]   ? ?   d a t e ( ' Y - m - d ' ,   s t r t o t i m e ( ' + 1   y e a r ' ) ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P a c k a g e < / l a b e l > 
 
                                         < s e l e c t   n a m e = " p a c k a g e _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " " > - -   S e l e c t   P a c k a g e   - - < / o p t i o n > 
 
                                                 < ? p h p   f o r e a c h   ( $ p a c k a g e s   a s   $ p ) :   ? > 
 
                                                         < o p t i o n   v a l u e = " < ? p h p   e c h o   $ p [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ c o m p a n y [ ' p a c k a g e _ i d ' ]   ? ?   0 )   = =   $ p [ ' i d ' ]   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                                 < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p [ ' n a m e ' ] ) ;   ? >   
 
                                                                 ( R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ p [ ' p r i c e ' ] ,   0 ) ;   ? >   /   < ? p h p   e c h o   $ p [ ' d u r a t i o n _ m o n t h s ' ] ;   ? >   m o n t h s ) 
 
                                                         < / o p t i o n > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > A d d r e s s < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " a d d r e s s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > C u r r e n t   L o g o < / l a b e l > 
 
                                         < d i v   c l a s s = " m b - 2 " > 
 
                                                 < ? p h p   
 
                                                         $ l o g o   =   ' a s s e t s / u p l o a d s / c o m p a n i e s / '   .   ( $ c o m p a n y [ ' l o g o ' ]   ? ?   ' d e f a u l t _ l o g o . p n g ' ) ; 
 
                                                         i f   ( ! f i l e _ e x i s t s ( $ l o g o )   | |   $ c o m p a n y [ ' l o g o ' ]   = =   ' d e f a u l t _ l o g o . p n g ' )   { 
 
                                                                 $ l o g o   =   ' a s s e t s / i m a g e s / d e f a u l t _ c o m p a n y . p n g ' ; 
 
                                                         } 
 
                                                 ? > 
 
                                                 < i m g   s r c = " < ? p h p   e c h o   $ l o g o ;   ? > "   c l a s s = " l o g o - p r e v i e w "   a l t = " L o g o " > 
 
                                         < / d i v > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > C h a n g e   L o g o < / l a b e l > 
 
                                         < i n p u t   t y p e = " f i l e "   n a m e = " l o g o "   c l a s s = " f o r m - c o n t r o l "   a c c e p t = " i m a g e / * " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > L e a v e   e m p t y   t o   k e e p   c u r r e n t   l o g o . < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s a v e " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   U p d a t e   C o m p a n y 
 
                                         < / b u t t o n > 
 
                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - t i m e s   m e - 2 " > < / i >   C a n c e l 
 
                                         < / a > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . s u p e r a d m i n - d a s h b o a r d   { 
 
                 p a d d i n g :   2 0 p x   0 ; 
 
         } 
 
         . s t a t - c a r d   { 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 p a d d i n g :   2 0 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . s t a t - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 5 p x ) ; 
 
                 b o x - s h a d o w :   0   8 p x   3 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 0 ) ; 
 
         } 
 
         . s t a t - c a r d   . i c o n   { 
 
                 f o n t - s i z e :   4 0 p x ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         . s t a t - c a r d   . n u m b e r   { 
 
                 f o n t - s i z e :   3 2 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . s t a t - c a r d   . l a b e l   { 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
         } 
 
         . s t a t - c a r d   . i c o n . b l u e   {   c o l o r :   # 6 6 7 e e a ;   } 
 
         . s t a t - c a r d   . i c o n . g r e e n   {   c o l o r :   # 2 8 a 7 4 5 ;   } 
 
         . s t a t - c a r d   . i c o n . o r a n g e   {   c o l o r :   # f 7 9 7 1 e ;   } 
 
         . s t a t - c a r d   . i c o n . p u r p l e   {   c o l o r :   # 8 e 2 4 a a ;   } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " s u p e r a d m i n - d a s h b o a r d " > 
 
         < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   m b - 4 " > 
 
                 < d i v > 
 
                         < h 4   c l a s s = " f w - b o l d " > < i   c l a s s = " f a s   f a - u s e r - s h i e l d   m e - 2   t e x t - p r i m a r y " > < / i > S u p e r   A d m i n   D a s h b o a r d < / h 4 > 
 
                         < p   c l a s s = " t e x t - m u t e d " > W e l c o m e   b a c k ,   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' f u l l _ n a m e ' ]   ? ?   ' A d m i n ' ) ;   ? > ! < / p > 
 
                 < / d i v > 
 
                 < d i v > 
 
                         < s p a n   c l a s s = " b a d g e   b g - s u c c e s s   r o u n d e d - p i l l   p x - 3   p y - 2 " > A l l   C o m p a n i e s < / s p a n > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < d i v   c l a s s = " r o w   g - 4 " > 
 
                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d " > 
 
                                 < d i v   c l a s s = " i c o n   b l u e " > < i   c l a s s = " f a s   f a - b u i l d i n g " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " n u m b e r " > < ? p h p   e c h o   $ s t a t s [ ' t o t a l _ c o m p a n i e s ' ]   ? ?   0 ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " l a b e l " > T o t a l   C o m p a n i e s < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d " > 
 
                                 < d i v   c l a s s = " i c o n   g r e e n " > < i   c l a s s = " f a s   f a - u s e r s " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " n u m b e r " > < ? p h p   e c h o   $ s t a t s [ ' t o t a l _ u s e r s ' ]   ? ?   0 ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " l a b e l " > T o t a l   U s e r s < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d " > 
 
                                 < d i v   c l a s s = " i c o n   o r a n g e " > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " n u m b e r " > < ? p h p   e c h o   $ s t a t s [ ' t o t a l _ o r d e r s ' ]   ? ?   0 ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " l a b e l " > T o t a l   O r d e r s < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c o l - m d - 3   c o l - 6 " > 
 
                         < d i v   c l a s s = " s t a t - c a r d " > 
 
                                 < d i v   c l a s s = " i c o n   p u r p l e " > < i   c l a s s = " f a s   f a - b o x " > < / i > < / d i v > 
 
                                 < d i v   c l a s s = " n u m b e r " > < ? p h p   e c h o   $ s t a t s [ ' t o t a l _ p a c k a g e s ' ]   ? ?   0 ;   ? > < / d i v > 
 
                                 < d i v   c l a s s = " l a b e l " > T o t a l   P a c k a g e s < / d i v > 
 
                         < / d i v > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < ! - -   R e c e n t   C o m p a n i e s   - - > 
 
         < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m   m t - 4 " > 
 
                 < d i v   c l a s s = " c a r d - h e a d e r   b g - t r a n s p a r e n t   b o r d e r - 0   p t - 3 " > 
 
                         < h 6   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - b u i l d i n g   m e - 2   t e x t - p r i m a r y " > < / i > R e c e n t   C o m p a n i e s < / h 6 > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c a r d - b o d y   p - 0 " > 
 
                         < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                                 < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   m b - 0 " > 
 
                                         < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                                 < t r > 
 
                                                         < t h > N a m e < / t h > 
 
                                                         < t h > P h o n e < / t h > 
 
                                                         < t h > P a c k a g e < / t h > 
 
                                                         < t h > S t a t u s < / t h > 
 
                                                         < t h > E x p i r y < / t h > 
 
                                                         < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n < / t h > 
 
                                                 < / t r > 
 
                                         < / t h e a d > 
 
                                         < t b o d y > 
 
                                                 < ? p h p   i f   ( e m p t y ( $ c o m p a n i e s ) ) :   ? > 
 
                                                         < t r > < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   c o m p a n i e s   f o u n d . < / t d > < / t r > 
 
                                                 < ? p h p   e l s e :   ? > 
 
                                                         < ? p h p   f o r e a c h   ( a r r a y _ s l i c e ( $ c o m p a n i e s ,   0 ,   5 )   a s   $ c ) :   ? > 
 
                                                                 < t r > 
 
                                                                         < t d > < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > < / s t r o n g > < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                                                         < t d > < s p a n   c l a s s = " b a d g e   b g - i n f o " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' p a c k a g e _ n a m e ' ]   ? ?   ' N o n e ' ) ;   ? > < / s p a n > < / t d > 
 
                                                                         < t d > 
 
                                                                                 < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ c [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' b g - s u c c e s s '   :   ' b g - d a n g e r ' ;   ? > " > 
 
                                                                                         < ? p h p   e c h o   u c f i r s t ( $ c [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / t d > 
 
                                                                         < t d > < ? p h p   e c h o   $ c [ ' e x p i r y _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ c [ ' e x p i r y _ d a t e ' ] ) )   :   ' - ' ;   ? > < / t d > 
 
                                                                         < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n y _ e d i t & i d = < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > 
 
                                                                                         < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / t d > 
 
                                                                 < / t r > 
 
                                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                                 < ? p h p   e n d i f ;   ? > 
 
                                         < / t b o d y > 
 
                                 < / t a b l e > 
 
                         < / d i v > 
 
                 < / d i v > 
 
                 < d i v   c l a s s = " c a r d - f o o t e r   b g - t r a n s p a r e n t   b o r d e r - 0   t e x t - c e n t e r " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " b t n   b t n - s m   b t n - p r i m a r y   r o u n d e d - p i l l " > V i e w   A l l   C o m p a n i e s < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . p a c k a g e - l i s t - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
         } 
 
         . p a c k a g e - l i s t - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . p a c k a g e - l i s t - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . p a c k a g e - l i s t - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . p a c k a g e - l i s t - c a r d   . t a b l e   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 m a r g i n - b o t t o m :   0 ; 
 
         } 
 
         . p a c k a g e - l i s t - c a r d   . t a b l e   t h   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 1 p x ; 
 
                 t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                 l e t t e r - s p a c i n g :   0 . 3 p x ; 
 
                 b o r d e r - b o t t o m :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   8 p x   1 0 p x ; 
 
         } 
 
         . p a c k a g e - l i s t - c a r d   . t a b l e   t d   { 
 
                 p a d d i n g :   6 p x   1 0 p x ; 
 
                 v e r t i c a l - a l i g n :   m i d d l e ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
         } 
 
         . p a c k a g e - c a r d   { 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 p a d d i n g :   1 6 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
         } 
 
         . p a c k a g e - c a r d : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 3 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 8 ) ; 
 
         } 
 
         . p a c k a g e - c a r d   . p r i c e   { 
 
                 f o n t - s i z e :   2 8 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 1 9 9 8 e ; 
 
         } 
 
         . p a c k a g e - c a r d   . n a m e   { 
 
                 f o n t - s i z e :   1 8 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . p a c k a g e - c a r d   . f e a t u r e - l i s t   { 
 
                 l i s t - s t y l e :   n o n e ; 
 
                 p a d d i n g :   0 ; 
 
                 m a r g i n :   1 0 p x   0 ; 
 
         } 
 
         . p a c k a g e - c a r d   . f e a t u r e - l i s t   l i   { 
 
                 p a d d i n g :   3 p x   0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
         } 
 
         . p a c k a g e - c a r d   . f e a t u r e - l i s t   l i   i   { 
 
                 c o l o r :   # 1 1 9 9 8 e ; 
 
                 m a r g i n - r i g h t :   6 p x ; 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " p a c k a g e - l i s t - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5 > < i   c l a s s = " f a s   f a - b o x   m e - 2 " > < / i > P a c k a g e s   M a n a g e m e n t < / h 5 > 
 
                 < d i v   c l a s s = " d - f l e x   g a p - 2 " > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e _ a d d "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   P a c k a g e 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " r o w   g - 4 " > 
 
                         < ? p h p   i f   ( e m p t y ( $ p a c k a g e s ) ) :   ? > 
 
                                 < d i v   c l a s s = " c o l - 1 2   t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   p a c k a g e s   f o u n d . < / d i v > 
 
                         < ? p h p   e l s e :   ? > 
 
                                 < ? p h p   f o r e a c h   ( $ p a c k a g e s   a s   $ p ) :   
 
                                         $ f e a t u r e s   =   j s o n _ d e c o d e ( $ p [ ' f e a t u r e s ' ] ,   t r u e )   ? :   [ ] ; 
 
                                 ? > 
 
                                         < d i v   c l a s s = " c o l - m d - 4   c o l - l g - 3 " > 
 
                                                 < d i v   c l a s s = " p a c k a g e - c a r d " > 
 
                                                         < d i v   c l a s s = " d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - s t a r t " > 
 
                                                                 < d i v > 
 
                                                                         < d i v   c l a s s = " n a m e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p [ ' n a m e ' ] ) ;   ? > < / d i v > 
 
                                                                         < d i v   c l a s s = " p r i c e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ p [ ' p r i c e ' ] ,   0 ) ;   ? > < / d i v > 
 
                                                                 < / d i v > 
 
                                                                 < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ p [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' b g - s u c c e s s '   :   ' b g - d a n g e r ' ;   ? > " > 
 
                                                                         < ? p h p   e c h o   u c f i r s t ( $ p [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                 < / s p a n > 
 
                                                         < / d i v > 
 
                                                         < d i v   c l a s s = " t e x t - m u t e d   s m a l l   m t - 1 " > < ? p h p   e c h o   $ p [ ' d u r a t i o n _ m o n t h s ' ] ;   ? >   m o n t h s < / d i v > 
 
                                                         
 
                                                         < u l   c l a s s = " f e a t u r e - l i s t " > 
 
                                                                 < l i > < i   c l a s s = " f a s   f a - u s e r s " > < / i >   M a x   U s e r s :   < ? p h p   e c h o   $ p [ ' m a x _ u s e r s ' ] ;   ? > < / l i > 
 
                                                                 < l i > < i   c l a s s = " f a s   f a - u s e r - t i e " > < / i >   M a x   E m p l o y e e s :   < ? p h p   e c h o   $ p [ ' m a x _ e m p l o y e e s ' ] ;   ? > < / l i > 
 
                                                                 < l i > < i   c l a s s = " f a s   f a - s h o p p i n g - b a g " > < / i >   M a x   O r d e r s :   < ? p h p   e c h o   $ p [ ' m a x _ o r d e r s ' ] ;   ? > < / l i > 
 
                                                                 < l i > < i   c l a s s = " f a s   f a - u s e r s " > < / i >   M a x   C u s t o m e r s :   < ? p h p   e c h o   $ p [ ' m a x _ c u s t o m e r s ' ] ;   ? > < / l i > 
 
                                                         < / u l > 
 
                                                         
 
                                                         < d i v   c l a s s = " d - f l e x   g a p - 1   m t - 2 " > 
 
                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e _ e d i t & i d = < ? p h p   e c h o   $ p [ ' i d ' ] ;   ? > "   
 
                                                                       c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - p r i m a r y   r o u n d e d - p i l l " > 
 
                                                                         < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                 < / a > 
 
                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e _ d e l e t e & i d = < ? p h p   e c h o   $ p [ ' i d ' ] ;   ? > "   
 
                                                                       c l a s s = " b t n   b t n - s m   b t n - o u t l i n e - d a n g e r   r o u n d e d - p i l l "   
 
                                                                       o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   p a c k a g e ? ' ) ; " > 
 
                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                 < / a > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . f o r m - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 m a x - w i d t h :   8 0 0 p x ; 
 
                 m a r g i n :   0   a u t o ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   2 0 p x ; 
 
         } 
 
         . f o r m - l a b e l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
         } 
 
         . f o r m - c o n t r o l ,   . f o r m - s e l e c t   { 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . f o r m - c o n t r o l : f o c u s ,   . f o r m - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 1 1 9 9 8 e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 1 7 ,   1 5 3 ,   1 4 2 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - s a v e   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   8 p x   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . b t n - s a v e : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 7 ,   1 5 3 ,   1 4 2 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " f o r m - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5 > < i   c l a s s = " f a s   f a - p l u s   m e - 2 " > < / i > A d d   N e w   P a c k a g e < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P a c k a g e   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " e . g .   S t a n d a r d "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " a c t i v e " > A c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " i n a c t i v e " > I n a c t i v e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P r i c e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " p r i c e "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 0 . 0 0 "   v a l u e = " 0 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > D u r a t i o n   ( M o n t h s ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " d u r a t i o n _ m o n t h s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 1 2 "   v a l u e = " 1 2 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   U s e r s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ u s e r s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 5 "   v a l u e = " 5 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   C u s t o m e r s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ c u s t o m e r s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 1 0 0 "   v a l u e = " 1 0 0 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   O r d e r s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ o r d e r s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 5 0 0 "   v a l u e = " 5 0 0 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   E m p l o y e e s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ e m p l o y e e s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " 2 0 "   v a l u e = " 2 0 " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > D e s c r i p t i o n < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " d e s c r i p t i o n "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 2 "   p l a c e h o l d e r = " P a c k a g e   d e s c r i p t i o n . . . " > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > F e a t u r e s   ( c o m m a   s e p a r a t e d ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " f e a t u r e s "   c l a s s = " f o r m - c o n t r o l "   p l a c e h o l d e r = " F e a t u r e   1 ,   F e a t u r e   2 ,   F e a t u r e   3 " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > S e p a r a t e   f e a t u r e s   w i t h   c o m m a s . < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s a v e " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   S a v e   P a c k a g e 
 
                                         < / b u t t o n > 
 
                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - t i m e s   m e - 2 " > < / i >   C a n c e l 
 
                                         < / a > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . f o r m - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   2 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 m a x - w i d t h :   8 0 0 p x ; 
 
                 m a r g i n :   0   a u t o ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 1 9 9 8 e   0 % ,   # 3 8 e f 7 d   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 2 p x   1 6 p x ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - h e a d e r   h 5   { 
 
                 c o l o r :   # f f f ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 m a r g i n :   0 ; 
 
         } 
 
         . f o r m - c a r d   . c a r d - b o d y   { 
 
                 p a d d i n g :   2 0 p x ; 
 
         } 
 
         . f o r m - l a b e l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
         } 
 
         . f o r m - c o n t r o l ,   . f o r m - s e l e c t   { 
 
                 b o r d e r - r a d i u s :   8 p x ; 
 
                 b o r d e r :   1 . 5 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   8 p x   1 2 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . f o r m - c o n t r o l : f o c u s ,   . f o r m - s e l e c t : f o c u s   { 
 
                 b o r d e r - c o l o r :   # 1 1 9 9 8 e ; 
 
                 b o x - s h a d o w :   0   0   0   3 p x   r g b a ( 1 7 ,   1 5 3 ,   1 4 2 ,   0 . 1 5 ) ; 
 
         } 
 
         . b t n - s a v e   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 7 9 7 1 e   0 % ,   # f f d 2 0 0   1 0 0 % ) ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   8 p x   3 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 3 3 3 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . b t n - s a v e : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 2 4 7 ,   1 5 1 ,   3 0 ,   0 . 3 ) ; 
 
                 c o l o r :   # 3 3 3 ; 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " f o r m - c a r d   c a r d " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r " > 
 
                 < h 5 > < i   c l a s s = " f a s   f a - e d i t   m e - 2 " > < / i > E d i t   P a c k a g e < / h 5 > 
 
                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s "   c l a s s = " b t n   b t n - l i g h t   b t n - s m   r o u n d e d - p i l l   t e x t - d a r k " > 
 
                         < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                 < / a > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1   m b - 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " r o w   g - 3 " > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P a c k a g e   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " n a m e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > S t a t u s < / l a b e l > 
 
                                         < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                                 < o p t i o n   v a l u e = " a c t i v e "   < ? p h p   e c h o   ( $ p a c k a g e [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A c t i v e < / o p t i o n > 
 
                                                 < o p t i o n   v a l u e = " i n a c t i v e "   < ? p h p   e c h o   ( $ p a c k a g e [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' i n a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > I n a c t i v e < / o p t i o n > 
 
                                         < / s e l e c t > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > P r i c e   ( R s . ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   s t e p = " 0 . 0 1 "   n a m e = " p r i c e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' p r i c e ' ]   ? ?   0 ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > D u r a t i o n   ( M o n t h s ) < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " d u r a t i o n _ m o n t h s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' d u r a t i o n _ m o n t h s ' ]   ? ?   1 2 ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   U s e r s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ u s e r s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' m a x _ u s e r s ' ]   ? ?   5 ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   C u s t o m e r s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ c u s t o m e r s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' m a x _ c u s t o m e r s ' ]   ? ?   1 0 0 ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   O r d e r s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ o r d e r s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' m a x _ o r d e r s ' ]   ? ?   5 0 0 ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - m d - 4 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > M a x   E m p l o y e e s < / l a b e l > 
 
                                         < i n p u t   t y p e = " n u m b e r "   n a m e = " m a x _ e m p l o y e e s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' m a x _ e m p l o y e e s ' ]   ? ?   2 0 ) ;   ? > " > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > D e s c r i p t i o n < / l a b e l > 
 
                                         < t e x t a r e a   n a m e = " d e s c r i p t i o n "   c l a s s = " f o r m - c o n t r o l "   r o w s = " 2 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p a c k a g e [ ' d e s c r i p t i o n ' ]   ? ?   ' ' ) ;   ? > < / t e x t a r e a > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < l a b e l   c l a s s = " f o r m - l a b e l " > F e a t u r e s   ( c o m m a   s e p a r a t e d ) < / l a b e l > 
 
                                         < ? p h p   
 
                                                 $ f e a t u r e s   =   $ p a c k a g e [ ' f e a t u r e s ' ]   ? ?   ' ' ; 
 
                                                 i f   ( i s _ s t r i n g ( $ f e a t u r e s )   & &   s t r p o s ( $ f e a t u r e s ,   ' { ' )   = = =   0 )   { 
 
                                                         $ f e a t u r e s _ a r r   =   j s o n _ d e c o d e ( $ f e a t u r e s ,   t r u e ) ; 
 
                                                         i f   ( i s _ a r r a y ( $ f e a t u r e s _ a r r ) )   { 
 
                                                                 $ f e a t u r e s   =   i m p l o d e ( ' ,   ' ,   $ f e a t u r e s _ a r r ) ; 
 
                                                         }   e l s e   { 
 
                                                                 $ f e a t u r e s   =   ' ' ; 
 
                                                         } 
 
                                                 } 
 
                                         ? > 
 
                                         < i n p u t   t y p e = " t e x t "   n a m e = " f e a t u r e s "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ f e a t u r e s ) ;   ? > "   p l a c e h o l d e r = " F e a t u r e   1 ,   F e a t u r e   2 ,   F e a t u r e   3 " > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > S e p a r a t e   f e a t u r e s   w i t h   c o m m a s . < / s m a l l > 
 
                                 < / d i v > 
 
                                 < d i v   c l a s s = " c o l - 1 2 " > 
 
                                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n - s a v e " > 
 
                                                 < i   c l a s s = " f a s   f a - s a v e   m e - 2 " > < / i >   U p d a t e   P a c k a g e 
 
                                         < / b u t t o n > 
 
                                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ p a c k a g e s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > 
 
                                                 < i   c l a s s = " f a s   f a - t i m e s   m e - 2 " > < / i >   C a n c e l 
 
                                         < / a > 
 
                                 < / d i v > 
 
                         < / d i v > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - w h i t e   d - f l e x   j u s t i f y - c o n t e n t - b e t w e e n   a l i g n - i t e m s - c e n t e r   f l e x - w r a p " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r s   m e - 2   t e x t - p r i m a r y " > < / i > U s e r s   M a n a g e m e n t < / h 5 > 
 
                 < d i v > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r _ a d d "   c l a s s = " b t n   b t n - p r i m a r y   b t n - s m   r o u n d e d - p i l l " > 
 
                                 < i   c l a s s = " f a s   f a - p l u s   m e - 1 " > < / i >   A d d   U s e r 
 
                         < / a > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ c o m p a n i e s "   c l a s s = " b t n   b t n - s e c o n d a r y   b t n - s m   r o u n d e d - p i l l   m s - 2 " > 
 
                                 < i   c l a s s = " f a s   f a - a r r o w - l e f t   m e - 1 " > < / i >   B a c k 
 
                         < / a > 
 
                 < / d i v > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 
 
                 < ? p h p   i f   ( i s s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - s u c c e s s   a l e r t - d i s m i s s i b l e   f a d e   s h o w   p y - 1   m b - 2 "   r o l e = " a l e r t " > 
 
                                 < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   u n s e t ( $ _ S E S S I O N [ ' m e s s a g e ' ] ) ;   ? > < / s m a l l > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " b t n - c l o s e   b t n - s m "   d a t a - b s - d i s m i s s = " a l e r t " > < / b u t t o n > 
 
                         < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < ? p h p   i f   ( i s s e t ( $ _ G E T [ ' c o m p a n y _ i d ' ] )   & &   $ _ G E T [ ' c o m p a n y _ i d ' ] ) :   ? > 
 
                         < ? p h p   
 
                                 $ c o m p a n y   =   $ t h i s - > g e t C o m p a n y B y I d ( $ _ G E T [ ' c o m p a n y _ i d ' ] ) ; 
 
                                 i f   ( $ c o m p a n y ) :   
 
                         ? > 
 
                                 < d i v   c l a s s = " a l e r t   a l e r t - i n f o   p y - 1   m b - 2 " > 
 
                                         < s m a l l > < s t r o n g > C o m p a n y : < / s t r o n g >   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y [ ' n a m e ' ] ) ;   ? > < / s m a l l > 
 
                                 < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < ? p h p   e n d i f ;   ? > 
 
 
 
                 < d i v   c l a s s = " t a b l e - r e s p o n s i v e " > 
 
                         < t a b l e   c l a s s = " t a b l e   t a b l e - h o v e r   t a b l e - s m " > 
 
                                 < t h e a d   c l a s s = " t a b l e - l i g h t " > 
 
                                         < t r > 
 
                                                 < t h > U s e r n a m e < / t h > 
 
                                                 < t h > F u l l   N a m e < / t h > 
 
                                                 < t h > R o l e < / t h > 
 
                                                 < t h > C o m p a n y < / t h > 
 
                                                 < t h > S t a t u s < / t h > 
 
                                                 < t h   c l a s s = " t e x t - c e n t e r " > A c t i o n s < / t h > 
 
                                         < / t r > 
 
                                 < / t h e a d > 
 
                                 < t b o d y > 
 
                                         < ? p h p   i f   ( e m p t y ( $ u s e r s ) ) :   ? > 
 
                                                 < t r > < t d   c o l s p a n = " 6 "   c l a s s = " t e x t - c e n t e r   t e x t - m u t e d   p y - 3 " > N o   u s e r s   f o u n d . < / t d > < / t r > 
 
                                         < ? p h p   e l s e :   ? > 
 
                                                 < ? p h p   f o r e a c h   ( $ u s e r s   a s   $ u ) :   ? > 
 
                                                         < t r > 
 
                                                                 < t d > < c o d e > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u [ ' u s e r n a m e ' ] ) ;   ? > < / c o d e > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u [ ' f u l l _ n a m e ' ] ) ;   ? > < / t d > 
 
                                                                 < t d > < s p a n   c l a s s = " b a d g e   b g - s e c o n d a r y " > < ? p h p   e c h o   u c f i r s t ( $ u [ ' r o l e ' ] ) ;   ? > < / s p a n > < / t d > 
 
                                                                 < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u [ ' c o m p a n y _ n a m e ' ]   ? ?   ' N / A ' ) ;   ? > < / t d > 
 
                                                                 < t d > 
 
                                                                         < s p a n   c l a s s = " b a d g e   < ? p h p   e c h o   $ u [ ' s t a t u s ' ]   = =   ' a c t i v e '   ?   ' b g - s u c c e s s '   :   ' b g - d a n g e r ' ;   ? > " > 
 
                                                                                 < ? p h p   e c h o   u c f i r s t ( $ u [ ' s t a t u s ' ] ) ;   ? > 
 
                                                                         < / s p a n > 
 
                                                                 < / t d > 
 
                                                                 < t d   c l a s s = " t e x t - c e n t e r " > 
 
                                                                         < d i v   c l a s s = " b t n - g r o u p   b t n - g r o u p - s m " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r _ e d i t & i d = < ? p h p   e c h o   $ u [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - p r i m a r y " > 
 
                                                                                         < i   c l a s s = " f a s   f a - e d i t " > < / i > 
 
                                                                                 < / a > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r _ d e l e t e & i d = < ? p h p   e c h o   $ u [ ' i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n   b t n - o u t l i n e - d a n g e r "   
 
                                                                                       o n c l i c k = " r e t u r n   c o n f i r m ( ' D e l e t e   t h i s   u s e r ? ' ) ; " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r a s h " > < / i > 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < / t d > 
 
                                                         < / t r > 
 
                                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                         < ? p h p   e n d i f ;   ? > 
 
                                 < / t b o d y > 
 
                         < / t a b l e > 
 
                 < / d i v > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - p r i m a r y   t e x t - w h i t e " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - p l u s   m e - 2 " > < / i > A d d   N e w   U s e r < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > U s e r n a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                 < i n p u t   t y p e = " t e x t "   n a m e = " u s e r n a m e "   c l a s s = " f o r m - c o n t r o l "   r e q u i r e d > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > P a s s w o r d   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                 < i n p u t   t y p e = " p a s s w o r d "   n a m e = " p a s s w o r d "   c l a s s = " f o r m - c o n t r o l "   r e q u i r e d > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > F u l l   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                 < i n p u t   t y p e = " t e x t "   n a m e = " f u l l _ n a m e "   c l a s s = " f o r m - c o n t r o l "   r e q u i r e d > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > R o l e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r o l e "   c l a s s = " f o r m - s e l e c t " > 
 
                                         < o p t i o n   v a l u e = " w o r k e r " > W o r k e r < / o p t i o n > 
 
                                         < o p t i o n   v a l u e = " m a n a g e r " > M a n a g e r < / o p t i o n > 
 
                                         < o p t i o n   v a l u e = " a d m i n " > A d m i n < / o p t i o n > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C o m p a n y < / l a b e l > 
 
                                 < s e l e c t   n a m e = " c o m p a n y _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                         < o p t i o n   v a l u e = " " > - -   S e l e c t   C o m p a n y   - - < / o p t i o n > 
 
                                         < ? p h p   f o r e a c h   ( $ c o m p a n i e s   a s   $ c ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( i s s e t ( $ _ G E T [ ' c o m p a n y _ i d ' ] )   & &   $ _ G E T [ ' c o m p a n y _ i d ' ]   = =   $ c [ ' i d ' ] )   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > 
 
                                                 < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S t a t u s < / l a b e l > 
 
                                 < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                         < o p t i o n   v a l u e = " a c t i v e " > A c t i v e < / o p t i o n > 
 
                                         < o p t i o n   v a l u e = " i n a c t i v e " > I n a c t i v e < / o p t i o n > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - p r i m a r y   r o u n d e d - p i l l   p x - 4 " > < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   S a v e < / b u t t o n > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > C a n c e l < / a > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < d i v   c l a s s = " c a r d   b o r d e r - 0   s h a d o w - s m " > 
 
         < d i v   c l a s s = " c a r d - h e a d e r   b g - w a r n i n g   t e x t - d a r k " > 
 
                 < h 5   c l a s s = " f w - b o l d   m b - 0 " > < i   c l a s s = " f a s   f a - u s e r - e d i t   m e - 2 " > < / i > E d i t   U s e r < / h 5 > 
 
         < / d i v > 
 
         < d i v   c l a s s = " c a r d - b o d y " > 
 
                 < ? p h p   i f   ( i s s e t ( $ e r r o r ) ) :   ? > 
 
                         < d i v   c l a s s = " a l e r t   a l e r t - d a n g e r   p y - 1 " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ e r r o r ) ;   ? > < / d i v > 
 
                 < ? p h p   e n d i f ;   ? > 
 
                 < f o r m   m e t h o d = " P O S T "   a c t i o n = " " > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > U s e r n a m e < / l a b e l > 
 
                                 < i n p u t   t y p e = " t e x t "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u s e r [ ' u s e r n a m e ' ]   ? ?   ' ' ) ;   ? > "   d i s a b l e d > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > N e w   P a s s w o r d   ( l e a v e   b l a n k   t o   k e e p   c u r r e n t ) < / l a b e l > 
 
                                 < i n p u t   t y p e = " p a s s w o r d "   n a m e = " p a s s w o r d "   c l a s s = " f o r m - c o n t r o l " > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > F u l l   N a m e   < s p a n   c l a s s = " t e x t - d a n g e r " > * < / s p a n > < / l a b e l > 
 
                                 < i n p u t   t y p e = " t e x t "   n a m e = " f u l l _ n a m e "   c l a s s = " f o r m - c o n t r o l "   v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ u s e r [ ' f u l l _ n a m e ' ]   ? ?   ' ' ) ;   ? > "   r e q u i r e d > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > R o l e < / l a b e l > 
 
                                 < s e l e c t   n a m e = " r o l e "   c l a s s = " f o r m - s e l e c t " > 
 
                                         < o p t i o n   v a l u e = " a d m i n "   < ? p h p   e c h o   ( $ u s e r [ ' r o l e ' ]   ? ?   ' ' )   = =   ' a d m i n '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A d m i n < / o p t i o n > 
 
                                         < o p t i o n   v a l u e = " m a n a g e r "   < ? p h p   e c h o   ( $ u s e r [ ' r o l e ' ]   ? ?   ' ' )   = =   ' m a n a g e r '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > M a n a g e r < / o p t i o n > 
 
                                         < o p t i o n   v a l u e = " w o r k e r "   < ? p h p   e c h o   ( $ u s e r [ ' r o l e ' ]   ? ?   ' ' )   = =   ' w o r k e r '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > W o r k e r < / o p t i o n > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > C o m p a n y < / l a b e l > 
 
                                 < s e l e c t   n a m e = " c o m p a n y _ i d "   c l a s s = " f o r m - s e l e c t " > 
 
                                         < o p t i o n   v a l u e = " " > - -   S e l e c t   C o m p a n y   - - < / o p t i o n > 
 
                                         < ? p h p   f o r e a c h   ( $ c o m p a n i e s   a s   $ c ) :   ? > 
 
                                                 < o p t i o n   v a l u e = " < ? p h p   e c h o   $ c [ ' i d ' ] ;   ? > "   < ? p h p   e c h o   ( $ u s e r [ ' c o m p a n y _ i d ' ]   ? ?   0 )   = =   $ c [ ' i d ' ]   ?   ' s e l e c t e d '   :   ' ' ;   ? > > 
 
                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c [ ' n a m e ' ] ) ;   ? > 
 
                                                 < / o p t i o n > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " m b - 3 " > 
 
                                 < l a b e l   c l a s s = " f o r m - l a b e l   f w - b o l d " > S t a t u s < / l a b e l > 
 
                                 < s e l e c t   n a m e = " s t a t u s "   c l a s s = " f o r m - s e l e c t " > 
 
                                         < o p t i o n   v a l u e = " a c t i v e "   < ? p h p   e c h o   ( $ u s e r [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > A c t i v e < / o p t i o n > 
 
                                         < o p t i o n   v a l u e = " i n a c t i v e "   < ? p h p   e c h o   ( $ u s e r [ ' s t a t u s ' ]   ? ?   ' ' )   = =   ' i n a c t i v e '   ?   ' s e l e c t e d '   :   ' ' ;   ? > > I n a c t i v e < / o p t i o n > 
 
                                 < / s e l e c t > 
 
                         < / d i v > 
 
                         < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n   b t n - w a r n i n g   r o u n d e d - p i l l   p x - 4 " > < i   c l a s s = " f a s   f a - s a v e   m e - 1 " > < / i >   U p d a t e < / b u t t o n > 
 
                         < a   h r e f = " i n d e x . p h p ? a c t i o n = s u p e r a d m i n _ u s e r s "   c l a s s = " b t n   b t n - s e c o n d a r y   r o u n d e d - p i l l   p x - 4 " > C a n c e l < / a > 
 
                 < / f o r m > 
 
         < / d i v > 
 
 < / d i v > 
 
 < s t y l e > 
 
         . t r a c k - c a r d   { 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   1 6 p x ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 p a d d i n g :   3 0 p x ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 m a x - w i d t h :   9 0 0 p x ; 
 
                 m a r g i n :   0   a u t o ; 
 
         } 
 
         . s e a r c h - w r a p p e r   { 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
         } 
 
         . s e a r c h - b o x   { 
 
                 b o r d e r - r a d i u s :   5 0 p x ; 
 
                 o v e r f l o w :   h i d d e n ; 
 
                 b o x - s h a d o w :   0   2 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 0 6 ) ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 d i s p l a y :   f l e x ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r :   2 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . s e a r c h - b o x : f o c u s - w i t h i n   { 
 
                 b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
                 b o x - s h a d o w :   0   4 p x   2 0 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 2 5 ) ; 
 
         } 
 
         . s e a r c h - b o x   i n p u t   { 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   1 2 p x   2 0 p x ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 h e i g h t :   5 4 p x ; 
 
                 f l e x :   1 ; 
 
                 o u t l i n e :   n o n e ; 
 
                 b a c k g r o u n d :   t r a n s p a r e n t ; 
 
         } 
 
         . s e a r c h - b o x   i n p u t : : p l a c e h o l d e r   { 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
         } 
 
         . s e a r c h - b o x   b u t t o n   { 
 
                 b a c k g r o u n d :   # 6 6 7 e e a ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 p a d d i n g :   0   2 5 p x ; 
 
                 f o n t - s i z e :   1 8 p x ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 l e t t e r - s p a c i n g :   0 . 5 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   8 p x ; 
 
         } 
 
         . s e a r c h - b o x   b u t t o n : h o v e r   { 
 
                 b a c k g r o u n d :   # 5 a 6 f d 6 ; 
 
         } 
 
         . s e a r c h - b o x   . s c a n - b t n   { 
 
                 b a c k g r o u n d :   # 2 d 3 7 4 8 ; 
 
                 p a d d i n g :   0   1 5 p x ; 
 
                 b o r d e r - l e f t :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 f o n t - s i z e :   1 6 p x ; 
 
         } 
 
         . s e a r c h - b o x   . s c a n - b t n : h o v e r   { 
 
                 b a c k g r o u n d :   # 1 a 2 0 2 c ; 
 
         } 
 
         . s e a r c h - s u g g e s t i o n s   { 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 t o p :   c a l c ( 1 0 0 %   +   8 p x ) ; 
 
                 l e f t :   0 ; 
 
                 r i g h t :   0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o x - s h a d o w :   0   1 0 p x   4 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 2 ) ; 
 
                 m a x - h e i g h t :   3 0 0 p x ; 
 
                 o v e r f l o w - y :   a u t o ; 
 
                 d i s p l a y :   n o n e ; 
 
                 z - i n d e x :   1 0 5 0 ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
         } 
 
         . s e a r c h - s u g g e s t i o n s   . s u g g e s t i o n - i t e m   { 
 
                 p a d d i n g :   1 0 p x   2 0 p x ; 
 
                 c u r s o r :   p o i n t e r ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # f 0 f 2 f 8 ; 
 
                 t r a n s i t i o n :   b a c k g r o u n d   0 . 1 5 s ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   1 2 p x ; 
 
         } 
 
         . s e a r c h - s u g g e s t i o n s   . s u g g e s t i o n - i t e m : h o v e r   { 
 
                 b a c k g r o u n d :   # f 8 f a f c ; 
 
         } 
 
         . s e a r c h - s u g g e s t i o n s   . s u g g e s t i o n - i t e m   . b a d g e - t y p e   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 p a d d i n g :   2 p x   1 0 p x ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 b a c k g r o u n d :   # e 2 e 8 f 0 ; 
 
                 c o l o r :   # 4 7 5 5 6 9 ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 m a r g i n - l e f t :   a u t o ; 
 
         } 
 
         . s e a r c h - s u g g e s t i o n s   . s u g g e s t i o n - i t e m   . b a d g e - t y p e . c u s t o m e r   { 
 
                 b a c k g r o u n d :   # d b e a f e ; 
 
                 c o l o r :   # 1 d 4 e d 8 ; 
 
         } 
 
         . s e a r c h - s u g g e s t i o n s   . s u g g e s t i o n - i t e m   . b a d g e - t y p e . o r d e r   { 
 
                 b a c k g r o u n d :   # d 1 f a e 5 ; 
 
                 c o l o r :   # 0 6 5 f 4 6 ; 
 
         } 
 
         . r e s u l t - c a r d   { 
 
                 b o r d e r - r a d i u s :   1 2 p x ; 
 
                 b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 p a d d i n g :   2 0 p x ; 
 
                 m a r g i n - t o p :   2 0 p x ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
         } 
 
         . r e s u l t - c a r d : h o v e r   { 
 
                 b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 0 8 ) ; 
 
         } 
 
         . c u s t o m e r - a v a t a r   { 
 
                 w i d t h :   6 0 p x ; 
 
                 h e i g h t :   6 0 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 o b j e c t - f i t :   c o v e r ; 
 
                 b o r d e r :   3 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 b a c k g r o u n d :   # f 1 f 5 f 9 ; 
 
         } 
 
         . c u s t o m e r - a v a t a r : h o v e r   { 
 
                 b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
                 t r a n s f o r m :   s c a l e ( 1 . 0 5 ) ; 
 
         } 
 
         . o r d e r - s t a t u s - s t e p s   { 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 m a r g i n :   1 5 p x   0 ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 p a d d i n g :   0   5 p x ; 
 
         } 
 
         . o r d e r - s t a t u s - s t e p s : : b e f o r e   { 
 
                 c o n t e n t :   ' ' ; 
 
                 p o s i t i o n :   a b s o l u t e ; 
 
                 t o p :   5 0 % ; 
 
                 l e f t :   5 % ; 
 
                 r i g h t :   5 % ; 
 
                 h e i g h t :   4 p x ; 
 
                 b a c k g r o u n d :   # e 2 e 8 f 0 ; 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 5 0 % ) ; 
 
                 z - i n d e x :   1 ; 
 
                 b o r d e r - r a d i u s :   4 p x ; 
 
         } 
 
         . s t e p - i t e m   { 
 
                 d i s p l a y :   f l e x ; 
 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 z - i n d e x :   2 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 p a d d i n g :   0   5 p x ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 f l e x :   1 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
         } 
 
         . s t e p - c i r c l e   { 
 
                 w i d t h :   3 6 p x ; 
 
                 h e i g h t :   3 6 p x ; 
 
                 b o r d e r - r a d i u s :   5 0 % ; 
 
                 b o r d e r :   3 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                 b a c k g r o u n d :   # f f f ; 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 t r a n s i t i o n :   a l l   0 . 4 s   e a s e ; 
 
                 p o s i t i o n :   r e l a t i v e ; 
 
                 z - i n d e x :   3 ; 
 
         } 
 
         . s t e p - c i r c l e . a c t i v e   { 
 
                 b o r d e r - c o l o r :   # 6 6 7 e e a ; 
 
                 b a c k g r o u n d :   # 6 6 7 e e a ; 
 
                 c o l o r :   # f f f ; 
 
                 b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 1 0 2 ,   1 2 6 ,   2 3 4 ,   0 . 3 5 ) ; 
 
         } 
 
         . s t e p - c i r c l e . c o m p l e t e d   { 
 
                 b o r d e r - c o l o r :   # 2 8 a 7 4 5 ; 
 
                 b a c k g r o u n d :   # 2 8 a 7 4 5 ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . s t e p - l a b e l   { 
 
                 f o n t - s i z e :   1 0 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
                 m a r g i n - t o p :   6 p x ; 
 
                 w h i t e - s p a c e :   n o w r a p ; 
 
         } 
 
         . s t e p - l a b e l . a c t i v e   { 
 
                 c o l o r :   # 6 6 7 e e a ; 
 
         } 
 
         . s t e p - l a b e l . c o m p l e t e d   { 
 
                 c o l o r :   # 2 8 a 7 4 5 ; 
 
         } 
 
         . o r d e r - d e t a i l - r o w   { 
 
                 d i s p l a y :   f l e x ; 
 
                 j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
 
                 p a d d i n g :   3 p x   0 ; 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 b o r d e r - b o t t o m :   1 p x   d a s h e d   # e e f 2 f 6 ; 
 
         } 
 
         . o r d e r - d e t a i l - r o w : l a s t - c h i l d   { 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
         } 
 
         . o r d e r - d e t a i l - l a b e l   { 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 c o l o r :   # 4 a 5 5 6 8 ; 
 
         } 
 
         . o r d e r - d e t a i l - v a l u e   { 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
                 f o n t - w e i g h t :   5 0 0 ; 
 
         } 
 
         . o r d e r - d e t a i l - r o w . s h e l f   { 
 
                 b a c k g r o u n d :   # f 0 f d f 4 ; 
 
                 b o r d e r - r a d i u s :   6 p x ; 
 
                 p a d d i n g :   4 p x   8 p x ; 
 
                 m a r g i n - t o p :   4 p x ; 
 
                 b o r d e r - b o t t o m :   n o n e ; 
 
                 b o r d e r :   1 p x   s o l i d   # d c f c e 7 ; 
 
         } 
 
         . o r d e r - d e t a i l - r o w . s h e l f   . o r d e r - d e t a i l - l a b e l   { 
 
                 c o l o r :   # 1 6 a 3 4 a ; 
 
         } 
 
         . o r d e r - d e t a i l - r o w . s h e l f   . o r d e r - d e t a i l - v a l u e   { 
 
                 c o l o r :   # 1 6 a 3 4 a ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
         } 
 
         . n o - r e s u l t   { 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 p a d d i n g :   4 0 p x   0 ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . n o - r e s u l t   i   { 
 
                 f o n t - s i z e :   4 8 p x ; 
 
                 c o l o r :   # c b d 5 e 1 ; 
 
                 d i s p l a y :   b l o c k ; 
 
                 m a r g i n - b o t t o m :   1 6 p x ; 
 
         } 
 
         . b t n - d e l i v e r   { 
 
                 b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 2 8 a 7 4 5   0 % ,   # 2 0 c 9 9 7   1 0 0 % ) ; 
 
                 c o l o r :   # f f f ; 
 
                 b o r d e r :   n o n e ; 
 
                 b o r d e r - r a d i u s :   3 0 p x ; 
 
                 p a d d i n g :   8 p x   2 5 p x ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
                 f o n t - w e i g h t :   6 0 0 ; 
 
                 t r a n s i t i o n :   a l l   0 . 3 s   e a s e ; 
 
                 t e x t - d e c o r a t i o n :   n o n e ; 
 
                 d i s p l a y :   i n l i n e - b l o c k ; 
 
         } 
 
         . b t n - d e l i v e r : h o v e r   { 
 
                 t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
 
                 b o x - s h a d o w :   0   4 p x   1 5 p x   r g b a ( 4 0 ,   1 6 7 ,   6 9 ,   0 . 3 ) ; 
 
                 c o l o r :   # f f f ; 
 
         } 
 
         . c u s t o m e r - i n f o - s e c t i o n   { 
 
                 d i s p l a y :   f l e x ; 
 
                 a l i g n - i t e m s :   c e n t e r ; 
 
                 g a p :   1 5 p x ; 
 
                 p a d d i n g :   1 0 p x   0 ; 
 
                 b o r d e r - b o t t o m :   1 p x   s o l i d   # e e f 2 f 6 ; 
 
                 m a r g i n - b o t t o m :   1 0 p x ; 
 
         } 
 
         . c u s t o m e r - i n f o - s e c t i o n   . c u s t o m e r - d e t a i l s   { 
 
                 f l e x :   1 ; 
 
         } 
 
         . c u s t o m e r - i n f o - s e c t i o n   . c u s t o m e r - n a m e   { 
 
                 f o n t - s i z e :   1 6 p x ; 
 
                 f o n t - w e i g h t :   7 0 0 ; 
 
                 c o l o r :   # 1 a 2 0 2 c ; 
 
         } 
 
         . c u s t o m e r - i n f o - s e c t i o n   . c u s t o m e r - p h o n e   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 c o l o r :   # 7 1 8 0 9 6 ; 
 
         } 
 
         . s c a n - h i n t   { 
 
                 f o n t - s i z e :   1 2 p x ; 
 
                 c o l o r :   # 9 4 a 3 b 8 ; 
 
                 t e x t - a l i g n :   c e n t e r ; 
 
                 m a r g i n - t o p :   8 p x ; 
 
         } 
 
         . s c a n - h i n t   i   { 
 
                 m a r g i n - r i g h t :   4 p x ; 
 
         } 
 
         . p o p o v e r   { 
 
                 m a x - w i d t h :   3 5 0 p x   ! i m p o r t a n t ; 
 
                 f o n t - s i z e :   1 4 p x ; 
 
         } 
 
         . p o p o v e r - h e a d e r   { 
 
                 f o n t - w e i g h t :   b o l d ; 
 
         } 
 
         . p o p o v e r - b o d y   { 
 
                 f o n t - s i z e :   1 3 p x ; 
 
                 p a d d i n g :   1 2 p x   1 5 p x ; 
 
         } 
 
         . s t a t u s - b a d g e   { 
 
                 c u r s o r :   p o i n t e r ; 
 
                 t r a n s i t i o n :   a l l   0 . 2 s ; 
 
         } 
 
         . s t a t u s - b a d g e : h o v e r   { 
 
                 o p a c i t y :   0 . 8 5 ; 
 
                 t r a n s f o r m :   s c a l e ( 1 . 0 5 ) ; 
 
         } 
 
         @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
 
                 . s t e p - l a b e l   {   f o n t - s i z e :   8 p x ;   w h i t e - s p a c e :   n o r m a l ;   } 
 
                 . s t e p - c i r c l e   {   w i d t h :   2 8 p x ;   h e i g h t :   2 8 p x ;   f o n t - s i z e :   1 0 p x ;   } 
 
                 . o r d e r - s t a t u s - s t e p s   {   p a d d i n g :   0 ;   } 
 
                 . s e a r c h - b o x   i n p u t   {   f o n t - s i z e :   1 4 p x ;   h e i g h t :   4 4 p x ;   p a d d i n g :   8 p x   1 6 p x ;   } 
 
                 . s e a r c h - b o x   b u t t o n   {   p a d d i n g :   0   1 6 p x ;   f o n t - s i z e :   1 4 p x ;   } 
 
                 . t r a c k - c a r d   {   p a d d i n g :   1 6 p x ;   } 
 
                 . c u s t o m e r - a v a t a r   {   w i d t h :   4 5 p x ;   h e i g h t :   4 5 p x ;   } 
 
                 . c u s t o m e r - i n f o - s e c t i o n   . c u s t o m e r - n a m e   {   f o n t - s i z e :   1 4 p x ;   } 
 
                 . b t n - d e l i v e r   {   p a d d i n g :   6 p x   1 6 p x ;   f o n t - s i z e :   1 2 p x ;   } 
 
         } 
 
 < / s t y l e > 
 
 
 
 < d i v   c l a s s = " c o n t a i n e r " > 
 
         < d i v   c l a s s = " t r a c k - c a r d " > 
 
                 < h 4   c l a s s = " f w - b o l d   t e x t - c e n t e r   m b - 3 " > 
 
                         < i   c l a s s = " f a s   f a - s e a r c h - l o c a t i o n   m e - 2   t e x t - p r i m a r y " > < / i > O r d e r   T r a c k i n g 
 
                 < / h 4 > 
 
                 < p   c l a s s = " t e x t - m u t e d   t e x t - c e n t e r   m b - 4 " > S e a r c h   b y   C u s t o m e r   N a m e ,   O r d e r   N u m b e r ,   o r   S c a n   B a r c o d e < / p > 
 
 
 
                 < ! - -   = = = = =   S E A R C H   F O R M   = = = = =   - - > 
 
                 < d i v   c l a s s = " s e a r c h - w r a p p e r " > 
 
                         < f o r m   m e t h o d = " P O S T "   a c t i o n = " i n d e x . p h p ? a c t i o n = t r a c k "   c l a s s = " s e a r c h - b o x "   i d = " t r a c k F o r m " > 
 
                                 < i n p u t   t y p e = " t e x t "   i d = " s e a r c h I n p u t "   n a m e = " s e a r c h "   c l a s s = " f o r m - c o n t r o l "   
 
                                               p l a c e h o l d e r = " T y p e   c u s t o m e r   n a m e ,   o r d e r   # ,   o r   s c a n   b a r c o d e . . . "   
 
                                               v a l u e = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h _ t e r m   ? ?   ' ' ) ;   ? > "   
 
                                               a u t o c o m p l e t e = " o f f "   r e q u i r e d > 
 
                                 < b u t t o n   t y p e = " b u t t o n "   c l a s s = " s c a n - b t n "   i d = " s c a n B t n "   t i t l e = " S c a n   B a r c o d e " > 
 
                                         < i   c l a s s = " f a s   f a - c a m e r a " > < / i > 
 
                                 < / b u t t o n > 
 
                                 < b u t t o n   t y p e = " s u b m i t "   c l a s s = " b t n " > 
 
                                         < i   c l a s s = " f a s   f a - s e a r c h   m e - 2 " > < / i >   T r a c k 
 
                                 < / b u t t o n > 
 
                         < / f o r m > 
 
                         < d i v   c l a s s = " s e a r c h - s u g g e s t i o n s "   i d = " s u g g e s t i o n s " > < / d i v > 
 
                         < d i v   c l a s s = " s c a n - h i n t " > 
 
                                 < i   c l a s s = " f a s   f a - b a r c o d e " > < / i >   U s e   b a r c o d e   s c a n n e r   o r   t y p e   m a n u a l l y 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   R E S U L T S   = = = = =   - - > 
 
                 < ? p h p   i f   ( $ _ S E R V E R [ ' R E Q U E S T _ M E T H O D ' ]   = = =   ' P O S T '   | |   i s s e t ( $ _ G E T [ ' s e a r c h ' ] )   | |   $ s h o w _ r e s u l t s ) :   ? > 
 
                         < ? p h p   i f   ( e m p t y ( $ o r d e r s ) ) :   ? > 
 
                                 < d i v   c l a s s = " n o - r e s u l t " > 
 
                                         < i   c l a s s = " f a s   f a - b o x - o p e n " > < / i > 
 
                                         < p > N o   o r d e r s   f o u n d   f o r   " < s t r o n g > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s e a r c h _ t e r m   ? ?   ' ' ) ;   ? > < / s t r o n g > " < / p > 
 
                                         < s m a l l   c l a s s = " t e x t - m u t e d " > P l e a s e   c h e c k   t h e   s p e l l i n g   o r   t r y   a   d i f f e r e n t   s e a r c h   t e r m . < / s m a l l > 
 
                                 < / d i v > 
 
                         < ? p h p   e l s e :   ? > 
 
                                 < ? p h p   f o r e a c h   ( $ o r d e r s   a s   $ o r d e r ) :   
 
                                         $ s t a t u s   =   $ o r d e r [ ' s u i t _ s t a t u s ' ] ;   / /                                 s t a t u s 
 
                                         $ s t e p s   =   [ ' p e n d i n g '   = >   ' P e n d i n g ' ,   ' c u t t i n g '   = >   ' C u t t i n g ' ,   ' s t i t c h i n g '   = >   ' S t i t c h i n g ' ,   ' r e a d y '   = >   ' R e a d y ' ,   ' d e l i v e r e d '   = >   ' D e l i v e r e d ' ] ; 
 
                                         $ s t a t u s _ i n d e x   =   a r r a y _ s e a r c h ( $ s t a t u s ,   a r r a y _ k e y s ( $ s t e p s ) ) ; 
 
                                         i f   ( $ s t a t u s _ i n d e x   = = =   f a l s e )   $ s t a t u s _ i n d e x   =   0 ; 
 
                                         $ s t e p _ k e y s   =   a r r a y _ k e y s ( $ s t e p s ) ; 
 
                                         
 
                                         $ p r o f i l e _ p i c   =   $ o r d e r [ ' p r o f i l e _ p i c ' ]   ? ?   ' d u m m y _ c u s t o m e r . p n g ' ; 
 
                                         $ p r o f i l e _ p i c _ p a t h   =   ' a s s e t s / u p l o a d s / c u s t o m e r s / '   .   $ p r o f i l e _ p i c ; 
 
                                         $ a v a t a r _ u r l   =   ( f i l e _ e x i s t s ( $ p r o f i l e _ p i c _ p a t h )   & &   $ p r o f i l e _ p i c   ! =   ' d u m m y _ c u s t o m e r . p n g ' )   ?   $ p r o f i l e _ p i c _ p a t h   :   ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = '   .   u r l e n c o d e ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' U s e r ' )   .   ' & b a c k g r o u n d = 6 6 7 e e a & c o l o r = f f f & s i z e = 6 0 ' ; 
 
                                         
 
                                         $ s h e l f   =   n u l l ; 
 
                                         i f   ( ! e m p t y ( $ o r d e r [ ' s h e l f _ n a m e ' ] ) )   { 
 
                                                 $ s h e l f   =   [ 
 
                                                         ' s h e l f _ n a m e '   = >   $ o r d e r [ ' s h e l f _ n a m e ' ] , 
 
                                                         ' s h e l f _ n u m b e r '   = >   $ o r d e r [ ' s h e l f _ n u m b e r ' ] , 
 
                                                         ' r a c k _ l o c a t i o n '   = >   $ o r d e r [ ' r a c k _ l o c a t i o n ' ]   ? ?   ' ' 
 
                                                 ] ; 
 
                                         } 
 
                                         
 
                                         $ p o p o v e r _ t i t l e   =   u c f i r s t ( $ s t a t u s ) ; 
 
                                         $ p o p o v e r _ c o n t e n t   =   ' ' ; 
 
                                         $ b a d g e _ c l a s s   =   ' s e c o n d a r y ' ; 
 
                                         s w i t c h ( $ s t a t u s )   { 
 
                                                 c a s e   ' p e n d i n g ' : 
 
                                                         $ b a d g e _ c l a s s   =   ' w a r n i n g ' ; 
 
                                                         $ p o p o v e r _ c o n t e n t   =   '      O r d e r   i s   p e n d i n g .   W a i t i n g   f o r   a s s i g n m e n t . ' ; 
 
                                                         b r e a k ; 
 
                                                 c a s e   ' c u t t i n g ' : 
 
                                                         $ b a d g e _ c l a s s   =   ' i n f o ' ; 
 
                                                         $ c u t t e r   =   ! e m p t y ( $ o r d e r [ ' c u t t e r _ n a m e ' ] )   ?   $ o r d e r [ ' c u t t e r _ n a m e ' ]   :   ' N o t   a s s i g n e d   y e t ' ; 
 
                                                         $ p o p o v e r _ c o n t e n t   =   '  S      C u t t e r :   '   .   h t m l s p e c i a l c h a r s ( $ c u t t e r ) ; 
 
                                                         i f   ( ! e m p t y ( $ o r d e r [ ' c u t t i n g _ d a t e ' ] ) )   { 
 
                                                                 $ p o p o v e r _ c o n t e n t   . =   ' < b r >  x &   D a t e :   '   .   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' c u t t i n g _ d a t e ' ] ) ) ; 
 
                                                         } 
 
                                                         b r e a k ; 
 
                                                 c a s e   ' s t i t c h i n g ' : 
 
                                                         $ b a d g e _ c l a s s   =   ' p r i m a r y ' ; 
 
                                                         $ t a i l o r   =   ! e m p t y ( $ o r d e r [ ' t a i l o r _ n a m e ' ] )   ?   $ o r d e r [ ' t a i l o r _ n a m e ' ]   :   ' N o t   a s s i g n e d   y e t ' ; 
 
                                                         $ p o p o v e r _ c o n t e n t   =   '  x    T a i l o r :   '   .   h t m l s p e c i a l c h a r s ( $ t a i l o r ) ; 
 
                                                         i f   ( ! e m p t y ( $ o r d e r [ ' s t i t c h i n g _ d a t e ' ] ) )   { 
 
                                                                 $ p o p o v e r _ c o n t e n t   . =   ' < b r >  x &   D a t e :   '   .   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' s t i t c h i n g _ d a t e ' ] ) ) ; 
 
                                                         } 
 
                                                         b r e a k ; 
 
                                                 c a s e   ' r e a d y ' : 
 
                                                         $ b a d g e _ c l a s s   =   ' s u c c e s s ' ; 
 
                                                         i f   ( ! e m p t y ( $ s h e l f [ ' s h e l f _ n a m e ' ] ) )   { 
 
                                                                 $ p o p o v e r _ c o n t e n t   =   '  x    S h e l f :   '   .   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n a m e ' ] )   .   '   ( '   .   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n u m b e r ' ] )   .   ' ) ' ; 
 
                                                                 i f   ( ! e m p t y ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) )   { 
 
                                                                         $ p o p o v e r _ c o n t e n t   . =   ' < b r >  x    L o c a t i o n :   '   .   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) ; 
 
                                                                 } 
 
                                                         }   e l s e   { 
 
                                                                 $ p o p o v e r _ c o n t e n t   =   '  S&   O r d e r   i s   r e a d y .   N o   s h e l f   a s s i g n e d . ' ; 
 
                                                         } 
 
                                                         b r e a k ; 
 
                                                 c a s e   ' d e l i v e r e d ' : 
 
                                                         $ b a d g e _ c l a s s   =   ' s e c o n d a r y ' ; 
 
                                                         $ p o p o v e r _ c o n t e n t   =   '  x    D e l i v e r e d   o n :   '   .   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) ) ; 
 
                                                         i f   ( ! e m p t y ( $ o r d e r [ ' r e c e i v e d _ b y ' ] ) )   { 
 
                                                                 $ p o p o v e r _ c o n t e n t   . =   ' < b r >  x    R e c e i v e d   b y :   '   .   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' r e c e i v e d _ b y ' ] ) ; 
 
                                                         } 
 
                                                         b r e a k ; 
 
                                                 c a s e   ' c a n c e l l e d ' : 
 
                                                         $ b a d g e _ c l a s s   =   ' d a n g e r ' ; 
 
                                                         $ p o p o v e r _ c o n t e n t   =   '   R  O r d e r   c a n c e l l e d . ' ; 
 
                                                         b r e a k ; 
 
                                                 d e f a u l t : 
 
                                                         $ b a d g e _ c l a s s   =   ' s e c o n d a r y ' ; 
 
                                                         $ p o p o v e r _ c o n t e n t   =   ' S t a t u s :   '   .   u c f i r s t ( $ s t a t u s ) ; 
 
                                         } 
 
                                 ? > 
 
                                         < d i v   c l a s s = " r e s u l t - c a r d " > 
 
                                                 < ! - -   = = = = =   C U S T O M E R   I N F O   = = = = =   - - > 
 
                                                 < d i v   c l a s s = " c u s t o m e r - i n f o - s e c t i o n " > 
 
                                                         < i m g   s r c = " < ? p h p   e c h o   $ a v a t a r _ u r l ;   ? > "   
 
                                                                   a l t = " C u s t o m e r "   
 
                                                                   c l a s s = " c u s t o m e r - a v a t a r " 
 
                                                                   o n e r r o r = " t h i s . s r c = ' h t t p s : / / u i - a v a t a r s . c o m / a p i / ? n a m e = < ? p h p   e c h o   u r l e n c o d e ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ]   ? ?   ' U s e r ' ) ;   ? > & b a c k g r o u n d = 6 6 7 e e a & c o l o r = f f f & s i z e = 6 0 ' " > 
 
                                                         < d i v   c l a s s = " c u s t o m e r - d e t a i l s " > 
 
                                                                 < d i v   c l a s s = " c u s t o m e r - n a m e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / d i v > 
 
                                                                 < d i v   c l a s s = " c u s t o m e r - p h o n e " > < i   c l a s s = " f a s   f a - p h o n e   m e - 1 " > < / i > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / d i v > 
 
                                                         < / d i v > 
 
                                                         < d i v > 
 
                                                                 < s p a n   c l a s s = " b a d g e   b g - < ? p h p   e c h o   $ b a d g e _ c l a s s ;   ? >   r o u n d e d - p i l l   p x - 3   p y - 2   f s - 6   s t a t u s - b a d g e "   
 
                                                                             d a t a - b s - t o g g l e = " p o p o v e r "   
 
                                                                             d a t a - b s - t r i g g e r = " c l i c k "   
 
                                                                             d a t a - b s - p l a c e m e n t = " t o p " 
 
                                                                             d a t a - b s - t i t l e = " < ? p h p   e c h o   $ p o p o v e r _ t i t l e ;   ? > "   
 
                                                                             d a t a - b s - c o n t e n t = " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ p o p o v e r _ c o n t e n t ) ;   ? > " > 
 
                                                                         < ? p h p   e c h o   u c f i r s t ( $ s t a t u s ) ;   ? > 
 
                                                                         < i   c l a s s = " f a s   f a - i n f o - c i r c l e   m s - 1 "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > < / i > 
 
                                                                 < / s p a n > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
 
 
                                                 < d i v   c l a s s = " r o w " > 
 
                                                         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                                                 < d i v   c l a s s = " o r d e r - d e t a i l - r o w " > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - l a b e l " > O r d e r   # < / s p a n > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s p a n > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " o r d e r - d e t a i l - r o w " > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - l a b e l " > O r d e r   D a t e < / s p a n > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / s p a n > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " o r d e r - d e t a i l - r o w " > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - l a b e l " > D e l i v e r y   D a t e < / s p a n > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - v a l u e " > < ? p h p   e c h o   $ o r d e r [ ' d e l i v e r y _ d a t e ' ]   ?   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) )   :   ' - ' ;   ? > < / s p a n > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " o r d e r - d e t a i l - r o w " > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - l a b e l " > T o t a l   S u i t s < / s p a n > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - v a l u e " > < ? p h p   e c h o   ( i n t ) ( $ o r d e r [ ' t o t a l _ s u i t s ' ]   ? ?   0 ) ;   ? > < / s p a n > 
 
                                                                 < / d i v > 
 
                                                                 < d i v   c l a s s = " o r d e r - d e t a i l - r o w " > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - l a b e l " > T o t a l   A m o u n t < / s p a n > 
 
                                                                         < s p a n   c l a s s = " o r d e r - d e t a i l - v a l u e " > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ]   ? ?   0 ,   0 ) ;   ? > < / s p a n > 
 
                                                                 < / d i v > 
 
                                                                 < ? p h p   i f   ( ! e m p t y ( $ s h e l f )   & &   $ s t a t u s   = =   ' r e a d y ' ) :   ? > 
 
                                                                         < d i v   c l a s s = " o r d e r - d e t a i l - r o w   s h e l f " > 
 
                                                                                 < s p a n   c l a s s = " o r d e r - d e t a i l - l a b e l " > < i   c l a s s = " f a s   f a - a r c h i v e   m e - 1 " > < / i >   S h e l f   L o c a t i o n < / s p a n > 
 
                                                                                 < s p a n   c l a s s = " o r d e r - d e t a i l - v a l u e " > 
 
                                                                                         < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' s h e l f _ n a m e ' ]   .   '   -   '   .   $ s h e l f [ ' s h e l f _ n u m b e r ' ] ) ;   ? > 
 
                                                                                         < ? p h p   i f   ( ! e m p t y ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) ) :   ? > 
 
                                                                                                 ( < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s h e l f [ ' r a c k _ l o c a t i o n ' ] ) ;   ? > ) 
 
                                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                                 < / s p a n > 
 
                                                                         < / d i v > 
 
                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                         < / d i v > 
 
                                                         < d i v   c l a s s = " c o l - m d - 6 " > 
 
                                                                 < ! - -   = = = = =   S T A T U S   S T E P S   = = = = =   - - > 
 
                                                                 < d i v   c l a s s = " o r d e r - s t a t u s - s t e p s " > 
 
                                                                         < ? p h p   f o r   ( $ i   =   0 ;   $ i   <   c o u n t ( $ s t e p _ k e y s ) ;   $ i + + ) : 
 
                                                                                 $ k e y   =   $ s t e p _ k e y s [ $ i ] ; 
 
                                                                                 $ i s _ a c t i v e   =   ( $ i   = =   $ s t a t u s _ i n d e x ) ; 
 
                                                                                 $ i s _ c o m p l e t e d   =   ( $ i   <   $ s t a t u s _ i n d e x ) ; 
 
                                                                                 $ l a b e l   =   $ s t e p s [ $ k e y ] ; 
 
                                                                         ? > 
 
                                                                                 < d i v   c l a s s = " s t e p - i t e m " > 
 
                                                                                         < d i v   c l a s s = " s t e p - c i r c l e   < ? p h p   e c h o   $ i s _ c o m p l e t e d   ?   ' c o m p l e t e d '   :   ( $ i s _ a c t i v e   ?   ' a c t i v e '   :   ' ' ) ;   ? > " > 
 
                                                                                                 < ? p h p   i f   ( $ i s _ c o m p l e t e d ) :   ? > 
 
                                                                                                         < i   c l a s s = " f a s   f a - c h e c k "   s t y l e = " f o n t - s i z e : 1 2 p x ; " > < / i > 
 
                                                                                                 < ? p h p   e l s e :   ? > 
 
                                                                                                         < ? p h p   e c h o   $ i   +   1 ;   ? > 
 
                                                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                                                         < / d i v > 
 
                                                                                         < d i v   c l a s s = " s t e p - l a b e l   < ? p h p   e c h o   $ i s _ c o m p l e t e d   ?   ' c o m p l e t e d '   :   ( $ i s _ a c t i v e   ?   ' a c t i v e '   :   ' ' ) ;   ? > " > 
 
                                                                                                 < ? p h p   e c h o   $ l a b e l ;   ? > 
 
                                                                                         < / d i v > 
 
                                                                                 < / d i v > 
 
                                                                         < ? p h p   e n d f o r ;   ? > 
 
                                                                 < / d i v > 
 
 
 
                                                                 < ! - -   = = = = =   S T A T U S   M E S S A G E   = = = = =   - - > 
 
                                                                 < d i v   c l a s s = " t e x t - c e n t e r   m t - 2 " > 
 
                                                                         < ? p h p   i f   ( $ s t a t u s   = =   ' d e l i v e r e d ' ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " t e x t - s u c c e s s " > < i   c l a s s = " f a s   f a - c h e c k - c i r c l e   m e - 1 " > < / i >   < s t r o n g > D e l i v e r e d < / s t r o n g > < / s p a n > 
 
                                                                         < ? p h p   e l s e i f   ( $ s t a t u s   = =   ' p e n d i n g ' ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " t e x t - w a r n i n g " > < i   c l a s s = " f a s   f a - c l o c k   m e - 1 " > < / i >   < s t r o n g > I n   Q u e u e < / s t r o n g > < / s p a n > 
 
                                                                         < ? p h p   e l s e i f   ( $ s t a t u s   = =   ' c a n c e l l e d ' ) :   ? > 
 
                                                                                 < s p a n   c l a s s = " t e x t - d a n g e r " > < i   c l a s s = " f a s   f a - t i m e s - c i r c l e   m e - 1 " > < / i >   < s t r o n g > C a n c e l l e d < / s t r o n g > < / s p a n > 
 
                                                                         < ? p h p   e l s e :   ? > 
 
                                                                                 < s p a n   c l a s s = " t e x t - p r i m a r y " > < i   c l a s s = " f a s   f a - s p i n n e r   f a - p u l s e   m e - 1 " > < / i >   < s t r o n g > I n   P r o g r e s s < / s t r o n g > < / s p a n > 
 
                                                                         < ? p h p   e n d i f ;   ? > 
 
                                                                 < / d i v > 
 
 
 
                                                                 < ! - -   = = = = =   D E L I V E R Y   B U T T O N   = = = = =   - - > 
 
                                                                 < ? p h p   i f   ( $ s t a t u s   = =   ' r e a d y ' ) :   ? > 
 
                                                                         < d i v   c l a s s = " t e x t - c e n t e r   m t - 2 " > 
 
                                                                                 < a   h r e f = " i n d e x . p h p ? a c t i o n = d e l i v e r y _ d e l i v e r & i d = < ? p h p   e c h o   $ o r d e r [ ' o r d e r _ i d ' ] ;   ? > "   
 
                                                                                       c l a s s = " b t n - d e l i v e r " > 
 
                                                                                         < i   c l a s s = " f a s   f a - t r u c k " > < / i >   D e l i v e r   N o w 
 
                                                                                 < / a > 
 
                                                                         < / d i v > 
 
                                                                 < ? p h p   e n d i f ;   ? > 
 
                                                         < / d i v > 
 
                                                 < / d i v > 
 
                                         < / d i v > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < ? p h p   e n d i f ;   ? > 
 
         < / d i v > 
 
 < / d i v > 
 
 
 
 < s c r i p t > 
 
 d o c u m e n t . a d d E v e n t L i s t e n e r ( ' D O M C o n t e n t L o a d e d ' ,   f u n c t i o n ( )   { 
 
         c o n s t   s e a r c h I n p u t   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s e a r c h I n p u t ' ) ; 
 
         c o n s t   s u g g e s t i o n s   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s u g g e s t i o n s ' ) ; 
 
         c o n s t   t r a c k F o r m   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' t r a c k F o r m ' ) ; 
 
         c o n s t   s c a n B t n   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' s c a n B t n ' ) ; 
 
 
 
         / /   = = = = =   I N I T I A L I Z E   P O P O V E R S   = = = = = 
 
         v a r   p o p o v e r T r i g g e r L i s t   =   [ ] . s l i c e . c a l l ( d o c u m e n t . q u e r y S e l e c t o r A l l ( ' [ d a t a - b s - t o g g l e = " p o p o v e r " ] ' ) ) ; 
 
         v a r   p o p o v e r L i s t   =   p o p o v e r T r i g g e r L i s t . m a p ( f u n c t i o n   ( p o p o v e r T r i g g e r E l )   { 
 
                 r e t u r n   n e w   b o o t s t r a p . P o p o v e r ( p o p o v e r T r i g g e r E l ,   { 
 
                         h t m l :   t r u e , 
 
                         t r i g g e r :   ' c l i c k ' , 
 
                         c o n t a i n e r :   ' b o d y ' 
 
                 } ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   C L O S E   P O P O V E R   O N   C L I C K   O U T S I D E   = = = = = 
 
         d o c u m e n t . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ! e . t a r g e t . c l o s e s t ( ' [ d a t a - b s - t o g g l e = " p o p o v e r " ] ' )   & &   ! e . t a r g e t . c l o s e s t ( ' . p o p o v e r ' ) )   { 
 
                         d o c u m e n t . q u e r y S e l e c t o r A l l ( ' [ d a t a - b s - t o g g l e = " p o p o v e r " ] ' ) . f o r E a c h ( f u n c t i o n ( e l )   { 
 
                                 v a r   p o p o v e r   =   b o o t s t r a p . P o p o v e r . g e t I n s t a n c e ( e l ) ; 
 
                                 i f   ( p o p o v e r )   { 
 
                                         p o p o v e r . h i d e ( ) ; 
 
                                 } 
 
                         } ) ; 
 
                 } 
 
         } ) ; 
 
 
 
         / /   = = = = =   S E A R C H   A U T O - S U G G E S T   = = = = = 
 
         l e t   s e a r c h T i m e o u t   =   n u l l ; 
 
 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' i n p u t ' ,   f u n c t i o n ( )   { 
 
                 c o n s t   q u e r y   =   t h i s . v a l u e . t r i m ( ) ; 
 
                 i f   ( q u e r y . l e n g t h   <   2 )   { 
 
                         s u g g e s t i o n s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         r e t u r n ; 
 
                 } 
 
 
 
                 i f   ( s e a r c h T i m e o u t )   c l e a r T i m e o u t ( s e a r c h T i m e o u t ) ; 
 
                 s e a r c h T i m e o u t   =   s e t T i m e o u t ( f u n c t i o n ( )   { 
 
                         f e t c h ( ' i n d e x . p h p ? a c t i o n = t r a c k _ l i v e & t e r m = '   +   e n c o d e U R I C o m p o n e n t ( q u e r y ) ) 
 
                                 . t h e n ( r e s   = >   r e s . j s o n ( ) ) 
 
                                 . t h e n ( d a t a   = >   { 
 
                                         s u g g e s t i o n s . i n n e r H T M L   =   ' ' ; 
 
                                         i f   ( d a t a . l e n g t h   = = =   0 )   { 
 
                                                 s u g g e s t i o n s . i n n e r H T M L   =   ' < d i v   c l a s s = " s u g g e s t i o n - i t e m   t e x t - m u t e d " > N o   r e s u l t s   f o u n d < / d i v > ' ; 
 
                                                 s u g g e s t i o n s . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                                         }   e l s e   { 
 
                                                 d a t a . f o r E a c h ( i t e m   = >   { 
 
                                                         c o n s t   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ; 
 
                                                         d i v . c l a s s N a m e   =   ' s u g g e s t i o n - i t e m ' ; 
 
                                                         c o n s t   b a d g e C l a s s   =   i t e m . t y p e   = = =   ' c u s t o m e r '   ?   ' c u s t o m e r '   :   ' o r d e r ' ; 
 
                                                         c o n s t   i c o n   =   i t e m . t y p e   = = =   ' c u s t o m e r '   ?   '  x  '   :   '  x  ' ; 
 
                                                         d i v . d a t a s e t . v a l u e   =   i t e m . v a l u e ; 
 
                                                         d i v . i n n e r H T M L   =   ` 
 
                                                                 < s p a n > $ { i c o n } < / s p a n > 
 
                                                                 < s p a n > $ { i t e m . l a b e l } < / s p a n > 
 
                                                                 < s p a n   c l a s s = " b a d g e - t y p e   $ { b a d g e C l a s s } " > $ { i t e m . t y p e } < / s p a n > 
 
                                                         ` ; 
 
                                                         d i v . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                                                                 s e a r c h I n p u t . v a l u e   =   t h i s . d a t a s e t . v a l u e ; 
 
                                                                 s u g g e s t i o n s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                                                 t r a c k F o r m . s u b m i t ( ) ; 
 
                                                         } ) ; 
 
                                                         s u g g e s t i o n s . a p p e n d C h i l d ( d i v ) ; 
 
                                                 } ) ; 
 
                                                 s u g g e s t i o n s . s t y l e . d i s p l a y   =   ' b l o c k ' ; 
 
                                         } 
 
                                 } ) 
 
                                 . c a t c h ( e r r   = >   { 
 
                                         c o n s o l e . e r r o r ( ' S e a r c h   e r r o r : ' ,   e r r ) ; 
 
                                         s u g g e s t i o n s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                                 } ) ; 
 
                 } ,   3 0 0 ) ; 
 
         } ) ; 
 
 
 
         / /   = = = = =   C L O S E   S U G G E S T I O N S   O N   C L I C K   O U T S I D E   = = = = = 
 
         d o c u m e n t . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( ! e . t a r g e t . c l o s e s t ( ' . s e a r c h - w r a p p e r ' ) )   { 
 
                         s u g g e s t i o n s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                 } 
 
         } ) ; 
 
 
 
         / /   = = = = =   S C A N   B U T T O N   = = = = = 
 
         s c a n B t n . a d d E v e n t L i s t e n e r ( ' c l i c k ' ,   f u n c t i o n ( )   { 
 
                 c o n s t   b a r c o d e   =   p r o m p t ( ' E n t e r   b a r c o d e   ( O r d e r   #   o r   C u s t o m e r   # ) : ' ) ; 
 
                 i f   ( b a r c o d e   & &   b a r c o d e . t r i m ( )   ! = =   ' ' )   { 
 
                         s e a r c h I n p u t . v a l u e   =   b a r c o d e . t r i m ( ) ; 
 
                         t r a c k F o r m . s u b m i t ( ) ; 
 
                 } 
 
         } ) ; 
 
 
 
         / /   = = = = =   E N T E R   K E Y   S U B M I T   = = = = = 
 
         s e a r c h I n p u t . a d d E v e n t L i s t e n e r ( ' k e y d o w n ' ,   f u n c t i o n ( e )   { 
 
                 i f   ( e . k e y   = = =   ' E n t e r ' )   { 
 
                         s u g g e s t i o n s . s t y l e . d i s p l a y   =   ' n o n e ' ; 
 
                         t r a c k F o r m . s u b m i t ( ) ; 
 
                 } 
 
         } ) ; 
 
 } ) ; 
 
 < / s c r i p t > 
 
 < ? p h p   / /   A u t o - g e n e r a t e d   p l a c e h o l d e r   ? > 
 
 < ? p h p 
 
 r e q u i r e _ o n c e   ' . . / a p p / c o n f i g / d a t a b a s e . p h p ' ; 
 
 r e q u i r e _ o n c e   ' . . / a p p / c o r e / A u t h . p h p ' ; 
 
 A u t h : : r e q u i r e L o g i n ( ) ; 
 
 
 
 $ o r d e r _ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
 i f   ( ! $ o r d e r _ i d )   { 
 
         d i e ( ' O r d e r   I D   r e q u i r e d . ' ) ; 
 
 } 
 
 
 
 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
 $ s t m t   =   $ d b - > p r e p a r e ( " 
 
         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   c . p h o n e ,   c . a d d r e s s   
 
         F R O M   o r d e r s   o   
 
         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d   
 
         W H E R E   o . i d   =   ?   A N D   o . c o m p a n y _ i d   =   ? 
 
 " ) ; 
 
 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ c o m p a n y _ i d ] ) ; 
 
 $ o r d e r   =   $ s t m t - > f e t c h ( ) ; 
 
 i f   ( ! $ o r d e r )   { 
 
         d i e ( ' O r d e r   n o t   f o u n d . ' ) ; 
 
 } 
 
 
 
 $ s t m t   =   $ d b - > p r e p a r e ( " S E L E C T   *   F R O M   o r d e r _ s u i t s   W H E R E   o r d e r _ i d   =   ?   A N D   c o m p a n y _ i d   =   ?   O R D E R   B Y   s u i t _ n u m b e r " ) ; 
 
 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ c o m p a n y _ i d ] ) ; 
 
 $ s u i t s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
 
 
 $ c o m p a n y _ i n f o   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e >               -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   {   
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   ' C o u r i e r   N e w ' ,   m o n o s p a c e ;   
 
                         b a c k g r o u n d :   # f f f ;   
 
                         p a d d i n g :   0 ;   
 
                         m a r g i n :   0 ; 
 
                         w i d t h :   8 0 m m ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . c o n t a i n e r   {   
 
                         w i d t h :   8 0 m m ;   
 
                         p a d d i n g :   3 m m   2 m m ;   
 
                         b a c k g r o u n d :   # f f f ; 
 
                         f o n t - s i z e :   9 p x ; 
 
                         l i n e - h e i g h t :   1 . 3 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . h e a d e r   {   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         b o r d e r - b o t t o m :   2 p x   d a s h e d   # 3 3 3 ;   
 
                         p a d d i n g - b o t t o m :   4 p x ;   
 
                         m a r g i n - b o t t o m :   4 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   {   
 
                         f o n t - s i z e :   1 6 p x ;   
 
                         f o n t - w e i g h t :   7 0 0 ;   
 
                         m a r g i n :   0 ;   
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . h e a d e r   s m a l l   {   
 
                         f o n t - s i z e :   8 p x ;   
 
                         c o l o r :   # 6 6 6 ;   
 
                         d i s p l a y :   b l o c k ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n :   3 p x   0 ;   p a d d i n g :   3 p x   0 ;   } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   {   m a x - w i d t h :   7 0 m m ;   h e i g h t :   a u t o ;   } 
 
                 . i n f o - g r i d   {   
 
                         d i s p l a y :   g r i d ;   
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   
 
                         g a p :   2 p x   6 p x ;   
 
                         p a d d i n g :   4 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ; 
 
                         m a r g i n - b o t t o m :   3 p x ; 
 
                         f o n t - s i z e :   9 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . l a b e l   {   f o n t - w e i g h t :   6 0 0 ;   c o l o r :   # 5 5 5 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . i n f o - g r i d   . v a l u e   {   c o l o r :   # 0 0 0 ;   f o n t - w e i g h t :   5 0 0 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 t a b l e   {   w i d t h :   1 0 0 % ;   b o r d e r - c o l l a p s e :   c o l l a p s e ;   m a r g i n :   3 p x   0 ;   f o n t - s i z e :   8 p x ;   } 
 
                 t h e a d   t h   {   
 
                         b a c k g r o u n d :   # f 0 f 0 f 0 ;   
 
                         p a d d i n g :   2 p x   3 p x ;   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         f o n t - s i z e :   8 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # 3 3 3 ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t b o d y   t d   {   
 
                         p a d d i n g :   2 p x   3 p x ;   
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # d d d ;   
 
                         f o n t - s i z e :   8 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t b o d y   t d : l a s t - c h i l d   {   t e x t - a l i g n :   l e f t ;   } 
 
                 . t o t a l s   {   m a r g i n - t o p :   3 p x ;   p a d d i n g - t o p :   3 p x ;   b o r d e r - t o p :   2 p x   s o l i d   # 3 3 3 ;   } 
 
                 . t o t a l s   . r o w   {   d i s p l a y :   f l e x ;   j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   p a d d i n g :   1 p x   0 ;   f o n t - s i z e :   9 p x ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . t o t a l s   . r o w . t o t a l   {   f o n t - w e i g h t :   7 0 0 ;   f o n t - s i z e :   1 1 p x ;   b o r d e r - t o p :   1 p x   s o l i d   # 3 3 3 ;   p a d d i n g - t o p :   3 p x ;   m a r g i n - t o p :   2 p x ;   } 
 
                 . f o o t e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n - t o p :   4 p x ;   p a d d i n g - t o p :   4 p x ;   b o r d e r - t o p :   2 p x   d a s h e d   # 3 3 3 ;   c o l o r :   # 6 6 6 ;   f o n t - s i z e :   8 p x ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . f o o t e r   p   {   m a r g i n :   1 p x   0 ;   } 
 
                 . p r i n t - b t n   {   d i s p l a y :   n o n e ;   } 
 
                 @ m e d i a   p r i n t   {   
 
                         b o d y   {   w i d t h :   1 0 0 % ;   m a r g i n :   0 ;   p a d d i n g :   0 ;   } 
 
                         . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   p a d d i n g :   2 m m ;   } 
 
                         . n o - p r i n t   {   d i s p l a y :   n o n e ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
                 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' n a m e ' ]   ? ?   '    `            ' ) ;   ? > < / h 2 > 
 
                         < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                         < s m a l l >       :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                         < s m a l l   s t y l e = " f o n t - w e i g h t : 7 0 0 ; f o n t - s i z e : 1 0 p x ; " >    `                  < / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >               # < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >        `  < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' o r d e r _ d a t e ' ] ) ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >        !   < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >       < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > < / d i v > 
 
                         < ? p h p   i f   ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) :   ? > 
 
                         < d i v   s t y l e = " g r i d - c o l u m n :   s p a n   2 ; " > < s p a n   c l a s s = " l a b e l " >  `   `    `         `  < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ o r d e r [ ' d e l i v e r y _ d a t e ' ] ) ) ;   ? > < / s p a n > < / d i v > 
 
                         < ? p h p   e n d i f ;   ? > 
 
                 < / d i v > 
 
 
 
                 < t a b l e > 
 
                         < t h e a d > 
 
                                 < t r > 
 
                                         < t h   s t y l e = " w i d t h : 1 0 % ; " > # < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 3 5 % ; " >      < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 1 5 % ; " >         < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 4 0 % ; " >      & < / t h > 
 
                                 < / t r > 
 
                         < / t h e a d > 
 
                         < t b o d y > 
 
                                 < ? p h p   i f   ( e m p t y ( $ s u i t s ) ) :   ? > 
 
                                         < t r > < t d   c o l s p a n = " 4 "   s t y l e = " t e x t - a l i g n : c e n t e r ; " >    `     !      `          !    &    `    < / t d > < / t r > 
 
                                 < ? p h p   e l s e :   ? > 
 
                                         < ? p h p   f o r e a c h   ( $ s u i t s   a s   $ s u i t ) :   ? > 
 
                                                 < t r > 
 
                                                         < t d > < ? p h p   e c h o   $ s u i t [ ' s u i t _ n u m b e r ' ] ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s u i t _ t y p e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ s u i t [ ' s i z e ' ] ) ;   ? > < / t d > 
 
                                                         < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ s u i t [ ' p r i c e ' ]   ? ?   0 ,   0 ) ;   ? > < / t d > 
 
                                                 < / t r > 
 
                                         < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < ? p h p   e n d i f ;   ? > 
 
                         < / t b o d y > 
 
                 < / t a b l e > 
 
 
 
                 < d i v   c l a s s = " t o t a l s " > 
 
                         < d i v   c l a s s = " r o w " > < s p a n >    `   `      : < / s p a n > < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' t o t a l _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " r o w " > < s p a n >  `              : < / s p a n > < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d i s c o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " r o w   t o t a l " > < s p a n >                & : < / s p a n > < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' n e t _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " r o w " > < s p a n >          `: < / s p a n > < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v   c l a s s = " r o w   t o t a l " > < s p a n >        `: < / s p a n > < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d u e _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < p >     !           `                        &  !           `! < / p > 
 
                         < p > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / p > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < s c r i p t > 
 
                 J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > " ,   { 
 
                         f o r m a t :   " C O D E 1 2 8 " , 
 
                         w i d t h :   1 . 5 , 
 
                         h e i g h t :   2 8 , 
 
                         d i s p l a y V a l u e :   t r u e , 
 
                         f o n t :   " m o n o s p a c e " , 
 
                         f o n t S i z e :   9 , 
 
                         m a r g i n :   0 , 
 
                         b a c k g r o u n d :   " # f f f f f f " , 
 
                         l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
                 } ) ; 
 
                 w i n d o w . o n l o a d   =   f u n c t i o n ( )   {   w i n d o w . p r i n t ( ) ;   } ; 
 
         < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < ? p h p 
 
 r e q u i r e _ o n c e   ' . . / a p p / c o n f i g / d a t a b a s e . p h p ' ; 
 
 r e q u i r e _ o n c e   ' . . / a p p / c o r e / A u t h . p h p ' ; 
 
 A u t h : : r e q u i r e L o g i n ( ) ; 
 
 
 
 $ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
 i f   ( ! $ i d )   { 
 
         d i e ( ' M e a s u r e m e n t   I D   r e q u i r e d . ' ) ; 
 
 } 
 
 
 
 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
 $ s t m t   =   $ d b - > p r e p a r e ( " 
 
         S E L E C T   m . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   c . c u s t o m e r _ n o   
 
         F R O M   m e a s u r e m e n t s   m   
 
         L E F T   J O I N   c u s t o m e r s   c   O N   m . c u s t o m e r _ i d   =   c . c u s t o m e r _ n o   
 
         W H E R E   m . i d   =   ?   A N D   m . c o m p a n y _ i d   =   ? 
 
 " ) ; 
 
 $ s t m t - > e x e c u t e ( [ $ i d ,   $ c o m p a n y _ i d ] ) ; 
 
 $ m e a s u r e m e n t   =   $ s t m t - > f e t c h ( ) ; 
 
 i f   ( ! $ m e a s u r e m e n t )   { 
 
         d i e ( ' M e a s u r e m e n t   n o t   f o u n d . ' ) ; 
 
 } 
 
 
 
 $ c o m p a n y _ i n f o   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e >  &       -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m e a s u r e m e n t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < s t y l e > 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   {   
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   ' C o u r i e r   N e w ' ,   m o n o s p a c e ;   
 
                         b a c k g r o u n d :   # f f f ;   
 
                         p a d d i n g :   0 ;   
 
                         m a r g i n :   0 ; 
 
                         w i d t h :   8 0 m m ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . c o n t a i n e r   {   
 
                         w i d t h :   8 0 m m ;   
 
                         p a d d i n g :   3 m m   2 m m ;   
 
                         b a c k g r o u n d :   # f f f ; 
 
                         f o n t - s i z e :   9 p x ; 
 
                         l i n e - h e i g h t :   1 . 3 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . h e a d e r   {   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         b o r d e r - b o t t o m :   2 p x   d a s h e d   # 3 3 3 ;   
 
                         p a d d i n g - b o t t o m :   4 p x ;   
 
                         m a r g i n - b o t t o m :   4 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   {   
 
                         f o n t - s i z e :   1 6 p x ;   
 
                         f o n t - w e i g h t :   7 0 0 ;   
 
                         m a r g i n :   0 ;   
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . h e a d e r   s m a l l   {   
 
                         f o n t - s i z e :   9 p x ;   
 
                         c o l o r :   # 6 6 6 ;   
 
                         d i s p l a y :   b l o c k ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n :   3 p x   0 ;   p a d d i n g :   3 p x   0 ;   } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   {   m a x - w i d t h :   7 0 m m ;   h e i g h t :   a u t o ;   } 
 
                 . i n f o - g r i d   {   
 
                         d i s p l a y :   g r i d ;   
 
                         g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   
 
                         g a p :   2 p x   6 p x ;   
 
                         p a d d i n g :   4 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ; 
 
                         m a r g i n - b o t t o m :   3 p x ; 
 
                         f o n t - s i z e :   9 p x ; 
 
                 } 
 
                 . i n f o - g r i d   . l a b e l   {   f o n t - w e i g h t :   6 0 0 ;   c o l o r :   # 5 5 5 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . i n f o - g r i d   . v a l u e   {   c o l o r :   # 0 0 0 ;   f o n t - w e i g h t :   5 0 0 ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 t a b l e   {   w i d t h :   1 0 0 % ;   b o r d e r - c o l l a p s e :   c o l l a p s e ;   m a r g i n :   3 p x   0 ;   f o n t - s i z e :   8 p x ;   } 
 
                 t h e a d   t h   {   
 
                         b a c k g r o u n d :   # f 0 f 0 f 0 ;   
 
                         p a d d i n g :   2 p x   3 p x ;   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         f o n t - s i z e :   8 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # 3 3 3 ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t b o d y   t d   {   
 
                         p a d d i n g :   2 p x   3 p x ;   
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # d d d ;   
 
                         f o n t - s i z e :   8 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t b o d y   t d : l a s t - c h i l d   {   t e x t - a l i g n :   l e f t ;   } 
 
                 . f o o t e r   {   t e x t - a l i g n :   c e n t e r ;   m a r g i n - t o p :   4 p x ;   p a d d i n g - t o p :   4 p x ;   b o r d e r - t o p :   2 p x   d a s h e d   # 3 3 3 ;   c o l o r :   # 6 6 6 ;   f o n t - s i z e :   8 p x ;   f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ;   } 
 
                 . f o o t e r   p   {   m a r g i n :   1 p x   0 ;   } 
 
                 . p r i n t - b t n   {   d i s p l a y :   n o n e ;   } 
 
                 @ m e d i a   p r i n t   {   
 
                         b o d y   {   w i d t h :   1 0 0 % ;   m a r g i n :   0 ;   p a d d i n g :   0 ;   } 
 
                         . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   p a d d i n g :   2 m m ;   } 
 
                         . n o - p r i n t   {   d i s p l a y :   n o n e ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
                 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' n a m e ' ]   ? ?   '    `            ' ) ;   ? > < / h 2 > 
 
                         < s m a l l >  &                `< / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < d i v   c l a s s = " i n f o - g r i d " > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >        !   < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m e a s u r e m e n t [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >        !         &     < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m e a s u r e m e n t [ ' c u s t o m e r _ n o ' ] ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >        `  < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y ' ,   s t r t o t i m e ( $ m e a s u r e m e n t [ ' m e a s u r e d _ d a t e ' ] ) ) ;   ? > < / s p a n > < / d i v > 
 
                         < d i v > < s p a n   c l a s s = " l a b e l " >    R &         < / s p a n > < b r > < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m e a s u r e m e n t [ ' R E M A R K S ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > < / d i v > 
 
                 < / d i v > 
 
 
 
                 < t a b l e > 
 
                         < t h e a d > 
 
                                 < t r > 
 
                                         < t h   s t y l e = " w i d t h : 4 5 % ; " >  &     < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 5 5 % ; " >  &         < / t h > 
 
                                 < / t r > 
 
                         < / t h e a d > 
 
                         < t b o d y > 
 
                                 < ? p h p 
 
                                 $ f i e l d s   =   [ 
 
                                         ' c h e s t '   = >   '    `    ' , 
 
                                         ' w a i s t '   = >   '    &   ' , 
 
                                         ' l o o s i n g '   = >   '           ' , 
 
                                         ' s h o u l d e r '   = >   '            ' , 
 
                                         ' s l e e v e '   = >   '        `   ' , 
 
                                         ' l e n g t h '   = >   '  `         `' , 
 
                                         ' c o l l a r '   = >   '         ' , 
 
                                         ' c u f f _ l e n g t h '   = >   '        `         `' , 
 
                                         ' c u f f _ w i d t h '   = >   '         `    ' , 
 
                                         ' s h a l w a r _ l e n g t h '   = >   '             `         `' , 
 
                                         ' s h a l w a r _ b o t t o m '   = >   '                         ' , 
 
                                         ' s i d e p o c k e t '   = >   '        `          `   ' , 
 
                                         ' f r o n t p o c k e t '   = >   '      `         `   ' , 
 
                                         ' s h a l w a r p o c k e t '   = >   '               `   ' , 
 
                                         ' s h e r w a n i '   = >   '    `         `' 
 
                                 ] ; 
 
                                 f o r e a c h   ( $ f i e l d s   a s   $ k e y   = >   $ l a b e l ) : 
 
                                         $ v a l   =   $ m e a s u r e m e n t [ s t r t o u p p e r ( $ k e y ) ]   ? ?   $ m e a s u r e m e n t [ $ k e y ]   ? ?   ' - ' ; 
 
                                 ? > 
 
                                         < t r > 
 
                                                 < t d > < ? p h p   e c h o   $ l a b e l ;   ? > < / t d > 
 
                                                 < t d > < ? p h p   e c h o   $ v a l ;   ? > < / t d > 
 
                                         < / t r > 
 
                                 < ? p h p   e n d f o r e a c h ;   ? > 
 
                                 < t r > 
 
                                         < t d > < s t r o n g >         < / s t r o n g > < / t d > 
 
                                         < t d > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m e a s u r e m e n t [ ' n o t e s ' ]   ? ?   ' - ' ) ;   ? > < / t d > 
 
                                 < / t r > 
 
                         < / t b o d y > 
 
                 < / t a b l e > 
 
 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < p >     !           `                        &  !           `! < / p > 
 
                         < p > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? >   |   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / p > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < s c r i p t > 
 
                 J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ m e a s u r e m e n t [ ' c u s t o m e r _ n o ' ] ) ;   ? > " ,   { 
 
                         f o r m a t :   " C O D E 1 2 8 " , 
 
                         w i d t h :   1 . 5 , 
 
                         h e i g h t :   2 8 , 
 
                         d i s p l a y V a l u e :   t r u e , 
 
                         f o n t :   " m o n o s p a c e " , 
 
                         f o n t S i z e :   9 , 
 
                         m a r g i n :   0 , 
 
                         b a c k g r o u n d :   " # f f f f f f " , 
 
                         l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
                 } ) ; 
 
                 w i n d o w . o n l o a d   =   f u n c t i o n ( )   {   w i n d o w . p r i n t ( ) ;   } ; 
 
         < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 < ? p h p 
 
 r e q u i r e _ o n c e   ' . . / a p p / c o n f i g / d a t a b a s e . p h p ' ; 
 
 r e q u i r e _ o n c e   ' . . / a p p / c o r e / A u t h . p h p ' ; 
 
 A u t h : : r e q u i r e L o g i n ( ) ; 
 
 
 
 $ o r d e r _ i d   =   $ _ G E T [ ' i d ' ]   ? ?   0 ; 
 
 i f   ( ! $ o r d e r _ i d )   { 
 
         d i e ( ' O r d e r   I D   r e q u i r e d . ' ) ; 
 
 } 
 
 
 
 $ c o m p a n y _ i d   =   A u t h : : g e t C o m p a n y I d ( ) ; 
 
 $ s t m t   =   $ d b - > p r e p a r e ( " 
 
         S E L E C T   o . * ,   c . n a m e   a s   c u s t o m e r _ n a m e ,   c . p h o n e   
 
         F R O M   o r d e r s   o   
 
         L E F T   J O I N   c u s t o m e r s   c   O N   o . c u s t o m e r _ i d   =   c . i d   
 
         W H E R E   o . i d   =   ?   A N D   o . c o m p a n y _ i d   =   ? 
 
 " ) ; 
 
 $ s t m t - > e x e c u t e ( [ $ o r d e r _ i d ,   $ c o m p a n y _ i d ] ) ; 
 
 $ o r d e r   =   $ s t m t - > f e t c h ( ) ; 
 
 i f   ( ! $ o r d e r )   { 
 
         d i e ( ' O r d e r   n o t   f o u n d . ' ) ; 
 
 } 
 
 
 
 $ c o m p a n y _ i n f o   =   A u t h : : g e t C o m p a n y I n f o ( ) ; 
 
 ? > 
 
 < ! D O C T Y P E   h t m l > 
 
 < h t m l > 
 
 < h e a d > 
 
         < m e t a   c h a r s e t = " U T F - 8 " > 
 
         < t i t l e >      `    -   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / t i t l e > 
 
         < s c r i p t   s r c = " h t t p s : / / c d n . j s d e l i v r . n e t / n p m / j s b a r c o d e @ 3 . 1 1 . 6 / d i s t / J s B a r c o d e . a l l . m i n . j s " > < / s c r i p t > 
 
         < s t y l e > 
 
                 / *   = = = = =   R e s e t   = = = = =   * / 
 
                 *   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
 
                 b o d y   {   
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   ' C o u r i e r   N e w ' ,   m o n o s p a c e ;   
 
                         b a c k g r o u n d :   # f f f ;   
 
                         p a d d i n g :   0 ;   
 
                         m a r g i n :   0 ; 
 
                         w i d t h :   8 0 m m ; 
 
                         m a r g i n :   0   a u t o ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 . c o n t a i n e r   {   
 
                         w i d t h :   8 0 m m ;   
 
                         p a d d i n g :   3 m m   2 m m ;   
 
                         b a c k g r o u n d :   # f f f ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         l i n e - h e i g h t :   1 . 3 ; 
 
                         d i r e c t i o n :   r t l ; 
 
                 } 
 
                 / *   = = = = =   H E A D E R   = = = = =   * / 
 
                 . h e a d e r   {   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         b o r d e r - b o t t o m :   2 p x   d a s h e d   # 3 3 3 ;   
 
                         p a d d i n g - b o t t o m :   4 p x ;   
 
                         m a r g i n - b o t t o m :   4 p x ; 
 
                 } 
 
                 . h e a d e r   h 2   {   
 
                         f o n t - s i z e :   1 6 p x ;   
 
                         f o n t - w e i g h t :   7 0 0 ;   
 
                         m a r g i n :   0 ;   
 
                         l e t t e r - s p a c i n g :   1 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . h e a d e r   s m a l l   {   
 
                         f o n t - s i z e :   9 p x ;   
 
                         c o l o r :   # 6 6 6 ;   
 
                         d i s p l a y :   b l o c k ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 / *   = = = = =   B A R C O D E   = = = = =   * / 
 
                 . b a r c o d e - c o n t a i n e r   {   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         m a r g i n :   3 p x   0 ;   
 
                         p a d d i n g :   3 p x   0 ; 
 
                 } 
 
                 . b a r c o d e - c o n t a i n e r   s v g   {   
 
                         m a x - w i d t h :   7 0 m m ;   
 
                         h e i g h t :   a u t o ; 
 
                 } 
 
                 / *   = = = = =   I N F O   = = = = =   * / 
 
                 . i n f o   {   
 
                         m a r g i n :   3 p x   0 ;   
 
                         p a d d i n g :   3 p x   0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   d a s h e d   # d d d ; 
 
                 } 
 
                 . i n f o   . r o w   {   
 
                         d i s p l a y :   f l e x ;   
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   
 
                         p a d d i n g :   2 p x   0 ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . i n f o   . l a b e l   {   
 
                         f o n t - w e i g h t :   6 0 0 ;   
 
                         c o l o r :   # 3 3 3 ; 
 
                 } 
 
                 . i n f o   . v a l u e   {   
 
                         c o l o r :   # 0 0 0 ; 
 
                         f o n t - w e i g h t :   5 0 0 ; 
 
                 } 
 
                 / *   = = = = =   T A B L E   = = = = =   * / 
 
                 t a b l e   {   
 
                         w i d t h :   1 0 0 % ;   
 
                         b o r d e r - c o l l a p s e :   c o l l a p s e ;   
 
                         m a r g i n :   3 p x   0 ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                 } 
 
                 t h e a d   t h   {   
 
                         b a c k g r o u n d :   # f 0 f 0 f 0 ;   
 
                         p a d d i n g :   2 p x   4 p x ;   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         f o n t - s i z e :   9 p x ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         b o r d e r - b o t t o m :   1 p x   s o l i d   # 3 3 3 ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t b o d y   t d   {   
 
                         p a d d i n g :   2 p x   4 p x ;   
 
                         b o r d e r - b o t t o m :   1 p x   d o t t e d   # d d d ;   
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 t b o d y   t d : l a s t - c h i l d   {   t e x t - a l i g n :   l e f t ;   } 
 
                 / *   = = = = =   T O T A L S   = = = = =   * / 
 
                 . t o t a l s   {   
 
                         m a r g i n - t o p :   3 p x ;   
 
                         p a d d i n g - t o p :   3 p x ; 
 
                         b o r d e r - t o p :   2 p x   s o l i d   # 3 3 3 ; 
 
                 } 
 
                 . t o t a l s   . r o w   {   
 
                         d i s p l a y :   f l e x ;   
 
                         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   
 
                         p a d d i n g :   2 p x   0 ; 
 
                         f o n t - s i z e :   1 0 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . t o t a l s   . r o w . t o t a l   {   
 
                         f o n t - w e i g h t :   7 0 0 ;   
 
                         f o n t - s i z e :   1 2 p x ; 
 
                         b o r d e r - t o p :   1 p x   s o l i d   # 3 3 3 ; 
 
                         p a d d i n g - t o p :   3 p x ; 
 
                         m a r g i n - t o p :   2 p x ; 
 
                 } 
 
                 / *   = = = = =   F O O T E R   = = = = =   * / 
 
                 . f o o t e r   {   
 
                         t e x t - a l i g n :   c e n t e r ;   
 
                         m a r g i n - t o p :   4 p x ;   
 
                         p a d d i n g - t o p :   4 p x ;   
 
                         b o r d e r - t o p :   2 p x   d a s h e d   # 3 3 3 ;   
 
                         c o l o r :   # 6 6 6 ;   
 
                         f o n t - s i z e :   9 p x ; 
 
                         f o n t - f a m i l y :   ' N o t o   S a n s   A r a b i c ' ,   s a n s - s e r i f ; 
 
                 } 
 
                 . f o o t e r   p   {   m a r g i n :   1 p x   0 ;   } 
 
                 . p r i n t - b t n   {   d i s p l a y :   n o n e ;   } 
 
                 / *   = = = = =   P R I N T   = = = = =   * / 
 
                 @ m e d i a   p r i n t   {   
 
                         b o d y   {   w i d t h :   1 0 0 % ;   m a r g i n :   0 ;   p a d d i n g :   0 ;   } 
 
                         . c o n t a i n e r   {   w i d t h :   1 0 0 % ;   p a d d i n g :   2 m m ;   } 
 
                         . n o - p r i n t   {   d i s p l a y :   n o n e ;   } 
 
                         . h e a d e r   h 2   {   f o n t - s i z e :   1 4 p x ;   } 
 
                         . t o t a l s   . r o w . t o t a l   {   f o n t - s i z e :   1 1 p x ;   } 
 
                 } 
 
         < / s t y l e > 
 
 < / h e a d > 
 
 < b o d y > 
 
         < d i v   c l a s s = " c o n t a i n e r " > 
 
                 
 
                 < ! - -   = = = = =   H E A D E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " h e a d e r " > 
 
                         < h 2 > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' n a m e ' ]   ? ?   '    `            ' ) ;   ? > < / h 2 > 
 
                         < s m a l l > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' a d d r e s s ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                         < s m a l l >       :   < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ c o m p a n y _ i n f o [ ' p h o n e ' ]   ? ?   ' ' ) ;   ? > < / s m a l l > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   B A R C O D E   = = = = =   - - > 
 
                 < d i v   c l a s s = " b a r c o d e - c o n t a i n e r " > 
 
                         < s v g   i d = " b a r c o d e " > < / s v g > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   R E C E I P T   I N F O   = = = = =   - - > 
 
                 < d i v   c l a s s = " i n f o " > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " >      `        &     : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " >        `  : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   d a t e ( ' d - m - Y   H : i ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " >        !   : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' c u s t o m e r _ n a m e ' ] ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n   c l a s s = " l a b e l " >       : < / s p a n > 
 
                                 < s p a n   c l a s s = " v a l u e " > < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' p h o n e ' ]   ? ?   ' - ' ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   I T E M S   = = = = =   - - > 
 
                 < t a b l e > 
 
                         < t h e a d > 
 
                                 < t r > 
 
                                         < t h   s t y l e = " w i d t h : 6 0 % ; " >    `  < / t h > 
 
                                         < t h   s t y l e = " w i d t h : 4 0 % ; " >      & < / t h > 
 
                                 < / t r > 
 
                         < / t h e a d > 
 
                         < t b o d y > 
 
                                 < t r > 
 
                                         < t d >      `    # < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > < / t d > 
 
                                         < t d > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' n e t _ a m o u n t ' ] ,   0 ) ;   ? > < / t d > 
 
                                 < / t r > 
 
                         < / t b o d y > 
 
                 < / t a b l e > 
 
 
 
                 < ! - -   = = = = =   T O T A L S   = = = = =   - - > 
 
                 < d i v   c l a s s = " t o t a l s " > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n >     : < / s p a n > 
 
                                 < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' n e t _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w " > 
 
                                 < s p a n >          `: < / s p a n > 
 
                                 < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' p a i d _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                         < d i v   c l a s s = " r o w   t o t a l " > 
 
                                 < s p a n >        `: < / s p a n > 
 
                                 < s p a n > R s .   < ? p h p   e c h o   n u m b e r _ f o r m a t ( $ o r d e r [ ' d u e _ a m o u n t ' ] ,   0 ) ;   ? > < / s p a n > 
 
                         < / d i v > 
 
                 < / d i v > 
 
 
 
                 < ! - -   = = = = =   F O O T E R   = = = = =   - - > 
 
                 < d i v   c l a s s = " f o o t e r " > 
 
                         < p >     !           `                        &  !           `! < / p > 
 
                         < p >    ` !           < / p > 
 
                 < / d i v > 
 
         < / d i v > 
 
 
 
         < s c r i p t > 
 
                 J s B a r c o d e ( " # b a r c o d e " ,   " < ? p h p   e c h o   h t m l s p e c i a l c h a r s ( $ o r d e r [ ' o r d e r _ n o ' ] ) ;   ? > " ,   { 
 
                         f o r m a t :   " C O D E 1 2 8 " , 
 
                         w i d t h :   1 . 5 , 
 
                         h e i g h t :   3 0 , 
 
                         d i s p l a y V a l u e :   t r u e , 
 
                         f o n t :   " m o n o s p a c e " , 
 
                         f o n t S i z e :   1 0 , 
 
                         m a r g i n :   0 , 
 
                         b a c k g r o u n d :   " # f f f f f f " , 
 
                         l i n e C o l o r :   " # 0 0 0 0 0 0 " 
 
                 } ) ; 
 
                 w i n d o w . o n l o a d   =   f u n c t i o n ( )   {   w i n d o w . p r i n t ( ) ;   } ; 
 
         < / s c r i p t > 
 
 < / b o d y > 
 
 < / h t m l > 
 
 