Example #1
0
 public function display_aliases(Page $page, $aliases, $is_admin, $pageNumber, $totalPages)
 {
     if ($is_admin) {
         $action = "<th width='10%'>Action</th>";
         $add = "\n\t\t\t\t<tr>\n\t\t\t\t\t<form action='" . make_link("alias/add") . "' method='POST'>\n\t\t\t\t\t\t<td><input type='text' name='oldtag'></td>\n\t\t\t\t\t\t<td><input type='text' name='newtag'></td>\n\t\t\t\t\t\t<td><input type='submit' value='Add'></td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr>\n\t\t\t";
     } else {
         $action = "";
         $add = "";
     }
     $h_aliases = "";
     $n = 0;
     foreach ($aliases as $old => $new) {
         $h_old = html_escape($old);
         $h_new = "<a href='" . make_link("post/list/" . url_escape($new) . "/1") . "'>" . html_escape($new) . "</a>";
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $h_aliases .= "<tr class='{$oe}'><td>{$h_old}</td><td>{$h_new}</td>";
         if ($is_admin) {
             $h_aliases .= "\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<form action='" . make_link("alias/remove") . "' method='POST'>\n\t\t\t\t\t\t\t<input type='hidden' name='oldtag' value='{$h_old}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove'>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</td>\n\t\t\t\t";
         }
         $h_aliases .= "</tr>";
     }
     $html = "\n\t\t\t<script>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$(\"#aliases\").tablesorter();\n\t\t\t});\n\t\t\t</script>\n\t\t\t<table id='aliases' class='zebra'>\n\t\t\t\t<thead><tr><th>From</th><th>To</th>{$action}</tr></thead>\n\t\t\t\t<tbody>{$h_aliases}</tbody>\n\t\t\t\t<tfoot>{$add}</tfoot>\n\t\t\t</table>\n\t\t\t<p><a href='" . make_link("alias/export/aliases.csv") . "'>Download as CSV</a></p>\n\t\t";
     $bulk_html = "\n\t\t\t<form enctype='multipart/form-data' action='" . make_link("alias/import") . "' method='POST'>\n\t\t\t\t<input type='file' name='alias_file'>\n\t\t\t\t<input type='submit' value='Upload List'>\n\t\t\t</form>\n\t\t";
     $page->set_title("Alias List");
     $page->set_heading("Alias List");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Aliases", $html));
     if ($is_admin) {
         $page->add_block(new Block("Bulk Upload", $bulk_html, "main", 51));
     }
     $this->display_paginator($page, "alias/list", null, $pageNumber, $totalPages);
 }
Example #2
0
 public function display_page_editor(Page $page, WikiPage $wiki_page)
 {
     $page->set_title(html_escape($wiki_page->title));
     $page->set_heading(html_escape($wiki_page->title));
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Editor", $this->create_edit_html($wiki_page)));
 }
Example #3
0
 public function display_signups_disabled(Page $page)
 {
     $page->set_title("Signups Disabled");
     $page->set_heading("Signups Disabled");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Signups Disabled", "The board admin has disabled the ability to create new accounts~"));
 }
Example #4
0
    /**
     * @param Page $page
     * @param array $history
     * @param int $page_number
     */
    public function display_global_page(Page $page, $history, $page_number)
    {
        $start_string = "\n\t\t\t<div style='text-align: left'>\n\t\t\t\t" . make_form(make_link("tag_history/revert")) . "\n\t\t\t\t\t<ul style='list-style-type:none;'>\n\t\t";
        $end_string = "\n\t\t\t\t\t</ul>\n\t\t\t\t\t<input type='submit' value='Revert To'>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t";
        global $user;
        $history_list = "";
        foreach ($history as $fields) {
            $current_id = $fields['id'];
            $image_id = $fields['image_id'];
            $current_tags = html_escape($fields['tags']);
            $name = $fields['name'];
            $h_ip = $user->can("view_ip") ? " " . show_ip($fields['user_ip'], "Tagging Image #{$image_id} as '{$current_tags}'") : "";
            $setter = "<a href='" . make_link("user/" . url_escape($name)) . "'>" . html_escape($name) . "</a>{$h_ip}";
            $history_list .= '
				<li>
					<input type="radio" name="revert" value="' . $current_id . '">
					<a href="' . make_link('post/view/' . $image_id) . '">' . $image_id . '</a>:
					' . $current_tags . ' (Set by ' . $setter . ')
				</li>
			';
        }
        $history_html = $start_string . $history_list . $end_string;
        $page->set_title("Global Tag History");
        $page->set_heading("Global Tag History");
        $page->add_block(new Block("Tag History", $history_html, "main", 10));
        $h_prev = $page_number <= 1 ? "Prev" : '<a href="' . make_link('tag_history/all/' . ($page_number - 1)) . '">Prev</a>';
        $h_index = "<a href='" . make_link() . "'>Index</a>";
        $h_next = '<a href="' . make_link('tag_history/all/' . ($page_number + 1)) . '">Next</a>';
        $nav = $h_prev . ' | ' . $h_index . ' | ' . $h_next;
        $page->add_block(new Block("Navigation", $nav, "left"));
    }
