PluginProbe
Insert PHP Code Snippet / 1.0
Insert PHP Code Snippet v1.0
1.4.7 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 1.4.4 1.4.5 1.4.6 trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3 All 27 releases
insert-php-code-snippet / admin / settings.php

settings.php in Insert PHP Code Snippet 1.0, at admin/settings.php

73 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 $xyz_ips_limit = abs(intval($_POST['xyz_ips_limit']));
13 if($xyz_ips_limit==0)$xyz_ips_limit=20;
14
15 $xyz_ips_credit = $_POST['xyz_ips_credit'];
16
17
18 update_option('xyz_ips_limit',$xyz_ips_limit);
19 update_option('xyz_credit_link',$xyz_ips_credit);
20
21 ?>
22
23 <div class="system_notice_area_style1" id="system_notice_area">
24 Settings updated successfully. &nbsp;&nbsp;&nbsp;<span id="system_notice_area_dismiss">Dismiss</span>
25 </div>
26 <?php
27 }
28
29
30 ?>
31
32 <div>
33
34
35 <form method="post">
36 <div style="float: left;width: 98%">
37 <fieldset style=" width:100%; border:1px solid #F7F7F7; padding:10px 0px 15px 10px;">
38 <legend ><h3>Settings</h3></legend>
39 <table class="widefat" style="width:99%;">
40 <tr valign="top">
41 <td scope="row" ><label for="xyz_ips_credit">Credit link to author</label>
42 </td>
43 <td><select name="xyz_ips_credit" id="xyz_ips_credit">
44 <option value="ips"
45 <?php if(isset($_POST['xyz_ips_credit']) && $_POST['xyz_ips_credit']=='ips') { echo 'selected';}elseif(get_option('xyz_credit_link')=="ips"){echo 'selected';} ?>>Enable</option>
46 <option value="0"
47 <?php if(isset($_POST['xyz_ips_credit']) && $_POST['xyz_ips_credit']!='ips') { echo 'selected';}elseif(get_option('xyz_credit_link')!="ips"){echo 'selected';} ?>>Disable</option>
48
49 </select>
50 </td>
51 </tr>
52
53 <tr valign="top">
54 <td scope="row" class=" settingInput" id=""><label for="xyz_ips_limit">Pagination limit</label></td>
55 <td id=""><input name="xyz_ips_limit" type="text"
56 id="xyz_ips_limit" value="<?php if(isset($_POST['xyz_ips_limit']) ){echo abs(intval($_POST['xyz_ips_limit']));}else{print(get_option('xyz_ips_limit'));} ?>" />
57 </td>
58 </tr>
59
60 <tr valign="top">
61 <td scope="row" class=" settingInput" id="bottomBorderNone">
62 </td>
63 <td id="bottomBorderNone"><input style="margin:10px 0 20px 0;" id="submit" class="button-primary bottonWidth" type="submit" value=" Update Settings " />
64 </td>
65 </tr>
66
67 </table>
68 </fieldset>
69
70 </div>
71
72 </form>
73 </div>