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


PHP Website::fetchpage方法代码示例

本文整理汇总了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[]");
开发者ID:hscale,项目名称:mtptool,代码行数:31,代码来源:editpage.php

示例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">
开发者ID:hscale,项目名称:mtptool,代码行数:31,代码来源:createpage.php


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