Exemplo n.º 1
0
 public static function _inquirePrompt($id)
 {
     if (!WEB::_loggedIn()) {
         echo "<a href=\"view/inquire.php?id={$id}\" role=\"button\" class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#inquireModal\">Inquire</a>";
     } else {
         echo '';
     }
 }
Exemplo n.º 2
0
"  />
		      				<div class="desc">
		      					<p class="view_more">More Details</p>
		          				<p class="big_name"><?php 
            echo $performerList[$i]['performer_name'];
            ?>
</p>
		      				</div>
						</div>
					</a>
	          	</li>
			<?php 
        }
        ?>
      	</ul>
       <?php 
    }
    ?>

	</div>
	<div class="modal-footer">
        <button type="button" class="btn btn-default left" data-dismiss="modal">Close</button>
        <?php 
    WEB::_deletePrompt('band', $bd->getBandId(), "You will be deleting just a band.");
    ?>
        <?php 
    WEB::_updatePrompt('band', $bd->getBandId());
    ?>
	</div>
<?php 
}
Exemplo n.º 3
0
    ?>
</td>
		        	<td><?php 
    echo $u->getUserEmail();
    ?>
</td>
		        	<td><?php 
    echo $u->getUserNotify() == 1 ? 'Notify' : '';
    ?>
</td></td>
		        	<td><?php 
    echo $u->getApiKey();
    ?>
</td>

		        
		    	</tr> 
			</tbody>
		</table>
	</div>
	<div class="modal-footer">
        <button type="button" class="btn btn-default left" data-dismiss="modal">Close</button>
        <?php 
    WEB::_deletePrompt('user', $u->getUserId(), "You will be deleting only a user.");
    ?>
        <?php 
    WEB::_updatePrompt('user', $u->getUserId());
    ?>
	</div>
<?php 
}
Exemplo n.º 4
0
        echo 'selected';
    }
    ?>
><?php 
    echo $bandList[$i]['band_name'];
    ?>
</option>
						<?php 
}
?>
		
					</select>
			    </div>
			    
			    <div class="form-group <?php 
WEB::_ferror('record_artwork', $form_error);
?>
">
			 		<label for="record_artwork">Artwork</label>
			    	<input type="file" class="form-control" placeholder="Enter Artwork" id="image" name="image" value="<?php 
echo $r->getRecordArtwork();
?>
">
		    	    <p class="help-block"><i><?php 
echo ($r->getRecordArtwork() !== '' ? "File - <strong>" . str_replace("uploads/", "", $r->getRecordArtwork()) : '') . "</strong></i>";
?>
</p>
			    </div>
			    
				<button type="submit" class="btn btn-default">Submit</button>
			</form>
Exemplo n.º 5
0
" required>
			  	</div>

			  	<div class="form-group <?php 
WEB::_ferror('performer_bio', $form_error);
?>
">
			 		<label for="performer_bio">Performer Biography</label>
			    	<textarea class="form-control" rows="3" placeholder="Enter Performer Biography (Optional)" id="performer_bio" name="performer_bio"><?php 
echo $p->getPerformerBio();
?>
</textarea>
			    </div>

			  	<div class="form-group <?php 
WEB::_ferror('band_ids', $form_error);
?>
">
			 		<label for="band_ids">Bands</label>
			    	<select class="cs form-control sp" id="band_ids" name="band_ids[]" multiple="multiple" size="5">				
			    		<?php 
