<style type="text/css">
.modal-header .close {
    margin-top: -24px;
    float: left;

}
h4{
    text-align: center;
    color: #0a0944;
    font-weight: 900;
    font-size: 18px;

}
.hrs {
    height: 3px;
        background-color: red;
        border: none;
        margin: 10px 200px;
}

</style>
<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">زيارات المندوبين   </a></li>
            <li><a href="visitsController.php?do=show">عرض  الزيارات </a></li>
             {if $del == 0}
            <li class="active">تعديل  </li> 
            {else}
            <li class="active">تفاصيل  </li> 
            {/if}
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
            {if $del == 0}
            <h3 class="panel-title">تعديل  </h3>
            {else}
            <h3 class="panel-title">تفاصيل  </h3> 
            {/if}
            </div>
            <div class="panel-body">

 {literal}
                <form class="form-horizontal"  action="visitsController.php"  id="saveformajax" method="post"  enctype="multipart/form-data" data-dosave="?do=savedata" data-direction="visitsController.php?do=show">
                    {/literal}




                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">العملاء  </label>
                        <div class="col-lg-4">
                             <input    required="required"  readonly   type="text" 
                            class="form-control" placeholder="   بداية الزياره   " value="{$visitsdata->client}" />
                             <!-- input id="clientid" type="text" name="client"  class="getselectjoin clientid "  data-placeholder=" العملاء   "   data-table="client" 
                              data-tableid="clientid"  data-join=""   data-filter="" data-parent="" data-itr=""  
                              data-search="clientname,'/',clientphone"/>
                             <input  type="hidden" name="clientid" class="selectedit" data-tableidname="clientid"  data-itr="" 
                             data-join="" data-table="client" data-tableid="clientid" data-search="clientname,'/',clientphone" value="" /> -->
                        </div>
                       <!--   <input  type="hidden" name="clientid" class="selectedit" data-tableidname="clientid" data-itr="" 
                             data-join="" data-table="client" data-tableid="clientid" data-search="clientname" value="{$visitsdata->clientid}" /> -->
                      <!--   <button type="button" class="btn btn-primary adddatamodal" data-table="client" data-tableid="clientid" data-toggle="modal" data-target="#Modalclientid" data-whatever="@client" data-formt="formclient" data-selectitr="">اضافة   عميل</button>
                        <button type="button" class="btn btn-primary editdatamodal"  data-model="#Modalclientid" data-table="client" data-name="clientid" data-tableid="clientid" data-join="" data-formt="formclient" data-selectitr="">تعديل   عميل</button> -->
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">المندوبين  </label>
                        <div class="col-lg-4">
                             <input    required="required"  readonly   type="text" 
                            class="form-control" placeholder="   بداية الزياره   " value="{$visitsdata->delegate}" />
                         <!--     <input id="userid" type="text" name="delegateid"  class="getselectjoin userid "  data-placeholder=" المندوبين   "   data-table="user" 
                              data-tableid="userid"  data-join=""   data-filter=" and usergroupid = 4 " data-parent="" data-itr=""  
                              data-search="employeename"/>
                             <input  type="hidden" name="userid" class="selectedit" data-tableidname="userid"  data-itr="" 
                             data-join="" data-table="client" data-tableid="userid" data-search="employeename" value="" /> -->

                        </div>
                          <!-- <input  type="hidden" name="userid" class="selectedit" data-tableidname="userid" data-itr="" 
                             data-join="" data-table="user" data-tableid="userid" data-search="employeename" value="{$visitsdata->delegateid}" />
 -->

                      <!--   <button type="button" class="btn btn-primary adddatamodal" data-table="client" data-tableid="clientid" data-toggle="modal" data-target="#Modalclientid" data-whatever="@client" data-formt="formclient" data-selectitr="">اضافة   عميل</button>
                        <button type="button" class="btn btn-primary editdatamodal"  data-model="#Modalclientid" data-table="client" data-name="clientid" data-tableid="clientid" data-join="" data-formt="formclient" data-selectitr="">تعديل   عميل</button> -->
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    تاريخ الزياره  </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="dateofvisit" 
                            class="form-control awdatepicker" autocomplete="off"   data-date-format="yyyy-mm-dd"  placeholder=" التاريخ والوقت  "  
                            data-table="maintenances" data-filter="" 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$visitsdata->dateofvisit}" />
                            
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    الحاله  </label>
                        <div class="col-lg-4">
                            
                            <input   readonly type="text" class="form-control" value="{$visitsdata->cases}" />
                           
                        </div>
                    </div>
                    
                    


                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    المرحله  </label>
                        <div class="col-lg-4">
                            {if $visitsdata->newvisit eq 0}
                            <input   readonly type="text" class="form-control" value="زياره جديده" />
                            {else if $visitsdata->newvisit eq 1}
                            <input   readonly type="text" class="form-control" value="تم بدأ الزياره" />
                            {else}
                            <input   readonly type="text" class="form-control" value="تم انهاء الزياره" />
                            {/if}
                        </div>
                    </div>

                    {if $visitsdata->before_visitid}
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    اخر زياره  </label>
                        <div class="col-lg-4">
                           <a href="visitsController.php?do=edit&id={$visitsdata->before_visitid}&del=0" target="_blank">التفاصيل   </a>
                        </div>
                    </div>
                     {/if}


                    {if $visitsdata->textdiffbetvisit}
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    تاريخ انتهاء اخر زياره  </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->vlastenddate}" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">     الوقت بين الزياره السابقه والزياره الحاليه  </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->textdiffbetvisit}" />
                        </div>
                    </div>
                     {/if}


                       {if $visitsdata->newvisit gt 0}
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> وقت بداية الزياره    </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->start_date}" />
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> start lat    </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->start_lat}" />
                        </div>
                    </div>

                      <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> start long    </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->start_long}" />
                        </div>
                    </div>
                    {/if}
                    {if $visitsdata->newvisit eq 2}


                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> وقت نهاية الزياره    </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->end_date}" />
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> end lat    </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->end_lat}" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> end long    </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->end_long}" />
                        </div>
                    </div>
                    
                    
                    
               

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    الوقت الزياره  </label>
                        <div class="col-lg-4">
                            <input  readonly   type="text" class="form-control" value="{$visitsdata->vdiffminutes}" />
                        </div>
                    </div>
                     {/if}


                     {if $visitsdata->newvisit gt 0} 
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> الصوره  </label>
                        <div class="col-lg-4">
                            <img src="{$HostURL}/views/default/images/visits/{$visitsdata->imageendvisit}" style="width: 200px;height: 200px;">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> فى النطاق  </label>
                        <div class="col-lg-4">
                            {if $visitsdata->vspacestrue eq 1} نعم {else} لا {/if}
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">     الخريطه  </label>
                        <div class="col-lg-4">
                            
                             <a style="background:#000000;color:#ffffff;font-size:15px;padding:8px 12px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;
                             text-decoration:none;" href="https://www.google.es/maps/dir/'{$visitsdata->start_lat},{$visitsdata->start_long}'/'{$visitsdata->clat},{$visitsdata->clong}'" target="_blank" >open   </a>
                        </div>
                    </div>
                      {/if}
                      {if $visitsdata->newvisit eq 2}
                     
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    الملاحظه  </label>
                        <div class="col-lg-4">
                            {$visitsdata->note}
                        </div>
                    </div>
                    
                    
                    {/if}
                     

              




                     
                 
                </form>
            </div>
        </div>




    </div>
