// 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'); $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>';
} } } /***** * Display logic */ $list->row_class('link'); $list->sort_by('link'); $list->draggable(true); $delete_link = new GrlxLinkStyle(); $delete_link->i_only(true); $delete_link->action('delete'); $edit_link = new GrlxLinkStyle(); $edit_link->url('site.link-edit.ajax.php'); $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);
$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); $heading_list[] = array('value' => 'Actions', 'class' => null);
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. foreach ($book->pageList as $key => $val) { $show_it = false;
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'); $view->group_instruction('Slots are locations on your site’s pages that contain ads.');