Файл: vk/pages/adv/frends.php
Строк: 80
<!--User INDEX page-->
<div id='wrap'>
<div id='top2' style="margin-top: -20px;">
<?php
include 'pages/top2.php';
?>
</div>
<div id='header'>
<?php include 'pages/logo.php'; ?>
</div>
<!--<div id='slider'>
<div id="container">
<div id="example">
<div id="slides">
<div class="slides_container">
<div class="slide">
<img src="/img/s1.png" width="570" height="270" alt="Slide 1">
</div>
<div class="slide">
<img src="/img/s2.png" width="570" height="270" alt="Slide 2">
</div>
<div class="slide">
<img src="/img/s3.png" width="570" height="270" alt="Slide 3">
</div>
<div class="slide">
<img src="/img/s4.png" width="570" height="270" alt="Slide 4">
</div>
</div>
</div>
<img src="/img/example-frame.png" width="739" height="341" alt="Example Frame" id="frame">
</div>
</div>
</div>
-->
<div class='hr'></div>
<div id='content'>
<center>
<input type='button' class='btn btn-info' value='Мои добавить в друзья' OnClick='window.location.href="/adv/frends"'> 
<input type='button' class='btn btn-warning' value='Создать Добавить в друзья' OnClick='window.location.href="/adv/frendadd"'> 
</center>
<br>
<?php
if(isset($_POST['delete'])){
$vkpr->deleteFrend($_POST['gid']);
echo "
<div class='alert alert-success'>
<b>Задание добавить в друзья удалено, остаток бюджет возвращен на Ваш счет!</b>
</div>
";
}
if(isset($_POST['continue'])){
$vkpr->continueFrend($_POST['gid']);
echo "
<div class='alert alert-success'>
<b>Вы восстановили накрутку друзей!</b>
</div>
";
}
if(isset($_POST['stop'])){
$vkpr->stopFrend($_POST['gid']);
echo "
<div class='alert alert-error'>
<b>Вы остановили накрутку друзей!</b>
</div>
";
}
?>
<table class='reft'>
<tr>
<td><b>Название</b></td>
<td><b>Ссылка</b></td>
<td><b>Бюджет баллов</b></td>
<td><b>Требуется вступлений</b></td>
<td><b>Вступило</b></td>
<td><b>Действие</b></td>
</tr>
<?php
$frends = $vkpr->selectAdvFrends();
for($c=0;$c<count($frends);$c++){
$g = $frends[$c];
echo "
<tr>
<td><b>".$g['name']."</b></td>
<td>".$g['link']."</td>
<td>".$g['budget']."</td>
<td>".$g['users']."</td>
<td>".$g['joined']."</td>
";
if($g['active'] == 1){
echo "
<td>
<form method='post'>
<input type='hidden' value='".$g['id']."' name='gid'>
<input type='submit' class='btn btn-info' value='Остановить' name='stop'>
<input type='submit' class='btn btn-danger' value='Удалить' name='delete'>
</form>
</td>
</tr>
";
}else{
echo "
<td>
<form method='post'>
<input type='hidden' value='".$g['id']."' name='gid'>
<input type='submit' class='btn btn-success' value='Восстановить' name='continue'>
<input type='submit' class='btn btn-danger' value='Удалить' name='delete'>
</form>
</td>
</tr>
";
}
}
?>
</table>
</div>
</div>