<?php
include 'cp_header.php'; 
/****************************************** صفحة عرض استبيان المتطوعين ***************************************/ 

include('inside_header.php'); 

?>

  

  <!-- ================ بداية السيكشن ================= -->
  <section class="contact-section"  >
<div class="container-fluid p-0  container-white  backcolor_3" style='padding-bottom:0px;' >
			
	 <!-- ================ صورة تعبيرية للقسم ================= --> 
		<div class="col-lg-12 backcolor_3 page_head page_title_background" >
			<span class='page_title  text-center'  >
			
			<img  style='width: 150px;margin-bottom: 20px;' src='<?php echo $img_path; ?>poll.webp' alt='استبيان المتطوعين' />
			<br>
			<h1 style='color:var(--white);'>استبيان المتطوعين </h1>
			
			
			</span>
		</div>


<?php if($content_num!=0){	?>
      <div class="row" style='background:#f7fafc;'>
		
			

			<div style='margin:150px auto 20px auto;text-align:right;font-size:14px;padding:10px;'>
		
			<div class="col-lg-12" style='margin-bottom:20px;text-align:right;font-size:14px;'>
							
				<a  rel='nofollow'  href="<?php echo $website_url; ?>/"><span class="las la-home" aria-hidden="true"></span>الصفحة الرئيسية</a>
				<span >/</span>  
				<a  rel='nofollow'  href="<?php echo $website_url; ?>/volunteers_survies/إستبيانات-المتطوعين"> إستبيانات المتطوعين</a>
				<span >/</span> 
				<a  rel='nofollow'   href="<?php echo $website_url; ?>/volunteers_survie/<?php echo $content_fetch['poll_id'] ?>/<?php echo url_dash(urldecode($content_fetch['poll_title'])); ?>"><?php echo $content_fetch['poll_title']; ?></a>
			</div>
						
						
		    <div   style='border-radius: 30px;padding:30px 30px 100px 30px;margin: 50px auto;width: 90%;max-width:1000px;background:var(--magenta_light_bg)'>
						
						
			
				  <h2 class="contact-title white" tyle='text-align:center;' ><?php echo $content_fetch['poll_title']; ?></h2>
				 
				  
				  <form class="form-contact contact_form" action="<?php echo $website_url;?>/send_survie/إرسال-الاستبيان" method="post" id="contactForm">
					<div class="row">
					
					
					  
					  
					 
					  <div class="col-12">
						<div class="" style='margin-top:30px'>
						  <input required  class="form-control" name="name" id="name" type="text" onfocus="this.placeholder = ''"
							onblur="this.placeholder = 'الاسم'" placeholder='الاسم'>
						</div>
					  </div>
					  
					  <div class="col-12">
						<div class="" >
						
							<select class="form-control" required name="gender"  >
							  <option value="">النوع</option>
							  <option value="1">ذكر</option>
							  <option value="2">انثى</option>

							</select>


						</div>
					  </div>
					  
					  <div class="col-6">
						<div class="">
						  <input required class="form-control" name="mobile" id="mobile" type="tel" onfocus="this.placeholder = ''"
							onblur="this.placeholder = 'رقم الجوال'" placeholder='رقم الجوال' pattern="[0-9]*">
						</div>
					  </div>
					  <div class="col-6">
						<div class="">
						  <input required class="form-control" name="email" id="email" type="email" onfocus="this.placeholder = ''"
							onblur="this.placeholder = 'البريد الإلكترونى'" placeholder='البريد الإلكترونى'>
						</div>
					  </div>
					  
					  <div class="col-12" >
					  
					  
						<div class='backcolor_1' style='padding:50px 20px 20px 20px;overflow:hidden;text-align:center;border-radius:20px;'>
								
								<?php 
									mysqli_query($conn,"SET NAMES 'utf8'");
									$result=mysqli_query($conn,$content_query);
									$ii=0;
									
									/*بداية التكرار */  
									while($fetch = mysqli_fetch_array($result)) {
   		 $fetch = clean_array($fetch); 
									$ii++;

								?>
								
									<div class='poll_ques_div'>
										<div class='poll_ques' ><?php echo $fetch['title']; ?></div>
										
										<?php if($fetch['option1']!=''){?>
											<div class='poll_answers' >
												
													<span class='radio'><input required type="radio" id="ques<?php echo $ii; ?>" name="ques<?php echo $ii; ?>" value="1_<?php echo $fetch['question_id']; ?>"></span>
									  				<span class='radio_title'><label for="ques<?php echo $ii; ?>"><?php echo $fetch['option1']; ?></label></span>
												
											</div>
										<?php }?>
										
										<?php if($fetch['option2']!=''){?>
											<div class='poll_answers' >
												
													<span class='radio'><input type="radio" id="ques<?php echo $ii; ?>" name="ques<?php echo $ii; ?>" value="2_<?php echo $fetch['question_id']; ?>"></span>
									  				<span class='radio_title'><label for="ques<?php echo $ii; ?>"><?php echo $fetch['option2']; ?></label></span>
												
											</div>
										<?php }?>							

										<?php if($fetch['option3']!=''){?>
											<div class='poll_answers' >
												 
													<span class='radio'><input type="radio" id="ques<?php echo $ii; ?>" name="ques<?php echo $ii; ?>" value="3_<?php echo $fetch['question_id']; ?>"></span>
									  				<span class='radio_title'><label for="ques<?php echo $ii; ?>"><?php echo $fetch['option3']; ?></label></span>
												
											</div>
										<?php }?>

										<?php if($fetch['option4']!=''){?>
											<div class='poll_answers' >
												
													<span class='radio'><input type="radio" id="ques<?php echo $ii; ?>" name="ques<?php echo $ii; ?>" value="4_<?php echo $fetch['question_id']; ?>"></span>
									  				<span class='radio_title'><label for="ques<?php echo $ii; ?>"><?php echo $fetch['option4']; ?></label></span>
												
											</div>
										<?php }?>
										
										<?php if($fetch['option5']!=''){?>
											<div class='poll_answers' >
												
													<span class='radio'><input type="radio" id="ques<?php echo $ii; ?>" name="ques<?php echo $ii; ?>" value="5_<?php echo $fetch['question_id']; ?>"></span>
									  				<span class='radio_title'><label for="ques<?php echo $ii; ?>"><?php echo $fetch['option5']; ?></label></span>
												
											</div>
										<?php }?>




									</div>
								<?php }?>
							
							<div class=" mt-3">
								<input type='hidden' name='poll_id' value='<?php echo $content_fetch['poll_id']; ?>' />
								<input type='submit' style="color:#182143;background:#f47d3d " class="las la-arrow-right fadeInUp btn_4" value='إرسال' >   
							</div>
						</div>
						

					  </div>
					  
					  
					</div>
				
				  </form> 
        </div>
		</div>

    </div>
<?php } else{
	
				echo"<div class=' error_message_div col-md-10 col-md-pull-2'>
					<span class=' error_message_div_title'>
					هذا الخدمة غير متوفر<br> 
					<a class='btn btn-danger' style='margin-top:20px;display:block;' href='$website_url/volunteers_survies/إستبيانات-المتطوعين'>
					إستبيانات المتطوعين</a>
					</span>
				</div>";
				
				
}?>
	
	
	
	</div>
  </section>

 

	
	

	
	<style>
	
	.media-body h3{
		height:auto;
		text-align:left;
		margin-top:10px;
	}
	
	
	</style>
	
  
 
<!-- ================ صفحة الفوتر ================= --> 
 <?php include'cp_footer.php'; ?>