Example #5
0
 public function display_reported_images(Page $page, $reports)
 {
     global $config;
     $h_reportedimages = "";
     $n = 0;
     foreach ($reports as $report) {
         $image = $report['image'];
         $h_reason = format_text($report['reason']);
         if ($config->get_bool('report_image_show_thumbs')) {
             $image_link = $this->build_thumb_html($image);
         } else {
             $image_link = "<a href=\"" . make_link("post/view/{$image->id}") . "\">{$image->id}</a>";
         }
         $reporter_name = html_escape($report['reporter_name']);
         $userlink = "<a href='" . make_link("user/{$reporter_name}") . "'>{$reporter_name}</a>";
         global $user;
         $iabbe = new ImageAdminBlockBuildingEvent($image, $user);
         send_event($iabbe);
         ksort($iabbe->parts);
         $actions = join("<br>", $iabbe->parts);
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $h_reportedimages .= "\n\t\t\t\t<tr class='{$oe}'>\n\t\t\t\t\t<td>{$image_link}</td>\n\t\t\t\t\t<td>Report by {$userlink}: {$h_reason}</td>\n\t\t\t\t\t<td class='formstretch'>\n\t\t\t\t\t\t<form action='" . make_link("image_report/remove") . "' method='POST'>\n\t\t\t\t\t\t\t<input type='hidden' name='id' value='{$report['id']}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove Report'>\n\t\t\t\t\t\t</form>\n\n\t\t\t\t\t\t<br>{$actions}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t";
     }
     $thumb_width = $config->get_int("thumb_width");
     $html = "\n\t\t\t<table id='reportedimage' class='zebra'>\n\t\t\t\t<thead><td width='{$thumb_width}'>Image</td><td>Reason</td><td width='128'>Action</td></thead>\n\t\t\t\t{$h_reportedimages}\n\t\t\t</table>\n\t\t";
     $page->set_title("Reported Images");
     $page->set_heading("Reported Images");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Reported Images", $html));
 }
Example #6
0
 public function display_page(Page $page, $images)
 {
     global $config;
     if (count($this->search_terms) == 0) {
         $query = null;
         $page_title = $config->get_string('title');
     } else {
         $search_string = implode(' ', $this->search_terms);
         $query = url_escape($search_string);
         $page_title = html_escape($search_string);
         if (count($images) > 0) {
             $page->set_subheading("Page {$this->page_number} / {$this->total_pages}");
         }
     }
     if ($this->page_number > 1 || count($this->search_terms) > 0) {
         // $page_title .= " / $page_number";
     }
     $nav = $this->build_navigation($this->page_number, $this->total_pages, $this->search_terms);
     $page->set_title($page_title);
     $page->set_heading($page_title);
     $page->add_block(new Block("Navigation", $nav, "left", 0));
     if (count($images) > 0) {
         if ($query) {
             $page->add_block(new Block("Images", $this->build_table($images, "search={$query}"), "main", 10));
             $this->display_paginator($page, "post/list/{$query}", null, $this->page_number, $this->total_pages);
         } else {
             $page->add_block(new Block("Images", $this->build_table($images, null), "main", 10));
             $this->display_paginator($page, "post/list", null, $this->page_number, $this->total_pages);
         }
     } else {
         $page->add_block(new Block("No Images Found", "No images were found to match the search criteria"));
     }
 }
