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 19/04/2013 01:08:30

<?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;}  
echo 
"<a href='nnnnn' title='bbbb'>mon lien 1</a><br />"
echo 
"<a href='oooooo' title='ccc'>mon lien 2</a>"
    return 
$block;  
}  
?>

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

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