for ($i = 0; $i < sizeof($bandList); $i++) {
    ?>
			        		<option value="<?php 
    echo $bandList[$i]['band_id'];
    ?>
"<?php 
    if (!is_null($bandmateList) && array_key_exists($bandList[$i]['band_id'], $bandmateList)) {
        echo 'selected';
    }
    ?>
Exemplo n.º 6
0

<?php 
require __DIR__ . "/bourbon/login.php";
$status_message = '';
// Status messages, default to nothing
// List View
$l = new Login();
if (isset($_GET['auth'])) {
    if (!$l->authAccount()) {
        $status_message = WEB::_error('Authentication Failed! Check Email or Password!', null);
    }
}
?>

<!-- // Begin Genre Template (List View) -->

<?php 
include __DIR__ . "/bourbon/template/header.php";
?>

	
	<div class="row">
    	<div class="col-md-6">
		
		<div class="page-header">
	  		<h1>Login<small></small></h1>
		</div>

     	<?php 
echo $status_message;
Exemplo n.º 7
0
<?php

require_once __DIR__ . "/../bourbon/record.php";
$r = new Record();
$r->init(WEB::_get('id'));
?>


<?php 
if (!$r->valid()) {
    ?>
	<!-- // Invalid Record -->
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h4 class="modal-title">Invalid Record Inquiry</h4>
	</div>
	<div class="modal-body">
		<p>It looks like you were trying to inquire about a record that we no longer have.</p>
	</div>
<?php 
} else {
    ?>
	<!-- // Valid Record -->
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h4 class="modal-title">
			<strong><?php 
    echo $r->getRecordName();
    ?>
</strong> by <?php 
    echo $r->getBandName();
Exemplo n.º 8
0
?>
          	</ul>
          	
          	<?php 
WEB::_pageinate($page, $numOfBands);
?>

        </div>
        <?php 
if (WEB::_loggedIn()) {
    ?>
        <div class="col-lg-3 col-md-1">
        	<h2>Options</h2>
        	<ul class="nav nav-pills nav-stacked">
  				<li role="presentation"><a href="<?php 
    WEB::_create('band');
    ?>
">Add a New Band</a></li>
			</ul>
        </div>
        <?php 
}
?>
    </div>

<?php 
include __DIR__ . "/bourbon/template/footer.php";
?>


Exemplo n.º 9
0
" required>
			  	</div>

			  	<div class="form-group <?php 
WEB::_ferror('label_parent_company', $form_error);
?>
">
			    	<label class="control-label" for="label_parent_company">Parent Company *</label>
			    	<input type="text" class="form-control" placeholder="Enter Label Parent Company" id="label_parent_company" name="label_parent_company" value="<?php 
echo $l->getLabelParentCompany();
?>
" required>
			  	</div>

			  	<div class="form-group <?php 
WEB::_ferror('label_bio', $form_error);
?>
">
			 		<label for="label_bio">Label Biography</label>
			    	<textarea class="form-control" rows="3" placeholder="Enter Label Biography (Optional)" id="label_bio" name="label_bio"><?php 
echo $l->getLabelBio();
?>
</textarea>
			    </div> 

				<button type="submit" class="btn btn-default">Submit</button>

			</form>
		</div>
	</div>
Exemplo n.º 10
0
?>
          	</ul>

          <?php 
WEB::_pageinate($page, $numOfPerformers);
?>

        </div>
        <?php 
if (WEB::_loggedIn()) {
    ?>
        <div class="col-lg-3 col-md-1">
        	<h2>Options</h2>
        	<ul class="nav nav-pills nav-stacked">
  				<li role="presentation"><a href="<?php 
    WEB::_create('performer');
    ?>
">Add a New Performer</a></li>
			</ul>
        </div>
    	<?php 
}
?>
    </div>

<?php 
include __DIR__ . "/bourbon/template/footer.php";
?>


Exemplo n.º 11
0
</td>
					<td><?php 
    echo $r->getRecordCondition();
    ?>
</td>
					<td><?php 
    echo $r->getRecordLength();
    ?>
</td>
					<td><?php 
    echo $r->getGenreName();
    ?>
</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="modal-footer">
        <button type="button" class="btn btn-default left" data-dismiss="modal">Close</button>
        <?php 
    WEB::_deletePrompt('record', $r->getRecordId(), "You will be deleting only a record.");
    ?>
        <?php 
    WEB::_updatePrompt('record', $r->getRecordId());
    ?>
        <?php 
    WEB::_inquirePrompt($r->getRecordId());
    ?>
	</div>
<?php 
}
Exemplo n.º 12
0
				<?php 
}
?>
          	</ul>

          	
          	<?php 
WEB::_pageinate($page, $numOfRec);
?>


        </div>
        <?php 
if (WEB::_loggedIn()) {
    ?>
        <div class="col-lg-3 col-md-1">
        	<h2>Options</h2>
        	<ul class="nav nav-pills nav-stacked">
  				<li role="presentation"><a href="<?php 
    WEB::_create('record');
    ?>
">Add a New Record</a></li>
			</ul>
        </div>
    	<?php 
}
?>
    </div>

<?php 
include __DIR__ . "/bourbon/template/footer.php";
Exemplo n.º 13
0
				<?php 
}
?>
            </tbody>
          </table>

        <?php 
WEB::_pageinate($page, $numOfLabels);
?>
 

        </div>
        <?php 
if (WEB::_loggedIn()) {
    ?>
        <div class="col-md-4">
        	<h2>Options</h2>
        	<ul class="nav nav-pills nav-stacked">
  				<li role="presentation"><a href="<?php 
    WEB::_create('label');
    ?>
">Add a New Label</a></li>
			</ul>
        </div>
    	<?php 
}
?>
    </div>

<?php 
include __DIR__ . "/bourbon/template/footer.php";
Exemplo n.º 14
0
<?php

