本文整理汇总了PHP中Website::fetchpage方法的典型用法代码示例。如果您正苦于以下问题:PHP Website::fetchpage方法的具体用法?PHP Website::fetchpage怎么用?PHP Website::fetchpage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Website
的用法示例。
在下文中一共展示了Website::fetchpage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check
<?php
include_once 'header.php';
include_once 'includes/website.php';
session_start();
$websiteid = 1;
if (!isset($_GET['pageurlid'])) {
header('Location: viewpages.php');
}
if (isset($_GET['pageurlid'])) {
$pageid = $_GET['pageurlid'];
$viewpage = new Website();
$res = $viewpage->fetchpage($websiteid, $pageid);
$db = new DBConnection();
$pagerow = $db->fetch_assoc($res);
$pageid = $pagerow['page_id'];
$pagename = $pagerow['page_name'];
$pagecontent = $pagerow['page_content'];
$dbmenu = $pagerow['menu'];
$dbsubmenu = $pagerow['submenu'];
$dbpagestatus = $pagerow['page_status'];
}
//echo 'dbmenu'.$dbmenu;
?>
<title>Edit Page</title>
<body>
<script type="text/javascript">
function check()
{
var a=new Array();
a=document.getElementsByName("submenu[]");
示例2: array
$res = $website->fetchwebpages($websiteid);
$pagearr = array();
$count = 0;
while ($pagerow = $website->fetch_assoc($res)) {
if (empty($pagecontent)) {
$pagearr[$count] = $pagerow['page_id'];
$count++;
}
}
return $pagearr;
}
$pagearray = getwebsitepages($websiteid);
if (!empty($pagearray)) {
$pageid = $pagearray[0];
$website = new Website();
$res = $website->fetchpage($websiteid, $pageid);
$db = new DBConnection();
$nrow = $db->num_rows($res);
$pagerow = $website->fetch_assoc($res);
$pageid = $pagerow['page_id'];
$pagename = $pagerow['page_name'];
$pagecontent = $pagerow['page_content'];
$dbmenu = $pagerow['menu'];
} else {
echo "<script>alert('All pages insereted info you can modify that pages content')</script>";
echo "<script>window.location='viewpages.php'</script>";
}
?>
<title>Add Page</title>
<body>
<script type="text/javascript">