<!DOCTYPE HTML 'www.MHGOZ.com.eg'>
<html>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php do_action( 'bp_head' ) ?>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">
<meta name="Powered by" content="Mhgoz Community Legend V 3.0.1">
<?php wp_head() ?>



<meta name="description" content="<?php echo get_the_title(); ?>">
<meta name="keywords" content="<?php 
//preg_match('/(\w|\d)/i',get_the_title(),$arrays_title);

$extitle = explode(' ',get_the_title());
$extitle = preg_replace('/\"|\”|\“|\'|\,|\:/iUs','',$extitle);
	
echo implode(',', $extitle);

?>,<?php global $MHGOZ_Options; $MHGOZ_Options->show('g_kywords');?>">
<meta name="generator" content="MHGOZPRESS - 3.0. Delight">
<?php global $MHGOZ_Options; $MHGOZ_Options->show('meta_tags_add');?>
<meta name="revisit-after" content="1 hour">
<meta http-equiv="Refresh" content="3000">
<meta name="author" content="<?PHP bloginfo('name'); ?>" />

<link href="<?php echo get_template_directory_uri(); ?>/theme-files/css/pada.css" rel="stylesheet" type="text/css" media="all">
<link href="<?php echo get_template_directory_uri(); ?>/theme-files/css/post.css" rel="stylesheet" type="text/css" media="all">
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/theme-files/js/post.js"></script>

</head>

<body <?php body_class($class); ?>>
<?php do_action( 'bp_before_header' ) ?>
<div class="top-menu">
<div class="w960px">
<div class="upermenu">
<div class="right">
<span class="preak-news">

<div class="news-uper-menu slidewrap news">
<ul>
<?php
	$args = array( 'numberposts' => '20' );
	$recent_posts = wp_get_recent_posts();
	foreach( $recent_posts as $recent ){
		echo '<li><a href="' . get_permalink($recent["ID"]) . '" title="Look '.esc_attr($recent["post_title"]).'" >' .   $recent["post_title"].'</a> </li> ';
	}
?>
</ul>
</div>
</span>
</div>
<div class="left">

	<form method="get" id="searchpost" action="<?php echo esc_url( home_url( '/' ) ); ?>">
		<div class="search-box">
			<input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'هل تبحث عن شئ ؟؟', 'MCL' ); ?>" />
			<input type="submit" class="submit" name="submit" id="searchsubmit" value="&nbsp;" />
		</div>
	</form>


</div>
</div>
     <div id="head-content">
     <?php if( $MHGOZ_Options->get('site_logo')) : ?> 
     <a href="<?php bloginfo('url'); ?>" class="logo" title="<?php bloginfo('name'); ?>"><img  src="<?php global $MHGOZ_Options; $MHGOZ_Options->show('site_logo');?>" width="280" height="80" alt="<?php bloginfo('name'); ?>" ></a>
     <?php else : ?>
     <a href="<?php bloginfo('url'); ?>" class="logo" title="<?php bloginfo('name'); ?>"><img  src="<?php echo get_template_directory_uri(); ?>/theme-files/img/heads/logo.png" width="280" height="80" alt="<?php bloginfo('name'); ?>"></a>
     <?php endif ?>
     <span class="adv-top ads-site">
     <?php if( $MHGOZ_Options->get('checkbox_advanced_ad_header')) : ?> 
           <a href="<?php global $MHGOZ_Options; $MHGOZ_Options->show('ad_top_url');?>" target="_blank" title="<?php global $MHGOZ_Options; $MHGOZ_Options->show('ad_top_name');?>"><img src="<?php global $MHGOZ_Options; $MHGOZ_Options->show('ad_top_img');?>" width="468" height="60" alt="<?php global $MHGOZ_Options; $MHGOZ_Options->show('ad_top_name');?>"></a>
		<?php elseif($MHGOZ_Options->get('checkbox_normal_ad_header')) : ?>
 <?php global $MHGOZ_Options; $MHGOZ_Options->show('ads_header_top_code');?>
		<?php else : ?>
           <a href="mhgoz.com" target="_blank" title="محجوز . كوم"><img src="<?php echo get_template_directory_uri(); ?>/theme-files/img/no-img/mhgozadone.png" width="468" height="60" alt="مساحه اعلانيه"></a>
		<?php endif ?>
     </span>
          </div>
</div>
</div>
</div>


<div class="bt-menuu">
<div class="w960px">
<div class="bt-menu">
      <div id="main-menu">
        <span class="right"></span>
        <span class="center mhgozfont">
                <a href="<?php bloginfo('url'); ?>" class="home-page-icon" title="الرئيسيه"></a>
        <?php wp_nav_menu( array( 'theme_location' => 'post-menu' ) ); ?>
        <div class="left">
        <span class="about-post">
  <?php echo getPostViews(get_the_ID()); ?> مشاهده 
  || 
		<?php comments_popup_link( __( '0 تعليق', 'MCL' ), __( '1 تعليق', 'MCL' ), __( '% تعليق', 'MCL' ) ); ?>	
        </span>
        <a href="#"  class="add-post-btn lightbox" title="اضف تعليق"></a>
        </div>
        </span>
        <span class="left"></span>
      </div>

