Changeset 100
- Timestamp:
- 02/28/08 16:18:47 (9 months ago)
- Files:
-
- 1 modified
-
trunk/wassup.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wassup.php
r99 r100 187 187 echo '<link rel="stylesheet" href="'.$wpurl.'/wp-content/plugins/'.WASSUPFOLDER.'/ui.tabs.css'.'" type="text/css" />'; 188 188 189 // Add some javascripts 189 190 if ($_GET['page'] != "wassup-options" AND $_GET['page'] != "wassup-spy") { ?> 190 191 <script type='text/javascript'> … … 235 236 236 237 <script type="text/javascript"> 238 // Main script for Ajax functions 237 239 //<![CDATA[ 238 240 jQuery(document).ready(function($){ … … 397 399 $save_settings = FALSE; 398 400 } 401 // Save the settings 399 402 if ($save_settings) { 400 403 if ($_POST['wassup_remind_flag'] == 1 AND $_POST['wassup_remind_mb'] == "") { … … 430 433 } 431 434 update_option('wassup_settings', $wassup_settings); 435 // Save spam options from visitor details 432 436 } elseif (isset($_POST['submit-spam'])) { 433 437 $wassup_settings['wassup_spamcheck'] = $_POST['wassup_spamcheck']; … … 435 439 $wassup_settings['wassup_refspam'] = $_POST['wassup_refspam']; 436 440 update_option('wassup_settings', $wassup_settings); 441 // Reset options to defaults 437 442 } elseif (isset($_POST['reset-to-default'])) { 438 443 delete_option('wassup_settings'); … … 470 475 $siteurl = get_bloginfo('siteurl'); 471 476 477 // This is the ONLINE view 472 478 if ($_GET['page'] == "wassup-online") { 473 479 $to_date = wassup_get_time(); … … 581 587 582 588 $search = attribute_escape($_GET['search']); 589 // Get resolution for main view and chart 583 590 $res = (int) $wassup_settings['wassup_screen_res']; 584 591 if (empty($res)) $res=620; … … 588 595 else $res=1000; 589 596 597 // Detect IP marked 590 598 if (isset($_GET['wmark'])) { 591 599 if ($_GET['wmark'] == 0) { … … 598 606 update_option('wassup_settings', $wassup_settings); 599 607 } 608 // Detect if chart id enabled/disabled 600 609 if (isset($_GET['wchart'])) { 601 610 if ($_GET['wchart'] == 0) { … … 607 616 } 608 617 618 // Set default page items limit 609 619 if ($wassup_settings['wassup_default_limit'] != '' AND !isset($_GET['limit'])) { 610 620 $items = $wassup_settings['wassup_default_limit']; … … 615 625 } 616 626 627 // Detect default items typology 617 628 if ($wassup_settings['wassup_default_type'] != '' AND !isset($_GET['type'])) { 618 629 $type = $wassup_settings['wassup_default_type']; … … 621 632 } 622 633 634 // Get items typology 623 635 if ($type == 'spider') { 624 636 $whereis = " AND spider!=''"; … … 642 654 643 655 $pages = 1; 656 // For pagination 644 657 if(isset($_GET['pages']) and is_numeric($_GET['pages']) and $pages = $_GET['pages']) { 645 658 $limit = " LIMIT ".(($pages-1)*$items).",$items"; … … 648 661 } 649 662 663 // Start print out the results 650 664 print "<h2>".__("Latest hits", "wassup")."</h2>"; 651 665 $to_date = wassup_get_time(); … … 662 676 $Tot->WpUrl = $wpurl; 663 677 678 // This is the items counters 664 679 $itemstot = $Tot->calc_tot("count", $search, null, "DISTINCT"); 665 680 $pagestot = $Tot->calc_tot("count", $search, null, null); … … 990 1005 } //end MAIN/DETAILS VIEW 991 1006 992 print "<p><small>WassUp ver: $version - Check the official <a href='http://www.wpwp.org' target='_BLANK'>WassUp</a> page for updates, bug reports and your hints to improve it </small></p>";1007 print "<p><small>WassUp ver: $version - Check the official <a href='http://www.wpwp.org' target='_BLANK'>WassUp</a> page for updates, bug reports and your hints to improve it - <a href='http://trac.wpwp.org/wiki/Documentation' title='WassUp User Guide documentation'>WassUp User Guide documentation</a></small></p>"; 993 1008 print "</div>"; 994 1009 } //end function Wassup 995 1010 1011 // Function to create the initial Database table for WassUp 996 1012 function CreateTable() { 997 1013 global $wpdb; … … 1025 1041 } //end function createTable 1026 1042 1043 // If there is some table different from previous version 1044 // use this function to update the table 1027 1045 function UpdateTable() { 1028 1046 global $wpdb, $wassup_settings;
