tmpl_revisions', 'save_tmpl_files', 'tmpl_file_basepath'); $weblog_default = array('enable_image_resizing', 'image_resize_protocol', 'image_library_path', 'thumbnail_prefix', 'word_separator', 'use_category_name', 'reserved_category_word', 'auto_convert_high_ascii', 'new_posts_clear_caches', 'auto_assign_cat_parents'); $name = $which.'_default'; return ${$name}; } /* END */ } // END CLASS ?>key." = '".$this->escape_str($val)."' AND "; } $dest = preg_replace( "/AND $/" , "" , $dest); } else $dest = $where; return 'UPDATE `'.$table.'` SET '.$str.' WHERE '.$dest; } /* END */ } // END CLASS ?> } return $vals; } /* END */ } // END CLASS ?> { foreach($whitelisted_ip as $pure) { if ($pure != '' && strpos($this->AGENT, $pure) !== false) { $bad = 'n'; $this->whitelisted = 'y'; break; } } } if ( is_array($whitelisted_agent) && sizeof($whitelisted_agent) > 0) { foreach($whitelisted_agent as $pure) { if ($pure != '' && strpos($this->agent, $pure) !== false) { $bad = 'n'; $this->whitelisted = 'y'; break; } } } if ($bad == 'y') { $this->blacklisted = 'y'; } else { unset($_POST['HTTP_REFERER']); return true; // whitelisted, so end } } } } } unset($_POST['HTTP_REFERER']); return true; } /* END */ } // END CLASS ?>/', "%20", "%22", "%3c", // < "%253c", // < "%3e", // > "%0e", // > "%28", // ( "%29", // ) "%2528", // ( "%26", // & "%24", // $ "%3f", // ? "%3b", // ; "%3d" // = ); $str = stripslashes(str_replace($bad, '', $str)); return $str; } /* END */ /** ---------------------------------------- /** Fetch file upload paths /** ----------------------------------------*/ function fetch_file_paths() { global $DB; if (count($this->file_paths) > 0) { return $this->file_paths; } $query = $DB->query("SELECT id, url FROM exp_upload_prefs"); if ($query->num_rows == 0) { return; } foreach ($query->result as $row) { $this->file_paths[$row['id']] = $row['url']; } return $this->file_paths; } /* END */ /** ---------------------------------------- /** Clones an Object /** - This is required because of the way PHP 5 handles the passing of objects /** - http://acko.net/node/54 /** ----------------------------------------*/ function clone_object($object) { return version_compare(phpversion(), '5.0') < 0 ? $object : clone($object); } /* END */ } // END CLASS ?> return $this->last_call; } /* END */ /** --------------------------------------- /** Check If Hook Has Activated Extension /** ---------------------------------------*/ function active_hook($which) { if (isset($this->extensions[$which])) return TRUE; return FALSE; } /* END */ } // END CLASS ?> 'content' => $content, 'redirect' => '', 'link' => array('JavaScript:history.go(-1)', $LANG->line('return_to_previous')) ); $this->show_message($data, 0); } /* END */ } // END CLASS ?>ar, $pad = FALSE) { $date = array(); $date['month'] = $month; $date['year'] = $year; while ($date['month'] > 12) { $date['month'] -= 12; $date['year']++; } while ($date['month'] <= 0) { $date['month'] += 12; $date['year']--; } if ($pad == TRUE AND strlen($date['month']) == 1) { $date['month'] = '0'.$date['month']; } return $date; } /* END */ } // END CLASS ?> /* END */ } // END CLASS ?>---------------------------- /** Fetch online users /** --------------------------------*/ $cutoff = $LOC->now - ($time_limit * 60); $query = $DB->query("SELECT * FROM exp_online_users WHERE site_id = '".$DB->escape_str($PREFS->ini('site_id'))."' AND date > $cutoff AND weblog_id = '0' ORDER BY name"); /** ------------------------------------------- /** Assign users to a multi-dimensional array /** -------------------------------------------*/ $total_logged = 0; $total_guests = 0; $total_anon = 0; $update = FALSE; $current_names = array(); if ($query->num_rows > 0) { foreach ($query->result as $row) { if ($row['member_id'] == $SESS->userdata('member_id') AND $row['ip_address'] == $IN->IP AND $row['name'] == $name) { $update = TRUE; $anon = $row['anon']; } if ($row['member_id'] != 0) { $current_names[$row['member_id']] = array($row['name'], $row['anon']); if ($row['anon'] != '') { $total_anon++; } else { $total_logged++; } } else { $total_guests++; } } } else { $total_guests++; } /** ------------------------------------------- /** This user already counted or no? /** -------------------------------------------*/ if ($update == TRUE) { $total_visitors = $query->num_rows; } else { if ($SESS->userdata('member_id') != 0) { $current_names[$SESS->userdata('member_id')] = array($name, $anon); $total_logged++; } else { $total_guests++; } $total_visitors = $query->num_rows + 1; } $query = $DB->query("SELECT * FROM exp_stats WHERE site_id = '".$DB->escape_str($PREFS->ini('site_id'))."' AND weblog_id = '0'"); $STAT->stats = array( 'recent_member' => $query->row['recent_member'], 'recent_member_id' => $query->row['recent_member_id'], 'total_members' => $query->row['total_members'], 'total_entries' => $query->row['total_entries'], 'total_forum_topics' => $query->row['total_forum_topics'], 'total_forum_posts' => $query->row['total_forum_posts'] + $query->row['total_forum_topics'], 'total_forum_replies' => $query->row['total_forum_posts'], 'total_comments' => $query->row['total_comments'], 'total_trackbacks' => $query->row['total_trackbacks'], 'most_visitors' => $query->row['most_visitors'], 'last_entry_date' => $query->row['last_entry_date'], 'last_forum_post_date' => $query->row['last_forum_post_date'], 'last_comment_date' => $query->row['last_comment_date'], 'last_trackback_date' => $query->row['last_trackback_date'], 'last_cache_clear' => $query->row['last_cache_clear'], 'last_visitor_date' => $query->row['last_visitor_date'], 'most_visitor_date' => $query->row['most_visitor_date'], 'total_logged_in' => $total_logged, 'total_guests' => $total_guests, 'total_anon' => $total_anon, 'current_names' => $current_names ); unset($query); } /* END */ /** -------------------------------- /** Module installer /** --------------------------------*/ function stats_module_install() { global $DB; $sql[] = "INSERT INTO exp_modules (module_id, module_name, module_version, has_cp_backend) VALUES ('', 'Stats', '$this->version', 'n')"; foreach ($sql as $query) { $DB->query($query); } return true; } /* END */ /** ------------------------- /** Module de-installer /** -------------------------*/ function stats_module_deinstall() { global $DB; $query = $DB->query("SELECT module_id FROM exp_modules WHERE module_name = 'Stats'"); $sql[] = "DELETE FROM exp_module_member_groups WHERE module_id = '".$query->row['module_id']."'"; $sql[] = "DELETE FROM exp_modules WHERE module_name = 'Stats'"; $sql[] = "DELETE FROM exp_actions WHERE class = 'Stats'"; $sql[] = "DELETE FROM exp_actions WHERE class = 'Stats_CP'"; foreach ($sql as $query) { $DB->query($query); } return true; } /* END */ } // END CLASS ?>ine); $line = str_replace('"weblog"', 'Ghr77deCdje012', $line); $line = str_replace('weblog', strtolower($word_sub), $line); $line = str_replace('Weblog', ucfirst($word_sub), $line); $line = str_replace("Tr8Vc345s0lmsO", 'Metaweblog', $line); $line = str_replace("Ghr77deCdje012", '"weblog"', $line); } if ($label != '') { $line = '"; } return stripslashes($line); } } /* END */ } // END CLASS // -------------------------------------------------------------------- /** * Procedural gateway to $LANG->line() for use in view files * * @access public * @param string * @param string * @return string */ function lang($which = '', $label = '') { global $LANG; return $LANG->line($which, $label); } // -------------------------------------------------------------------- ?>(UTC +13:00) Phoenix Islands Time, Tonga', 'UP14' => '(UTC +14:00) Line Islands', // IGNORE ''=>'');?> if ( ! isset ($user) OR ! isset($pass) OR (empty($user) && empty($pass))) { return FALSE; } /** ---------------------------------------- /** Check password lockout status /** ----------------------------------------*/ if ($SESS->check_password_lockout() === TRUE) { return FALSE; } /** ---------------------------------- /** Validate Username and Password /** ----------------------------------*/ $query = $DB->query("SELECT password, group_id FROM exp_members WHERE username = '".$DB->escape_str($user)."'"); if ($query->num_rows == 0) { $SESS->save_password_lockout(); return FALSE; } if (in_array($query->row['group_id'], $not_allowed_groups)) { return FALSE; } if ($query->row['password'] == $FNS->hash(stripslashes($pass))) { return TRUE; } $orig_enc_type = $PREFS->ini('encryption_type'); $PREFS->core_ini['encryption_type'] = ($PREFS->ini('encryption_type') == 'md5') ? 'sha1' : 'md5'; if ($query->row['password'] == $FNS->hash(stripslashes($pass))) { return TRUE; } else { $SESS->save_password_lockout(); return FALSE; } } /* END */ /** --------------------------------------- /** Fetch Template site id's for tags /** ---------------------------------------*/ function _fetch_site_ids() { global $DB, $PREFS; $this->site_ids = array(); if (isset($this->tagparams['site'])) { if (sizeof($this->sites) == 0 && $PREFS->ini('multiple_sites_enabled') == 'y') { $sites_query = $DB->query("SELECT site_id, site_name FROM exp_sites"); foreach($sites_query->result as $row) { $this->sites[$row['site_id']] = $row['site_name']; } } if (substr($this->tagparams['site'], 0, 4) == 'not ') { $sites = array_diff($this->sites, explode('|', substr($this->tagparams['site'], 4))); } else { $sites = array_intersect($this->sites, explode('|', $this->tagparams['site'])); } // Let us hear it for the preservation of array keys! $this->site_ids = array_flip($sites); } // If no sites were assigned via parameter, then we use the current site's // Templates, Weblogs, and various Site data if (sizeof($this->site_ids) == 0) { $this->site_ids[] = $PREFS->ini('site_id'); } } } // END CLASS ?> Smileys

Click on an image to add it to your comment

grin
LOL
cheese
smile
wink
smirk
rolleyes
confused
surprised
big surprise
tongue laugh
tongue rolleye
tongue wink
raspberry
blank stare
long face
ohh
grrr
gulp
oh oh
downer
red face
sick
shut eye
hmmm
mad
angry
zipper
kiss
shock
cool smile
cool smirk
cool grin
cool hmm
cool mad
cool cheese
vampire
snake
excaim
question
return number_format(($em + $es) - ($sm + $ss), $decimals); } } // END CLASS ?>