

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

        <ol class="breadcrumb">
            <li><a href="#">نظام الطلاب</a></li>
            <li><a href="studentController.php?do=show">اعدادات النظام </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="form-horizontal"  action="studentSettings.php"   method="post"  enctype="multipart/form-data">
                    {/literal}
                    <div class="form-group">
                        <label for="studentorplayer" class="col-lg-2 control-label"> نظام طلاب او لاعبين  </label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="studentorplayer" value="0" {if {$studentsetting->studentorplayer}
                                    eq 0} checked {/if}>
                                    طلاب </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="studentorplayer" value="1" {if {$studentsetting->studentorplayer}
                                    eq 1} checked {/if} >
                                    لاعبين </label>
                            </div>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="paymentsystems" class="col-lg-2 control-label">انظمة الدفع</label>
                        <div class="col-lg-4">
                            <label class="sr-only">
                                <input type="checkbox" id="paymentsystems1" name="paymentsystems1" value="1" {if $studentsetting->paymentsystems1} checked="checked" {/if}>
                                  دفع بالتخصص
                            </label>
                            <label class="sr-only">
                                <input type="checkbox" id="paymentsystems2" name="paymentsystems2" value="1" {if $studentsetting->paymentsystems2} checked="checked" {/if}>
                                 دفع بالنظام
                            </label>
                            <label class="sr-only">
                                <input type="checkbox" id="paymentsystems3" name="paymentsystems3" value="1" {if $studentsetting->paymentsystems3} checked="checked" {/if}>
                                دفع خاص
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="studentorplayer" class="col-lg-2 control-label"> اظهار المحذوف </label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="showdel" value="1" {if {$studentsetting->showdel}
                                    eq 1} checked {/if}>
                                    نعم </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input type="radio" name="showdel" value="0" {if {$studentsetting->showdel}
                                    eq 0} checked {/if} >
                                    لا </label>
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-group"  >
                         <label for="txtName" class="col-lg-2 control-label">   التخصص  الاساسي </label>
                        <div class="col-lg-4">
                          <input id="studentaddsubjectid" type="text" name="studentaddsubjectid" class="getselectjoin"  data-placeholder=" اختر  تخصص   "   data-table="studentaddsubjects" 
                            data-join=" LEFT JOIN studentsubjects ON studentaddsubjects.studentsubjectid = studentsubjects.id 
                             LEFT JOIN studentsubjectgroups ON studentaddsubjects.studentsubjectgroupid = studentsubjectgroups.id "  
                            data-filter=" and studentaddsubjects.del < 2  and studentsubjects.del < 2 and studentsubjectgroups.del < 2 "
                            data-parent="" data-itr=""  data-search="subjectname,'/',subjectgroupname,'/',subjectgroupprice"/>  
                            {if $studentaddsubjects->del lt 2 && $studentsetting->studentaddsubjectid gt 0 }
                              <input type="hidden" data-table="studentaddsubjectid" data-id="{$studentsetting->studentaddsubjectid}" 
                                data-text="{$subjectgroups}"
                            class="selectedit" />
                            {/if}
                            </div>
                            
                    </div>
                    
                    <div class="form-group"  >
                        <label for="txtName" class="col-lg-4 control-label">  المجموعات المسموح لها بتعدبل الدفع   </label>
                        <div class="col-lg-7">
                            <select name="showpayedit[]" multiple=""    data-placeholder="اختر " class="selectnew">
                                <option value=""></option>
                               {foreach $usergroup as $single}
                                <option value="{$single.usergroupid}" {if $single.usergroupid|in_array:$showpayedit} selected="selected" {/if}  >{$single.usergroupname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    
                    <div class="form-group"  >
                        <label for="txtName" class="col-lg-4 control-label">  المجموعات المسموح لها بحذف الدفع   </label>
                        <div class="col-lg-7">
                            <select name="showpaydel[]" multiple=""    data-placeholder="اختر " class="selectnew">
                                <option value=""></option>
                               {foreach $usergroup as $single}
                                <option value="{$single.usergroupid}" {if $single.usergroupid|in_array:$showpaydel} selected="selected" {/if}>{$single.usergroupname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </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="paythreemonths"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->paythreemonths}"/>-->
                            
                    <!--    </div>-->
                    <!--</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="payonemonths"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->payonemonths}"/>-->
                            
                    <!--    </div>-->
                    <!--</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="paytwomonths"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->paytwomonths}"/>-->
                            
                    <!--    </div>-->
                    <!--</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="payfourmonths"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->payfourmonths}"/>-->
                            
                    <!--    </div>-->
                    <!--</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="paythreemonths"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->paythreemonths}"/>-->
                            
                    <!--    </div>-->
                    <!--</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="paysixmonths"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->paysixmonths}"/>-->
                            
                    <!--    </div>-->
                    <!--</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="payeightmonths"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->payeightmonths}"/>-->
                            
                    <!--    </div>-->
                    <!--</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="payyear"   digits="true" -->
                    <!--         class="form-control  nummbers" placeholder=" "  -->
                    <!--         data-table="" data-tablecol="" data-tableid=""-->
                    <!--        data-parentid="" data-parentcol="" value="{$studentsetting->payyear}"/>-->
                            
                    <!--    </div>-->
                    <!--</div>-->
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">   رسالة الترحيب </label>
                        <div class="col-lg-4">
                           <textarea  class="form-control" name="welcomemessage" rows="2"  placeholder="الترحيب ">{$studentsetting->welcomemessage}</textarea>
                        </div>
                    </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="payapplied"   digits="true" 
                             class="form-control  nummbers" placeholder=" "  
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol=""  value="{$studentsetting->payapplied}"/>
                            
                        </div>
                    </div>
                    
                    <div class="clearfix"></div>
                    <div class="form-group">
                        <div class="col-md-12">
                         {if $subjects->del lt 2}
                          <div>
                             <button type="button" class="btn green-meadow btn-sm pull-left settingpays" data-container="studentsettingpays" data-itr='' 
                             style="font-size: 10px;background: #ccc">اضافة اشتراك</button>
                              <input type="hidden" id="studentsettingpaysitr" name="studentsettingpaysitr" value="{1 + $studentsettingpays|@count}" />
                          </div>
                          {/if}
                            <ul class="studentsettingpayscontainer" >
                            {assign var=it1r value=1}
                            {foreach $studentsettingpays as $studentsettingpay}
                             <input type="hidden"  name="studentsettingpayid{$it1r}" value="{$studentsettingpay->id}" />
                             <li  id="studentsettingpaysremove1{$studentsettingpay->id}" style="list-style-type: none;">
                                   <div class="col-lg-4">
                                    <input  required="required"    type="text" name="name{$it1r}" class="form-control checkcolumn" placeholder="* اسم  الاشتراك " data-table="studentsettingpays" data-tablecol="name" data-tableid="{$studentsettingpay->id}
                                    " data-parentid="" data-parentcol="" value="{$studentsettingpay->name}" />
                                   </div>
                                   <div class="col-lg-2">
                                     <input      type="text" name="price{$it1r}" class="form-control  floats" placeholder="السعر     "  digits="true"
                                     data-table="" data-tablecol="" data-tableid="" data-parentid="" 
                                     data-parentcol="" value="{$studentsettingpay->price}"/>
                                   </div>
                                   
                                   <div class="col-lg-2">
                                     <input      type="text" name="countmonths{$it1r}" class="form-control  floats" placeholder="عدد الاشهر رقم     "  digits="true"
                                     data-table="" data-tablecol="" data-tableid="" data-parentid="" 
                                     data-parentcol="" value="{$studentsettingpay->countmonths}"/>
                                   </div>
                                   
                                    <div class="col-lg-3">
                                        <div class="radio-inline">
                                            <label>
                                                <input value="1"  name="stopping{$it1r}"   {if $studentsettingpay->stopping  eq 1}  checked="checked" {/if}   type="radio" />
                            
                                                اظهار </label>
                                        </div>
                                        <div class="radio-inline">
                                            <label>
                                                <input value="0" name="stopping{$it1r}" {if $studentsettingpay->stopping  eq 0}  checked="checked" {/if}  type="radio" />
                                              اخفاء</label>
                                        </div>
                            
                                    </div>

                                    
                                   {if $it1r != 1 }
                                   <div class="col-lg-1 pull-right">
                                      <a href="javascript:;"  data-id="{$studentsettingpay->id}" data-edit="1" data-container="studentsettingpays"  
                                      class="btn btn-xs red pull-right settingpaysremoveappend"> x
                                      </a>
                                   </div>
                                   {/if} 
                                  
                                  
                             </li>
                             {capture assign=it1r}{$it1r+1}{/capture}
                             {/foreach}
                          </ul>
                       </div>
                    </div>
                

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <input type="hidden" name="studentsettingid" value="1" >
                            <button type="submit" class="btn btn-primary pull-left " >تعديل</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function () {
    selectedit();
     });
</script>