require_once __DIR__ . "/../bourbon/libs/bourbon.php";
$details = WEB::_get('d');
$id = WEB::_get('id');
$path = WEB::_get('p');
$url = BOURBON_URL . $path . ".php?delete={$id}";
?>

<!-- // Delete Id -->
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	<h4 class="modal-title">
		<strong>Are You Sure?</strong>
	</h4>
</div>

<div class="modal-body delete-view">
	<p><?php 
echo $details;
?>
</p>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default left" data-dismiss="modal">No, Close</button>
    <a href="<?php 
echo $url;
?>
" class="btn btn-danger right" role="button">Yes, Delete</a>
</div>
Exemplo n.º 15
0
            $updateStatus = $p->updateUserEmail($user_email);
        }
        if ($updateStatus) {
            $updateStatus = $p->updateUserPassword($user_password);
        }
        if ($updateStatus) {
            $updateStatus = $p->updateUserNotify($user_notify);
        }
        if ($updateStatus) {
            $p->refresh();
            $status_message = WEB::_success('Profile Updated Successfully!');
        } else {
            $status_message = WEB::_error('There is an error when you were updating your profile.', $form_error);
        }
    } else {
        $status_message = WEB::_error('There is an error when you were updating your profile. Please review the form below!', $form_error);
    }
}
?>

<!-- // Begin Genre Template (List View) -->

<?php 
include __DIR__ . "/bourbon/template/header.php";
?>

	
	<div class="row">
    	<div class="col-md-6">
		
		<div class="page-header">
Exemplo n.º 16
0
<?php

require_once __DIR__ . '/libs/bourbon.php';
$b = new Bourbon();
function cidr_match($ip, $range)
{
    list($subnet, $bits) = explode('/', $range);
    $ip = ip2long($ip);
    $subnet = ip2long($subnet);
    $mask = -1 << 32 - $bits;
    $subnet &= $mask;
    # nb: in case the supplied subnet wasn't correctly aligned
    return ($ip & $mask) == $subnet;
}
// Make sure either an authenticated user or GitHub is running this script
if (!WEB::_req('POST')) {
    $b->auth(null);
} else {
    if (!cidr_match($_SERVER['REMOTE_ADDR'], '192.30.252.0/22')) {
        header('Location: ' . realpath() . '/index.php');
    }
}
/**
 * GIT DEPLOYMENT SCRIPT
 *
 * Used for automatically deploying websites via github or bitbucket, more deets here:
 *
 *		https://gist.github.com/1809044
 */
// The commands
$commands = array('echo $PWD', 'whoami', 'git pull', 'git status', 'git submodule sync', 'git submodule update', 'git submodule status', 'mysqladmin -uroot -proot -f drop bourbon', 'mysqladmin -uroot -proot -f create bourbon', 'mysql -uroot -proot bourbon < /srv/cpsc471-bourbon/sql/latest.sql');
Exemplo n.º 17
0
          </table>

	        <?php 
WEB::_pageinate($page, $numOfGenres);
?>

        </div>
        <div class="col-md-2"></div>
        <?php 
if (WEB::_loggedIn()) {
    ?>
        <div class="col-md-4">
        	<h2>Options</h2>
        	<ul class="nav nav-pills nav-stacked">
  				<li role="presentation"><a href="<?php 
    WEB::_create('genre');
    ?>
">Create a New Genre</a></li>
			</ul>
        </div>
    	<?php 
}
?>
    </div>

<?php 
include __DIR__ . "/bourbon/template/footer.php";
?>


Exemplo n.º 18
0
    ?>
</a></td>
			    	</tr>
				<?php 
}
?>
            </tbody>
          </table>

	        <?php 
WEB::_pageinate($page, $numOfUsers);
?>

        </div>
        <div class="col-md-3">
        	<h2>Options</h2>
        	<ul class="nav nav-pills nav-stacked">
  				<li role="presentation"><a href="<?php 
WEB::_create('user');
?>
">Create a New User</a></li>
			</ul>
        </div>
    </div>

<?php 
include __DIR__ . "/bourbon/template/footer.php";
?>


Exemplo n.º 19
0
            // Send Email
            $message = new stdClass();
            $message->html = "Hi!<br><br><strong>{$name}</strong> just inquired about: <strong>{$recName}</strong>.<br><br>Email them at: {$email}.";
            $message->subject = "[Bourbon] New Record Inquiry - {$recName}";
            $message->from_email = "{$email}";
            $message->from_name = "{$name}";
            $message->to = array(array("email" => "{$user_email}"));
            $message->track_opens = false;
            $response = $mandrill->messages->send($message);
        }
    } catch (Exception $e) {
        $status_message = WEB::_error('Email failed to dispatch! Mandrill might be down.', null);
    }
    $status_message = WEB::_success('Email Dispatched Successfully!', null);
} else {
    $status_message = WEB::_error('Invalid Email Address! Try again!.', null);
}
?>


