PluginProbe
Insert Html Snippet / 1.2
Insert Html Snippet v1.2
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 1.2, at admin/snippet-delete.php

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