• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP format_html函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了format_html函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _create_key_tree

 /**
  *
  * 建树
  * @param unknown_type $item
  * @param unknown_type $name
  * @param unknown_type $full_key
  * @param unknown_type $is_last
  * @param unknown_type $return_html
  */
 private function _create_key_tree($item, $name, $full_key, $is_last, &$return_html)
 {
     $this->_nowLevel = $full_key !== '' ? count(explode(SEPERATOR, $full_key)) : 0;
     $this->_create_key_tree_head($item, $name, $full_key, $is_last, $return_html);
     if (count($item) > 0) {
         $tree_sub2 = array();
         if ($full_key != $this->_sub_key) {
             //因为dom的ID不能包含冒号: 所以将:替换为___
             $tree_sub2[] = '<li class="folder' . (empty($full_key) ? '' : ' collapsed') . ($is_last ? ' last' : '') . '" title="' . urlencode($full_key) . '" id="keyid_' . str_replace(SEPERATOR, '___', $full_key) . '">';
             $tree_sub2[] = '<div class="icon">' . format_html($name) . '&nbsp;<span class="info">(' . count($item) . ')</span>';
             $tree_sub2[] = !empty($full_key) ? '<a href="#" class="refresh" onclick="return refreshTree(this)"><img src="' . base_url('static/images/refresh.png') . '" width="10" height="10" title="刷新当前节点" alt="[X]"></a>' : '';
             $tree_sub2[] = !empty($full_key) ? '<a href="' . manager_site_url('export', 'index', 'key=' . urlencode($full_key) . ':*') . '" class="export"><img src="' . base_url('static/images/export.png') . '" width="10" height="10" title="导出当前节点" alt="[X]"></a>' : '';
             $tree_sub2[] = !empty($full_key) ? '<a href="' . manager_site_url('delete', 'index', 'tree=' . urlencode($full_key) . ':') . '" class="deltree"><img src="' . base_url('static/images/delete.png') . '" width="10" height="10" title="删除整个树" alt="[X]"></a>' : '';
             $tree_sub2[] = '</div>';
         }
         $tree_sub2[] = '<ul>';
         $return_html[] = implode(PHP_EOL, $tree_sub2);
         if ($this->_nowLevel < $this->_auto_build_tree_level && is_array($item)) {
             $l = count($item);
             foreach ($item as $childname => $childitem) {
                 if (empty($full_key)) {
                     $childfullkey = $childname;
                 } else {
                     $childfullkey = $full_key . SEPERATOR . $childname;
                 }
                 $this->_create_key_tree($childitem, $childname, $childfullkey, --$l == 0, $return_html);
             }
         }
         $return_html[] = '</ul>';
         if ($full_key != $this->_sub_key) {
             $return_html[] = '</li>';
         }
     }
 }
开发者ID:RyeZhu,项目名称:RedisMyAdmin,代码行数:43,代码来源:key.php


示例2: stripslashes

                                                                <td colspan=2>

                                                                    <b><?php 
    echo stripslashes($row["vKBTitle"]);
    ?>
</b>
                                                                </td>

                                                            </tr>
                                                            <tr align="left"  class="listingmaintext">
                                                                <td colspan=2>
                                                                        <?php 
    ?>
<?PHP// echo format_html(nl2br(htmlentities($row["tKBDesc"]))); ?>
                                                                        <?php 
    echo format_html(nl2br(stripslashes($row["tKBDesc"])));
    ?>
                                                                </td>
                                                            </tr>
                                                            <tr align="left"  class="listingmaintext">
                                                                <td colspan="5" class="dotedhoriznline" height="1"><img src="./images/spacerr.gif" width="1" height="1"></td>
                                                            </tr>
                                                                <?php 
    $cnt++;
}
mysql_free_result($rs);
?>
                                                            <tr   class="listingmaintext">
                                                                <td align="left" width="30%"><?php 
echo $navigate[1] . "&nbsp;" . TEXT_OF . "&nbsp;" . $totalrows . "&nbsp;" . TEXT_RESULTS;
?>
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:showkb.php


示例3: format_html

?>

<?php 
/* Disable phone number detection on apple devices. */
?>
<meta name=format-detection content="telephone=no">

