Esempio n. 1
0
function output_image()
{
    global $page, $hour, $day, $month, $im, $iface;
    if ($page == 'summary') {
        return;
    }
    init_image();
    if ($page == 'h') {
        draw_data($hour);
    } else {
        if ($page == 'd') {
            draw_data($day);
        } else {
            if ($page == 'm') {
                draw_data($month);
            }
        }
    }
    header('Content-type: image/png');
    imagepng($im);
}
Esempio n. 2
0
$viseur = $_REQUEST[viseur];
$info_text = $_REQUEST[info_text];
$relaismago = $_REQUEST[relaismago];
$baronnies = $_REQUEST[baronnies];
$tanieres_rm = $_REQUEST[tanieres_rm];
$gowaps_rm = $_REQUEST[gowaps_rm];
$lieux = $_REQUEST[lieux];
$allies = $_REQUEST[allies];
$ennemis = $_REQUEST[ennemis];
$guilde_ennemie = $_REQUEST[guilde_ennemie];
$champignons = $_REQUEST[champignons];
$id_objet_depart = $_REQUEST[id_objet_depart];
$id_objet_arrivee = $_REQUEST[id_objet_arrivee];
$type_objet_depart = $_REQUEST[type_objet_depart];
$type_objet_arrivee = $_REQUEST[type_objet_arrivee];
init_image($x, $y, $vue, $quadrillage, $repere, $viseur, $info_text, $relaismago, $baronnies, $tanieres_rm, $gowaps_rm, $lieux, $allies, $ennemis, $guilde_ennemie, $champignons, $id_objet_depart, $id_objet_arrivee, $type_objet_depart, $type_objet_arrivee, $mode_radar);
##############################################################
### Fonction principale d'initialisation de l'image ########
# info_text : taille en cases minimum pour afficher le texte sur les points
##############################################################
function init_image($x, $y, $vue, $quadrillage, $repere, $viseur, $info_text, $relaismago, $baronnies, $tanieres_rm, $gowaps_rm, $lieux, $allies, $ennemis, $guilde_ennemie, $champignons, $id_objet_depart, $id_objet_arrivee, $type_objet_depart, $type_objet_arrivee, $mode)
{
    global $db_vue_rm, $DEV, $image;
    global $placex_bottom, $placey_bottom;
    global $noir, $blanc, $gris, $gris2, $vert, $vert2, $tab_bleu, $tab_jaune, $tab_rouge, $tab_vert, $tab_gris;
    // cela doit être un carré
    $taille = $vue * 2;
    // Initialisation de l'image
    if ($mode == "map_write") {
        //
    } else {
Esempio n. 3
0
function output_image()
{
    global $page, $hour, $day, $month, $iface;
    if ($page == 'summary') {
        return;
    }
    init_image();
    if ($page == 'h') {
        draw_data($hour);
    } else {
        if ($page == 'd') {
            draw_data($day);
        } else {
            if ($page == 'm') {
                draw_data($month);
            }
        }
    }
    svg_end();
}
<?php

require_once 'appvars.php';
require_once 'connectvars.php';
include_once "./image_helper.php";
session_name('tzLogin');
session_start();
//get the q parameter from URL
$id = $_GET["id"];
$user_id = $_SESSION['id'];
//lookup all links from the xml file if length of q>0
if (strlen($id) > 0) {
    $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
    if ($id == 'new') {
        $image_id = init_image($dbc, $user_id);
    } else {
        $image_id = $id;
        $query = "SELECT * FROM images WHERE id= '{$image_id}'";
        $result = mysqli_query($dbc, $query) or die('Error querying database.');
        if ($row = mysqli_fetch_array($result)) {
            $name = $row['name'];
            $subject = $row['name'];
            $description = $row['description'];
        }
    }
    ?>
    <form enctype="multipart/form-data" class="form-horizontal" method="post" action="image_manager.php">
        <input  type="hidden" id="image_id" name="image_id" value = "<?php 
    if (isset($image_id)) {
        echo $image_id;
    }