Пример #1
0
function createTreeplan($array, $currentParent, $currLevel = 0, $prevLevel = -1)
{
    foreach ($array as $categoryId => $category) {
        if ($currentParent == $category['parent_id']) {
            if ($currLevel > $prevLevel) {
                echo " <ul> ";
            }
            if ($currLevel == $prevLevel) {
                echo "</li> ";
            }
            if ($category['link'] == '#') {
                $link = '#';
            } else {
                $link = 'page-' . $category['leid'] . '-' . fl($category['name']) . '.html';
            }
            if ($category['leid'] == 13) {
                $link = './';
            }
            echo '<li> <a href="' . $link . '">' . $category['name'] . '</a>';
            if ($currLevel > $prevLevel) {
                $prevLevel = $currLevel;
            }
            $currLevel++;
            createTreeplan($array, $categoryId, $currLevel, $prevLevel);
            $currLevel--;
        }
    }
    if ($currLevel == $prevLevel) {
        echo "</li>  </ul> ";
    }
}
Пример #2
0
function createTree($array, $currentParent, $currLevel = 0, $prevLevel = -2)
{
    foreach ($array as $categoryId => $category) {
        if ($currentParent == $category['parent_id']) {
            if ($currLevel > $prevLevel) {
                echo " <ul> ";
            }
            if ($currLevel == $prevLevel) {
                echo "</li> ";
            }
            switch ($category['link']) {
                case "#":
                    $link = "#";
                    break;
                case strpos($category['link'], 'html') !== false:
                    $link = $category['link'];
                    break;
                case strpos($category['link'], 'html') !== false:
                    $link = $link = LANG . '-' . $category['lien'];
            }
            if ($category['link'] == '#') {
                $link = '#';
            } else {
                if ($category['link'] == '1') {
                    $link = $category['lien'];
                } else {
                    if ($category['link'] == '2') {
                        $link = LANG . '-' . $category['lien'];
                    } else {
                        $link = LANG . '-page-' . $category['leid'] . '-' . fl($category['name']) . '.html';
                    }
                }
            }
            echo '<li> <a href="' . $link . '">' . $category['name'] . '</a>';
            if ($currLevel > $prevLevel) {
                $prevLevel = $currLevel;
            }
            $currLevel++;
            createTree($array, $categoryId, $currLevel, $prevLevel);
            $currLevel--;
        }
    }
    if ($currLevel == $prevLevel) {
        echo "</li>  </ul> ";
    }
}
Пример #3
0
    $pagination->records_per_page($records_per_page);
    ?>


            <?php 
    $index = 0;
    ?>

            <?php 
    while (!$db->EndOfSeek()) {
        $row = $db->Row();
        ?>

                <div id="act">
<a href="com-<?php 
        echo $row->id . '-' . fl($row->titre);
        ?>
.html" id="link">
<p  class="titactp"><?php 
        echo $row->titre;
        ?>
 </p>
<p id="datact" class="datact"><?php 
        echo $row->dat;
        ?>
</p>
<P class="contact"><?php 
        echo limitmot($row->content, 25) . '.....' . '<span class="suit">' . lg('SUIT') . '</span>';
        ?>
</P>
</a>
Пример #4
0
            case 7:
                $model = lg('AUTCOM');
                $link = 'autcom-';
                break;
            case 8:
                $model = lg('COM');
                $link = 'comunique-';
                break;
            case 9:
                $model = lg('SNT');
                $link = 'synth-';
                break;
        }
        ?>
            <li> <a href="<?php 
        echo $link . $row->id . '-' . fl($row->titre);
        ?>
.html"  target=_blank><?php 
        echo $date . '   :   ' . $row->titre;
        ?>
</a></li>

            <?php 
    }
    ?>
  

           
           
          </ul>
        </nav>