<?php 
/* I don't think we ever want this to be indexed*/
?>
<meta name=robots content="noindex,nofollow,noarchive">

<meta name=author content="https://github.com/ErikDubbelboer/">

<title><?php 
echo format_html($server['host']);
?>
 - phpRedisAdmin</title>

<?php 
foreach ($page['css'] as $css) {
    ?>
<link rel=stylesheet href="css/<?php 
    echo $css;
    ?>
.css?v1" media=all>
<?php 
}
?>

<link rel="shortcut icon" href="images/favicon.png">
开发者ID:emilymwang8,项目名称:dev_autointo,代码行数:31,代码来源:header.inc.php


示例4: db_query

<?php

include "../../include.php";
if ($posting) {
    $theuser_id = $page['is_admin'] ? $_POST["created_user"] : $_SESSION["user_id"];
    db_query("UPDATE press_releases SET\n\t\t\theadline       = '{$_POST["headline"]}',\t\n\t\t\tdetail         = '{$_POST["detail"]}',\t\n\t\t\tlocation       = '{$_POST["location"]}',\t\n\t\t\ttext           = '" . format_html($_POST["text"]) . "',\t\n\t\t\tcorporationID = {$_POST["corporationID"]},\n\t\t\tupdated_date     = GETDATE(),\n\t\t\tupdated_user     = {$theuser_id}\n\t\t\tWHERE id = " . $_GET["id"]);
    url_change("../?id=" . $_GET["id"]);
}
echo drawTop();
$r = db_grab("SELECT id, headline, detail, location, releaseDate, corporationID, text FROM press_releases WHERE id = " . $_GET["id"]);
$form = new intranet_form();
if ($page['is_admin']) {
    $form->addUser("created_user", "Posted By", $_SESSION["user_id"], false, "EEDDCC");
}
$form->addRow("itext", "Headline", "headline", $r["headline"], "", true, 255);
$form->addRow("itext", "Detail", "detail", $r["detail"], "", false, 255);
$form->addRow("itext", "Location", "location", $r["location"], "", true, 255);
$form->addRow("select", "Organization", "corporationID", "SELECT id, title from organizations ORDER BY title", $r["corporationID"]);
$form->addRow("date", "Date", "releaseDate", $r["releaseDate"]);
$form->addRow("textarea", "Text", "text", $r["text"], "", true);
$form->addRow("submit", "update press release");
$form->draw("Update Release");
echo drawBottom();
开发者ID:Rhenan,项目名称:intranet-1,代码行数:23,代码来源:edit.php


示例5: isset

<p id="scorep">
<label for="score">Score:</label>
<input type="text" name="score" id="score" size="30" <?php 
echo isset($_GET['score']) ? 'value="' . format_html($_GET['score']) . '"' : '';
?>
>
</p>

<p>
<label for="value">Value:</label>
<textarea name="value" id="value" cols="80" rows="20"><?php 
echo nl2br(format_html($value));
?>
</textarea>
</p>

<input type="hidden" name="oldvalue" value="<?php 
echo format_html($value);
?>
">

<p>
<input type="submit" class="button" value="<?php 
echo $edit ? 'Edit' : 'Add';
?>
">
</p>

</form>
<?php 
require 'footer.inc.php';
开发者ID:ruurd,项目名称:phpRedisAdmin,代码行数:31,代码来源:edit.php


示例6: isset

<?php

PagerWidget::header();
?>
<h2>
	导出数据
	<?php 
echo isset($key) ? format_html($key) : '';
?>
</h2>
<form action="" method="post">
	<p>
		<label for="type">数据格式:</label>
		<select name="type" id="type">
			<option value="redis" <?php 
echo isset($type) && $type == 'redis' ? 'selected="selected"' : '';
?>
>Redis</option>
			<option value="json"  <?php 
echo isset($type) && $type == 'json' ? 'selected="selected"' : '';
?>
>JSON</option>
		</select>
	</p>
	<p>
		<input type="submit" class="button" value="导出">
	</p>
</form>

<?php 
PagerWidget::footer();
开发者ID:RyeZhu,项目名称:RedisMyAdmin,代码行数:31,代码来源:export.php


示例7: print_namespace

