当前位置: 首页>>代码示例>>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;未经允许,请勿转载。