<?php

 Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar'); 
 $lang=Yii::app()->getLanguage();
 

?>


<section class="contact-us">
    <section class="contact-us-section1">
        <div class="container">
           <div class="row">
               <div class="col-sm-offset-1 col-sm-10 col-xs-12 col-xs-offset-0">
               <div class="col-xs-12 contact-info-text">
                  <div class="row">
                     <span class="lable-text">
                     <?php //echo Yii::t('contactUs','contact');?>
                     <?php echo ($lang=='en'?'You can contact Al Baraka Bank Syria through: Bank Call Center':'يمكنكم الاتصال ببنك البركة سورية من خلال : مركز اتصالات البنك');?>
                     
                     </span>
                   <a class="link-text telephone-num-style"  href="tel:+963119525" >+963119525</a>
                </div>    
                    </div>
                <div class="col-xs-12 contact-info-text">
                  <div class="row"> 
                   <span class="lable-text">
                   <?php //echo Yii::t('contactUs','fax');?>
                   <?php echo ($lang=='en'?'Fax':'فاكس') ?>
                   </span>
                   <a class="link-text telephone-num-style" href="fax:+963.11.4437810">+963114437810</a>
                   <span class="lable-text">
                   <?php //echo Yii::t('contactUs','email');?>
                   <?php echo ($lang=='en'?'Email':'بريد إلكتروني') ?>
                    </span>
                   <a class="link-text" href="mailto:info@albarakasyria.com">info@albarakasyria.com </a>
               </div> </div>
                <div class="col-xs-12 contact-info-text">
                  <div class="row">
                   <span class="lable-text">
                   <?php //echo Yii::t('contactUs','branch');?>
                   <?php echo($lang=='en'?'Or by visiting one of our branches :':'أو من خلال زيارة أحد فروعنا :')  ?>
                   </span> 
                  </div></div>
               </div>
            </div>
            <div class="row">
                <div class="col-sm-offset-1 col-sm-10 col-xs-12 col-xs-offset-0">
                <div class="row">
                   <div class="flex-container">
                   <?php 
                        $branchs=Branch::model()->findAll(array('order'=>'sort ASC'));

                         foreach($branchs as $branch)
                         {
                    
                     ?>
                    <div class="col-sm-6 col-xs-12">
                    
                        <div class="city-name">
                        
                        <?php $gove=$governorates=Governorate::model()->findByPK($branch->governorate);
                        
                        echo ($lang=='en'?$gove->name_en:$gove->name_ar) ?>
                            
                        </div>
                        <div class="branch-name">
                        
                        <?php echo ($lang=='en'?$branch->name_en:$branch->name_ar) ?>
                            <!--الفرع الرئيسي-->
                        </div>
                        <div class="details">
                           <div class="line-detail  ">
                            <div class="col-sm-5 col-md-4 col-xs-12 contact-lebale">
                              <div class="row lable-content">
                              <div class="img-container"> 
                              <?php echo '
                                <img class="img-responsive contact-us-icon" src="'.Yii::app()->request->baseUrl.'/images/icon-pin-contact-us.jpg"> 
                              ';?>
                               </div>
                               <div class="text-container">
                                  <div class=" lable-text-details">
                                  <?php //echo Yii::t('contactUs','address');?>
                                  <?php echo ($lang=='en'?'Address':'العنوان') ?> 
                                   
                                  </div> </div>
                              </div> 
                            </div>
                            <div class="col-sm-7 col-md-8 col-xs-12 contact-info">
                             <div class="  address-text">
                             <?php echo ($lang=='en'?$branch->address_en:$branch->address) ?>
                                  <!--دمشق - الشهبندر - جانب هيئة الاستثمار والأوراق المالية-->
                             </div>   
                            </div> 
                           </div>
                           <div class="line-detail"> 
                            <div class="col-sm-5 col-md-4 col-xs-12 contact-lebale">
                              <div class="row lable-content">
                              <div class="img-container"> 
                                <img class="img-responsive contact-us-icon" src="<?php echo Yii::app()->request->baseUrl ?>/images/icon-tel-contact-us.jpg"> 
                               </div>
                               <div class="text-container">
                                  <div class=" lable-text-details">
                                  <?php //echo Yii::t('contactUs','phone');?> 
                                  <?php echo ($lang=='en'?'Telephone number':'رقم الهاتف') ?>
                                   
                                  </div> </div>
                              </div> 
                            </div>
                           <div class="col-sm-7 col-md-8 col-xs-12 contact-info">
                              <a class=" address-text telephone-num-style" href="tel: <?php echo $branch->phone ?>">
                              <?php echo $branch->phone ?>
                                  <!--011-4435550 -->
                             </a>  
                            </div> 
                            </div>
                            <div class="line-detail"> 
                             <div class="col-sm-5 col-md-4 col-xs-12 contact-lebale">
                              <div class="row lable-content">
                              <div class="img-container"> 
                                <img class="img-responsive contact-us-icon" src="<?php echo Yii::app()->request->baseUrl ?>/images/icon-print-contact-us.jpg"> 
                               </div>
                               <div class="text-container">
                                  <div class=" lable-text-details"> 
                                  <?php echo ($lang=='en'?'Fax': 'رقم الفاكس') ?>
                                   
                                  </div> </div>
                              </div> 
                            </div> 
                            <div class="col-sm-7 col-md-8 col-xs-12 contact-info">
                                <a class=" address-text telephone-num-style"  href="fax: <?php echo $branch->fax ?>">
                                 <?php echo $branch->fax ?>
                                  <!--011-4435550 -->
                             </a>  
                            </div> 
                           </div>
                            <div class="line-detail">
                             <div class="col-sm-5 col-md-4 col-xs-12 contact-lebale">
                              <div class="row lable-content">
                              <div class="img-container"> 
                                <img class="img-responsive contact-us-icon" src="<?php echo Yii::app()->request->baseUrl ?>/images/icon-currency-contact-us.jpg"> 
                               </div>
                               <div class="text-container">
                                  <div class=" lable-text-details"> 
                                  <?php //echo Yii::t('contactUs','atm');?>
                                  <?php echo ($lang=='en'?'ATM': 'عدد الصرافات الالية') ?>
                                     
                                  </div> </div>
                              </div> 
                            </div> 
                            <div class="col-sm-7 col-md-8 col-xs-12 contact-info">
                                <div class=" address-text">
                                 <?php echo $branch->atm ?>
                                <!--2 -->
                             </div>  
                            </div>
                           </div>
                            <div class="col-xs-12">
                               <a class="open-on-map "  data-toggle="modal" data-target="#myModal" onclick ="newLocation(<?php echo $branch->latitudes?>,<?php echo $branch->longitude?>)" >
                                    <img class="img-reponsive pin-with-map-icon" src="<?php echo Yii::app()->request->baseUrl ?>/images/map-pin-icon.jpg">
                                    <span class="button-link-text">
                                    <?php //echo Yii::t('contactUs','location');?>
                                    <?php echo ($lang=='en'?'Location on the map':'الموقع على الخريطة')?>
                                    
                                        
                                    </span>
                                </a> 
                                 <a class="open-on-map hidden-lg hidden-xs hidden-md hidden-sm " href="#">
                                    <img class="img-reponsive pin-with-map-icon" src="<?php echo Yii::app()->request->baseUrl ?>/images/map-pin-icon.jpg">
                                    <span class="button-link-text">
                                    <?php //echo Yii::t('contactUs','location');?>
                                    <?php echo ($lang=='en'?'Location on the map':'الموقع على الخريطة')?>
                                <!--الموقع على الخريطة-->
                                        
                                    </span>
                                </a>  
                            </div>
                        </div>
                    </div> 

                         <?php } ?>
                   
                   
                    </div>
                </div>
                </div> 
            </div>
        </div>
    </section>
    <section class="map-pop-up">
      <div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

       
    <!-- Modal content-->
    <div class="modal-content">
         <button type="button" class="btn btn-default close-popup" data-dismiss="modal">X</button>  
      <div class="modal-body"> 
       <div id="map"></div>
      </div> 
    </div> 
  </div>
</div>  
    </section>
</section>
<script src="<?= Yii::app()->getBaseUrl(true) . '/js/openlayers.js' ?>"></script>

<script  type="application/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/site/scriptContacts"></script>