function extractLogDates($site) { $d = HTTP_DIR . '/' . $site . '/code'; $h = opendir($d) or die("Couldn't open {$d}"); $datalist = data($site); $fs = array(); while ($each = readdir($h)) { if (preg_match('/\\.log$/i', $each) && $datalist[$each]) { $fs[] = $d . '/' . $each; } } $sitelist = includes($site); $freq = array(); $sum = 0.0; foreach ($fs as $each) { $parts = explode(".", $each); $lang = $parts[2]; if (isset($sitelist[$lang])) { $fp = @fopen($each, "r") or die("Couldn't open {$each}"); while ($line = fgets($fp, 128)) { if ($found = preg_match('/([A-Z][a-z]{2})[0-9A-Z\\s\\:]+(\\d{4})/', $line, $match)) { break; } } if ($found) { $sum++; $mth = month($match[1]); $yr = intval($match[2]); if (!isset($freq[$yr][$mth][$site])) { $freq[$yr][$mth][$site] = 1; } else { $freq[$yr][$mth][$site] += 1; } } fclose($fp) or die("Couldn't close {$each}"); } } closedir($h); $a = array(); foreach ($freq as $yr => $mths) { foreach ($mths as $mth => $counts) { if (isset($counts[$site]) && $counts[$site] > 0) { $a[] = array($yr, $mth, $site, $counts[$site] / $sum); } } } usort($a, 'CompareYearMonth'); $cumulative = 0.0; for ($k = 0; $k < sizeof($a); $k++) { $cumulative += $a[$k][3]; $a[$k][3] = $cumulative; } return $a; }
<?php include_nav(); ?> <div class="bg"> <div id="page" class="container"> <div class="row-fluid"> <div id="home-logo" class="span6 text-center"><img src="/images/logo.png" /></div> <div class="span6"> <img src="/images/motto.png" /> <div class="motto-content"> <div class="well"> <h3>Portfolio Not Found</h3> The portfolio you are looking for is not found. Plesae check your information and try again. If you are new to Fotoluv.com use the navigation above to take a look around. </div> </div> </div> </div> </div> </div> <?php includes("page.footer"); ?> </body> </html>
<!--Relationship Links--> <div id="quickMessageLink" class="side-link link hide" onclick="quickSend('<?php echo $_SESSION['profile_id']; ?> ', '<?php echo $_SESSION['profile_fullname']; ?> ', '3');"><i class="icon-envelope black"></i> Send <?php echo $_SESSION['profile_fullname']; ?> a message</div> <div id="createRelationshipLink" class="side-link link" onclick="createRelationship();"><i class="icon-user black"></i> Connect with <?php echo $_SESSION['profile_fullname']; ?> </div> <div id="pendingRelationship" class="side-link link hide"><i class="icon-user black"></i> You have sent an invite to <?php echo $_SESSION['profile_fullname']; ?> </div> <div id="connectedRelationship" class="side-link link hide"><a href="/portfolio/network"><i class="icon-user black"></i> You are connected with <?php echo $_SESSION['profile_fullname']; ?> </a></div> </div> </div> <?php includes("admin.options");
<?php header('content-type:application/json'); error_reporting(E_ALL); ini_set('display_errors', 1); $HostFiles = includes('config.php'); function remove_hashtags($string) { return str_replace('#', '', preg_replace('/(?:#[\\w-]+\\s*)+$/', '', $string)); } function PurgeHostFiles($files) { $combinedFiles = ''; #array of item to search for and remove in string $srchAdtrj = array('localhost', '::1', '#[IPv6]', ' '); #Regex strings to use to search through the files and remove unnecessary information $find = array('!/\\*.*?\\*/!s', '/\\n\\s*\\n/', '/\\#(.*)$/m', '/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/', '~^[ \\t]++(?=(?:[^<]++|<(?!/?+pre\\b))*+(?:\\z|<pre\\b))~im', '/\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}/'); #Replace values to combine with the find array. The quotation marks must be double once for some reason, else the \n will not work $replace = array("", "\n", "", "\n", "", ""); if (!sizeof($find) === sizeof($replace)) { die("{$find} and {$replace} arrays do not match, make sure there are equel mounts of items in both arrays"); } foreach ($files as $value) { $value = file_get_contents($value); #regex values, see more info in the arrays above $value = preg_replace($find, $replace, $value); #plain text values to replace direct examples, se more in the array above $value = str_replace($srchAdtrj, "", $value); $combinedFiles .= $value; } //remove any space left in the top of the file
echo "<option selected VALUE='"; } else { echo "<option VALUE='"; } echo $myrow['loccode'] . "'>" . $myrow['locationname']; } //end while loop DB_free_result($result); echo "</select></td></tr><tr><td>" . _('Work Centre Added') . ": </td><td>"; echo "<select tabindex='3' name='WorkCentreAdded'>"; $sql = 'SELECT code, description FROM workcentres'; $result = DB_query($sql, $db); if (DB_num_rows($result) == 0) { prnMsg(_('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres'), 'warn'); echo "<br><a href='{$rootpath}/WorkCentres.php?" . SID . "'>" . _('Work Centre Maintenance') . '</a>'; includes('includes/footer.inc'); exit; } while ($myrow = DB_fetch_array($result)) { if (isset($_POST['WorkCentreAdded']) and $myrow['code'] == $_POST['WorkCentreAdded']) { echo "<option selected VALUE='"; } else { echo "<option VALUE='"; } echo $myrow['code'] . "'>" . $myrow['description']; } //end while loop DB_free_result($result); echo "</select></td></tr><tr><td>" . _('Quantity') . ": </td><td>\n\t\t <input " . (in_array('Quantity', $Errors) ? 'class="inputerror"' : '') . "\n\t\t tabindex='4' type='Text' class=number name='Quantity' class=number size=10 maxlength=8 value="; if (isset($_POST['Quantity'])) { echo $_POST['Quantity'];
<?php include 'Inlcudes/inc_home_links_bar.php'; if (isset($_GET['section'])) { switch ($_GET['section']) { case 'zodiac': include 'Includes/inc_chinese_zodiac.php'; break; case 'php': default: include 'Includes/inc_php_info.php'; break; } } else { includes('Includes/inc_php_info.php'); }
<?php use TPP\Models\TPP; require "vendor/autoload.php"; $time = microtime(true); prioIncludes(); includes(); new Init(); if (TPP_DEBUG) { error_reporting(E_ALL); ini_set('display_errors', 1); } TPP::initializeConnection(); $site = new SiteController(); $site->actionIndex(); echo '<h1>loaded in ' . round(microtime(true) - $time, 7) . ' secs</h1>'; exit; function prioIncludes() { $priorityIncludes = ['controllers' => ['Controller'], 'models' => ['Init']]; foreach ($priorityIncludes as $key => $prio) { foreach ($prio as $pr) { include_once $key . '/' . $pr . '.php'; } } } function includes() { $includes = ['controllers', 'models', 'helpers']; foreach ($includes as $inc) { foreach (glob($inc . "/*.php") as $filename) {
<?php #Application name: PhpCollab #Status page: 0 $checkSession = "true"; includes("../includes/library.php"); //case session fails if ($url != "") { headerFunction("../login.php?url={$url}"); exit; //default case } else { headerFunction("../login.php"); exit; }
<?php /** * Fotolov.com Public Portfolio Templatates * Name: Default Public Portfolio * Type: Basic * Author: Ryan Riley * Desc: This public portfolio template is a simple and easy to follow that has a basic image slider and full frame portfolio view. */ ?> <html> <head> <?php includes("page.meta"); ?> <!-- Bootstrap --> <script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript" src="/js/global.js"></script> <script type="text/javascript" src="/js/galleria/galleria-1.2.9.js"></script> <script> $(document).ready(function() { loadData(); $("#galleria").show(); }); function loadData() { $.post('/api/portfolio.images.list',{
public function includes($searchElement, $strict = false) { return includes($this, $searchElement, $strict); }