Example #1
0
function admin__settings()
{
    $out = aikiGetForm($_GET["form"], $_GET["mode"]);
    $Item = fileReadItem($_GET["form"], $_GET["mode"]);
    $checkout_list = aikiCheckoutForms();
    if (count($checkout_list) > 0) {
        $Item["checkout_list"] = $checkout_list;
    } else {
        $out->find("select[name=checkout]")->parents(".form-group")->remove();
    }
    $Item["tpllist"] = aikiListTpl();
    $Item["formlist"] = aikiListForms();
    $out->contentSetData($Item);
    return $out->htmlOuter();
}
Example #2
0
function page__edit()
{
    $out = aikiGetForm($_GET["form"], $_GET["mode"]);
    $Item = aikiReadItem("page", $_GET["id"]);
    if ($_GET["id"] == "_new") {
        $Item["id"] = newIdRnd();
        $Item["template"] = $_SESSION["settings"]["template"];
    }
    $Item["tpllist"] = aikiListTpl();
    $out->contentSetData($Item);
    $options = $out->find("select[name=template] option");
    foreach ($options as $opt) {
        if (strpos($opt->attr("value"), ".inc.")) {
            $opt->remove();
        }
    }
    return $out->outerHtml();
}