本文整理汇总了PHP中loadPage函数的典型用法代码示例。如果您正苦于以下问题:PHP loadPage函数的具体用法?PHP loadPage怎么用?PHP loadPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadPage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public static function index($html, $title, $arr = null)
{
$valores = ['Title' => $title, 'container' => dinamic("frontend/views/indexViews/" . $html, $arr)];
$templad = loadPage("frontend/assets/templad/default.html");
$mostrar = remplas($valores, $templad);
return $mostrar;
}
示例2: format
$values .= format(rand_name($_POST["name"], $id), 1);
$values .= format($_POST["url"], 1);
$values .= format('0', 0);
// insertObject($field,$value)
$res = $tbl->insertObject($field, $values);
if ($res) {
//var_dump($res);
echo "OK";
}
}
?>
<div id="center-column">
<div class="top-bar">
<h1>Tin tức</h1>
<div class="breadcrumbs"><a href="<?php
echo loadPage('news');
?>
">Tin tức</a> / <a href="#">Thêm</a></div>
</div><br />
<div class="table">
<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
<img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
<form method="post" enctype="multipart/form-data">
<table class="listing form" cellpadding="0" cellspacing="0">
<tr>
<th class="full" colspan="4">NỘI DUNG</th>
</tr>
<tr class="bg" style="display:none">
示例3: formatCompare
// search
if (isset($_POST["search"])) {
// loadPaging(&$start,&$nume,$limit=20,$where='',$order='order by id desc')
$res = $tbl->loadPaging($start, $nume, $limit, 'where name like' . formatCompare($_POST["key"], 0));
} else {
// loadPaging(&$start,&$nume,$limit=20,$where='',$order='order by id desc')
$res = $tbl->loadPaging($start, $nume, $limit);
}
/*$sql=("select * from pages where lang = ".$a." ");
$res=mysql_query($sql);*/
if ($res) {
while ($row = mysql_fetch_array($res)) {
?>
<tr>
<td class="first style1"><a href="<?php
echo loadPage('editsupport&id=' . $row['id']);
?>
"><?php
echo $row['name'];
?>
</a></td>
<td align="center" class="last"><input type="checkbox" name="del[]" value="<?php
echo $row['id'];
?>
" id="del[]" /></td>
</tr>
<?php
}
}
?>
<tr class="bg">
示例4: uploadFile
// get fields
$field = 'id,name,address,image,ordering';
// upload file
$file = "logo";
// uploadFile($file,$auto=1,$dir='uploads/images/');
$logo = uploadFile($file, 0, '../uploads/');
// format($str,$isComma=1)
$values = $tbl->getLastId() + 1 . ",";
$values .= format($_POST["name"]);
$values .= format($_POST["url"]);
$values .= format(str_replace('../', '', $logo));
$values .= format($_POST["vitri"], 0);
// insert
$res = $tbl->insertObject($field, $values);
if ($res) {
header('location: ' . loadPage('addlinkweb'));
}
}
?>
<div id="center-column">
<div class="top-bar">
<h1>Liên kết website</h1>
<div class="breadcrumbs"><a href="#">Content</a> / <a href="#">Thêm</a></div>
</div><br />
<div class="table">
<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
<img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
<form method="post" enctype="multipart/form-data">
示例5: format
// get values
$ms = format($_POST["ms"], 0);
$solanchon = format($_POST["solanchon"], 0);
$image = format(str_replace('../', '', $image), 0);
$values = array($ms, $image, $solanchon);
// insertObject($field,$value)
if ($_POST['tmpms'] == $_POST['ms']) {
$res = $tbl->updateObject($field, $values, 'id=' . $id);
if ($res) {
header('location: ' . loadPage('poll'));
}
} else {
if ($num_kt == 0) {
$res = $tbl->updateObject($field, $values, 'id=' . $id);
if ($res) {
header('location: ' . loadPage('poll'));
}
}
}
}
$res = $tbl->loadOne('id=' . $id);
if ($res) {
$row = mysql_fetch_array($res);
?>
<div id="center-column">
<div class="top-bar">
<h1>Bình chọn</h1>
<div class="breadcrumbs"><a href="#">Sửa</a></div>
</div><br />
示例6: index
function index()
{
loadPage('sort.php');
}
示例7: table
$id = $_GET["id"];
}
$tbl = new table('combi');
if (isset($_POST["done"])) {
// get field
/*$filea = $_FILES["image"]["name"];
if($filea=='')
$image = '../'.$_POST['tmpimage'];
else
$image = uploadFile('image',0,'../uploads/');*/
$field = array('name', 'details', 'ordering', 'alias');
$values = array(format($_POST["name"], 0), format($_POST["details"], 0), format($_POST["ordering"], 0), format(rand_name($_POST["name"], $id), 0));
// insertObject($field,$value)
$res = $tbl->updateObject($field, $values, 'id=' . $id);
if ($res) {
header('location: ' . loadPage('combi'));
}
}
$res = $tbl->loadOne('id=' . $id);
if ($res) {
$row = mysql_fetch_array($res);
?>
<div id="center-column">
<div class="top-bar">
<h1>Mua hàng trên web Nhật</h1>
<div class="breadcrumbs"><a href="#">Sửa</a></div>
</div><br />
<div class="table">
示例8: loadPage
<ul class="nav">
<li><a href="<?php
echo loadPage('category_adv');
?>
">Danh mục </a></li>
<li><a href="<?php
echo loadPage('advertise');
?>
">Danh sách </a></li>
</ul>
<h3>Thành viên</h3>
<ul class="nav">
<li><a href="<?php
echo loadPage('member');
?>
">Thành viên</a></li>
</ul>
<h3>Administrator</h3>
<ul class="nav">
<li><a href="<?php
echo loadPage('admin');
?>
">Người dùng</a></li>
<li><a href="<?php
echo loadPage('password');
?>
">Đổi mật khẩu</a></li>
<li><a href="source/logout.php" class="last">Thoát (Logout)</a></li>
</ul>
</div>
示例9: DEFINED
<?php
DEFINED('DS') or DEFINE('DS', DIRECTORY_SEPARATOR);
// Константа разделителя директорий
include_once '..' . DS . 'config' . DS . 'config.php';
// Инициализация настроек
include_once '..' . DS . 'config' . DS . 'db.php';
// Инициализация базы данных
include_once '..' . DS . 'library' . DS . 'mainFunctions.php';
// Основные функции
// получаем имена вызываемых контроллера и экшина
$controller = filter_input(INPUT_GET, 'controller');
$action = filter_input(INPUT_GET, 'action');
// определяем вызываемый контроллер
$controllerName = $controller ? ucfirst($controller) : 'Index';
// определяем вызываемую функцию
$actionName = $action ? $action : 'index';
loadPage($smarty, $controllerName, $actionName);
示例10: header
header('location: ' . loadPage('baiviet'));
}
} else {
echo "Lỗi trùng tên. Vui lòng nhập tên khác.";
}
}
$res = $tbl->loadOne('id=' . $id);
if ($res) {
$row = mysql_fetch_array($res);
$thumb_img = get_thumb('uploads/category/', $row['image']);
?>
<div id="center-column">
<div class="top-bar">
<h1>Bài viết</h1>
<div class="breadcrumbs"><a href="<?php
echo loadPage('baiviet');
?>
">Bài viết</a> / <a href="#">Sửa</a></div>
</div><br />
<div class="table">
<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
<img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
<form method="post" enctype="multipart/form-data">
<table class="listing form" cellpadding="0" cellspacing="0">
<tr>
<th class="full" colspan="3">NỘI DUNG</th>
</tr>
<tr>
示例11: loadPage
?>
<tr>
<td class="first style1">
<a href="<?php
echo loadPage('editbaiviet&id=' . $row['id']);
?>
">
<?php
echo $row['name'];
?>
</a>
</td>
<td>
<a href="<?php
echo loadPage('editbaiviet&id=' . $row['id']);
?>
">
<img src="../<?php
echo $thumb_img;
?>
" height="50" align="absmiddle" />
</a>
</td>
<td>
<span class="first style1">
<?php
if ($row['catid'] != 0) {
$tbl_cat = new table('category_bv');
$res_cat = $tbl_cat->loadOne('id=' . $row['catid']);
$row_cat = mysql_fetch_array($res_cat);
示例12: formatCompare
$nume = 0;
if ($_POST["search"]) {
// loadPaging(&$start,&$nume,$limit=20,$where='',$order='order by id desc');
// formatCompare($str,$pos=0);
$res = $tbl->loadPaging($start, $nume, $limit, 'where ms like' . formatCompare($_POST["key"], 0));
} else {
// loadPaging(&$start,&$nume,$limit=20,$where='',$order='order by id desc');
$res = $tbl->loadPaging($start, $nume, $limit);
}
if ($res) {
while ($row = mysql_fetch_array($res)) {
?>
<tr>
<td class="first style1"><a href="<?php
echo loadPage('editpoll&id=' . $row['id']);
?>
"><?php
echo $row['ms'];
?>
</a></td>
<td><img src="../<?php
echo $row['image'];
?>
" width="50"/></td>
<td align="center" class="last"><input type="checkbox" name="del[]" value="<?php
echo $row['id'];
?>
" id="del[]" /></td>
</tr>
<?php
示例13: loadPage
#!/usr/bin/php
<?php
function loadPage($url)
{
$filepath = sys_get_temp_dir() . '/' . basename($url);
if (!file_exists($filepath)) {
copy('compress.zlib://' . $url, $filepath, stream_context_create(['http' => ['header' => 'Accept-Encoding: gzip']]));
}
$page = new DOMDocument();
$page->preserveWhiteSpace = false;
@$page->loadHTMLFile($filepath, LIBXML_COMPACT | LIBXML_NOBLANKS);
return $page;
}
$page = loadPage('http://www.w3.org/html/wg/drafts/html/master/index.html');
$filters = [];
foreach ($page->getElementById('attributes-1')->getElementsByTagName('tr') as $tr) {
if (strpos($tr->textContent, 'URL') === false) {
continue;
}
$th = $tr->getElementsByTagName('th')->item(0);
foreach (preg_split('/[;\\s]+/', $th->textContent, -1, PREG_SPLIT_NO_EMPTY) as $attrName) {
// We manually ignore itemprop because it accepts plain text as well as URLs.
// We also ignore itemid because it actually accepts any URIs, not just URLs
if ($attrName === 'itemprop' || $attrName === 'itemid') {
continue;
}
$filters[$attrName] = '#url';
}
}
ksort($filters);
$len = max(array_map('strlen', array_keys($filters)));
示例14: getdate
<td class="first" width="96"><strong>Date</strong></td>
<?php
// get current date and time
$now = getdate();
// turn it into strings
$currentDate = $now["mday"] . "-" . $now["mon"] . "-" . $now["year"];
// result: "It is now 12:37:47 on 30.10.2006" (example)
?>
<td colspan="2" class="last"><?php
echo "{$currentDate}";
?>
</td>
</tr>
<tr class="bg">
<td class="first"> </td>
<td colspan="2" class="last"><a href="<?php
echo loadPage('contact');
?>
">Go back</a></td>
</tr>
<tr class="bg">
<td class="first"> </td>
<td colspan="2" class="last"> </td>
</tr>
</table>
</form>
<p> </p>
</div>
</div>
<?php
}
示例15: table
<?php
$tbl = new table('orders');
echo $tbl->getTotal();
?>
</td>
</tr>
<tr>
<td class="first style1">Tổng số thành viên</td>
<td>
<?php
$tbl = new table('user');
echo $tbl->getTotal();
?>
</td>
</tr>
<tr class="bg">
<td class="first style2"><a href="<?php
echo loadPage('ip');
?>
">IP truy cập</a></td>
<td>
<?php
$tbl = new table('ipaddress');
echo $tbl->getTotal();
?>
</td>
</tr>
</table>
</form>
</div>
</div>