-------------------------------------- // // XOOPS - PHP Content Management System // // Copyright (c) 2004 XOOPS.org // // // // // // Authors : // // - solo (www.wolfpackclan.com) // // - christian (www.edom.org) // // - herve (www.herve-thouzard.com) // // - Marcan (www.smartfactory.ca) // // edito v2.3 // // ------------------------------------------------------------------------ // // This script is used to display the editos list include_once("header.php"); include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; include_once(XOOPS_ROOT_PATH."/header.php"); $startart = isset( $_GET['startart'] ) ? intval( $_GET['startart'] ) : 0; $xoopsOption['template_main'] = 'content_index.html'; $myts =& MyTextSanitizer::getInstance(); //Rediriger l'index vers un edito ou une url spécifique if ($xoopsModuleConfig['index_content']) { if ( (eregi("http://", $xoopsModuleConfig['index_content'])) || (eregi("https://", $xoopsModuleConfig['index_content']))) { header ("location: ".$xoopsModuleConfig['index_content']); exit(); } else { $result = $xoopsDB -> queryF( "SELECT COUNT(*) FROM " . $xoopsDB->prefix("edito")." WHERE Id_content = ".$xoopsModuleConfig['index_content'].""); list( $numrows )=$xoopsDB->fetchRow($result); if ($numrows > 0) { header ("location: content.php?id=".$xoopsModuleConfig['index_content']); exit(); } } } //Affiche le nom du module et le texte d'introduction if ($xoopsModuleConfig['index_logo']) { $title = ''.$xoopsModule -> getVar( 'name' ).''; } else { $title = $xoopsModule -> getVar( 'name' );} $xoopsTpl->assign("lang_contentlist", $title); //$xoopsTpl->assign("lang_contentlist", $xoopsModule -> getVar( 'name' )); $xoopsTpl->assign("textindex", $myts->makeTareaData4Show($xoopsModuleConfig['textindex'])); //Calcul le nombre et la lageur des colonnes $xoopsTpl->assign("columns", $xoopsModuleConfig['columns']); $xoopsTpl->assign("width", 100 / $xoopsModuleConfig['columns']); // Vérifier les permissions par groupe $group = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS); // Affiche les editos $result = $xoopsDB -> queryF( "SELECT COUNT(*) FROM " . $xoopsDB->prefix("edito")." WHERE offline = 1 AND hidden = 1"); list( $numrows )=$xoopsDB->fetchRow($result); $count = 1; if ($numrows > 0) // That is, if there ARE editos in the system { $sql = "SELECT Id_content, subject, groups, artimage, datesub, counter, uid FROM ".$xoopsDB->prefix("edito")." WHERE offline = 1 AND hidden = 1 ORDER BY ".$xoopsModuleConfig['order'].""; $result = $xoopsDB->queryF($sql, $xoopsModuleConfig['perpage'], $startart ); while(list( $Id_content, $subject, $groups, $artimage, $datesub, $counter, $uid) = $xoopsDB->fetchRow($result)) { $groups = explode(" ",$groups); if (count(array_intersect($group,$groups)) > 0) { $info = array(); // Détermine les icons à afficher $tag = ''; if ( $xoopsModuleConfig['tags'] == 1){ $time = time(); $startdate = (time()-(86400 * $xoopsModuleConfig['tags_new'])); if ($startdate < $datesub) { $tmpuser = XoopsUser::getUnameFromId($uid); $datesub = formatTimestamp($datesub,'m')." $tmpuser"; $new = ' '.$datesub.''; } else {$new ='';} if ($counter >= $xoopsModuleConfig['tags_pop']) { $pop = ' '.$counter.' '._READS.''; } else {$pop ='';} $tag = $pop.$new; } //Défini la largeur des logos if ($artimage){ $info['logo']= XOOPS_URL . '/'. $xoopsModuleConfig['sbuploaddir'] .'/'. $artimage; if ($xoopsModuleConfig['logo_width']) { $logo = $info['logo']; $image_size = getimagesize("$logo"); $width = $image_size[0]; if ($xoopsModuleConfig['logo_width'] <= $width) { $info['logo_width'] = "width='".$xoopsModuleConfig['logo_width']."'"; } else { $info['logo_width'] = ""; } } } else { $info['logo']= XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/uploads/blank.gif'; $info['logo_width'] = ""; } $info['subject'] = $myts->makeTareaData4Show($subject); $info['tag']= $tag; $info['Id_content'] = $Id_content; $info['link'] = ""; $info['numrows'] = $count++; $pagenav = new XoopsPageNav( $numrows, $xoopsModuleConfig['perpage'], $startart, 'startart', 'Id_content =' . $Id_content ); $xoopsTpl->assign('pagenav', $pagenav->renderNav()); if ( $xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid()) ) { $info['adminlink'] = ""._EDITO_EDIT." "._EDITO_ADD.""; }else{ $info['adminlink'] = "";} $xoopsTpl->append('infos', $info); unset($info); } } } // MetaTag Generator $nul = '1'; createMetaTags($xoopsModuleConfig['moduleMetaDescription'], $xoopsModuleConfig['textindex'], $xoopsModuleConfig['moduleMetaDescription']); include_once(XOOPS_ROOT_PATH."/footer.php"); ?> der="0" alt="">
Sun and clouds
people | pictures
guest book   © 2001-2003 DrAlex Software For more information contact John Carroll at jdcarroll1@aol.com   ndex_orange_r1_c9Map">