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


PHP Pool::GetBasicTemplateInfo方法代码示例

本文整理汇总了PHP中Pool::GetBasicTemplateInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Pool::GetBasicTemplateInfo方法的具体用法?PHP Pool::GetBasicTemplateInfo怎么用?PHP Pool::GetBasicTemplateInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pool的用法示例。


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

示例1: Pool

<?php

include_once "inc/loggedin_check.php";
include_once "inc/constants.inc.php";
$pageTitle = "New Pool";
/*
 11/30/13 - IF WE WANT TO INCLUDE THE ABILITY TO SET THE START/END DATES/TIMES FOR THE POOL ON THIS PAGE, THEN WE SHOULD JUST ADD THEM AS INPUTS ON THE PAGE AND THEN ADD PHP CODE TO TAKE THE POST VALUES AND RUN A METHOD IN THE POOL CLASS FOR THEM - SEE EDIT POOL.PHP PAGE 
*/
if (isset($_GET['template_id'])) {
    //if a template id is specified:
    include_once 'inc/class.pool.inc.php';
    $pool = new Pool();
    //new instance of the Pool class
    $pool_template_info = $pool->GetBasicTemplateInfo($_GET['template_id']);
    if (!empty($_POST['pool_title'])) {
        //if the form was submitted with the pool title variable set
        $new_pool_result = $pool->CreateNewPool($_SESSION['Username'], $_POST['pool_title'], $pool_template_info['Overall Question'], $_POST['pool_description'], $pool_template_info['Tie Breaker Question'], $_POST['public_private'], $_GET['template_id']);
        header("Location: edit_pool.php?pool_id={$new_pool_result['2']}");
        exit;
    }
    //if form was not submitted:
    $template_category_info = $pool->GetTemplateCategories($_GET['template_id']);
    include_once "inc/header.php";
    ?>
    <div style="text-align:center;">
        <h2><?php 
    echo $pool_template_info['Template Name'];
    ?>
 Template </h2>
        <h4><?php 
    echo $pool_template_info['Template Description'];
开发者ID:epsilon670,项目名称:Poolski,代码行数:31,代码来源:create_new_template.php

示例2: Pool

    include_once 'inc/class.pool.inc.php';
    $pool = new Pool();
    //new instance of the Pool class
    $template_id = $_GET['template_id'];
    //get pool ID from URL
    if (isset($_GET['delete'])) {
        //if delete variable is set
        if ($_GET['delete'] == 5668) {
            //if delete variable is the proper value (meaning the "delete button was clicked from this page")
            $pool->DeleteTemplate($template_id);
            //delete all entries associated with the template
            header("Location: home.php");
            //return user to the home page once pool is deleted
        }
    } else {
        $template_fetch_result = $pool->GetBasicTemplateInfo($template_id);
        $confirm_delete_url = "delete_template.php?template_id={$template_id}&delete=5668";
    }
}
include_once "inc/header.php";
?>
<br>
<div style="text-align: center">
    <h1 style="color:red">WARNING</h1>
    <h1>Are you sure you want to delete <?php 
echo $template_fetch_result['Template Name'];
?>
?</h1>
    <br>
    <h3>All Template data and picks will be erased</h3>
    <h3>This includes categories and category choices for historical pools!</h3>
开发者ID:epsilon670,项目名称:Poolski,代码行数:31,代码来源:delete_template.php


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