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


PHP Poll::delete方法代码示例

本文整理汇总了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');
 }
开发者ID:unisexx,项目名称:thaigcd2015,代码行数:9,代码来源:polls.php

示例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.'));
 }
开发者ID:pinjaliina,项目名称:aanestys,代码行数:11,代码来源:poll_controller.php

示例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');
?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:22,代码来源:do_delete.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";
}
开发者ID:nsystem1,项目名称:clanscripts,代码行数:31,代码来源:delete.php


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