- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
<?php
if ( !defined ( "DATALIFEENGINE" )){
die ( "Hacking Attemp!" );
}
$buff = dle_cache( "main", $config['skin'] );
$sql_result = mysql_query ( "SELECT * FROM " . PREFIX . "_post WHERE approve='1' ORDER BY date DESC LIMIT 0, 6" );
$buff = <<<HTML
<table class="choser">
HTML;
$rows=mysql_fetch_array($sql_result);
for($i=0;$i<mysql_num_rows($sql_result);$i++){
$row[$i] = array ( 'title'=>$rows['title'], 'category'=>$rows['category'], 'alt_name'=>$rows['alt_name'], 'full_story'=>$rows['full_story'], 'id'=>$rows['id'] );
$link[$i] = $config['http_home_url'] . get_url( $row[$i]['category'] ) . "/" . $row[$i]['id'] . "-" . $row[$i]['alt_name'] . ".html";
$title[$i] = stripslashes ( $row[$i]['title'] );
preg_match ( "#<img src=[\"\'](.+?)[\"\'](.*)/>#si", $row[$i]['full_story'], $match );
if ( trim ( $match[1] ) == '' ){
preg_match ( "#<!--TBegin--><a href=[\"\'](.+?)[\"\'](.*)></a><!--TEnd-->#si", $row[$i]['full_story'], $match );
}
$img[$i] = '<a href="'.$link[$i].'"><img src="'.$match[1].'" alt="'.$title[$i].'" /></a>';
$full_story[$i] = strip_tags ( stripslashes ( $row[$i]['full_story'] ));
if ( strlen ( $full_story ) > 100 ){
$full_story = substr ( $full_story, 0, 100 ) . ' ...';
}
}
$buff .= <<<HTML
<tr>
<td rowspan=5>
{$img[1]}
{$row[1]['title']}
{$full_story[1]}
</td>
<td>
{$row[2]['title']}
{$full_story[2]}
</td>
</tr>
<tr>
<td>
{$row[3]['title']}
{$full_story[3]}
</td>
</tr>
<tr>
<td>
{$row[4]['title']}
{$full_story[4]}
</td>
</tr>
<tr>
<td>
{$row[5]['title']}
{$full_story[5]}
</td>
</tr>
<tr>
<td>
{$row[6]['title']}
{$full_story[6]}
</td>
</tr>
</table>
HTML;
create_cache ( "main", $buff, $config['skin']);
echo $buff;
?>