本文整理汇总了PHP中Pool::GetTemplateCategories方法的典型用法代码示例。如果您正苦于以下问题:PHP Pool::GetTemplateCategories方法的具体用法?PHP Pool::GetTemplateCategories怎么用?PHP Pool::GetTemplateCategories使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pool
的用法示例。
在下文中一共展示了Pool::GetTemplateCategories方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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'];
?>
</h4>
</div>
<br>
<div id="content">
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
示例2: Pool
if ($number_categories_choices > 0) {
$return_value = Update_Category_Choice_List($category_choices, $category_id);
echo $return_value;
}
}
//REMOVE A SAVED CATEGORY:
if (isset($_GET['remove_category'])) {
//if we are removing a given category from DB:
$removal_category = $_GET['remove_category'];
$multiple_choice = $_GET['multiple_choice'];
$pool = new Pool();
$pool->RemoveCategory($removal_category);
if (isset($_GET['template_id'])) {
//if we are removing a template category:
$template_id = $_GET['template_id'];
$pool_categories = $pool->GetTemplateCategories($template_id);
} else {
//if we are removing a non template category:
$pool_categories = $pool->GetPoolCategoryData($pool_id);
}
$number_of_saved_categories = count($pool_categories);
if ($number_of_saved_categories > 0) {
$return_value = Update_Category_List($pool_categories, $multiple_choice);
echo $return_value;
}
}
if (isset($_GET['remove_category_choice'])) {
//if we are removing a given category choice from DB:
$category_id = $_GET['category_id'];
$removal_choice = $_GET['remove_category_choice'];
$pool = new Pool();
示例3: Score
//if template ID variable is properly defined and we can properly fetch template info from DB:
/*8/10/14 - made some edits to the logic here so that the header redirects would
//work correctly and also to clean up code. Tested page load and it seemed to
work fine, but did not test the finalize template functionality. Hopefully this
still works?
*/
if ($_GET['finalize_template'] == 998) {
if ($_GET['no_email'] == 1) {
$finalize_template_result = $pool->FinalizeTemplateScores($_GET['template_id'], 1);
} else {
$finalize_template_result = $pool->FinalizeTemplateScores($_GET['template_id']);
}
echo "<h2>Pool Results Stored.</h2><br>";
}
include_once "inc/header.php";
$template_category_fetch = $pool->GetTemplateCategories($template_id);
//get template category data
//************************************BEGIN MULTIPLE CHOICE SECTION***********************************
/*THIS IS JUST AN INTERNAL INTERFACE FOR MARKING TEMPLATES AS CORRECT
*/
?>
<span id="template_id_span" style="display:none"><?php
echo $template_id;
?>
</span>
<h2 style="text-decoration:underline">Tally Template Score (INTERNAL)</h2>
<p>Choose the correct answer to the template categories below. When you are finished, click the submit button.</p>
<br>
<div class="row">
<div class="col-md-5">