Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 16 su 16

Hybrid View

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    rispondo scusandomi con i moderatori e tutti i membri della comunity , oggi mi hanno attivato l internet e quindi riesco a postare il codice php
    Codice PHP:
          if($result =   $dbcore->querycount("SELECT * FROM `modules`  WHERE `status` =  '1' ") >0)
          {
               if(
    $left $dbcore->querycount("SELECT * FROM `modules`  WHERE `layut` =  'left' ") >0)
               {
               
    loadcolums(false,$left,false);
                     
    $leftcol $dbcore->getlist("SELECT * FROM `modules`  WHERE `layut` =  'left'   AND `permiss` !=  '1'") ;
                  if(
    $leftcol)
                  { 
                       
    ob_start();
                       foreach (
    $leftcol as $leftrow
                       {
                       include
    "modules/".$leftrow['name']."/index.php";         
                       
    $pag_cms['modules_left'] = ob_get_contents();
                       }
                       
    ob_end_clean();
                  } 
               }   
               if(
    $right $dbcore->querycount("SELECT * FROM `modules`  WHERE `layut` =  'right' ") >0)
               {    
               
    loadcolums(false,false,$right);
                     
    $rightcol $dbcore->getlist("SELECT * FROM `modules`  WHERE `layut` =  'right'   AND `permiss` !=  '1'") ;
                  if(
    $rightcol)
                  { 
                       
    ob_start();
                       foreach (
    $rightcol as $rightrow
                       {
                       include
    "modules/".$rightrow['name']."/index.php";         
                       
    $pag_cms['modules_right'] = ob_get_contents();
                       }
                       
    ob_end_clean();
                  } 
               }    
          }else{    
          }
    }
    $smarty->assign("titlecms" ,  $settings['company']);
    $smarty->assign("pathcms"  ,  $settings['pathcms']);
    $smarty->assign("pag_cms",$pag_cms);
    $smarty->display('index.tpl'); 
    qui carico i moduli sul loyut parte destra e sinistra
    Codice PHP:
       function loadcolums$duble $left$right)
       {
           global 
    $dbcore $settings$smarty;
            if( (isset(
    $left) or $left  === )and  (isset($right) or $right  === ))
           {
              
    $smarty->assign("modules_duble",1); 
             return 
    true ;
             }else if ((isset(
    $left) or $left  === )and  (isset($right) or $right  === ))
             {
                
    $smarty->assign("modules_left",1);  
            return 
    true ;
               }else if ((isset(
    $left) or $left  === )and  (isset($right) or $right  === 1))
             {
                
    $smarty->assign("modules_right",1);
              return 
    true ;
               }else{
                return 
    false ;
       } 
    questa funzione deve inviare a smarty le opzioni che devono essere eseguite
    codice:
    <{if $modules_left  == 1 }>
    <style type="text/css">
    div#navigation{
    float: left;
    display:inline-block;
    border:#333333 1px dashed;
    margin-top:20px;
    margin-left:10px;
    margin-right:10px;
    background:#00FF00;
    width: 180px;\width:190px;w\idth:180px; 
    overflow:hidden;
    
    }
    div#content{
    margin-left:200px;
    margin-top:20px;
    margin-right:10px;
    margin-bottom:10px;
    padding: 1em 20px;
     background:#FFFFFF;
     border:#333333 1px dashed;
    }
    </style>
    <{elseif $modules_right  == 1}>
    <style type="text/css">
    div#extra
    {
    float: right;
    display:inline-block;
    border:#333333 1px dashed;
    margin-top:20px;
    margin-left:10px;
    margin-right:10px;
    background:#00FF00;
    overflow:hidden;
    width: 180px;\width:190px;w\idth:180px;
    } 
    div#content{
    margin-right:200px;
    margin-top:20px;
    margin-left:20px;
    margin-bottom:10px;
    padding: 1em 5px;
     background:#FFFFFF;
     border:#333333 1px dashed;
    }
    </style>
    <{elseif $modules_duble  == 1  }>
    <style type="text/css">
    div#navigation{
    float: left;
    display:inline-block;
    border:#333333 1px dashed;
    margin-top:20px;
    margin-left:10px;
    margin-right:10px;
    background:#00FF00;
    width: 180px;\width:190px;w\idth:180px; 
    overflow:hidden;
    }
    div#extra
    {
    float: right;
    display:inline-block;
    border:#333333 1px dashed;
    margin-top:20px;
    margin-left:10px;
    margin-right:10px;
    background:#00FF00;
    width: 180px;\width:190px;w\idth:180px;
    overflow:hidden;
    } 
    div#content{
    margin-right:200px;
    margin-top:20px;
    margin-left:190px;
    margin-bottom:10px;
    padding: 1em 5px;
    background:#FFFFFF;
    border:#333333 1px dashed;
    }
    </style>
    <{else }>
    <style type="text/css">
    div#content{margin: 0 200px;padding: 1em 10px;text-align:left;FONT-FAMILY: Trebuchet MS, Verdana, Arial, Helvetica;text-align:left; }
    </style>
    <{/if }>
    spero di essermi spiegato bene
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  2. #2
    Utente di HTML.it
    Registrato dal
    Feb 2014
    residenza
    Voltati
    Messaggi
    913
    Isset($right)#or#$right##===#0
    che $right sia 1 o 0 restituisce ccomunque true

    Ti consiglio di riscrivere la funzione così:
    Codice PHP:
    #function#loadcolums(#$duble,#$left = 0, #$right = 0) {
        
    global#$dbcore#,#$settings,#$smarty;
        #if(#$left##===#1#&& $right##===#1#)#{
            
    $smarty->assign("modules_duble",1);
           
    #return#true#;
        #}
        
    else#if#($left##===#1#&& $right##===#0#)#{
            
    $smarty->assign("modules_left",1);
    ########return#true;
    #####}
        
    else#if#($left##===#0 &&#$right##===#1))#{
           #$smarty->assign("modules_right",1);
        #####return#true#;
    ######}
         #return#false#;
    #} 
    Chiedo scusa per i # ma dal telefono non riesco a toglierli
    No

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    Ti ringrazio devo impostare 0 di default! Grazie ancora
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    ciao non va ancora
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  5. #5
    Utente di HTML.it
    Registrato dal
    Feb 2014
    residenza
    Voltati
    Messaggi
    913
    Non funziona o da errore?
    All'inizio del codice metti
    Codice PHP:
     error_reporting (E_ALL); 
    No

  6. #6
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,804
    Ciao ho risolto grazie prima non funzionava
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.