本文整理汇总了PHP中Release::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Release::get方法的具体用法?PHP Release::get怎么用?PHP Release::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Release
的用法示例。
在下文中一共展示了Release::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: include_class
<?php
include 'base.php';
User::protect();
include_class('releases');
include_class('m2');
include_class('release_tracks');
$r = Release::get($_GET['id']);
$section = 'releases';
if ($_POST['submit'] && !db::isError($r)) {
// add news entry
$rt = $r->addTrack($_POST);
if (!db::isError($rt)) {
header('Location: release_track_edit.php?id=' . $rt->getID());
}
}
$editors = array('lyrics', 'meta_information');
$page_title = 'Add Track';
include 'layout/header.php';
if (!db::isError($r)) {
?>
<div id="breadcrumb">
<a href="index.php">Audition ></a>
<a href="releases.php">Releases ></a>
<a href="release_edit.php?id=<?php
echo $_GET['id'];
?>
">View/Edit Release ></a>
Add Track
</div>
示例2: remove
function remove()
{
if (User::isAdmin()) {
$r = @mysql_query("delete from Release_Tracks where ID = '{$this->ID}'");
if (!$r) {
return Error::MySQL();
} else {
$re = Release::get($this->release_id);
return $re;
}
} else {
return Error::create("YOu are not allowed to remove tracks.");
}
}
示例3: include_class
<?php
include 'base.php';
User::protect();
include_class('releases');
include_class('band_members');
$r = Release::get($_REQUEST['id']);
if ($_GET['task'] == 'select' && !db::isError($r)) {
$res = $r->selectBandMembers($_POST['member_id']);
if (!db::isError($res)) {
?>
<script type="text/javascript">self.close(); opener.location.reload();</script>
<?php
}
}
$page_title = 'Release Band Members';
$stylesheet = 'popup.css';
include 'layout/header_popup.php';
if (User::isAdmin()) {
?>
<?php
if (!db::isError($r)) {
$selectedBMArray = $r->getReleaseBandMembers();
if (!db::isError($selectedBMArray)) {
$bmIDArray = array();
foreach ($selectedBMArray as $bm) {
$bmIDArray[] = $bm->getID();
}
unset($selectedBMArray);
$bmArray = BandMemberList::get_band_members();
示例4: add
function add($postArray)
{
$db = new db();
if (!User::isAdmin()) {
return Error::create("You are not allowed to add releases.");
}
$title = $db->sanitize_to_db($postArray['title']);
$sub_title = $db->sanitize_to_db($postArray['sub_title']);
$date = $db->sanitize_to_db($postArray['date']);
$_dt = strtotime($date);
$date = date('Y-m-d', $_dt);
$notes = $db->sanitize_to_db($postArray['notes']);
$press_notes = $db->sanitize_to_db($postArray['press_notes']);
if (!$title) {
$title = '(untitled release)';
}
$r = @mysql_query("insert into Releases (title, sub_title, date, notes, press_notes, is_active) values ('{$title}', '{$sub_title}', '{$date}', '{$notes}', '{$press_notes}', " . DEFAULT_ACTIVE . ")");
if ($r) {
return Release::get(mysql_insert_id());
} else {
return Error::MySQL();
}
}