function print_namespace($item, $name, $fullkey, $islast) {
  global $config, $redistypes, $server, $redis;

  // Is this also a key and not just a namespace?
  if (isset($item['__phpredisadmin__'])) {
    // Unset it so we won't loop over it when printing this namespace.
    unset($item['__phpredisadmin__']);

    $type = $redis->type($fullkey);

    if (!isset($redistypes[$type])) {
      return;
    }

    $type  = $redistypes[$type];
    $class = array();
    $len   = false;

    if (isset($_GET['key']) && ($fullkey == $_GET['key'])) {
      $class[] = 'current';
    }
    if ($islast) {
      $class[] = 'last';
    }

    // Get the number of items in the key.
    if (!isset($config['faster']) || !$config['faster']) {
      switch ($type) {
        case 'hash':
          $len = $redis->hLen($fullkey);
          break;

        case 'list':
          $len = $redis->lSize($fullkey);
          break;

        case 'set':
          // This is currently the only way to do this, this can be slow since we need to retrieve all keys
          $len = count($redis->sMembers($fullkey));
          break;

        case 'zset':
          // This is currently the only way to do this, this can be slow since we need to retrieve all keys
          $len = count($redis->zRange($fullkey, 0, -1));
          break;
      }
    }


    ?>
    <li<?php echo empty($class) ? '' : ' class="'.implode(' ', $class).'"'?>>
    <a href="?view&amp;s=<?php echo $server['id']?>&amp;key=<?php echo urlencode($fullkey)?>"><?php echo format_html($name)?><?php if ($len !== false) { ?><span class="info">(<?php echo $len?>)</span><?php } ?></a>
    </li>
    <?php
  }
  
  // Does this namespace also contain subkeys?
  if (count($item) > 0) {
    ?>
    <li class="folder<?php echo empty($fullkey) ? '' : ' collapsed'?><?php echo $islast ? ' last' : ''?>"><div class="icon"><?php echo format_html($name)?> <span class="info">(<?php echo count($item)?>)</span></div>
    <ul>
    <?php

    $l = count($item);

    foreach ($item as $childname => $childitem) {
      // $fullkey will be empty on the first call.
      if (empty($fullkey)) {
        $childfullkey = $childname;
      } else {
        $childfullkey = $fullkey.$config['seperator'].$childname;
      }

      print_namespace($childitem, $childname, $childfullkey, (--$l == 0));
    }

    ?>
    </ul>
    </li>
    <?php
  }
}
开发者ID:r043v,项目名称:phpRedisAdmin,代码行数:82,代码来源:index.php


