<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">العضويات</a></li>
            <li><a href="membershipsreport.php?do=report">تقرير عضويات</a></li>
            <li class="active">تفاصيل</li>
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">تفاصيل</h3>
            </div>
            <div class="panel-body"> {literal}
                <form class="nameToBeChecked form-horizontal" role="form" action="membershipsreport.php?do=report"
                      method="post" enctype="multipart/form-data" id="spform">
                    {/literal}
                    <!-- =================================================   -->
                    <div class="form-group">
                        <label for="announcementName" class="col-lg-2 control-label">الاسم</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input readonly type="text" name="name" id="name" class="form-control" value="{$showData->member_name}" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                        <label for="announcementName" class="col-lg-2 control-label">رقم التليفون</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input type="number" readonly name="phone" id="phone" class="form-control" value="{$showData->phone}" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                        <label for="announcementName" class="col-lg-2 control-label">عنوان مراسلة</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input type="text" readonly name="address" id="address" class="form-control" value="{$showData->address}" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                     <div class="form-group">
                        <label for="announcementName" class="col-lg-2 control-label">رقم بطاقة الاتحاد المصري</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input type="number" readonly name="etihadnum" id="etihadnum" class="form-control" value="{$showData->egy_card_num}" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                     <div class="form-group">
                        <label for="announcementName" class="col-lg-2 control-label">الرقم القومي</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input type="number" readonly name="national" id="national" class="form-control" value="{$showData->id_num}" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                     <div class="form-group">
                        <label for="announcementName" class="col-lg-2 control-label">رقم السجل التجاري</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input type="number" readonly name="commerce" id="commerce" class="form-control" value="{$showData->commercial_register_num}" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                     <div class="form-group">
                        <label for="announcementName" class="col-lg-2 control-label">رقم البطاقة الضريبية</label>
                        <div class="col-lg-4"> <span id="sprytextfield1">
                                <input type="number" readonly name="tax" id="tax" class="form-control" value="{$showData->tax_card_num}" />
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                        <label for="requestdate" class="col-lg-2 control-label"> تاريخ انتهاء بطاقة الاتحاد</label>
                        <div class="col-lg-4"> <span id="sprytextfield3">
                                <input type="date" readonly name="ettihad" id="ettihad" value="{$showData->egy_card_expire_date}">
                                <span class="textfieldRequiredMsg">*</span></span>
                        </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                        <label class="col-lg-2 control-label">حالة الطلب الحالي</label>
                        <div class="col-lg-6" style="padding-top: 7px;">
                            <label style="font-weight: normal; margin-right: 15px;">
                                <input type="radio" disabled name="status" value="reviewing" {if $showData->request_status == reviewing}checked{/if}> قيد المراجعة
                            </label>
                            
                            <label style="font-weight: normal; margin-right: 15px;">
                                <input type="radio" disabled name="status" value="accepted" {if $showData->request_status == accepted}checked{/if}> مقبول
                            </label>
                            
                            <label style="font-weight: normal; margin-right: 15px;">
                                <input type="radio" name="status" disabled value="rejected" {if $showData->request_status == rejected}checked{/if}> مرفوض
                            </label>
                             <label style="font-weight: normal; margin-right: 15px;">
                                <input type="radio" name="status" disabled value="new" {if $showData->request_status == new}checked{/if}> طلب جديد
                            </label>
                            <label style="font-weight: normal; margin-right: 15px;">
                                <input type="radio" name="status" value="old" disabled {if $showData->request_status == old}checked{/if}> طلب قديم
                            </label>
                        </div>
                    </div>
                    <!--==============================-->
                      <div class="form-group">
                        <label class="col-lg-2 control-label">صورة طلب العضوية</label>
                        <div class="col-lg-4">
                            {if $showData->application_image != "" && $showData->application_image !="." &&
                            $showData->application_image !="no image"}
                            <div style="margin-bottom: 10px;">
                            {assign var="imgs" value=","|explode:trim($showData->application_image)}
                            {foreach $imgs as $img}
                                <img src="../upload/memberShips/{trim($img)}" width="80" height="60" style="border:1px solid #ccc; margin-left:5px;" />
                                
                            {/foreach}
                            </div>
                            {/if}
                            
                            <input type="hidden" name="imageurl" id="imageurl" value="{$showData->application_image}" />
                        </div>
                    </div>
                <!--==============================-->
                 <div class="form-group">
                    <label class="col-lg-2 control-label">بطاقة الاتحاد المصري (سارية)</label>
                    <div class="col-lg-4">
                        {if $showData->egy_card != "" && $showData->egy_card != "no image"}
                            <div style="margin-bottom: 10px;">
                                {assign var="etihads" value=","|explode:$showData->egy_card}
                                {foreach $etihads as $e}
                                    {if $e|trim != ""}
                                        <img src="../upload/memberShips/{$e|trim}" width="80" height="60" style="border:1px solid #ccc; margin-left:5px;" />
                                    {/if}
                                {/foreach}
                            </div>
                        {/if}
                     
                        <input type="hidden" name="oldetihadimg" value="{$showData->egy_card}" />
                    </div>
                    </div>
                    <!--==============================-->
                   <div class="form-group">
                    <label class="col-lg-2 control-label">بطاقة الرقم القومي</label>
                    <div class="col-lg-4">
                        {if $showData->id_img != "" && $showData->id_img != "no image"}
                            <div style="margin-bottom: 10px;">
                                {assign var="ids" value=","|explode:$showData->id_img}
                                {foreach $ids as $id_file}
                                    {if $id_file|trim != ""}
                                        <img src="../upload/memberShips/{$id_file|trim}" width="80" height="60" style="border:1px solid #ccc; margin-left:5px;" />
                                    {/if}
                                {/foreach}
                            </div>
                        {/if}
                       
                        <input type="hidden" name="oldidimg" value="{$showData->id_img}" />
                    </div>
                    </div>
                    <!--==============================-->
                    <div class="form-group">
                    <label class="col-lg-2 control-label">صورة السجل التجاري</label>
                    <div class="col-lg-4">
                        {if $showData->commercial_register != "" && $showData->commercial_register != "no image"}
                            <div style="margin-bottom: 10px;">
                                {assign var="comms" value=","|explode:$showData->commercial_register}
                                {foreach $comms as $c}
                                    {if $c|trim != ""}
                                        <img src="../upload/memberShips/{$c|trim}" width="80" height="60" style="border:1px solid #ccc; margin-left:5px;" />
                                    {/if}
                                {/foreach}
                            </div>
                        {/if}

                        <input type="hidden" name="old_commerceimg" value="{$showData->commercial_register}" />
                    </div>
                    </div>

                    <!--==============================-->
                        <div class="form-group">
                        <label class="col-lg-2 control-label">صورة البطاقة الضريبية</label>
                        <div class="col-lg-4">
                            {if $showData->tax_card != "" && $showData->tax_card != "no image"}
                                <div style="margin-bottom: 10px;">
                                    {assign var="taxes" value=","|explode:$showData->tax_card}
                                    {foreach $taxes as $t}
                                        {if $t|trim != ""}
                                            <img src="../upload/memberShips/{$t|trim}" width="80" height="60" style="border:1px solid #ccc; margin-left:5px;" />
                                        {/if}
                                    {/foreach}
                                </div>
                            {/if}
                           
                            <input type="hidden" name="old_taximg" value="{$showData->tax_card}" />
                        </div>
                        </div>
                        <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة شخصية</label>
                            <div class="col-lg-4">
                                {if $showData->personal_photo != "" && $showData->personal_photo != "no image"}
                                    <img src="../upload/memberShips/{$showData->personal_photo}" width="80" height="80" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                               
                                <input type="hidden" name="old_personal_photo" value="{$showData->personal_photo}" />
                            </div>
                        </div>
                        <!--==============================-->
                        <div class="form-group">
                        <label class="col-lg-2 control-label">قرار مجلس الادارة</label>
                        <div class="col-lg-4">
                            {if $showData->board_decision != "" && $showData->board_decision != "no image"}
                                <div style="margin-bottom: 10px;">
                                    {assign var="decs" value=","|explode:$showData->board_decision}
                                    {foreach $decs as $d}
                                        {if $d|trim != ""}
                                            <img src="../upload/memberShips/{$d|trim}" width="80" height="60" style="border:1px solid #ccc; margin-left:5px;" />
                                        {/if}
                                    {/foreach}
                                </div>
                            {/if}
                           
                            <input type="hidden" name="old_decimg" value="{$showData->board_decision}" />
                        </div>
                        </div>
                         <!--==============================-->

                    
                    <input name="id" id="id" type="hidden" value="{$showData->id}" />

                    <!-- =================================================   -->
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" class="btn btn-primary pull-left" id="spbutton">رجوع</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    $('#spbutton').live('click', function (e) {
        if (!$('#spbutton').hasClass("processing")) {
            $('#spbutton').addClass("processing");
            $('#productCatName').trigger('blur');
            setTimeout(function () {
                var myForm = document.getElementById("spform");
                var SS = Spry.Widget.Form.validate(myForm);
                if (SS == true) {
                    myForm.submit();
                } else {
                    $('#spbutton').removeClass("processing");
                }
            }, 500);
        }
    });
</script>
{/literal}