$i = 1;
foreach($users as $row) {
$reg_date = $row[reg_date];
$gear = round(($row[dmg_awa] + $row[dmg_com]) / 2 + $row[def]) + $row[bonus_gear];
echo '<tr><form class="ad_form" method="POST">';
echo '<td class="field_counter">'.$i++.'</td>';
echo '<td><input type="text" value="'.$row[login].'" name="login" class="admin_form"><span style="display:none;">'.$row[login].'</span></td>';
echo '<td><input type="text" value="'.$row[nick].'" name="nick" class="admin_form"><span style="display:none;">'.$row[nick].'</span></td>';
echo '<td><input type="text" value="'.$row[real_name].'" name="real_name" class="admin_form"><span style="display:none;">'.$row[real_name].'</span></td>';
echo '<td>ff</td>';
echo '<td><input type="text" value="'.$row[vk_link].'" name="vk_link" class="admin_form"></td>';
echo '<td><input type="text" value="'.$row[lvl].'" name="lvl" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[lvl].'</span></td>';
echo '<td class="cstm-wid">'.$row[klass].'</td>';
echo '<td class="statsad"><input type="text" value="'.$row[dmg_com].'" name="dmg_com" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[dmg_com].'</span></td>';
echo '<td class="statsad"><input type="text" value="'.$row[dmg_awa].'" name="dmg_awa" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[dmg_awa].'</span></td>';
echo '<td class="statsad"><input type="text" value="'.$row[def].'" name="def" class="admin_form cstm-wid_small"><span style="display:none;">'.$row[def].'</span></td>';
echo '<td class="statsad">'.$gear.'</td>';
echo '<td class="statsad del"><input type="text" value="'.$row[cp_lead].'" name="cp_lead" class="admin_form cstm-wid_small"></td>';
echo '<td class="statsad del"><input type="text" value="'.$row[activation].'" name="activation" class="admin_form cstm-wid_small"></td>';
echo '<td class="statsad" style="border:none;"><button class="adrecord"><i class="fa fa-check-circle"></i></button></td>';
echo '</form></tr>';
}
$("#check-sight").submit(function() { //Change
var th = $(this);
$.ajax({
type: "POST",
url: "/update_user.php", //Change
data: th.serialize()
}).done(function() {
$('#gratz').fadeIn(500);
$('#gratz').delay(3500).fadeOut(function() {
$(this).remove();
});
setTimeout(function() {
// Done Functions
th.trigger("reset");
}, 1000);
});
return false;
});
if (isset($_POST['data']))
{
$data = $_POST['data'];
$fam = $_POST['family'];
$check = $_POST['user-check'];
$result122 = mysql_query("INSERT new-user SET login ='$fam', data = '$data', usercheck = '$check'",$db);
echo "Done!";}
function overrideTemplate(ctx) {
var dateNews = ctx.CurrentItem.Modified;
var idNews = ctx.CurrentItem.ID;
var anons = ctx.CurrentItem["_x041a__x0440__x0430__x0442__x04"];
return "<table class = news-wrapper><tr><td width=10%><div class = news-item_new><img src='/Company/News/new.png'></div></td><td width=10%><span class = news-item_title>" + dateNews.substring(0,10) + "</span></td>" + "<td width=80% class = news-item_anons>" + anons + "<a href='http://sp-test/Company/News/DispForm.aspx?ID=" + idNews + "' class='more-link'>[Подробнее...]</a></td></tr></table>";
}