}
//vars
$name = "concerto.table.query";
$db = User::get_current_db();
if (array_key_exists("db", $_POST)) {
    $workspace_id = $_POST['db'];
}
$table_name = "";
if (array_key_exists("table_name", $_POST)) {
    $table_name = $_POST['table_name'];
}
$type = "SELECT";
if (array_key_exists("type", $_POST)) {
    $type = $_POST['type'];
}
$ws = UserWorkspace::from_property(array("db_name" => $db), false);
TestSession::change_db($ws->id);
$table = Table::from_property(array("name" => $table_name), false);
$table_columns = array();
if ($table != null) {
    $table_columns = $table->get_columns();
}
$select_section = array(array("v" => 0, "w0" => "*", "c" => "*"));
$select_section = json_encode($select_section);
if (array_key_exists('select_section', $_POST)) {
    $select_section = $_POST['select_section'];
}
$select_section = json_decode($select_section);
if (array_key_exists("select_section_add", $_POST) && $_POST['select_section_add'] == 1) {
    array_push($select_section, json_decode(json_encode(array("v" => 0, "w0" => "*", "c" => "*"))));
}
            echo Language::string(443);
            ?>
</button>
                <button class="btnUpload" onclick="<?php 
            echo $class_name;
            ?>
.uiUpload(<?php 
            echo $oid;
            ?>
)"><?php 
            echo Language::string(383);
            ?>
</button>
                <?php 
        }
        $ws = UserWorkspace::from_property(array("db_name" => User::get_current_db()), false);
        $ws_id = 0;
        if ($ws != null) {
            $ws_id = $ws->id;
        }
        ?>
            <button class="btnRunTest" onclick="window.open('<?php 
        echo Ini::$path_external . "?wid=" . $ws_id . "&tid=" . $obj->id;
        ?>
', '_blank')"><?php 
        echo Language::string(362);
        ?>
</button>
        </div>
        <?php 
    }
Exemple #3
0
 public static function get_current_UserWorkspace()
 {
     $db = User::get_current_db();
     return UserWorkspace::from_property(array("db_name" => $db), false);
 }