$edit_link->reveal(true); $edit_link->action('edit'); // Fetch the link list $cols = array('title', 'url', 'sort_order', 'img_path', 'id'); $result = $db->orderBy('sort_order', 'ASC')->get('link_list', NULL, $cols); if ($db->count > 0) { foreach ($result as $item) { if ($item['img_path']) { $icon = '<img src="' . $item['img_path'] . '" alt="icon" />'; } else { $icon = ''; } $delete_link->id("id-{$item['id']}"); $action_output = $delete_link->icon_link(); $edit_link->query("edit_id={$item['id']}"); $action_output .= $edit_link->icon_link(); $list_items[$item['id']] = array($icon . ' ' . $item['title'], $item['url'], $action_output); } } $alert_output .= $fileops->check_or_make_dir('..' . $image_path); $view->page_title('Link list'); $view->tooltype('link'); $view->headline('Link list'); if ($list_items) { $list->headings(array('Title', 'URL', 'Actions')); $list->content($list_items); $links_output = $list->format_headings(); $links_output .= $list->format_content(); } if (!$links_output) { $links_output = '<b>You have no links to other sites.</b>';
$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'); $comment_output = '<p>You can choose one of these comment services to plug into Grawlix. <strong>Sign up with your chosen service and follow their directions.</strong> Next, we’ll need you to enter a unique ID that they will provide.</p>'; $comment_output .= '<div class="row comments">'; foreach ($section_group['items'] as $key => $val) { $comment_link->query("service_id={$val['service_id']}"); $comment_output .= '<div>';
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> \t\t\t</a> \t\t\t{$this_action} \t\t\t<a class="edit" href="sttc.xml-edit.php?page_id={$val['id']}"> \t\t\t\t<i class="edit"></i> \t\t\t</a> \t\t</div> \t\t</li> EOL;
// 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(); // Emphasize top-tier markers with a <strong> element. if ($marker->markerInfo['marker_type_id'] == 1) { $marker_type = '<strong>' . $marker_type_list[1]['title'] . '</strong>'; } else { $marker_type = $marker_type_list[$marker->markerInfo['marker_type_id']]['title']; } $link->url('marker.view.php?marker_id=' . $val['marker_id']); $link->title('Check out this marker'); $link->tap($marker->markerInfo['title']); $this_marker = $marker_link->icon_link('remove') . $marker_type . ': ' . $link->paint(); } elseif ($marker_type_list) { $link->url('book.view.php?new_marker_on=' . $val['id']); $link->title('Mark a new section on page ' . number_format($val['sort_order']) . ' that continues to the next marker.'); // $link-> tap('<span style="color:#bbb">add marker</span>'); $link->icon_link('new'); $this_marker = $link->paint(); } else { $this_marker = ''; } // We’re done with the marker data for this item in the list. Whew. // Simple edit-this-page link. $link->url('book.page-edit.php?page_id=' . $val['id']); $link->title('Edit page ' . number_format($val['sort_order']) . '.'); $link->tap($title); // Assemble the list item.
///////// 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); $heading_list[] = array('value' => 'Actions', 'class' => null); $list->headings($heading_list); $list->row_class('ad'); $final_adlist_content = array(); $final_adlist_content = array_merge($final_adlist_content, $adlist_content); $list->content($final_adlist_content); $adsense_list_output .= $list->format_headings(); $adsense_list_output .= $list->format_content();
$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(); } else { $list_output .= 'I didn’t find any types of marker.'; } $link->url('marker-type.create.php'); $link->tap('Create'); $create_output = $link->button_primary('new');
} } 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'); $view->group_instruction('Slots are locations on your site’s pages that contain ads.'); $view->group_contents($slot_list_output); $content_output .= $view->format_group() . '<hr /><br/>'; $view->group_h2('House ads');
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)) { $item['url'] = '<span class="fixme">' . $item['url'] . '</span>'; } $list_items[$item['id'] . '||' . $item['in_menu']] = array($item['title'], $item['url'], $vis_output, $edit_link->icon_link()); } } $view->page_title('Main menu'); $view->tooltype('menu'); $view->headline('Main menu'); $link->url('sttc.xml-new.php'); $link->tap('New page'); $action_output = $link->text_link('static'); $link->url('site.nav-edit.ajax.php'); $link->reveal(true); $link->query('edit_id=new'); $link->title = 'External links go to other websites — like those you enjoy reading soooo much you just have to share it with your readers.'; $link->tap('New external link'); $action_output .= $link->button_secondary('new'); $view->action($action_output);
'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); $heading_list[] = array('value' => 'Date', 'class' => null); $heading_list[] = array('value' => 'Actions', 'class' => null); $list->headings($heading_list); $pages_displayed = 0; foreach ($marker->pageList as $key => $val) { $page = new GrlxComicPage($val['id']); $delete_link->id("id-{$key}"); $edit_link->query("page_id={$key}"); $actions = $delete_link->icon_link('delete') . $edit_link->icon_link(); /* $link->url('book.page-edit.php'); $link->query('page_id='.$key); $link->tap(qty('page',$val['page_count'])); $pg_label = $link->arrow_link(); */ $link_output = $link->icon_link('edit'); $val['title'] ? $title = $val['title'] : ($title = '<span class="error">Untitled</span>'); $select = '<input type="checkbox" name="sel[' . $key . ']" value="' . $key . '"/>' . "\n"; $list_items[$key] = array('select' => ' ', 'title' => $title, 'sort_order' => '<input type="number" name="new_sort_order[' . $key . ']" value="' . intval($val['sort_order']) . '" style="width:3rem"/>', 'date' => format_date($val['date_publish']), 'action' => $actions); $orig_output .= '<input type="hidden" name="orig_sort_order[' . $key . ']" value="' . $val['sort_order'] . '"/>' . "\n"; $pages_displayed++; } $list->content($list_items); $content_output = $list->format_headings();