Example #7
0
 public function display_info_page(Page $page, $info)
 {
     $page->set_title("System Info");
     $page->set_heading("System Info");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Information:", $this->build_data_form($info)));
 }
Example #8
0
 public function display_advanced(Page $page, $options)
 {
     global $user;
     $rows = "";
     $n = 0;
     ksort($options);
     foreach ($options as $name => $value) {
         $h_value = html_escape($value);
         $len = strlen($h_value);
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $box = "";
         if (strpos($value, "\n") > 0) {
             $box .= "<textarea cols='50' rows='4' name='_config_{$name}'>{$h_value}</textarea>";
         } else {
             $box .= "<input type='text' name='_config_{$name}' value='{$h_value}'>";
         }
         $box .= "<input type='hidden' name='_type_{$name}' value='string'>";
         $rows .= "<tr class='{$oe}'><td>{$name}</td><td>{$box}</td></tr>";
     }
     $table = "\n\t\t\t<script type='text/javascript'>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$(\"#settings\").tablesorter();\n\t\t\t});\n\t\t\t</script>\n\t\t\t" . make_form(make_link("setup/save")) . "\n\t\t\t\t<table id='settings' class='zebra'>\n\t\t\t\t\t<thead><tr><th width='25%'>Name</th><th>Value</th></tr></thead>\n\t\t\t\t\t<tbody>{$rows}</tbody>\n\t\t\t\t\t<tfoot><tr><td colspan='2'><input type='submit' value='Save Settings'></td></tr></tfoot>\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t\t";
     $page->set_title("Shimmie Setup");
     $page->set_heading("Shimmie Setup");
     $page->add_block(new Block("Navigation", $this->build_navigation(), "left", 0));
     $page->add_block(new Block("Setup", $table));
 }
Example #9
0
 /**
  * Generic error message display
  */
 public function display_error(Page $page, $title, $message)
 {
     $page->set_title($title);
     $page->set_heading($title);
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Error", $message));
 }
Example #10
0
 /**
  * Display the error.
  *
  * @param Page $page
  * @param string $title
  * @param string $message
  */
 public function display_rotate_error(Page $page, $title, $message)
 {
     $page->set_title("Rotate Image");
     $page->set_heading("Rotate Image");
     $page->add_block(new NavBlock());
     $page->add_block(new Block($title, $message));
 }
Example #11
0
 public function display_page(Page $page)
 {
     $page->set_title("Tag List");
     $page->set_heading($this->heading);
     $page->add_block(new Block("Tags", $this->list));
     $page->add_block(new Block("Navigation", $this->navigation, "left", 0));
 }
Example #12
0
 public function display_results(Page $page, Image $image)
 {
     $page->set_title("Thumbnail Regenerated");
     $page->set_heading("Thumbnail Regenerated");
     $page->add_header("<meta http-equiv=\"cache-control\" content=\"no-cache\">");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Thumbnail", $this->build_thumb_html($image)));
 }
Example #13
0
 public function new_pool_composer(Page $page)
 {
     $create_html = "<form action=" . make_link("pool/create") . " method='POST'>\n\t\t\t<table>\n\t\t\t<tr><td>Title:</td><td><input type='text' name='title'></td></tr>\n\t\t\t<tr><td>Public?</td><td><input name='public' type='checkbox' value='Y' checked='checked'/></td></tr>\n\t\t\t<tr><td>Description:</td><td><textarea name='description'></textarea></td></tr>\n\t\t\t<tr><td colspan='2'><input type='submit' value='Create' /></td></tr>\n\t\t\t</table>\n\t\t";
     $blockTitle = "Create Pool";
     $page->set_title(html_escape($blockTitle));
     $page->set_heading(html_escape($blockTitle));
     $page->add_block(new Block("Create Pool", $create_html, "main", 20));
 }
Example #14
0
 public function display_upload_results(Page $page)
 {
     $page->set_title("Adding folder");
     $page->set_heading("Adding folder");
     $page->add_block(new NavBlock());
     foreach ($this->messages as $block) {
         $page->add_block($block);
     }
 }
Example #15
0
 public function display_page(Page $page, Image $image, $editor_parts)
 {
     $metatags = str_replace(" ", ", ", html_escape($image->get_tag_list()));
     $page->set_title("Image {$image->id}: " . html_escape($image->get_tag_list()));
     $page->add_header("<meta name=\"keywords\" content=\"{$metatags}\">");
     $page->set_heading(html_escape($image->get_tag_list()));
     $page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0));
     $page->add_block(new Block(null, $this->build_info($image, $editor_parts), "main", 10));
     //$page->add_block(new Block(null, $this->build_pin($image), "main", 11));
 }
Example #16
0
    public function search_notes_page(Page $page)
    {
        //IN DEVELOPMENT, NOT FULLY WORKING
        $html = '<form method="GET" action="/furpiledbeta/post/list/note=">
		<input id="search_input" type="text" name="search"/>
		<input type="submit" style="display: none;" value="Find"/>
		</form>';
        $page->set_title(html_escape("Search Note"));
        $page->set_heading(html_escape("Search Note"));
        $page->add_block(new Block("Search Note", $html, "main", 10));
    }
Example #17
0
 public function display_upload_results(Page $page)
 {
     $page->set_title("Adding folder");
     $page->set_heading("Adding folder");
     $page->add_block(new NavBlock());
     $html = "";
     foreach ($this->messages as $block) {
         $html .= "<br/>" . html_escape($html);
     }
     $page->add_block(new Block("Results", $block));
 }
Example #18
0
 public function display_upload_status(Page $page, $ok)
 {
     if ($ok) {
         $page->set_mode("redirect");
         $page->set_redirect(make_link());
     } else {
         $page->set_title("Upload Status");
         $page->set_heading("Upload Status");
         $page->add_block(new NavBlock());
     }
 }
Example #19
0
 public function display_resize_page(Page $page, $image_id)
 {
     global $config;
     $default_width = $config->get_int('resize_default_width');
     $default_height = $config->get_int('resize_default_height');
     $image = Image::by_id($image_id);
     $thumbnail = $this->build_thumb_html($image, null);
     $html = "<div style='clear:both;'></div>\n\t\t\t\t<p>Resize Image ID " . $image_id . "<br>" . $thumbnail . "</p>\n\t\t\t\t<p>Please note: You will have to refresh the image page, or empty your browser cache.</p>\n\t\t\t\t<p>Enter the new size for the image, or leave blank to scale the image automatically.</p><br>" . make_form(make_link('resize/' . $image_id), 'POST', $multipart = True, 'form_resize') . "\n\t\t\t\t<input type='hidden' name='image_id' value='{$image_id}'>\n\t\t\t\t<table id='large_upload_form'>\n\t\t\t\t\t<tr><td>New Width</td><td colspan='3'><input id='resize_width' name='resize_width' type='text' value='" . $default_width . "'></td></tr>\n\t\t\t\t\t<tr><td>New Height</td><td colspan='3'><input id='resize_height' name='resize_height' type='text' value='" . $default_height . "'></td></tr>\n\t\t\t\t\t<tr><td colspan='4'><input id='resizebutton' type='submit' value='Resize'></td></tr>\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t";
     $page->set_title("Resize Image");
     $page->set_heading("Resize Image");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Resize Image", $html, "main", 20));
 }