<?php 
include __DIR__ . "/bourbon/template/header.php";
?>

	
	<div class="page-header">
  		<h1>Inquiry</h1>
	</div>

     	<?php 
echo $status_message;
Exemplo n.º 20
0
" required>
			  	</div>

			  	<div class="form-group <?php 
WEB::_ferror('user_email', $form_error);
?>
">
			    	<label class="control-label" for="user_email">User Email *</label>
			    	<input type="email" class="form-control" placeholder="Enter User Email" id="user_email" name="user_email" value="<?php 
echo $u->getUserEmail();
?>
" required>
			  	</div>

			  	<div class="form-group <?php 
WEB::_ferror('user_password', $form_error);
?>
">
			    	<label class="control-label" for="user_password">User Password *</label>
			    	<input type="password" class="form-control" placeholder="Enter User Password" id="user_email" name="user_password" value="">
			  	</div>

			  	<div class="checkbox">
				    <label>
				      <input type="checkbox" name="user_notify" <?php 
echo $u->getUserNotify() == 1 ? 'checked' : '';
?>
> Notify
				    </label>
				</div>
Exemplo n.º 21
0
    if (!is_null($bandmateList) && array_key_exists($bandList[$i]['band_id'], $bandmateList)) {
        echo 'selected';
    }
    ?>
><?php 
    echo $bandList[$i]['band_name'];
    ?>
</option>
			        	<?php 
}
?>
					</select>
			    </div>
			    
			  	<div class="form-group <?php 
WEB::_ferror('performer_cover', $form_error);
?>
">
			 		<label for="image">Cover Photo (URL)</label>
			    	<input type="file" class="form-control" placeholder="Enter Performer Cover" id="image" name="image" value="<?php 
echo $p->getPerformerCover();
?>
">
		    	    <p class="help-block"><i><?php 
echo ($p->getPerformerCover() !== '' ? "File - <strong>" . str_replace("uploads/", "", $p->getPerformerCover()) : '') . "</strong></i>";
?>
</p>
			    </div>

				<button type="submit" class="btn btn-default">Submit</button>
Exemplo n.º 22
0
</p>
			          				<p class="big_name"><?php 
        echo $recordList[$i]['record_name'];
        ?>
</p>
			      				</div>
							</div>
						</a>
		          	</li>
				<?php 
    }
    ?>
          	</ul>

          	<?php 
    WEB::_pageinateSearch($page, $numOfRec, $s->pageinate());
    ?>

          <?php 
}
?>

        </div>
        <div class="col-lg-3 col-md-1">
        	<h2>Search Options</h2>
        	<form action="search.php" role="search">
	            <div class="form-group">
			    	<label for="r">By Record</label>
	            	<input type="text" class="form-control" name="r" placeholder="Maybe Love by The Beatles?" value="<?php 
echo $s->getRecordParam();
?>
Exemplo n.º 23
0
 	<?php 
echo $status_message;
?>

 	<div class="row">
    	<div class="col-md-6">
    		<div class="form-header">
	    		<h2>Update <strong><?php 
echo $g->getGenreName();
?>
</strong></h2>
	    	</div>
    		<form role="form" method="post">
				<p><i>* Required Field</i></p>
			 	<div class="form-group <?php 
WEB::_ferror('genre_name', $form_error);
?>
">
			    	<label for="genre_id">Genre Name *</label>
			    	<input type="text" class="form-control" placeholder="Enter Genre Name" id="genre_name" name="genre_name" value="<?php 
echo $g->getGenreName();
?>
" required>
			  	</div>
				<button type="submit" class="btn btn-default">Submit</button>
			</form>
		</div>
	</div>

<?php 
include __DIR__ . "/../bourbon/template/footer.php";
Exemplo n.º 24
0
		      					<p class="view_more">More Details</p>
		          				<p class="big_name"><?php 
            echo $bandList[$i]['band_name'];
            ?>
</p>
		      				</div>
						</div>
					</a>
	          	</li>
			<?php 
        }
        ?>
      	</ul>

      <?php 
    }
    ?>


	</div>
	<div class="modal-footer">
        <button type="button" class="btn btn-default left" data-dismiss="modal">Close</button>
        <?php 
    WEB::_deletePrompt('performer', $p->getPerformerId(), "You will be deleting only a performer. You will be only allowed to delete a performer if they don't have an associated band");
    ?>
        <?php 
    WEB::_updatePrompt('performer', $p->getPerformerId());
    ?>
	</div>
