$result = 1;
        } else {
            $result = 0;
        }
        $output .= "Number of records deleted = {$result}\n";
    } else {
        $output = "Could not delete DB cache_filters entry for {$texexp}\nbecause it could not be found.\n";
    }
}
// Action: Show Image
if ($action == 'ShowImageMimetex') {
    tex2image($texexp);
}
// Action: Check Slasharguments
if ($action == 'SlashArguments') {
    slasharguments($texexp);
}
// Action: Show Tex command line output
if ($action == 'ShowImageTex') {
    TexOutput($texexp, true);
    exit;
}
// Action: Show Tex command line output
if ($action == 'ShowOutputTex') {
    if (debugging()) {
        TexOutput($texexp);
    } else {
        echo "Can not output detailed information due to security concerns, please turn on debug mode first.";
    }
    exit;
}
示例#2
0
        }
    }
    if (strpos($query, 'TeXStage1')) {
        $output = algebra2tex($algebra);
    }
    if (strpos($query, 'TeXStage2')) {
        $output = algebra2tex($algebra);
        $output = refineTeX($output);
    }
    if (strpos($query, 'ShowImage') || strpos($query, 'SlashArguments')) {
        $output = algebra2tex($algebra);
        $output = refineTeX($output);
        if (strpos($query, 'ShowImage')) {
            tex2image($output, $md5);
        } else {
            slasharguments($output, $md5);
        }
    } else {
        outputText($output);
    }
    exit;
}
function algebra2tex($algebra)
{
    global $CFG;
    $algebra = str_replace('&lt;', '<', $algebra);
    $algebra = str_replace('&gt;', '>', $algebra);
    $algebra = str_replace('<>', '#', $algebra);
    $algebra = str_replace('<=', '%', $algebra);
    $algebra = str_replace('>=', '!', $algebra);
    $algebra = preg_replace('/([=><%!#] *)-/', "\$1 zeroplace -", $algebra);
示例#3
0
            $result = 1;
        } else {
            $result = 0;
        }
        $output .= "Number of records deleted = {$result}\n";
    } else {
        $output = "Could not delete DB cache_filters entry for {$param->tex}\nbecause it could not be found.\n";
    }
}
// Action: Show Image
if ($param->action == 'ShowImageMimetex') {
    tex2image($param->tex);
}
// Action: Check Slasharguments
if ($param->action == 'SlashArguments') {
    slasharguments($param->tex);
}
// Action: Show Tex command line output
if ($param->action == 'ShowImageTex') {
    TexOutput($param->tex, true);
    exit;
}
// Action: Show Tex command line output
if ($param->action == 'ShowOutputTex') {
    TexOutput($param->tex);
    exit;
}
if (!empty($param->action)) {
    outputText($output);
}
// nothing more to do if there was any action