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


PHP do_delete函数代码示例

本文整理汇总了PHP中do_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP do_delete函数的具体用法?PHP do_delete怎么用?PHP do_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: gastarTerreno

 public function gastarTerreno($id_personagem, $id_cidade, $terreno)
 {
     $query = "\n            SELECT terreno\n            FROM personagem_terreno\n            WHERE id_personagem = '" . do_escape($id_personagem) . "'\n            AND id_cidade = '" . do_escape($id_cidade) . "'\n        ";
     $terrenoAtual = intval(get_value($query, 'terreno'));
     if ($terrenoAtual < $terreno) {
         $msgerror = _('You need %s terrain, but have only %s.');
         throw new Exception(sprintf($msgerror, $terreno, $terrenoAtual));
     }
     $query = "\n            UPDATE personagem_terreno SET\n                terreno = terreno - " . do_escape($terreno) . "\n            WHERE id_personagem = '" . do_escape($id_personagem) . "'\n            AND id_cidade = '" . do_escape($id_cidade) . "'\n        ";
     do_update($query);
     $query = "\n            DELETE FROM personagem_terreno\n            WHERE id_personagem = '" . do_escape($id_personagem) . "'\n            AND id_cidade = '" . do_escape($id_cidade) . "'\n            AND terreno <= 0\n        ";
     do_delete($query);
 }
开发者ID:landim32,项目名称:dungeon-blazer,代码行数:13,代码来源:Personagem.inc.php

示例2: excluir

 public function excluir($id_curso)
 {
     $query = "\n            DELETE FROM curso\n            WHERE id_curso = '" . do_escape($id_curso) . "'\n        ";
     do_delete($query);
 }
开发者ID:landim32,项目名称:escola-bem-me-quer,代码行数:5,代码来源:Curso.inc.php

示例3: do_insert

                 //new answer to be added
                 $new_answers[] = $answer;
             }
         }
     }
     if (count($new_answers) && _POST('modify') && is_numeric(_POST('modify'))) {
         //new answers to be added
         do_insert($new_answers, 'vcn_answers');
     }
     //add answers to question
     if (!_POST('modify') || !is_numeric(_POST('modify'))) {
         do_insert($answers, 'vcn_answers');
     }
     //delete answers
     if (_POST('deletes')) {
         do_delete(explode(',', trim(_POST('deletes'), ',')), 'vcn_answers', 'id');
         //delete old answers
     }
 }
 //delete question
 if (_GET('del')) {
     delete_qdata(_GET('del'));
 }
 //data
 if (_GET('edit')) {
     $data['result'] = get(_GET('edit'));
     //get question answers
     if (!count($data['result'])) {
         show_error('Not found', 'Không tồn tại dữ liệu.');
     }
 }
开发者ID:hoangsoft90,项目名称:multichoice-quiz-logic,代码行数:31,代码来源:nhap-cau-hoi.php

示例4: excluir

 public static function excluir($id_arte)
 {
     $query = "\n            DELETE FROM arte\n            WHERE id_arte = '" . do_escape($id_arte) . "'\n        ";
     do_delete($query);
 }
开发者ID:landim32,项目名称:gurps-simulator,代码行数:5,代码来源:ArteClass.php

示例5: excluirRelacionamento

 public function excluirRelacionamento($id_responsavel, $id_aluno)
 {
     $query = "\n            DELETE FROM aluno_responsavel\n            WHERE id_responsavel = '" . do_escape($id_responsavel) . "'\n            AND id_aluno = '" . do_escape($id_aluno) . "'\n        ";
     do_delete($query);
 }
开发者ID:landim32,项目名称:escola-bem-me-quer,代码行数:5,代码来源:Pessoa.inc.php

示例6: removerMaterial

 private function removerMaterial($personagem, $materiais)
 {
     foreach ($materiais as $material => $quantidade) {
         for ($i = 0; $i < $quantidade; $i++) {
             $query = "\n                    UPDATE item SET\n                        quantidade = quantidade - " . do_escape($quantidade) . "\n                    WHERE id_personagem = '" . do_escape($personagem->id_personagem) . "'\n                    AND slug = '" . do_escape($material) . "'\n                ";
             do_update($query);
             $query = "\n                    DELETE FROM item\n                    WHERE id_personagem = '" . do_escape($personagem->id_personagem) . "'\n                    AND slug = '" . do_escape($material) . "'\n                    AND quantidade <= 0\n                ";
             do_delete($query);
             $query = "\n                    UPDATE item SET\n                        quantidade_venda = quantidade\n                    WHERE id_personagem = '" . do_escape($personagem->id_personagem) . "'\n                    AND slug = '" . do_escape($material) . "'\n                    AND quantidade >= quantidade_venda\n                ";
             do_update($query);
         }
     }
 }
