本文整理汇总了PHP中make_html函数的典型用法代码示例。如果您正苦于以下问题:PHP make_html函数的具体用法?PHP make_html怎么用?PHP make_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
}
echo "<SCRIPT LANGUAGE=\"JavaScript\">\n\t\tparent.document.getElementById('{$iframeID}').innerHTML='{$show}';\n\t\t</SCRIPT>";
} else {
//JS式会拖慢主页面打开速度,不推荐
echo "document.write('{$show}');";
}
exit;
} elseif ($type == 'sonfid') {
$fid && ($rs = $db->get_one("SELECT fup FROM {$pre}spsort WHERE fid='{$fid}'"));
$show = get_fidName($rs[fup], $rows, $class ? $class : 3);
if (!$show) {
$show = "暂无...";
}
//真静态
if ($webdb[NewsMakeHtml] == 1 || $gethtmlurl) {
$show = make_html($show, $pagetype = 'N');
} elseif ($webdb[NewsMakeHtml] == 2) {
$show = fake_html($show);
}
if ($webdb[RewriteUrl] == 1) {
//全站伪静态
rewrite_url($show);
}
$show = "<ul>{$show}</ul>";
$show = str_Replace("'", '"', $show);
$show = str_Replace("\r", '', $show);
$show = str_Replace("\n", '', $show);
$show = "document.write('{$show}');";
echo $show;
} else {
die("document.write('指定的类型不存在');");
示例2: lang
<div class="page-header" style="margin-top: -15px;">
<h3><i class="fa fa-tachometer"></i> <?php
echo lang('DASHBOARD_TITLE');
?>
</h3>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<div class="alert alert-info alert-dismissable">
<?php
echo make_html(get_myname() . get_dashboard_msg());
?>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><a href="stats"><i class="fa fa-bar-chart-o"></i> <?php
echo lang('DASHBOARD_ticket_stats');
?>
</a></div>
<div class="panel-body">
<div class="row">
<div class="col-md-4 col-xs-4"><center> <strong class="text-danger" style="font-weight: bold; font-style: normal; font-variant: normal; font-size: 20px;" data-toggle="tooltip" data-placement="top" title="<?php
示例3: validate_input
//.........这里部分代码省略.........
if (!empty($valid['max']) and $age > $valid['max']) {
$error = 'This date of birth indicates an age of ' . $age . '. It is required that the age is ' . $valid['max'] . ' or less.';
}
if (!empty($valid['min']) and $age < $valid['min']) {
$error = 'This date of birth indicates an age of ' . $age . '. It is required that the age is ' . $valid['min'] . ' or more.';
}
}
if ($val > date('Y-m-d')) {
$error = 'A date of birth may not be in the future. If time travel has been invented, please let us know last year.';
}
break;
case 'email':
if (!make_email($val, $valid['blank'] ? 1 : false)) {
$error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid email address.';
}
break;
case 'equal':
if (!string_compare($val, $valid['equal'])) {
$error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter the exact value.';
}
break;
// this isn't really a data type, could be removed now that we can accept arrays
// this isn't really a data type, could be removed now that we can accept arrays
case 'extra':
$extra = array();
if (is_array($val['key'])) {
foreach ($val['key'] as $n => $key) {
$extra[string_check($key)] = string_check($val['val'][$n]);
}
}
$val = serialize($extra);
break;
case 'html':
$val = make_html($val, $valid['tags'], !empty($valid['multi_byte']) ? true : false);
if ($valid['length'] > 0) {
if (strlen($val) < $valid['length']) {
$error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a value at least ' . ($valid['length'] == 1 ? '1 character' : $valid['length'] . ' characters.') . ' long';
}
}
break;
case 'image':
break;
case 'keygen':
if (empty($val) and empty($valid['regen'])) {
$val = rand_pass();
}
break;
case 'name':
$val = make_name($val);
if (empty($valid['blank']) and empty($val)) {
$error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid name.';
}
break;
case 'num':
case 'number':
if (!is_number($val, $valid['blank'] ? 1 : false)) {
if (!empty($valid['default'])) {
$val = $valid['default'];
} else {
$error = !empty($valid['msg']) ? $valid['msg'] : 'You must enter a valid number.';
}
}
if (!empty($val)) {
// for legacy support
if (isset($valid['ulimit'])) {
$valid['max'] = $valid['ulimit'];
示例4: nameshort
$to_text = "<div class=''>" . nameshort(name_of_user_ret($row['user_to_id'])) . "</div>";
}
if ($row['user_to_id'] == 0) {
$to_text = "<strong data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . view_array(get_unit_name_return($row['unit_id'])) . "\">" . lang('t_list_a_all') . "</strong>";
}
?>
<tr >
<td style=" vertical-align: middle; "><small><center><?php
echo $row['id'];
?>
</center></small></td>
<td style=" vertical-align: middle; "><small><a href="ticket?<?php
echo $row['hash_name'];
?>
"><?php
cutstr(make_html($row['subj'], 'no'));
?>
</a></small></td>
<td style=" vertical-align: middle; "><small><?php
name_of_client($row['client_id']);
?>
</small></td>
<td style=" vertical-align: middle; "><small><center><time id="c" datetime="<?php
echo $row['date_create'];
?>
"></time></center></small></td>
<td style=" vertical-align: middle; "><small><?php
echo nameshort(name_of_user_ret($row['user_init_id']));
?>
</small></td>
示例5: lang
</div>
</div>
<div class="row" id="content_notes" style="padding-bottom: 25px;">
<div class="col-md-1">
<a id="go_back" class="btn btn-primary btn-sm"><i class="fa fa-reply"></i> <?php
echo lang('HELPER_back');
?>
</a>
</div>
<div class="col-md-11" id="">
<div class="panel panel-default">
<div class="panel-body">
<h3 style=" margin-top: 0px; "><?php
echo make_html($fio['title']);
?>
</h3>
<p><?php
echo $fio['message'];
?>
</p>
<hr>
<p class="text-right"><small class="text-muted"><?php
echo lang('HELPER_pub');
?>
: <?php
echo nameshort(name_of_user_ret($fio['user_init_id']));
?>
</small><br><small class="text-muted"><?php
示例6: En_TruePath
//附件真实地址还原
$rsdb[content] = En_TruePath($rsdb[content], 0);
$rsdb[posttime] = date("Y-m-d H:i:s", $rsdb[posttime]);
$rsdb[picurl] && ($rsdb[picurl] = tempdir($rsdb[picurl]));
if (!$rsdb[yz]) {
$showsp = "<META HTTP-EQUIV=REFRESH CONTENT='0;URL={$webdb['www_url']}/do/showsp.php?fid={$fid}&id={$id}'>";
} else {
$showsp = "";
}
require ROOT_PATH . "inc/head.php";
require html("showsp", $main_tpl);
require ROOT_PATH . "inc/foot.php";
$content = ob_get_contents();
ob_end_clean();
$content = preg_replace("/<!--include(.*?)include-->/is", "\\1", $content);
make_html($showsp ? $showsp : $content, 'showsp');
unset($iddb, $fiddb);
require_once ROOT_PATH . "cache/makeShow1.php";
if ($string = $iddb[++$II]) {
$ar = explode("-", $string);
write_file(ROOT_PATH . "cache/makeShow_record.php", "?fid={$ar['0']}&id={$ar['1']}&II={$II}");
echo '<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />';
echo "请稍候,正在生成专题内容页静态...<META HTTP-EQUIV=REFRESH CONTENT='0;URL=?fid={$ar['0']}&id={$ar['1']}&II={$II}'>";
exit;
} else {
unlink(ROOT_PATH . "cache/makeShow1.php");
unlink(ROOT_PATH . "cache/makeShow_record.php");
if (count($iddb) == 1) {
$detail = get_SPhtml_url($fidDB, $id, $rsdb[posttime]);
header("location:{$detail['showurl']}");
exit;
示例7: getImageGalleryHtml
//.........这里部分代码省略.........
$cachekey = $this->imageservices->saveCachedContent($imagehashbase, $this->curparams, $cachedata);
if (SIGPLUS_LOGGING) {
if ($cachekey !== false) {
$logging->append('Saved cached content with key <kbd>' . $cachekey . '</kbd>.');
} else {
$logging->append('Failed to persist content in cache folder.');
}
}
}
} elseif ($this->curparams->linkage != 'external') {
// retrieve content from cache but no need to fetch content for linking external .js file
$cachefile = $this->imageservices->getCachedContentPath($cachekey, $this->curparams->linkage == 'inline' ? '.html' : '.js');
if (filesize($cachefile) > 0) {
$cachedata = file_get_contents($cachefile);
} else {
$cachedata = false;
// empty gallery
}
} else {
$cachedata = true;
}
if ($cachedata === false) {
// no content
$html = JText::_('SIGPLUS_EMPTY');
} else {
switch ($this->curparams->linkage) {
case 'inline':
$html = $cachedata;
// content produced as HTML only in inline linkage mode
break;
case 'head':
$this->addGalleryScript();
// add gallery population script
$engineservices->addOnReadyScript($cachedata);
// add gallery data
$html = '';
// no content produced in HTML except for placeholder
break;
case 'external':
$this->addGalleryScript();
if ($cachekey !== false) {
// include reference to generated script in external .js file
$document = JFactory::getDocument();
$document->addScript($this->imageservices->getCachedContentUrl($cachekey, '.js'));
} else {
// add script to document head as a fall-back if could not save to external .js file in cache folder
$engineservices->addOnReadyScript($cachedata);
}
$html = '';
break;
}
}
// set image gallery alignment (left, center or right) and style
$gallerystyle = 'sigplus-gallery';
switch ($this->curparams->alignment) {
case 'left':
case 'left-clear':
case 'left-float':
$gallerystyle .= ' sigplus-left';
break;
case 'center':
$gallerystyle .= ' sigplus-center';
break;
case 'right':
case 'right-clear':
case 'right-float':
$gallerystyle .= ' sigplus-right';
break;
}
switch ($this->curparams->alignment) {
case 'left':
case 'left-float':
case 'right':
case 'right-float':
$gallerystyle .= ' sigplus-float';
break;
case 'left-clear':
case 'right-clear':
$gallerystyle .= ' sigplus-clear';
break;
}
switch ($this->curparams->imagecaptions) {
case 'above':
$gallerystyle .= ' sigplus-captionsabove';
break;
case 'below':
$gallerystyle .= ' sigplus-captionsbelow';
break;
}
// output image gallery or gallery placeholder
$div_attrs = array('id' => $galleryid, 'class' => $gallerystyle);
if ($this->curparams->layout == 'hidden') {
$div_attrs['style'] = 'display:none !important;';
}
$html = make_html('div', $div_attrs, $html);
// add style and script declarations
$this->addStylesAndScripts($galleryid);
$this->curparams = false;
return $html;
}
示例8: view_comment
function view_comment($tid)
{
global $dbConnection;
?>
<div class="row" id="comment_body" style="max-height: 400px; scroll-behavior: initial; overflow-y: scroll;">
<div class="timeline-centered">
<?php
$stmt = $dbConnection->prepare('SELECT user_id, comment_text, dt from comments where t_id=:tid order by dt ASC');
$stmt->execute(array(':tid' => $tid));
while ($rews = $stmt->fetch(PDO::FETCH_ASSOC)) {
?>
<article class="timeline-entry">
<div class="timeline-entry-inner">
<div class="timeline-icon bg-info">
<i class="entypo-feather"></i>
</div>
<div class="timeline-label">
<div class="header">
<strong class="primary-font"><?php
echo nameshort(name_of_user_ret($rews['user_id']));
?>
</strong> <small class="pull-right text-muted">
<span class="glyphicon glyphicon-time"></span>
<time id="b" datetime="<?php
echo $rews['dt'];
?>
"></time> <time id="c" datetime="<?php
echo $rews['dt'];
?>
"></time></small>
</div><br>
<p><?php
echo make_html($rews['comment_text'], true);
?>
</p>
</div>
</div>
</article>
<?php
}
?>
</div>
</div>
<?php
}
示例9: show_keyword
$rsdb[content] = show_keyword($rsdb[content]);
//突出显示关键字
$IS_BIZ && AvoidGather();
//防采集处理
$showpage = getpage("", "", "bencandy.php?fid={$fid}&aid={$aid}", 1, $rsdb[pages]);
if (!$bencandy_content) {
ob_end_clean();
ob_start();
$MenuArray = '';
require ROOT_PATH . "inc/head.php";
require $chdb[main_tpl];
$bencandy_content = ob_get_contents() . $content_foot;
$bencandy_content = preg_replace("/<!--include(.*?)include-->/is", "\\1", $bencandy_content);
$bencandy_content = str_replace("<!---->", "", $bencandy_content);
}
make_html($bencandy_content, 'bencandy');
$bencandy_content = '';
$page++;
$ifpage = $page > $rsdb[pages] ? false : true;
$STEPS++;
if ($STEPS % 100) {
sleep(1);
//每生成100篇后要暂停一下,防止服务器负荷太大
}
} while ($ifpage);
}
//对应上面的批量读取文章query
} while ($ifdo);
//对应上面的DO
/***********************结尾***********************/
ob_end_clean();
示例10: date
} else {
$classif = "ОКТМО";
}
echo date("H:i:s") . " Генерация html для классификатора {$classif}\n\n";
$time = -time();
print_table($link, $data_date, $base_table, '', 'html');
$i = 1;
$query = 'SELECT mergedcode FROM ' . $base_table . ' WHERE mergedcode<>\'00000000\' AND exist<>0';
$result = mysqli_query($link, $query);
$num_pages = mysqli_num_rows($result);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$percents = 100 * $i / $num_pages;
$status = sprintf("%3d", $percents) . '% Обработано ' . sprintf("%7d", $i) . ' из ' . sprintf("%7d", $num_pages) . ' ';
fwrite(STDERR, "\r{$status}");
print_table($link, $data_date, $base_table, $row['mergedcode'], 'html');
$i++;
}
$time += time();
echo "\n\n" . date("H:i:s") . " Генерация html для {$classif} выполнена за " . hms($time) . "\n\n";
}
$link = get_link($db_host, $db_user, $db_pass, $db_name);
$data_date = substr(file_get_contents($work_files_path . 'data_date'), 0, 10);
$time = -time();
make_html($link, $data_date, 'okato');
make_html($link, $data_date, 'oktmo');
$mode = 'html';
include 'l0.php';
include 'lost.php';
$time += time();
echo "\n\n" . date("H:i:s") . ' Генерация html выполнена за ' . hms($time) . "\n\n";
mysqli_close($link);
示例11: make_html
</tr>
<tr>
<td style=" padding: 20px; border-top: 1px solid #DDD " colspan="2">
<!--p href="#" data-pk="<?php
echo $tid;
?>
" data-url="actions.php" id="edit_msg_ticket" data-type="textarea"-->
<?php
echo make_html($row['msg']);
?>
<!--/p-->
</td>
</tr>
</tbody>
</table>
<?php
$stmt = $dbConnection->prepare('SELECT file_hash, original_name, file_size FROM files where ticket_hash=:tid');
$stmt->execute(array(':tid' => $hn));
$res1 = $stmt->fetchAll();
示例12: display
public function display($view = '', $return = false)
{
global $lable, $list, $datalist, $volist, $data;
$file = $this->class_info['method'];
$clas = $this->class_info['file'];
$tpl = $this->config->get('DEFAULT_TPL');
if (!$tpl) {
$tpl = 'default';
}
if (COOKIE::get('default_tpl')) {
$tpl = COOKIE::get('default_tpl');
}
if (!defined('DEFAULT_TPL')) {
define('DEFAULT_TPL', $tpl);
}
$data = $this->data;
ob_start();
$templete_ext = $this->config->get('templete_ext');
if (!$templete_ext) {
$templete_ext = '.htm';
}
$v = $clas . "/" . $file . $templete_ext;
if ($view) {
$v = $view;
}
$file = DEFAULT_TPL_PATH . "/{$tpl}/" . $v;
foreach ($this->data as $kyphp_key => $kyphp_value) {
if (is_string($kyphp_value)) {
$lable[$kyphp_key] = $kyphp_value;
}
${$kyphp_key} = $kyphp_value;
}
if (is_file($file)) {
require $file;
} else {
error(0, $file);
}
$content = ob_get_contents();
ob_end_clean();
$content = make_html($content, $this->config->get('PATH_KEY'));
if ($this->config->get('PATH_KEY') == 4) {
$htmlpath = $this->config->get('DEFAULT_HTML_PATH');
if (!$htmlpath) {
$htmlpath = 'html';
}
$fstr = APP_PATH . '/' . $htmlpath;
$fstr .= '/' . $this->kyphp_route;
if (!is_dir($fstr)) {
mkdir($fstr, 0755, true);
}
$f = fopen($fstr . '/index.html', 'w');
fwrite($f, $content);
fclose($f);
}
if ($this->config->get('CACHE_ON') == 'on') {
$urlcachekey = 'KYPHP_URL' . $_SERVER['REQUEST_URI'];
$urlcache = array('dirver' => 'file');
$kyphpcache = new Cache($urlcache);
$timeout = 3600;
if ($this->config->get('CACHE_TIME_EXPIRE')) {
$timeout = $this->config->get('CACHE_TIME_EXPIRE');
}
if ($this->config->get('CACHE_CONTENT_WITHTIME') != 'off') {
if (!$this->config->get('CACHE_CONTENT_WITHTIME')) {
$content = $content . '<!--cached ' . date('Y-m-d H:i:s') . ' by KYPHP-->';
} else {
$content = $content . $this->config->get('CACHE_CONTENT_WITHTIME');
}
}
$kyphpcache->set($urlcachekey, $content, $timeout);
}
if ($return) {
return $content;
} else {
echo $content;
}
if ($this->config->get('debug') == 'on') {
$debug = debug_backtrace();
echo '<div>Debug Trace:<br><ul>';
global $_charset;
$this->runtime->stop();
foreach ($debug as $key => $value) {
echo "<li>file:{$value['file']} " . sprintf($_charset['lineno'], $value['line']) . " {$value['function']}</li>";
}
echo '</ul></div>';
echo "<div>Time:spent is " . $this->runtime->spent() . " (ms)</div>";
}
}
示例13: download_tar
function download_tar()
{
$name = $GLOBALS['form_name'];
$data = array(".htaccess" => make_htaccess(), "run.php ->" => 'code/wfpl/run.php', "style.css" => read_whole_file('code/wfpl/metaform/style.css'), "{$name}.html" => make_html(), "{$name}.php" => make_php());
if ($GLOBALS['opt_db'] == 'Yes') {
$data["{$name}.sql"] = make_sql();
}
if ($GLOBALS['opt_email'] == 'Yes') {
$data["{$name}.email.txt"] = make_email();
}
make_tar($name, $data);
}
示例14: html
require ROOT_PATH . "inc/head.php";
require html($mid ? "search_{$mid}" : "search");
require ROOT_PATH . "inc/foot.php";
//伪静态
if ($webdb[NewsMakeHtml] == 2) {
$content = ob_get_contents();
ob_end_clean();
ob_start();
$content = fake_html($content);
echo "{$content}";
} elseif ($webdb[NewsMakeHtml] == 1) {
$content = ob_get_contents();
ob_end_clean();
ob_start();
//备用
$content = make_html($content, 'N');
echo "{$content}";
}
/*栏目列表 取决模型相关栏目*/
function list_allsort($fid, $Class, $ckfid, $fmid = "0")
{
global $db, $pre, $listdb;
$Class++;
if (!$fmid) {
$query = $db->query("SELECT * FROM {$pre}sort WHERE fup='{$fid}' ORDER BY list DESC");
} else {
$query = $db->query("SELECT * FROM {$pre}sort WHERE fup='{$fid}' AND fmid ='{$fmid}'ORDER BY list DESC");
}
while ($rs = $db->fetch_array($query)) {
$icon = "";
for ($i = 1; $i < $Class; $i++) {
示例15: get_mark_price
}
return $res;
}
function get_mark_price($goods_id)
{
$sql = "SELECT market_price" . " FROM " . $GLOBALS['ecs']->table('goods') . " WHERE goods_id = '{$goods_id}'";
$res = $GLOBALS['db']->getRow($sql);
return $res['market_price'];
}
/* 代码增加_start By www.ecshop68.com */
/*
*
*查询商品的优惠数量和价格
*
*jx 2015-1-1
*/
function get_goods_volume($goods_id)
{
$volume_price = array();
$sql = "SELECT volume_number , volume_price" . " FROM " . $GLOBALS['ecs']->table('volume_price') . " WHERE goods_id = '{$goods_id}' ORDER BY volume_number";
$res = $GLOBALS['db']->getAll($sql);
foreach ($res as $k => $v) {
$volume_price[$k] = array();
$volume_price[$k]['volume_number'] = $v['volume_number'];
$volume_price[$k]['volume_price'] = price_format($v['volume_price']);
}
return $volume_price;
}
/* 代码增加_start By www.68ecshop.com */
make_html();
/* 代码增加_end By www.68ecshop.com */