Example #20
0
 public function display_bans(Page $page, $bans)
 {
     global $database, $user;
     $h_bans = "";
     $prefix = $database->get_driver_name() == "sqlite" ? "bans." : "";
     foreach ($bans as $ban) {
         $end_human = date('Y-m-d', $ban[$prefix . 'end_timestamp']);
         $h_bans .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td width='12%'>{$ban[$prefix . 'ip']}</td>\n\t\t\t\t\t<td>{$ban[$prefix . 'reason']}</td>\n\t\t\t\t\t<td width='10%'>{$ban['banner_name']}</td>\n\t\t\t\t\t<td width='10%'>" . substr($ban[$prefix . 'added'], 0, 10) . "</td>\n\t\t\t\t\t<td width='15%'>{$end_human}</td>\n\t\t\t\t\t" . make_form(make_link("ip_ban/remove")) . "\n\t\t\t\t\t<td width='8%'>\n\t\t\t\t\t\t\t<input type='hidden' name='id' value='{$ban[$prefix . 'id']}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove'>\n\t\t\t\t\t</td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr>\n\t\t\t";
     }
     $html = "\n\t\t\t<a href='" . make_link("ip_ban/list", "all=on") . "'>Show All</a>\n\t\t\t<p><table id='bans' class='sortable zebra'>\n\t\t\t\t<thead><tr><th>IP</th><th>Reason</th><th>By</th><th>From</th><th>Until</th><th>Action</th></tr></thead>\n\t\t\t\t{$h_bans}\n\t\t\t\t<tfoot><tr id='add'>\n\t\t\t\t\t" . make_form(make_link("ip_ban/add")) . "\n\t\t\t\t\t\t<td><input type='text' name='ip' value='" . html_escape(@$_GET['ip']) . "'></td>\n\t\t\t\t\t\t<td><input type='text' name='reason' value='" . html_escape(@$_GET['reason']) . "'></td>\n\t\t\t\t\t\t<td>{$user->name}</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td><input type='text' name='end' value='" . html_escape(@$_GET['end']) . "'></td>\n\t\t\t\t\t\t<td><input type='submit' value='Ban'></td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr></tfoot>\n\t\t\t</table>\n\t\t";
     $page->set_title("IP Bans");
     $page->set_heading("IP Bans");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Edit IP Bans", $html));
 }
Example #21
0
 public function display_signup_page(Page $page)
 {
     global $config;
     $tac = $config->get_string("login_tac", "");
     $tfe = new TextFormattingEvent($tac);
     send_event($tfe);
     $tac = $tfe->formatted;
     if (empty($tac)) {
         $html = "";
     } else {
         $html = "<p>{$tac}</p>";
     }
     $html .= "\n\t\t<form action='" . make_link("user_admin/create") . "' method='POST'>\n\t\t\t<table style='width: 300px;'>\n\t\t\t\t<tr><td>Name</td><td><input type='text' name='name'></td></tr>\n\t\t\t\t<tr><td>Password</td><td><input type='password' name='pass1'></td></tr>\n\t\t\t\t<tr><td>Repeat Password</td><td><input type='password' name='pass2'></td></tr>\n\t\t\t\t<tr><td>Email (Optional)</td><td><input type='text' name='email'></td></tr>\n\t\t\t\t<tr><td colspan='2'><input type='Submit' value='Create Account'></td></tr>\n\t\t\t</table>\n\t\t</form>\n\t\t";
     $page->set_title("Create Account");
     $page->set_heading("Create Account");
     $page->disable_left();
     $page->add_block(new Block("Signup", $html));
 }
Example #22
0
 public function display_bans(Page $page, $bans)
 {
     global $database, $user;
     $h_bans = "";
     $n = 0;
     $prefix = $database->engine->name == "sqlite" ? "bans." : "";
     $prefix2 = $database->engine->name == "sqlite" ? "users." : "";
     foreach ($bans as $ban) {
         $end_human = date('Y-m-d', $ban[$prefix . 'end_timestamp']);
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $h_bans .= "\n\t\t\t\t<tr class='{$oe}'>\n\t\t\t\t\t<td width='10%'>{$ban[$prefix . 'ip']}</td>\n\t\t\t\t\t<td>{$ban[$prefix . 'reason']}</td>\n\t\t\t\t\t<td width='10%'>{$ban['banner_name']}</td>\n\t\t\t\t\t<td width='15%'>{$end_human}</td>\n\t\t\t\t\t<td width='10%'>\n\t\t\t\t\t\t<form action='" . make_link("ip_ban/remove") . "' method='POST'>\n\t\t\t\t\t\t\t<input type='hidden' name='id' value='{$ban[$prefix . 'id']}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove'>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t";
     }
     $html = "\n\t\t\t<script>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$(\"#bans\").tablesorter();\n\t\t\t});\n\t\t\t</script>\n\t\t\t<a href='" . make_link("ip_ban/list", "all=on") . "'>Show All</a>\n\t\t\t<p><table id='bans' class='zebra'>\n\t\t\t\t<thead><tr><th>IP</th><th>Reason</th><th>By</th><th>Until</th><th>Action</th></tr></thead>\n\t\t\t\t{$h_bans}\n\t\t\t\t<tfoot><tr>\n\t\t\t\t\t<form action='" . make_link("ip_ban/add") . "' method='POST'>\n\t\t\t\t\t\t<td><input type='text' name='ip'></td>\n\t\t\t\t\t\t<td><input type='text' name='reason'></td>\n\t\t\t\t\t\t<td>{$user->name}</td>\n\t\t\t\t\t\t<td><input type='text' name='end'></td>\n\t\t\t\t\t\t<td><input type='submit' value='Ban'></td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr></tfoot>\n\t\t\t</table>\n\t\t";
     $page->set_title("IP Bans");
     $page->set_heading("IP Bans");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Edit IP Bans", $html));
 }
