示例#1
0
/** Main program. */
function main()
{
    preload();
    $interpreter = new Interpreter();
    $interpreter->hello();
    $interpreter->bye();
}
示例#2
0
function preload($folder, &$files = array())
{
    if (!is_dir($folder)) {
        return null;
    }
    $handle = opendir($folder);
    while (($file = readdir($handle)) !== false) {
        if ($file != "." && $file != "..") {
            $fullPath = $folder . DIRECTORY_SEPARATOR . $file;
            if (is_dir($fullPath)) {
                preload($fullPath, $files);
            } else {
                if (substr($file, strlen($file) - 4) == ".php") {
                    $files[] = $fullPath;
                }
            }
        }
    }
    return $files;
}
<?php

preload("AdminController");
admin_page("Pannello di amministrazione - Gestione gallery");
$gallery = call("gallery", "get");
start_admin_panel("/pannello_centrale", "Modifica gallery");
?>

<form name="form_modifica_gallery" action="/actions/gallery/modify.php" method="POST">

<?php 
include_block("gallery/form_modifica_gallery", $gallery);
?>
    <br />
    <br />
    <a href="/admin/gallery/">Annulla, torna all'elenco delle gallery</a>&nbsp;&nbsp;
    <button type="submit">
        <span>Salva modifiche</span>
    </button>

    <?php 
Form::on_success("/admin/gallery/");
?>
    <?php 
Form::on_failure("/admin/gallery/modifica_gallery.php");
?>
</form>
<?php 
end_admin_panel();
示例#4
0
<?php

requireLogin();
useScript("validate-project.php");
preload(32, 32, "no.png");
preload(32, 32, "yes.png");
preload(32, 32, "loading.png");
$TITLE = "Oh noes!";
$CONTENT .= "\n<h1>So. You have a problem. Well whoopdie do. Don't we all</h1>\n<br />\n<br />\n<div id = 'images' ></div>\n<form action = '" . $SITE_PREFIX . "submit-bug.php' method = 'post' >\n\t<table>\n<tr>\n\t<td>What project is giving you crap?</td>\n\t<td><div id = 'project-ok' ><img src = '" . $SITE_PREFIX . "imgs/no.png' alt = '' /></div></td>\n\t<td><input type = 'text' id = 'project' name = 'project' size = '20' /></td>\n</tr>\n<tr>\n\t<td></td>\n\t<td></td>\n\t<td><div id = 'project-descr' >&nbsp;</div></td>\n</tr>\n<tr>\n\t<td>So, I need a poetic name for this issue</td>\n\t<td></td>\n\t<td><input type = 'text' name = 'title' size = '40' /></td>\n</tr>\n<tr>\n\t<td>And a nice description</td>\n\t<td></td>\n\t<td><textarea rows = '20' cols = '50' name = 'descr' ></textarea></td>\n</tr>\n<tr>\n\t<td></td>\n\t<td><img src = '" . $SITE_PREFIX . "imgs/32_space.png' alt = '' /></td>\n\t<td><input type = 'submit' value = 'Look, I made this for you!' /></td>\n</tr>\n\t</table>\n</form>\n";
示例#5
0
<?php

preload("AdminController");
preload("FoltersController");
admin_page("Gestione immagini - indice");
$path = Params::get("path");
preg_match("/\\//", $path, $matches);
$level = count($matches) - 1;
$elenco_cartelle = call("folders", "index", array("__filter_tipo__EQUAL" => "f_immagini", "__filter_path__BEGINS_WITH" => $folder_path, "__filter_level__EQUAL" => $level, "__filter_ordine__ORDER_ASCENDING" => null));
start_admin_panel("/pannello_centrale", "Gestione Immagini");
Flash::write_ok_messages();
Flash::write_warning_messages();
Flash::write_error_messages();
include "include/snippets/contenuti/base/__elenco_cartelle.php.inc";
include "include/snippets/contenuti/base/__elenco_immagini.php.inc";
end_admin_panel();