echo urlencode(strip_string($fio)); ?> &ADRESS=<?php echo urlencode($adress); ?> &SUM=<?php echo $tpl['submitorder']['FinalSum']; ?> ' target='_blank'> <img src="http://www.numizmatik.ru/images/sbrfprint.gif" border=1 style='border-color:black' alt='Распечатать квитанцию Сбербанка'> </a><br> <b>Ссылка:</b> <a href='http://www.numizmatik.ru/shopcoins/sbrf.php?NUMBER=<?php echo $shopcoinsorder; ?> &FIO=<?php echo urlencode(strip_string($fio)); ?> &ADRESS=<?php echo urlencode($adress); ?> &SUM=<?php echo $tpl['submitorder']['FinalSum']; ?> ' target='_blank'>http://www.numizmatik.ru/shopcoins/sbrf.php?NUMBER=<?php echo $shopcoinsorder; ?> </a> </p> <?}?> <?php echo $SumProperties[$payment];
function getLyrics($w, $artist, $title) { $query_artist = $artist; $query_title = $title; if (stristr($query_artist, 'feat.')) { $query_artist = stristr($query_artist, 'feat.', true); } elseif (stristr($query_artist, 'featuring')) { $query_artist = stristr($query_artist, 'featuring', true); } elseif (stristr($query_title, ' con ')) { $query_title = stristr($query_title, ' con ', true); } elseif (stristr($query_artist, ' & ')) { $query_artist = stristr($query_artist, ' & ', true); } $query_artist = str_replace('&', 'and', $query_artist); $query_artist = str_replace('$', 's', $query_artist); $query_artist = strip_string(trim($query_artist)); $query_artist = str_replace(' - ', '-', $query_artist); $query_artist = str_replace(' ', '-', $query_artist); $query_title = cleanupTrackName($query_title); if (stristr($query_title, 'feat.')) { $query_title = stristr($query_title, 'feat.', true); } elseif (stristr($query_title, 'featuring')) { $query_title = stristr($query_title, 'featuring', true); } elseif (stristr($query_title, ' con ')) { $query_title = stristr($query_title, ' con ', true); } elseif (stristr($query_title, '(includes')) { $query_title = stristr($query_title, '(includes', true); } elseif (stristr($query_title, '(live at')) { $query_title = stristr($query_title, '(live at', true); } elseif (stristr($query_title, 'revised')) { $query_title = stristr($query_title, 'revised', true); } elseif (stristr($query_title, '(19')) { $query_title = stristr($query_title, '(19', true); } elseif (stristr($query_title, '(20')) { $query_title = stristr($query_title, '(20', true); } elseif (stristr($query_title, '- 19')) { $query_title = stristr($query_title, '- 19', true); } elseif (stristr($query_title, '- 20')) { $query_title = stristr($query_title, '- 20', true); } $query_title = str_replace('&', 'and', $query_title); $query_title = str_replace('$', 's', $query_title); $query_title = strip_string(trim($query_title)); $query_title = str_replace(' - ', '-', $query_title); $query_title = str_replace(' ', '-', $query_title); $query_title = rtrim($query_title, '-'); $uri = strtolower('https://www.musixmatch.com/fr/paroles/' . $query_artist . '/' . $query_title); $error = false; $no_match = false; $options = array(CURLOPT_FOLLOWLOCATION => 1, CURLOPT_TIMEOUT => 10, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13'); $file = $w->request($uri, $options); preg_match('/<script>var __mxmProps = (.*?)<\\/script>/s', $file, $lyrics); $lyrics = empty($lyrics[1]) ? '' : $lyrics[1]; if (empty($file)) { return array(false, ''); } elseif ($lyrics == '') { $no_match = true; return array(false, ''); } else { $json = json_decode($lyrics); switch (json_last_error()) { case JSON_ERROR_DEPTH: return array(false, ''); case JSON_ERROR_CTRL_CHAR: return array(false, ''); case JSON_ERROR_SYNTAX: return array(false, ''); case JSON_ERROR_NONE: if (isset($json->lyrics) && isset($json->lyrics->attributes) && isset($json->lyrics->attributes->lyrics_body)) { if ($json->lyrics->attributes->lyrics_body == '') { return array(false, ''); } else { return array($uri, $json->lyrics->attributes->lyrics_body); } } else { return array(false, ''); } } } }
function refpage_get_details($ref, $uri) { global $trackConfig; $linked = 0; $checked = 0; $title = ''; $ctext = ''; // includes Snoopy class for remote file access require_once XOOPS_ROOT_PATH . "/class/snoopy.php"; $snoopy = new Snoopy(); //TIMEOUT $snoopy->read_timeout = 10; //URL $snoopy->fetch($ref); //GET DATA $page = $snoopy->results; if ($snoopy->error) { $page = ""; } if ($page) { if (XOOPS_USE_MULTIBYTES && function_exists("mb_convert_encoding")) { $page = mb_convert_encoding($page, _CHARSET, "ISO-2022-JP,JIS,EUC-JP,UTF-8,Shift_JIS"); } $pat = "/<title[^>]*>(.*)<\\/title>/i"; if (preg_match($pat, $page, $d)) { $title = $d[1]; $len = 255; if (strlen($title) > $len) { $title = mysubstr($title, 0, $len - 2) . ".."; } $page = preg_replace($pat, "", $page); } $anc = "/<a\\s+href=([\"'])?" . preg_quote(XOOPS_URL . $uri, "/") . "\\1(>|\\s[^>]*>)/i"; $root = "/<a\\s+href=([\"']?)" . preg_quote(XOOPS_URL . "/", "/") . "\\1(>|\\s[^>]*>)/i"; if (preg_match($anc, $page)) { $F = preg_split($anc, $page, 2); $linked = 1; } elseif (preg_match($root, $page)) { $F = preg_split($root, $page, 2); $linked = 1; } if ($linked) { // cut out text from orign page function strip_string($s) { return preg_replace('/\\s+/', ' ', urldecode(strip_tags($s))); } $l = min($trackConfig['ctext_len'], 255); $pre = ltrim(strip_string($F[0])); list($a, $post) = preg_split('/<\\/a>/i', $F[1], 2); $post = rtrim(strip_string($post)); $m = intval($l / 2); $ctext = mysubstr($pre, max(strlen($pre) - $m + 1, 0), $m) . "<u>" . strip_tags($a) . "</u>"; $m = $l - strlen($ctext); $ctext .= mysubstr($post, 0, min(strlen($post), $m)); $ctext = mysubstr($ctext, 0, $l); if (preg_match('/<u>/', $ctext) && !preg_match('/<\\/u>/', $ctext)) { $ctext = mysubstr($ctext, 0, $l - 4) . "</u>"; } } if ($linked == 1 || strip_tags($page) != "") { $checked = 1; } } return array($title, $ctext, $linked, $checked); }
if ($rows["payment"]==6) echo "<br><a href=kak_oplatit_kartoi_sberbanka.html target=_blank>Как оплатить заказ картой Сбербанка</a> "; $dissert = 0; if (!$rows["SendPost"] && !$rows["ReceiptMoney"] && !$rows["SendPostBanderoleNumber"]) { $sql9 = "select * from ordergiftcertificate where `order`=".$rows["order"]." and `check`=1;"; $result9 = mysql_query($sql9); while ($rows9 = mysql_fetch_array($result9) ) $dissert += $rows9['sum']; } if ($rows["payment"] == 6 && !$rows["SendPost"] && !$rows["ReceiptMoney"] && !$rows["SendPostBanderoleNumber"]) { echo " [ <a href='sbrf.php?NUMBER=".$rows["order"]."&FIO=".urlencode(strip_string($rows["userfio"]))."&ADRESS=".urlencode($rows["adress"])."&SUM=".($rows["FinalSum"]-$dissert)."' target='_blank'>Распечатать квитанцию</a> ]"; } if (!$rows["SendPost"] && !$rows["ReceiptMoney"] && !$rows["SendPostBanderoleNumber"] && $rows["ParentOrder"]==0 && (($rows['payment'] !=1 && $rows['payment'] !=2 && ($rows['delivery']==4 || $rows['delivery']==6)) || (($rows['delivery']==10 || $rows['delivery']==2) && ($ipmyshop==$_SERVER['REMOTE_ADDR'] || $_SERVER['REMOTE_ADDR']=="127.0.0.1")))) { $resultsum = ($rows['SumAll']>0?$rows['SumAll']:($rows['FinalSum']>0?$rows['FinalSum']:$rows['sum']))-$dissert; if ($rows["delivery"] == 4 || $rows["delivery"] == 6 || $rows['delivery']==10 || $rows['delivery']==2) { unset($shopcoinsorder); $shopcoinsorder[] = $rows['order']; $sql3 = "SELECT * FROM `order` WHERE `ParentOrder`='".$rows['order']."'"; $result3 = mysql_query($sql3); while($rows3 = mysql_fetch_array($result3)) {
if ($rows_temp['groupparent'] == 0) { $sql_tmp = "select distinct `group`.`group` from `group`, catalognew where catalognew.`agreement`>=0 and catalognew.`group`=`group`.`group` and `group`.groupparent='" . $rows_temp['group'] . "';"; $result_tmp = mysql_query($sql_tmp); // echo $sql_tmp."<br>"; while ($rows_tmp = mysql_fetch_array($result_tmp)) { $WhereCountry[] = $rows_tmp['group']; } } } $CounterSQL = ''; $CounterSQL = sizeof($SearchTempMatch) ? " MATCH(catalognew.`name`,catalognew.averslegend,catalognew.mint,catalognew.reverselegend,catalognew.details,catalognew.herd,metal.`name`) AGAINST('" . implode(" ", $SearchTempMatch) . " ' IN BOOLEAN MODE) as coefficientcoins, MATCH(`group`.`name`) AGAINST('" . implode(" ", $SearchTempMatch) . " ' IN BOOLEAN MODE) as coefficientgroup" : ""; if (sizeof($WhereThemesearch) || sizeof($SearchTempDigit) || sizeof($WhereConditionsearch)) { $CounterSQL .= ", if(" . (sizeof($WhereThemesearch) ? implode(" or ", $WhereThemesearch) . ", " . (sizeof($SearchTempDigit) ? "if( catalognew.yearstart in ('" . implode("','", $SearchTempDigit) . "') and catalognew.yearstart<>0," . (sizeof($WhereConditionsearch) ? "if( catalognew.condition in ('" . implode("','", $WhereConditionsearch) . "') and catalognew.condition<>0,'4','3'),'2')" : "'3','2')") : (sizeof($WhereConditionsearch) ? "if( catalognew.condition in ('" . implode("','", $WhereConditionsearch) . "') and catalognew.condition<>0,'3','2')" : "'2'")) . ", " . (sizeof($SearchTempDigit) ? "if( catalognew.yearstart in ('" . implode("','", $SearchTempDigit) . "') and catalognew.yearstart<>0," . (sizeof($WhereConditionsearch) ? "if( catalognew.condition in ('" . implode("','", $WhereConditionsearch) . "') and catalognew.condition<>0,'2','1.5')" : "'1.5','0')") : (sizeof($WhereConditionsearch) ? "if( catalognew.condition in ('" . implode("','", $WhereConditionsearch) . "') and catalognew.condition<>0,'1.5','0')" : "'0'")) : (sizeof($SearchTempDigit) ? " catalognew.yearstart in ('" . implode("','", $SearchTempDigit) . "') and catalognew.yearstart<>0," . (sizeof($WhereConditionsearch) ? "if( catalognew.condition in ('" . implode("','", $WhereConditionsearch) . "') and catalognew.condition<>0,'2','1.5')" : "'1.5','0'") : (sizeof($WhereConditionsearch) ? " catalognew.condition in ('" . implode("','", $WhereConditionsearch) . "') and catalognew.condition<>0,'1.5','0'" : "0,0,0"))) . ") as counterthemeyear"; } $where .= " and ( " . (sizeof($SearchTempStr) ? "(catalognew.reverselegend like '%" . implode("%' or catalognew.reverselegend like '%", $SearchTempStr) . "%' and catalognew.reverselegend<>'')" : "") . "\n\t\t" . (sizeof($SearchTempDigit) ? "or (catalognew.details like '" . implode("' or catalognew.details like '", $SearchTempDigit) . "' and catalognew.details<>'')" : "") . "\n\t\t" . (sizeof($SearchTempStr) ? "or (catalognew.details like '" . implode("' or catalognew.details like '", $SearchTempStr) . "' and catalognew.details<>'')" : "") . "\n\t\t" . (sizeof($SearchTempStr) ? "or catalognew.averslegend in ('" . implode("','", $SearchTempStr) . "' and catalognew.averslegend<>'')" : "") . "\n\t\t" . (sizeof($SearchTempDigit) ? "or (catalognew.yearstart in ('" . implode("','", $SearchTempDigit) . "') and catalognew.yearstart<>0)" : "") . "\n\t\t" . (sizeof($SearchTempStr) ? "or (catalognew.mint like '%" . implode("%' or catalognew.mint like '%", $SearchTempStr) . "%' and catalognew.mint<>'')" : "") . "\n\t\t" . (sizeof($SearchTempStr) ? "or (catalognew.herd like '%" . implode("%' or catalognew.herd like '%", $SearchTempStr) . "%' and catalognew.herd<>'')" : "") . "\n\t\t" . (sizeof($SearchTempStr) ? "or (catalognew.`name` like '%" . implode("%' or catalognew.`name` like '%", $SearchTempStr) . "%' and catalognew.`name`<>'')" : "") . " \n\t\t" . (sizeof($SearchTempStr) ? "or (metal.`name` like '%" . implode("%' or metal.`name` like '%", $SearchTempStr) . "%' and metal.`name`<>'')" : "") . " \n\t\t" . (sizeof($WhereThemesearch) ? " or " . implode(" or ", $WhereThemesearch) : "") . "\n\t\t" . (sizeof($WhereConditionsearch) ? " or catalognew.`condition` in (" . implode(",", $WhereConditionsearch) . ") and catalognew.`condition`<>0" : "") . " \n\t\t" . (sizeof($WhereCountry) > 0 ? " or catalognew.`group` in (" . implode(",", $WhereCountry) . ")" : "") . ")"; } if ($search and $submit) { //$amount = 1; //записываем запрос к поиску $sql_tmp = "select * from searchkeywords where keywords='" . lowstring($search) . "' and page='{$script}';"; $result_tmp = mysql_query($sql_tmp); $rows_tmp = mysql_fetch_array($result_tmp); if ($rows_tmp[0] == 0) { $sql_tmp2 = "insert into searchkeywords values (0, '{$maxcoefficient}', '{$sumcoefficient}','" . lowstring(strip_string($search)) . "', '{$script}', 1, '{$amountsearch}', '{$timenow}');"; } else { $sql_tmp2 = "update searchkeywords set counter=counter+1, maxcoefficient='{$maxcoefficient}', sumcoefficient='{$sumcoefficient}', amount='{$amountsearch}' where keywords='" . lowstring($search) . "' and page='{$script}';"; } $result_tmp2 = mysql_query($sql_tmp2); echo $sql_tmp2 . "=sql_tmp2<br>"; //конец записи }