Ejemplo n.º 1
0
You should have received a copy of the GNU General Public License
along with Databases. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
if (!isset($_GET["withtemplate"])) {
    $_GET["withtemplate"] = "";
}
if (!isset($_GET["plugin_databases_databases_id"])) {
    $_GET["plugin_databases_databases_id"] = "";
}
$instance = new PluginDatabasesInstance();
if (isset($_POST["add"])) {
    if ($instance->canCreate()) {
        $instance->add($_POST);
    }
    Html::back();
} else {
    if (isset($_POST["update"])) {
        if ($instance->canCreate()) {
            $instance->update($_POST);
        }
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            if ($instance->canCreate()) {
                $instance->delete($_POST, 1);
You should have received a copy of the GNU General Public License
along with Databases. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
if (!isset($_GET["withtemplate"])) {
    $_GET["withtemplate"] = "";
}
if (!isset($_GET["plugin_databases_databases_id"])) {
    $_GET["plugin_databases_databases_id"] = "";
}
$instance = new PluginDatabasesInstance();
if (isset($_POST["add"])) {
    if ($instance->canCreate()) {
        $instance->add($_POST);
    }
    Html::back();
} else {
    if (isset($_POST["update"])) {
        if ($instance->canCreate()) {
            $instance->update($_POST);
        }
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            if ($instance->canCreate()) {
                $instance->delete($_POST, 1);