Пример #1
0
			</div>

			<div id="right">
				<center>
				<br>
				<?php 
require_once './authen.php';
require_once './class.php';
$query = 'SELECT * FROM `posts` ORDER BY `sno` DESC';
$res = mysql_query($query);
$obj = new Main();
while ($data = mysql_fetch_array($res)) {
    echo '<a target="iframe_data" href="viewdata.php?id=' . $data['sno'] . '">
								<div class="strips" style="cursor:pointer;width:450px;height:30px;overflow:hidden;
								padding:5px;font-size:14px;border-radius:30px;margin-bottom:5px;background:#89C4F4;color:#444;">';
    echo '<span style="float:left;padding-left:2px;overflow:hidden;">' . substr($obj->decrypt($data['main']), 0, 60) . '...</span><br>';
    echo '<span style="float:right;font-size:11px;margin-right:10px;">' . $obj->decrypt($data['date']) . '</span>';
    echo '</div>
							</a>';
}
?>
				</center>
			</div>
		</div>

		<div id="footer">
			
		</div>
	</div>
	<script type="text/javascript" src="./js/jquery.min.js"></script>
	<script type="text/javascript" src="./js/index.js"></script>
Пример #2
0
<?php

$id = $_GET['id'];
require_once './authen.php';
require_once './class.php';
$query = 'SELECT * FROM `posts` WHERE `sno` = "' . $id . '"';
$res = mysql_query($query);
$obj = new Main();
while ($data = mysql_fetch_array($res)) {
    echo '
				<link rel="stylesheet" type="text/css" href="./css/index.css">
				<center>

				<div id="main_field" style="font-size:17px;color:#EF4836;">
					' . $obj->decrypt($data['main']) . '
				</div>

				<div id="date_field" style="font-size:13px;">
					[' . $obj->decrypt($data['date']) . ']

					<!--<a href="editdata.php?id=' . $data['sno'] . '" target="iframe_data">
						<span style="float:right;margin-left:250px;margin-top:-10px;position:absolute;">
							<img src="./img/edit.png" height=30 width=30>
						</span>
					</a>-->
				</div>	
				
				<div id="post_field" style="padding-right:10px;overflow-y:auto;">
					' . $obj->decrypt($data['post']) . '			
				</div>