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 . Middle
<?
if(isset($_GET['show'])) {
    
$s file_open($_GET['cat_select'].".".$_GET['show'].$snippet_ext_s);
    
$s stripslashes($s);
    
highlight_string($s);
} else { 

    switch (
$_GET['op']) {
    
        case 
"cats":
        
            if(isset(
$_GET['act'])) {
             switch (
$_GET['act']) {
                
                case 
"add":
                     require_once 
'cats_add.php';
                break;
                
                case 
"edit":
                    require_once 
'cats_edit.php';
                break;
                
                case 
"delete":
                 require_once 
'cats_delete.php';
                break;
             }
            } else {
             echo 
"no \$act variable was passed on the query string !!";
            }
            
        break; 
// end cats
        
        
case "snips":
        
            if(isset(
$_GET['act'])) {
             switch (
$_GET['act']) {
                
                case 
"add":
                     require_once 
'snips_add.php';
                break;
                
                case 
"edit":
                    require_once 
'snips_edit.php';
                break;
                
                case 
"delete":
                     require_once 
'snips_delete.php';
                break;
             }
            } else {
              echo 
"no \$act variable was passed on the query string !!";
            }
        
        break; 
// end snips
    
    
// end switch
// end if/else
?>
 
Description for: PHP_CSL_6 . Middle
The page that controls the main screen area.