</div>








<div class="modal fade" id="ModalbranchId" tabindex="-1" role="dialog" aria-labelledby="ModalbranchIdLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalbranchIdLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenances.php"  id="formbranch" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savebranch"  data-direction="">
         <div class="form-group">
            <label for="recipient-name" class="col-form-label"> اسم الفرع  </label>
            <input    required="required"    type="text" name="branchName" 
            class="form-control checkcolumn"  placeholder=" اسم الفرع "  
            data-table="branch" data-filter=" branchName = ? " 
            data-tableid="" data-parentid="" data-parentcol="" />
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label"> رقم الفرع  </label>
            <input    required="required"    type="text" name="branchNo" 
            class="form-control"  placeholder=" رقم الفرع  "  
            data-table="branch" data-filter=" branchNo = ? " 
            data-tableid="" data-parentid="" data-parentcol="" />
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label">  رقم الهاتف    </label>
            <input   type="text" name="phone" class="form-control" 
             placeholder="  رقم الهاتف   "  data-table="branch" 
             data-filter=" phone = ? " data-tableid="" data-parentid="" 
             data-parentcol="" />
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label">   رقم المويايل  </label>
            <input   type="text" name="mobile" class="form-control" 
             placeholder="  رقم المويايل   "  data-table="branch" 
             data-filter=" mobile = ? " data-tableid="" data-parentid="" 
             data-parentcol="" />
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label">   عنوان الفرع   </label>
            <input   type="text" name="branchAddress" class="form-control" 
             placeholder=" عنوان الفرع   "  data-table="branch" 
             data-filter=" branchAddress = ? " data-tableid="" data-parentid="" 
             data-parentcol="" />
          </div>
          
          <input id="popbranch" type="hidden" name="branchId" value=""  />
          <input id="itrbranch" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formbranch"> حفظ</button>
      </div>
    </div>
  </div>