</div>
</div>
</div>
<div class="tophead">
</div>


<div style="display:none">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php setPostViews(get_the_ID()); ?>

  <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
 <?php
$attachments = get_children(array
('post_parent' => get_the_ID(),
 'post_type' => 'attachment',
 'post_mime_type' => 'image',
 'orderby' => 'menu_order'));
if ( has_post_thumbnail() ) {
the_post_thumbnail( array(150,150) );
} elseif ($attachments) {
    if ( ! is_array($attachments) ) continue;
    $count = count($attachments);
    $first_attachment = array_shift($attachments);
    echo wp_get_attachment_image($first_attachment->ID);
} else {
	$table = "wp_posts";
	if($table_prefix !='' || $table_prefix != ''){
		$table = $table_prefix."posts ";
	}
	$row = mysql_fetch_assoc(mysql_query("SELECT * FROM " . $table . " WHERE id =".get_the_ID()));
	$row = explode('||',$row['post_excerpt']);
	if(preg_match('/(png|jpg|jpeg|gif|bmp)$/iUs',$row[1]) == true){
		echo '<img class="thumb" src="'.$row[1].'" alt=" " height="150" width="150" />';
	}elseif ( $MHGOZ_Options->get('checkbox_custom_no_photo')){
		echo '<img class="thumb" src="'.$MHGOZ_Options->get('site_no_photo').'" alt=" " height="150" width="150" />';
 	}else{
	    echo '<img class="thumb" src="'. get_template_directory_uri().'/theme-files/img/no-img/post-thumb.png" height="150" width="150" />';
	}
}
?>
  </a>



  <h1 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
    <?php the_title(); ?>
    </a></h1>
  <?php the_content(); ?>

</div>

<?php 

$get_the_excerpt = explode('||',get_the_excerpt());
$get_the_excerpt = $get_the_excerpt[0]; // link
$get_the_img = $get_the_excerpt[1]; // img

	
?>

<!--[if IE 9]>
<style>
.ifreamm{
	height:900px;
	width:100%
}
</style>
<![endif]-->

<iframe  src="<?php echo $get_the_excerpt; ?>" width="100%" height="100%"  ALIGN="top" HSPACE="0" VSPACE="0" frameborder="0" class="ifreamm"></iframe>
		<?php endwhile; endif; ?>

<div style="display:block">
<div id="commenttttbox">

<?php comments_template(); ?>

</div>
</div>
<!-- Start Fly ADS -->
<div class="fly_ads_right" style="left:18px !important; top:124px;">
<?php global $MHGOZ_Options; $MHGOZ_Options->show('flay_ad_right');?>
    </div>  

<div class="fly_ads_left" style="right:18px !important; top:124px;">
<?php global $MHGOZ_Options; $MHGOZ_Options->show('flay_ad_left');?>
    </div>

<!-- End Of Fly ADS -->

<?php if( is_user_logged_in() ) : ?>
<div id="fixeduser">
<a href="<?php bloginfo('url'); ?>/?p=<?php global $MHGOZ_Options; $MHGOZ_Options->show('active_page');?>" class="active-stream" title="فعاليات الموقع"></a>
<a href="<?php bloginfo('url'); ?>/?p=<?php global $MHGOZ_Options; $MHGOZ_Options->show('smfourms_page');?>" class="fourms-dis" title="نقاشات الاعضاء"></a>
<a href="<?php bloginfo('url'); ?>/?p=<?php global $MHGOZ_Options; $MHGOZ_Options->show('group_page');?>" class="user-groups" title="مجموعات الاعضاء"></a>
<a href="<?php bloginfo('url'); ?>/?p=<?php global $MHGOZ_Options; $MHGOZ_Options->show('members_page');?>" class="site-members" title="اعضاء الموقع"></a>
<a href="<?php bloginfo('url'); ?>/?p=<?php global $MHGOZ_Options; $MHGOZ_Options->show('activeing_page');?>" class="active-account" title="تفعيل العضويه !"></a>
</div>
<?php else : ?>
<?php endif ?>

 </div>
<!-- End Of Colums erea -->
<!--[if IE 9]>
<script type="text/javascript">
function resizeIframe() {
var height = document.documentElement.clientHeight;
height -= document.getElementById('content').offsetTop;

height -= 100; 

document.getElementById('content').style.height = height;

};
document.getElementById('content').onload = resizeIframe;
window.onresize = resizeIframe;
</script>
<![endif]-->
<script>
<?php global $MHGOZ_Options; $MHGOZ_Options->show('js_code');?>
</script>
<?php global $MHGOZ_Options; $MHGOZ_Options->show('analytecs_code');?>
<style>
<?php global $MHGOZ_Options; $MHGOZ_Options->show('css_code');?>
body{background-image:url(<?php echo get_template_directory_uri(); ?>/theme-files/img/bgs/<?php global $MHGOZ_Options; $MHGOZ_Options->show('site_background');?>) !important;}
</style> 