Example #1
0
<?php

include "../../../private/lib/data/MysqliAdapter.php";
include "../../../private/config.php";
include "../../../private/config/MysqlConfig.php";
session_start();
if (!isset($_SESSION["loggedin"])) {
    header('Location: ../index.php');
}
$mysqlConfig = new \config\MysqlConfig(mysql_username, mysql_password, mysql_host, mysql_database);
//database
$mysqliAdapter = new \data\MysqliAdapter($mysqlConfig);
if (isset($_POST["id"])) {
    $id = $_POST['id'];
    $mysqliAdapter->deleteCharacter($id);
}
/**
 * Created by PhpStorm.
 * User: mick_
 * Date: 11/5/2015
 * Time: 4:39 PM
 */
Example #2
0
<?php

include "../../../private/lib/data/MysqliAdapter.php";
include "../../../private/config.php";
include "../../../private/config/MysqlConfig.php";
session_start();
if (!isset($_SESSION["loggedin"])) {
    header('Location: ../index.php');
}
$mysqlConfig = new \config\MysqlConfig(mysql_username, mysql_password, mysql_host, mysql_database);
//database
$mysqliAdapter = new \data\MysqliAdapter($mysqlConfig);
$mysqliAdapter->saveCharacterFromPost();
?>


<pre>
    <?php 
print_r($_POST);
?>
</pre>
Example #3
0
<?php

include "../../../private/lib/data/MysqliAdapter.php";
include "../../../private/config.php";
include "../../../private/config/MysqlConfig.php";
session_start();
if (!isset($_SESSION["loggedin"])) {
    header('Location: ../index.php');
}
$mysqlConfig = new \config\MysqlConfig(mysql_username, mysql_password, mysql_host, mysql_database);
//database
$mysqliAdapter = new \data\MysqliAdapter($mysqlConfig);
$mysqliAdapter->saveAnimeFromPost();
?>


<pre>
    <?php 
print_r($_POST);
?>
</pre>
Example #4
0
<?php

include "../../../private/lib/data/MysqliAdapter.php";
include "../../../private/config.php";
include "../../../private/config/MysqlConfig.php";
session_start();
if (!isset($_SESSION["loggedin"])) {
    header('Location: ../index.php');
}
$mysqlConfig = new \config\MysqlConfig(mysql_username, mysql_password, mysql_host, mysql_database);
//database
$mysqliAdapter = new \data\MysqliAdapter($mysqlConfig);
if (isset($_POST["id"])) {
    $id = $_POST['id'];
    $mysqliAdapter->deleteAnime($id);
}
Example #5
0
<?php

session_start();
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] != true) {
    header('Location: index.php');
}
include "../../private/lib/data/MysqliAdapter.php";
include "../../private/config.php";
include "../../private/config/MysqlConfig.php";
$mysqlConfig = new \config\MysqlConfig(mysql_username, mysql_password, mysql_host, mysql_database);
//database
$mysqliAdapter = new \data\MysqliAdapter($mysqlConfig);
$characters = $mysqliAdapter->getAllCharacters(array("limit" => 2147483647, "order" => "anime_name"));
$gridData = array();
$charactersWithoutAnime = array();
$anime = $mysqliAdapter->getAnime();
$specialCharacters = array('"', "'");
foreach ($characters as $character) {
    $quotes = $mysqliAdapter->getQuotesByCharacterId($character["character_id"]);
    $newQuotes = array();
    foreach ($quotes as $quote) {
        $newQuote = $quote["character_quote_value"];
        foreach ($specialCharacters as $specialCharacter) {
            $newQuote = str_replace($specialCharacter, '\\"', $newQuote);
        }
        $newQuotes[] = $newQuote;
    }
    $newQuotes = array_map('utf8_encode', $newQuotes);
    $tempCharacter = $character;
    $tempCharacter["quotes"] = $newQuotes;
    if (isset($character["anime_id"])) {