</div>



<div class="modal fade" id="Modalsupplierid" tabindex="-1" role="dialog" aria-labelledby="ModalsupplieridLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalsupplieridLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenancesuppliers.php"  id="formsupplier" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savedata"  data-direction="">
           <div class="form-group">
            <label for="recipient-name" class="col-form-label">كود المورد </label>
            <input type="text" name="suppliercode" class="form-control" value=""/>
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label">   اسم    المورد   </label>
            <input   required="required"    type="text" name="suppliername" 
                class="form-control checkcolumn"  placeholder="اسم   المورد  "  
                data-table="supplier" data-filter=" suppliername = ? and conditions = 0 " 
                data-tableid="" data-parentid="" data-parentcol="" />
          </div>
         <div class="form-group">
            <label for="recipient-name" class="col-form-label">المحمول</label>
                <input    required="required"    type="text" name="supplierphone" 
                 class="form-control checkcolumn nummbers" placeholder=" المحمول   "  
                 data-table="supplier" data-filter=" supplierphone = ? and conditions = 0 "  data-tableid=""
                data-parentid="" data-parentcol=""/>                
        </div>
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">الارضى</label>
                <input    required="required"    type="text" name="suppliermobile" 
                 class="form-control checkcolumn nummbers" placeholder=" الارضى " 
                 data-table="supplier" data-filter=" suppliermobile = ? and conditions = 0 "  data-tableid=""
                data-parentid="" data-parentcol=""/>    
        </div>
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">عنوان   المورد    </label>
                <input    required="required"    type="text" name="supplieraddress" 
                 class="form-control" placeholder=" عنوان  المورد    "
                 data-table="" data-tablecol="" data-tableid=""
                data-parentid="" data-parentcol=""/>    
                
        </div>
        
         
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">المدينة</label>
             <input id="goverareaid" type="text" name="goverarea"  class="getselectjoin goverareaid"  data-placeholder=" المحافظه    /  المدينة    "   data-table="goverarea" 
              data-tableid="clientareaid" 
              data-join=" LEFT JOIN government on government.governmetid = goverarea.governmentid
              LEFT JOIN clientarea on clientarea.id = goverarea.clientareaid "   data-filter="" 
              data-parent="" data-itr=""  
              data-search="governmentname,'/',name"/>
             <input  type="hidden" name="goverareaid" class="selectedit" data-tableidname="goverareaid"  data-itr="" 
             data-join=" LEFT JOIN government on government.governmetid = goverarea.governmentid
              LEFT JOIN clientarea on clientarea.id = goverarea.clientareaid "
             data-table="goverarea" data-tableid="goverareaid"
              data-search="governmentname,'/',name" value="" />
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">اسم المستفيد فى الشيك</label>
            <input type="text" name="namepayeecheck" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">مسئول الضمانات</label>
                <input type="text" name="warrantyOfficer" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">موبايل الضمانات</label>
                <input type="text" name="warrantymobile" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
             <label for="recipient-name" class="col-form-label">اسم البائع</label>
                <input type="text" name="sellername" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
        <div class="form-group">
            <label for="recipient-name" class="col-form-label">موبايل البائع</label>
                <input type="text" name="sellermobile" class="form-control" value=""/>
                <div class="clearfix"></div>
        </div>
          
          <input id="popsupplier" type="hidden" name="supplierid" value=""  />
          <input id="itrsupplier" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formsupplier"> حفظ</button>
      </div>
    </div>
  </div>