Example #23
0
 protected function display_page_header(Page $page, $images)
 {
     global $config;
     if (count($this->search_terms) == 0) {
         $page_title = $config->get_string('title');
     } else {
         $search_string = implode(' ', $this->search_terms);
         $page_title = html_escape($search_string);
         if (count($images) > 0) {
             $page->set_subheading("Page {$this->page_number} / {$this->total_pages}");
         }
     }
     if ($this->page_number > 1 || count($this->search_terms) > 0) {
         // $page_title .= " / $page_number";
     }
     $page->set_title($page_title);
     $page->set_heading($page_title);
 }
Example #24
0
 public function display_doc(Page $page, ExtensionInfo $info)
 {
     $author = "";
     if ($info->author) {
         if ($info->email) {
             $author = "<br><b>Author:</b> <a href=\"mailto:" . html_escape($info->email) . "\">" . html_escape($info->author) . "</a>";
         } else {
             $author = "<br><b>Author:</b> " . html_escape($info->author);
         }
     }
     $version = $info->version ? "<br><b>Version:</b> " . html_escape($info->version) : "";
     $link = $info->link ? "<br><b>Home Page:</b> <a href=\"" . html_escape($info->link) . "\">Link</a>" : "";
     $doc = $info->documentation;
     $html = "\n\t\t\t<div style='margin: auto; text-align: left; width: 512px;'>\n\t\t\t\t{$author}\n\t\t\t\t{$version}\n\t\t\t\t{$link}\n\t\t\t\t<p>{$doc}\n\t\t\t\t<hr>\n\t\t\t\t<p><a href='" . make_link("ext_manager") . "'>Back to the list</a>\n\t\t\t</div>";
     $page->set_title("Documentation for " . html_escape($info->name));
     $page->set_heading(html_escape($info->name));
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Documentation", $html));
 }
Example #25
0
 public function display_untags(Page $page, $page_number, $page_count, $bans)
 {
     $h_bans = "";
     foreach ($bans as $ban) {
         $h_bans .= "\n\t\t\t\t<tr>\n\t\t\t\t\t" . make_form(make_link("untag/remove")) . "\n\t\t\t\t\t\t<td width='30%'>{$ban['tag']}</td>\n\t\t\t\t\t\t<td>{$ban['redirect']}</td>\n\t\t\t\t\t\t<td width='10%'>\n\t\t\t\t\t\t\t<input type='hidden' name='tag' value='{$ban['tag']}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove'>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr>\n\t\t\t";
     }
     $html = "\n\t\t\t<table id='image_bans' class='zebra sortable'>\n\t\t\t\t<thead>\n\t\t\t\t\t<th>Tag</th><th>Redirect</th><th>Action</th>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<form action='" . make_link("untag/list/1") . "' method='GET'>\n\t\t\t\t\t\t\t<td><input type='text' name='tag' class='autocomplete_tags' autocomplete='off'></td>\n\t\t\t\t\t\t\t<td><input type='text' name='redirect'></td>\n\t\t\t\t\t\t\t<td><input type='submit' value='Search'></td>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t{$h_bans}\n\t\t\t\t<tfoot><tr>\n\t\t\t\t\t" . make_form(make_link("untag/add")) . "\n\t\t\t\t\t\t<td><input type='text' name='tag' class='autocomplete_tags' autocomplete='off'></td>\n\t\t\t\t\t\t<td><input type='text' name='redirect'></td>\n\t\t\t\t\t\t<td><input type='submit' value='Ban'></td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr></tfoot>\n\t\t\t</table>\n\t\t";
     $prev = $page_number - 1;
     $next = $page_number + 1;
     $h_prev = $page_number <= 1 ? "Prev" : "<a href='" . make_link("untag/list/{$prev}") . "'>Prev</a>";
     $h_index = "<a href='" . make_link() . "'>Index</a>";
     $h_next = $page_number >= $page_count ? "Next" : "<a href='" . make_link("untag/list/{$next}") . "'>Next</a>";
     $nav = "{$h_prev} | {$h_index} | {$h_next}";
     $page->set_title("UnTags");
     $page->set_heading("UnTags");
     $page->add_block(new Block("Edit UnTags", $html));
     $page->add_block(new Block("Navigation", $nav, "left", 0));
     $this->display_paginator($page, "untag/list", null, $page_number, $page_count);
 }
