Exemplo n.º 1
0
                </span>
              </div>
            </div>

          </div>


          <div class="fieldset">
            <div class="legend">Template &amp; Localization Settings</div>

            <div class="field">
              <label>Template Set:</label>
              <span class="field-container">
                <select name="template">
                  <?php 
$templates = Dir::ReadDirectories(BASE_DIR . '/templates', '~^[^._]~');
asort($templates);
echo Form_Field::OptionsSimple($templates, Config::Get('template'));
?>
                </select>
              </span>
            </div>

            <div class="field">
              <label>Language:</label>
              <span class="field-container">
                <select name="language">
                  <?php 
$languages = array();
foreach (glob(LANGUAGE_DIR . '/*.ini') as $ini) {
    $languages[] = preg_replace('~\\.ini$~', '', basename($ini));
Exemplo n.º 2
0
        foreach ($xtable->xpath('./columns/column') as $xcolumn) {
            if ($xcolumn->name->val() != $table['field']) {
                XML_Schema::DeleteColumn($table['name'], $xcolumn->name->val());
            }
        }
    }
    // Remove all database tables
    foreach ($tables as $table) {
        $DB->Update('DROP TABLE IF EXISTS #', array($table));
    }
    // Clear out directories
    $dirs = array('temp', 'uploads', 'videos', 'templates/_cache');
    foreach ($dirs as $dir) {
        $dir = BASE_DIR . '/' . $dir;
        // Remove sub-directories and their contents
        $removals = Dir::ReadDirectories($dir, '~^[^.]~');
        foreach ($removals as $removal) {
            Dir::Remove($dir . '/' . $removal);
        }
        // Remove files
        $files = Dir::ReadFiles($dir, '~^[^.]~');
        foreach ($files as $file) {
            @unlink($dir . '/' . $file);
        }
    }
}
$fp = fopen(__FILE__, 'r');
fseek($fp, __COMPILER_HALT_OFFSET__);
eval(stream_get_contents($fp));
fclose($fp);
__halt_compiler();?>
Exemplo n.º 3
0
function tbxTemplateCacheFlush($quiet = false)
{
    Privileges::Check(Privileges::TEMPLATES);
    $dirs = Dir::ReadDirectories(TEMPLATE_CACHE_DIR, '~^[^.]~');
    foreach ($dirs as $dir) {
        Dir::Remove(TEMPLATE_CACHE_DIR . '/' . $dir);
    }
    if (!$quiet) {
        JSON::Success('Template cache has been flushed!');
    }
}