Exemple #1
0
        // Close Element
        case "closeupdat":
            if ($_SESSION['ticket_user_is_admin'] > 0) {
                print "<!-- Closing the selected Element -->";
                close_element($id, $action, $GLOBALS['MAIN_TABLE']);
                //,$page);
            } else {
                do_title(ucfirst($action) . "ing " . $GLOBALS['ELEMENT'] . " ");
                // . $temp_trailing);
                print '<p class="severity_high">You are not allowed to Add nor Modify existing information';
            }
            break;
        case '':
            // Show entry
            print "<!-- Showing the selected Element -->";
            require_once 'functions03.inc';
            $i = show_data($id, $GLOBALS['MAIN_TABLE'], $title, $page, $start_id);
            // List Option from current Element
            $SQL_option = " AND `{$linking_field}` = {$id} ";
            mysql_open("{$mysql_db}", "{$mysql_user}", "{$mysql_passwd}");
            edit_option("", "add", $id);
            mysql_open_next("{$mysql_db_next}", "{$mysql_user_next}", "{$mysql_passwd_next}");
            do_title($GLOBALS['OPTION'] . "s belonging to this " . $GLOBALS['ELEMENT'] . ". Click on date to edit action", 0);
            // Do not generate HTML headers (the "0")
            list_option($SQL_option);
            break;
    }
}
powered();
// Print "Powered by" and end the HTML page
die;
Exemple #2
0
        print '<br>action.php::action() $page is ' . $page;
        print '<br>action.php::action() $title is ' . $title;
        print '<br>action.php::action() \\$_GET[SQL] = ' . $_GET['SQL'];
    }
    do_title($title);
    // Set page title
    if ($_GET['SQL'] != " WHERE  1 " && $_GET['SQL'] != "") {
        // Let's strip the variable of inverted slashes.
        $SQL = str_replace("\\", "", $_GET['SQL']);
        if ($debug) {
            print '<p>action.php::action() $SQL is ' . $SQL;
        }
        list_option($SQL);
        // Display resulting data with previous search
    } else {
        list_option();
        // Display resulting data
    }
    if ($debug) {
        print '<p>action.php::action() No $SQL provided ';
    }
} else {
    if ($action == "updat") {
        //header("Refresh: 3; main.php?id=".$element_id);
        set_htmlheader(ucfirst($action) . "ing " . $title . " " . $temp_trailing, 3, "main.php?id=" . $element_id);
    } else {
        set_htmlheader(ucfirst($action) . "ing " . $title . " " . $temp_trailing);
    }
    // Debuggin
    if ($debug) {
        print '<br>action.php::switch()::$id = ' . $id . "\n";