示例8: _public_add_info

    function _public_add_info($type = 'bbs')
    {
        $info = $this->_article_info();
        if (!$info) {
            return;
        }
        if ($type == 'bbs') {
            require_once libfile('function/editor');
            $info['content'] = dstripslashes($info['content']);
            $info['content'] = img_htmlbbcode($info['content'], $info['page_url']);
            $info['content'] = media_htmlbbcode($info['content'], $info['page_url']);
            $info['content'] = audio_htmlbbcode($info['content'], $info['page_url']);
            $info['content'] = htmlspecialchars_decode(html2bbcode($info['content']));
            $info['content'] = dstripslashes(format_html($info['content']));
            $script .= '<div id="show_title" style="display:none">' . $info['title'] . '</div><div id="show_content" style="display:none">' . $info['content'] . '</div><script language="javascript" type="text/javascript" >';
            $script .= '
					var subject = $("show_title").innerHTML;
					var message = $("show_content").innerHTML;
					$("subject").value= subject;
					message = message.replace(/<p>([\\s\\S]*?)<\\/p>/ig, "$1<br />");
					message = message.replace(/<center>([\\s\\S]*?)<\\/center>/ig, "[align=center]$1[/align]");
					$(\'e_textarea\').value = message;
					$("subject").focus();';
            $script .= '</script>';
        } else {
            if ($type == 'portal') {
                $script .= '<div id="show_title" style="display:none">' . $info['title'] . '</div><div id="show_content" style="display:none">' . $info['content'] . '</div><script language="javascript" type="text/javascript" >';
                $script .= '
					var subject = $("show_title").innerHTML;
					var message = $("show_content").innerHTML;
					$("title").value= subject;
					$("from").value= \'' . $this->_public_data($info['from']) . '\';
					document.getElementsByName(\'fromurl\')[0].value = \'' . $this->_public_data($info['url']) . '\';
					document.getElementsByName(\'author\')[0].value = \'' . $this->_public_data($info['author']) . '\';
					$(\'uchome-ttHtmlEditor\').value  = message;
					var p = window.frames[\'uchome-ifrHtmlEditor\'];
					var obj = p.window.frames[\'HtmlEditor\'];
					obj.document.body.innerHTML = message;
					edit_save();
					$("title").focus()';
                $script .= '</script>';
            } else {
                if ($type == 'blog') {
                    $script .= '<div id="show_title" style="display:none">' . $info['title'] . '</div><div id="show_content" style="display:none">' . $info['content'] . '</div><script language="javascript" type="text/javascript" >';
                    $script .= '
					var subject = $("show_title").innerHTML;
					var message = $("show_content").innerHTML;
					$("subject").value= subject;
					document.getElementsByName(\'tag\')[0].value = \'' . $this->_public_data($info['article_tag']) . '\';
					$(\'uchome-ttHtmlEditor\').value  = message;
					var p = window.frames[\'uchome-ifrHtmlEditor\'];
					var obj = p.window.frames[\'HtmlEditor\'];
					obj.document.body.innerHTML = message;
					edit_save();
					$("subject").focus()';
                    $script .= '</script>';
                }
            }
        }
        return $script;
    }
开发者ID:edmundwong,项目名称:V604,代码行数:61,代码来源:milu_pick.class.php


示例9: output_update_html

function output_update_html($token, $status, $done, $cancelled, $failed, $err, $errs, $errs_admin = false, $ajax = false)
{
    global $fups_url_cancel, $fups_url_notify_email_address, $fups_url_run;
    if ($err) {
        ?>
			<div class="fups_error"><?php 
        echo format_html($err);
        ?>
</div>
<?php 
        return;
    }
    ?>
			<h3>Status</h3>

			<div id="fups_div_status">
<?php 
    echo htmlspecialchars($status);
    ?>
			</div>

<?php 
    if ($done) {
        $output_info = json_decode(file_get_contents(make_output_info_filename($token)), true);
        if ($output_info == null) {
            ?>
			<p>We are sorry, but an unexpected error occurred. The scraping process completed, and the output was created, however we were unable to decode the list of output files. Please feel free to <a href="<?php 
            echo FUPS_CONTACT_URL;
            ?>
">contact me</a> for help with accessing your output files, quoting token "<?php 
            echo $token;
            ?>
".</p>
<?php 
        } else {
            ?>
			<p>Success! Your posts were retrieved and the output is ready. The following output files are available:</p>

			<table style="border-collapse: collapse;">
				<tr><th style="border: 1px solid black;">Description</th><th style="border: 1px solid black;">View/download file (opens in a new window)</th><th style="border: 1px solid black;">File size</th></tr>
<?php 
            foreach ($output_info as $opv) {
                ?>
				<tr><td style="border: 1px solid black;"><?php 
                echo $opv['description'];
                ?>
</td><td style="border: 1px solid black;"><a target="_blank" href="<?php 
                echo $opv['url'];
                ?>
">View/download file</a></td><td style="border: 1px solid black;"><?php 
                echo number_format($opv['size']) . ' bytes';
                ?>
</td></tr>
<?php 
            }
            ?>
			</table>

			<p>If you're wondering what to do next, here are some possible steps:</p>
			<ol>
				<li>Click on the "View/download file" link beside the HTML file which is sorted according to your preference. This will open up a new window/tab for that file. Switch to this window/tab if necessary, and then save the page, e.g. in Firefox click the "File" menu option and under that click "Save Page As". Select the directory/folder and filename you wish to save this output as (remember this location for the next step).</li>
				<li>Start up a word processor such as LibreOffice/OpenOffice or Microsoft Word. Open up in that word processor the HTML file that you saved in the previous step, e.g. click the "File" menu option and under that click "Open", then select the file you saved in the previous step. You are now free to edit the file as you like. You can now (if you so desire) save the file in a friendlier format than HTML, a format such as your editor's default format, e.g. in LibreOffice, click the "File" menu option and then click "Save As" or "Export", and choose the format you desire.</li>
			</ol>
<?php 
            show_delete($token, true);
        }
    } else {
        if ($cancelled) {
            ?>
			<p>Cancelled by your request.</p>
<?php 
            show_delete($token, false);
        } else {
            if ($failed) {
                ?>
			<p>The script appears to have exited due to an error; the error message is shown below. I have been notified of this error by email; if you would like me to get back to you if/when I have fixed the error, then please enter your email address into the following box and press the button to notify me of it.</p>

			<div>
				<form method="post" action="<?php 
                echo $fups_url_notify_email_address;
                ?>
">
					<input type="hidden" name="token" value="<?php 
                echo $token;
                ?>
" />
					<label for="email_address.id">Your contact email address:</label><br />
					<input type="text" name="email_address" id="email_address.id" /><br />
					<label for="message.id">Any message you'd like to include (leaving this blank is fine):</label><br />
					<textarea rows="5" cols="80" name="message" id="message.id"></textarea><br />
					<input type="submit" value="Notify the FUPS maintainer" />
				</form>
			</div>

			<p>Alternatively, feel free to retry or to <a href="<?php 
                echo FUPS_CONTACT_URL;
                ?>
">contact me</a> manually about this error, quoting your run token of "<?php 
                echo $token;
                ?>
//.........这里部分代码省略.........
开发者ID:ezeql,项目名称:fups,代码行数:101,代码来源:common.php


示例10: format_post_bits

<?php

include "../include.php";
if ($posting) {
    format_post_bits("isAdmin,temporary");
    $_POST["description"] = format_html($_POST["description"]);
    db_enter("bulletin_board_topics", "title description isAdmin temporary");
    //db_query("UPDATE bulletin_board_topics SET threadDate = GETDATE() WHERE id = " . $_GET["id"]); don't do this
    syndicateBulletinBoard();
    url_change("topic.php?id=" . $_GET["id"]);
}
drawTop();
$t = db_grab("SELECT title, description, isAdmin, temporary, createdBy FROM bulletin_board_topics WHERE id = " . $_GET["id"]);
$form = new intranet_form();
if ($isAdmin) {
    $form->addUser("createdBy", "Posted By", $t["createdBy"], false, true);
    $form->addCheckbox("isAdmin", "Admin Post?", $t["isAdmin"], "(check if yes)", true);
}
$form->addCheckbox("temporary", "Lifespan", $t['temporary'], "Check Box to Delete Post After 30 Days");
$form->addRow("itext", "Subject", "title", $t["title"], "", true);
$form->addRow("textarea", "Message", "description", $t["description"], "", true);
$form->addRow("submit", "edit topic");
$form->draw("Edit Bulletin Board Topic");
drawBottom();
开发者ID:joshreisner,项目名称:hcfa-cc,代码行数:24,代码来源:edit.php


示例11: format_html

<?php

PagerWidget::header();
?>
<h2>重命名
	<?php 
echo format_html($key);
?>
</h2>
<form action="" method="post">
	<input type="hidden" name="old" value="<?php 
echo format_html($key);
?>
">
	<p>
		<label for="key">Key:</label>
		<input type="text" name="key" id="key" size="30"value="<?php 
echo format_html($key);
?>
">
	</p>
	<p>
		<input type="submit" class="button" value="重命名">
	</p>
</form>

<?php 
PagerWidget::footer();
开发者ID:RyeZhu,项目名称:RedisMyAdmin,代码行数:28,代码来源:rename.php


示例12: if

?><!DOCTYPE html>
<html lang=en>
<head>
<meta charset=utf-8>

<?php if (is_ie()) {
  // Always force latest IE rendering engine and chrome frame (also hides compatibility mode button)
  ?><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><?php
} ?>

<meta name=author content="https://github.com/ErikDubbelboer/">

<?php /* I don't think we ever want this to be indexed*/ ?>
<meta name=robots content="noindex,nofollow,noarchive">

<title><?php echo format_html($server['host'])?> - phpRedisAdmin</title>

<?php foreach ($page['css'] as $css) { ?>
<link rel=stylesheet href="css/<?php echo $css; ?>.css?v1" media=all>
<?php } ?>

<link rel="shortcut icon" href="images/favicon.png">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>

<?php foreach ($page['js'] as $js) { ?>
<script src="js/<?php echo $js; ?>.js?v1"></script>
<?php } ?>

</head>
<body>
开发者ID:r043v,项目名称:phpRedisAdmin,代码行数:31,代码来源:header.inc.php


示例13: format_post_html

function format_post_html($fieldnames)
{
    //takes a comma-separated list of POST keys and formats the html in them
    global $_POST;
    $fields = array_post_fields($fieldnames);
    foreach ($fields as $field) {
        $return = format_html($_POST[$field]);
        $_POST[$field] = empty($return) ? "NULL" : "'" . $_POST[$field] . "'";
    }
}
开发者ID:joshreisner,项目名称:hcfa-cc,代码行数:10,代码来源:format.php


示例14: main

/**
 * Main Function
 *
 * @access public
 * @param int $argc The number of command line arguments
 * @param array &$argv The command line arguments
 * @uses $GLOBALS['SOURCEKIND']
 * @uses downwiki()
 * @uses downhtml()
 * @uses downattach()
 */
function main($argc, &$argv)
{
    if ($argc < 2) {
        $help = '';
        $help .= '$ php pkwkdownloader.php [option...] pkwkurl' . "\n";
        $help .= '$ php pkwkdownloader.php --format [option...] pkwkurl' . "\n";
        $help .= 'Examples)' . "\n";
        $help .= '$ php pkwkdownloader.php -p [adminpass] -un [read username] -up [read userpass] -k html -d html/ http://example.com/pukiwiki/index.php' . "\n";
        $help .= '$ php pkwkdownloader.php -p [adminpass] -un [read username] -up [read userpass] -k wiki -d wiki/ http://example.com/pukiwiki/index.php' . "\n";
        $help .= '$ php pkwkdownloader.php -p [adminpass] -un [read username] -up [read userpass] -k attach -d attach/ http://example.com/pukiwiki/index.php' . "\n";
        $help .= '$ php pkwkdownloader.php --format -d html/ -s relative http://example.com/pukiwiki/index.php' . "\n";
        $help .= 'Please see http://lsx.sourceforge.jp/?pkwkdownloader.php for further details' . "\n";
        $help .= 'NOTE: PukiWiki Plus! requires adminpss always. This must be fixed in the future.' . "\n";
        print $help;
        exit;
    }
    while (($arg = next($argv)) !== FALSE) {
        // skip $argv[0]
        switch ($arg) {
            case '-d':
            case '--directory-prefix':
                $GLOBALS['DOWNDIR'] = next($argv);
                if (strrpos($GLOBALS['DOWNDIR'], '/') !== strlen($GLOBALS['DOWNDIR']) - 1) {
                    $GLOBALS['DOWNDIR'] .= '/';
                }
                break;
            case '-k':
            case '--kind':
                $GLOBALS['SOURCEKIND'] = next($argv);
                break;
            case '-c':
            case '--continue':
                $GLOBALS['CONTINUE'] = TRUE;
                break;
            case '-w':
            case '--waittime':
                $GLOBALS['WAITTIME'] = next($argv);
                break;
            case '-p':
            case '--password':
                $GLOBALS['ADMINPASS'] = next($argv);
                break;
            case '-un':
            case '--username':
                $GLOBALS['USERNAME'] = next($argv);
                break;
            case '-up':
            case '--userpass':
                $GLOBALS['USERPASS'] = next($argv);
                break;
            case '-g':
            case '--filter':
                $GLOBALS['FILTER'] = next($argv);
                break;
            case '-v':
            case '--except':
                $GLOBALS['EXCEPT'] = next($argv);
                break;
            case '-m':
            case '--format':
                $GLOBALS['FORMAT'] = TRUE;
                break;
            case '-s':
            case '-=urlstyle':
                $GLOBALS['URLSTYLE'] = next($argv);
                break;
            case '-e':
            case '--encode':
                $GLOBALS['ENCODE'] = next($argv);
                break;
            case '-p':
            case '-publichome':
                $GLOBALS['PUBLICHOME'] = next($argv);
                break;
            default:
                $GLOBALS['PKWKURL'] = $arg;
                $GLOBALS['PKWKBASEURL'] = substr($GLOBALS['PKWKURL'], 0, strrpos($GLOBALS['PKWKURL'], '/')) . '/';
                break;
        }
    }
    if ($GLOBALS['PKWKURL'] === '') {
        print 'No PukiWiki Top URL was specified. exit. ';
        exit;
    }
    if ($GLOBALS['FORMAT']) {
        format_html();
        exit;
    }
    switch ($GLOBALS['SOURCEKIND']) {
//.........这里部分代码省略.........
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:101,代码来源:pkwkdownloader.php


示例15: db_query

<?php

include "../../include.php";
if (url_action("delete")) {
    db_query("UPDATE press_releases SET \n\t\t\t\tdeleted_date = GETDATE(),\n\t\t\t\tdeleted_user = {$_SESSION["user_id"]},\n\t\t\t\tis_active = 0\n\t\t\tWHERE id = " . $_GET["id"]);
    url_drop();
} elseif ($posting) {
    $theuser_id = $page['is_admin'] ? $_POST["created_user"] : $_SESSION["user_id"];
    db_query("INSERT INTO press_releases (\n\t\theadline,\n\t\tdetail,\n\t\tlocation,\n\t\treleaseDate,\n\t\ttext,\n\t\tcorporationID,\n\t\tcreated_date,\n\t\tcreated_user,\n\t\tis_active\n\t) VALUES (\n\t\t'" . $_POST["headline"] . "',\n\t\t'" . $_POST["detail"] . "',\n\t\t'" . $_POST["location"] . "',\n\t\t" . format_post_date("releaseDate") . ",\n\t\t'" . format_html($_POST["text"]) . "',\n\t\t" . $_POST["corporationID"] . ",\n\t\tGETDATE(),\n\t\t" . $theuser_id . ",\n\t\t1\n\t)");
    url_change();
}
echo drawTop();
if (url_id()) {
    $r = db_grab("SELECT\n\t\t\theadline,\n\t\t\tdetail,\n\t\t\tlocation,\n\t\t\ttext,\n\t\t\treleaseDate\n\t\tFROM press_releases\n\t\tWHERE id = " . $_GET["id"]);
    ?>
	<table class="left" cellspacing="1">
		<?php 
    if ($page['is_admin']) {
        echo drawHeaderRow("Press Release", 1, "edit", "edit/?id=" . $_GET["id"]);
    } else {
        echo drawHeaderRow("Press Release", 1);
    }
    ?>
		<tr>
			<td style="padding:20px;" class="text">
				<h1><?php 
    echo $r["headline"];
    ?>
</h1>
				<b><?php 
    echo $r["detail"];
开发者ID:Rhenan,项目名称:intranet-1,代码行数:31,代码来源:index.php


示例16: print_namespace

    function print_namespace($item, $name, $fullkey, $islast)
    {
        global $config, $server, $redis;
        // Is this also a key and not just a namespace?
        if (isset($item['__phpredisadmin__'])) {
            // Unset it so we won't loop over it when printing this namespace.
            unset($item['__phpredisadmin__']);
            $class = array();
            $len = false;
            if (isset($_GET['key']) && $fullkey == $_GET['key']) {
                $class[] = 'current';
            }
            if ($islast) {
                $class[] = 'last';
            }
            // Get the number of items in the key.
            if (!isset($config['faster']) || !$config['faster']) {
                switch ($redis->type($fullkey)) {
                    case 'hash':
                        $len = $redis->hLen($fullkey);
                        break;
                    case 'list':
                        $len = $redis->lLen($fullkey);
                        break;
                    case 'set':
                        $len = $redis->sCard($fullkey);
                        break;
                    case 'zset':
                        $len = $redis->zCard($fullkey);
                        break;
                }
            }
            ?>
        <li<?php 
            echo empty($class) ? '' : ' class="' . implode(' ', $class) . '"';
            ?>
>
        <a href="?view&amp;s=<?php 
            echo $server['id'];
            ?>
&amp;d=<?php 
            echo $server['db'];
            ?>
&amp;key=<?php 
            echo urlencode($fullkey);
            ?>
"><?php 
            echo format_html($name);
            if ($len !== false) {
                ?>
<span class="info">(<?php 
                echo $len;
                ?>
)</span><?php 
            }
            ?>
</a>
        </li>
        <?php 
        }
        // Does this namespace also contain subkeys?
        if (count($item) > 0) {
            ?>
        <li class="folder<?php 
            echo $fullkey === '' ? '' : ' collapsed';
            echo $islast ? ' last' : '';
            ?>
">
        <div class="icon"><?php 
            echo format_html($name);
            ?>
&nbsp;<span class="info">(<?php 
            echo count($item);
            ?>
)</span>
        <?php 
            if ($fullkey !== '') {
                ?>
<a href="delete.php?s=<?php 
                echo $server['id'];
                ?>
&amp;d=<?php 
                echo $server['db'];
                ?>
&amp;tree=<?php 
                echo urlencode($fullkey);
                ?>
:" class="deltree"><img src="images/delete.png" width="10" height="10" title="Delete tree" alt="[X]"></a><?php 
            }
            ?>
        </div><ul>
        <?php 
            $l = count($item);
            foreach ($item as $childname => $childitem) {
                // $fullkey will be empty on the first call.
                if ($fullkey === '') {
                    $childfullkey = $childname;
                } else {
                    $childfullkey = $fullkey . $server['seperator'] . $childname;
                }
//.........这里部分代码省略.........
开发者ID:kevinobama,项目名称:php-redis-admin,代码行数:101,代码来源:index.php


示例17: foreach

</p>
<?php 
}
?>

<table>
<tr><th><div>Key</div></th><th><div>Value</div></th></tr>
<?php 
foreach ($info as $key => $value) {
    if ($key == 'allocation_stats') {
        // This key is very long to split it into multiple lines
        $value = str_replace(',', ",\n", $value);
    }
    ?>
  <tr <?php 
    echo $alt ? 'class="alt"' : '';
    ?>
><td><div><?php 
    echo format_html($key);
    ?>
</div></td><td><pre><?php 
    echo format_html(is_array($value) ? print_r($value, true) : $value);
    ?>
</pre></td></tr>
  <?php 
    $alt = !$alt;
}
?>
</table>
<?php 
require 'includes/footer.inc.php';
开发者ID:pksurecom,项目名称:phpRedisAdmin,代码行数:31,代码来源:info.php


示例18: isset

<input type="text" name="hkey" id="hkey" size="30" maxlength="30" <?php echo isset($_GET['hkey']) ? 'value="'.format_html($_GET['hkey']).'"' : ''?>>
</p>

<p id="indexp">
<label for="index">Index:</label>
<input type="text" name="index" id="index" size="30" <?php echo isset($_GET['index']) ? 'value="'.format_html($_GET['index']).'"' : ''?>> <span class="info">empty to append, -1 to prepend</span>
</p>

<p id="scorep">
<label for="score">Score:</label>
<input type="text" name="score" id="score" size="30" <?php echo isset($_GET['score']) ? 'value="'.format_html($_GET['score']).'"' : ''?>>
</p>

<p>
<label for="value">Value:</label>
<textarea name="value" id="value" cols="80" rows="20"><?php echo nl2br(format_html($value))?></textarea>
</p>

<input type="hidden" name="oldvalue" value="<?php echo format_html($value)?>">

<p>
<input type="submit" class="button" value="<?php echo $edit ? 'Edit' : 'Add'?>">
</p>

</form>
<?php

require 'footer.inc.php';

?>
开发者ID:r043v,项目名称:phpRedisAdmin,代码行数:30,代码来源:edit.php


示例19: format_html

  top.location.href = top.location.pathname+'?overview&s=<?php 
    echo $server['id'];
    ?>
';
  </script>
  <?php 
    require 'includes/footer.inc.php';
    die;
}
$page['css'][] = 'frame';
$page['js'][] = 'frame';
require 'includes/header.inc.php';
?>
<h2>Import</h2>
<form action="<?php 
echo format_html($_SERVER['REQUEST_URI']);
?>
" method="post">

<p>
<label for="commands">Commands:<br>
<br>
<span class="info">
Valid are:<br>
SET<br>
HSET<br>
LPUSH<br>
RPUSH<br>
LSET<br>
SADD<br>
ZADD
开发者ID:cmon2,项目名称:whiteboard,代码行数:31,代码来源:import.php


示例20: db_enter

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP format_interval函数代码示例发布时间:2022-05-15
下一篇:
PHP format_float函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap