예제 #1
0
while ($file = readdir($handle)) {
    if (in_array($file, ['.', '..'])) {
        continue;
    }
    $field->add($file, $file);
}
if ($form->isSubmit()) {
    $url = 'http://' . str_replace('http://', '', $form->get('hp_url'));
    $endSlash = substr($url, -1, 1);
    if ($endSlash != '/') {
        $url .= '/';
    }
    dyn::add('hp_name', $form->get('hp_name'), true);
    dyn::add('hp_url', $url, true);
    dyn::add('lang', $form->get('lang'), true);
    dyn::save();
    if ($error) {
        echo message::danger('error');
    } else {
        $form->addParam('page', 'database');
    }
}
echo $form->show();
?>
                
                </div>        
        </div>    
    </div>	
    <div class="col-lg-4">    
        <div class="panel panel-default">        
                <div class="panel-heading">
예제 #2
0
 public static function insertDemoContent()
 {
     $sql = sql::factory();
     $input = file_get_contents(self::getModulCode('1_input.txt'));
     $output = file_get_contents(self::getModulCode('1_output.txt'));
     $sql->setTable('module');
     $sql->addPost('name', 'Überschrift');
     $sql->addPost('sort', 1);
     $sql->addPost('input', $input);
     $sql->addPost('output', $output);
     $sql->save();
     $input = file_get_contents(self::getModulCode('2_input.txt'));
     $output = file_get_contents(self::getModulCode('2_output.txt'));
     $sql->addPost('name', 'Editor');
     $sql->addPost('sort', 2);
     $sql->addPost('input', $input);
     $sql->addPost('output', $output);
     $sql->save();
     $sql = sql::factory();
     $sql->setTable('structure');
     $sql->addPost('name', 'Home');
     $sql->addPost('template', 'template.php');
     $sql->addPost('sort', 1);
     $sql->addPost('online', 1);
     $sql->save();
     $sql->addPost('name', '404 Error');
     $sql->addPost('sort', 2);
     $sql->addPost('online', 0);
     $sql->save();
     dyn::add('start_page', 1, true);
     dyn::add('error_page', 2, true);
     dyn::save();
 }