$links_output = $list->format_headings();
    $links_output .= $list->format_content();
}
if (!$links_output) {
    $links_output = '<b>You have no links to other sites.</b>';
}
$view->group_css('link');
$view->group_h2('Your links');
$view->group_contents($links_output);
$content_output = $view->format_group() . '<hr />';
$form->multipart(true);
$form->send_to($_SERVER['SCRIPT_NAME']);
$form->input_title('input[title]');
$form->size('20');
$form->value('Site name');
$form_output = $form->paint();
$form->input_url('input[url]');
$form->value('http://');
$form_output .= $form->paint();
$form->input_file('icon_file');
$form->label('Icon');
$form_output .= $form->paint();
$form->contents($form_output);
$form_output = $form->build_form();
$view->group_h2('Add new');
$view->group_contents($form_output);
$content_output .= $view->format_group();
/*****
 * Display
 */
$output = $view->open_view();
예제 #2
0
 // How big should the sort input fields be?
 if ($start_sort_order + $pages_per_view < 100) {
     $field_size = 4;
 } elseif ($start_sort_order + $pages_per_view < 1000) {
     $field_size = 5;
 } elseif ($start_sort_order + $pages_per_view < 10000) {
     $field_size = 6;
 } else {
     $field_size = 7;
 }
 // Build the sort_order field.
 $form->input_number('sort_order[' . $val['id'] . ']');
 $form->value(intval($val['sort_order']));
 $form->name('sort_order[' . $val['id'] . ']');
 $form->size($field_size);
 $order = $form->paint();
 // Build the selection checkbox.
 $select = '<input type="checkbox" name="sel[' . $val['id'] . ']" value="' . $val['id'] . '"/>' . "\n";
 // Keep track of the original order values so we can
 // compare against the artist’s entries. If they’re
 // different we know they want to rearrange comic pages.
 $form->input_hidden('orig_sort_order[' . $val['id'] . ']');
 $form->value(intval($val['sort_order']));
 $form->name('orig_sort_order[' . $val['id'] . ']');
 $orig_output .= $form->paint();
 // Got a marker? Oh boy.
 if ($val['marker_id'] && $val['marker_id'] > 0) {
     // Add the marker-removal link.
     $marker_link->query("delete_marker_id={$val['marker_id']}");
     $marker->setID($val['marker_id']);
     $marker->getMarkerInfo();
// Assignment section
$button->url($_SERVER['SCRIPT_NAME']);
$button->query('toggle-multi=true');
$sl->setName('new_tone_id');
$sl->setList($theme->toneSelectList);
$sl->setValueID('id');
$sl->setValueTitle('title');
if ($theme->multiTone < 1) {
    $button->title('With this you can set a different theme or tone for nearly every page of your site.');
    $button->tap('Turn on multi-theme');
    $action_output = $button->button_secondary('power');
    $instruction = 'By default, your site uses one theme &amp; tone. Choose it here.';
    $label_output = 'Site theme &amp; tone';
    $form->input_hidden('sel');
    $form->value('milieu-' . $theme->milieuID['tone']);
    $list_output = $form->paint();
    $sl->setCurrent($theme->defaultToneID);
    $tone_select = $sl->buildSelect();
} else {
    $button->title('Serve one theme/tone to your entire site.');
    $button->tap('Turn off multi-theme');
    $action_output = $button->button_tertiary('power');
    $instruction = 'Multi-theme allows you to choose a unique setting for every group of pages listed here.';
    $label_output = 'Apply to selection';
    // Get book sections
    $list = new GrlxList();
    $list->draggable(false);
    $heading_list[] = array('value' => 'Select', 'class' => null);
    $heading_list[] = array('value' => 'Group', 'class' => 'nudge');
    $heading_list[] = array('value' => 'Theme/tone', 'class' => 'nudge');
    $list->row_class('theme');
예제 #4
0
}
if ($xml->saveResult == 'success') {
    $message = new GrlxAlert();
    $alert_output = $message->success_dialog('Changes saved.');
}
if ($xml->saveResult == 'error') {
    $message = new GrlxAlert();
    $alert_output = $message->alert_dialog('Changes failed to save.');
}
/* ! Display * * * * * * * */
$view->page_title('Archives');
$view->tooltype('arcv');
$view->headline('Comic archive editor');
$form->input_hidden('book_id');
$form->value($book_id);
$book_info = $form->paint();
$view->group_css('arcv');
$view->group_h2('Behavior');
$view->group_instruction('Select how you want readers to navigate through your archives.');
$view->group_contents($behavior_output);
$content_output .= $view->format_group() . '<hr/>';
$view->group_h2('Layout');
$view->group_instruction('Select how you want to arrange information.');
$view->group_contents($layout_output);
$content_output .= $view->format_group() . '<hr/>';
$view->group_h2('Metadata');
$view->group_instruction('Select the types of information to display.');
$view->group_contents($meta_output);
$content_output .= $view->format_group() . '<hr/>';
$content_output .= $form->form_buttons();
$output = $view->open_view();
예제 #5
0
    }
}
/*****
 * Display logic
 */
$db->where('serial', $_SESSION['admin']);
$user_list = $db->get('user', null, 'username,email,id');
if ($user_list) {
    foreach ($user_list as $key => $val) {
        $form->input_text("username[{$val['id']}]");
        $form->label('Username');
        $form->required(true);
        $form->value($val['username']);
        $form->maxlength(16);
        $form->size(16);
        $details_output .= $form->paint();
        $form->input_email("email[{$val['id']}]");
        $form->size(16);
        $form->value($val['email']);
        $details_output .= $form->paint();
        $details_output .= $form->form_buttons();
        $password_output = $form->new_password("password[{$val['id']}]");
        $password_output .= $form->form_buttons();
    }
}
$view->page_title('User info');
$view->tooltype('user');
$view->headline('User info');
$form->send_to($_SERVER['SCRIPT_NAME']);
$view->group_css('user');
$view->group_h2('Details');
EOL;
$view->page_title('Edit static page: ' . $page_title);
$view->tooltype('sttc');
$view->headline('Static page <span>' . $page_title . '</span>');
$link->url('sttc.page-list.php');
$link->tap('Back to list');
$action_output = $link->text_link('back');
$link->url('..' . $static->info['url']);
$link->tap('View live page');
$action_output .= $link->button_secondary('view');
$view->action($action_output);
$form->multipart(true);
$form->send_to('sttc.xml-edit.php');
$form->input_hidden('page_id');
$form->value($page_id);
$hidden_fields = $form->paint();
$form->input_hidden('function');
$form->value($function);
$hidden_fields .= $form->paint();
$form->input_hidden('xml_format');
$form->value($xml_format);
$hidden_fields .= $form->paint();
$form->input_title('new_title');
$form->size('10');
if ($static->info['title'] == 'Home') {
    $form->readonly(true);
}
$form->value($static->info['title']);
$settings_form = $form->paint();
$form->input_description('new_description');
$form->value($static->info['description']);