Location: PHPKode > projects > Havalite > havalite/themes/simplepagedesign/mobile.php
<?
function pages(){
	$static = hava_options('page_cat');
	$pages = hava_all_queries("SELECT * FROM posts WHERE prop = 1 AND cat = ? ORDER BY sort DESC", array($static));
	return $pages;
}

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
  <title><?=hava_options('title'); ?></title>
  <link rel="apple-touch-icon" href="http://havalite.com/havalite/img.php?id=93">
  	<meta name="description" content="<?=hava_options('description'); ?>"  />
	<meta name="keywords" content="<?=hava_single_post($p, 'tags'); ?>" />
  	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
  	<meta name="format-detection" content="telephone=no">
  	<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">

<style>
body{ font-size:120%; margin:0px; font-family:Arial, Helvetica, sans-serif; color:#666666; }
a{ text-decoration:none; color:#49698F; }
h2 span{ display:block; background:#E0E0E0 ; border-bottom:1px dashed #999; padding-left:6px; font-size:20px; }
#headerarea{display:block; margin:0px; overflow:hidden; height:70px; }
#logobar h1{ position:absolute; top:0px; left:16px; font-weight:bold; }
#logobar small{ position:absolute; top:50px; left:19px; font-style:italic; color:#919191; }
#logobar a{ color:#666; }

#wrap{ padding:12px; }
.gadget{border-bottom:1px dashed #ccc; }
.gadget ul{ list-style:none; font-size:110%; display:block; padding:3px 0 3px 12px; }
.gadget li{ display:block; padding:3px; }

#tabnav a{ padding-right:10px; font-size:110%;  }
.post-data { font-size:75%; color:#666666; }

.gadget h2{ display:block; background:#E0E0E0 ; border:1px solid #ccc; padding:5px 2px 5px 8px; font-size:20px;
-webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 12px; font-weight:bold;
}

/************************************/
#the_comment_form input, #the_search_form input{ font-size:130%; margin:3px; }
#the_comment_form img{ border:none; }
#the_comment_form label{ display:block; line-height:22px; }
#the_comment_form #submit{  }
#the_comment_form span{ width:75px; display:inline-block; }
/**********************************/
#footer{ display:block; text-align:center; }
</style>
</head>

<body>
<div id="headerarea">
	<!-- <a href="<?=hava_options('url'); ?>" title="<?=hava_options('tagline'); ?>"><img src="<?=hava_template_url(); ?>images/header_mobile.jpg" alt="<?=hava_options('title'); ?>" border="0"></a> -->
</div>

<div id="logobar">
<h1 id="logo"><a href="<?=hava_options('url'); ?>" title="<?=hava_options('tagline'); ?>"><?=hava_options('title'); ?></a></h1>
<small><?=hava_options('tagline'); ?></small>
</div>

<div id="wrap">

<div id="tabnav"><?php

$pages = pages();
$countPages = 1;
foreach($pages as $row){
?>
		<a class="tabnavtab tab<?=$countPages; ?>" href="?p=<?=$row['id']; ?>"><?=$row['title']; ?></a>
<?php
$countPages++;
}
?>
</div>

<?php 

if($s){
	include('search.php');
}
elseif($p){
	// view single post ---------------------------
	$postCat = hava_single_post($p, 'cat');
?>

<div class="article">
	<h2><span><?php echo hava_single_post($p, 'title'); ?></span></h2>
	<p class="post-data">
	<span class="date"><?php echo hava_date(hava_single_post($p, 'date')); ?></span> &nbsp;|&nbsp; Posted by <a href="#"><?php echo hava_single_post($p, 'author'); ?></a> &nbsp;|&nbsp; Filed under <a href="#"><?php echo $postCat; ?></a></p>
	<p><?php echo hava_single_post($p, 'text'); ?></p>	
</div>

<?php
	include('comments.php');
}
else{
	// view all posts or only post in a category -----------------
	if(!isset($limit)) $limit=0; // SET to 0 to begin limiting posts (empty variable will view all posts) --------------------
	$postResults = hava_posts($cat, $limit);
	
	foreach($postResults as $row){
		$postDate = hava_date($row['date']);
		$postText = strip_tags($row['text'], '<p><br>'); // remove html tags, leave only <p> and <br>
?>
        <div class="article">
          <h2><span><a href="?p=<?php echo $row['id']; ?>" class="rm"><?php echo $row['title']; ?></a></span></h2>
          <div class="clr"></div>
          <p class="post-data"><a href="<?php echo $row['id']; ?>" class="com">Comments (<?=hava_num_comments($row['id']); ?>)</a> <span class="date"><?php echo $postDate; ?></span> &nbsp;|&nbsp; Posted by <a href="#"><?php echo $row['author']; ?></a> &nbsp;|&nbsp; Filed under <a href="#"><?php echo $row['cat']; ?></a></p>
          <p><?php echo substr($postText, 0, 100); ?>.... </p>
        </div>
<?php
	}
?>
	<div class="article">
	<div id="nav"><?=hava_nav($cat, $limit); ?></div>
	</div>
<?php
}


?>

<div class="gadget">
<h2>Latest Posts</h2>
<div class="clist">
<?=hava_sidebar_posts('', '', 'class="sb_menu"'); ?>
</div>
</div>

<div class="gadget">
<h2>Categories</h2>
<div class="prlist">
<?=hava_sidebar_cat('class="ex_menu"'); ?>
</div>
</div>
<br>



<div id="footer">
<div align="center" style="display:block; padding-top:9px;"><?php echo hava_search_form(); ?></div>

<?php

$pages = pages();
foreach($pages as $row){
?>
		<a href="?p=<?=$row['id']; ?>"><?=$row['title']; ?></a> |
<?php
}
?>

<p>© 2011 <a href="<?=hava_options('url'); ?>"><?=hava_options('title'); ?></a><br />Powered by <a href="http://www.havalite.com/">Havalite</a>
</p>
</div>


</div><!-- wrap -->

</body>

</html>
Return current item: Havalite