} else { showHTML("Application changing failed while executing database statement."); } if ($db = new PDO('sqlite:' . $dbName . '-users.db')) { $statement = $db->prepare("UPDATE FB SET usertoken = \"\" WHERE username <> 0"); if ($statement) { $statement->execute(); } } $adminOptions["admintoken"] = ""; saveAdminOptions(); header("Location: ./"); exit; } } $app = json_decode(readURL('https://graph.facebook.com/v2.3/' . $config['appId'] . '?access_token=' . $config['appId'] . '|' . $config['secret'])); $output = "<div id='admindiv'><h3>" . $lang['Settings'] . " " . $lang['Information'] . ":</h3>"; if (isset($app->id)) { $output .= "{$successImg} <strong>" . $lang['Application'] . " " . $lang['ID'] . "</strong>: " . $app->id; } else { $output .= "{$failImg} <strong>" . $lang['Application'] . " " . $lang['ID'] . "</strong>: <span title='App ID and/or App Secret is Invalid'>" . $config['appId'] . "</span>"; } $output .= " <a id=changeAppText><span title='" . $lang['Change App ID'] . "'>(" . $lang['Change'] . ")</span></a><br />\n <div id=changeApp class='lightbox ui-widget-content'><center>\n <h3 class='lightbox ui-widget-header'>" . $lang['Enter New Application'] . "</h3>\n <form name=changeAppForm id='changeAppForm' class='lightbox' method=post>\n <table>\n <tr><td>" . $lang['Application'] . " " . $lang['ID'] . "<td><input type=text size=10 name=appID class='textbox'><br />\n <tr><td>" . $lang['Application'] . " " . $lang['Secret'] . "<td><input type=text size=10 name=appSecret class='textbox'><br />\n </table><input type=submit id='changeAppSubmit' value='" . $lang['Save Settings'] . "'></form></div>"; if (isset($app->name)) { $output .= "{$successImg} <strong>" . $lang['Application'] . " " . $lang['Name'] . "</strong>: " . $app->name . "<br />"; if (isset($adminOptions["admintoken"]) && $adminOptions["admintoken"] != "") { try { $permissions = $fb->api("/v2.3/me/permissions", array("access_token" => $adminOptions["admintoken"])); foreach ($permissions['data'] as $perm) { if ($perm['status'] == 'granted') { $valid = true;
} else { echo stripslashes($result['tooltip']); } } elseif ($mode == 'rewards') { if (!($result = $cache->getFactionRewards($id, $lang))) { // gotta build the html $data = readURL(getDomain($lang) . '?faction=' . $id, false); $rLine = getRewardLine($data); if (!$rLine) { return false; } else { $items = array('hated' => array(), 'hostile' => array(), 'unfriendly' => array(), 'neutral' => array(), 'friendly' => array(), 'honored' => array(), 'revered' => array(), 'exalted' => array()); // loop through the results and extract each item while (preg_match("#\\{id:([0-9]{1,10}),name:'[0-9@]{1}(.+?)',(.+?),sourcemore:\\[\\{t:([0-9]{1,2}),ti:([0-9]{1,10}),n:'(.+?)',z:([0-9]{1,10})\\}\\],classs:([0-9]{1,2}),subclass:(.+?),standing:(.+?)}#", $rLine, $match)) { // gotta query wowhead for every item (this could take a while) $iData = readURL(getDomain($lang) . '?item=' . (string) $match[1] . '&xml'); if (!$iData) { return false; } $xml = simplexml_load_string($iData, 'SimpleXMLElement', LIBXML_NOCDATA); if ($xml->error == '') { $items[$standings[(int) $match[10]]][] = array('name' => (string) $xml->item->name, 'id' => (string) $xml->item['id'], 'quality' => (string) $xml->item->quality['id'], 'lang' => $lang, 'icon' => 'http://static.wowhead.com/images/icons/small/' . strtolower($xml->item->icon) . '.jpg', 'url' => getDomain($lang) . '?item=' . (string) $xml->item['id']); } $rLine = str_replace($match[0], '', $rLine); unset($iData, $xml); } // make sure we found something before we continue if (!rewardsFound($items)) { echo 'No rewards were found.'; $cache->close(); exit;
} if ($idConsulta == 2) { $query = "SELECT cp.*, pl.name name, vpp.internet \r\n\t\t\tFROM comparadorprecios cp, " . _DB_PREFIX_ . "product_lang pl, view_prod_price_C vpp\r\n\t\t\tWHERE pl.id_product = dacoBip\r\n\t\t\tAND id_lang =3\r\n\t\t\tAND pl.id_product = vpp.id_product\r\n\t\t\tAND cp.dacoId =" . $_GET["dacoId"]; $resultLineas = Db::getInstance()->ExecuteS($query); foreach ($resultLineas as $linea) { $url = $linea["dacoURL"]; if (!(strpos($url, "www.wei.cl") === false) || !(strpos($url, "www.pcfactory.cl") === false) || !(strpos($url, "www.ripley.cl") === false) || !(strpos($url, "www.falabella.com") === false) || !(strpos($url, "www.corona.cl") === false) || !(strpos($url, "www.paris.cl") === false)) { if (!(strpos($url, "www.paris.cl") === false)) { $pos = strpos($url, 'www'); $url = substr($url, $pos); $pos = strpos($url, '/'); $dominio = substr($url, 0, $pos); $restoUrl = substr($url, $pos); $arregloValores = http_request('GET', $dominio, 80, $restoUrl); } else { $arregloValores = readURL($url); } $priceAndTienda = readWhat($url, $arregloValores); $price = str_replace(" ", "", str_replace(",", "", str_replace(".", "", $priceAndTienda[0]))); if (strlen($price) > 0 && strlen($price) < 9) { Db::getInstance()->AutoExecute("comparadorprecios", array('dacoPrecioComparacion' => (int) $price, 'dacoFuncionando' => (int) "1", "dacoTienda" => $priceAndTienda[1]), 'UPDATE', '`dacoId` = ' . (int) $linea["dacoId"]); Db::getInstance()->AutoExecute("comparadorprecioshist", array('dacoId' => $linea["dacoId"], 'cophBIP' => $linea["dacoBip"], 'cophNombre' => $linea["name"], 'cophPrecioBip' => (int) $linea["internet"], 'cophPrecioComparacion' => (int) $price), 'INSERT'); } else { Db::getInstance()->AutoExecute("comparadorprecios", array('dacoFuncionando' => (int) "0", 'dacoTienda' => "Hubo un problema al obtener el precio"), 'UPDATE', '`dacoId` = ' . (int) $linea["dacoId"]); } } else { Db::getInstance()->AutoExecute("comparadorprecios", array('dacoFuncionando' => (int) "0", 'dacoTienda' => "Esta página no es soportada por el sistema"), 'UPDATE', '`dacoId` = ' . (int) $linea["dacoId"]); } } Header("Location: adminComparador.php"); }
<?php // Facebook Multi Page/Group Poster v2.2 // Created by Novartis (Safwan) if (count(get_included_files()) == 1) { die; } // Access Token Checking if (!isset($userOptions['role']) || $userOptions['role'] == "") { $roles = json_decode(readURL('https://graph.facebook.com/v2.3/' . $config['appId'] . '/roles?limit=10000&access_token=' . $config['appId'] . '|' . $config['secret'])); $role = ""; foreach ($roles->data as $r) { if ($r->user == $userId) { $role = $r->role; break; } } if ($role != "") { $userOptions['role'] = $role; if ($db2 = new PDO('sqlite:' . $dbName . '-users.db')) { //Should use saveUserOptions $option = ""; foreach ($userOptions as $key => $value) { if ($key != "" && $value != "") { if ($option != "") { $option .= "|"; } $option .= $key . ":" . $value; } } $statement = $db2->prepare("UPDATE FB SET useroptions=\"{$option}\" WHERE userid=\"{$userId}\"");
// Video Post /* if ( $adminOptions[ 'enableDemo' ] ) die( "$failImg " . $lang['Video uploading'] . " " . $lang['disabled in demo'] . ". " . $lang['Buy script'] ); */ if ($_POST['URL'] == '') { die($failImg . " " . $lang['No video']); } $params["title"] = $spintax->process($_POST['Title']); $params["description"] = $spintax->process($_POST['Message']); $feed = '/v2.3/' . $_POST['pageid'] . '/' . "videos"; $postlink .= "photo.php?v="; //video checker for youtube $vid = parseYtUrl($_POST['URL']); if ($vid) { $format = "video/mp4"; // the MIME type of the video. e.g. video/mp4, video/webm, etc. parse_str(readURL("http://www.youtube.com/get_video_info?video_id=" . $vid), $info); //decode the data if (isset($info['errorcode'])) { die("{$failImg} " . $info['reason']); } $streams = $info['url_encoded_fmt_stream_map']; //the video's location info $streams = explode(',', $streams); foreach ($streams as $stream) { parse_str(urldecode($stream), $data); //decode the stream if (stripos($data['type'], $format) !== false) { // We've found the right stream with the correct format $url = $data['url']; $sig = $data['signature']; $params["file_url"] = str_replace('%2C', ',', $url . '&' . http_build_query($data) . '&signature=' . $sig);