$uid = 222;
if ($result = $mysqli->query("SELECT * FROM `121` WHERE `uid`='".$mysqli->real_escape_string($uid)."' LIMIT 1"))
{
$set = array();
$row = $result->fetch_object();
foreach ($row as $k => $v)
{
if ($k != "uid" AND $v !== 0)
{
$set[] = "`{$k}`='0'";
}
}
$result->close();
$mysqli->query("UPDATE `121` SET ".implode(", ", $set)." WHERE `uid`='".$mysqli->real_escape_string($uid)."'");
unset($set, $result, $row);
}
//-- GET ALL PRODUCTS FILTER BY CATEGORY
if(isset($this->request->get['path'])) {
$parts = explode('_', (string)$this->request->get['path']);
$category_id = (int)array_pop($parts);
} else {
$category_id = 0;
}
$sql = mysql_query("SELECT * FROM TotalTickets ORDER BY email ASC") or die(mysql_error());
$cust_email = false; $cust_txt = ""; $cust_sum = 0;
while($cust = mysql_fetch_array($sql, MYSQL_ASSOC))
{
if ($cust_email !== false AND $cust_email != $cust['email'])
{
echo '<tbody class="labels">
<tr>
<td colspan="5">
<label for="accounting">'.$cust_email.': '.round($cust_sum, 2).'</label>
<input type="checkbox" name="accounting" id="accounting" data-toggle="toggle">
</td>
</tr>
</tbody>
<tbody class="hide">
'.$cust_txt.'
</tbody> ';
$cust_email = $cust['email'];
$cust_txt = "";
$cust_sum = 0;
}
$cust_sum += $cust['price'];
$cust_txt .= ' <tr>
<td>'.$cust['filmName'].'</td>
<td>'.$cust['date'].'</td>
<td>'.$cust['timeBegin'].'</td>
<td>'.$cust['price'].'</td>
<td>0</td>
</tr>';
}
if (!empty($cust_txt))
{
echo '<tbody class="labels">
<tr>
<td colspan="5">
<label for="accounting">'.$cust_email.': '.round($cust_sum, 2).'</label>
<input type="checkbox" name="accounting" id="accounting" data-toggle="toggle">
</td>
</tr>
</tbody>
<tbody class="hide">
'.$cust_txt.'
</tbody> ';
}
echo(getcwd()."<br>\n");
echo(realpath("../folder/folder2/b.php")."<br>\n");
var_dump(file_exists("../folder/folder2/b.php"));
<a href='index.php?lang=EN'>EN</a> | <a href='index.php?lang=RU'>RU</a>
<?php
// index.php
$xmlURL = "http://domain.com/lang/en.xml";
if (!empty($_REQUEST['lang']) AND $_REQUEST['lang'] == "RU")
{
$xmlURL = "http://domain.com/lang/ru.xml";
}
?>