} ///// Display the list if ($book->pageList) { $edit_link = new GrlxLinkStyle(); $edit_link->url('book.page-edit.php'); $edit_link->title('Edit page info.'); $edit_link->reveal(false); $edit_link->action('edit'); $delete_link = new GrlxLinkStyle(); $delete_link->url('book.view.php'); $delete_link->title('Delete page.'); $delete_link->reveal(false); $delete_link->action('edit'); $marker_link = new GrlxLinkStyle(); $marker_link->url('book.view.php'); $marker_link->title('Remove this marker.'); $marker_link->reveal(false); $marker_link->action('edit'); // $marker_link->tap('Remove marker'); $heading_list[] = array('value' => 'Select', 'class' => null); $heading_list[] = array('value' => 'Title', 'class' => null); $heading_list[] = array('value' => 'Order', 'class' => null); if ($marker_type_list) { $heading_list[] = array('value' => 'Marker', 'class' => null); } $heading_list[] = array('value' => 'Actions', 'class' => null); $list->headings($heading_list); $list->draggable(false); $list->row_class('chapter'); $total_shown = 0; // Track how many images appear on the page.
// ! Comments // if ($function_id == 3) { $comment_link = new GrlxLinkStyle(); $comment_link->url('xtra.comments.ajax.php'); $comment_link->reveal(true); if (isset($comments_info)) { $heading_list[] = array('value' => 'Your chosen service', 'class' => 'nudge'); $heading_list[] = array('value' => 'Your ' . lcfirst($comments_info['label']), 'class' => 'nudge'); $heading_list[] = array('value' => 'Actions', 'class' => null); $list->row_class('follow'); $list->headings($heading_list); $comment_output = $list->format_headings(); $vis_link = new GrlxLinkStyle(); $vis_link->url($comments_info['url']); $vis_link->title('Go to ' . $comments_info['title']); $vis_link->action('extlink'); $comment_link->title('Edit your user info.'); $comment_link->action('edit'); $comment_link->query("service_id={$comments_info['service_id']}"); $action_output = $vis_link->icon_link() . $comment_link->icon_link(); $comment_list[$comments_info['service_id'] . '||1'] = array($comments_info['title'], $comments_info['value'], $action_output); $list->content($comment_list); $comment_output .= $list->format_content(); $comment_link->url('xtra.social.php'); $comment_link->tap('Reset service'); $comment_link->query("reset_comments={$comments_info['service_id']}"); $reset_output = $comment_link->button_tertiary('reset'); $comment_output .= '<div class="note reset">Do you need to switch to another comment service?' . $reset_output . '</div>'; } else { $comment_link->tap('Setup');
} elseif ($i == $preview_limit) { $page_list[$key]['preview'] .= '…'; } $i++; } } } } if ($page_list) { $page_list_output = '<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-4">' . "\n"; foreach ($page_list as $key => $val) { if ($val['edit_path'] == 1) { $title = urlencode($val['title']); $delete_link = new GrlxLinkStyle(); $delete_link->url('sttc.page-delete.ajax.php'); $delete_link->title('Delete this page.'); $delete_link->reveal(true); $delete_link->query("id={$val['id']}&title={$title}"); $this_action = $delete_link->icon_link('delete'); } else { $delete_link = new GrlxLinkStyle(); $delete_link->i_only(true); $delete_link->id(); $this_action = $delete_link->icon_link('locked'); } $page_list_output .= <<<EOL \t\t<li id="page-{$val['id']}"> \t\t<div class="page sttc"> \t\t\t<a href="sttc.xml-edit.php?page_id={$val['id']}"> \t\t\t\t<h3>{$val['title']}</h3> \t\t\t\t<p>{$val['preview']}</p>
$alert_output .= $successMsg->success_dialog($theme->successOutput); */ } if ($theme->toInstallOutput) { $message = new GrlxAlert(); // $alert_output .= $message->info_dialog($theme->toInstallOutput); } // 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 & 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';
$new_title_output = '<input type="text" name="new_title" value="' . $book->info['title'] . '" size="16" style="width:16rem"/>' . "\n"; $view->page_title("Book: {$book_info['title']}"); $view->tooltype('chap'); $view->headline('Book <span>' . $book->info['title'] . '</span>'); // Group $view->group_h2('Title'); $view->group_instruction('Change the name of your book.'); $view->group_contents($new_title_output); $content_output .= $view->format_group() . '<hr />'; // Group $view->group_h2('Frequency'); $view->group_instruction('How often you publish new pages.'); $view->group_contents($publish_frequency_output); $content_output .= $view->format_group() . '<hr />'; // Group $link->title('Learn more about markers'); $link->url('http://www.getgrawlix.com/docs/' . DOCS_VERSION . '/markers'); $link->tap('Markers'); $view->group_h2('Markers'); $view->group_instruction($link->external_link() . ' are sections of a book, like chapters, scenes or supplemental material.'); $view->group_contents($marker_output); $content_output .= $view->format_group(); /***** * Display */ $output = $view->open_view(); $output .= $view->view_header(); $output .= $alert_output; //$output .= $modal->modal_container(); $output .= '<form accept-charset="UTF-8" method="post" action="book.edit.php">' . "\n"; $output .= $content_output;
$wonderful_info_output .= '<br/><form accept-charset="UTF-8" action="ad.list.php" method="post">' . "\n"; $wonderful_info_output .= '<p><label for="wonderful_id" class="instructions">Enter your ' . $link->paint() . ' account ID, or leave blank if you’re not a member.</label>' . "\n"; $wonderful_info_output .= '<input type="text" name="wonderful_id" id="wonderful_id" size="4" style="width:5rem;" value="' . $wonderful_third_data['user_info'] . '"/>' . "\n"; $wonderful_info_output .= '<button class="btn primary save" name="submit" type="submit" value="save"><i></i>Save</button></p><br/> ' . "\n"; $wonderful_info_output .= '</form>' . "\n"; $list->content($wonderful_ad_list_content); $wonderful_ad_list_output .= $list->format_headings(); $wonderful_ad_list_output .= $list->format_content(); ///////// Build the Google Adsense panel. if ($ad_list) { $link->url('ad.adsense-edit.php'); $edit_link->url('ad.adsense-edit.php'); $edit_link->title('Edit this ad.'); $edit_link->action('edit'); $delete_link->url('ad.list.php'); $delete_link->title('Permanently delete this ad.'); $delete_link->action('delete'); foreach ($ad_list as $key => $val) { if ($val['source_id'] == 3) { $link->query('ad_id=' . $key); $link->tap('ID ' . $key); $delete_link->query('delete_ad_id=' . $key); $edit_link->query('ad_id=' . $key); $adlist_content[] = array($link->icon_link(), $delete_link->icon_link() . "\n" . $edit_link->icon_link()); } } } if ($adlist_content) { $heading_list = array(); // reset $heading_list[] = array('value' => 'Ad ID', 'class' => null);
* Display */ $marker_type_list = $marker_type->getMarkerTypeList(); if ($marker_type_list) { $heading_list[] = array('value' => 'Level', 'class' => null); $heading_list[] = array('value' => 'Title', 'class' => null); $heading_list[] = array('value' => 'Total markers', 'class' => null); $heading_list[] = array('value' => 'Actions', 'class' => null); $edit_link = new GrlxLinkStyle(); $edit_link->url('marker-type.edit.php'); $edit_link->title('Edit marker type meta.'); $edit_link->reveal(false); $edit_link->action('edit'); $delete_link = new GrlxLinkStyle(); $delete_link->url('marker-type.list.php'); $delete_link->title('Delete this marker type.'); $delete_link->reveal(false); $delete_link->action('delete'); foreach ($marker_type_list as $key => $val) { $edit_link->query("marker_type_id={$val['id']}"); $delete_link->query("delete_id={$val['id']}"); $action_output = $delete_link->icon_link(); $action_output .= $edit_link->icon_link(); $list_items[$key] = array('select' => $val['rank'], 'title' => $val['title'], 'tally' => $val['tally'], 'action' => $action_output); } $list->draggable(false); $list->row_class('chapter'); $list->headings($heading_list); $list->content($list_items); $list_output = $list->format_headings(); $list_output .= $list->format_content();
if ($slot_list) { foreach ($slot_list as $key => $val) { $ad_slot_match_list = get_ad_slot_matches($key, null, $db); $slot_list[$key]['ad_count'] = count($ad_slot_match_list); } } if ($slot_list) { $heading_list = array(); // reset $heading_list[] = array('value' => 'Name', 'class' => 'nudge'); $heading_list[] = array('value' => 'Assigned ads', 'class' => null); $heading_list[] = array('value' => 'Actions', 'class' => null); $list->headings($heading_list); $list->row_class('ad'); $link->url('ad.slot-edit.php'); $link->title('Control which ads appear in different places on your site.'); $link->action('edit'); foreach ($slot_list as $key => $val) { $link->query('slot_id=' . $key); $slot_list_content[$key] = array($val['title'], $val['ad_count'], $link->icon_link()); } } $list->content($slot_list_content); $slot_list_output = $list->format_headings(); $slot_list_output .= $list->format_content(); ///////// Assemble the overall page view. $view->page_title('Advertisements'); $view->tooltype('ad'); $view->headline("Advertisements"); $view->group_css('ad'); $view->group_h2('Ad slots');
} } if (isset($dupes)) { $dupe_alert_output = $message->alert_dialog('Duplicates detected! You should create unique path names to avoid problems.'); } // Build output if ($nav_item) { $list->row_class('menu'); $list->sort_by('menu'); $list->draggable(true); $form->title('Show/hide this item in the site menu.'); $vis_link = new GrlxLinkStyle(); $vis_link->i_only(true); $edit_link = new GrlxLinkStyle(); $edit_link->url('site.nav-edit.ajax.php'); $edit_link->title('Change this item’s tappable text or destination URL.'); $edit_link->reveal(true); $edit_link->action('edit'); foreach ($nav_item as $item) { $edit_link->query("edit_id={$item['id']}"); if ($item['rel_type'] == 'external') { $vis_link->action('delete'); $vis_link->id("delete-{$item['id']}"); $vis_link->title('Delete this link from your site’s menu.'); $vis_output = $vis_link->icon_link(); } else { $form->id("id-{$item['id']}"); $vis_output = $form->checkbox_switch($item['in_menu']); } // $action_output = $edit_link->icon_link(); if (isset($dupes) && in_array($item['url'], $dupes)) {
/***** * Display logic */ if (!is_writable('../' . DIR_COMICS_IMG)) { $alert_output .= $message->alert_dialog('The comics images folder is not writable.'); } // Reset the marker info after making updates. if ($_POST) { $marker = new GrlxMarker($marker_id); } $marker_type_list = $db->get('marker_type', null, 'id,title'); $marker_type_list = rekey_array($marker_type_list, 'id'); if ($marker->pageList) { $edit_link = new GrlxLinkStyle(); $edit_link->url('book.page-edit.php'); $edit_link->title('Edit page meta.'); $edit_link->reveal(false); $edit_link->action('edit'); $delete_link = new GrlxLinkStyle(); $delete_link->i_only(true); $list->draggable(false); $list->row_class('chapter'); /* $heading_list[] = array( 'value' => 'Select', 'class' => null ); */ $heading_list[] = array('value' => ' ', 'class' => null); $heading_list[] = array('value' => 'Title', 'class' => null); $heading_list[] = array('value' => 'Page number', 'class' => null);
$link1->tap('last >>'); $last_link = $link1->paint(); } else { $last_link = 'last >>'; } // Display each image. Let the user trash ’em as needed. if ($page->imageList) { if (count($page->imageList) > 1) { $row_divider .= '<hr/>'; } foreach ($page->imageList as $key => $val) { $ref_id = $val['image_reference_id']; if (count($page->imageList) > 1) { $link1->url('book.page-edit.php?page_id=' . $page_id . '&remove_id=' . $key); $link1->tap(' Delete this image'); $link1->title('Permanently delete the graphic from this comic page. There is no undo. Do not pass go. Do not collect 200 cubits.'); $link1->anchor_class('warning'); $link1->icon('delete'); $delete_me = $link1->paint(); } if (is_file('../' . $milieu_list['directory']['value'] . $val['url'])) { $image_dimensions = getimagesize('../' . $milieu_list['directory']['value'] . $val['url']); $image_bytes = filesize('../' . $milieu_list['directory']['value'] . $val['url']); $weight = figure_pixel_weight($image_dimensions[0], $image_dimensions[1], $image_bytes); } else { $weight = 0; } $weight = round($weight, 3); !$milieu_list['directory']['value'] || $milieu_list['directory']['value'] == '' ? $url_prefix = '../' : ($url_prefix = '../'); $this_image = '<img src="' . $url_prefix . $milieu_list['directory']['value'] . $val['url'] . '" alt="' . $val['description'] . '"/>' . "\n"; $link1->title = 'Learn more about pixel weight';