当前位置: 首页>>代码示例>>PHP>>正文


PHP make_form函数代码示例

本文整理汇总了PHP中make_form函数的典型用法代码示例。如果您正苦于以下问题:PHP make_form函数的具体用法?PHP make_form怎么用?PHP make_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了make_form函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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(&quot;dbqcheck&quot;).checked == false){\n\t\t\t\tdocument.getElementById(&quot;dbqtags&quot;).disabled = true;\n\t\t\t\tdocument.getElementById(&quot;dbqsubmit&quot;).disabled = true;\n\t\t\t}else{\n\t\t\t\tdocument.getElementById(&quot;dbqtags&quot;).disabled = false;\n\t\t\t\tdocument.getElementById(&quot;dbqsubmit&quot;).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


注:本文中的make_form函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。