

<head>

<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

</head>



<?php include_once '../ckeditor/ckeditor.php';

 

$ckeditor = new CKEditor();

$ckeditor->basePath = '../../../../../ckeditor/';

$ckeditor->config['filebrowserBrowseUrl'] = '../../../../../ckfinder/ckfinder.html';

$ckeditor->config['filebrowserImageBrowseUrl'] = '../../../../../ckfinder/ckfinder.html?type=Images';

$ckeditor->config['filebrowserFlashBrowseUrl'] = '../../../../../ckfinder/ckfinder.html?type=Flash';

$ckeditor->config['filebrowserUploadUrl'] = '../../../../../ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';

$ckeditor->config['filebrowserImageUploadUrl'] = '../../../../../ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';

$ckeditor->config['filebrowserFlashUploadUrl'] = '../../../../../ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';

?>



<?php foreach($lang->result() as $rs):?>

    <?php $lng=$rs->lang;?>

    <?php endforeach;?>

    <?php foreach($sett->result() as $rss):?>

    <?php endforeach;?>





   <div id="mws-container" class="clearfix">

            <div class="container">

            

            

            

                     <form enctype="multipart/form-data" action="<?php echo base_url();?>index.php/posts/save_add_post/<?php echo $type?>/<?php echo $status?>" method="post" class="mws-form">



   <div class="mws-panel grid_4" style="width:98%">

                    <div class="mws-tabs">



                        <ul>

                            <?php if($lng=='en' or $lng=='ar_en'){?><li><a href="#tab-1">English</a></li><?php }?>

                            <?php if($lng=='ar' or $lng=='ar_en'){?><li><a href="#tab-2">عربي</a></li><?php }?>

                           

                        </ul>

                        <?php if($lng=='en' or $lng=='ar_en'){?>

                        <div id="tab-1">

                            <p> 

                            <div class="mws-form-inline">

                            

                    		  <?php if($rss->have_cats=='yes'){?>



                    			<div class="mws-form-row">

                    				<label><?php if($lng=='ar'){echo 'القسم';}else{echo 'Category';}?></label>

                    				<div class="mws-form-item small">

                    				

                    				



			                           <select name="cats" >

			                           <option selected="" value="">Select</option>

			                            <?php 

			                               if($cats !=FALSE){

			                               foreach($cats->result() as $cat):

			                               ?>

			                                <option value="<?php echo $cat->id;?>"><?php echo $cat->name;?></option>

			                                

			                                 <?php endforeach;

			                                 }

			                                 ?>

			                              

			                            </select>

                    				</div>

                    			</div>

                    			<?php }?>

                              <?php if($rss->have_name=='yes'){?>

                    			<div class="mws-form-row">
                    				<label><?php if($lng=='ar'){echo 'العنوان';}else{echo 'Title';}?></label>
                    				<div class="mws-form-item small">
                    					<input type="text" name="name" value=""  class="mws-textinput" />         
                    				</div>
                    			</div>

                    			<?php }?>
                    			
                    			<?php if($type=='methods'){?>
<div class="mws-form-row">
                    				<label><?php if($lng=='ar'){echo 'العنوان';}else{echo 'Order';}?></label>
                    				<div class="mws-form-item small">
                    					<input type="text" name="p_order" value=""  class="mws-textinput" />         
                    				</div>
                    			</div>
<?php }?>

                    			
                    			 <?php if($type=='team'){?>

                    			<div class="mws-form-row">
                    				<label>Job Title</label>
                    				<div class="mws-form-item small">
                    					<input type="text" name="job" value=""  class="mws-textinput" />         
                    				</div>
                    			</div>
                    			<div class="mws-form-row">
                    				<label>Mobile</label>
                    				<div class="mws-form-item small">
                    					<input type="text" name="mobile" value=""  class="mws-textinput" />         
                    				</div>
                    			</div>
                    			<div class="mws-form-row">
                    				<label>Tel</label>
                    				<div class="mws-form-item small">
                    					<input type="text" name="phone" value=""  class="mws-textinput" />         
                    				</div>
                    			</div>
                    			<div class="mws-form-row">
                    				<label>fax</label>
                    				<div class="mws-form-item small">
                    					<input type="text" name="fax" value=""  class="mws-textinput" />         
                    				</div>
                    			</div>

                    			<div class="mws-form-row">
                    				<label>Emaile</label>
                    				<div class="mws-form-item small">
                    					<input type="text" name="email" value=""  class="mws-textinput" />         
                    				</div>
                    			</div>




                    			<?php }?>


                    			<!-- career only -->

                    			<?php if($type=='career'){?>

                    			

                    			<div class="mws-form-row">

                    				<label>Location</label>

                    				<div class="mws-form-item small">

                    					<select name="location">

											<option value="US">US</option>

											<option value="EGYPT">EGYPT</option>

											<option value="QATAR">QATAR</option>

											<option value="Multi Location">Multi Location</option>

										</select>      

                    				</div>

                    			</div>

                    			

                    			<div class="mws-form-row">

                    				<label>Full/Part Time</label>

                    				<div class="mws-form-item small">

                    					<select name="f_p_time">

											<option value="Full Time">Full Time</option>

											<option value="Part Time">Part Time</option>

										</select>      

                    				</div>

                    			</div>

                    			

                    			<div class="mws-form-row">

                    				<label>Regular/Temporary</label>

                    				<div class="mws-form-item small">

                    					<select name="r_t_type">

											<option value="Regular">Regular</option>

											<option value="Temporary">Temporary</option>

										</select>      

                    				</div>

                    			</div>



                    			<div class="mws-form-row">

                    				<label>Band</label>

                    				<div class="mws-form-item small">

                    					<select name="band">

											<option value="Professional">pro</option>

											<option value="Management">Management</option>

										</select>      

                    				</div>

                    			</div>



                    			



                    			

                    			

                    	        <?php }?>

                    	            

                    	            <!-- end  career only -->

               <?php if($rss->have_short=='yes'){?>



                    			<div class="mws-form-row">

                    				<label><?php if($lng=='ar'){echo 'مختصر';}else{echo 'Summary';}?></label>

                    				<div class="mws-form-item small">

                              <?php	$ckeditor->editor('short');?>



                    					            				</div>

                    			</div>

                    			<?php }?>

                    			

                    			

                    			<?php if($rss->txts >0){

                    			$nms=explode(',',$rss->txts_names); 

                    			for($ii=0;$ii<$rss->txts;$ii++):

                    			?>

                    			<div class="mws-form-row">

                    				<label><?php echo $nms[$ii];?></label>

                    				<div class="mws-form-item small">

                    					<input type="text" name="txt<?php echo $ii;?>" value=""  class="mws-textinput" />         

                    								</div>

                    			</div>

                    	   <?php 

                    	   endfor;

                    	   }

                    	   ?>



                    			

                    		

                    			

                    			

                    		     <?php if($rss->have_details=='yes'){?>

                    			<div class="mws-form-row">

                    				<label><?php if($lng=='ar'){echo 'التفاصيل';}else{echo 'details';}?></label>

                    				<div class="mws-form-item small">

                    					 

                    					<?php $ckeditor->editor('details');?>

                    					 

                    					 </div>

                    			</div>

                    			 <?php }?>

                    			 

	



                    			 <?php if($rss->areas >0){

                    			$nms=explode(',',$rss->areas_names); 

                    			for($ii=0;$ii<$rss->areas;$ii++):

                    			?>

                    			<div class="mws-form-row">

                    				<label><?php echo $nms[$ii];?></label>

                    				<div class="mws-form-item small">

                    				<?php 

                    				$area_name='area'.$ii;

                    				if($type=='areas')

                    				{

                    				

                    				echo '<textarea name="'.$area_name.'" cols="20" rows="2"></textarea>';



                    				}

                    				else

                    				{

                    				

                    				$ckeditor->editor($area_name);

                    				}

                    				?>



                    					         

                    								</div>

                    			</div>

                    	   <?php 

                    	   endfor;

                    	   }

                    	   ?>



                      

                      	<?php if($rss->up >0){

                    			$nms=explode(',',$rss->up_names); 

                    			for($ii=0;$ii<$rss->up;$ii++):

                    			?>

                    			<div class="mws-form-row">

                    				<label><?php echo $nms[$ii];?></label>

                    				<div class="mws-form-item small">

                    				<input name="up<?php echo $ii?>" type="file" /> 
                    				  <br /><?php if($type=='home_images'){echo 'Residental size 231 X 263 - commerical 151 X 316 - office1  228 X 74 - office2  228 X 242' ;}?>


                    				<br>

                    								</div>

                    			</div>

                    	   <?php 

                    	   endfor;

                    	   }

                    	   ?>



                      





               <?php if($rss->have_pic=='yes'){?>

                    			<div class="mws-form-row">

                    				<label><?php if($lng=='ar'){echo 'الصورة';}else{echo 'Picture';}?></label>

                    				<div class="mws-form-item larg">

                    				<input type="file"  name="pic" class="mws-textinput" />
                    				<br>
                    				<?php if($type=='home_images'){echo 'Residental size 231 X 263 - commerical 151 X 316 - office1  228 X 74 - office2  228 X 242' ;}?>

                    			</div>

                    	                 			

                    			

                    			

                    		</div>

<?php }else{?>
<div style="display:none">   <input type="file"  name="pic" class="mws-textinput" /></div>
<?php }?>

           </div>                 

                            </p>

                        </div>

                        <?php } if($lng=='ar_en'){?>

                        <div id="tab-2">

                           

                           <p> 

                            <div class="mws-form-inline">

                            

                    		 

               <?php if($rss->have_name=='yes'){?>

                    			<div class="mws-form-row">

                    				<label>Title (ar)</label>

                    				<div class="mws-form-item small">

                    					<input type="text" name="name_ar" value=""  class="mws-textinput" />         

                    								</div>

                    			</div>

                    	   <?php }?>

                    	   

                    	   

                    	   



                    	   

                    	   

               <?php if($rss->have_short=='yes'){?>



                    			<div class="mws-form-row">

                    				<label>Summary</label>

                    				<div class="mws-form-item small">

                    				<?php 

                    				$ckeditor->editor('short_ar');?>





                    					            				</div>

                    			</div>

                    			<?php }?>

                    			

                    			

                    			

                    			<?php if($rss->txts >0){

                    			$nms=explode(',',$rss->txts_names); 

                    			for($ii=0;$ii<$rss->txts;$ii++):

                    			?>

                    			<div class="mws-form-row">

                    				<label><?php echo $nms[$ii];?></label>

                    				<div class="mws-form-item small">

                    					<input type="text" name="txt_ar<?php echo $ii;?>" value=""  class="mws-textinput" />         

                    								</div>

		                    			</div>

		                    	   <?php 

		                    	   endfor;

		                    	   }

		                    	   ?>







                    		     <?php if($rss->have_details=='yes'){?>

                    			<div class="mws-form-row">

                    				<label>Details</label>

                    				<div class="mws-form-item small">

                    				<?php 

                    				$ckeditor->editor('details_ar');?>

                                     </div>



                    			</div>

                    			 <?php }?>

                    			 

                    			 

                    			 

                    			  <?php if($rss->areas >0){

                    			$nms=explode(',',$rss->areas_names); 

                    			for($ii=0;$ii<$rss->areas;$ii++):

                    			?>

                    			<div class="mws-form-row">

                    				<label><?php echo $nms[$ii];?></label>

                    				<div class="mws-form-item small">

                    				<?php 

                    				$area_name='area_ar'.$ii;

                    				$ckeditor->editor($area_name);?>

                    					         

                    								</div>

                    			</div>

                    	   <?php 

                    	   endfor;

                    	   }

                    	   ?>





              

           </div>

                           

                           </p>

                        </div>

                        <?php }?>

                       

                     <div class="mws-button-row">

                    		

                    			<input type="submit" value="Add " class="mws-button orange" />

                    			

                    		</div>

                </div></div>

               



                </form>

                

                

                





  

  </div>



























  

