/** * Author: Salikh Gurgenidze * Nickname: Vati Child * E-mail: vatia0@gmail.com * Copyright: VC cms */ function get_registry() { global $registry, $DB, $settings; $check = 0; if ($DB->show_err) { $DB->show_err = false; $check = 1; } $sql = "SHOW TABLES FROM `{$settings['dbName']}` LIKE '#__setting'"; $inst = $DB->getAll($sql); if (count($inst) == 0) { header("Location: /apanel/install.php"); } $sql = "SELECT `#__setting`.* FROM `#__setting` WHERE `#__setting`.`group` < '99'"; $tmp_registry = getAllcache($sql, 120, 'registry'); foreach ($tmp_registry as $tmp) { if ($tmp['name'] == 'count') { $registry[$tmp['name']] = unserialize($tmp['value']); continue; } $registry[$tmp['name']] = $tmp['value']; } if ($check == 1) { $DB->show_err = true; } if ($_GET['event'] == 'getlicense') { get_license(); } }
$abspath_2 = "Z:/home/localhost/www/"; if (strstr($_SERVER['SCRIPT_FILENAME'], 'Z:/home')) { $abspath = $abspath_2; } else { if (strstr($_SERVER['SCRIPT_FILENAME'], 'cb/')) { $abspath = $abspath_1; } } //echo "<br>"; //echo $abspath; require $abspath . 'wp-blog-header.php'; if (isset($_GET['l']) && is_numeric($_GET['l'])) { $license_num = $_GET['l']; } if (isset($_GET['item']) && is_numeric($_GET['item'])) { get_license($_GET['item'], $license_num); } function get_license($sequence_of_image, $license_num) { // load unique license data $current_user = wp_get_current_user(); //echo("<pre>".print_r($current_user,true)."</pre>"); //echo("<pre>".print_r($_SESSION['nzshpcrt_cart'],true)."</pre>"); $agreement_number = uniqid(); $agreement_date = date("m.d.y"); $customer_name = $current_user->last_name . " " . $current_user->first_name; if (isset($current_user->user_description) && $current_user->user_description != '') { $media_name = "«" . $current_user->user_description . "»"; } else { $media_name = '[не указано]'; }
function cart_product_list_string($licensecolumn) { // the function is for displaying the list of products // if $licensecolumn is False we don't diplay extra columns global $wpdb, $result_no_license_text; $siteurl = get_option('siteurl'); $current_item = 0; $total = 0; $cart = isset($_SESSION['nzshpcrt_cart']) ? $_SESSION['nzshpcrt_cart'] : ""; $result = '<table class=\'productcart\'>'; $result_no_license_text = '<table class=\'productcart\'>'; if (isset($cart) && $cart != '') { foreach ($cart as $key => $cart_item) { $current_item = $current_item + 1; $product_id = $cart_item->product_id; $quantity = $cart_item->quantity; $number =& $quantity; $product_variations = $cart_item->product_variations; $variation_count = count($product_variations); if ($variation_count >= 1) { $variation_list = " ("; $i = 0; foreach ($product_variations as $value_id) { if ($i > 0) { $variation_list .= ", "; } $value_data = $wpdb->get_results("SELECT * FROM `" . $wpdb->prefix . "variation_values` WHERE `id`='" . $value_id . "' LIMIT 1", ARRAY_A); $variation_list .= str_replace(" ", " ", stripslashes($value_data[0]['name'])); $i++; } $variation_list .= ")"; } else { $variation_list = ''; } $sql = "SELECT `wp_product_list`.*, `wp_product_files`.`width`, `wp_product_files`.`height`, `wp_product_brands`.`name` as brand, `wp_product_categories`.`name` as kategoria FROM `wp_product_list`, `wp_product_files`, `wp_product_brands`, `wp_product_categories` WHERE wp_product_list.id='{$product_id}' AND `wp_product_list`.`active`='1' AND `wp_product_list`.`visible`='1' AND `wp_product_list`.`file` = `wp_product_files`.`id` AND `wp_product_brands`.`id` = `wp_product_list`.`brand` AND `wp_product_list`.`category` = `wp_product_categories`.`id` ORDER BY `wp_product_list`.`id` DESC LIMIT 1"; $product_list = $wpdb->get_results($sql, ARRAY_A); if (!$licensecolumn) { // download link start $link = ""; $previous_download_ids = array(0); $sessionid = $_GET['sessionid']; $selectsql = "SELECT * FROM `wp_purchase_logs` WHERE `sessionid`= " . $sessionid . " LIMIT 1"; $check = $wpdb->get_results($selectsql, ARRAY_A); //pokazh($product_list,"product_list"); if (isset($product_list[0]['file']) && isset($check[0]['id']) && $product_list[0]['file'] > 0) { $wpdb->query("UPDATE `wp_download_status` SET `active`='1' WHERE `fileid`='" . $product_list[0]['file'] . "' AND `purchid` = '" . $check[0]['id'] . "' LIMIT 1"); $download_data = $wpdb->get_results("SELECT * FROM `wp_download_status` WHERE `fileid`='" . $product_list[0]['file'] . "' AND `purchid`='" . $check[0]['id'] . "' AND `id` NOT IN (" . make_csv($previous_download_ids) . ") LIMIT 1", ARRAY_A); $download_data = $download_data[0]; /* * for security reason add to url for hires images sid - last 6 simbols of idhash * */ $sql = "SELECT `idhash` FROM `wp_product_files` WHERE `id`=" . $product_list[0]['file'] . " LIMIT 1"; $idhash_data = $wpdb->get_results($sql, ARRAY_A); if ($idhash_data != null) { $idhash = "&sid=" . substr($idhash_data[0]['idhash'], -6); } $site_tmp = includeTrailingCharacter($siteurl, "/"); $link = $site_tmp . "?downloadid=" . $download_data['id'] . $idhash; $previous_download_ids[] = $download_data['id']; } /// download link stop } $result .= "<tr>"; $result .= " <td style='width:144px;'>"; $result_no_license_text .= "<tr>"; $result_no_license_text .= " <td style='width:144px;'>"; $basepath = get_option('siteurl'); $imagedir = $basepath . "/wp-content/plugins/wp-shopping-cart/images/"; $previewdir = $basepath . "/wp-content/plugins/wp-shopping-cart/product_images/"; $result .= "<a href='" . $previewdir . $product_list[0]['image'] . "'><img border='0' src='" . $imagedir . $product_list[0]['image'] . "'></a>"; $result .= " </td>"; $result .= " <td>"; $result_no_license_text .= "<a href='" . $previewdir . $product_list[0]['image'] . "'><img border='0' src='" . $imagedir . $product_list[0]['image'] . "'></a>"; $result_no_license_text .= " </td>"; $result_no_license_text .= " <td>"; $_size = $product_list[0]['width'] . "px X " . $product_list[0]['height'] . "px;"; $_bigpictext = "<b>Номер:</b> " . $product_list[0]['id']; $_bigpictext .= "<br /><b>Автор:</b> " . $product_list[0]['brand']; $_bigpictext .= "<br /><b>Название: </b> " . nl2br(stripslashes($product_list[0]['name'])); $_bigpictext .= "<br /><b>Категория: </b> " . $product_list[0]['kategoria']; $_bigpictext .= "<br /><b>Описание: </b> " . nl2br(stripslashes($product_list[0]['description'])); $_bigpictext .= "<br /><b>Тэги: </b>" . nl2br(stripslashes($product_list[0]['additional_description'])); $_bigpictext .= "<br /><b>Размер:</b> " . $_size; $_bigpictext .= "<br /><b>Цена (без скидки):</b> " . $_SESSION['nzshpcrt_cart'][$key]->price . " руб."; $_bigpictext .= "<br /><b>Лицензия:</b> " . license_name($_SESSION['nzshpcrt_cart'][$key]->license); $_SESSION['nzshpcrt_cart'][$key]->author = $product_list[0]['brand']; $result .= "<div style='font-size: 8pt !important;'>" . $_bigpictext . "</div>"; $result .= " </td>"; $result_no_license_text .= "<div style='font-size: 8pt !important;'>" . $_bigpictext . "</div>"; $result_no_license_text .= " </td>"; if ($licensecolumn) { $result .= " <td width='240'>"; $result .= "<form name='licenses' id='licenses' onsubmit='submitform(this);return false;' action='" . $siteurl . "/?page_id=29' method='POST'>"; $result_no_license_text .= " <td width='240'>"; $result_no_license_text .= "<form name='licenses' id='licenses' onsubmit='submitform(this);return false;' action='" . $siteurl . "/?page_id=29' method='POST'>"; $ch1 = ischecked('l1_price', $product_list[0]['id']); $result .= "<input name='license' value='l1_price' type='radio' {$ch1} />"; $result .= round($product_list[0]['l1_price']) . " руб. "; $result .= "<a title='ваша лицензия' href='#' onclick=\"javascript:window.open('" . $siteurl . "/wp-content/plugins/wp-shopping-cart/license.php?l=1&item=" . $current_item . "','текст ограниченной лицензии','height=480,width=640,scrollbars=yes');\">ограниченная</a> <br />"; $result_no_license_text .= "<input name='license' value='l1_price' type='radio' {$ch1} />"; $result_no_license_text .= round($product_list[0]['l1_price']) . " руб. "; $result_no_license_text .= "<a title='ваша лицензия' href='#' onclick=\"javascript:window.open('" . $siteurl . "/wp-content/plugins/wp-shopping-cart/license.php?l=1&item=" . $current_item . "','текст ограниченной лицензии','height=480,width=640,scrollbars=yes');\">ограниченная</a> <br />"; $ch2 = ischecked('l2_price', $product_list[0]['id']); $result .= "<input name='license' value='l2_price' type='radio' {$ch2} />"; $result .= round($product_list[0]['l2_price']) . " руб. <a title='ваша лицензия' href='#' onclick=\"javascript:window.open('" . $siteurl . "/wp-content/plugins/wp-shopping-cart/license.php?l=2&item=" . $current_item . "','текст стандартной лицензии','height=480,width=640,scrollbars=yes');\">стандартная</a><br />"; $result_no_license_text .= "<input name='license' value='l2_price' type='radio' {$ch2} />"; $result_no_license_text .= round($product_list[0]['l2_price']) . " руб. <a title='ваша лицензия' href='#' onclick=\"javascript:window.open('" . $siteurl . "/wp-content/plugins/wp-shopping-cart/license.php?l=2&item=" . $current_item . "','текст стандартной лицензии','height=480,width=640,scrollbars=yes');\">стандартная</a><br />"; $ch3 = ischecked('l3_price', $product_list[0]['id']); $result .= "<input name='license' value='l3_price' type='radio' {$ch3} />"; $result .= round($product_list[0]['l3_price']) . " руб. <a title='ваша лицензия' href='#' onclick=\"javascript:window.open('" . $siteurl . "/wp-content/plugins/wp-shopping-cart/license.php?l=3&item=" . $current_item . "','текст расширенной лицензии','height=480,width=640,scrollbars=yes');\">расширенная</a>"; $result .= "<input value='" . $product_list[0]['id'] . "' name='prodid' type='hidden'> <br /><br />"; $result .= "<input id='searchsubmit' value='Сменить лицензию' type='submit'> </form>"; $result .= " </td>"; $result_no_license_text .= "<input name='license' value='l3_price' type='radio' {$ch3} />"; $result_no_license_text .= round($product_list[0]['l3_price']) . " руб. <a title='ваша лицензия' href='#' onclick=\"javascript:window.open('" . $siteurl . "/wp-content/plugins/wp-shopping-cart/license.php?l=3&item=" . $current_item . "','текст расширенной лицензии','height=480,width=640,scrollbars=yes');\">расширенная</a>"; $result_no_license_text .= "<input value='" . $product_list[0]['id'] . "' name='prodid' type='hidden'> <br /><br />"; $result_no_license_text .= "<input id='searchsubmit' value='Сменить лицензию' type='submit'> </form>"; $result_no_license_text .= " </td>"; } if (isset($product_list[0]['price'])) { $total += $number * $product_list[0]['price']; } if ($licensecolumn) { // License select $result .= " <td width='70'>"; $result .= "<a href='" . get_option('shopping_cart_url') . "&remove=" . $key . "'>Убрать из заказа</a>"; $result .= " </td>"; } else { // Download link $current_user = wp_get_current_user(); $result .= " <td width='140'>"; $result_no_license_text .= " <td width='140'>"; if (isset($current_user) && $current_user->ID == '106') { $result .= "<a href='" . get_option('siteurl') . "/demo/demo.jpg' style='background-color:#33ff99;padding:7px;border:1px #a3a598 solid;text-decoration:none;margin-top:16px;'>Скачать demo</a>"; $result_no_license_text .= "<a href='" . get_option('siteurl') . "/demo/demo.jpg' style='background-color:#33ff99;padding:7px;border:1px #a3a598 solid;text-decoration:none;margin-top:16px;'>Скачать demo</a>"; } else { $result .= "<a href='{$link}' style='background-color:#33ff99;padding:7px;border:1px #a3a598 solid;text-decoration:none;margin-top:16px;'>Скачать</a>"; $result_no_license_text .= "<a href='{$link}' style='background-color:#33ff99;padding:7px;border:1px #a3a598 solid;text-decoration:none;margin-top:16px;'>Скачать</a>"; } $result .= " </td>"; $result_no_license_text .= " </td>"; } $result .= "</tr>"; $result_no_license_text .= "</tr>"; // License text if (!$licensecolumn) { if ($_SESSION['nzshpcrt_cart'][$current_item]->price == '250.00') { $lic_type = 1; } elseif ($_SESSION['nzshpcrt_cart'][$current_item]->price == '500.00') { $lic_type = 2; } elseif ($_SESSION['nzshpcrt_cart'][$current_item]->price == '2500.00') { $lic_type = 3; } else { $lic_type = 1; } $license_text = get_license($current_item, $lic_type); $result .= "<tr>"; $result .= "<td colspan=3> <a id='displayText" . $current_item . "' href='javascript:toggle(" . $current_item . ");'>[+] показать текст лицензии</a><div id='toggleText" . $current_item . "' style='display:none;background-color:#FFFFCC;padding:8px;'><br />"; $result .= $license_text; $result .= "</div></td>"; $result .= "</tr>"; } } // end of: foreach($cart as $key => $cart_item) } else { return ''; } $result .= '</table>'; $result_no_license_text .= '</table>'; $result .= "<script language='javascript'> "; $result .= "function toggle(item) {"; $result .= "var ele = document.getElementById('toggleText'+item);"; $result .= "var text = document.getElementById('displayText'+item);"; $result .= "if(ele.style.display == 'block') {"; $result .= "\t\tele.style.display = 'none';"; $result .= "\ttext.innerHTML = '[+] показать текст лицензии<br />';"; $result .= "}"; $result .= "else {"; $result .= "\tele.style.display = 'block';"; $result .= "\ttext.innerHTML = '[-] скрыть текст лицензии<br />';"; $result .= "}"; $result .= "} "; $result .= "</script>"; //$result .= ("<pre>SESSION:".print_r($_SESSION,true)."</pre>"); return $result; }
*/ if ($show_html) { echo "<html><body>"; } $keywords = explode(",", $test_keywords); if (!count($keywords)) { die("Error: no keywords defined.{$NL}"); } if (!rmkdir($working_dir)) { die("Failed to create/open {$working_dir}{$NL}"); } $country_data = get_google_cc($test_country, $test_language); if (!$country_data) { die("Invalid country/language code specified.{$NL}"); } $ready = get_license(); if (!$ready) { die("The specified seo-proxies.com license ({$uid}) is not active. {$NL}"); } if ($LICENSE['protocol'] != "http") { die("The seo-proxies.com proxy protocol of license {$uid} is not set to HTTP, please change the protocol to HTTP. {$NL}"); } echo "{$NL}{$B} Google rank checker for {$test_website_url} initated {$B_} {$NL}{$NL}"; /* * This loop iterates through all keyword combinations */ $ch = NULL; $rotate_ip = 0; // variable that triggers an IP rotation (normally only during keyword changes) $max_errors_total = 3; // abort script if there are 3 keywords that can not be scraped (something is going wrong and needs to be checked)
function compile($tpl_file = "", $username_i = true) { $CI =& get_instance(); $CI->config->load("rf_settings"); $CI->load->helper("number"); $title = config("office_name", "rf_settings") . " - "; if (isset($CI->data['title'])) { $title .= $CI->data['title']; } get_license(); if (isset($CI->data['menu'])) { $CI->data['menu'] .= create_menu(); } else { $CI->data['menu'] = create_menu(); } $expire = $CI->data['licexpire'] == "0" ? lang("offunlimlic") : timespan(time(), time() + $CI->data['licexpire']); $license = br(1) . lang("off_license") . $CI->data['licname'] . lang("off_expire") . $expire; $CI->data['title'] = $title; $CI->data['site'] = base_url(); $CI->data['tpl'] = base_url() . APPPATH . "views/" . $CI->config->item("theme"); $CI->data['lang'] = anchor("/main_index/lang/english", icon("english.png", "Select English lang")) . anchor("/main_index/lang/russian", icon("russia.png", "Select Russian lang")); $CI->data['username'] = construct_login($username_i); $CI->data['copyright'] = icon("F.logo25.png") . anchor("http://www.fdcore.ru/", "Freelance Developer Center 2007-" . date("Y")) . $license . '<br>'; if ($tpl_file == "") { $tpl_file = $CI->config->item("theme") . "/main"; } if (strpos($CI->load->view($tpl_file, "", true), "{copyright}") == 0) { exit("Ќужно указать тег копирайтов в шаблоне!"); } $CI->parser->parse($tpl_file, $CI->data); echo "<!-- RF CI CORE http://www.fdcore.ru Copyright (c) 2008-2009, FDCore Studio. All rights reserved. -->\r\n"; }