コード例 #1
0
ファイル: Fhome.php プロジェクト: prasinar/mathml
include_once "../model/Mbexpression.php";
?>
            <span class='heading'>Izrazi</span>
            <div id="buttons">
                <?php 
$all = Mbexpression::getTypes();
foreach ($all as $row) {
    echo "<div class='button-container-title'>" . $row['type'] . "</div>";
}
if (Wrapper::online()) {
    echo "<div class='button-container-title'>Formirani izrazi</div>";
}
?>
                <div id="buttons-array">
                <?php 
$res = Mbexpression::getForType("Operacije");
foreach ($res as $row) {
    echo "<abbr title='" . $row['name'] . "'><div class='expression' data-latex='" . $row['formula'] . "' data-pre='" . $row['pre'] . "' data-suf='" . $row['suf'] . "'>`" . $row['desc'] . "`</div></abbr>";
}
?>
                </div>
            </div>
            <span class='heading'>AsciiMath</span>
            <?php 
if (Wrapper::online()) {
    echo "<form action='../script/Sredirect.php' method='post'>";
}
?>
            <textarea id="tex" class="area-latex" name="tex"></textarea>
            <?php 
if (Wrapper::online()) {
コード例 #2
0
ファイル: Sbuttons.php プロジェクト: prasinar/mathml
<?php

session_start();
include_once '../model/Mexpression.php';
include_once '../model/Mbexpression.php';
$type = $_POST['type'];
if ($type == "Formirani izrazi") {
    $res = Mexpression::getAllSaved();
    if ($res != null) {
        foreach ($res as $row) {
            echo "<abbr title='" . $row['name'] . "'><div style='width:auto;height:80px;line-height:80px;' class='expression' data-latex='" . $row['formula'] . "' >`" . $row['formula'] . "`</div></abbr>";
        }
    }
} else {
    $res = Mbexpression::getForType($type);
    foreach ($res as $row) {
        echo "<abbr title='" . $row['name'] . "'><div class='expression' data-latex='" . $row['formula'] . "' data-pre='" . $row['pre'] . "' data-suf='" . $row['suf'] . "'>`" . $row['desc'] . "`</div></abbr>";
    }
}