本文整理汇总了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);
}
}
示例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 -->
示例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 --- //
示例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?*/,
示例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 -->
示例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. ";
}
示例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);
}
}