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


PHP PoTable::deleteBy方法代码示例

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


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

示例1: PoTable

         $id = $val->validasi($_POST['id'], 'sql');
         $tabledel = new PoTable('category');
         $tabledel->deleteBy('id_category', $id);
         header('location:../../admin.php?mod=' . $mod);
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'category' and $act == 'multidelete') {
     if ($currentRoleAccess->delete_access == "Y") {
         $totaldata = $val->validasi($_POST['totaldata'], 'xss');
         if ($totaldata != "0") {
             $itemdel = $_POST['item'];
             $tabledel = new PoTable('category');
             foreach ($itemdel as $item) {
                 $id = $val->validasi($item['deldata'], 'xss');
                 $tabledel->deleteBy('id_category', $id);
             }
             header('location:../../admin.php?mod=' . $mod);
         } else {
             header('location:../../404.php');
         }
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'category' and $act == 'input') {
     if ($currentRoleAccess->write_access == "Y") {
         $title = $val->validasi($_POST['title'], 'xss');
         $seotitle = seo_title($title);
         $table = new PoTable('category');
         $table->save(array('title' => $title, 'seotitle' => $seotitle));
         header('location:../../admin.php?mod=' . $mod);
开发者ID:rad4n,项目名称:erekutoro,代码行数:31,代码来源:proses.php

示例2: header

                 $tabledel->deleteBy('id_gallery', $id);
             }
             header('location:../../admin.php?mod=' . $mod);
         } else {
             header('location:../../404.php');
         }
     } else {
         header('location:../../404.php');
     }
 }
 // Delete Album
 if ($mod == 'gallery' and $act == 'deletealbum') {
     if ($currentRoleAccess->delete_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $tabledel = new PoTable('album');
         $tabledel->deleteBy('id_album', $id);
         header('location:../../admin.php?mod=' . $mod . '&act=album');
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'gallery' and $act == 'inputgallery') {
     if ($currentRoleAccess->write_access == "Y") {
         $id_album = $val->validasi($_POST['id_album'], 'xss');
         $title = $val->validasi($_POST['title'], 'xss');
         if (!empty($_POST['picture'])) {
             $picture = $_POST['picture'];
             $table = new PoTable('gallery');
             $table->save(array('id_album' => $id_album, 'title' => $title, 'picture' => $picture));
             header('location:../../admin.php?mod=' . $mod);
         } else {
             $table = new PoTable('gallery');
开发者ID:rad4n,项目名称:erekutoro,代码行数:31,代码来源:proses.php

示例3: header

         header('location:../../404.php');
     }
 } elseif ($mod == 'user' and $act == 'deleteuserlevel') {
     if ($currentRoleAccess->delete_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $tabledel = new PoTable('user_level');
         $tabledel->deleteBy('id_level', $id);
         header('location:../../admin.php?mod=' . $mod . '&act=userlevel');
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'user' and $act == 'deleteuserrole') {
     if ($currentRoleAccess->delete_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $tabledel = new PoTable('user_role');
         $tabledel->deleteBy('id_role', $id);
         header('location:../../admin.php?mod=' . $mod . '&act=userrole');
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'user' and $act == 'input') {
     if ($currentRoleAccess->write_access == "Y") {
         $username = $val->validasi($_POST['username'], 'xss');
         $pass = md5($_POST[password]);
         $namalengkap = $val->validasi($_POST['nama_lengkap'], 'xss');
         $email = $val->validasi($_POST['email'], 'xss');
         $telp = $val->validasi($_POST['no_telp'], 'xss');
         $level = $val->validasi($_POST['level'], 'xss');
         $tableuser = new PoTable('users');
         $users = $tableuser->findAll('id_user', 'ASC');
         foreach ($users as $user) {
开发者ID:rad4n,项目名称:cfcd,代码行数:31,代码来源:proses.php

示例4: PoTable

         $id = $val->validasi($_POST['id'], 'sql');
         $tabledel = new PoTable('siswa');
         $tabledel->deleteBy('id_siswa', $id);
         header('location:../../admin.php?mod=' . $mod);
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'siswa' and $act == 'multidelete') {
     if ($currentRoleAccess->delete_access == "Y") {
         $totaldata = $val->validasi($_POST['totaldata'], 'xss');
         if ($totaldata != "0") {
             $itemdel = $_POST['item'];
             $tabledel = new PoTable('siswa');
             foreach ($itemdel as $item) {
                 $id = $val->validasi($item['deldata'], 'xss');
                 $tabledel->deleteBy('id_siswa', $id);
             }
             header('location:../../admin.php?mod=' . $mod);
         } else {
             header('location:../../404.php');
         }
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'siswa' and $act == 'delimage') {
     if ($currentRoleAccess->delete_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $picture = '';
         $data = array('picture' => $picture);
         $table = new PoTable('siswa');
         $table->updateBy('id_siswa', $id, $data);
开发者ID:arakoswara,项目名称:ABSENSI,代码行数:31,代码来源:proses.php

示例5: PoTable

         $id = $val->validasi($_POST['id'], 'sql');
         $tabledel = new PoTable('comment');
         $tabledel->deleteBy('id_comment', $id);
         header('location:../../admin.php?mod=' . $mod);
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'comment' and $act == 'multidelete') {
     if ($currentRoleAccess->delete_access == "Y") {
         $totaldata = $val->validasi($_POST['totaldata'], 'xss');
         if ($totaldata != "0") {
             $itemdel = $_POST['item'];
             $tabledel = new PoTable('comment');
             foreach ($itemdel as $item) {
                 $id = $val->validasi($item['deldata'], 'xss');
                 $tabledel->deleteBy('id_comment', $id);
             }
             header('location:../../admin.php?mod=' . $mod);
         } else {
             header('location:../../404.php');
         }
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'comment' and $act == 'approve') {
     if ($currentRoleAccess->modify_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $active = $val->validasi($_POST['active'], 'xss');
         $data = array('active' => $active);
         $table = new PoTable('comment');
         $table->updateBy('id_comment', $id, $data);
开发者ID:rad4n,项目名称:cfcd,代码行数:31,代码来源:proses.php

示例6: header

         } else {
             $tabledel->deleteBy('id_post', $id);
         }
         header('location:../../admin.php?mod=' . $mod);
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'post' and $act == 'multidelete') {
     if ($currentRoleAccess->delete_access == "Y") {
         $totaldata = $val->validasi($_POST['totaldata'], 'xss');
         if ($totaldata != "0") {
             $itemdel = $_POST['item'];
             $tabledel = new PoTable('post');
             foreach ($itemdel as $item) {
                 $id = $val->validasi($item['deldata'], 'xss');
                 $tabledel->deleteBy('id_post', $id);
             }
             header('location:../../admin.php?mod=' . $mod);
         } else {
             header('location:../../404.php');
         }
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'post' and $act == 'delimage') {
     if ($currentRoleAccess->delete_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $picture = '';
         $data = array('picture' => $picture);
         $table = new PoTable('post');
         $table->updateBy('id_post', $id, $data);
开发者ID:rad4n,项目名称:kelinci,代码行数:31,代码来源:proses.php

示例7: PoTable

 $act = $_POST['act'];
 $tableroleaccess = new PoTable('user_role');
 $currentRoleAccess = $tableroleaccess->findByAnd(id_level, $_SESSION['leveluser'], module, $mod);
 $currentRoleAccess = $currentRoleAccess->current();
 // Hapus Theme
 if ($mod == 'theme' and $act == 'delete') {
     if ($currentRoleAccess->delete_access == "Y") {
         $id = $val->validasi($_POST['id'], 'sql');
         $tabledel = new PoTable('theme');
         $currentSearch = $tabledel->findBy(id_theme, $id);
         $currentSearch = $currentSearch->current();
         $folder = $currentSearch->folder;
         $dirPath = "../../../po-content/{$folder}";
         $deletef = deleteDir($dirPath);
         if ($deletef) {
             $tabledel->deleteBy('id_theme', $id);
             header('location:../../admin.php?mod=' . $mod);
         } else {
             header('location:../../404.php');
         }
     } else {
         header('location:../../404.php');
     }
 } elseif ($mod == 'theme' and $act == 'input') {
     if ($currentRoleAccess->write_access == "Y") {
         $extensionList = array("zip");
         $fileName = $_FILES['fupload']['name'];
         $tmpName = $_FILES['fupload']['tmp_name'];
         $fileType = $_FILES['fupload']['type'];
         $fileSize = $_FILES['fupload']['size'];
         $pecah = explode(".", $fileName);
开发者ID:rad4n,项目名称:kelinci,代码行数:31,代码来源:proses.php

示例8: header

<?php

session_start();
if (empty($_SESSION['namauser']) and empty($_SESSION['passuser'])) {
    header('location:../../404.php');
} else {
    include_once '../../../po-library/po-database.php';
    include_once '../../../po-library/po-function.php';
    $val = new Povalidasi();
    $mod = $_POST['mod'];
    $act = $_POST['act'];
    // Delete Event
    if ($mod == 'event' and $act == 'delete') {
        $id = $val->validasi($_POST['id'], 'sql');
        $tabledel = new PoTable('event');
        $tabledel->deleteBy('id_event', $id);
        header('location:../../admin.php?mod=' . $mod);
    } elseif ($mod == 'event' and $act == 'input') {
        $title = $val->validasi($_POST['title'], 'xss');
        $seotitle = seo_title($title);
        $start = $val->validasi($_POST['start'], 'xss');
        $end = $val->validasi($_POST['end'], 'xss');
        $allday = $val->validasi($_POST['allday'], 'xss');
        $data = $_POST['content'];
        $data = stripslashes($data);
        $eutf = htmlspecialchars($data, ENT_QUOTES);
        $color = $val->validasi($_POST['color'], 'xss');
        $table = new PoTable('event');
        $table->save(array('title' => $title, 'startevt' => $start, 'endevt' => $end, 'allday' => $allday, 'content' => $eutf, 'seotitle' => $seotitle, 'color' => $color));
        header('location:../../admin.php?mod=' . $mod);
    } elseif ($mod == 'event' and $act == 'update') {
开发者ID:kevinmel2000,项目名称:phpindonesia.or.id-profile,代码行数:31,代码来源:proses.php


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