PHP Code Snippet Library
Available Snippets
+ Affichage

+ PHP_CSL_6

 + Snips_Add

 + Cats_Edit

 + Menu

 + Cats_Delete

 + Middle

 + Cats_Add

 + Snips_Delete

 + README

 + Index

 + Snips_Edit

 + Configuration

 + Classes

+ String_manipulation

+ Variables

Generic Options
+   Main page

+   Add new snippet

+   Add new category

+   Edit a category

+   Delete a category

Unique Options
+   Edit this snippet

+   Delete this snippet

+   Edit this category

+   Delete this category

Syntax for: PHP_CSL_6 . Index
<?
include_once 'config.php';
include_once 
'functions.php';
?>

<html>
<title>PHP Code Snippet Library</title>
<body>
<link rel="stylesheet" href="<?=$snippet_theme?>/phpcsl.css" type="text/css">
<script language="javascript" src="phpcsl.js"></script>
<div align="center">
<table class="table0" width="750" cellpadding="0">
 <tr>
  <td><table class="rowpic" width="100%" cellpadding="2">
 <tr>
  <td><a class="rp" href="http://sf.net/projects/php-csl">PHP Code Snippet Library</a></td>
 </tr>
</table>
<table width="100%" cellpadding="2" border="0">
 <tr valign="top">
  <td width="200">
   <table class="table1" width="200" cellpadding="2">
    <tr>
     <td>
      <table class="rowpic" width="100%" cellpadding="2">
        <tr><td>Available Snippets</td></tr>
        </table>
        <table class="table1" width="100%" cellpadding="2">
         <tr>
          <td><? include 'menu.php'?></td>
         </tr>
        </table>
        <table class="rowpic" width="100%" cellpadding="2">
         <tr><td>Generic Options</td></tr>
        </table>
        <table class="table1" width="100%" cellpadding="2">
        <tr>
            <td>
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php">&nbsp;Main page</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=snips&act=add">&nbsp;Add new snippet</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=cats&act=add">&nbsp;Add new category</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=cats&act=edit">&nbsp;Edit a category</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=cats&act=delete">&nbsp;Delete a category</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            </td>
            </tr>
            </table>
            
            <?
        
if(isset($_GET['cat_select'])) {
        
?>
        <table class="rowpic" width="100%" cellpadding="2">
         <tr><td>Unique Options</td></tr>
        </table>
        
        <table class="table1" width="100%" cellpadding="2">
        <tr>
            <td>
            <?
            
if(isset($_GET['show'])) {
            
?>
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=snips&act=edit&snip=<?=$_GET['show']?>&cats=<?=$_GET['cat_select']?>">&nbsp;Edit this snippet</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=snips&act=delete&snips_delete=<?=$_GET['show']?>&cats=<?=$_GET['cat_select']?>">&nbsp;Delete this snippet</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            
            <?
            
}
            
?>
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=cats&act=edit&cats=<?=$_GET['cat_select']?>">&nbsp;Edit this category</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            
            <img src="<?=$snippet_theme?>/img/link.gif" alt="+">&nbsp;
            <a href="index.php?op=cats&act=delete&cats_delete=<?=$_GET['cat_select']?>">&nbsp;Delete this category</a></br>
            <img src="<?=$snippet_theme?>/img/line.gif" width="180" height="1"></br>
            </td>
            </tr>
            </table>
        <?
        
}
        
?>
            
            </td>
        </tr>
        </table>
        
        
   </td>
   <td valign="top" align="left">
   
<table class="table1" width="520" cellpadding="2">
 <tr>
  <td>
  <table class="rowpic" width="100%" cellpadding="2">
  <tr><td>
  <?
  
if(isset($_GET['show'])) {
   echo 
"Syntax for: ".$_GET['cat_select']." . ".$_GET['show'];
  } else {
      if(isset(
$_GET['op'])) {
        if(
$_GET['op'] == "cats") {
            echo 
"Categories (edit mode)";
        } elseif(
$_GET['op'] == "snips") {
            echo 
"Snippets (edit mode)";
        } else {
               echo 
"Welcome to PHP-CSL";
           }
    } else {
               echo 
"Welcome to PHP-CSL";
           }
  }
  
?>
  </td></tr>
   </table>
   
   <table class="table1" width="100%" cellpadding="2">
    <tr>
     <td>
     <? 
     
if(isset($_GET['show']) || isset($_GET['op'])) {
      require_once 
'middle.php';
     } else {
     
?>
      </br></br></br></br><div align="center"><img src="<?=$snippet_theme?>/img/phpcsl.gif" alt="php-csl"></div></br></br></br></br>
     <? ?>&nbsp; 
     </td>
    </tr>
   </table>
   <?
   
if(isset($_GET['show'])) {
   
?>
   <table class="rowpic" width="100%" cellpadding="2">
    <tr> 
      <td height="22">
      <?
      
echo 'Description for: '.$_GET['cat_select'].' . '.$_GET['show'];
      
?>
      </td>
    </tr>
   </table>
   
   <table class="table1" width="100%" cellpadding="2">
    <tr><td>
    <?
     
require_once 'description.php'
    
?>&nbsp;
    </td></tr>
   </table>
   <? ?>
   </td>
   </tr>
  </table>
  </td>
</tr>
</table></br></td>
</tr>
</table>
</div>
</body>
</html>
 
Description for: PHP_CSL_6 . Index
Index Page