Exemple #1
0
 function common()
 {
     //$parent = isset($parent) ? $this->parent : $this;
     $result = sprintf("8\n%s", $this->attributes['layer']);
     if (isset($this->attributes['color'])) {
         $result .= sprintf("\n62\n%s", $this->attributes['color']);
     }
     /*
     		if (isset($this->attributes['rgbColor'])){
     			$result .= sprintf("\n420\n%s", $this->attributes['rgbColor']);
     		}
     */
     if (isset($this->attributes['extrusion'])) {
         $result .= sprintf("\n%s", point($this->attributes['extrusion'], 200));
     }
     if (isset($this->attributes['lineType'])) {
         $result .= sprintf("\n6\n%s", $this->attributes['lineType']);
     }
     if (isset($this->attributes['lineWeight'])) {
         $result .= sprintf("\n370\n%s", $this->attributes['lineWeight']);
     }
     if (isset($this->attributes['lineTypeScale'])) {
         $result .= sprintf("\n48\n%s", $this->attributes['lineTypeScale']);
     }
     if (isset($this->attributes['thickness'])) {
         $result .= sprintf("\n39\n%s", $this->attributes['thickness']);
     }
     return $result;
 }
Exemple #2
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     $result = sprintf("0\nINSERT\n2\n%s\n%s\n%s", $this->attributes['name'], $this->common(), point($this->attributes['point']));
     if (isset($this->attributes['xscale'])) {
         $result .= sprintf("41\n%s\n", $this->attributes['xscale']);
     }
     if (isset($this->attributes['yscale'])) {
         $result .= sprintf("42\n%s\n", $this->attributes['yscale']);
     }
     if (isset($this->attributes['zscale'])) {
         $result .= sprintf("43\n%s\n", $this->attributes['zscale']);
     }
     if (isset($this->attributes['rotation'])) {
         $result .= sprintf("50\n%s\n", $this->attributes['rotation']);
     }
     if (isset($this->attributes['cols'])) {
         $result .= sprintf("70\n%s\n", $this->attributes['cols']);
     }
     if (isset($this->attributes['rotation'])) {
         $result .= sprintf("44\n%s\n", $this->attributes['colspacing']);
     }
     if (isset($this->attributes['rows'])) {
         $result .= sprintf("71\n%s\n", $this->attributes['rows']);
     }
     if (isset($this->attributes['rowspacing'])) {
         $result .= sprintf("45\n%s\n", $this->attributes['rowspacing']);
     }
     return $result;
 }
Exemple #3
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     $result = sprintf("0\nTEXT\n%s\n%s40\n%f\n1\n%s\n", $this->common(), point($this->attributes['point']), $this->attributes['height'], $this->attributes['text']);
     if (isset($this->attributes['rotation'])) {
         $result .= sprintf("50\n%s\n", $this->attributes['rotation']);
     }
     if (isset($this->attributes['rotation'])) {
         $result .= sprintf("50\n%s\n", $this->attributes['rotation']);
     }
     if (isset($this->attributes['xscale'])) {
         $result .= sprintf("41\n%s\n", $this->attributes['xscale']);
     }
     if (isset($this->attributes['obliqueAngle'])) {
         $result .= sprintf("51\n%s\n", $this->attributes['obliqueAngle']);
     }
     if (isset($this->attributes['style'])) {
         $result .= sprintf("7\n%s\n", $this->attributes['style']);
     }
     if (isset($this->attributes['flag'])) {
         $result .= sprintf("71\n%s\n", $this->attributes['flag']);
     }
     if (isset($this->attributes['justifyhor'])) {
         $result .= sprintf("72\n%s\n", $this->attributes['justifyhor']);
     }
     if (isset($this->attributes['alignment'])) {
         $result .= sprintf("%s", point($this->attributes['alignment'], 1));
     }
     if (isset($this->attributes['justifyver'])) {
         $result .= sprintf("73\n%s\n", $this->attributes['justifyver']);
     }
     return $result;
 }
Exemple #4
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     $result = sprintf("0\nSOLID\n%s\n%s", $this->common(), points($this->attributes['points']));
     if (count($this->attributes['points']) < 4) {
         $result .= point($this->attributes['points'][2]);
     }
     return $result;
 }
Exemple #5
0
function points($p, $useIndex = true)
{
    $strings = array();
    for ($i = 0; $i < count($p); $i++) {
        if ($useIndex) {
            $strings[] = point($p[$i], $i);
        } else {
            $strings[] = point($p[$i], 0);
        }
    }
    return implode($strings);
}
Exemple #6
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     $result = sprintf("0\nPOLYLINE\n66\n1\n%s\n70\n%s\n%s", $this->common(), $this->attributes['flag'], point($this->attributes['points'][0]));
     if (isset($this->attributes['width'])) {
         $result .= sprintf("43\n%s\n", $this->attributes['width']);
     }
     foreach ($this->attributes['points'] as $p) {
         $result .= sprintf("0\nVERTEX\n%s\n%s", $this->common(), point($p));
     }
     $result .= "0\nSEQEND\n";
     return $result;
 }
Exemple #7
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     return sprintf("0\nPOINT\n%s\n%s", $this->common(), point($this->attributes['point']));
 }
Exemple #8
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     return sprintf("0\nVIEW\n2\n%s\n70\n%s\n40\n%s\n%s41\n%s\n%s%s42\n%s\n43\n%s\n44\n%s\n50\n%s\n71\n%s", $this->attributes['name'], $this->attributes['flag'], $this->attributes['height'], point($this->attributes['center']), $this->attributes['width'], point($this->attributes['direction'], 1), point($this->attributes['target'], 2), $this->attributes['lens'], $this->attributes['frontClipping'], $this->attributes['backClipping'], $this->attributes['twist'], $this->attributes['mode']);
 }