<?php 
}
Exemplo n.º 25
0
 public function getRecordAsListWithApi()
 {
     $list = array();
     $query = "SELECT *\n\t \t\t\tFROM record\n\t\t\t\tJOIN band\n\t\t\t\tJOIN genre\n\t\t\t\tON record.band_id=band.band_id AND record.genre_id = genre.genre_id\n\t\t\t\tORDER BY record.record_id DESC LIMIT " . NUM_OF_RESULTS;
     $result = mysqli_query(parent::getDb(), $query);
     if ($result) {
         while ($data = $result->fetch_assoc()) {
             $single_record = array();
             $single_record["record_id"] = $data["record_id"];
             $single_record["name"] = $data["record_name"];
             $single_record["band"] = $data["band_name"];
             // Comes from Band
             $single_record["current_value"] = $data["record_current_value"];
             $single_record["vinyl_size"] = $data["record_length"];
             $single_record["original_price"] = $data["record_original_price"];
             $single_record["release_date"] = $data["record_release_date"];
             $single_record["description"] = $data["record_description"];
             $single_record["album_condition"] = $data["record_condition"];
             $single_record["genre"] = $data["genre_name"];
             $single_record["artwork_image"] = WEB::_image($data["record_artwork"]);
             $list[] = $single_record;
         }
     }
     return $list;
 }
Exemplo n.º 26
0
        echo 'selected';
    }
    ?>
><?php 
    echo $labelList[$i]['label_name'];
    ?>
</option>
						<?php 
}
?>
					
					</select>
			    </div>

			  	<div class="form-group <?php 
WEB::_ferror('band_cover', $form_error);
?>
">
			 		<label for="image">Cover Photo (URL)</label>
			    	<input type="file" class="form-control" placeholder="Enter Band Cover" id="image" name="image" value="<?php 
echo $bd->getBandCover();
?>
">
		    	    <p class="help-block"><i><?php 
echo ($bd->getBandCover() !== '' ? "File - <strong>" . str_replace("uploads/", "", $bd->getBandCover()) : '') . "</strong></i>";
?>
</p>
			    </div>

				<button type="submit" class="btn btn-default">Submit</button>
Exemplo n.º 27
0
		<table class="table">
      		<thead>
		        <tr>
					<th>Founded Year</th>
					<th>Parent Company</th>
		        </tr>
	      	</thead>
			<tbody>
				<tr>
					<td><?php 
    echo WEB::_date($l->getLabelFoundedYear());
    ?>
</td>
					<td><?php 
    echo $l->getLabelParentCompany();
    ?>
</td>
			</tbody>
		</table>
	</div>
	<div class="modal-footer">
        <button type="button" class="btn btn-default left" data-dismiss="modal">Close</button>
        <?php 
    WEB::_deletePrompt('label', $l->getLabelId(), "You will be only deleting a label.");
    ?>
        <?php 
    WEB::_updatePrompt('label', $l->getLabelId());
    ?>
	</div>
<?php 
}
Exemplo n.º 28
0
            <?php 
} else {
    ?>
              <li><a href="<?php 
    WEB::_path('login');
    ?>
">Login</a></li>
            <?php 
}
?>
          </ul>
          <form action="search.php" class="navbar-form navbar-inverse navbar-right" role="search">
            <div class="form-group">
              <input type="text" class="form-control" name="s" placeholder="Search" required>
            </div>
          </form>
          <ul class="nav navbar-nav navbar-right">
            <li class="<?php 
WEB::_active('search');
?>
"><a href="<?php 
WEB::_path('search');
?>
">Advanced Search</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container" role="main">
Exemplo n.º 29
0
"><\/script>');
    }
    </script>

    <!--// Need to have a local copy of jQuery if google not avail -->

    <script src="<?php 
WEB::_root('template/bootstrap/dist/js/bootstrap.min.js');
?>
"></script>
    <script src="<?php 
WEB::_root('template/js/bootstrap-datepicker.js');
?>
"></script>
    <script src="<?php 
WEB::_root('template/js/chosen.jquery.min.js');
?>
"></script>

    <script>
	    $('.dp').datepicker({
				format: 'yyyy-mm-dd'
			});

        // Force a refresh when using the view modal
        $(document.body).on('hidden.bs.modal', function () {
          $('.modal').removeData('bs.modal')
        });

        $(".cs").chosen({
            placeholder_text_multiple: "Select from (Multiple Selects Allowed)",