$custinfo = regGetCustomerInfo2($_SESSION["log"]); $customer_name = $custinfo["first_name"] . " " . $custinfo["last_name"]; $customer_email = $custinfo["Email"]; } $message_text = ""; } if (Message::isMessage($Message) && $Message->is_set() && isset($Message->prd_request)) { $smarty->assign('prd_request', $Message->prd_request); } if (isset($_GET["sent"])) { $smarty->assign("sent", 1); } set_query('&sent=', '', true); if (count($all_product_pictures) > 1) { $smarty->assign("all_product_pictures", $all_product_pictures); } $smarty->assign("m_all_product_pictures", $all_product_pictures); $smarty->assign('conf_image', URL_ROOT . '/imgval.php?' . generateRndCode(4) . '=1'); $smarty->assign("product_info", $a); $smarty->assign("product_reviews_count", $k); $smarty->assign('product_last_reviews', discGetLastDiscussions($productID, 2)); /*if(file_exists(DIR_RSS."/{$productID}.xml")){ $smarty->assign('rss_link',URL_RSS."/{$productID}.xml"); }*/ $smarty->assign("product_extra", $extra); $smarty->assign("product_related", $related); $smarty->assign('vote_completed', isset($_SESSION["vote_completed"][$productID]) && $_SESSION["vote_completed"][$productID] ? 1 : 0); } } set_query('&picture_id=', '', true); //EOF
function regRegisterCustomer($login, $cust_password, $Email, $first_name, $last_name, $subscribed4news, $additional_field_values, $affiliateLogin = '') { $affiliateID = 0; if ($affiliateLogin) { $sql = "select customerID FROM " . CUSTOMERS_TABLE . "\n WHERE Login='******'"; list($affiliateID) = db_fetch_row(db_query($sql)); } foreach ($additional_field_values as $key => $val) { $additional_field_values[$key] = $val; } $currencyID = CONF_DEFAULT_CURRENCY; $cust_password = cryptPasswordCrypt($cust_password, null); // add customer to CUSTOMERS_TABLE $custgroupID = CONF_DEFAULT_CUSTOMER_GROUP; if ($custgroupID == 0) { $custgroupID = "NULL"; } /** * Activation code */ $ActivationCode = ''; if (CONF_ENABLE_REGCONFIRMATION) { $CodeExists = true; while ($CodeExists) { $ActivationCode = generateRndCode(16); $sql = 'SELECT 1 FROM ' . CUSTOMERS_TABLE . ' WHERE ActivationCode="' . xEscapeSQLstring($ActivationCode) . '"'; @(list($CodeExists) = db_fetch_row(db_query($sql))); } } db_query("insert into " . CUSTOMERS_TABLE . "( Login, cust_password, Email, first_name, last_name, subscribed4news, reg_datetime, CID, custgroupID, affiliateID, ActivationCode )" . "values( '" . xToText(trim($login)) . "', '" . xEscSQL(trim($cust_password)) . "', '" . xToText(trim($Email)) . "', " . " '" . xToText(trim($first_name)) . "', '" . xToText(trim($last_name)) . "', '" . (int) $subscribed4news . "', '" . xEscSQL(get_current_time()) . "', " . (int) $currencyID . ", " . (int) $custgroupID . ", " . xEscSQL(trim($affiliateID)) . ", '" . xEscSQL(trim($ActivationCode)) . "' )"); // add additional values to CUSTOMER_REG_FIELDS_TABLE foreach ($additional_field_values as $key => $val) { SetRegField($key, $login, $val["additional_field"]); } $customerID = regGetIdByLogin($login); //db_query("update ".CUSTOMERS_TABLE." set addressID='".$addressID. // "' where Login='******'" ); if ($subscribed4news) { subscrAddRegisteredCustomerEmail($customerID); } return true; }
<div class="right_col"> <form enctype="multipart/form-data" action="index.php" method="get" name="SearchForm" > <h2>Поиск в базе IPv6:</h2> Введите имя компьютера или адрес электронной почты. <div> <input type="text" name="search" id="search" value="<?php if ($Flag_search) { echo $_REQUEST["search"]; } ?> " maxlength=30 /> <input type="hidden" name="nc" value="<?php echo generateRndCode(6); ?> "/> <input type="submit" value="Найти"/> <?php if ($Err_search) { echo '<span class="formErrorMess">Может еще пару буковок?</span>'; } if ($Flag_search && !$Err_search) { $result = $db->query("SELECT Name, IPv6, RecDate, (SELECT Email FROM users WHERE ID = UserID) FROM computers WHERE (Name = '" . $_REQUEST["search"] . "' OR UserID = (SELECT ID FROM users WHERE Email = '" . $_REQUEST["search"] . "')) AND Protected != '1' GROUP BY Name ORDER BY RecDate DESC"); $Flag_found = false; foreach ($result as $row) { $Flag_found = true; echo "<div id='search'>"; echo "<div>\n<label>Регистратор:</label>\n" . hide_email($row[3]) . "\n</div>"; echo "<div>\n<label>Имя компьютера:</label>\n" . $row['Name'] . "\n</div>";