Пример #5
0
            // nombre d'enregistrement dans une table retourner par mysql_num_rows() par exemple ou autre ,
            if (!$db->Query("SELECT titr" . LANG . " as titre ,id,app,cont" . LANG . " as content from " . $mode . "   where  titr" . LANG . " like '%" . $post . "%'  or cont" . LANG . " like '%" . $post . "%' limit " . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page)) {
                $db->Kill('Error1s');
            }
            $pagination->records($totalrow);
            $pagination->records_per_page($records_per_page);
            while (!$db->EndOfSeek()) {
                $row = $db->Row();
                $applic = $row->app;
                if (tg('m') == 4) {
                    $mode = 'com';
                }
                ?>
<div id="act" style="height:auto; max-height:93; min-height:35;">
        <a class="titactp" href="./<?php 
                echo $mode . '-' . $row->id . '-' . fl($row->titre) . '.html';
                ?>
">
        <div class="attribute-title">
            <p><?php 
                echo limitmot($row->titre, 10);
                ?>
...</p>
        </div>
          <div class="attribute-short">
            <P class="contact"><?php 
                echo limitmot($row->content, 20) . "...";
                ?>
</p>
          </div>
          </a>	
Пример #6
0
 
 <?php 
if (!$db->Query("SELECT titr" . LANG . " as titre,app,id,parent,lien from page where  titr" . LANG . " IS NOT NULL and intdb <> 0 order by intdb  ")) {
    $db->Kill('Error1s');
}
if ($db->RowCount() > 0) {
    ?>
 
  <ul class="nav nav-pills ddmenu  "  >
<?php 
    while (!$db->EndOfSeek()) {
        $row = $db->Row();
        if ($row->app == '#') {
            $link = '#';
        } else {
            $link = 'page-' . $row->id . '-' . fl($row->titre) . '.html';
        }
        if ($row->lien != NULL) {
            $link = $row->lien;
        }
        //  $class= str_replace(".","",strrchr($row->img,'.'));
        ?>
     <li class="span12 div2" > <a  href="<?php 
        echo $link;
        ?>
"  ><?php 
        echo $row->titre;
        ?>
</a></li>
<?php 
    }
Пример #7
0
           
           
          
          </form> </br> </br> </br> </br>  </br>  
 <h1 class="heading"> <?php 
    echo lg('ARCHIV');
    ?>
 &raquo; <a href="<?php 
    echo LANG;
    ?>
-docx-<?php 
    echo tg('id');
    ?>
-<?php 
    echo fl($model);
    ?>
.html">    <?php 
    echo $model;
    ?>
  </a>  </h1>

        
     

 <?php 
    global $db;
    $records_per_page = 50;
    $pagination = new pagination();
    $wher = '';
    if (tp('annee') != 0) {
Пример #8
0
     <div class="sidebar"> 
        <!-- ################################################################################################ -->
       <article>

        <nav class="sdb_holder">
          <ul>
          <?php 
    while (!$db->EndOfSeek()) {
        $row = $db->Row();
        ?>
            <li> <a href="synth-<?php 
        echo $row->id;
        ?>
-<?php 
        echo fl($row->titre);
        ?>
.html" ><?php 
        echo $row->titre;
        ?>
</a></li>

            <?php 
    }
    ?>
  

           
           
          </ul>
        </nav>
Пример #9
0
    ?>
                </td>
               
                                <td>
                               
                                <div class="btn-group pull-right ">
                      

                      <button class="btn btn-info btn-mini dropdown-toggle " data-toggle="dropdown">
                        <span class="caret"></span>
                      </button>

                      <ul class="dropdown-menu">
                      
                           <li><a  href="../event-<?php 
    echo $row->id . '-' . fl($row->titrfr);
    ?>
.html" target="_blank"><i class="icon-camera"></i>Afficher Evénement</a></li>
                         <li><a href="#"  class="this_url" rel="editevent&id=<?php 
    echo $row->id;
    ?>
" ><i class="icon-edit"></i>Editer Evénement </a></li>
                        <?php 
    if ($row->arch != 1) {
        ?>

                              <li> 
                            <a href="#" class="this_archive" table="event" item="<?php 
        echo $row->id;
        ?>
"><i class="icon-download-alt"></i> Archivé</a>
Пример #10
0
		function get_called_class() {

			$bt = debug_backtrace();

			/*
				echo '<br><br>';
				echo '<pre>';
				print_r($bt);
				echo '</pre>';
			*/

			if (self::$fl == $bt[1]['file'] . $bt[1]['line']) {
				self::$i++;
			} else {
				self::$i = 0;
				self::$fl = $bt[1]['file'] . $bt[1]['line'];
			}

			if ($bt[1]['type'] == '::') {

				$lines = file($bt[1]['file']);
				preg_match_all('/([a-zA-Z0-9\_]+)::' . $bt[1]['function'] . '/', $lines[$bt[1]['line'] - 1], $matches);
				$result = $matches[1][self::$i];

			} else if ($bt[1]['type'] == '->') {

				$result = get_class($bt[1]['object']);
			}

			return $result;
		}
Пример #11
0
.html">
            <img class="borderedbox" src="./img/autre.jpg" alt="">
              <h2><?php 
echo lg('AUTCOM');
?>
</h2>
               </a>
            </article>
          </li>
          <li class="one_half">
            <article>
             <a href="<?php 
echo LANG;
?>
-docx-6-<?php 
echo fl('Communiqués du Conseil des Ministres');
?>
.html">
            <img class="borderedbox" src="./img/cons.jpg" alt="">
               <h2><?php 
echo lg('COMCONS');
?>
</h2>
              </a>
            </article>
          </li>
           <li class="one_half first">
            <article>
             <a href="<?php 
echo LANG;
?>
Пример #12
0
<?php

if (tg('id') != 0) {
    global $db;
    $sql = "SELECT img,titr" . LANG . " as titre from document where id=" . tg('id') . " and titr" . LANG . " IS NOT NULL  limit 0,1 ";
    if (!$db->Query($sql)) {
        $db->Kill($sql);
    }
    if ($db->RowCount() > 0) {
        $array = $db->RowArray();
        $file = $array['img'];
        $ext = '.' . str_replace(".", "", strrchr($array['img'], '.'));
        $titrefile = fl($array['titre']) . $ext;
        $download_path = "upload/doc/";
        $args = array('download_path' => $download_path, 'file' => $file, 'extension_check' => FALSE, 'referrer_check' => FALSE, 'referrer' => NULL);
        $download = new download($args);
        /*
        |-----------------
        | Pre Download Hook
        |------------------
        */
        $download_hook = $download->get_download_hook();
        //$download->chip_print($download_hook);
        //exit;
        /*
        |-----------------
        | Download
        |------------------
        */
        if ($download_hook['download'] == TRUE) {
            /* You can write your logic before proceeding to download */
Пример #13
0
        ?>
</a></p>
              <p>«<?php 
        echo limitmot($row->conten, 15);
        ?>
...&raquo;</p>
              <p class="left"><a href="#" style="color:#F31712;" ><?php 
        echo lg('PAR');
        ?>
: <?php 
        echo $row->autor . ' ' . lg('LE') . '  ' . $row->dat;
        ?>
</a></p>
              
               <p class="right"><a href="<?php 
        echo LANG . '-news-' . $row->id . '-' . fl($row->titre);
        ?>
.html"><?php 
        echo lg('SUITE');
        ?>
</a></p>
              
            </li>
            <?php 
    }
    ?>
           
          </ul>
        
          <!-- #######################################fin partie 1 d'actualiter######################################################### --> 
        <?php 
Пример #14
0
    ?>
                </td>
               
                                <td>
                               
                                <div class="btn-group pull-right ">
                      

                      <button class="btn btn-info btn-mini dropdown-toggle " data-toggle="dropdown">
                        <span class="caret"></span>
                      </button>

                      <ul class="dropdown-menu">
                      
                           <li><a href="<?php 
    echo '../' . $link . $row->id . '-' . fl($row->titrfr);
    ?>
.html" target="_blank"><i class="icon-camera"></i>Afficher Contenu</a></li>
                         <li><a href="#"  class="this_url" rel="editcontenu&id=<?php 
    echo $row->id;
    ?>
" ><i class="icon-edit"></i>Editer Contenu </a></li>
                          <li> 
                            <a href="#" class="this_del" table="contenu" item="<?php 
    echo $row->id;
    ?>
"><i class="icon-trash"></i> Supprimer</a>
                          </li>
                                            
                         
                      </ul>
Пример #15
0
          </ul>  <?php 
}
?>
            <!-- ###########################actualites##################################################################### -->
 <ul class="nospace">
           <li class="btmspace-15"><em class="heading"> <?php 
echo lg('ACTUALITER');
?>
</em> </li>
            
           
            <li class="btmspace-15"><a href="<?php 
echo LANG;
?>
-docx-9-<?php 
echo fl('Actualités');
?>
.html" >
            
            <img src="./img/news<?php 
echo LANG;
?>
.gif" alt="tchad2" title="News" class="borderedbox" style="height: 107px;width: 230px;">
            </a></li>
      
          </ul>
 
           <!-- ###########################galerie photo##################################################################### -->
          <ul class="nospace">
           <li class="btmspace-15"><em class="heading"><?php 
echo lg('GALPHOTOS');