當前位置: 首頁>>代碼示例>>PHP>>正文


PHP playerSession函數代碼示例

本文整理匯總了PHP中playerSession函數的典型用法代碼示例。如果您正苦於以下問題:PHP playerSession函數的具體用法?PHP playerSession怎麽用?PHP playerSession使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了playerSession函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wrk_setHwPlatform

function wrk_setHwPlatform($db)
{
    $arch = wrk_getHwPlatform();
    $playerid = wrk_playerID($arch);
    // register playerID into database
    playerSession('write', $db, 'playerid', $playerid);
    // register platform into database
    switch ($arch) {
        case '01':
            playerSession('write', $db, 'hwplatform', 'RaspberryPi');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '02':
            playerSession('write', $db, 'hwplatform', 'UDOO');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '03':
            playerSession('write', $db, 'hwplatform', 'CuBox');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '04':
            playerSession('write', $db, 'hwplatform', 'BeagleBone Black');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        default:
            playerSession('write', $db, 'hwplatform', 'unknown');
            playerSession('write', $db, 'hwplatformid', $arch);
    }
}
開發者ID:AlarWE,項目名稱:RootFS-RaspberryPI,代碼行數:29,代碼來源:player_lib.php

示例2: playerSession

 *
 *  You should have received a copy of the GNU General Public License
 *  along with RaspyFi; see the file COPYING.  If not, see
 *  <http://www.gnu.org/licenses/>.
 *
 *
 *	UI-design/JS code by: 	Andrea Coiutti (aka ACX)
 * PHP/JS code by:			Simone De Gregori (aka Orion)
 *
 * file:							credits.php
 * version:						1.0
 *
 */
// common include
include 'inc/connection.php';
playerSession('open', $db, '', '');
?>

<?php 
$sezione = basename(__FILE__, '.php');
include '_header.php';
$tpl = 'credits.html';
?>


<!-- content --!>
<?php 
eval("echoTemplate(\"" . getTemplate("templates/{$tpl}") . "\");");
?>
<!-- content -->
開發者ID:jbandhauer,項目名稱:Volumio-WebUI,代碼行數:30,代碼來源:credits.php

示例3: file

                // apc.ini
                $file = "/etc/php5/fpm/conf.d/20-apc.ini";
                $fileData = file($file);
                $newArray = array();
                foreach ($fileData as $line) {
                    // find the line that starts with 'presentation_url"
                    if (substr($line, 0, 8) == 'apc.stat') {
                        // replace apc.stat with selected value
                        $line = "apc.stat = " . $_SESSION['w_queueargs'] . "\n";
                    }
                    $newArray[] = $line;
                }
                // Commit changes to /etc/php5/fpm/conf.d/20-apc.ini
                $fp = fopen($file, 'w');
                fwrite($fp, implode("", $newArray));
                fclose($fp);
                // Restart PHP service
                sysCmd('service php5-fpm restart');
                playerSession('write', $db, 'enableapc', $_SESSION['w_queueargs']);
                break;
        }
        // reset locking and command queue
        $_SESSION['w_queue'] = '';
        $_SESSION['w_queueargs'] = '';
        $_SESSION['w_jobID'] = '';
        $_SESSION['w_active'] = 0;
        $_SESSION['w_lock'] = 0;
    }
    session_write_close();
}
// --- WORKER MAIN LOOP --- //
開發者ID:baloothebear4,項目名稱:VolumioDisplay,代碼行數:31,代碼來源:player_wrk.php

示例4: file_put_contents

    <script src="js/volumio.settings.js"></script>
    <script src="js/jquery.pnotify.min.js"></script>
    <script src="js/bootstrap-fileupload.js"></script>
