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


PHP common::delete方法代码示例

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


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

示例1: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    $obj_setting->delete('news_category', "id={$id}");
    $_SESSION['success_msg'] = 'Category deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/page/news_category.php' . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('news_category', "id={$id}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT category_name FROM news_category id='" . $id . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->tab_title;
} else {
    $pageName = 'There is no Category exists with this id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:19,代码来源:articles_delete_code.php

示例2: common

<?php

/********************************************************************************************************************

#Coder       : Kapil Verma

#Description : This Code is used to display list of all product and remove any on them 


*********************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_product = new common();
$currentTimestamp = getCurrentTimestamp();
if ($prod_id != '' && $action == 'delete') {
    $deleteProduct = $obj_product->delete(TBL_MEMBER, 'id =' . $prod_id);
    unlink(LIST_ROOT_ADMIN . "/members/upload/" . $file);
    $_SESSION['msg'] = RECORD_DELETE;
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/admin/members/index.php";</script>';
}
$getProduct = $obj_product->read(TBL_MEMBER);
?>



开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:22,代码来源:code.php

示例3: common

<?php

/********************************************************************************************************************

#Coder       : Manoj Pandit

#Description : This Code is used to display list of all product and remove any on them 


*********************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_block = new common();
$currentTimestamp = getCurrentTimestamp();
if ($model_id != '' && $action == 'delete') {
    $logoname = $obj_block->getNameById(TBL__HTMLTEMPLATE, 'id=' . $model_id);
    /*if($logoname->image!='') {
    		@chmod(LIST_ROOT_ADMIN."/images/new_model/",0777);
    		unlink(LIST_ROOT_ADMIN."/images/new_model/".$logoname->image);
    				
    	}*/
    $deleteProduct = $obj_block->delete(TBL__HTMLTEMPLATE, 'id =' . $model_id);
    $_SESSION['msg'] = 'Car Template Successfully Deleted';
    unset($obj_block);
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/htmltemplate/index.php";</script>';
    exit;
}
$getBlock = $obj_block->read(TBL__HTMLTEMPLATE, '', ' creation_date DESC');
unset($obj_block);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:29,代码来源:code.php

示例4: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($pageid) and $pageid != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('pages', " id={$pageid}");
    $_SESSION['success_msg'] = 'Page deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/page/index.php' . $addToUrl . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('pages', " id={$pageid}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT name FROM pages where id='" . $pageid . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->name;
} else {
    $pageName = 'There is no page exists with this page id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:24,代码来源:page_delete_code.php

示例5: common

<?php

/********************************************************************************************************************

#Coder       : Manoj Pandit

#Description : This Code is used to display list of all product and remove any on them 


*********************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_block = new common();
$currentTimestamp = getCurrentTimestamp();
if ($model_id != '' && $action == 'delete') {
    $logoname = $obj_block->getNameById(TBL_NEW_MODEL, 'id=' . $model_id);
    /*if($logoname->image!='') {
    		@chmod(LIST_ROOT_ADMIN."/images/new_model/",0777);
    		unlink(LIST_ROOT_ADMIN."/images/new_model/".$logoname->image);
    				
    	}*/
    $deleteProduct = $obj_block->delete(TBL_NEW_MODEL, 'id =' . $model_id);
    $_SESSION['msg'] = 'New Model Successfully Deleted';
    unset($obj_block);
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/new_model/index.php";</script>';
    exit;
}
$getBlock = $obj_block->read(TBL_NEW_MODEL, '', ' creation_date DESC');
unset($obj_block);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:29,代码来源:code.php