Example #26
0
 public function display_image_hash_bans(Page $page, $page_number, $page_count, $bans)
 {
     $h_bans = "";
     $n = 0;
     foreach ($bans as $ban) {
         $oe = $n++ % 2 == 0 ? "even" : "odd";
         $h_bans .= "\n\t\t\t\t<tr class='{$oe}'>\n\t\t\t\t\t<td width='30%'>{$ban['hash']}</td>\n\t\t\t\t\t<td>{$ban['reason']}</td>\n\t\t\t\t\t<td width='10%'>\n\t\t\t\t\t\t" . make_form(make_link("image_hash_ban/remove")) . "\n\t\t\t\t\t\t\t<input type='hidden' name='hash' value='{$ban['hash']}'>\n\t\t\t\t\t\t\t<input type='submit' value='Remove'>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t";
     }
     $html = "\n\t\t\t<script type='text/javascript'>\n\t\t\t\$(document).ready(function() {\n\t\t\t\t\$(\"#image_bans\").tablesorter();\n\t\t\t});\n\t\t\t</script>\n\t\t\t<table id='image_bans' class='zebra'>\n\t\t\t\t<thead><th>Hash</th><th>Reason</th><th>Action</th></thead>\n\t\t\t\t{$h_bans}\n\t\t\t\t<tfoot><tr>\n\t\t\t\t\t" . make_form(make_link("image_hash_ban/add")) . "\n\t\t\t\t\t\t<td><input type='text' name='hash'></td>\n\t\t\t\t\t\t<td><input type='text' name='reason'></td>\n\t\t\t\t\t\t<td><input type='submit' value='Ban'></td>\n\t\t\t\t\t</form>\n\t\t\t\t</tr></tfoot>\n\t\t\t</table>\n\t\t";
     $prev = $page_number - 1;
     $next = $page_number + 1;
     $h_prev = $page_number <= 1 ? "Prev" : "<a href='" . make_link("image_hash_ban/list/{$prev}") . "'>Prev</a>";
     $h_index = "<a href='" . make_link() . "'>Index</a>";
     $h_next = $page_number >= $page_count ? "Next" : "<a href='" . make_link("image_hash_ban/list/{$next}") . "'>Next</a>";
     $nav = "{$h_prev} | {$h_index} | {$h_next}";
     $page->set_title("Image Bans");
     $page->set_heading("Image Bans");
     $page->add_block(new Block("Edit Image Bans", $html));
     $page->add_block(new Block("Navigation", $nav, "left", 0));
     $this->display_paginator($page, "image_hash_ban/list", null, $page_number, $page_count);
 }
