本文整理汇总了PHP中make_form函数的典型用法代码示例。如果您正苦于以下问题:PHP make_form函数的具体用法?PHP make_form怎么用?PHP make_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_form函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_table
public function display_table(Page $page, $extensions, $editable)
{
$h_en = $editable ? "<th>Enabled</th>" : "";
$html = "\n\t\t\t" . make_form(make_link("ext_manager/set")) . "\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\$(\"#extensions\").tablesorter();\n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<table id='extensions' class='zebra'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>{$h_en}<th>Name</th><th>Description</th></tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t";
foreach ($extensions as $extension) {
if (!$editable && $extension->visibility == "admin") {
continue;
}
$h_name = html_escape(empty($extension->name) ? $extension->ext_name : $extension->name);
$h_description = html_escape($extension->description);
if ($extension->enabled === TRUE) {
$h_enabled = " checked='checked'";
} else {
if ($extension->enabled === FALSE) {
$h_enabled = "";
} else {
$h_enabled = " disabled checked='checked'";
}
}
$h_link = make_link("ext_doc/" . url_escape($extension->ext_name));
$h_en = $editable ? "<td><input type='checkbox' name='ext_" . html_escape($extension->ext_name) . "'{$h_enabled}></td>" : "";
$html .= "\n\t\t\t\t<tr>\n\t\t\t\t\t{$h_en}\n\t\t\t\t\t<td><a href='{$h_link}'>{$h_name}</a></td>\n\t\t\t\t\t<td style='text-align: left;'>{$h_description}</td>\n\t\t\t\t</tr>";
}
$h_set = $editable ? "<tfoot><tr><td colspan='5'><input type='submit' value='Set Extensions'></td></tr></tfoot>" : "";
$html .= "\n\t\t\t\t\t</tbody>\n\t\t\t\t\t{$h_set}\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t";
$page->set_title("Extensions");
$page->set_heading("Extensions");
$page->add_block(new NavBlock());
$page->add_block(new Block("Extension Manager", $html));
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:30,代码来源:theme.php
示例2: display_aliases
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" . make_form(make_link("alias/add")) . "\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" . make_form(make_link("alias/remove")) . "\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 type='text/javascript'>\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" . make_form(make_link("alias/import"), $multipart = True) . "\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);
}
开发者ID:nsuan,项目名称:shimmie2,代码行数:32,代码来源:theme.php
示例3: get_html_for_blotter_editor
private function get_html_for_blotter_editor($entries)
{
global $user;
/**
* Long function name, but at least I won't confuse it with something else ^_^
*/
// Add_new stuff goes here.
$table_header = "\n\t\t\t<tr>\n\t\t\t<th>Date</th>\n\t\t\t<th>Message</th>\n\t\t\t<th>Important?</th>\n\t\t\t<th>Action</th>\n\t\t\t</tr>";
$add_new = "\n\t\t\t<tr class='even'>\n\t\t\t" . make_form(make_link("blotter/add")) . "\n\t\t\t<td colspan='2'><textarea style='text-align:left;' name='entry_text' rows='2' /></textarea></td>\n\t\t\t<td><input type='checkbox' name='important' /></td>\n\t\t\t<td><input type='submit' value='Add'></td>\n\t\t\t</form>\n\t\t\t</tr>";
// Now, time for entries list.
$table_rows = "";
$num_entries = count($entries);
for ($i = 0; $i < $num_entries; $i++) {
/**
* Add table rows
*/
$id = $entries[$i]['id'];
$entry_date = $entries[$i]['entry_date'];
$entry_text = $entries[$i]['entry_text'];
if ($entries[$i]['important'] == 'Y') {
$important = 'Y';
} else {
$important = 'N';
}
// Add the new table row(s)
$table_rows .= "<tr>\n\t\t\t\t<td>{$entry_date}</td>\n\t\t\t\t<td>{$entry_text}</td>\n\t\t\t\t<td>{$important}</td>\n\t\t\t\t<td><form name='remove{$id}' method='post' action='" . make_link("blotter/remove") . "'>\n\t\t\t\t" . $user->get_auth_html() . "\n\t\t\t\t<input type='hidden' name='id' value='{$id}' />\n\t\t\t\t<input type='submit' style='width: 100%;' value='Remove' />\n\t\t\t\t</form>\n\t\t\t\t</td>\n\t\t\t\t</tr>";
}
$html = "\n\t\t\t<table id='blotter_entries' class='zebra'>\n\t\t\t<thead>{$table_header}</thead>\n\t\t\t<tbody>{$add_new}</tbody>\n\t\t\t<tfoot>{$table_rows}</tfoot>\n\t\t\t</table>\n\n\t\t\t<br />\n\t\t\t<b>Help:</b><br />\n\t\t\t<blockquote>Add entries to the blotter, and they will be displayed.</blockquote>";
return $html;
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:30,代码来源:theme.php
示例4: display_advanced
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));
}
开发者ID:nsuan,项目名称:shimmie2,代码行数:25,代码来源:theme.php
示例5: display_image_banner
public function display_image_banner(Page $page, Image $image)
{
global $config;
$i_image = int_escape($image->id);
$html = "\n\t\t\t" . make_form(make_link("image_report/add")) . "\n\t\t\t\t<input type='hidden' name='image_id' value='{$i_image}'>\n\t\t\t\t<input type='text' name='reason' value='Please enter a reason' onclick='this.value=\"\";'>\n\t\t\t\t<input type='submit' value='Report'>\n\t\t\t</form>\n\t\t";
$page->add_block(new Block("Report Image", $html, "left"));
}
开发者ID:nsuan,项目名称:shimmie2,代码行数:7,代码来源:theme.php
示例6: admin_topics
function admin_topics()
{
global $_GET;
global $_POST;
/*
* Identify and store the submitted form values to be retained and
* re-displayed on the form
*/
$form_attrs['tid'] = $_GET['tid'];
if (!$form_attrs['tid']) {
$form_attrs['tid'] = $_POST['tid'];
}
$form_attrs['title'] = $_POST['title'];
$form_attrs['owner'] = $_POST['owner'];
$form_attrs['role'] = $_POST['role'];
$form_attrs['approved'] = $_POST['approved'];
/*
* Define rules for what database queries should be used
*/
if ($form_attrs['tid']) {
$qry_ary['top_list'] = "SELECT topics.id, users.name as owner, t_role AS t_role, " . "DATE_FORMAT( topics.started, \"%e %b %Y\" ) as opened, " . "topics.name AS title, is_approved " . "FROM topics, users " . "WHERE topics.id = '" . $form_attrs['tid'] . "' " . "AND topics.t_owner = users.id";
}
/*
* Create the form
*/
$form_string = make_form("topics.xml", "", $form_attrs, $qry_ary);
}
开发者ID:slugbucket,项目名称:jrform,代码行数:27,代码来源:doform.php
示例7: display_aliases
/**
* Show a page of aliases.
*
* Note: $can_manage = whether things like "add new alias" should be shown
*
* @param array $aliases An array of ($old_tag => $new_tag)
* @param int $pageNumber
* @param int $totalPages
*/
public function display_aliases($aliases, $pageNumber, $totalPages)
{
global $page, $user;
$can_manage = $user->can("manage_alias_list");
if ($can_manage) {
$h_action = "<th width='10%'>Action</th>";
$h_add = "\n\t\t\t\t<tr>\n\t\t\t\t\t" . make_form(make_link("alias/add")) . "\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 {
$h_action = "";
$h_add = "";
}
$h_aliases = "";
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>";
$h_aliases .= "<tr><td>{$h_old}</td><td>{$h_new}</td>";
if ($can_manage) {
$h_aliases .= "\n\t\t\t\t\t<td>\n\t\t\t\t\t\t" . make_form(make_link("alias/remove")) . "\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<table id='aliases' class='sortable zebra'>\n\t\t\t\t<thead><tr><th>From</th><th>To</th>{$h_action}</tr></thead>\n\t\t\t\t<tbody>{$h_aliases}</tbody>\n\t\t\t\t<tfoot>{$h_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" . make_form(make_link("alias/import"), 'post', true) . "\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 ($can_manage) {
$page->add_block(new Block("Bulk Upload", $bulk_html, "main", 51));
}
$this->display_paginator($page, "alias/list", null, $pageNumber, $totalPages);
}
开发者ID:JarJak,项目名称:shimmie2,代码行数:41,代码来源:theme.php
示例8: plug_microform
function plug_microform($p, $id)
{
$rid = 'mfr' . randid();
//echo $p.'-'.$id;
$nod = ses('mform', ses('qb') . '_microform_' . $id);
req('pop');
ses('mformj', $rid . '_plug___microform_plug*microform_' . ajx($p) . '_' . $id);
reqp('msql');
$msq = new msql('', $nod);
//table
list($p, $tp) = explode('§', $p);
$rb = mform_mr($p);
//p($rb);
$msq->create($rb);
$ret .= make_form($p, 'mfr' . $id, '_plug___microform_mform*j_' . ajx($p, '') . '_' . $id . '_') . br();
if (auth(4)) {
$ret .= msqlink('users', ses('mform')) . ' ' . btn('txtsmall2', $nod) . ' ';
}
if ($tp == 1) {
$ret .= mform_read($id);
} elseif ($tp) {
$ret .= plugin('msqtemplate', $nod, $tp);
}
return divd($rid, $ret . $bt);
}
开发者ID:philum,项目名称:cms,代码行数:25,代码来源:microform.php
示例9: get_voter_html
public function get_voter_html(Image $image, $is_favorited)
{
$i_image_id = int_escape($image->id);
$name = $is_favorited ? "unset" : "set";
$label = $is_favorited ? "Un-Favorite" : "Favorite";
$html = "\n\t\t\t" . make_form(make_link("change_favorite")) . "\n\t\t\t<input type='hidden' name='image_id' value='{$i_image_id}'>\n\t\t\t<input type='hidden' name='favorite_action' value='{$name}'>\n\t\t\t<input type='submit' value='{$label}'>\n\t\t\t</form>\n\t\t";
return $html;
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:8,代码来源:theme.php
示例10: dbq_html
public function dbq_html($terms)
{
$h_terms = html_escape($terms);
$h_reason = "";
if (class_exists("ImageBan")) {
$h_reason = "<input type='text' name='reason' placeholder='Ban reason (leave blank to not ban)'>";
}
$html = make_form(make_link("admin/delete_by_query"), "POST") . "\n\t\t\t\t<input type='button' class='shm-unlocker' data-unlock-sel='#dbqsubmit' value='Unlock'>\n\t\t\t\t<input type='hidden' name='query' value='{$h_terms}'>\n\t\t\t\t{$h_reason}\n\t\t\t\t<input type='submit' id='dbqsubmit' disabled='true' value='Delete All These Images'>\n\t\t\t</form>\n\t\t";
return $html;
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:10,代码来源:theme.php
示例11: display_image_banner
/**
* @param Image $image
* @param array $reporters
*/
public function display_image_banner(Image $image, $reporters)
{
global $page;
$i_image = int_escape($image->id);
$html = "";
if (count($reporters) > 0) {
$html .= "<b>Image reported by " . html_escape(implode(", ", $reporters)) . "</b><p>";
}
$html .= "\n\t\t\t" . make_form(make_link("image_report/add")) . "\n\t\t\t\t<input type='hidden' name='image_id' value='{$i_image}'>\n\t\t\t\t<input type='text' name='reason' placeholder='Please enter a reason'>\n\t\t\t\t<input type='submit' value='Report'>\n\t\t\t</form>\n\t\t";
$page->add_block(new Block("Report Image", $html, "left"));
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:15,代码来源:theme.php
示例12: display_new_post_composer
public function display_new_post_composer(Page $page, $threadID)
{
global $config;
$max_characters = $config->get_int('forumMaxCharsPerPost');
$html = make_form(make_link("forum/answer"));
$html .= '<input type="hidden" name="threadID" value="' . $threadID . '" />';
$html .= "\n\t\t\t\t<table style='width: 500px;'>\n\t\t\t\t\t<tr><td>Message:</td><td><textarea id='message' name='message' ></textarea>\n\t\t\t\t\t<tr><td></td><td><small>Max characters alowed: {$max_characters}.</small></td></tr>\n\t\t\t\t\t</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 = "Answer to this thread";
$page->add_block(new Block($blockTitle, $html, "main", 130));
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:11,代码来源:theme.php
示例13: display_form
public function display_form(Page $page)
{
global $user;
$html = "\n\t\t\t" . make_form(make_link("admin_utils")) . "\n\t\t\t\t<select name='action'>\n\t\t\t\t\t<option value='lowercase all tags'>All tags to lowercase</option>\n\t\t\t\t\t<option value='recount tag use'>Recount tag use</option>\n\t\t\t\t\t<option value='purge unused tags'>Purge unused tags</option>\n\t\t\t\t\t<option value='database dump'>Download database contents</option>\n\t\t\t\t\t<!--<option value='convert to innodb'>Convert database to InnoDB (MySQL only)</option>-->\n\t\t\t\t</select>\n\t\t\t\t<input type='submit' value='Go'>\n\t\t\t</form>\n\t\t";
$page->add_block(new Block("Misc Admin Tools", $html));
/* First check
Requires you to click the checkbox to enable the delete by query form */
$dbqcheck = "\n\t\t\tif(document.getElementById("dbqcheck").checked == false){\n\t\t\t\tdocument.getElementById("dbqtags").disabled = true;\n\t\t\t\tdocument.getElementById("dbqsubmit").disabled = true;\n\t\t\t}else{\n\t\t\t\tdocument.getElementById("dbqtags").disabled = false;\n\t\t\t\tdocument.getElementById("dbqsubmit").disabled = false;\n\t\t\t}";
/* Second check
Requires you to confirm the deletion by clicking ok. */
$html = "\n\t\t\t<script type='text/javascript'>\n\t\t\tfunction checkform(){\n\t\t\t\tif(confirm('Are you sure you wish to delete all images using these tags?')){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t</script>" . make_form(make_link("admin_utils"), "post", false, false, "return checkform()") . "\n\t\t\t\t<input type='checkbox' id='dbqcheck' name='action' onclick='{$dbqcheck}'>\n\t\t\t\t<input type='hidden' name='action' value='delete by query'>\n\t\t\t\t<input type='text' id='dbqtags' disabled='true' name='query'>\n\t\t\t\t<input type='submit' id='dbqsubmit' disabled='true' value='Go'>\n\t\t\t</form>\n\t\t";
$page->add_block(new Block("Delete by Query", $html));
}
开发者ID:nsuan,项目名称:shimmie2,代码行数:13,代码来源:theme.php
示例14: display_resize_page
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));
}
开发者ID:nsuan,项目名称:shimmie2,代码行数:13,代码来源:theme.php
示例15: create_display_html
protected function create_display_html(WikiPage $page)
{
$owner = $page->get_owner();
$tfe = new TextFormattingEvent($page->body);
send_event($tfe);
global $user;
$edit = "<table><tr>";
$edit .= Wiki::can_edit($user, $page) ? "\n\t\t\t\t<td>" . make_form(make_link("wiki_admin/edit")) . "\n\t\t\t\t\t<input type='hidden' name='title' value='" . html_escape($page->title) . "'>\n\t\t\t\t\t<input type='hidden' name='revision' value='" . int_escape($page->revision) . "'>\n\t\t\t\t\t<input type='submit' value='Edit'>\n\t\t\t\t</form></td>\n\t\t\t" : "";
if ($user->is_admin()) {
$edit .= "\n\t\t\t\t<td>" . make_form(make_link("wiki_admin/delete_revision")) . "\n\t\t\t\t\t<input type='hidden' name='title' value='" . html_escape($page->title) . "'>\n\t\t\t\t\t<input type='hidden' name='revision' value='" . int_escape($page->revision) . "'>\n\t\t\t\t\t<input type='submit' value='Delete This Version'>\n\t\t\t\t</form></td>\n\t\t\t\t<td>" . make_form(make_link("wiki_admin/delete_all")) . "\n\t\t\t\t\t<input type='hidden' name='title' value='" . html_escape($page->title) . "'>\n\t\t\t\t\t<input type='submit' value='Delete All'>\n\t\t\t\t</form></td>\n\t\t\t";
}
$edit .= "</tr></table>";
return "\n\t\t\t<div class='wiki-page'>\n\t\t\t{$tfe->formatted}\n\t\t\t<hr>\n\t\t\t<p class='wiki-footer'>\n\t\t\t\tRevision {$page->revision}\n\t\t\t\tby <a href='" . make_link("user/{$owner->name}") . "'>{$owner->name}</a>\n\t\t\t\tat {$page->date}\n\t\t\t\t{$edit}\n\t\t\t</p>\n\t\t\t</div>\n\t\t";
}
开发者ID:nsuan,项目名称:shimmie2,代码行数:14,代码来源:theme.php
示例16: manageTips
public function manageTips($url, $images)
{
global $page;
$select = "<select name='image'><option value=''>- Select Image -</option>";
foreach ($images as $image) {
$select .= "<option style='background-image:url(" . $url . $image . "); background-repeat:no-repeat; padding-left:20px;' value=\"" . $image . "\">" . $image . "</option>\n";
}
$select .= "</select>";
$html = "\n" . make_form(make_link("tips/save")) . "\n<table>\n <tr>\n <td>Enable:</td>\n <td><input name='enable' type='checkbox' value='Y' checked/></td>\n </tr>\n <tr>\n <td>Image:</td>\n <td>{$select}</td>\n </tr>\n <tr>\n <td>Message:</td>\n <td><textarea name='text'></textarea></td>\n </tr>\n <tr>\n <td colspan='2'><input type='submit' value='Submit' /></td>\n </tr>\n</table>\n</form>\n";
$page->set_title("Tips List");
$page->set_heading("Tips List");
$page->add_block(new NavBlock());
$page->add_block(new Block("Add Tip", $html, "main", 10));
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:14,代码来源:theme.php
示例17: get_resize_html
public function get_resize_html(Image $image)
{
global $config;
$default_width = $config->get_int('resize_default_width');
$default_height = $config->get_int('resize_default_height');
if (!$default_width) {
$default_width = $image->width;
}
if (!$default_height) {
$default_height = $image->height;
}
$html = "\n\t\t\t" . make_form(make_link("resize/{$image->id}"), 'POST') . "\n\t\t\t\t<input type='hidden' name='image_id' value='{$image->id}'>\n\t\t\t\t<input id='original_width' name='original_width' type='hidden' value='{$image->width}'>\n\t\t\t\t<input id='original_height' name='original_height' type='hidden' value='{$image->height}'>\n\t\t\t\t<input id='resize_width' style='width: 70px;' name='resize_width' type='number' min='1' value='" . $default_width . "'> x\n\t\t\t\t<input id='resize_height' style='width: 70px;' name='resize_height' type='number' min='1' value='" . $default_height . "'>\n\t\t\t\t<br><label><input type='checkbox' id='resize_aspect' name='resize_aspect' style='max-width: 20px;' checked='checked'> Keep Aspect</label>\n\t\t\t\t<br><input id='resizebutton' type='submit' value='Resize'>\n\t\t\t</form>\n\t\t";
return $html;
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:14,代码来源:theme.php
示例18: display_admin_block
/**
* Add a section to the admin page.
* @param string $validation_msg
*/
public function display_admin_block($validation_msg = '')
{
global $page;
if (!empty($validation_msg)) {
$validation_msg = '<br><b>' . $validation_msg . '</b>';
}
$html = '
Revert source changes/edit by a specific IP address or username.
<br>You can restrict the time frame to revert these edits as well.
<br>(Date format: 2011-10-23)
' . $validation_msg . '
<br><br>' . make_form(make_link("source_history/bulk_revert"), 'POST') . "\n\t\t\t\t<table class='form'>\n\t\t\t\t\t<tr><th>Username</th> <td><input type='text' name='revert_name' size='15'></td></tr>\n\t\t\t\t\t<tr><th>IP Address</th> <td><input type='text' name='revert_ip' size='15'></td></tr>\n\t\t\t\t\t<tr><th>Date range</th> <td><input type='text' name='revert_date' size='15'></td></tr>\n\t\t\t\t\t<tr><td colspan='2'><input type='submit' value='Revert'></td></tr>\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t";
$page->add_block(new Block("Mass Source Revert", $html));
}
开发者ID:JarJak,项目名称:shimmie2,代码行数:19,代码来源:theme.php
示例19: display_bans
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));
}
开发者ID:thelectronicnub,项目名称:shimmie2,代码行数:15,代码来源:theme.php
示例20: build_info
protected function build_info(Image $image, $editor_parts)
{
global $user;
if (count($editor_parts) == 0) {
return $image->is_locked() ? "<br>[Image Locked]" : "";
}
$html = make_form(make_link("post/set")) . "\n\t\t\t\t\t<input type='hidden' name='image_id' value='{$image->id}'>\n\t\t\t\t\t<table style='width: 500px;' class='image_info form'>\n\t\t";
foreach ($editor_parts as $part) {
$html .= $part;
}
if ((!$image->is_locked() || $user->can("edit_image_lock")) && $user->can("edit_image_tag")) {
$html .= "\n\t\t\t\t\t\t<tr><td colspan='4'>\n\t\t\t\t\t\t\t<input class='view' type='button' value='Edit' onclick='\$(\".view\").hide(); \$(\".edit\").show();'>\n\t\t\t\t\t\t\t<input class='edit' type='submit' value='Set'>\n\t\t\t\t\t\t</td></tr>\n\t\t\t";
}
$html .= "\n\t\t\t\t\t</table>\n\t\t\t\t</form>\n\t\t";
return $html;
}
开发者ID:JarJak,项目名称:shimmie2,代码行数:16,代码来源:theme.php
注:本文中的make_form函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论