Execute("SELECT * FROM general"); $mainart_howmany=$general->Fields('mainart_howmany'); ?> <?=$general->Fields('window_title')?>
קצר
ב"ה,
Execute('SELECT * FROM cats WHERE is_articles=1 AND hidden=0'); echo '»ראשי'; while (!$cats->EOF) { if ($cats->Fields('id')==$cat) { echo '»'.$cats->Fields('name').''; $cat_name = $cats->Fields('name'); } else { echo '»'.$cats->Fields('name').''; } $cats->MoveNext(); } $cats->Close(); unset($cats); echo '»דעות'; echo '»כותרות העיתונים'; echo '»תמונות'; ?>
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'; } ?>

'.$arts->Fields('author').' / '; $ts = $arts->Fields('addtime_ts'); echo writeHebrewDate($ts, 0); echo "\n\r / "; echo date('H:i', $ts).'
'; ?>
Fields('id').');" href="javascript:;">'.$arts->Fields('total_res').' תגובות'; echo ''."\n\r".'|'."\n\r".''; ?> קישור לכתבה הוסף תגובה הדפסה
'.nl2p($art_subtitle).'

')?>
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); } ?>
0) { echo '«'."\n\r"; echo 'לדף הקודם
'; } ?>
לדף הבא
'; } ?>
תמונה תמונות נוספות



צילום:
ניווט מהיר: =1; $i--) { if ($i==1) { echo ''.$i.''; } else { echo ''.$i.''; } if ($i>1) { echo ''."\n\r".'|'."\n\r".''; } } ?>
שימושון
Close(); unset($general); DATABASE('close'); ?>