/** ETC */ function getURLForFilter($value) { $value = POD::escapeString($value); $value = str_replace('http://', '', $value); $lastSlashPos = lastIndexOf($value, '/'); if ($lastSlashPos > -1) { $value = substr($value, 0, $lastSlashPos); } return $value; }
function livily_get_blog_url() { $blogURL = get_bloginfo('url'); $lastindex = lastIndexOf($blogURL, "/"); $requestURI = $_SERVER['REQUEST_URI']; if ($lastindex > 8) { $blogURL = substr($blogURL, 0, $lastindex); } $Path = $blogURL . $requestURI; $Path = urlencode($Path); return $Path; }
/** ETC */ function getURLForFilter($value) { $value = rawurlencode($value); $value = str_replace('http://', '', $value); $value = str_replace('https://', '', $value); $lastSlashPos = lastIndexOf($value, '/'); if ($lastSlashPos > -1) { $value = substr($value, 0, $lastSlashPos); } return $value; }
include "system-header.php"; if (isset($_FILES['clubfile']) && $_FILES['clubfile']['tmp_name'] != "") { if ($_FILES["clubfile"]["error"] > 0) { echo "Error: " . $_FILES["clubfile"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["clubfile"]["name"] . "<br />"; echo "Type: " . $_FILES["clubfile"]["type"] . "<br />"; echo "Size: " . $_FILES["clubfile"]["size"] / 1024 . " Kb<br />"; echo "Stored in: " . $_FILES["clubfile"]["tmp_name"] . "<br>"; } $row = 1; if (($handle = fopen($_FILES['clubfile']['tmp_name'], "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $team = trim(mysql_escape_string($data[0])); $club = substr($team, 0, lastIndexOf($team, " ")); $age = substr($team, lastIndexOf($team, " ") + 2); if (preg_match("/[A-Z]\$/", $age)) { $age = substr($age, 0, strlen($age) - 1); } if ($data[0] != "") { echo "<div>Product code: ({$club}) ({$team}) ({$age})</div>"; $qry = "SELECT id \n\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}team\n\t\t\t\t\t\t\tWHERE name = '{$club}'"; $result = mysql_query($qry); $clubid = 0; //Check whether the query was successful or not if ($result) { while ($member = mysql_fetch_assoc($result)) { $clubid = $member['id']; } } if ($clubid == 0) {
function livily_dashboard() { $cdwidgetid = $_GET["cdwidgetid"]; $blogURL = get_bloginfo('url'); $lastindex = lastIndexOf($blogURL, "/"); $requestURI = $_SERVER['REQUEST_URI']; if ($lastindex > 8) { $blogURL = substr($blogURL, 0, $lastindex); } $Path = $blogURL . $requestURI; $Path = urlencode($Path); $cdURL = LIVILY_DASHBOARD_URL . $Path; if (strlen($cdwidgetid) != 0) { $result = livily_livechat_save_options($cdwidgetid); $mssg = urlencode("Plugin has been installed successfully."); $cdURL = $cdURL . "&mssg=" . $mssg; echo '<div id="dashboarddiv"><iframe id="dashboardiframe" src=' . $cdURL . '' . ' height=2000 width=100% scrolling="yes"></iframe></div>'; } else { echo '<div id="dashboarddiv"><iframe id="dashboardiframe" src=' . $cdURL . '' . ' height=2000 width=100% scrolling="yes"></iframe></div>'; } }
<?php include 'app/app.php'; $customparams = loadCustomParams($c, decryptCookie($_COOKIE['oauth_consumer_key'])); include 'rest/EBSCOAPI.php'; $api = new EBSCOAPI($c, $customparams); $clean = strip_tags_deep($_REQUEST); $db = $clean['db']; $an = $clean['an']; //echo $db . " - " . $an; if (!isset($_COOKIE['login'])) { $end = lastIndexOf($_SERVER['PHP_SELF'], "/"); $loginURL = $proxyprefix . $baseURLfull . $authURL . "&path=fulltext&an=" . $an . "&db=" . $db; //echo $loginURL; header("Location: " . $loginURL); } else { $result = $api->apiRetrieve($an, $db); // Set error if (isset($result['error'])) { $error = $result['error']; } else { $error = null; } // Link priority: // 1. PDF and HTML full-text native to EDS // 2. eBook full-text links // 3. Custom links // get PDF or HTML redirect links if (!empty($result['pdflink'])) { $redirectURL = $result['pdflink']; } else {