</div>


<div class="modal fade" id="Modalclientid" tabindex="-1" role="dialog" aria-labelledby="ModalclientidLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalclientidLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenanceclients.php"  id="formclient" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savedata"  data-direction="">
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">  اسم  العميل   </label>
                    <input    required="required"    type="text" name="clientname" 
                    class="form-control checkcolumn"  placeholder="اسم  العميل  "  
                    data-table="client" data-filter=" clientname = ? and conditions = 0 " 
                    data-tableid="" data-parentid="" data-parentcol="" />
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">المحمول</label>
                    <input    required="required"    type="text" name="clientphone" 
                     class="form-control checkcolumn nummbers" placeholder=" المحمول   "  
                     data-table="client" data-filter=" clientphone = ? and conditions = 0 "  data-tableid=""
                    data-parentid="" data-parentcol=""/>
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">الارضى</label>
                    <input    required="required"    type="text" name="clientmobile" 
                     class="form-control checkcolumn nummbers" placeholder=" الارضى " 
                     data-table="client" data-filter=" clientmobile = ? and conditions = 0 "  data-tableid=""
                    data-parentid="" data-parentcol=""/>    
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">عنوان العميل    </label>
                    <input    required="required"    type="text" name="clientaddress" 
                     class="form-control" placeholder=" عنوان العميل    "
                     data-table="" data-tablecol="" data-tableid=""
                    data-parentid="" data-parentcol=""/>  
            </div>
       
          
          <input id="popclient" type="hidden" name="clientid" value=""  />
          <input id="itrclient" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formclient"> حفظ</button>
      </div>
    </div>
  </div>
</div>



<div class="modal fade" id="ModalproductId" tabindex="-1" role="dialog" aria-labelledby="ModalproductIdLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalproductIdLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenanceproducts.php"  id="formproduct" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savedata"  data-direction="">
       
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">التصنيفات</label>
                    <input  type="text" name="productcat" id="productCatId"  class="getselectjoin gettabledata"  data-placeholder=" البحث عن   منتج   "   data-table="productcat" 
                      data-tableid="productCatId" 
                      data-join=""   data-filter="" 
                      data-parent="" data-itr=""  
                      data-search="productCatName"/> 
            </div>

             <div class="form-group"  >
                <label  for="recipient-name" class="col-form-label"> المنتجات  </label>
                      <input  type="text" name="productId"  class="getselectjoin gettabledata"  data-placeholder=" البحث عن   منتج   "   data-table="product" 
                      data-tableid="productId" 
                      data-join=""   data-filter=" and product.conditions = 0 " 
                      data-parent="productCatId" data-itr=""  
                      data-search="productName"/>               
            </div>
            
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">  اسم    المنتج   </label>
                   <input    required="required"    type="text" name="productName" 
                    class="form-control checkcolumn"  placeholder="اسم  المنتج  "  
                    data-table="product" data-filter=" productName = ? and conditions = 0 " 
                    data-tableid="" data-parentid="" data-parentcol="" />                    
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">وصف المنتج</label>
                    <input       type="text" name="productDescription" 
                     class="form-control" placeholder=" وصف المنتج   "  
                     data-table="product" data-filter=""  
                     data-tableid="" data-parentid="" data-parentcol=""/>
                    
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label"> Run Query</label>
                    <input     type="text" name="runquery" 
                     class="form-control" placeholder=" Run Query " 
                     data-table="product" data-filter=""  data-tableid=""
                    data-parentid="" data-parentcol=""/>    
            </div>
          <input id="popproduct" type="hidden" name="productId" value=""  />
          <input id="itrproduct" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formproduct"> حفظ</button>
      </div>
    </div>
  </div>