<?php 
}
//WebRadio Add Dialog
if (isset($_POST['radio-name']) && isset($_POST['radio-url'])) {
    $url = $_POST['radio-url'];
    $name = $_POST['radio-name'];
    $ret = file_put_contents('/var/lib/mpd/music/WEBRADIO/' . $name . '.pls', $url);
    session_start();
    sendMpdCommand($mpd, 'update WEBRADIO');
    // set UI notify
    $_SESSION['notify']['msg'] = 'New WebRadio Added';
    // unlock session file
    playerSession('unlock');
}
?>
<script type="text/javascript">
        setLibOptions(
                <? echo isset($_SESSION['displaylib']) && $_SESSION['displaylib'] == 1 ? 1 : 0;?>/*is enabled?*/,
                <? echo isset($_SESSION['displaylibastab']) && $_SESSION['displaylibastab'] == 1 ? 1 : 0;?>/*display as tab o
                <? echo $sezione == 'index' ? 1 : 0; ?>/*should load it?*/
        );
loadLibraryIfNeeded();
</script>

<script type="text/javascript">
    setLibOptions(
        <? echo isset($_SESSION['displaylib']) && $_SESSION['displaylib'] == 1 ? 1 : 0;?>/*is enabled?*/,
        <? echo isset($_SESSION['displaylibastab']) && $_SESSION['displaylibastab'] == 1 ? 1 : 0;?>/*display as tab or in browse view?*/,
開發者ID:norrest,項目名稱:test,代碼行數:31,代碼來源:_footer.php

示例5: playerSession

 *  You should have received a copy of the GNU General Public License
 *  along with RaspyFi; see the file COPYING.  If not, see
 *  <http://www.gnu.org/licenses/>.
 *
 *
 *	UI-design/JS code by: 	Andrea Coiutti (aka ACX)
 * PHP/JS code by:			Simone De Gregori (aka Orion)
 * 
 * file:							index.php
 * version:						1.0
 *
 */
// common include
include 'inc/connection.php';
playerSession('open', $db, '', '');
playerSession('unlock', $db, '', '');
// set template
$tpl = "indextpl.html";
?>

<?php 
$sezione = basename(__FILE__, '.php');
$_section = $sezione;
include '_header.php';
?>

<!-- content --!>
<?php 
eval("echoTemplate(\"" . getTemplate("templates/{$tpl}") . "\");");
?>
<!-- content -->
開發者ID:AlarWE,項目名稱:RootFS-RaspberryPI,代碼行數:31,代碼來源:index.php

示例6: init_displayscreens

function init_displayscreens($config, $db)
{
    session_start();
    foreach ($config['screens_active'] as $key => $val) {
        $screenname = $key . 'screen';
        playerSession('write', $db, $screenname, $val);
    }
    playerSession('write', $db, 'screenduration', $config['settings']['screen_duration']);
    playerSession('unlock');
    session_write_close();
    //$_SESSION['debugVD'] .= "MySQL updated with Volumio Display config settings. ";
}
開發者ID:baloothebear4,項目名稱:VolumioDisplay,代碼行數:12,代碼來源:player_lib.php

示例7: wrk_setHwPlatform

function wrk_setHwPlatform($db)
{
    $arch = wrk_getHwPlatform();
    $playerid = wrk_playerID($arch);
    // register playerID into database
    playerSession('write', $db, 'playerid', $playerid);
    // register platform into database
    switch ($arch) {
        case '01':
            playerSession('write', $db, 'hwplatform', 'RaspberryPi');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '02':
            playerSession('write', $db, 'hwplatform', 'UDOO');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '03':
            playerSession('write', $db, 'hwplatform', 'CuBox');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '04':
            playerSession('write', $db, 'hwplatform', 'BeagleBone Black');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '05':
            playerSession('write', $db, 'hwplatform', 'Compulab Utilite');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '06':
            playerSession('write', $db, 'hwplatform', 'Wandboard');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '07':
            playerSession('write', $db, 'hwplatform', 'Cubieboard');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '08':
            playerSession('write', $db, 'hwplatform', 'RaspberryPi2');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        case '09':
            playerSession('write', $db, 'hwplatform', 'Odroid-C1');
            playerSession('write', $db, 'hwplatformid', $arch);
            break;
        default:
            playerSession('write', $db, 'hwplatform', 'unknown');
            playerSession('write', $db, 'hwplatformid', $arch);
    }
}
開發者ID:jrenton,項目名稱:Volumio-WebUI,代碼行數:49,代碼來源:player_lib.php


注:本文中的playerSession函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。