<?php


if (!function_exists('adminheaderfiles_blog')) {
	function adminheaderfiles_blog(){
   ?>
   

  <!DOCTYPE html>
<html lang="en">
  <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <base href="<?php echo admin_base ?>" />
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="robots" content="noindex">
    <meta name="googlebot" content="noindex">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>MMH Blogg App</title>

    <!-- Fonts -->
    <!--<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,300i|Dosis:300,500" rel="stylesheet">

    <!-- Styles -->
<?php 
include_css_blog();
?>

<!-- Styles -->
   
    <!-- Favicons -->
    <link rel="shortcut icon" href="<?php echo admin_base ?>images/favicon.ico">
  
	<script src="<?php echo admin_base ?>js/jquery-2.1.4.min.js" type="text/javascript"></script>
	</head>

  <body>

        <div id="page-wrapper">
   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////
////////////////////// FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////

if (!function_exists('admin_alerts')) {
	function admin_alerts($msg){
   ?>
   <!-- PAGE FUNCTION ADMIN ALERT STARTS (c) i2d Technologies Website Engine -->
  <div class="container">
  <div class="row">
                                        <div class="col-md-12 col-sm-12 m-t-60">
                                    
  <div class="alert alert-info alert-dismissible fade in">
                                                <button type="button" class="close" data-dismiss="alert"
                                                        aria-label="Close">
                                                    <span aria-hidden="true">&times;</span>
                                                </button>
<?php echo $msg; ?>                              
							  </div>
                                            </div>
                                            </div>
                                            </div>
 <!-- PAGE FUNCTION ADMIN ALERT ENDS (c) i2d Technologies Website Engine -->   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////
////////////////////// FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////

if (!function_exists('topbar')) {
	function topbar($path){
   ?>
   
<!-- Top Bar Start -->
            <div class="topbar">

                <!-- LOGO -->
                <div class="topbar-left">
                    <div class="">
                        <span class="logo">
                            <img src="<?php echo MAIN_SITE_PATH ?>images/blog_app_logo.png" alt="logo" class="logo-lg" style="height:70px !IMPORTANT;"/>
                            <img src="<?php echo MAIN_SITE_PATH ?>images/blog_logo_app_sm.png" alt="logo" class="logo-sm hidden" />
                        </span>
                    </div>
                </div>

                <!-- Top navbar -->
                <div class="navbar navbar-default" role="navigation" style="background-color:white !IMPORTANT;">
                    <div class="container">
                        <div class="">

                            <!-- Mobile menu button -->
                            <div class="pull-left">
                                <button type="button" class="button-menu-mobile visible-xs visible-sm">
                                    <i class="fa fa-bars"></i>
                                </button>
                                <span class="clearfix"></span>
                            </div>

                            <!-- Top nav left menu -->
 
                            
                            <!-- Top nav Right menu -->
                            <ul class="nav navbar-nav navbar-right top-navbar-items-right pull-right">
                                
								
								<?php 
								
								$c_settings=array(
								'table'=>master,
								'limit'=>3
								);
	
								
								
								//notifications($c_settings); ?>

                                <li class="dropdown top-menu-item-xs">
                                    <a href="" class="dropdown-toggle menu-right-item profile" data-toggle="dropdown" aria-expanded="true"><img src="<?php echo MAIN_SITE_PATH ?>images/blog_logo_app_sm.png" alt="user-img" class="img-circle"> </a>
                                    <ul class="dropdown-menu">
                                     <!--   <li><a href="javascript:void(0)"><i class="ti-user m-r-10"></i> Profile</a></li>
                                        <li><a href="javascript:void(0)"><i class="ti-settings m-r-10"></i> Settings</a></li>
                                        <li><a href="javascript:void(0)"><i class="ti-lock m-r-10"></i> Lock screen</a></li>
                                        <li class="divider"></li> -->
                                         <li><a href="<?php echo $path."/bye/"; ?>"><i class="ti-power-off m-r-10"></i> Logout</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                    </div> <!-- end container -->
                </div> <!-- end navbar -->
            </div>
            <!-- Top Bar End -->

   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////



if (!function_exists('heading')) {
	function heading($heading){
   ?>
   
  
      <header class="header bg-ui-general">
        <div class="header-info">
          <h1 class="header-title">
            <strong><?php echo $heading; ?>
			</strong>
			<!-- <small>.</small> -->
          </h1>
        </div>
      </header><!--/.header -->
   
<?php   
}
}
////////////////////// FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////

if (!function_exists('recent_items_adv_app')) {
	function recent_items_adv_app($settings,$cols,$buttons=0,$fields){

$tdsettings=array(
	'table'=>$settings['table'],
	'id_col'=>$settings['id_col'],
	'ref_value'=>$settings['ref'],
	'ref_col'=>$settings['ref_col'],
	'where_col'=>status,
	'where_value'=>'Active',
	'fields_array'=>$fields,
	'status_vaue'=>'Active',
	'echo'=>'0',
	'error'=>'1',
	'order'=>$settings['order'],
	'limit'=>'6',
	'order_col'=>$settings['id_col'],
	'type'=>'wherecol_ref_status');

	$tdload=db_fetch($tdsettings);
	
	$table=$settings['table'];

if (array_key_exists('is_widget', $settings)) {
   $is_widget=$settings['is_widget'];
   }
else{
$is_widget="0";	
}   
	
   ?>
   <!-- PAGE FUNCTION STARTS (c) i2d Technologies Website Engine -->
<?php if ($is_widget!=1){ ?>

 <div id="page-right-content">

                    <div class="container">
                        
	<?php } ?>

<div class="row">
                            <div class="col-sm-12">
							
<?php if(isset($settings['add_new']) && $settings['add_new']!=0){ ?>
<br/><br/><br/>
<p class="pull-right"><a type="button" class="<?php echo $settings['add_new_link_class']; ?>" href="<?php echo $settings['add_new_link']; ?>"><?php echo $settings['add_new_label']; ?></a></p>
<br/><br/><br/>

<?php } ?>
							
                                <div class="card-box">
								
                                    <h4 class="m-b-20"><?php echo $settings['heading']; ?></h4>
                                    
									
								  <div class="table-responsive">
                                        <table class="table table-hover mails m-0 table table-actions-bar">
                                            <thead>



                                                <tr>
<?php if(isset($settings['images']) && $settings['images']!=0){ ?>
                                                    <th>#</th>
                                          <?php } ?>          








<?php
foreach ($cols as $cols_key=>$cols_value){
?>


													<th><?php echo $cols[$cols_key]['col_heading'];?></th>
<?php } ?>													
                                                    
												    <th width="5%"></th>
                                                </tr>
                                            </thead>

                                            <tbody>
											
											
											<?php foreach($tdload as $tditem){ ?>





											
                                                <tr>
<?php if(isset($settings['images']) && $settings['images']!=0){ ?>
                                                                                                       
												   <td>
<img src="<?php echo $settings['image_path'].$tditem[$settings['image_fname']]; ?>" class="<?php echo $settings['image_class']; ?>"/>
                                                    </td>
<?php } ?>



<?php
foreach ($cols as $cols_key2=>$cols_value2){
?>

                                                    <td>
<?php if(isset($cols[$cols_key2]['col_badge']) && $cols[$cols_key2]['col_badge']!=0){;
$zomba=100;
/*
$zomba=check_read(
$table,
$tditem[id_col],
$cols[$cols_key2]['col_column'],
$cols[$cols_key2]['col_column_value']
);
*/
if($zomba!=0){
?>
   <!-- <span class="badge badge-success"> New! </span> -->
<?php }
} ?>
                                                    	<?php echo $tditem[$cols[$cols_key2]['col_fname']];?>
                                                    
													</td>
<?php } ?>
                                                   
                                                    <td width="5%">
													
<?php if(isset($settings['type_notifications']) && $settings['type_notifications']!=0){ 
$notify_link=find_notification_link($table,$tditem["id"]);
	?>
<a href="<?php echo SITE_PATH_CLIENT."/view/".$notify_link."/".$tditem["id"]; ?>" class="btn btn-success btn-sm"><?php echo "view details"; ?></a>
<?php } else {  ?>


 													
									
									<div class="dropdown pull-right">
                                        <a href="#" class="dropdown-toggle card-drop" data-toggle="dropdown" aria-expanded="false">
                                            <h3 class="m-0 text-muted"><i class="mdi mdi-dots-horizontal"></i></h3>
                                        </a>
                                        <ul class="dropdown-menu" role="menu">
<?php foreach ($buttons as $buttons_key=>$buttons_value){ ?>
<li><a href="<?php echo $buttons[$buttons_key]['href']."/".$tditem["id"]; ?>"><?php echo $buttons[$buttons_key]['label']; ?></a></li>
<?php } ?>
										  
										  </ul>
                                    </div>
<?php } ?>
									
									
                                    
			<!--										
<a href="<?php //echo $settings['site_path']."/".$settings['href'].$tditem[id_col]; ?>" class="<?php //echo $settings['button_class']; ?>"><?php //echo $settings['href_label']; ?></a>
                -->                                        
                                                    </td>

                                                </tr>

											<?php } ?>


                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
<?php if ($is_widget!=1){ ?>
						</div>
                               </div>
                
						<?php } ?>                
                <!-- End #page-right-content -->
   

 <!-- PAGE FUNCTION ENDS (c) i2d Technologies Website Engine --->   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////
////////////////////// FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////

if (!function_exists('li_list')) {
	function li_list($menu){

if(isset($menu) && !empty($menu)){
		
   ?>
   <!-- PAGE FUNCTION STARTS (c) i2d Technologies Website Engine -->
   <ul class="nav navbar-nav hidden-sm hidden-xs top-navbar-items" style="margin-left:120px;">
<?php
foreach ($menu as $men=>$value) { ?>
                                <li><a href="<?php echo $menu[$men]['link']; ?>"><i class="<?php echo $menu[$men]['icon']; ?>"></i><strong> <?php echo $menu[$men]['title']; ?></strong></a></li>
                               <?php 
}
?>
  
  </ul>
                            
 <!-- PAGE FUNCTION ENDS (c) i2d Technologies Website Engine -->   
<?php   
}

}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
function make_menu3($parent_expand,$icon,$child_expand,$section_heading,$menu_items,$path){

?>


           <li>                    
		   <a href="javascript: void(0);" aria-expanded="<?php echo $parent_expand; ?>"><i class="<?php echo $icon; ?>"></i> <strong><?php echo $section_heading; ?></strong> <span class="fa arrow"></span></a>
           <ul class="nav-second-level nav" aria-expanded="<?php echo $child_expand; ?>">
		   <?php foreach ($menu_items as $men=>$value) { ?>
           <li><a href="<?php echo $path.$menu_items[$men]['link']; ?>" <?php if(isset($menu_items[$men]['target'])){ ?>
           target="_blank"
           <?php } ?>
           ><i class="ti-arrow-circle-right"></i>&nbsp;<?php echo $menu_items[$men]['title']; ?>
           </a></li>
          <?php } ?> 
		   </ul>
           </li>
						

          
<?php    
}    
////////////////////// FUNCTION | MODULE FUNCTION (c) i2d Technologies //////////////////////////////////
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////


if (!function_exists('adminfooter')) {
	function adminfooter(){
   ?>
         
    <div class="footer" style="position:relative !IMPORTANT;">
                        <div class="text-center">
                            <strong>MMH BLOG APP V1.0</strong> - &copy; 2021
                        </div>
                    </div> <!-- end footer -->


            </div>
            <!-- end .page-contentbar -->
        </div>
        <!-- End #page-wrapper -->

    
    
       
		<?php
		
		
		include_scripts_blog();
		?>
		  
    </body>
</html>
   
<?php   
}
}
//////////////////////////// HTML FUNCTION ENDS (c) i2d Technologies ///////////////////////////////////////




?>