當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。