Example #27
0
 public function display_new_thread_composer(Page $page, $threadText = null, $threadTitle = null)
 {
     global $config, $user;
     $max_characters = $config->get_int('forumMaxCharsPerPost');
     $html = make_form(make_link("forum/create"));
     if (!is_null($threadTitle)) {
         $threadTitle = html_escape($threadTitle);
     }
     if (!is_null($threadText)) {
         $threadText = html_escape($threadText);
     }
     $html .= "\n\t\t\t\t<table style='width: 500px;'>\n\t\t\t\t\t<tr><td>Title:</td><td><input type='text' name='title' value='{$threadTitle}'></td></tr>\n\t\t\t\t\t<tr><td>Message:</td><td><textarea id='message' name='message' >{$threadText}</textarea></td></tr>\n\t\t\t\t\t<tr><td></td><td><small>Max characters alowed: {$max_characters}.</small></td></tr>";
     if ($user->is_admin()) {
         $html .= "<tr><td colspan='2'><label for='sticky'>Sticky:</label><input name='sticky' type='checkbox' value='Y' /></td></tr>";
     }
     $html .= "<tr><td colspan='2'><input type='submit' value='Submit' /></td></tr>\n\t\t\t\t</table>\n\t\t\t\t</form>\n\t\t\t\t";
     $blockTitle = "Write a new thread";
     $page->set_title(html_escape($blockTitle));
     $page->set_heading(html_escape($blockTitle));
     $page->add_block(new Block($blockTitle, $html, "main", 120));
 }
Example #28
0
 public function display_advanced(Page $page, $options)
 {
     $h_rows = "";
     ksort($options);
     foreach ($options as $name => $value) {
         $h_name = html_escape($name);
         $h_value = html_escape($value);
         $h_box = "";
         if (strpos($value, "\n") > 0) {
             $h_box .= "<textarea cols='50' rows='4' name='_config_{$h_name}'>{$h_value}</textarea>";
         } else {
             $h_box .= "<input type='text' name='_config_{$h_name}' value='{$h_value}'>";
         }
         $h_box .= "<input type='hidden' name='_type_{$h_name}' value='string'>";
         $h_rows .= "<tr><td>{$h_name}</td><td>{$h_box}</td></tr>";
     }
     $table = "\n\t\t\t" . make_form(make_link("setup/save")) . "\n\t\t\t\t<table id='settings' class='sortable zebra'>\n\t\t\t\t\t<thead><tr><th width='25%'>Name</th><th>Value</th></tr></thead>\n\t\t\t\t\t<tbody>{$h_rows}</tbody>\n\t\t\t\t\t<tfoot><tr><td colspan='2'><input type='submit' value='Save Settings'></td></tr></tfoot>\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t\t";
     $page->set_title("Shimmie Setup");
     $page->set_heading("Shimmie Setup");
     $page->add_block(new Block("Navigation", $this->build_navigation(), "left", 0));
     $page->add_block(new Block("Setup", $table));
 }
Example #29
0
 public function display_global_page(Page $page, $history)
 {
     $start_string = "\n\t\t\t<div style='text-align: left'>\n\t\t\t\t<form enctype='multipart/form-data' action='" . make_link("tag_history/revert") . "' method='POST'>\n\t\t\t\t\t<ul style='list-style-type:none;'>\n\t\t";
     $end_string = "\n\t\t\t\t\t</ul>\n\t\t\t\t\t<input type='submit' value='Revert'>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t";
     global $user;
     $history_list = "";
     foreach ($history as $fields) {
         $current_id = $fields['id'];
         $image_id = $fields['image_id'];
         $current_tags = html_escape($fields['tags']);
         $name = $fields['name'];
         $setter = "<a href='" . make_link("user/" . url_escape($name)) . "'>" . html_escape($name) . "</a>";
         if ($user->is_admin()) {
             $setter .= " / " . $fields['user_ip'];
         }
         $history_list .= "\n\t\t\t\t<li>\n\t\t\t\t\t<input type='radio' name='revert' value='{$current_id}'>\n\t\t\t\t\t<a href='" . make_link("post/view/{$image_id}") . "'>{$image_id}</a>:\n\t\t\t\t\t{$current_tags} (Set by {$setter})\n\t\t\t\t</li>\n\t\t\t";
     }
     $history_html = $start_string . $history_list . $end_string;
     $page->set_title("Global Tag History");
     $page->set_heading("Global Tag History");
     $page->add_block(new NavBlock());
     $page->add_block(new Block("Tag History", $history_html, "main", 10));
 }
<?php

include "functions/load_page.php";
$redirect = "index.php#meetings";
$page = new Page();
$page->set_title("Meeting times");
$page->set_redirect($redirect);
$page->set_text("\n   <h2>How to Join</h2>\n   <p>This page has been removed. See the <a href='{$redirect}'>about page</a>. </p>\n");
$page->render();