开发者ID:landim32,项目名称:dungeon-blazer,代码行数:13,代码来源:Profissao.inc.php

示例7: excluir

 public function excluir($id_movimento)
 {
     $query = "\n            UPDATE movimento SET\n                cod_situacao = '" . do_escape(MOVIMENTO_CANCELADO) . "'\n            WHERE id_movimento = '" . do_escape($id_movimento) . "'\n        ";
     do_delete($query);
 }
开发者ID:landim32,项目名称:escola-bem-me-quer,代码行数:5,代码来源:Movimento.inc.php

示例8: isset

        //no error
        $output .= "\n          <h1>{$lang_item_edit['search_items']}</h1>";
}
$output .= "\n        </div>";
$action = isset($_GET['action']) ? $_GET['action'] : NULL;
switch ($action) {
    case "search":
        search();
        break;
    case "do_search":
        do_search();
        break;
    case "add_new":
        add_new();
        break;
    case "do_update":
        do_update();
        break;
    case "edit":
        edit();
        break;
    case "delete":
        delete();
        break;
    case "do_delete":
        do_delete();
        break;
    default:
        search();
}
require_once "footer.php";
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:31,代码来源:item.php

示例9: verificar

 private function verificar($id_construcao)
 {
     $construcao = $this->pegar($id_construcao);
     $concluido = true;
     foreach ($construcao->teste as $pericia) {
         if (!($pericia->progresso >= 100)) {
             $concluido = false;
             break;
         }
     }
     if ($concluido === true) {
         foreach ($construcao->material as $material) {
             if (!($pericia->progresso > 100)) {
                 $concluido = false;
                 break;
             }
         }
     }
     if ($concluido === true) {
         $query = "\n                UPDATE construcao SET\n                    cod_situacao = '" . do_escape(CONSTRUCAO_ATIVA) . "'\n                WHERE id_construcao = '" . do_escape($id_construcao) . "'\n            ";
         do_update($query);
         $query = "\n                DELETE FROM construcao_material\n                WHERE id_construcao = '" . do_escape($id_construcao) . "'\n            ";
         do_delete($query);
         $query = "\n                DELETE FROM construcao_pericia\n                WHERE id_construcao = '" . do_escape($id_construcao) . "'\n            ";
         do_delete($query);
     }
 }
开发者ID:landim32,项目名称:dungeon-blazer,代码行数:27,代码来源:Construcao.inc.php

示例10: yim_logout

function yim_logout()
{
    $oauth_data = $_SESSION['oauth_data'];
    $oauth_token = $oauth_data['oauth_token'];
    $access_token_secret = $oauth_data['oauth_token_secret'];
    $session_data = $_SESSION['session_data'];
    $url = 'http://developer.messenger.yahooapis.com/v1/session?sid=' . $session_data->sessionId;
    $params = yim_get_basic_oauth_params();
    $params['oauth_token'] = $oauth_token;
    $params['oauth_signature'] = oauth_compute_plaintext_sig(OAUTH_CONSUMER_SECRET, $access_token_secret);
    $query_param_string = oauth_http_build_query($params);
    $url = $url . '&' . $query_param_string;
    $response = do_delete($url);
    return yim_is_successful_response($response);
}
开发者ID:kontinuity,项目名称:ajaxim-yahoo-plugin,代码行数:15,代码来源:yim.php

