PluginProbe
Insert Html Snippet / trunk
Insert Html Snippet vtrunk
1.4.6 trunk 1.0 1.0.1 1.1 1.1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.4 1.4.1 1.4.2 1.4.3 All 27 releases
insert-html-snippet / admin / snippet-delete.php

snippet-delete.php in Insert Html Snippet trunk, at admin/snippet-delete.php

28 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) )
3 exit;
4 global $wpdb;
5 $_POST = stripslashes_deep($_POST);
6 $_GET = stripslashes_deep($_GET);
7 $xyz_ihs_snippetId = intval($_GET['snippetId']);
8 $xyz_ihs_pageno = intval($_GET['pageno']);
9 if (! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'ihs-del_'.$xyz_ihs_snippetId )) {
10 wp_nonce_ays( 'ihs-del_'.$xyz_ihs_snippetId );
11 exit;
12 }
13 else {
14 if($xyz_ihs_snippetId=="" || !is_numeric($xyz_ihs_snippetId)){
15 wp_safe_redirect(admin_url('admin.php?page=insert-html-snippet-manage'));
16 exit();
17 }
18 $snippetCount = $wpdb->query($wpdb->prepare( 'SELECT * FROM '.$wpdb->prefix.'xyz_ihs_short_code WHERE id=%d LIMIT 0,1',$xyz_ihs_snippetId )) ;
19 if($snippetCount==0){
20 wp_safe_redirect(admin_url('admin.php?page=insert-html-snippet-manage&xyz_ihs_msg=2'));
21 exit();
22 }else{
23 $wpdb->query($wpdb->prepare( 'DELETE FROM '.$wpdb->prefix.'xyz_ihs_short_code WHERE id=%d',$xyz_ihs_snippetId)) ;
24 wp_safe_redirect(admin_url('admin.php?page=insert-html-snippet-manage&xyz_ihs_msg=3&pagenum='.$xyz_ihs_pageno));
25 exit();
26 }
27 }
28 ?>