本文整理匯總了PHP中getid3_lib::SafeStripSlashes方法的典型用法代碼示例。如果您正苦於以下問題:PHP getid3_lib::SafeStripSlashes方法的具體用法?PHP getid3_lib::SafeStripSlashes怎麽用?PHP getid3_lib::SafeStripSlashes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類getid3_lib
的用法示例。
在下文中一共展示了getid3_lib::SafeStripSlashes方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: FixTextFields
function FixTextFields($text)
{
$text = getid3_lib::SafeStripSlashes($text);
$text = htmlentities($text, ENT_QUOTES);
return $text;
}
示例2: home
public function home()
{
global $core;
error_reporting(0);
$v = $this->__(w('v'));
if (!$v['v']) {
$sql = 'SELECT media_id
FROM _bio_media
WHERE media_type = ?
AND media_mp3 = ?
LIMIT 1';
$v['v'] = _field(sql_filter($sql, 1, 0), 'media_id', 0);
}
$tag_format = 'UTF-8';
$relative_path = '/data/artists/%s/media/';
$absolute_path = '/var/www/vhosts/rockrepublik.net/www' . $relative_path;
$sql = 'SELECT m.*, b.bio_id, b.bio_name
FROM _bio_media m
LEFT JOIN _bio b ON m.media_bio = b.bio_id
WHERE m.media_id = ?';
//$spaths = '/data/artists/' . $songd['ub'] . '/media/';
//$spath = '/var/www/vhosts/rockrepublik.net/httpdocs' . $spaths;
if ($media = _fieldrow(sql_filter($sql, $v['v']))) {
$row_relative = sprintf($relative_path, $media['bio_id']);
$row_absolute = $absolute_path . $row_relative;
$row_wma = $row_absolute . $media['media_id'] . '.wma';
$row_mp3 = $row_absolute . $media['media_id'] . '.mp3';
$rel_wma = '.' . $row_relative . $media['media_id'] . '.wma';
$rel_mp3 = '.' . $row_relative . $media['media_id'] . '.mp3';
if (@file_exists($rel_wma) && !@file_exists($rel_mp3) && !$media['media_mp3']) {
exec('ffmpeg -i ' . $row_wma . ' -vn -ar 44100 -ac 2 -ab 64kb -f mp3 ' . $row_mp3);
include_once XFS . XCOR . 'getid3/getid3.php';
$getID3 = new getID3();
$getID3->setOption(array('encoding' => $tag_format));
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH . 'write.php', __FILE__, true);
$tagwriter = new getid3_writetags();
$tagwriter->filename = getid3_lib::SafeStripSlashes($row_mp3);
$tagwriter->tagformats = array('id3v1');
$tagwriter->overwrite_tags = true;
$tagwriter->tag_encoding = $tag_format;
$tagwriter->remove_other_tags = true;
$tag_comment = 'Visita www.rockrepublik.net';
$media['album'] = !empty($media['media_album']) ? $media['media_album'] : 'Single';
$media['genre'] = !empty($media['media_genre']) ? $media['media_genre'] : 'Rock';
$media_f = array('title', 'name', 'album', 'genre');
foreach ($media_f as $mr) {
$media['media_' . $mr] = getid3_lib::SafeStripSlashes(utf8_encode(html_entity_decode($media['media_' . $mr])));
}
$tagwriter->tag_data = array('title' => array($media['media_title']), 'artist' => array($media['media_name']), 'album' => array($media['media_album']), 'year' => array(getid3_lib::SafeStripSlashes($media['media_year'])), 'genre' => array($media['media_genre']), 'comment' => array(getid3_lib::SafeStripSlashes($tag_comment)), 'tracknumber' => array(''));
$tagwriter->WriteTags();
$sql = 'UPDATE _bio_media SET media_mp3 = ?
WHERE media_id = ?';
_sql(sql_filter($sql, 1, $media['media_id']));
$fp = @fopen('./conv.txt', 'a+');
fwrite($fp, $row_mp3 . "\n");
fclose($fp);
}
if (!@file_exists($rel_wma)) {
$sql = 'UPDATE _bio_media SET media_mp3 = ?
WHERE media_id = ?';
_sql(sql_filter($sql, 2, $media['media_id']));
}
}
$sql = 'SELECT media_id
FROM _bio_media
WHERE media_type = ?
AND media_mp3 = ?
LIMIT 1';
if ($v_next = _field(sql_filter($sql, 1, 0), 'media_id', 0)) {
sleep(1);
_redirect(_link($this->m(), array('v' => $v_next)));
} else {
$this->e('no_next');
}
return $this->e('.');
}
示例3: home
function home()
{
global $db, $nucleo;
error_reporting(0);
$v = $this->control->__(array('v' => array('default' => 0)));
if (!$v['v'])
{
$sql = 'SELECT id
FROM _dl
WHERE ud = 1
AND dl_mp3 = 0
ORDER BY id
LIMIT 1';
$v['v'] = $this->_field($sql, 'id');
}
$sql = 'SELECT d.*, a.name
FROM _dl d, _artists a
WHERE d.id = ' . (int) $v['v'] . '
AND d.ub = a.ub';
if ($songd = $this->_fieldrow($sql))
{
$spaths = '/data/artists/' . $songd['ub'] . '/media/';
$spath = '/var/www/vhosts/rockrepublik.net/httpdocs' . $spaths;
$songid = $songd['id'];
$fwma = $spath . $songid . '.wma';
$fmp3 = $spath . $songid . '.mp3';
if (@file_exists('.' . $spaths . $songid . '.wma') && !@file_exists('.' . $spaths . $songid . '.mp3') && !$songd['dl_mp3'])
{
exec('ffmpeg -i ' . $fwma . ' -vn -ar 44100 -ac 2 -ab 64kb -f mp3 ' . $fmp3);
// MP3 tags
$tag_format = 'UTF-8';
include_once(SROOT . 'core/getid3/getid3.php');
$getID3 = new getID3;
$getID3->setOption(array('encoding' => $tag_format));
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.php', __FILE__, true);
$tagwriter = new getid3_writetags;
$tagwriter->filename = getid3_lib::SafeStripSlashes($fmp3);
$tagwriter->tagformats = array('id3v1');
$tagwriter->overwrite_tags = true;
$tagwriter->tag_encoding = $tag_format;
$tagwriter->remove_other_tags = true;
$tag_comment = 'Visita www.rockrepublik.net';
$songd['album'] = (!empty($songd['album'])) ? $songd['album'] : 'Single';
$songd['genre'] = (!empty($songd['genre'])) ? $songd['genre'] : 'Rock';
$songd_f = array('title', 'name', 'album', 'genre');
foreach ($songd_f as $songd_r)
{
$songd[$songd_r] = getid3_lib::SafeStripSlashes(utf8_encode(html_entity_decode($songd[$songd_r])));
}
$tagwriter->tag_data = array(
'title' => array($songd['title']),
'artist' => array($songd['name']),
'album' => array($songd['album']),
'year' => array(getid3_lib::SafeStripSlashes($songd['year'])),
'genre' => array($songd['genre']),
'comment' => array(getid3_lib::SafeStripSlashes($tag_comment)),
'tracknumber' => array('')
);
$tagwriter->WriteTags();
$sql = 'UPDATE _dl SET dl_mp3 = 1
WHERE id = ' . (int) $songd['id'];
$db->sql_query($sql);
$fp = @fopen('./conv.txt', 'a+');
fwrite($fp, $fmp3 . "\n");
fclose($fp);
}
if (!@file_exists('.' . $spaths . $songid . '.wma'))
{
$sql = 'UPDATE _dl SET dl_mp3 = 2
WHERE id = ' . (int) $songd['id'];
$db->sql_query($sql);
}
}
$sql = 'SELECT id
FROM _dl
WHERE ud = 1
AND dl_mp3 = 0
ORDER BY id
LIMIT 1';
if ($v_next = $this->_field($sql, 'id', 0))
{
sleep(1);
$nucleo->redirect($nucleo->link('conv', array('v' => $v_next)));
}
else
{
die('no_next');
//.........這裏部分代碼省略.........
示例4: FixTextFields
function FixTextFields($text)
{
return htmlentities(getid3_lib::SafeStripSlashes($text), ENT_QUOTES);
}
示例5: elseif
$station_name = "";
}
$data['artist'][] = getid3_lib::SafeStripSlashes($station_name);
//SERIES
$prg->series = $prg->getObject($prg->get('series_id'));
if (is_object($prg->series)) {
$prg->seriesName = $prg->series->get('name');
$series_name = $prg->seriesName;
} else {
$series_name = "";
}
$data['album'][] = getid3_lib::SafeStripSlashes($series_name);
// YEAR
$data['year'][] = getid3_lib::SafeStripSlashes(sotf_Utils::getParameter('production_date' . 'Year'));
// GENRE
$data['genre'][] = getid3_lib::SafeStripSlashes($vocabularies->getGenreName($prg->get('genre_id')));
// COMMENT
$data['comment'][] = ' *ID3Tags modified by StreamOnTheFly*';
$tagwriter->tag_data = $data;
$tagwriter->WriteTags();
}
//for count($audioFiles)
}
//foreach params
//-----------------------------------------------------------------------------------------------------
// save
// added by wolfgang csacsinovits & martin schmidt 05-09-27
if ($error_count > 0) {
$smarty->assign("FIELD_ERROR", $field_error);
$smarty->assign("ERROR_COUNT", $error_count);
} elseif ($finishpublish) {