$result = $admin->signup($user_username, $user_password, $user_fullname); if ($result['error'] === false) { $access_data = $admin->signin($user_username, $user_password); if ($access_data['error'] === false) { $clientId = 0; // Desktop version admin::createAccessToken(); admin::setSession($access_data['accountId'], admin::getAccessToken()); // Add standard settings $settings = new settings($dbo); $settings->createValue("admob", 1); //Default show admob unset($settings); // Add standard gifts for ($i = 1; $i < 31; $i++) { $gift->db_add(3, 0, APP_URL . "/" . GIFTS_PATH . $i . ".jpg"); } // Redirect to Admin Panel main page header("Location: /admin/main.php"); exit; } header("Location: /install.php"); } } } auth::newAuthenticityToken(); $css_files = array("admin.css"); $page_title = APP_TITLE; include_once $_SERVER['DOCUMENT_ROOT'] . "/common/header.inc.php"; ?>
} if (!empty($_POST)) { $authToken = isset($_POST['authenticity_token']) ? $_POST['authenticity_token'] : ''; $cost = isset($_POST['cost']) ? $_POST['cost'] : 3; $category = isset($_POST['category']) ? $_POST['category'] : 0; $cost = helper::clearInt($cost); $category = helper::clearInt($category); if ($authToken === helper::getAuthenticityToken() && !APP_DEMO) { if (isset($_FILES['uploaded_file']['name'])) { $uploaded_file = $_FILES['uploaded_file']['tmp_name']; $uploaded_file_name = basename($_FILES['uploaded_file']['name']); $uploaded_file_ext = pathinfo($_FILES['uploaded_file']['name'], PATHINFO_EXTENSION); $gift_next_id = $gift->db_getMaxId(); $gift_next_id++; if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], GIFTS_PATH . $gift_next_id . "." . $uploaded_file_ext)) { $gift->db_add($cost, $category, APP_URL . "/" . GIFTS_PATH . $gift_next_id . "." . $uploaded_file_ext); } } } header("Location: /admin/gifts.php"); } helper::newAuthenticityToken(); $css_files = array("admin.css"); $page_title = "Gifts"; include_once $_SERVER['DOCUMENT_ROOT'] . "/common/header.inc.php"; ?> <body class="bg_gray"> <div id="page_wrap">