示例11: die

    }
    $class_obj->remove_file($_REQUEST["name"]);
}
$class_id = $_REQUEST["class"];
if (!is_numeric($class_id)) {
    die("go away, loser");
}
$class_obj = HardwareClass::load_from_id($class_id);
if (array_key_exists("action", $_REQUEST)) {
    $action = $_REQUEST["action"];
    switch ($action) {
        case "rename":
            do_rename($class_obj);
            break;
        case "delete":
            do_delete($class_obj);
            break;
        case "add_member":
            do_add_mem($class_obj);
            break;
        case "remove_members":
            do_delete_members($class_obj);
            break;
        case "delete_over":
            do_delete_override($class_obj);
            break;
        case "create_over":
            do_create_override($class_obj);
            break;
        case "add_file":
            do_add_file($class_obj);
开发者ID:TNValleyFiddlersConvention,项目名称:fiddlers,代码行数:31,代码来源:class.php

示例12: process

function process($user, $action)
{
    say("< " . $action);
    $request = json_decode($action, true);
    if (empty($request)) {
        say("ERROR: invalid request body");
        return;
    }
    if (!array_key_exists("method", $request) || !array_key_exists("resource", $request) || !array_key_exists("msg_id", $request)) {
        say("ERROR: missing mandatory property");
        return;
    }
    $method = $request["method"];
    $response = NULL;
    if ($method == "POST" && $request["resource"] == "/slideshare") {
        $response = get_slideshare($request);
    } else {
        if ($method == "POST") {
            $response = do_post($user, $request);
        } else {
            if ($method == "PUT") {
                $response = do_put($user, $request);
            } else {
                if ($method == "GET") {
                    $response = do_get($user, $request);
                } else {
                    if ($method == "DELETE") {
                        $response = do_delete($user, $request);
                    } else {
                        if ($method == "SUBSCRIBE") {
                            $response = do_subscribe($user, $request);
                        } else {
                            if ($method == "UNSUBSCRIBE") {
                                $response = do_unsubscribe($user, $request);
                            } else {
                                if ($method == "NOTIFY") {
                                    $response = do_notify($user, $request);
                                } else {
                                    // this is an unknown request
                                    $response = array("code" => "failed", "reason" => "unknown command " . $method . " " . $resource);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $response['msg_id'] = $request['msg_id'];
    //header("Content-type: application/json");
    send($user, json_encode($response));
}
开发者ID:ravijoshi0791,项目名称:vvowproject,代码行数:52,代码来源:restserver.php

示例13: print_error

    if (!($existing = get_record('block_exabeporitem', 'id', $id, 'userid', $USER->id))) {
        print_error("wrongfileid", "block_exabis_eportfolio");
    }
    $returnurl = $CFG->wwwroot . '/blocks/exabis_eportfolio/view_items.php?courseid=' . $courseid . "&type=file";
    //?userid='.$existing->userid;
} else {
    $existing = false;
    $returnurl = $CFG->wwwroot . '/blocks/exabis_eportfolio/view_items.php?courseid=' . $courseid . "&type=file";
    //'index.php?userid='.$USER->id;
}
if ($action == 'delete') {
    if (!$existing) {
        print_error("wrongfilepostid", "block_exabis_eportfolio");
    }
    if (data_submitted() and $confirm and confirm_sesskey()) {
        do_delete($existing, $returnurl, $courseid);
        redirect($returnurl);
    } else {
        $optionsyes = array('id' => $id, 'action' => 'delete', 'confirm' => 1, 'sesskey' => sesskey(), 'courseid' => $courseid);
        $optionsno = array('userid' => $existing->userid, 'courseid' => $courseid);
        print_header("{$SITE->shortname}", $SITE->fullname);
        // ev. noch eintrag anzeigen!!!
        //blog_print_entry($existing);
        echo '<br />';
        notice_yesno(get_string("deletefileconfirm", "block_exabis_eportfolio"), 'add_file.php', 'view_items.php', $optionsyes, $optionsno, 'post', 'get');
        print_footer();
        die;
    }
}
require_once "{$CFG->dirroot}/blocks/exabis_eportfolio/lib/item_edit_form.php";
if ($checked_file != '' && $action == 'add') {
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:import_moodle_add_file.php

示例14: excluir

 public static function excluir($id_feed)
 {
     $query = "\n            DELETE FROM feed\n            WHERE id_feed = '" . do_escape($id_feed) . "'\n        ";
     do_delete($query);
 }
开发者ID:landim32,项目名称:gurps-simulator,代码行数:5,代码来源:FeedClass.php

示例15: desfazerAmigo

 public function desfazerAmigo($id_jogador)
 {
     $query = "\n            DELETE FROM jogador_amigo\n            WHERE (\n                id_jogador = '" . do_escape($this->id_jogador) . "'\n                AND id_amigo = '" . do_escape($id_amigo) . "'\n            ) OR (\n                id_amigo = '" . do_escape($this->id_jogador) . "'\n                AND id_jogador = '" . do_escape($id_amigo) . "'\n            )\n        ";
     do_delete($query);
 }
开发者ID:landim32,项目名称:gurps-simulator,代码行数:5,代码来源:JogadorClass.php


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