if ($cat)
{
$arts = $CONN->Execute("SELECT A.*, (SELECT COUNT(*) AS total_res FROM articles_res B WHERE B.art=A.id AND B.is_active=1) AS total_res FROM articles A WHERE type=1 AND is_active=1 AND cat=$cat AND is_show_cat=1 ORDER BY is_main_art DESC, addtime_ts DESC");
}
else
{
$arts = $CONN->Execute('SELECT A.*, (SELECT COUNT(*) AS total_res FROM articles_res B WHERE B.art=A.id AND B.is_active=1) AS total_res FROM articles A WHERE type=1 AND is_active=1 AND is_show_homepage=1 ORDER BY is_main_art DESC, addtime_ts DESC');
}
if (isset($_GET['offset']) && (int)$_GET['offset']>0)
{
$offset=(int)$_GET['offset'];
$arts->Move($offset);
}
else
{
$offset=0;
}
$mainart_total=$arts->RecordCount();
$mainart_counter=0;
while (!$arts->EOF && $mainart_counter<$mainart_howmany)
{
$mainart_counter++;
if (strlen(''.$arts->Fields('outer_title'))>3)
{
$art_title = $arts->Fields('outer_title');
}
else
{
$art_title = $arts->Fields('title');
}
if (strlen(''.$arts->Fields('outer_subtitle'))>3)
{
$art_subtitle = $arts->Fields('outer_subtitle');
}
else
{
$art_subtitle = $arts->Fields('subtitle');
}
if ($arts->Fields('is_main_art')==1)
{
$art_class='mainart_box';
}
else
{
$art_class='art_box';
}
?>
echo ''.$arts->Fields('author').' / ';
$ts = $arts->Fields('addtime_ts');
echo writeHebrewDate($ts, 0);
echo "\n\r / ";
echo date('H:i', $ts).' ';
?>
|
echo ''.$arts->Fields('total_res').' תגובות';
echo ''."\n\r".'|'."\n\r".'';
?>
|
=clean_spaces(' '.nl2p($art_subtitle).' ')?>
$arts->MoveNext();
}
$arts->Close();
unset($arts);
if ($cat)
{
$nav_prev='?cat='.$cat.'&offset='.($offset-$mainart_howmany);
$nav_next='?cat='.$cat.'&offset='.($offset+$mainart_howmany);
}
else
{
$nav_prev='?offset='.($offset-$mainart_howmany);
$nav_next='?offset='.($offset+$mainart_howmany);
}
?>
if ($offset>0)
{
echo '«'."\n\r";
echo 'לדף הקודם ';
}
?>
|
if ($offset+$mainart_howmany<$mainart_total)
{
echo '»'."\n\r";
echo 'לדף הבא ';
}
?>
|
|
|
ניווט מהיר:
|
for ($i=$potd_total; $i>=1; $i--)
{
if ($i==1)
{
echo ''.$i.'';
}
else
{
echo ''.$i.'';
}
if ($i>1)
{
echo ''."\n\r".'|'."\n\r".'';
}
}
?>
|
|
include "parts/wort.php";
include "parts/hundred.php";
include "parts/thousand.php";
include "parts/opinions.php";
include "parts/newspapers.php";
?>
|
|
include "ads2.php";
?>
|
|