PluginProbe
Insert Html Snippet / 1.1
Insert Html Snippet v1.1
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 / settings.php

settings.php in Insert Html Snippet 1.1, at admin/settings.php

78 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 global $wpdb;
4 // Load the options
5
6
7 if($_POST){
8
9 $_POST=xyz_trim_deep($_POST);
10 $_POST = stripslashes_deep($_POST);
11
12
13
14 $xyz_ihs_limit = abs(intval($_POST['xyz_ihs_limit']));
15 if($xyz_ihs_limit==0)$xyz_ihs_limit=20;
16
17 $xyz_ihs_credit = $_POST['xyz_ihs_credit'];
18
19
20 update_option('xyz_ihs_limit',$xyz_ihs_limit);
21 update_option('xyz_credit_link',$xyz_ihs_credit);
22
23 ?>
24
25
26 <div class="system_notice_area_style1" id="system_notice_area">
27 Settings updated successfully. &nbsp;&nbsp;&nbsp;<span id="system_notice_area_dismiss">Dismiss</span>
28 </div>
29
30
31 <?php
32 }
33
34
35 ?>
36
37 <div>
38
39
40 <form method="post">
41 <div style="float: left;width: 98%">
42 <fieldset style=" width:100%; border:1px solid #F7F7F7; padding:10px 0px 15px 10px;">
43 <legend ><h3>Settings</h3></legend>
44 <table class="widefat" style="width:99%;">
45 <tr valign="top">
46 <td scope="row" ><label for="xyz_ihs_credit">Credit link to author</label>
47 </td>
48 <td><select name="xyz_ihs_credit" id="xyz_ihs_credit">
49 <option value="ihs"
50 <?php if(isset($_POST['xyz_ihs_credit']) && $_POST['xyz_ihs_credit']=='ihs') { echo 'selected';}elseif(get_option('xyz_credit_link')=="ihs"){echo 'selected';} ?>>Enable</option>
51 <option value="0"
52 <?php if(isset($_POST['xyz_ihs_credit']) && $_POST['xyz_ihs_credit']!='ihs') { echo 'selected';}elseif(get_option('xyz_credit_link')!="ihs"){echo 'selected';} ?>>Disable</option>
53
54 </select>
55 </td>
56 </tr>
57
58 <tr valign="top">
59 <td scope="row" class=" settingInput" id=""><label for="xyz_ihs_limit">Pagination limit</label></td>
60 <td id=""><input name="xyz_ihs_limit" type="text"
61 id="xyz_ihs_limit" value="<?php if(isset($_POST['xyz_ihs_limit']) ){echo abs(intval($_POST['xyz_ihs_limit']));}else{print(get_option('xyz_ihs_limit'));} ?>" />
62 </td>
63 </tr>
64
65 <tr valign="top">
66 <td scope="row" class=" settingInput" id="bottomBorderNone">
67 </td>
68 <td id="bottomBorderNone"><input style="margin:10px 0 20px 0;" id="submit" class="button-primary bottonWidth" type="submit" value=" Update Settings " />
69 </td>
70 </tr>
71
72 </table>
73 </fieldset>
74
75 </div>
76
77 </form>
78 </div>