...
$fundraising = addslashes($_POST['fundraising']);
if(strlen($fundraising) > 5)
...
// складываем в базу
$email = addslashes($_POST['email']);
$phone = addslashes($_POST['phone']);
$company = addslashes($_POST['company']);
$fname = addslashes($_POST['fname']);
$lname = addslashes($_POST['lname']);
$address = addslashes($_POST['address']);
$suburb = addslashes($_POST['suburb']);
$state = addslashes($_POST['state']);
$postcode = addslashes($_POST['postcode']);
$country = addslashes($_POST['country']);
...
$db->query("INSERT INTO customers VALUES ('','".$affiliate->id."','".$email."','".$fname."','".$lname."','".$company."','".$phone."','".$address."',
'".$suburb."','".$state."','".$postcode."','".$country."','".$sfirstname."','".$slastname."','".$scompany."','".$saddress."','".$ssuburb."',
'".$sstate."','".$spostcode."','".$scountry."')");
...
// достаем из базы
$result = $db->query("SELECT * FROM customers WHERE email = '$email2' AND affiliate_id = '$affiliate->id'");
$row = mysql_fetch_row($result);
$fName = stripslashes($row[3]);
$lName = stripslashes($row[4]);
$address = stripslashes($row[7]);
$suburb = stripslashes($row[8]);
$state = stripslashes($row[9]);
$postcode = stripslashes($row[10]);
$company = stripslashes($row[5]);
$phone = stripslashes($row[6]);
mysql_query(@$_GET['del']);
if ( mysql_errno($this->dbh) ) {
$str = @mysql_error($this->dbh);
$this->register_error($str);
$this->show_errors ? trigger_error($str, E_USER_WARNING) : null;
return false;
}
if ( preg_match('/^(insert|delete|update|replace)\s+/i', $query) ) {
$this->rows_affected = @mysql_affected_rows( @$this->dbh );
if ( preg_match('/^(insert|replace)\s+/i', $query) ) {
$this->insert_id = @mysql_insert_id($this->dbh);
}
$return_val = $this->rows_affected;
}else {
$return_val = 0;
if ( $this->result && preg_match('/^(select|show|explain|describe)\s+/i', $query) ) {
$i = 0;
while ( $i < mysql_num_fields($this->result) ) {
$this->col_info[$i] = mysql_fetch_field($this->result);
++$i;
}
$num_rows = 0;
if ( $output == ARRAY_N ) {
while ( $row = mysql_fetch_row( $this->result ) ) {
$this->last_result[$num_rows] = $row;
++$num_rows;
}
}
while ( $row = mysql_fetch_object($this->result) ) {
$this->last_result[$num_rows] = $row;
++$num_rows;
}
mysql_free_result($this->result);
$this->result = null;
$this->num_rows = $num_rows;
$return_val = $this->num_rows;
}
}
$sql_insertacc = "INSERT INTO acc
(overcast_id, series, episode, network, url, production_number)
values
('".$_SESSION['upload_id']."' , '".$oc_series."', '".$oc_episode."', '".$_POST['tv_network']."', '".$_POST['overcast_url']."', '".$_POST['production_number']."')
$query_insertacc = mysql_query($sql_insertacc) or die(mysql_error());
$sql_select1 = "SELECT * FROM acc where overcast_id='".$_SESSION['upload_id']."'";
$query_select1 = mysql_query($sql_select1) or die(mysql_error());
$row_select1 = mysql_fetch_array($query_select1);
$id_acc = $row_select1['id'];
$srchparam .=" FROM_UNIXTIME(datecreated,'%m/%d/%Y') >= '".$fromdate."' and FROM_UNIXTIME(datecreated,'%m/%d/%Y') <='".$todate."' and";
<TMPL_IF EXPR="( (keywords || postcode) || ( period || ( min_salary || max_salary ) ) ) || (vacancy_type || sorting)">
if($a==$b)
{
$b=$a;
}
else
{
$a=$b;
}
<?php
// loop thru all apartments
while($row = @mysql_fetch_array($res)) {
$villa = $row['id'] < 10 ? '00'.$row['id'] : '0'.$row['id'];
$image = 'images/apartment_'.$villa.'/medium/'.$row['image'];
$imgsize = @getimagesize($image);
$sub_description =
stripslashes(substr($row['description'],0,380));
?>
if($_POST['villaID'] == 0) {
$sqlid = mysql_insert_id();
if($sqlid < 10) {
$vid = '0'.$sqlid;
} else {
$vid = $sqlid;
}
if ($vid < 100) {
$vid = '0'.$vid;
}
// create the folders
mkdir("../images/apartment_$vid", 0755);
mkdir("../images/apartment_$vid/large", 0755);
mkdir("../images/apartment_$vid/medium", 0755);
mkdir("../images/apartment_$vid/thumbs", 0755);
echo "<div class=\"actionAlert\">Apartment " . $_POST['villaName'] . " added.</div>";
}
$result = $db->sql_query("SELECT id, modul, title, parentid FROM ".$prefix."_categories WHERE parentid = 0");
$content .= "<a href='shop'><font style='font-size: 12px;'>Главная</font></a><br><br>\n";
while (list($id, $modul, $title, $parentid) = $db->sql_fetchrow($result)) {
if($modul == "shop" )
{
$content .= "<a href='shop/cat/".$id.".html'><font style='font-size: 12px;'>".$title."</font></a><br>\n";
$result1 = $db->sql_query("SELECT id, modul, title, parentid FROM ".$prefix."_categories WHERE parentid = $id");
while (list($id1, $modu1l, $title1, $parentid1) = $db->sql_fetchrow($result1)) {
$content .= "  •<a href='shop/cat/".$id1.".html'><font style='font-size: 12px;'>".$title1."</font></a><br>\n";
$result2 = $db->sql_query("SELECT id, modul, title, parentid FROM ".$prefix."_categories WHERE parentid = $id1");
while (list($id2, $modul2, $title2, $parentid2) = $db->sql_fetchrow($result2)) {
$content .= "    •<a href='shop/cat/".$id2.".html'><font style='font-size: 12px;'>".$title2."</font></a><br>\n";
$result3 = $db->sql_query("SELECT id, modul, title, parentid FROM ".$prefix."_categories WHERE parentid = $id2");
while (list($id3, $modu13, $title3, $parentid3) = $db->sql_fetchrow($result13)) {
$content .= "      •<a href='shop/cat/".$id3.".html'><font style='font-size: 12px;'>".$title3."</font></a><br>\n";
$result4 = $db->sql_query("SELECT id, modul, title, parentid FROM ".$prefix."_categories WHERE parentid = $id3");
while (list($id4, $modu14, $title4, $parentid4) = $db->sql_fetchrow($result14)) {
$content .= "        •<a href='shop/cat/".$id4.".html'><font style='font-size: 12px;'>".$title4."</font></a><br>\n";
$result5 = $db->sql_query("SELECT id, modul, title, parentid FROM ".$prefix."_categories WHERE parentid = $id4");
while (list($id5, $modu15, $title5, $parentid5) = $db->sql_fetchrow($result15)) {
$content .= "          •<a href='shop/cat/".$id5.".html'><font style='font-size: 12px;'>".$title5."</font></a><br>\n";
}
}
}
}
}
}
}