Exemple #9
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     return sprintf("0\nCIRCLE\n%s\n%s40\n%f\n", $this->common(), point($this->attributes['center']), $this->attributes['radius']);
 }
Exemple #10
0
 function __toString()
 {
     // TODO all are string values, maybee som should be decimal
     return sprintf("0\nARC\n%s\n%s40\n%f\n50\n%f\n51\n%f", $this->common(), point($this->attributes['center']), $this->attributes['radius'], $this->attributes['startAngle'], $this->attributes['endAngle']);
 }
Exemple #11
0
            echo '<div class="erreur">Quantité demandée : ' . $_SESSION['panier']['quantite'][$i] . '</div>';
            if ($article['stock'] > 0) {
                echo '<div class="erreur">la quantité de l\'article ' . $_SESSION['panier']['id_article'][$i] . ' a été réduite car notre stock était insuffisant. Veuillez vérifier vos achats</div>';
                $_SESSION['panier']['quantite'][$i] = $article['stock'];
            } else {
                echo '<div class="erreur">l\'article ' . $_SESSION['panier']['id_article'][$i] . ' a été retiré de votre panier car nous sommes en rupture de stock, veuilliez vérifier vos achats.</div>';
                retirerArticleDuPanier($_SESSION['panier']['id_article'][$i]);
                //on retire l'article.
                $i--;
                //on décrémente pour retirer un article. Lorsque l'on souhaite rajouter une valeur à notre variable on incrémente, ici on souhaite enlever une valeur du coup on décrémente.
            }
            $erreur = TRUE;
        }
    }
    if (!isset($erreur)) {
        executeRequete("INSERT INTO commande(id_membre,montant,date) VALUES (" . $_SESSION['utilisateur']['id_membre'] . "," . point(montantTotal()) . ", NOW())");
        $id_commande = $mysqli->insert_id;
        for ($j = 0; $j < count($_SESSION['panier']['id_article']); $j++) {
            executeRequete("INSERT INTO details_commande (id_commande,id_article,quantite,prix) VALUES ('{$id_commande}', '" . $_SESSION['panier']['id_article'][$j] . "','" . $_SESSION['panier']['quantite'][$j] . "','" . $_SESSION['panier']['prix'][$j] . "')");
            executeRequete("UPDATE article SET stock=stock-" . $_SESSION['panier']['quantite'][$j] . " WHERE id_article=" . $_SESSION['panier']['id_article'][$j]);
        }
        unset($_SESSION['panier']);
        $body = "Merci d'avoir commandé sur Hus - Design with passion. Votre numéro de suivi de commande est le {$id_commande}.";
        mail($_SESSION['utilisateur']['mail'], "Hus - Confirmation de votre commande", $body, "From:confirmation@hus.com");
        echo "<div class='validation'>Merci pour votre commande. Un mail vous a été envoyé. Votre numéro de suivi est le {$id_commande}</div>";
    }
}
//------AFFICHAGE DU PANIER------
echo $msg;
echo "<div id='container'>";
echo "<div id='check1'>";
Exemple #12
0
 function point($name, $x)
 {
     return sprintf("%s%s", $this->name($name), point($x));
 }
Exemple #13
0
<html lang = "en">
	<head>
		<title>Circle Functions</title>
	</head>
	
	<body>
		<?php 
$r = 5;
$h = 3;
$k = -2;
include "circle.php";
echo "Area :  " . area() . "<br />";
echo "Perimieter: " . perimeter(10) . "<br /><hr />";
list($myArea, $myPerim) = both();
echo "Both: area = " . $myArea . " and perimeter= " . $myPerim . "<br /><hr />";
$h = 3;
$k = -2;
echo "Circle with center ({$h}, {$k}): The piont (-2,-2) is " . point(-2, -2) . "<br />";
echo "Circle with center (3,-2) : The point (1,-1) is " . point(1, -1) . "<br />";
?>
		
	</body>
</html>
Exemple #14
0
 function __toString()
 {
     return sprintf("0\nBLOCK\n8\n%s\n2\n%s\n70\n%s\n%s3\n%s\n%s\n0\nENDBLK\n", $this->attributes['layer'], strtoupper($this->attributes['name']), $this->attributes['flag'], point($this->attributes['base']), strtoupper($this->attributes['name']), parent::__toString());
 }
Exemple #15
0
    $drops = $row['drops'];
    $multicast_dst = $row['multicast_dst'];
    if (isset($remove_channels["{$multicast_dst}"])) {
        // Skip
        $cnt_removed++;
        continue;
    }
    #$urldata['bucketsz']= $bucketsz;
    $urldata['probeid'] = $probeid;
    $urldata['tstampF'] = $tstampF;
    $urldata['tstampT'] = $tstampT;
    $urldata['period'] = $tstampT - $tstampF;
    $urldata['records'] = $row['records'];
    $cnt++;
    if ($cnt < 50) {
        point("{$multicast_dst}", $drops, $Dataset, $urldata);
    }
}
#echo "cnt:$cnt<br>\n";
// create the 1st plot as smoothed area chart using the 1st dataset
$Plot =& $Plotarea->addNew('Image_Graph_Plot_Pie', $Dataset);
//$Plot->setRestGroup(11, 'Other animals');
//FRA: plot_pie_rotate/
// create a Y data value marker
$Marker =& $Plot->addNew('Image_Graph_Marker_Value', IMAGE_GRAPH_PCT_Y_TOTAL);
// create a pin-point marker type
$PointingMarker =& $Plot->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker));
// and use the marker on the 1st plot
$Plot->setMarker($PointingMarker);
// format value marker labels as percentage values
$Marker->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%'));