$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 & tone. Choose it here.'; $label_output = 'Site theme & 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'); $list->headings($heading_list);
// ! Display logic // Build calendar options (month list, day list, year list) for ($i = 1; $i < 32; $i++) { $i < 10 ? $i = '0' . $i : null; $day_list[$i] = array('title' => $i, 'id' => $i); } for ($i = 1; $i < 13; $i++) { $i < 10 ? $i = '0' . $i : null; $month_list[$i] = array('title' => date("F", mktime(0, 0, 0, $i, 1, 2015)), 'id' => $i); } for ($i = date('Y') - 10; $i < date('Y') + 2; $i++) { $year_list[$i] = array('title' => $i, 'id' => $i); } // Build select elements for each date part. $sl->setName('pub_year'); $sl->setCurrent(date('Y')); $sl->setList($year_list); $sl->setValueID('id'); $sl->setValueTitle('title'); $sl->setStyle('width:4rem'); $year_select_output = $sl->buildSelect(); $sl->setName('pub_month'); $sl->setCurrent(date('m')); $sl->setList($month_list); $sl->setValueID('id'); $sl->setValueTitle('title'); $sl->setStyle('width:8rem'); $month_select_output = $sl->buildSelect(); $sl->setName('pub_day'); $sl->setCurrent(date('d')); $sl->setList($day_list);
$marker_type_list = $db->get('marker_type', null, 'id,title,rank'); $marker_type_list = rekey_array($marker_type_list, 'id'); // Add rank numbers to the titles (I want to emphasize // that there’s a definite pecking order at work). if ($marker_type_list) { foreach ($marker_type_list as $key => $val) { $marker_type_list[$key]['title'] = $val['rank'] . '. ' . $val['title']; } } // Build the list from which artists choose if ($marker_type_list) { $sl->setName('edit_marker_type'); // <select name="spike"> $sl->setList($marker_type_list); // List for <option>s $sl->setCurrent($marker->markerInfo['marker_type_id']); // selected="selected" $sl->setValueID('id'); // <select id="jet"> $sl->setValueTitle('title'); // <label for="jet">Faye</label> $sl->setStyle('width:12rem'); // <select style="Ed"> $select_options = $sl->buildSelect() . '<br/>' . "\n"; // Assemble the select element. } // ! Build the edit form $edit_form_output .= '<form accept-charset="UTF-8" action="marker.edit.php" method="post">' . "\n"; $edit_form_output .= ' <p><label for="new_title">Title</label>' . "\n"; $edit_form_output .= ' <input type="text" id="new_title" name="new_title" size="12" style="width:12rem" value="' . $marker->markerInfo['title'] . '"/></p>' . "\n"; $edit_form_output .= ' <label for="edit_marker_type">Type</label>' . "\n";
$cols = array('id', 'title', 'label', 'description', 'user_info', 'info_title'); $ga_info = $db->where('id', 16)->getOne('third_service', $cols); // Fetch site milieu settings $cols = array('sm.id', 'sm.title', 'description', 'label', 'value', 'sm.sort_order'); $result = $db->orderBy('sm.sort_order', 'ASC')->orderBy('label', 'ASC')->where('sort_order', 1, '>=')->get('milieu sm', NULL, $cols); if ($result) { foreach ($result as $key => $val) { if ($val['label'] == 'timezone') { $current_timezone = $val['value']; } } } if ($timezone_master_list) { $sl->setName('input[timezone]'); $sl->setList($timezone_master_list); $sl->setCurrent($current_timezone); $sl->setValueID('id'); $sl->setValueTitle('title'); $select_options = $sl->buildSelect(); } if ($db->count > 0) { foreach ($result as $item) { if ($item['description']) { $tooltip = '<span data-tooltip aria-haspopup="true" class="info has-tip" title="' . $item['description'] . '"><i></i></span>'; } else { $tooltip = null; } if ($item['label'] == 'date_format' && $date_list) { $sl->setName('input[' . $item['label'] . ']'); $sl->setList($date_list); $sl->setCurrent($item['value']);
$book = new GrlxComicBook($page->pageInfo['book_id']); $book->getPages(); } // Let artists jump to this page in their website. /* if ( $book_info['url'] ) { $link1-> url($book_info['url'].'/'.$page_info['sort_order']); $link1-> tap('View this page live'); $link1-> title('See this page as a reader would.'); $action_output = $link1->text_link('view'); } */ $sl->setName('pub_year'); $sl->setCurrent(substr($page->pageInfo['date_publish'], 0, 4)); $sl->setList($year_list); $sl->setValueID('id'); $sl->setValueTitle('title'); $sl->setStyle('width:4rem'); $year_select_output = $sl->buildSelect(); $sl->setName('pub_month'); $sl->setCurrent(substr($page->pageInfo['date_publish'], 5, 2)); $sl->setList($month_list); $sl->setValueID('id'); $sl->setValueTitle('title'); $sl->setStyle('width:8rem'); $month_select_output = $sl->buildSelect(); $sl->setName('pub_day'); $sl->setCurrent(substr($page->pageInfo['date_publish'], 8, 2)); $sl->setList($day_list);
} $pattern_select_output .= '</ul>' . "\n"; } else { $pattern_select_output = 'No patterns available for this file type.'; } $pattern_select_output = ' <div class="' . $form->row_class . '"> <div> <label>Items’ pattern</label> </div> <div>' . "\n" . $pattern_select_output; //.'</div></div>'; $layout_options[] = array('id' => 'list', 'title' => 'List'); $layout_options[] = array('id' => 'grid', 'title' => 'Grid'); $sl->setName('layout_id'); $sl->setCurrent($page_layout); $sl->setList($layout_options); $sl->setStyle('width:6rem'); $sl->setValueID('id'); $sl->setValueTitle('title'); $layout_select_output = ' <div class="' . $form->row_class . '"> <div> <label>Overall page layout</label> </div> <div>' . $sl->buildSelect() . '</div></div>'; if ($static->info['title']) { $page_title = $static->info['title']; } else { $page_title = 'Untitled'; $static->info['title'] = 'Untitled';