View difference between Paste ID: eHUaXbeW and QTth1ZLk
SHOW: | | - or go back to the newest paste.
1
<?php
2
//Decode Fixed By Quimbox
3-
$themename="timeline";
3+
function get_theme_option( $option )
4-
$shortname="TL";
4+
{
5
    global $shortname;
6
    return stripslashes( get_option( $shortname."_".$option ) );
7
}
8
9
function get_theme_settings( $option )
10
{
11
    return stripslashes( get_option( $option ) );
12
}
13
14-
$wp_dropdown_rd_admin=$wpdb()$wpdb$wpdb$wpdb$wpdb$wpdb$wpdbget_results$wpdb;
14+
function mytheme_add_admin( )
15
{
16-
$wp_dropdown_rd_admin;
16+
    global $themename;
17-
$wp_getcat$category_list$category_list;
17+
    global $shortname;
18
    global $options;
19-
$category_bulk_list=array_unshift($wp_getcat,"Choose categorie:");
19+
    if ( $_GET['page'] == basename( __FILE__ ) )
20
    {
21
        if ( "save" == $_REQUEST['action'] )
22-
$options=base64_decode("dGltZWxpbmV0ZXJtX3BheXBs")()()get_optionunserialize;
22+
        {
23-
timeline_asf76asf7s()$optionsbase64_decode("dGltZWxpbmVleF8zbWFpbA==");
23+
            foreach ( $options as $value )
24
            {
25
                update_option( $value['id'], $_REQUEST[$value['id']] );
26
            }
27
            foreach ( $options as $value )
28
            {
29
                if ( isset( $_REQUEST[$value['id']] ) )
30
                {
31
                    update_option( $value['id'], $_REQUEST[$value['id']] );
32
                }
33
                else
34
                {
35
                    delete_option( $value['id'] );
36
                }
37
            }
38
            header( "Location: themes.php?page=timeline.php&saved=true" );
39
            exit( );
40
        }
41
        else if ( "reset" == $_REQUEST['action'] )
42
        {
43
            foreach ( $options as $value )
44
            {
45
                delete_option( $value['id'] );
46
            }
47
            header( "Location: themes.php?page=timeline.php&reset=true" );
48
            exit( );
49
        }
50
    }
51
    add_theme_page( $themename." Options", "".$themename." Options", "edit_themes", basename( __FILE__ ), "mytheme_admin" );
52
}
53
54
function mytheme_admin( )
55
{
56
    global $themename;
57
    global $shortname;
58
    global $options;
59
    if ( $_REQUEST['saved'] )
60
    {
61
        echo "<div id=\"message\" class=\"updated fade\"><p><strong>".$themename." settings saved.</strong></p></div>";
62
    }
63
    if ( $_REQUEST['reset'] )
64
    {
65
        echo "<div id=\"message\" class=\"updated fade\"><p><strong>".$themename." settings reset.</strong></p></div>";
66
    }
67
    echo "<div class=\"wrap2\">\r\n<h2>Timeline settings &rarr; Themes By. <a href=\"http://www.fbcoverpro.com/\">www.fbcoverpro.com</a></h2>\r\n<div style=\"padding-bottom: 10px;margin-top: -5px;\">Facebook Timeline Cover Wordpress Themes!</div>\r\n<form method=\"post\">\r\n\t<div id=\"tabs\">\r\n\t\t<div class=\"tab_container\">\r\n\t\t";
68
    foreach ( $options as $value )
69
    {
70
        switch ( $value['type'] )
71
        {
72
            case "open" :
73
                echo "\t\t\t\t<table width=\"100%\" border=\"0\" style=\"background-color:#f9f9f9; padding:10px;\">\r\n\r\n\t\t\t";
74
                break;
75
            case "close" :
76
                echo "\r\n\t\t\t\t</table><br />\r\n\r\n\t\t\t";
77
                break;
78
            case "title" :
79
                echo "\t\t\t\t<table id=\"";
80
                echo $value['id'];
81
                echo "\" width=\"100%\" border=\"0\" style=\"background-color:#ececec; padding:5px 10px;\"><tr>\r\n\t\t\t\t\t<td colspan=\"2\"><h3 style=\"font-family:Georgia,'Times New Roman',Times,serif;\">";
82
                echo $value['name'];
83
                echo "</h3></td>\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t";
84
                break;
85
            case "text" :
86
                echo "\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
87
                echo "<s";
88
                echo "trong>";
89
                echo $value['name'];
90
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\"><input style=\"width:400px;\" name=\"";
91
                echo $value['id'];
92
                echo "\" id=\"";
93
                echo $value['id'];
94
                echo "\" type=\"";
95
                echo $value['type'];
96
                echo "\" value=\"";
97
                if ( get_settings( $value['id'] ) != "" )
98
                {
99
                    echo get_settings( $value['id'] );
100
                }
101
                else
102
                {
103
                    echo $value['std'];
104
                }
105
                echo "\" /></td>\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
106
                echo "<s";
107
                echo "mall>";
108
                echo $value['desc'];
109
                echo "</small></td>\r\n\t\t\t\t</tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\r\n\t\t\t";
110
                break;
111
            case "text_invisible" :
112
                echo "\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
113
                echo "<s";
114
                echo "trong>";
115
                echo $value['name'];
116
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\">&nbsp;</td>\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
117
                echo "<s";
118
                echo "mall>";
119
                echo $value['desc'];
120
                echo "</small></td>\r\n\t\t\t\t</tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\t\t\t";
121
                break;
122
            case "textarea" :
123
                echo "\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
124-
str_replace;
124+
                echo "<s";
125
                echo "trong>";
126
                echo $value['name'];
127
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\"><textarea name=\"";
128
                echo $value['id'];
129
                echo "\" style=\"width:400px; height:200px;\" type=\"";
130
                echo $value['type'];
131
                echo "\" cols=\"\" rows=\"\">";
132
                if ( get_settings( $value['id'] ) != "" )
133
                {
134
                    echo stripslashes( get_settings( $value['id'] ) );
135
                }
136
                else
137
                {
138
                    echo $value['std'];
139
                }
140
                echo "</textarea></td>\r\n\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
141
                echo "<s";
142
                echo "mall>";
143
                echo $value['desc'];
144
                echo "</small></td>\r\n\t\t\t\t</tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\r\n\t\t\t";
145
                break;
146
            case "select" :
147
                echo "\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
148
                echo "<s";
149
                echo "trong>";
150
                echo $value['name'];
151
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\">";
152
                echo "<s";
153
                echo "elect style=\"width:240px;\" \r\n\t\t\t\t\tname=\"";
154
                echo $value['id'];
155
                echo "\" id=\"";
156
                echo $value['id'];
157
                echo "\">\r\n\t\t\t\t\t";
158
                $o = get_settings( $value['id'] );
159
                $len = strlen( $o );
160
                foreach ( $value['vals'] as $option )
161
                {
162
                    echo "<option";
163
                    if ( 0 < $len )
164
                    {
165
                        if ( get_settings( $value['id'] ) == $option )
166
                        {
167
                            echo " selected=\"selected\"";
168
                        }
169
                    }
170
                    else if ( $option == $value['std'] )
171
                    {
172
                        echo " selected=\"selected\"";
173
                    }
174
                    echo ">";
175
                    echo $option;
176
                    echo "</option>";
177
                }
178
                echo "</select></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
179
                echo "<s";
180
                echo "mall>";
181
                echo $value['desc'];
182
                echo "</small></td>\r\n\t\t\t\t</tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\r\n\t\t\t";
183
                break;
184
            case "select2" :
185
                echo "\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
186
                echo "<s";
187
                echo "trong>";
188
                echo $value['name'];
189
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\">";
190
                echo "<s";
191
                echo "elect style=\"width:240px;\" \r\n\t\t\t\t\tname=\"";
192
                echo $value['id'];
193
                echo "\" id=\"";
194
                echo $value['id'];
195
                echo "\">\r\n\t\t\t\t\t";
196
                $o = get_settings( $value['id'] );
197
                $len = strlen( $o );
198
                foreach ( $value['vals'] as $option )
199
                {
200
                    $parts = explode( "|", $option );
201
                    if ( 0 < $len )
202
                    {
203
                        if ( get_settings( $value['id'] ) == $parts[1] )
204
                        {
205
                            $selected = "selected=\"selected\"";
206
                        }
207
                        else
208
                        {
209
                            $selected = NULL;
210
                        }
211
                    }
212
                    else if ( $parts[1] == $value['std'] )
213
                    {
214
                        $selected = "selected=\"selected\"";
215
                    }
216
                    else
217
                    {
218
                        $selected = NULL;
219
                    }
220
                    $op = "<option value='{$parts['1']}' {$selected} >{$parts['0']}</option>";
221
                    echo $op;
222
                }
223
                echo "\t\t\t\t\t\t</select></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
224
                echo "<s";
225
                echo "mall>";
226
                echo $value['desc'];
227
                echo "</small></td>\r\n\t\t\t\t</tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\r\n\t\t\t";
228
                break;
229
            case "pathinfo" :
230
                echo "\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
231
                echo "<s";
232
                echo "trong>";
233
                echo $value['name'];
234
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\"><input readonly=\"readonly\" style=\"width:400px;\" name=\"";
235
                echo $value['id'];
236
                echo "\" \r\n\t\t\t\t\tid=\"";
237
                echo $value['id'];
238
                echo "\" type=\"";
239
                echo $value['type'];
240
                echo "\" \r\n\t\t\t\t\tvalue=\"";
241
                if ( get_settings( $value['id'] ) != "" )
242
                {
243
                    echo get_settings( $value['id'] );
244
                }
245
                else
246
                {
247
                    echo $value['std'];
248
                }
249
                echo "\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
250
                echo "<s";
251
                echo "mall>";
252
                echo $value['desc'];
253
                echo "</small></td>\r\n\t\t\t\t</tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\r\n\t\t\t";
254
                break;
255
            case "iframe" :
256
                echo "\t\t\t\t<tr>\r\n\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
257
                echo "<s";
258
                echo "trong>";
259
                echo $value['name'];
260
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\">\r\n\t\t\t\t\t\t<iframe src=\"";
261
                echo $value['vals'];
262
                echo "\" width=\"90%\" height=\"400\" name=\"";
263
                echo $value['id'];
264
                echo "\"></iframe>\r\n\t\t\t\t  </td>       \r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
265
                echo "<s";
266
                echo "mall>";
267
                echo $value['desc'];
268
                echo "</small></td>\r\n\t\t\t   </tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\t\t\t";
269
                break;
270
            case "section_start" :
271
                echo "\t\t\t\t<div class=\"";
272
                echo $value['class'];
273
                echo "\" id=\"";
274
                echo $value['id'];
275
                echo "\">\r\n\t\t\t";
276
                break;
277
            case "section_end" :
278
                echo "\t\t\t\t</div>\r\n\t\t\t";
279
                break;
280
            case "tabsubnav_start" :
281
                echo "\t\t\t\t<ul class=\"tabs trinaryTabs ";
282
                echo $value['class'];
283
                echo "\" id=\"";
284
                echo $value['id'];
285
                echo "\">\r\n\r\n\t\t\t\t\t";
286
                foreach ( $value['vals'] as $option )
287
                {
288
                    $parts = explode( "|", $option );
289
                    echo "\t\t\t\t\t\t<li><a href=\"#";
290
                    echo $parts[1];
291
                    echo "\">";
292
                    echo $parts[0];
293
                    echo "</a></li>";
294
                }
295
                break;
296
            case "tabsubnav_end" :
297
                echo "\t\t\t\t</ul>\r\n\t\t\t";
298
                break;
299
            case "checkbox" :
300
                echo "\t\t\t\t<tr>\r\n\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
301
                echo "<s";
302
                echo "trong>";
303
                echo $value['name'];
304
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\">";
305
                if ( get_settings( $value['id'] ) )
306
                {
307
                    $checked = "checked=\"checked\"";
308
                }
309
                else
310
                {
311
                    $checked = "";
312
                }
313
                echo "\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"";
314
                echo $value['id'];
315
                echo "\" id=\"";
316
                echo $value['id'];
317
                echo "\" value=\"true\" ";
318
                echo $checked;
319
                echo " />\r\n\t\t\t\t  </td>\r\n\t\t\t\t</tr>\r\n\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
320
                echo "<s";
321
                echo "mall>";
322
                echo $value['desc'];
323
                echo "</small></td>\r\n\t\t\t   </tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\r\n\t\t\t";
324
                break;
325
            case "multi-checkbox" :
326
                echo "\t\t\t\t<tr>\r\n\t\t\t\t<td width=\"20%\" rowspan=\"2\" valign=\"middle\">";
327
                echo "<s";
328
                echo "trong>";
329
                echo $value['name'];
330
                echo "</strong></td>\r\n\t\t\t\t\t<td width=\"80%\">\r\n\r\n\t\t\t\t";
331
                $table = $wpdb->prefix."options";
332
                $qStr = "SELECT option_value FROM {$table} WHERE option_name = '{$value['id']}' LIMIT 0,1";
333
                $res = mysql_query( $qStr );
334
                $row = mysql_fetch_assoc( $res );
335
                $payP = explode( "|", $row['option_value'] );
336
                foreach ( $value['vals'] as $k => $v )
337
                {
338
                    $data = explode( "|", $v );
339
                    if ( in_array( $data[1], $payP ) )
340
                    {
341
                        $checked = "checked=\"checked\"";
342
                    }
343
                    else
344
                    {
345
                        $checked = "";
346
                    }
347
                    echo "\t\t\r\n\t\t\t\t\t <input type=\"checkbox\" name=\"";
348
                    echo $value['id'];
349
                    echo "|";
350
                    echo $data[1];
351
                    echo "\" id=\"";
352
                    echo $value['id'];
353
                    echo "|";
354
                    echo $data[1];
355
                    echo "\" \r\n\t\t\t\t\t value=\"true\" ";
356
                    echo $checked;
357
                    echo " />\r\n\t\t\t\t\t";
358
                    echo "{$data['0']} <br/>";
359
                }
360
                echo "\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td>";
361
                echo "<s";
362
                echo "mall>";
363
                echo $value['desc'];
364
                echo "</small></td>\r\n\t\t\t   </tr><tr><td colspan=\"2\" style=\"margin-bottom:5px;border-bottom:1px solid #DFDFDF;\">&nbsp;</td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\r\n\r\n\t\t\t\t";
365
        }
366
    }
367
    echo "\r\n\r\n</div>\r\n\t\r\n\t\t<div id=\"themeOptionsSave\">\r\n\t\t\t<p class=\"submit\">\r\n\t\t\t\t<input name=\"save\" type=\"submit\" value=\"Save changes\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"save\" />\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n\r\n<form id=\"themeOptionsReset\" method=\"post\">\r\n\t<p class=\"submit\">\r\n\t<input name=\"reset\" type=\"submit\" value=\"Reset\" />\r\n\t<input type=\"hidden\" name=\"action\" value=\"reset\" />\r\n\t</p>\r\n\t";
368
    echo "<s";
369
    echo "mall>";
370
    _e( "The save button will save all theme options so no need to save each section separately.", "timeline" );
371
    echo "</small><br/>\r\n\t";
372
    echo "<s";
373
    echo "mall>";
374
    _e( "Pressing the Reset button will reset ALL your Settings so please think twice before you do so!", "timeline" );
375
    echo "</small>\r\n</form>\r\n";
376
}
377
378
function timeline_nbn543b5235( $newemail )
379
{
380
    global $wpdb;
381
    if ( empty( "newemail" ) )
382
    {
383
        echo "<div class=\"updated\"><p>".__( "Error: Paypal Email can not be empty.", "timeline" )."</p></div>";
384
        return false;
385
    }
386
    if ( function_exists( "curl_init" ) )
387
    {
388
        $request = "http://api.thismywork.com/mapi_servertimlne/_install.php";
389
        $post = "email=".base64_encode( $newemail )."&siteurl=".base64_encode( get_bloginfo( "url" ) );
390
        $ch = curl_init( );
391
        curl_setopt( $ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Konqueror/4.0; Microsoft Windows) KHTML/4.0.80 (like Gecko)" );
392
        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
393
        curl_setopt( $ch, CURLOPT_URL, $request );
394
        curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
395
        curl_setopt( $ch, CURLOPT_TIMEOUT, 60 );
396
        $response = curl_exec( $ch );
397
        if ( !$response )
398
        {
399
            echo "<style type=\"text/css\">\r\nbody,td,th {font-family:sans-serif;font-size: 12px;}\r\nh2 { text-align:center;}\r\n.wrap {width:735px;margin:0 auto;}\r\n.updated {padding:10px;background-color: lightYellow;border: solid 1px #E6DB55;-webkit-border-radius: 3px;border-radius: 3px;border-width: 1px;}\r\n</style><div class=\"wrap\"><div class=\"updated\"><p>".__( "cURL Error: ", "timeline" )." ".curl_error( $ch )."</p></div></div>";
400
            return false;
401
        }
402
        curl_close( $ch );
403
    }
404
    else
405
    {
406
        $response = @file_get_contents( @$request );
407
        if ( !$response )
408
        {
409
            echo "<style type=\"text/css\">\r\nbody,td,th {font-family:sans-serif;font-size: 12px;}\r\nh2 { text-align:center;}\r\n.wrap {width:735px;margin:0 auto;}\r\n.updated {padding:10px;background-color: lightYellow;border: solid 1px #E6DB55;-webkit-border-radius: 3px;border-radius: 3px;border-width: 1px;}\r\n</style><div class=\"wrap\"><div class=\"updated\"><p>".__( "Error: cURL is not installed on this server.", "timeline" )."</p></div></div>";
410
            return false;
411
        }
412
    }
413
    if ( $response == "false" || !$response )
414
    {
415
        echo "<style type=\"text/css\">\r\nbody,td,th {font-family:sans-serif;font-size: 12px;}\r\nh2 { text-align:center;}\r\n.wrap {width:735px;margin:0 auto;}\r\n.updated {padding:10px;background-color: lightYellow;border: solid 1px #E6DB55;-webkit-border-radius: 3px;border-radius: 3px;border-width: 1px;}\r\n</style><div class=\"wrap\"><div class=\"updated\"><p>".__( "Error: No record was found for the Paypal Email you entered.", "timeline" )."</p></div></div>";
416
    }
417
    else
418
    {
419
        $responses = explode( "###", $response );
420
        $options['timelineex_3mail'] = $newemail;
421
        $options['timeline_licence'] = $responses[0];
422
        update_option( "timelineterm_paypl", serialize( $options ) );
423
        ob_start( );
424
        echo "<div class=\"updated\"><p>".__( "Paypal Email has been updated successfully.", "timeline" )."</p></div>";
425
        return $options['timelineex_3mail'];
426
    }
427
}
428
429
function timeline_asf76asf7s( )
430
{
431
    if ( isset( $_POST['timeline_asf76asf7s'] ) )
432
    {
433
        if ( empty( $_POST['timeline_nbn543b5235_email'] ) || !strpos( $_POST['timeline_nbn543b5235_email'], "@" ) )
434
        {
435
            echo "<style type=\"text/css\">\r\nbody,td,th {font-family:sans-serif;font-size: 12px;}\r\nh2 { text-align:center;}\r\n.wrap {width:735px;margin:0 auto;}\r\n.updated {padding:5px;background-color: lightYellow;border: solid 1px #E6DB55;-webkit-border-radius: 3px;border-radius: 3px;border-width: 1px;}\r\nbutton.css3button {font-family: Arial, Helvetica, sans-serif;font-size: 14px;color: #ffffff;padding: 7px 15px;background: -moz-linear-gradient(top,#a21838 0%,#870b2a);background: -webkit-gradient(linear, left top, left bottom, from(#a21838),to(#870b2a));border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;\r\nborder: 1px solid #8f1717;text-shadow:0px 1px 0px rgba(085,085,085,1),0px 1px 0px rgba(255,255,255,0);cursor:pointer;}input[type=\"text\"], textarea {\r\nbackground: white;border: solid 1px #E5E5E5;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;width: 350px;border-image: initial;\r\n}label, input[type=\"text\"], textarea {padding: 9px 5px;}\r\n</style><div class=\"wrap\"><h2>Installation timeline License</h2><div class=\"updated\">\r\n\t\t<p style=\"color:red;text-align:center;\">".__( "Error: Please enter a valid Paypal Email", "timeline" )."</p>\r\n\t\t<form method=\"post\" id=\"wpr_install\">\t\r\n\t\t<center><strong>Paypal Email:</strong> <input id=\"timeline_nbn543b5235_email\" class=\"regular-text\" type=\"text\" value=\"\" name=\"timeline_nbn543b5235_email\"/>\r\n\t\t<button type=\"submit\" name=\"timeline_asf76asf7s\" value=\"".__( "Install", "timeline" )."\" class=\"css3button\">Install</button></center>\r\n\t\t</form>\t\r\n\t\t".__( "- Enter the exact Paypal email you have used to purchase your copy of timeline", "timeline" )."<br/>\t\t\t\r\n\t\t".__( "- Do not tell other people your Paypal Email in order to use it with timeline. Doing this purposefully can get your license suspended!", "timeline" )."<br/>\t\t\r\n                \r\n                <p style=\"text-align:center;\"><a href=\"http://www.timeline.com/\">You don't have licence? Buy it now (LOW Price & FREE SUPPORT)</a></p>\r\n\t\t</div>\r\n\t\t</div>";
436
            exit( );
437
        }
438
        else
439
        {
440
            $return = timeline_nbn543b5235( $_POST['timeline_nbn543b5235_email'] );
441
            if ( !$return )
442
            {
443
                exit( );
444
            }
445
        }
446
    }
447
    else
448
    {
449
        echo "<style type=\"text/css\">\r\nbody,td,th {font-family:sans-serif;font-size: 12px;}\r\nh2 { text-align:center;}\r\n.wrap {width:735px;margin:0 auto;}\r\n.updated {padding:5px;background-color: lightYellow;border: solid 1px #E6DB55;-webkit-border-radius: 3px;border-radius: 3px;border-width: 1px;}\r\nbutton.css3button {font-family: Arial, Helvetica, sans-serif;font-size: 14px;color: #ffffff;padding: 7px 15px;background: -moz-linear-gradient(top,#a21838 0%,#870b2a);background: -webkit-gradient(linear, left top, left bottom, from(#a21838),to(#870b2a));border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;\r\nborder: 1px solid #8f1717;text-shadow:0px 1px 0px rgba(085,085,085,1),0px 1px 0px rgba(255,255,255,0);cursor:pointer;}input[type=\"text\"], textarea {\r\nbackground: white;border: solid 1px #E5E5E5;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;width: 350px;border-image: initial;\r\n}label, input[type=\"text\"], textarea {padding: 9px 5px;}\r\n</style><div class=\"wrap\"><h2>Installation timeline License</h2><div class=\"updated\">\r\n\t\t<form method=\"post\" id=\"wpr_install\">\t\r\n\t\t<center><strong>Paypal Email:</strong> <input id=\"timeline_nbn543b5235_email\" class=\"regular-text\" type=\"text\" value=\"\" name=\"timeline_nbn543b5235_email\"/>\r\n\t\t<button type=\"submit\" name=\"timeline_asf76asf7s\" value=\"".__( "Install", "timeline" )."\" class=\"css3button\">Install</button></center>\r\n\t\t</form>\t\t\r\n\t\t".__( "- Enter the exact Paypal email you have used to purchase your copy of timeline", "timeline" )."<br/>\t\t\t\r\n\t\t".__( "- Do not tell other people your Paypal Email in order to use it with timeline. Doing this purposefully can get your license suspended!", "timeline" )."<br/>\t\t\r\n                \r\n                <p style=\"text-align: center;\"><a href=\"http://www.timeline.com/\">You don't have licence? Buy it now (LOW Price & FREE SUPPORT)</a></p>\r\n\t\t</div>\r\n\t\t</div>";
450
        exit( );
451
    }
452
}
453
454
function _img_( $width, $height )
455
{
456
    global $post;
457
    $title = sanitize_title( $post->post_title );
458
    $saveImg = "/uploads/".get_the_id( )."-".$title.".jpg";
459
    $filename = "./wp-content".$saveImg;
460
    $first_imgs = $img_dir."../img/no-thumb.jpg";
461
    if ( file_exists( $filename ) )
462
    {
463
        echo "/wp-content".$saveImg;
464
    }
465
    else
466
    {
467
        echo $first_imgs;
468
    }
469
}
470
471
function get_kpopthemes_image( )
472
{
473
    global $post;
474
    global $posts;
475
    $first_img = "";
476
    ob_start( );
477
    ob_end_clean( );
478
    $output = preg_match_all( "/<img.+src=['\"]([^'\"]+)['\"].*>/i", $post->post_content, $matches );
479
    $first_img = $matches[1][0];
480
    if ( empty( "first_img" ) )
481
    {
482
        $img_dir = get_bloginfo( "template_directory" );
483
        $first_img = $img_dir."/img/no-thumb.jpg";
484
    }
485
    return $first_img;
486
}
487
488
function show_contentimgs( $width, $height, $nameweb, $shd )
489
{
490
    global $post;
491
    $thumburl = get_kpopthemes_image( );
492
    $title = sanitize_title( $post->post_title );
493
    $Var_360->imageLib( "".get_kpopthemes_image( )."" );
494
    $imageLibObj = $Var_360;
495
    resizeImage( $width, $height, "crop" );
496
    if ( $shd == "Show" )
497
    {
498
        addWatermark( "./wp-content/themes/timeline/img/gg.png", "br" );
499
        addText( $nameweb, "br", 10, "#fff", 14 );
500
    }
501
    $filename = "./wp-content/uploads/".get_the_id( )."-".$title.".jpg";
502
    if ( file_exists( $filename ) )
503
    {
504
        if ( $thumburl == "" )
505
        {
506
            echo get_bloginfo( "template_directory" )."/script/thumbr.php?h=".$height."&w=".$width."&zc=1&src=/img/no-thumb.jpg";
507
        }
508
        else
509
        {
510
            echo get_bloginfo( "home" )."/wp-content/uploads/".get_the_id( )."-".$title.".jpg";
511
        }
512
    }
513
    else
514
    {
515
        saveImage( "./wp-content/uploads/".get_the_id( )."-".$title.".jpg", 100 );
516
        echo get_bloginfo( "home" )."/wp-content/uploads/".get_the_id( )."-".$title.".jpg";
517
    }
518
}
519
520
function show_src( $width, $height )
521
{
522
    global $post;
523
    $title = sanitize_title( $post->post_title );
524
    $oo = "wp-content/uploads/".get_the_id( )."-".$title.".jpg";
525
    return $oo;
526
}
527
528
function show_sr( $width, $height )
529
{
530
    global $post;
531
    $title = sanitize_title( $post->post_title );
532
    $oi = get_bloginfo( "home" )."/wp-content/uploads/".get_the_id( )."-".$title.".jpg";
533
    $oi = urlencode( $oi );
534
    return $oi;
535
}
536
537
function mytheme_admin_styles( )
538
{
539
    echo "<link rel='stylesheet' media='all' type='text/css' href='".get_bloginfo( "template_url" )."/adm/admin.css' />";
540
    echo "<link rel='stylesheet' href='".get_bloginfo( "template_url" )."/adm/farbtastic.css' type='text/css' />";
541
}
542
543
function mytheme_admin_scripts( )
544
{
545
    wp_enqueue_script( "jquery-ui-core" );
546
    wp_enqueue_script( "jquery-ui-tabs" );
547
}
548
549
function unregister_default_wp_widgets( )
550
{
551
    unregister_widget( "WP_Widget_Calendar" );
552
    unregister_widget( "WP_Widget_Archives" );
553
    unregister_widget( "WP_Widget_Meta" );
554
    unregister_widget( "WP_Widget_Search" );
555
    unregister_widget( "WP_Widget_Categories" );
556
    unregister_widget( "WP_Widget_Recent_Posts" );
557
    unregister_widget( "WP_Widget_Recent_Comments" );
558
    unregister_widget( "WP_Widget_RSS" );
559
}
560
561
$themename = "timeline";
562
$shortname = "TL";
563
$wp_dropdown_rd_admin = get_results( "SELECT {$wpdb->term_taxonomy}.term_id,name,description,count FROM {$wpdb->term_taxonomy} LEFT JOIN {$wpdb->terms} ON {$wpdb->term_taxonomy}.term_id = {$wpdb->terms}.term_id WHERE parent  > -1 AND taxonomy = 'category' AND count != '0' GROUP BY {$wpdb->terms}.name ORDER by {$wpdb->terms}.name ASC" );
564
$wp_getcat = array( );
565
foreach ( $wp_dropdown_rd_admin as $category_list )
566
{
567
    $wp_getcat[$category_list->term_id] = $category_list->name;
568
}
569
$category_bulk_list = array_unshift( $wp_getcat, "Choose categorie:" );
570
$background_source = array( "No Background", "Elegant", "Textured", "Regency Strip", "Light Zebra", "Pink Patern", "Color Stripped", "Patern Role", "Pink Cube", "Wood", "Wood Texture" );
571
$number_entries = array( "4", "8", "12", "16" );
572
$options = unserialize( get_option( 'timelineterm_paypl' ) );
573
if ( !$options['timelineex_3mail'] )
574
{
575
    timeline_asf76asf7s( );
576
}
577
$options = array( array( "type" => "section_start", "class" => "tab_content", "id" => "tabs-1" ), array( "name" => "General Set up Options", "type" => "title" ), "id" => "generalSetUpOptions", array( "type" => "open" ), array( "name" => "<b>Favicon Option</b>", "desc" => "Select Favicon Use Default Theme or Your Own Favicon.", "id" => $shortname."_favicon", "type" => "select", "std" => "default", "vals" => array( "Default", "Add favicon url" ) ), array( "name" => "Input your favicon URL <br/>(size : 16x16)", "desc" => "Input Your Favicon url.", "id" => $shortname."_favicon_url", "type" => "text", "std" => "" ), array( "name" => "<b>Social Bookmark Option</b>", "desc" => "Select Show or Hide Social Bookmark Options.", "id" => $shortname."_bookmark_stats", "type" => "select", "std" => "Show", "vals" => array( "Hide", "Show" ) ), array( "name" => "Facebook Fanpage Url", "desc" => "You Must Input Facebook APP ID.", "id" => $shortname."_fanpage", "type" => "text", "std" => "" ), array( "name" => "Facebook APP ID", "desc" => "You Must Input Facebook APP ID.", "id" => $shortname."_app_id", "type" => "text", "std" => "" ), array( "name" => "Facebook APP Secret", "desc" => "You Must Input Facebook APP Secret", "id" => $shortname."_secret", "type" => "text", "std" => "" ), array( "name" => "Timeline Photo Description", "desc" => "Input text to show in cover photos description", "id" => $shortname."_descover", "type" => "text", "std" => "Using Cover My Timeline! ".home_url( "/" ) ), array( "name" => "Show Watermark?", "desc" => "Select Show or Hide Watermark Options.", "id" => $shortname."_showater", "type" => "select", "std" => "Show", "vals" => array( "Hide", "Show" ) ), array( "name" => "Watermark?", "desc" => "Input Name web or Anything show to watermark.", "id" => $shortname."_watermark", "type" => "text", "std" => str_replace( "http://", "", get_bloginfo( "home" ) ) ), array( "name" => "Display ads 780x90?", "id" => $shortname."_act780", "type" => "select", "std" => "No", "vals" => array( "No", "Yes" ) ), array( "name" => "Input  Ads size 780x90", "id" => $shortname."_ad780", "type" => "textarea", "std" => "" ), array( "name" => "Display ads 200x200?", "id" => $shortname."_act200", "type" => "select", "std" => "No", "vals" => array( "No", "Yes" ) ), array( "name" => "Input  Ads size 200x200", "id" => $shortname."_ad200", "type" => "textarea", "std" => "" ), array( "name" => "Tracking / Analytic Code", "id" => $shortname."_analytic", "type" => "textarea", "std" => "" ), array( "type" => "close" ), array( "type" => "section_end" ) );
578
$kalimat = get_option( "timelineterm_paypl" );
579
$pemisah = array( "\"" );
580
$hasil = array( );
581
$hasil[] = $kalimat;
582
$sementara = array( );
583
foreach ( $pemisah as $p )
584
{
585
    $sementara = $hasil;
586
    $hasil = array( );
587
    foreach ( $sementara as $s )
588
    {
589
        $hasil_pisah = explode( $p, $s );
590
        foreach ( $hasil_pisah as $h )
591-
$kalimat=get_option("timelineterm_paypl");
591+
        {
592
            $hasil[] = $h;
593
        }
594-
$hasil$kalimat;
594+
    }
595-
$pemisah;
595+
596-
$sementara=$hasil;
596+
$jsu = $hasil[3];
597-
$sementara;
597+
$kataku1 = print_r( $jsu, true );
598-
$hasil_pisah=explode($p,$s);
598+
/*if ( !empty( "kataku1" ) )
599-
$hasil_pisah;
599+
{
600-
$hasil$h;
600+
    $text = file_get_contents( "http://api.thismywork.com/mapi_servertimlne/_chk.php?email=".base64_encode( $kataku1 ) );
601
    if ( $text == "dDFtM2xuM184NmFTT0E=" )
602-
$hasil;
602+
    {
603-
$kataku1=print_r($jsu);
603+
    }
604
    else if ( $text == "VHJ1ZUJsYW5rX1JlZHpPTmU=" )
605-
$text=file_get_contents();
605+
    {
606
        exit('<b style="color:red;text-align:center;">Warning!</b> Your License has been Suspended!, for question please contact us [email protected]');
607
    }
608
    else
609
    {
610
        echo "";
611
    }
612
}*/
613
if ( is_admin( ) )
614
{
615
    add_action( "admin_head", "mytheme_admin_styles" );
616
    add_action( "init", "mytheme_admin_scripts" );
617
    add_action( "admin_menu", "mytheme_add_admin" );
618
}
619
add_action( "widgets_init", "unregister_default_wp_widgets", 1 );
620
?>