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

<div class="ulp-stuffbox">



    <h3 class="ulp-h3"><?php _e('Default Pages', 'ulp');?></h3>



    <div class="inside">

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

      <div class="row">

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

            <h2><?php _e('FrontEnd Pages', 'ulp');?></h2>

		<p><?php _e('Establish the official system pages for specific sections. ', 'ulp');?></p>



        <h4 style="margin-top:20px;"><?php _e('List Courses', 'ulp');?></h4>

		<div class="form-group row">



			<select name="ulp_default_page_list_courses"  class="form-control m-bot15">

        <option value="-1" <?php if($data['metas']['ulp_default_page_list_courses']==-1) echo 'selected';?> >...</option>

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

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

						<?php $selected = $data['metas']['ulp_default_page_list_courses']==$v->ID ? 'selected' : '';?>

						<option value="<?php echo $v->ID;?>" <?php echo $selected;?> ><?php echo $v->post_title;?></option>

					<?php endforeach;?>

        <?php endif;?>

				</select>

				<?php if ($data['metas']['ulp_default_page_list_courses']>-1):?>

				<div class="ulp-link-to-public"><?php echo __('View Page: ', 'ulp'); ?><a href="<?php echo $permalink = get_permalink($data['metas']['ulp_default_page_list_courses']);?>" target="_blank" ><?php echo  $permalink;?></a></div>

				<?php endif;?>

			</div>



		<h4 style="margin-top:20px;"><?php _e('Student Profile', 'ulp');?></h4>

      <div class="form-group row">



  			<select name="ulp_default_page_student_profile"  class="form-control m-bot15">

          <option value="-1" <?php if($data['metas']['ulp_default_page_student_profile']==-1) echo 'selected';?> >...</option>

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

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

  						<?php $selected = $data['metas']['ulp_default_page_student_profile']==$v->ID ? 'selected' : '';?>

  						<option value="<?php echo $v->ID;?>" <?php echo $selected;?> ><?php echo $v->post_title;?></option>

  					<?php endforeach;?>

          <?php endif;?>

  				</select>

					<?php if ($data['metas']['ulp_default_page_student_profile']>-1):?>

						<div class="ulp-link-to-public"><?php echo __('View Page: ', 'ulp'); ?><a href="<?php echo $permalink = get_permalink($data['metas']['ulp_default_page_student_profile']);?>" target="_blank" ><?php echo  $permalink;?></a></div>

					<?php endif;?>

  			</div>





	  			<h4 style="margin-top:20px;"><?php _e('Become Instructor', 'ulp');?></h4>

				<div class="form-group row">

	  			<select name="ulp_default_page_become_instructor" class="form-control m-bot15">

	          <option value="-1" <?php if($data['metas']['ulp_default_page_become_instructor']==-1) echo 'selected';?> >...</option>

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

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

	  						<?php $selected = $data['metas']['ulp_default_page_become_instructor']==$v->ID ? 'selected' : '';?>

	  						<option value="<?php echo $v->ID;?>" <?php echo $selected;?> ><?php echo $v->post_title;?></option>

	  					<?php endforeach;?>

	          <?php endif;?>

	  				</select>

						<?php if ($data['metas']['ulp_default_page_become_instructor']>-1):?>

							<div class="ulp-link-to-public"><?php echo __('View Page: ', 'ulp'); ?><a href="<?php echo $permalink = get_permalink($data['metas']['ulp_default_page_become_instructor']);?>" target="_blank" ><?php echo $permalink;?></a></div>

						<?php endif;?>

	  		</div>



				<?php $display = get_option('ulp_watch_list_enable') ? 'block' : 'none';?>



                <h4 style="margin-top:20px;"><?php _e('Wish List', 'ulp');?></h4>

                <div class="form-group row">



		  			<select name="ulp_default_page_list_watch_list" class="form-control m-bot15">

		          	<option value="-1" <?php if($data['metas']['ulp_default_page_list_watch_list']==-1) echo 'selected';?> >...</option>

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

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

					  						<?php $selected = $data['metas']['ulp_default_page_list_watch_list']==$v->ID ? 'selected' : '';?>

					  						<option value="<?php echo $v->ID;?>" <?php echo $selected;?> ><?php echo $v->post_title;?></option>

					  				<?php endforeach;?>

					     <?php endif;?>

					  </select>

						<?php if ($data['metas']['ulp_default_page_list_watch_list']>-1):?>

								<div class="ulp-link-to-public"><?php echo __('View Page: ', 'ulp'); ?><a href="<?php echo $permalink = get_permalink($data['metas']['ulp_default_page_list_watch_list']);?>" target="_blank" ><?php echo $permalink;?></a></div>

						<?php endif;?>

			  </div>



				<h4 style="margin-top:20px;"><?php _e('Checkout', 'ulp');?></h4>

				<div class="form-group row">



				   	<select name="ulp_default_page_checkout" class="form-control m-bot15">

						   	<option value="-1" <?php if($data['metas']['ulp_default_page_checkout']==-1) echo 'selected';?> >...</option>

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

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

						   					<?php $selected = $data['metas']['ulp_default_page_checkout']==$v->ID ? 'selected' : '';?>

												<option value="<?php echo $v->ID;?>" <?php echo $selected;?> ><?php echo $v->post_title;?></option>

										<?php endforeach;?>

								<?php endif;?>

						</select>

						<?php if ($data['metas']['ulp_default_page_checkout']>-1):?>

								<div class="ulp-link-to-public"><?php echo __('View Page: ', 'ulp'); ?><a href="<?php echo $permalink = get_permalink($data['metas']['ulp_default_page_checkout']);?>" target="_blank" ><?php echo $permalink;?></a></div>

						<?php endif;?>

				</div>


        <h4 style="margin-top:20px;"><?php _e('Instructor Dashboard', 'ulp');?></h4>
				<div class="form-group row">
				   	<select name="ulp_default_page_instructor_dashboard" class="form-control m-bot15">
						   	<option value="-1" <?php if($data['metas']['ulp_default_page_instructor_dashboard']==-1) echo 'selected';?> >...</option>
						 		<?php	if ($data['pages']):?>
										<?php foreach ($data['pages'] as $k => $v):?>
						   					<?php $selected = $data['metas']['ulp_default_page_instructor_dashboard']==$v->ID ? 'selected' : '';?>
												<option value="<?php echo $v->ID;?>" <?php echo $selected;?> ><?php echo $v->post_title;?></option>
										<?php endforeach;?>
								<?php endif;?>
						</select>
						<?php if ($data['metas']['ulp_default_page_instructor_dashboard']>-1):?>
								<div class="ulp-link-to-public"><?php echo __('View Page: ', 'ulp'); ?><a href="<?php echo $permalink = get_permalink($data['metas']['ulp_default_page_instructor_dashboard']);?>" target="_blank" ><?php echo $permalink;?></a></div>
						<?php endif;?>
				</div>

</div>

      </div>

    </div>

  	<div class="ulp-line-break"></div>

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

      <div class="row">

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

		<div class="form-group row" style="margin-top:30px;">

				<div class="col-4">

						<input type="submit" name="submit" value="<?php _e('Save Changes', 'ulp');?>"  class="btn btn-primary pointer" />

			  </div>

		</div>

       </div>

         </div>

       </div>



	</div>

</div>

</form>

