<?php

$bands = new Bands();
?>

<ul class="adm-bands layout">
	<a href="<?php 
echo BASEPATH . DS . $page . DS . $tab . DS;
?>
new">
		<li class="box">
			<h3 class="glow"><i class="fa fa-plus-circle"></i> Neue Band erstellen</h3>
		</li>
	</a>

<?php 
for ($i = 0; $i < $bands->getTotalBands(); $i++) {
    //create an band instance for every iteration
    $band = new Band($bands->getBand($i));
    ?>
	<a href="<?php 
    echo BASEPATH . DS . $page . DS . $tab . DS;
    echo $band->getId();
    ?>
">
		<li class="box">
			<h3 class="glow"><?php 
    echo $band->getName();
    ?>
</h3>
		</li>
Ejemplo n.º 2
0
<?php

$bands = new Bands();
if ($url->getPagenum() != null) {
    $pagenum = $url->getPagenum();
} else {
    $pagenum = 1;
}
$pages = ceil($bands->getTotalBands() / PERPAGE);
$pagination = array();
for ($i = 0; $i < $pages; $i++) {
    $pagination[] = $i + 1;
}
?>

<div class="row">
	<div class="content67">
		<h2>Bands bei uns im Hexenhaus</h2>
		<hr>
		<ul class="bands layout">
			<?php 
for ($i = ($pagenum - 1) * PERPAGE; $i < $bands->getTotalBands() && $i < $pagenum * PERPAGE; $i++) {
    $band = new Band($bands->getBand($i));
    ?>
			<li class="box">

				<div class="leftdiv left">
					<a target="_blank" href="<?php 
    echo $band->getLink();
    ?>
">
Ejemplo n.º 3
0
    $usr = new Users();
    $usr = $usr->get($_SESSION['user']);
    if (!$usr) {
        header('HTTP/1.0 302 Found');
        header("Location: index.php?map=login&page=index");
        exit;
    }
}
if (!isset($_GET['id'])) {
    header('HTTP/1.0 302 Found');
    header("Location: index.php?map=default&page=home");
    exit;
}
//Haal ID op
$id = $_GET['id'];
$bands = new Bands();
$bandsmusic = new BandsMusic();
$bandsusers = new BandsUsers();
//Haal genres op
$genres = new Genres();
$genres = $genres->get_all();
//Haal band op
$band = $bands->get($id);
if (!$band) {
    header('HTTP/1.0 302 Found');
    header("Location: index.php?map=events&page=index");
    exit;
}
//Haal bandleden op
$bandmembers = $bandsusers->getBandMembers($id);
$remainingMembers = $bandsusers->getAllMembers($id);
<?php

if ($bandId == 'new') {
    $bandInsert = new BandInsert();
    $band = new Band();
} else {
    $bandUpdate = new BandUpdate($bandId);
    $bands = new Bands($bandId);
    $band = new Band($bands->getBand());
}
$bandDelete = new BandDelete($band);
?>

<form enctype="multipart/form-data" class="box bands" method="post" action="<?php 
echo BASEPATH . DS . $page . DS . $tab . DS . $bandId;
?>
" name="bandform">
	<ul class="layout">
		<li>
			<label for="band_name">Name: </label>
			<input id="band_name" class="band_input" type="text" value="<?php 
echo $band->getName();
?>
" name="name" autocomplete="off" placeholder="Bandname eingeben" required />
		</li>
		<li>
			<label for="band_desc">Beschreibung: </label>
			<textarea id="band_desc" class="band_input" rows="5" name="desc" placeholder="kurze Bandbeschreibung eintippen" required /><?php 
echo $band->getDesc();
?>
</textarea>
Ejemplo n.º 5
0
 public function delete($id)
 {
     if (Input::has('selected_band')) {
         return \Redirect::to('admin/bands/' . Input::get('selected_band') . '/delete');
     } else {
         if (Input::has('confirmed_delete')) {
             try {
                 //$band = Bands::where('id', '=', $id)->get();
                 $band = Bands::find($id);
                 Bands::where('id', '=', $id)->delete();
                 return View::make('admin.bands.delete', ['status' => 'successful', 'band' => $band, 'id' => $id]);
             } catch (Illuminate\Database\Eloquent\ModelNotFoundException $e) {
                 return View::make('admin.bands.delete', ['status' => 'unsuccessful', 'band' => $band, 'id' => $id]);
             }
         } else {
             $band = Bands::find($id);
             return View::make('admin.bands.delete', ['status' => 'confirm', 'band' => $band, 'id' => $id]);
         }
     }
 }
Ejemplo n.º 6
0
<?php

if (isset($_SESSION['user'])) {
    $usr = new Users();
    $usr = $usr->get($_SESSION['user']);
    if (!$usr) {
        header('HTTP/1.0 302 Found');
        header("Location: index.php?map=login&page=index");
        exit;
    }
}
$bands = new Bands();
//Define variables
$naam = $genre_id = $website = $woonplaats = $telefoon = "";
//Haal genres op
$genres = new Genres();
$genres = $genres->get_all();
//Check of er POST waarde is
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    //Valideer post attr
    if ($_POST && isset($_POST['naam'], $_POST['genre'], $_POST['website'], $_POST['woonplaats'], $_POST['telefoon'])) {
        $naam = test_input($_POST['naam']);
        $genre_id = test_input($_POST['genre']);
        $website = test_input($_POST['website']);
        $woonplaats = test_input($_POST['woonplaats']);
        $telefoon = test_input($_POST['telefoon']);
        $band = $bands->add($naam, $genre_id, $website, $woonplaats, $telefoon, $usr['id']);
        if ($band) {
            $band = $bands->get($band);
            if ($band) {
                ?>
Ejemplo n.º 7
0
<?php

if (isset($_SESSION['user'])) {
    $usr = new Users();
    $usr = $usr->get($_SESSION['user']);
    if (!$usr) {
        header('HTTP/1.0 302 Found');
        header("Location: index.php?map=login&page=index");
        exit;
    }
}
$bands = new Bands();
$all_bands = $bands->get_all();
?>

<div class="page-header">
    <?php 
if (!empty($usr['band']) && isset($usr['band'])) {
    ?>
    <div class="btn-group pull-right">
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" ariahaspopup="true"
                aria-expanded="false">
            Acties <span class="caret"></span>
        </button>
        <ul class="dropdown-menu">
            <li><a href="index.php?map=bands&page=add">Eigen band aanmaken</a></li>
        </ul>
    </div>
    <?php 
}
?>