PHP Classes

File: WIAdmin/WIModule/accordion/accordion_preview.php

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WIAdmin/WIModule/accordion/accordion_preview.php   Download  
File: WIAdmin/WIModule/accordion/accordion_preview.php
Role: Example script
Content type: text/plain
Description: Example script
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 7 years ago
Size: 996 bytes
 

Contents

Class file image Download
<?php
$aid
= uniqid();
?>
<div class="panel-group <?php if($accordion_style)echo $accordion_style;?>" id="accordion<?php echo $aid;?>">
    <?php
   
if($pid){
       
$cnt = uniqid();
       
$zi = $xi = 0;
        foreach(
$pid as $key=>$val){
            if(
$val!='') {
               
$pimg = get_post($val);
               
?>
<div class="panel panel-default">
                    <div class="panel-heading">
                        <a class="accordion-toggle <?php if($xi++>0) echo "collapsed"; ?>" data-toggle="collapse" data-parent="#accordion<?php echo $aid;?>" href="#collapse<?php echo ++$cnt;?>" ><?php echo $pimg->post_title;?></a>
                    </div>
                    <div id="collapse<?php echo $cnt;?>" class="panel-body collapse">

                        <?php echo wpautop(htmlspecialchars_decode(stripcslashes($pimg->post_content)));?>

                    </div>
                </div>
            <?php
           
}
        }
    }
   
?>
</div>