- 1
else if ( $cyty = $_POST['city']) $query = " SELECT * FROM sites WHERE site_name = '$cyty' ; ";
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 7
+142
else if ( $cyty = $_POST['city']) $query = " SELECT * FROM sites WHERE site_name = '$cyty' ; ";
+150
function news222($record)
{
$rrr = "answers.com";
global $aaa;
$keyword = $q;
$q = $q;
$qnew = ucwords($q);
global $q;
$lw = array();
$qw = array();
$aw = array();
$sw = array();
$con = mysql_connect("10.38.16.4","xxxx","xxxxx");
if($con)
{
mysql_select_db("sql_stats");
$c = mysql_fetch_array(mysql_query("select count(*) from webqna where u_query = '".mysql_real_escape_string($_REQUEST['q'])."'"));
if($c[0]==0)
{
$kk5=0;
for($jj=0;$jj<15;$jj++)
{
if($kk5 == 4)
break;
if($jj==0)
{
if (($record['GROUP/GROUP/RESULT/SITE-LINK'])){
if(strstr($record['GROUP/GROUP/RESULT/TITLE'],"..."))
continue;
$aaa=1;
global $gotRecords;
$gotRecords = TRUE;
$lw[$kk5] = $record['GROUP/GROUP/RESULT/DISPLAY-URL'];
$qw[$kk5] = $record['GROUP/GROUP/RESULT/TITLE'];
$aw[$kk5] = $record['GROUP/GROUP/RESULT/DESCRIPTION'];
$sw[$kk5] = $rrr;
}
}
else
{
if (($record['GROUP/GROUP/RESULT/SITE-LINK@'.$jj])){
global $gotRecords;
$gotRecords = TRUE;
if(strstr($record['GROUP/GROUP/RESULT/TITLE@'.$jj],"..."))
continue;
$lw[$kk5] = $record['GROUP/GROUP/RESULT/DISPLAY-URL@'.$jj];
$qw[$kk5] = $record['GROUP/GROUP/RESULT/TITLE@'.$jj];
$aw[$kk5] = $record['GROUP/GROUP/RESULT/DESCRIPTION@'.$jj];
$sw[$kk5] = $rrr;
}
}
$kk5++;
}
+156
function ValidatePhone(strphone)
{
for(j=0;j<strphone.length;j++)
{
var cut;
cut=strphone.charAt( j )
if(cut!=0&&cut!=1&&cut!=2&&cut!=3&&cut!=4&&cut!=5&&cut!=6&&cut!=7&&cut!=8&&cut!=9&&cut!="("&&cut!=")"&&cut!=".")
return false;
}
return true;
}
классика
+47
if($choice_product == 39.90)
{
include('monthly_recurring/subscription_create.php');
}
if($choose_shipping == '0.00')
{
$choose_shipping_recur = 9.99;
}
if($choose_shipping == 'Canada')
{
$choose_shipping_recur = 0;
}
if($choose_shipping == '25.00')
{
$choose_shipping_recur = 25;
}
if($choose_shipping == '55.00')
{
$choose_shipping_recur = 55;
}
+50
$submit = $_REQUEST['submit'];
if(isset($submit))
{
$first_name = $_REQUEST['first_name'];
$last_name = $_REQUEST['last_name'];
$address = $_REQUEST['address'];
$city = $_REQUEST['city'];
$country = $_REQUEST['country'];
$state = $_REQUEST['state'];
$zipcode = $_REQUEST['zipcode'];
$phone = $_REQUEST['phone'];
$email = $_REQUEST['email'];
$_SESSION['first_name'] = $first_name;
$_SESSION['last_name'] = $last_name;
$_SESSION['address'] = $address;
$_SESSION['city'] = $city;
$_SESSION['country'] = $country;
$_SESSION['state'] = $state;
$_SESSION['zipcode'] = $zipcode;
$_SESSION['phone'] = $phone;
$_SESSION['email'] = $email;
?>
<meta http-equiv="refresh" content="0;url=https://www.site.com/development1/billing_info.php"/>
<?
exit();
оригинальная обработка сабмита формы и редиректа
+84
http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/main/org/codehaus/groovy/runtime/ArrayUtil.java
/*
* Copyright 2003-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.runtime;
public class ArrayUtil {
private static final Object[] EMPTY = new Object[0]
;
public static Object[] createArray() {
return EMPTY;
}
public static Object[] createArray(Object arg0) {
return new Object[]{
arg0};
}
public static Object[] createArray(Object arg0, Object arg1) {
return new Object[]{
arg0, arg1};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2) {
return new Object[]{
arg0, arg1, arg2};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3) {
return new Object[]{
arg0, arg1, arg2, arg3};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4, arg5};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4, arg5, arg6};
}
............
+165
$conf_is_homepage=(strpos(strtolower($_SERVER['PHP_SELF']),"/index.php")>0)?true:false;
$accounttype=explode("|","General User|Administrator");
$accountstatus=explode("|","Inactive|Active");
$varLabel=explode("|","Message|First Name|Last Name|Username|User Email|Password");
$varName=explode("|","xxMESSAGExx|xxFIRSTNAMExx|xxSURNAMExx|xxUSERNAMExx|xxUSEREMAILxx|xxPASSWORDxx");
$varValue=explode("|","message_|cus_fname|cus_lname|cus_username|cus_email|cus_password");
// Error & Messages
$site_root=$conf_script_folder."/";
//$arrDayNames=explode('|', 'Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday');
$arrDayNames=explode('|', 'Weekdays|Saturday|Sunday');