Fork me on GitHub

Rapport de message :*
 

Re: Bloc Menu du Module Pages

Titre du sujet : Re: Bloc Menu du Module Pages
par Kris sur 18/04/2013 20:52:02

hello

<?php 
function b_pages_list() { 
    global 
$xoopsDB$xoopsModule$myts
    
$myts =& MyTextSanitizer::getInstance(); 
    
$block['content'] =" "
        
$result2 $xoopsDB->query("SELECT CID FROM " $xoopsDB->prefix("pages") . ""); 
        
$numrows $xoopsDB->getRowsNum($result2); 

        if (
$numrows 0
        { 
            
$sql "SELECT CID, pagetitle, pageheadline, weight, publishdate FROM " $xoopsDB->prefix("pages") . " WHERE mainpage <>0 OR defaultpage =1 ORDER BY weight, pagetitle ASC"
            
$result $xoopsDB->query($sql) ; 
            while (list(
$CID$pagetitle$pageheadline$publishdate) = $xoopsDB->fetchrow($result)) 
            { 
             
$pagetitle $myts->htmlSpecialChars($pagetitle); 
                       
$block['content'] .= "<a href='" XOOPS_URL "/modules/pages/index.php?pagenum=$CID' title='" $pagetitle "'>" $pagetitle "</a><br />"
            }  
        } else {
$block['content'] = _MD_NOPAGE;} 
    return 
$block

echo 
"<a href='nnnnn' title='bbbb'>mon lien 1</a><br />";
echo 
"<a href='oooooo' title='ccc'>mon lien 2</a>";
?>

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

49 Personne(s) en ligne (34 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 49 | Plus ...