示例6: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('contact', " id={$id}");
    $_SESSION['success_msg'] = 'Enquiry deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/contact/car/index.php' . $addToUrl . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('contact', " id={$contactid}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT * FROM contact where id='" . $id . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->name;
} else {
    $pageName = 'No enquiry exists with this id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:24,代码来源:contact_delete_code.php

示例7: IN

<?php

extract($_GET);
extract($_POST);
#getting array of ids from multiple checkbox and then imploding those ids with ',' to put in IN()
$totalIds = implode("','", $allselect);
$obj_setting = new common();
# Here we are deleting all selected pages
if (isset($pageid) and $pageid != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('email_log', " id IN('{$pageid}')");
    $_SESSION['success_msg'] = 'Enquiry deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/contact/log/index.php' . $addToUrl . '";</script>';
}
#taking imploded ids and checking if these ids exists in database or not
#if not then we are showing error message and if found then we are fetching names
#of those pages to show
$total_rows = $obj_setting->numberOfRows('contact', " id IN('{$totalIds}')");
if ($total_rows > 0) {
    $totalNames = array();
    $singlePage = $obj_setting->customQuery("SELECT * FROM email_log where id IN('{$totalIds}')");
    while ($getPageName = $db->fetchNextObject($singlePage)) {
        $totalNames[] = $getPageName->name;
    }
    $pageName = implode("&nbsp;,&nbsp;", $totalNames);
} else {
    $pageName = 'No Enquiry exists with these ids.';
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:contact_multiple_delete_code.php

示例8: IN

<?php

extract($_GET);
extract($_POST);
#getting array of ids from multiple checkbox and then imploding those ids with ',' to put in IN()
echo $totalIds = implode("','", $allselect);
$obj_setting = new common();
# Here we are deleting all selected pages
if (isset($pageid) and $pageid != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('brands', " id IN('{$pageid}')");
    $_SESSION['success_msg'] = 'Brands deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/new_stock/brands/index.php' . $addToUrl . '";</script>';
}
#taking imploded ids and checking if these ids exists in database or not
#if not then we are showing error message and if found then we are fetching names
#of those pages to show
$total_rows = $obj_setting->numberOfRows('brands', " id IN('{$totalIds}')");
if ($total_rows > 0) {
    $totalNames = array();
    $singlePage = $obj_setting->customQuery("SELECT * FROM brands where id IN('{$totalIds}')");
    while ($getPageName = $db->fetchNextObject($singlePage)) {
        $totalNames[] = $getPageName->title;
    }
    $pageName = implode("&nbsp;,&nbsp;", $totalNames);
} else {
    $pageName = 'No Enquiry exists with these ids.';
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:delete_code.php

示例9: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    $obj_setting->delete('news_category', "id={$id}");
    $obj_setting->delete('news_articles', "category_id={$id}");
    $_SESSION['success_msg'] = 'Category and its associated articles deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/page/news_category.php' . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('news_category', "id={$id}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT category_name FROM news_category id='" . $id . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->tab_title;
} else {
    $pageName = 'There is no Category exists with this id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:20,代码来源:news_category_delete_code.php

示例10: IN

<?php

extract($_GET);
extract($_POST);
#getting array of ids from multiple checkbox and then imploding those ids with ',' to put in IN()
$totalIds = implode("','", $allselect);
$obj_setting = new common();
# Here we are deleting all selected pages
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    $obj_setting->delete('accessories', " id IN('{$id}')");
    $_SESSION['success_msg'] = 'Products deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/accessories/index.php' . '";</script>';
}
#taking imploded ids and checking if these ids exists in database or not
#if not then we are showing error message and if found then we are fetching names
#of those pages to show
$total_rows = $obj_setting->numberOfRows('accessories', " id IN('{$totalIds}')");
if ($total_rows < 0) {
    $pageName = 'There are no accessories exists with these banner ids.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:21,代码来源:accessories_multiple_delete_code.php

示例11: IN

<?php

extract($_GET);
extract($_POST);
#getting array of ids from multiple checkbox and then imploding those ids with ',' to put in IN()
$totalIds = implode(",", $allselect);
$obj_setting = new common();
# Here we are deleting all selected pages
if (isset($pageid) and $pageid != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('contact', " FIND_IN_SET(id,'{$pageid}')");
    $_SESSION['success_msg'] = 'Enquiry deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/contact/general/index.php' . $addToUrl . '";</script>';
}
#taking imploded ids and checking if these ids exists in database or not
#if not then we are showing error message and if found then we are fetching names
#of those pages to show
$total_rows = $obj_setting->numberOfRows('contact', " FIND_IN_SET(id,'{$totalIds}')");
if ($total_rows > 0) {
    $totalNames = array();
    $singlePage = $obj_setting->customQuery("SELECT * FROM contact where FIND_IN_SET(id,'{$totalIds}')");
    while ($getPageName = $db->fetchNextObject($singlePage)) {
        $totalNames[] = $getPageName->name;
    }
    $pageName = implode("&nbsp;,&nbsp;", $totalNames);
} else {
    $pageName = 'No Enquiry exists with these ids.';
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:guest_multiple_delete_code.php

示例12: IN

<?php

extract($_GET);
extract($_POST);
#getting array of ids from multiple checkbox and then imploding those ids with ',' to put in IN()
$totalIds = implode("','", $allselect);
$obj_setting = new common();
# Here we are deleting all selected pages
if (isset($pageid) and $pageid != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('banner', " id IN('{$pageid}')");
    $_SESSION['success_msg'] = 'Banner deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/banner/index.php' . $addToUrl . '";</script>';
}
#taking imploded ids and checking if these ids exists in database or not
#if not then we are showing error message and if found then we are fetching names
#of those pages to show
$total_rows = $obj_setting->numberOfRows('banner', " id IN('{$totalIds}')");
if ($total_rows > 0) {
    $totalNames = array();
    $singlePage = $obj_setting->customQuery("SELECT * FROM banner where id IN('{$totalIds}')");
    while ($getPageName = $db->fetchNextObject($singlePage)) {
        $totalNames[] = $getPageName->title;
    }
    $pageName = implode("&nbsp;,&nbsp;", $totalNames);
} else {
    $pageName = 'No Banner exists with these ids.';
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:banner_multiple_delete_code.php

示例13: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('email_log', " id={$id}");
    $_SESSION['success_msg'] = 'Enquiry deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/contact/log/index.php' . $addToUrl . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('email_log', " id={$contactid}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT * FROM email_log where id='" . $id . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->email;
} else {
    $pageName = 'No enquiry exists with this id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:24,代码来源:contact_delete_code.php

示例14: time

        /*
        echo "<pre>";
        print_r($_FILES);
        print_r($_POST); 
        print_r($medias);
        die;
        */
        if (isset($main_image)) {
            if ($main_image) {
                $image_name = $main_image;
            } else {
                $image_name = time() . '-' . $_FILES['image']['name'];
                //$path = LIST_ROOT.'/images/reviews/media/';
                $path = LIST_ROOT_ADMIN_REVIEW_IMAGEPATH . '/';
                move_uploaded_file($_FILES["image"]["tmp_name"], $path . $image_name);
            }
        }
        $_SESSION['success_msg'] = 'Review has been updated successfully.';
        $dataArr = array('short_description' => $short_description, 'old_new' => $old_new, 'editorial' => $editorial, 'pdsf' => $pdsf, 'mpg' => $mpg, 'image' => $image_name, 'make' => $make, 'model' => $model, 'year' => $year, 'expert' => $expert, 'ensemble' => $ensemble, 'characteristique' => $characteristique, 'updated' => getCurrentTimestamp(), 'make_name' => $make_name, 'model_name' => $model_name);
        $review_id = $obj_setting->update('reviews', $dataArr, "id=" . $id);
        $obj_setting->delete('reviews_media', " review_id IN('{$id}')");
        foreach ($medias as $media) {
            $dataArrMedia = array('review_id' => $id, 'media_type' => $media['mediatype'], 'order_id' => $media['order'], 'media_name' => $media['value'], 'updated' => getCurrentTimestamp());
            $review_media_id = $obj_setting->save('reviews_media', $dataArrMedia);
        }
        echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/reviews";</script>';
        exit;
    }
}
unset($obj_setting);
unset($obj);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:page_edit_code.php

示例15: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('car_inquiry', " id={$id}");
    $_SESSION['success_msg'] = 'Enquiry deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/contact/guest/index.php' . $addToUrl . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('car_inquiry', " id={$contactid}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT * FROM car_inquiry where id='" . $id . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->name;
} else {
    $pageName = 'No enquiry exists with this id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:24,代码来源:guest_delete_code.php


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