当前位置: 首页>>代码示例>>PHP>>正文


PHP Release::get方法代码示例

本文整理汇总了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 &#62;</a>
	<a href="releases.php">Releases &#62;</a>
	<a href="release_edit.php?id=<?php 
    echo $_GET['id'];
    ?>
">View/Edit Release &#62;</a>
	Add Track
</div>
开发者ID:pinecreativelabs,项目名称:audition,代码行数:31,代码来源:release_track_add.php

示例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.");
     }
 }
开发者ID:pinecreativelabs,项目名称:audition,代码行数:14,代码来源:release_tracks.php

示例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();
开发者ID:pinecreativelabs,项目名称:audition,代码行数:31,代码来源:release_band_members.php

示例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();
     }
 }
开发者ID:pinecreativelabs,项目名称:audition,代码行数:23,代码来源:releases.php


注:本文中的Release::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。