本文整理汇总了PHP中Poll::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Poll::delete方法的具体用法?PHP Poll::delete怎么用?PHP Poll::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poll
的用法示例。
在下文中一共展示了Poll::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
function delete($id)
{
if ($id) {
$poll = new Poll($id);
$poll->delete();
set_notify('success', lang('delete_data_complete'));
}
redirect('polls/admin/polls');
}
示例2: delete
public static function delete($id)
{
self::check_logged_in();
$curruser = self::get_user_logged_in();
if (!$curruser->admin) {
Redirect::to('/user/' . $curruser->id, array('warning' => 'Pääsy kielletty ilman ylläpito-oikeutta!'));
}
$poll = new Poll(array('id' => $id));
$poll->delete();
Redirect::to('/poll', array('message' => 'Äänestys poistettiin onnistuneesti.'));
}
示例3: Poll
<?php
camp_load_translation_strings("plugin_poll");
if (!SecurityToken::isValid()) {
camp_html_display_error(getGS('Invalid security token!'));
exit;
}
// Check permissions
if (!$g_user->hasPermission('plugin_poll')) {
camp_html_display_error(getGS('You do not have the right to manage polls.'));
exit;
}
$f_poll_nr = Input::Get('f_poll_nr', 'int');
$f_fk_language_id = Input::Get('f_fk_language_id', 'int');
$poll = new Poll($f_fk_language_id, $f_poll_nr);
$poll->delete();
header('Location: index.php');
?>
示例4: ConsoleOption
<?php
/*
* Bluethrust Clan Scripts v4
* Copyright 2014
*
* Author: Bluethrust Web Development
* E-mail: support@bluethrust.com
* Website: http://www.bluethrust.com
*
* License: http://www.bluethrust.com/license.php
*
*/
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/poll.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$managePollsCID = $consoleObj->findConsoleIDByName("Manage Polls");
$consoleObj->select($managePollsCID);
$pollObj = new Poll($mysqli);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $pollObj->select($_POST['pollID']) && $member->hasAccess($consoleObj)) {
$pollInfo = $pollObj->get_info_filtered();
$pollObj->delete();
define("SHOW_POLLLIST", true);
include "polllist.php";
}