<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="visitcases.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="visitcases.php"  id="saveformajax" method="post"  enctype="multipart/form-data" data-dosave="?do=savedata" data-direction="visitcases.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"    type="text" name="cases" 
                            class="form-control" value="{$visitcasesdata->cases}" />
                            
                        </div>
                    </div>


              

                    
                       <input    type="hidden"  name="visitcaseid" value="{$visitcasesdata->id}"/>
                    
                    {if $del == 0}
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button type="button" class="btn btn-primary pull-left saveformajax" data-form="saveformajax" >تعديل الامر</button>
                        </div>
                    </div>
                    {/if}
                </form>

                     
                 
                </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>


