Ejemplo n.º 1
0
}
// POST =============================================
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    $post_action = $_POST['a5_post_action'];
    if ($post_action == 'post_create_product') {
        $sel_name = $_POST['a5_product_name'];
        $sel_proce = $_POST['a5_product_price'];
        $sel_status = $_POST['a5_product_status'];
        $sel_text = $_POST['a5_product_text'];
        $sel_id = getNextNodeId($sel_db);
        $father_id = 1;
        createObject($sel_db, $father_id, $sel_name, $sel_id);
        if ($sel_db && $sel_id) {
            $image_name = uploadImage($sel_db, $sel_id);
            if ($image_name) {
                setObjectImage($sel_db, $sel_id, $image_name);
            }
        }
    }
}
// Set par array values
$par['a5_db'] = $_SESSION['a5_db'];
$par['a5_object'] = $_SESSION['a5_object_id'];
$par['a5_name'] = $_SESSION['a5_object_name'];
//====================================================
//  Internal functions
//====================================================
//====================================================
//  HTML functions
//====================================================
function viking_5_createProductLink()
Ejemplo n.º 2
0
        $par['a3_link_from_object'] = 0;
        $par['a3_link_from_sid'] = 0;
        $par['a3_link_to_object'] = 0;
        $par['a3_link_to_sid'] = 0;
    }
    if ($post_action == 'post_add_link_cancel') {
        $par['a3_link_from_object'] = 0;
        $par['a3_link_from_sid'] = 0;
        $link_from_object = 0;
        $link_from_sid = 0;
    }
    if ($post_action == 'post_set_image') {
        if ($sel_db && $sel_object) {
            $image_name = uploadImage($sel_db, $sel_object);
            if ($image_name) {
                setObjectImage($sel_db, $sel_object, $image_name);
            }
        }
    }
    if ($post_action == 'post_set_file') {
        if ($sel_db && $sel_object) {
            $file_name = uploadFile($sel_db, $sel_object);
            if ($file_name) {
                setObjectFile($sel_db, $sel_object, $file_name);
            }
        }
    }
}
// End of POST ==================================
for ($ii = 1; $ii <= DBNO; $ii++) {
    $temp = $ii . '_a3_db';