コード例 #1
0
debug_msg("Action: " . $action, 5);
// Determine what action to take
switch ($action) {
    case 'add':
        template_add();
        break;
    case 'edit':
        if (isset($_GET['id'])) {
            $id = $_GET['id'];
            template_edit($id);
        }
        break;
    case 'delete':
        if (isset($_GET['id'])) {
            $id = $_GET['id'];
            template_delete($id);
        }
        break;
    case 'deleterecord':
        if (isset($_POST['id'])) {
            $id = $_POST['id'];
            template_deleterecord($id);
        }
        break;
    case 'insert':
        template_insert();
        break;
    case 'update':
        if (isset($_POST['id'])) {
            $id = $_POST['id'];
            template_update($id);
コード例 #2
0
 case 'save':
     if (isset($_POST["save_component_import"])) {
         template_import();
     } elseif (isset($_POST['save']) && $_POST['save'] == 'edit') {
         template_save_edit();
         if (isset($_SESSION["graph_return"])) {
             $return_to = $_SESSION["graph_return"];
             unset($_SESSION["graph_return"]);
             kill_session_var("graph_return");
             header('Location: ' . $return_to);
         }
     } elseif (isset($_POST['save']) && $_POST['save'] == 'add') {
     }
     break;
 case 'delete':
     template_delete();
     break;
 case 'export':
     template_export();
     break;
 case 'import':
     include_once './include/top_header.php';
     import();
     include_once './include/bottom_footer.php';
     break;
 case 'edit':
     include_once './include/top_header.php';
     template_edit();
     include_once './include/bottom_footer.php';
     break;
 default: