$edit_link = new GrlxLinkStyle(); $edit_link->url('xtra.edit-info.ajax.php'); $edit_link->title('Edit this service’s info.'); $edit_link->reveal(true); $edit_link->action('edit'); foreach ($service_list as $function_id => $section_group) { $view->group_h2($section_group['title']); $view->group_instruction($section_group['description']); // ! Follow // if ($function_id == 1) { $form->title('Show/hide a follow link for this service.'); $heading_list[] = array('value' => 'Service', 'class' => 'nudge'); $heading_list[] = array('value' => 'Your info', 'class' => 'nudge'); $heading_list[] = array('value' => 'Actions', 'class' => null); $list->row_class('follow'); $list->headings($heading_list); $follow_output = $list->format_headings(); foreach ($section_group['items'] as $key => $val) { // Get the id entered before activating the service if (!$val['value']) { $row_css = ' unset'; $username = '******'; $edit_link->query("service_id={$val['service_id']}&match_id={$val['match_id']}"); $action_output = $edit_link->icon_link(); } else { $row_css = $val['active']; $username = strfunc_check_empty($val['value']); $edit_link->query("service_id={$val['service_id']}"); $form->id("id-{$val['match_id']}"); $vis_output = $form->checkbox_switch($val['active']);
$web_file_path = $image_path . '/' . $file_name; if (move_uploaded_file($_FILES['icon_file']['tmp_name'], $uploadfile)) { } else { } $data = array('title' => $input['title'], 'url' => $input['url'], 'sort_order' => 0, 'img_path' => $web_file_path); $new_id = $db->insert('link_list', $data); if ($new_id <= 0) { $alert_output = $message->alert_dialog('Could not add new link.'); } } } } /***** * 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']) {
$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; if (!$keyword && ($total_pages < $pages_per_view || $val['sort_order'] >= $start_sort_order && $val['sort_order'] < $start_sort_order + $pages_per_view)) { $show_it = true; } if ($keyword) { $findit = mb_strpos(mb_strtolower($val['title'], "UTF-8"), mb_strtolower($keyword, "UTF-8")); if ($findit !== false) { $show_it = true; } } if ($show_it == true) { // Set up options unique to this item in the list.
$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); $list_output = $list->format_headings(); $book = new GrlxComicBook(); $book->getMarkerList(); // Chapters if ($book->markerList) { $i = 0; foreach ($book->markerList as $marker_id => $info) { $i++; $row_select = '<input type="checkbox" name="sel[book_page-' . $marker_id . ']" />'; $row_chapter = $info['type'] . ' ' . $i . ' <span class="title">' . $info['title'] . '</span>'; $row_theme = $theme->toneSelectList[$info['tone_id']]['title']; $group_list[] = array($row_select, $row_chapter, $row_theme); } }
$wonderful_xml = file_get_contents('../assets/data/projectwonderful.xml'); // Got a raw string? Interpret its XML. if ($wonderful_xml) { $wonderful_xml_obj = simplexml_load_string($wonderful_xml); $wonderful_ad_list = interpret_wonderful_xml($wonderful_xml_obj, $ad_list, $db); } // Got wonderful ads? Great! Build a list for the artist. if ($wonderful_ad_list) { $heading_list = array(); // reset $heading_list[] = array('value' => 'Ad image', 'class' => null); $heading_list[] = array('value' => 'Comic', 'class' => null); $heading_list[] = array('value' => 'Size', 'class' => null); $heading_list[] = array('value' => 'View', 'class' => null); $list->headings($heading_list); $list->row_class('ad'); $link->url('http://www.projectwonderful.com/browse.php'); $link->title('View this ad at Project Wonderful.'); $link->action('view'); foreach ($wonderful_ad_list as $key => $val) { $size_key = $val['width'] . ',' . $val['height']; $size = $size_list[$size_key]; $size ? $size : ($size = 'Custom'); $image->src = (string) $val['thumbnail']; $image->alt = $val['title']; $image->style = 'max-height:200px;max-width:234px'; $link->query('adboxid=' . $val['source_rel_id']); // $link-> tap('View'.' '.fa('external')); if ($val['width'] && $val['height']) { $dimensions = $val['width'] . ' × ' . $val['height']; } else {
} // Check for duplicate paths if ($path_items) { $dupe_check = array_count_values($path_items); foreach ($dupe_check as $key => $val) { if ($val > 1) { $dupes[] = $key; } } } 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']}");