<div class="ulp-page-title">Ultimate Learning Pro -

    <span class="second-text">

		    <?php _e('Account Page', 'ulp');?>

		</span>

</div>

<div class="ulp-stuffbox">

    <div class="ulp-shortcode-display">[ulp-student-profile]</div>

</div>

    <div class="metabox-holder indeed">

        <form action="" method="post">



          <div class="ulp-stuffbox">

        		<h3 class="ulp-h3"><?php _e('Top Section:', 'ulp');?></h3>

        		<div class="inside" style="margin-top:0px;">



        			<div class="ulp-register-select-template" style="padding:20px 0 35px 20px;">

        				<?php _e('Select Template:', 'ulp');?>

        				<select name="ulp_ap_top_template"  style="min-width:300px; margin-left:10px;">

                    <?php	foreach ($data ['themes'] as $k=>$v):?>

          						      <option value="<?php echo $k;?>" <?php if ($data['metas']['ulp_ap_top_template']==$k) echo 'selected';?> ><?php echo $v;?></option>

                    <?php endforeach;?>

                </select>

        			</div>



		<div class="ulp-inside-item">

            <div class="row">

                <div class="col-xs-12">

              <h4><?php _e('Welcome Message:', 'ulp');?></h4>

      				<div class="ulp-wp_editor" style="float:left; width: 60%;">

      				<?php wp_editor(stripslashes($data['metas']['ulp_ap_welcome_msg']), 'ulp_ap_welcome_msg', array('textarea_name'=>'ulp_ap_welcome_msg', 'editor_height'=>200));?>

      				</div>

      				<div style="width: 19%; display: inline-block; vertical-align: top;margin-left: 10px; color: #333;">

      				      <h4><?php _e('Regular constants', 'ulp');?></h4>

                  <?php foreach ($data['constants'] as $k=>$v):?>

                    <div><?php echo $k;?></div>

                  <?php endforeach;?>

      				</div>

      				<div class="ulp-clear"></div>

			        </div>

            	</div>

        	</div>

            <div class="ulp-inside-item">

            <div class="row">

                <div class="col-xs-6">

              <h2><?php _e('Background/Banner Image', 'ulp');?></h2>

    					<p><?php _e('The cover or background image, based on what theme you have chosen.', 'ulp');?></p>

    					<label class="ulp_label_shiwtch  ulp-onbutton">

    						<?php if (!isset($data['metas']['ulp_ap_edit_background'])) $data['metas']['ulp_ap_edit_background'] = 1; ?>

    						<?php $checked = ($data['metas']['ulp_ap_edit_background']==1) ? 'checked' : '';?>

    						<input type="checkbox" class="ulp-switch" onClick="ulpCheckAndH(this, '#ulp_ap_edit_background');" <?php echo $checked;?> />

    						<div class="switch" style="display:inline-block;"></div>

    					</label>

    					<input type="hidden" name="ulp_ap_edit_background" value="<?php echo $data['metas']['ulp_ap_edit_background'];?>" id="ulp_ap_edit_background"/>



    				<div class="form-group" style="margin:20px 0 10px 10px">

    					<input type="text" class="form-control" onClick="openMediaUp(this);" value="<?php  echo $data['metas']['ulp_ap_top_background_image'];?>" name="ulp_ap_top_background_image" id="ulp_ap_top_background_image" style="width: 90%;display: inline; float:none; min-width:500px;"/>

    					<i class="fa-ulp fa-remove-ulp" onclick="jQuery('#ulp_ap_top_background_image').val('');" title="<?php _e('Remove Background Image', 'ulp');?>"></i>

    				</div>

                </div>

            </div>

        </div>

        <div class="ulp-inside-item">

            <div class="row">

                <div class="col-xs-6">

                 <h2><?php _e('Extra Elements', 'ulp');?></h2>

                 <div>

                 <h4><?php _e('Show Avatar Image', 'ulp');?></h4>

    					<label class="ulp_label_shiwtch  ulp-onbutton">

    						<?php if (!isset($data['metas']['ulp_ap_edit_show_avatar'])) $data['metas']['ulp_ap_edit_show_avatar'] = 1; ?>

    						<?php $checked = ($data['metas']['ulp_ap_edit_show_avatar']==1) ? 'checked' : '';?>

    						<input type="checkbox" class="ulp-switch" onClick="ulpCheckAndH(this, '#ulp_ap_edit_show_avatar');" <?php echo $checked;?> />

    						<div class="switch" style="display:inline-block;"></div>

    					</label>

    					<input type="hidden" name="ulp_ap_edit_show_avatar" value="<?php echo $data['metas']['ulp_ap_edit_show_avatar'];?>" id="ulp_ap_edit_show_avatar"/>

                </div>

                <div>

                 <h4><?php _e('Show Reward Points', 'ulp');?></h4>

    					<label class="ulp_label_shiwtch  ulp-onbutton">

    						<?php if (!isset($data['metas']['ulp_ap_edit_show_points'])) $data['metas']['ulp_ap_edit_show_points'] = 1; ?>

    						<?php $checked = ($data['metas']['ulp_ap_edit_show_points']==1) ? 'checked' : '';?>

    						<input type="checkbox" class="ulp-switch" onClick="ulpCheckAndH(this, '#ulp_ap_edit_show_points');" <?php echo $checked;?> />

    						<div class="switch" style="display:inline-block;"></div>

    					</label>

    					<input type="hidden" name="ulp_ap_edit_show_points" value="<?php echo $data['metas']['ulp_ap_edit_show_points'];?>" id="ulp_ap_edit_show_points"/>

                </div>

                <div>

                 <h4><?php _e('Show Student Badges', 'ulp');?></h4>

    					<label class="ulp_label_shiwtch  ulp-onbutton">

    						<?php if (!isset($data['metas']['ulp_ap_edit_show_badges'])) $data['metas']['ulp_ap_edit_show_badges'] = 1; ?>

    						<?php $checked = ($data['metas']['ulp_ap_edit_show_badges']==1) ? 'checked' : '';?>

    						<input type="checkbox" class="ulp-switch" onClick="ulpCheckAndH(this, '#ulp_ap_edit_show_badges');" <?php echo $checked;?> />

    						<div class="switch" style="display:inline-block;"></div>

    					</label>

    					<input type="hidden" name="ulp_ap_edit_show_badges" value="<?php echo $data['metas']['ulp_ap_edit_show_badges'];?>" id="ulp_ap_edit_show_badges"/>

                </div>

                </div>

            </div>

        </div>

        <div class="ulp-inside-item">

            <div class="row">

                <div class="col-xs-6">

              <div class="ulp-wrapp-submit-bttn">

        				<input type="submit" value="<?php _e('Save Changes', 'ulp');?>" name="ulp_save" class="btn btn-primary pointer"  style="min-width:50px;" />

        			</div>

              </div>

              </div>

          </div>

            </div>

          </div>



          <div class="ulp-stuffbox">

        		<h3 class="ulp-h3"><?php _e('Content Section:', 'ulp');?></h3>

        			  <div class="inside" style="margin-top:0px;">



        				<div class="ulp-register-select-template" style="padding:20px 0 35px 20px;">

        					<?php _e('Select Template:', 'ulp');?>

        					<select name="ulp_ap_theme"  style="min-width:300px; margin-left:10px;"><?php

        						$themes = array(

        												'ulp-ap-theme-1' => '(#1) '.__('Blue New Theme', 'ulp'),

        												'ulp-ap-theme-2' => '(#2) '.__('Dark Theme', 'ulp'),

        												'ulp-ap-theme-3' => '(#3) '.__('Light Theme', 'ulp'),

        						);

        						foreach ($themes as $k=>$v){

        							?>

        							<option value="<?php echo $k;?>" <?php if ($data['metas']['ulp_ap_theme']==$k) echo 'selected';?> ><?php echo $v;?></option>

        							<?php

        						}

        					?></select>

        				</div>



        				<h2 style="font-size:22px;"><?php _e('Menu Tabs:', 'ulp');?></h2>

        				<?php	$tabs = explode(',', $data['metas']['ulp_ap_tabs']);?>

        						<div class="ulp-ap-tabs-list">

        							<?php foreach ($data['available_tabs'] as $k=>$v):?>

        								<div class="ulp-ap-tabs-list-item" onClick="ulpApMakeVisible('<?php echo $k;?>', this);" id="<?php echo 'ulp_tab-' . $k;?>"><?php echo $v['label'];?></div>

        							<?php endforeach;?>

        							<div class="ulp-clear"></div>

        						</div>

        					<?php

                      $i = 0;

        					    foreach ($data['available_tabs'] as $k=>$v){

        						?>

        							<div class="ulp-ap-tabs-settings-item" id="<?php echo 'ulp_tab_item_' . $k;?>" style="margin-top:20px;">

        								<h4><?php echo $v['label'];?></h4>

        								<div style="margin: 7px 0px;">

        									<span class="ulp-labels-onbutton" style="  min-width:100px;"><?php _e('Activate the Tab:', 'ulp');?></span>

        									<label class="ulp_label_shiwtch  ulp-onbutton">

        										<?php $checked = (in_array($k, $tabs)) ? 'checked' : '';?>

        										<input type="checkbox" class="ulp-switch" onClick="ulpSecondMakeInputhString(this, '<?php echo $k;?>', '#ulp_ap_tabs');" <?php echo $checked;?> />

        										<div class="switch" style="display:inline-block;"></div>

        									</label>

        								</div>



        									<?php

        										if (empty($data['metas']['ulp_ap_' . $k . '_menu_label'])){

                                if (empty($data ['menu_items'][$k]['label'])){

        											      $data['metas']['ulp_ap_' . $k . '_menu_label'] = '';

                                } else {

                                    $data['metas']['ulp_ap_' . $k . '_menu_label'] = $data ['menu_items'][$k]['label'];

                                }

        										}

        									?>

        									<div class="input-group" style="max-width:40%;">

        										<span class="input-group-addon" id="basic-addon1"><?php _e('Menu Label', 'ulp');?></span>

        										<input type="text" class="form-control" placeholder="" value="<?php echo $data['metas']['ulp_ap_' . $k . '_menu_label'];?>" name="<?php echo 'ulp_ap_' . $k . '_menu_label';?>">

        									</div>



        									<?php

        									if (empty($data['metas']['ulp_ap_' . $k . '_title'])){

        										$data['metas']['ulp_ap_' . $k . '_title'] = '';

        									}



        									?>

        										<div class="input-group" style="max-width:40%; margin-top:15px;">

        											<span class="input-group-addon" id="basic-addon1"><?php _e('Title', 'ulp');?></span>

        											<input type="text" class="form-control" placeholder="" value="<?php echo $data['metas']['ulp_ap_' . $k . '_title'];?>" name="<?php echo 'ulp_ap_' . $k . '_title';?>">

        										</div>



                          <div style="margin-top: 20px;">

                              <label><?php _e('Icon', 'ulp');?></label>

                              <div class="ulp-icon-select-wrapper">

                                  <div class="ulp-icon-input">

                                    <div id="<?php echo 'indeed_shiny_select_' . $k;?>" class="ulp-shiny-select-html"></div>

                                  </div>

                                    <div class="ulp-icon-arrow" id="<?php echo 'ulp_icon_arrow_' . $k;?>"><i class="fa-ulp fa-arrow-ulp"></i></div>

                                  <div class="ulp-clear"></div>

                              </div>

                          </div>



                          <?php

                          		if (empty($data['metas']['ulp_ap_' . $k . '_msg'])){

                          				$data['metas']['ulp_ap_' . $k . '_msg'] = '';

                          		}

                          ?>

        										<div style="margin-top:20px;">

        											<div style="width: 60%; display: inline-block; vertical-align: top; box-sizing:border-box;"><?php

        												wp_editor(stripslashes($data['metas']['ulp_ap_' . $k . '_msg']), 'ulp_tab_' . $k . '_msg', array('textarea_name' => 'ulp_ap_' . $k . '_msg', 'editor_height'=>200));

        											?></div>

        											<div style="width: 19%; display: inline-block; vertical-align: top; padding-left: 10px; box-sizing:border-box; color: #333;">

        												<?php

        													echo "<h4>" . __('Regular constants', 'ulp') . "</h4>";

        													foreach ($data['constants'] as $key=>$val){

        														?>

        														<div><?php echo $key;?></div>

        														<?php

        													}

        											?>

        											</div>

        										</div>



                            <script>

          									jQuery(document).ready(function(){

          										var <?php echo 'ulp_shiny_object_' . $i;$i++;?> = new ulpShinySelect({

          													selector: '#<?php echo 'indeed_shiny_select_' . $k;?>',

          													item_selector: '.ulp-font-awesome-popup-item',

          													option_name_code: '<?php echo 'ulp_ap_' . $k . '_icon_code';?>',

          													option_name_icon: '<?php echo 'ulp_ap_' . $k . '_icon_class';?>',

          													default_icon: '<?php echo 'fa-ulp fa-' . $k . '-account-ulp';?>',

          													default_code: '<?php echo $data ['metas']['ulp_ap_' . $k . '_icon_code'];?>',

          													init_default: true,

          													second_selector: '<?php echo '#ulp_icon_arrow_' . $k;?>'

          										});

          									});

          									</script>

          									<!-- ICON SELECT - SHINY -->

        							</div>



        						<?php



        						////



        					}

        				?>

        					<input type="hidden" value="<?php echo $data['metas']['ulp_ap_tabs'];?>" id="ulp_ap_tabs" name="ulp_ap_tabs" />



                <div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-8">

        					<div class="ulp-wrapp-submit-bttn" style="margin-top:20px;">

        						<input type="submit" value="<?php _e('Save Changes', 'ulp');?>" name="ulp_save" class="btn btn-primary pointer"  style="min-width:50px;" />

        					</div>

                     </div>

        		  </div>

      			</div>

        			   </div>

        	</div>



        	<div class="ulp-stuffbox">

        		<h3 class="ulp-h3"><?php _e('Footer Section:', 'ulp');?></h3>

        		<div class="inside">



                <div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-12">

        			<h2><?php _e('Footer Content:', 'ulp');?></h2>

        			<div style="margin-top:20px;">

        				<div style="width: 60%; display: inline-block; vertical-align: top; box-sizing:border-box;"><?php

        					wp_editor(stripslashes($data['metas']['ulp_ap_footer_msg']), 'ulp_ap_footer_msg', array('textarea_name' => 'ulp_ap_footer_msg', 'editor_height'=>200));

        				?></div>



        			</div>

                    </div>

        		  </div>

      			</div>

                <div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-8">

        			<div class="ulp-wrapp-submit-bttn">

        				<input type="submit" value="<?php _e('Save Changes', 'ulp');?>" name="ulp_save" class="btn btn-primary pointer"  style="min-width:50px;" />

        			</div>

                   </div>

        		  </div>

      			</div>

        		</div>

        	</div>



        	<div class="ulp-stuffbox">

        		<h3 class="ulp-h3"><?php _e('Additional Settings:', 'ulp');?></h3>

        		<div class="inside">

                <div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-8">

        			<div class="ulp-form-line" style="margin-bottom: 10px">

        				<h2><?php _e('Custom CSS:', 'ulp');?></h2>

        				<textarea id="ulp_account_page_custom_css" name="ulp_account_page_custom_css" class="ulp-dashboard-textarea-full"  style="width:80%;height: 150px;"><?php echo stripslashes($data['metas']['ulp_account_page_custom_css']);?></textarea>

        			</div>

        			<div class="ulp-wrapp-submit-bttn">

        				<input type="submit" value="<?php _e('Save Changes', 'ulp');?>" name="ulp_save" class="btn btn-primary pointer"  style="min-width:50px;" />

        			</div>

                    </div>

        		  </div>

      			</div>

        		</div>

        	</div>



        </form>

    </div>



<script>

jQuery(document).ready(function(){

  	ulpApMakeVisible('overview', '#ulp_tab-overview');

});

</script>



<style>

	<?php foreach ($data ['menu_items'] as $slug => $item):?>

		<?php echo '.fa-' . $slug . '-account-ulp:before';?>{

			content: '\<?php echo $item['icon'];?>';

			font-size: 20px;

		}

	<?php endforeach;?>

<?php if ($data ['font_awesome']):?>

		<?php foreach ($data ['font_awesome'] as $base_class => $code):?>

			<?php echo '.' . $base_class . ':before';?>{

				content: '\<?php echo $code;?>'

			}

		<?php endforeach;?>

<?php endif;?>

</style>