</div>



<div class="modal fade" id="Modalmaintenancecenterid" tabindex="-1" role="dialog" aria-labelledby="ModalmaintenancecenteridLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalmaintenancecenteridLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenances.php"  id="formmaintenancecenters" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savecenter"  data-direction="">

            <div class="form-group">
                <label for="recipient-name" class="col-form-label">  اسم المركز    </label>
                    <input    required="required"    type="text" name="centername" 
                    class="form-control checkcolumn"  placeholder="اسم المركز "  
                    data-table="maintenancecenters" data-filter=" centername = ? and conditions = 0 " 
                    data-tableid="" data-parentid="" data-parentcol="" />
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">المحمول</label>
                    <input    required="required"    type="text" name="centerphone" 
                     class="form-control checkcolumn nummbers" placeholder=" المحمول   "  
                     data-table="maintenancecenters" data-filter=" centerphone = ? and conditions = 0 "  data-tableid=""
                    data-parentid="" data-parentcol=""/>
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">الارضى</label>
                    <input    required="required"    type="text" name="centermobile" 
                     class="form-control checkcolumn nummbers" placeholder=" الارضى " 
                     data-table="maintenancecenters" data-filter=" centermobile = ? and conditions = 0 "  data-tableid=""
                    data-parentid="" data-parentcol=""/>    
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">العنوان</label>
                    <input    required="required"    type="text" name="centeraddress" 
                     class="form-control" placeholder=" العنوان   "  
                     data-table="maintenancecenters" data-filter=""  data-tableid=""
                    data-parentid="" data-parentcol=""/>
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">اسم المسئول </label>
                    <input    required="required"    type="text" name="administrator" 
                     class="form-control" placeholder=" اسم المسئول  " 
                     data-table="maintenancecenters" data-filter=""  data-tableid=""
                    data-parentid="" data-parentcol=""/>    
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">تليفونه </label>
                    <input    required="required"    type="text" name="administratorphone" 
                     class="form-control" placeholder=" تليفونه " 
                     data-table="maintenancecenters" data-filter=""  data-tableid=""
                    data-parentid="" data-parentcol=""/>    
            </div>
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">الدين الحالى</label>
                    <input    required="required"    type="text" name="administratordebt" 
                     class="form-control  nummbers" placeholder=" الدين الحالى " 
                     data-table="maintenancecenters" data-filter=""  data-tableid=""
                    data-parentid="" data-parentcol=""/>    
            </div>
           
          <input id="popmaintenancecenters" type="hidden" name="maintenancecenterid" value=""  />
          <input id="itrmaintenancecenters" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formmaintenancecenters"> حفظ</button>
      </div>
    </div>
  </div>
</div>


<div class="modal fade" id="Modalmaintenancecaseid" tabindex="-1" role="dialog" aria-labelledby="ModalmaintenancecaseidLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalmaintenancecaseidLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenances.php"  id="formmaintenancecases" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savecase"  data-direction="">
            <div class="form-group">
                <label for="recipient-name" class="col-form-label">  الحاله     </label>
                    <input    required="required"    type="text" name="casename" 
                    class="form-control checkcolumn"  placeholder="الحاله  "  
                    data-table="maintenancecases" data-filter=" casename = ? and conditions = 0 " 
                    data-tableid="" data-parentid="" data-parentcol="" />
            </div>
       
           
          <input id="popmaintenancecases" type="hidden" name="maintenancecaseid" value=""  />
          <input id="itrmaintenancecases" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formmaintenancecases"> حفظ</button>
      </div>
    </div>
  </div>
</div>


