

<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

if($qry != false)

{

    foreach ($qry->result() as $row) :



    $id=$row->id;

    $name = $row->name;

    $name_ar =$row->name_ar;

    $short=$row->short;

    $short_ar=$row->short_ar;

    $details=$row->details ;

	$details_ar=$row->details_ar;

    $pic=$row->pic;

    $up1=$row->up1; 

    $up2=$row->up2; 

    $up3=$row->up3;

    $cat=$row->cat;



    endforeach;

    

    if($type=='career'){

     foreach ($qry2->result() as $row2) :



    $visitor_id=$row2->visitor_id;

    $location = $row2->location;

    $f_p_time =$row2->f_p_time;

    $r_t_type=$row2->r_t_type;

    $band=$row2->band;



    endforeach;

    }





}





?>

<?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 action="<?php echo base_url();?>index.php/posts/save_edite_post/<?php echo $type?>/<?php echo $status?>/<?php echo $id?>" enctype="multipart/form-data" 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>Category</label>

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

                    				

                    				



			                           <select name="cats" >

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

			                            <?php 

			                               if($cats !=FALSE){

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

			                               $cat_id=$c->id;

			                               ?>

			                                <option <?php if($cat_id==$cat){echo 'selected="" ';}?> value="<?php echo $c->id;?>"><?php echo $c->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="<?php echo $name;?>"  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="<?php echo $row->p_order?>"  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="<?php echo $row->job?>"  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="<?php echo $row->mobile?>"  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="<?php echo $row->phone?>"  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="<?php echo $row->fax?>"  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="<?php echo $row->email?>"  class="mws-textinput" />         
                    				</div>
                    			</div>




                    			<?php }?>

                    	   

                    	   

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

                    			

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

                    				<label>Location</label>

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

                    					<select name="location">

											<option <?php if($location=='US'){echo 'selected="selected"' ;}?>  value="USA">US</option>

											<option <?php if($location=='EGYPT'){echo 'selected="selected"' ;}?> value="EGYPT">EGYPT</option>

											<option <?php if($location=='QATAR'){echo 'selected="selected"' ;}?> value="QATAR">QATAR</option>

											<option <?php if($location=='Multi Location'){echo 'selected="selected"' ;}?> 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 <?php if($f_p_time=='Full Time'){echo 'selected="selected"' ;}?> value="Full Time">Full Time</option>

											<option <?php if($f_p_time=='Part Time'){echo 'selected="selected"' ;}?> 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 <?php if($r_t_type=='Regular'){echo 'selected="selected"' ;}?> value="Regular">Regular</option>

											<option <?php if($r_t_type=='Temporary'){echo 'selected="selected"' ;}?> 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 <?php if($band=='Profissional'){echo 'selected="selected"' ;}?> value="Professional">Pro</option>

											<option <?php if($band=='Management'){echo 'selected="selected"' ;}?> value="Management">Management</option>

										</select>      

                    				</div>

                    			</div>



                    			



                    			

                    			

                    	        <?php }?>



               <?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',$short);?>



                    					    

                    					            				</div>

                    			</div>

                    			<?php }?>

                    			

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

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

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

                    			if($ii=='0'){$v=$row->txt1;}if($ii=='1'){$v=$row->txt2;}if($ii=='2'){$v=$row->txt3;}



                    			?>

                    			<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="<?php echo $v?>"  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',$details);?>



                    					</div>

                    			</div>

                    			 <?php }?>

                    			 

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

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

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

                    			$xx=$ii+1;

                    			$are='areas_ar'.$xx;

                    			

                    			if($ii=='0'){$v=$row->area1;}if($ii=='1'){$v=$row->area2;}if($ii=='2'){$v=$row->area3;}



                    			?>

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

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

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

                    			 <?php	

                    			 $area_name='area'.$ii;

                    			 //$ckeditor->editor($area_name,$v);

                    			 

                    			 	if($type=='areas')

                    				{

                    				

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



                    				}

                    				else

                    				{

                    				

                    				$ckeditor->editor($area_name,$v);

                    				}



                    			 ?>



                    					         

                    								</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">

                    				<?php if($ii=='0'){?>

                    				   <input name="upp0" value="<?php echo $up1;?>" type="hidden" />

                    				   <?php }?>

                    				   <?php if($ii=='1'){?>



                                         <input name="upp1" value="<?php echo $up2;?>" type="hidden" />

                                         <?php }?>



                                         <?php if($ii=='2'){?>



                                         <input name="upp2" value="<?php echo $up3;?>" type="hidden" />

                                         <?php }?>



                    				<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' ;}?>
                  							

                    					</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 name="pic2" value="<?php echo $pic;?>" type="hidden" />

                    				<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="<?php echo $name_ar;?>"  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',$short_ar);?>



                    				      

                    					            				</div>

                    			</div>

                    			<?php }?>

                    			

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

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

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

                    			if($ii=='0'){$v=$row->txt_ar1;}if($ii=='1'){$v=$row->txt_ar2;}if($ii=='2'){$v=$row->txt_ar3;}

                    			?>

                    			<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="<?php echo $v?>"  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',$details_ar);?>



                    					 

                    					 </div>

                    			</div>

                    			 <?php }?>

                    			 

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

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

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

                    			if($ii=='0'){$v=$row->area_ar1;}if($ii=='1'){$v=$row->area_ar2;}if($ii=='2'){$v=$row->area_ar3;}

                    			?>

                    			<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,$v);?>



                    					         

                    								</div>

                    			</div>

                    	   <?php 

                    	   endfor;

                    	   }

                    	   ?>



              

           </div>

                           

                           </p>

                        </div>

             <?php }?>



                       

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

                    		

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

                    			

                    		</div>

                </div></div>

               



                </form>

                

                

                





  

  </div>















