本文整理汇总了PHP中clean_title函数的典型用法代码示例。如果您正苦于以下问题:PHP clean_title函数的具体用法?PHP clean_title怎么用?PHP clean_title使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了clean_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pane_base
function pane_base($url, $suj, $frm, $day, $img, $msg, $alx)
{
static $id;
$id++;
//$msg=ereg_replace('width='."^[_a-zA-Z0-9.]+$","",$msg);//([[:digit:]]*)
$ara = array("<![CDATA[", "]]>");
$suj = str_replace($ara, " ", $suj);
$url = str_replace($ara, " ", $url);
$msg = str_replace($ara, " ", $msg);
if ($img != "") {
$gmi = '<img src="' . $img . '" class="imgl" border="0" height="72">';
}
$id_art = recognize_article($url, clean_title($suj), $alx);
//already_exists
if ($id_art) {
$opt .= popart($id_art);
} elseif ($_SESSION["USE"] == $_SESSION["qb"] or $_SESSION["auth"] > 3) {
$purl = ajx($url, '');
$opt .= ljb('txtx', 'SaveJ', 'popup_addArt___' . $purl . '_1', "save") . ' ';
//$opt.=ljb('txtbox','SaveIf',$purl,'save').' ';
$opt .= btd('btc' . $id, lj('txtx', 'btc' . $id . '_batch__xd_' . $purl . '_p', '+')) . ' ';
$opt .= ljb('txtx', 'Close', 'art' . $id, 'x');
}
$panout = array('sty' => 'tab', 'id' => $id, 'suj' => $suj, 'date' => $day, 'tag' => " ", 'opt' => $opt, 'thumb' => $gmi, 'msg' => $msg, 'url' => $url);
$ret = template_build(template_rss(), $panout);
return divd('article', $ret);
}
示例2: Name
public function Name($id = 0)
{
$id = $id ? $id : $this->id;
$sql = "SELECT title_es as `name`\n FROM {$this->table}\n\n WHERE id_service = '{$id}'";
$query = $this->db->query($sql);
$row = $query->row();
return clean_title($row->name);
}
示例3: Name
public function Name($id = 0)
{
$id = $id ? $id : $this->id;
$sql = "SELECT name, lastname\n FROM {$this->table}\n\n WHERE id_author = '{$id}'";
$query = $this->db->query($sql);
$row = $query->row();
return clean_title($row->name . ' ' . $row->lastname);
}
示例4: Name
public function Name($id = 0)
{
$id = $id ? $id : $this->id;
$sql = "SELECT function as name\n FROM {$this->table}\n WHERE id_submenu = '{$id}'";
$query = $this->db->query($sql);
$row = $query->row();
return clean_title($row->name);
}
示例5: Name
public function Name($id = 0)
{
$id = $id ? $id : $this->id;
$sql = "SELECT id_cart as `name`\n FROM {$this->table}\n WHERE id_cart = '{$id}'";
$query = $this->db->query($sql);
$row = $query->row();
return clean_title(str_pad($row->name, 6, "0", STR_PAD_LEFT));
}
示例6: Name
public function Name($id = 0)
{
$id = $id ? $id : $this->id;
$sql = "SELECT title as `name`, identification , num\n FROM {$this->table}\n WHERE id_trial = '{$id}'";
$query = $this->db->query($sql);
$row = $query->row();
return clean_title(($row->identification ? $row->identification : $row->name) . ($row->num ? ' - Ensayo ' . $row->num : ''));
}
示例7: sugg_import
function sugg_import($f, $o = '', $res = '')
{
list($f, $o) = ajxp($res, $f, $o);
if (substr($f, 0, 4) != 'http') {
return;
}
req('tri,pop');
$_GET['urlsrc'] = $f;
list($suj, $msg) = vacuum($f, '');
$msg = format_txt($msg, '', '');
$ret = balc('h2', '', clean_title($suj)) . br() . $msg;
return $ret;
}
示例8: prep_app_title
function prep_app_title($title = array(), $html = true)
{
if (!is_array($title)) {
return clean_title($title);
}
$implode = ' | ';
if ($html) {
$implode = '<i class="fa fa-arrow-right"></i>';
}
$title = implode($implode, $title);
if (!$html) {
$title = clean_title($title);
}
return $title;
}
示例9: update_atom
update_atom('topic', $topic_id);
if ($mode == 'reply' && $post_info['topic_status'] == TOPIC_LOCKED) {
$locked_warn = '
<div class="warnColor1">
<b>' . $lang['LOCKED_WARN'] . '</b>
</div>
<br /><hr /><br />
';
$return_message = $locked_warn . $return_message;
}
bb_die($return_message);
}
}
if ($refresh || $error_msg || $submit && $topic_has_new_posts) {
$username = !empty($_POST['username']) ? clean_username($_POST['username']) : '';
$subject = !empty($_POST['subject']) ? clean_title($_POST['subject']) : '';
$message = !empty($_POST['message']) ? prepare_message($_POST['message']) : '';
if ($preview) {
$preview_subject = $subject;
$preview_username = $username;
$preview_message = htmlCHR($message, false, ENT_NOQUOTES);
$preview_message = bbcode2html($preview_message);
$template->assign_vars(array('TPL_PREVIEW_POST' => true, 'TOPIC_TITLE' => wbr($preview_subject), 'POST_SUBJECT' => $preview_subject, 'POSTER_NAME' => $preview_username, 'POST_DATE' => bb_date(TIMENOW), 'PREVIEW_MSG' => $preview_message));
}
} else {
// User default entry point
if ($mode == 'newtopic') {
$username = $userdata['session_logged_in'] ? $userdata['username'] : '';
$subject = $message = '';
} elseif ($mode == 'reply') {
$username = $userdata['session_logged_in'] ? $userdata['username'] : '';
示例10: Name
public function Name($id = 0)
{
$id = $id ? $id : $this->id;
$dataItem = $this->DataElement($id);
$title = $dataItem['client_code'] . "_" . $dataItem['instrument_id'] . "_" . date('dmy', mysql_to_unix($dataItem['date'])) . "_" . $dataItem['version'];
return clean_title($title);
}
示例11: explode
$id = explode(UNDERSCORE, $cPath);
$new_path = EMPTY_STRING;
while (list($key, $value) = each($id)) {
unset($prev_id);
unset($first_id);
$categories_query_sql = str_replace(HASH, $value, $categories_query_sql0);
$categories_query = olc_db_query($categories_query_sql);
if (olc_db_num_rows($categories_query) > 0) {
$new_path .= $value;
while ($row = olc_db_fetch_array($categories_query)) {
$name = $row[$categories_name];
$title = $row[$categories_heading_title];
if ($title == EMPTY_STRING) {
$title = $name;
}
$title = clean_title($title);
$foo[$row[$categories_id]] = array($name_text => $name, $parent_text => $row[$parent_id_text], $title_text => $title, $level_text => $key + 1, $path_text => $new_path . UNDERSCORE . $row[$categories_id], $next_id_text => false);
if (isset($prev_id)) {
$foo[$prev_id][$next_id_text] = $row[$categories_id];
}
$prev_id = $row[$categories_id];
if (!isset($first_id)) {
$first_id = $row[$categories_id];
}
$last_id = $row[$categories_id];
}
$foo[$last_id][$next_id_text] = $foo[$value][$next_id_text];
$foo[$value][$next_id_text] = $first_id;
$new_path .= UNDERSCORE;
} else {
break;
示例12: DB
$status = (int) $this->request['status'];
// Валидность статуса
if (!isset($lang['TOR_STATUS_NAME'][$status])) {
$this->ajax_die($lang['STATUS_DOES_EXIST'] . $new_status);
}
$topic_ids = DB()->fetch_rowset("SELECT attach_id FROM " . BB_BT_TORRENTS . " WHERE topic_id IN({$topics})", 'attach_id');
foreach ($topic_ids as $attach_id) {
change_tor_status($attach_id, $status);
}
$this->response['status'] = $bb_cfg['tor_icons'][$status];
$this->response['topics'] = explode(',', $topics);
break;
case 'edit_topic_title':
$topic_id = (int) $this->request['topic_id'];
$topic_title = (string) $this->request['topic_title'];
$new_title = clean_title($topic_title);
if (!$topic_id) {
$this->ajax_die($lang['INVALID_TOPIC_ID']);
}
if ($new_title == '') {
$this->ajax_die($lang['DONT_MESSAGE_TITLE']);
}
if (!($t_data = DB()->fetch_row("SELECT forum_id FROM " . BB_TOPICS . " WHERE topic_id = {$topic_id} LIMIT 1"))) {
$this->ajax_die($lang['INVALID_TOPIC_ID_DB']);
}
$this->verify_mod_rights($t_data['forum_id']);
$topic_title_sql = DB()->escape($new_title);
DB()->query("UPDATE " . BB_TOPICS . " SET topic_title = '{$topic_title_sql}' WHERE topic_id = {$topic_id} LIMIT 1");
// Обновление кеша новостей на главной
$news_forums = array_flip(explode(',', $bb_cfg['latest_news_forum_id']));
if (isset($news_forums[$t_data['forum_id']]) && $bb_cfg['show_latest_news']) {
示例13: exit
}
if (!$contents) {
exit('<div class="error_msg">' . $lang_check_cantLocate . '</div>');
}
if (ob_get_level() == 0) {
ob_start();
}
foreach ($contents as $value) {
if (in_array($value, $garbage)) {
continue;
}
$dirPath = str_replace($prefix, '', $value);
$onlyFileName = strrchr($value, '/');
$file_date = date("m/d/Y H:i:s", filectime($value));
$file_type = file_type($onlyFileName);
$clean_title = clean_title($onlyFileName);
$datafile = $prefix . 'data' . $onlyFileName . '.txt';
if (file_exists($datafile)) {
continue;
}
debugWrite('[DEBUG] <b>Name:</b>' . $clean_title . ' <b>File:</b>' . $onlyFileName . ' <b>Type:</b>' . $file_type);
if ($settings_data['imdb_mode'] == 'false') {
touch($datafile);
continue;
}
debugWrite(' [' . $lang_check_debugCreateFile . ']<BR>');
$fh = fopen($datafile, 'a') or die($lang_check_notWritable);
$movieArray = $imdb->getMovieInfo($clean_title, 2);
$genres = implode(',', $movieArray['genres']);
$stringData = $file_date . PHP_EOL . $movieArray['title'] . PHP_EOL . $file_type . PHP_EOL . $movieArray['title_id'] . PHP_EOL . $genres . PHP_EOL . $movieArray['rating'] . PHP_EOL . $dirPath . PHP_EOL . $movieArray['movie_rating'] . PHP_EOL . $movieArray['plot'];
fwrite($fh, $stringData);
示例14: save_tits_j
function save_tits_j($id)
{
$qda = $_SESSION['qda'];
if ($ib = getjx('ib')) {
$sq['ib'] = $ib;
cache_value($id, 10, $ib);
}
if ($cat = getjx('frm1')) {
$sq['frm'] = $cat;
cache_value($id, 1, $cat);
}
if ($suj = clean_title(getjx('suj'))) {
$sq['suj'] = $suj;
cache_value($id, 2, $suj);
}
if ($img = getjx('img')) {
$sq['img'] = $img;
cache_value($id, 3, $img);
}
if ($src = getjx('src')) {
$sq['mail'] = $src;
cache_value($id, 9, $src);
}
if ($sq) {
msquery('update ' . $qda . ' set ' . implode(',', atmrup($sq)) . ' where id=' . $id);
}
$r = $_SESSION['art_options'];
$rdata = sql('val,msg', 'qdd', 'kv', 'ib="' . $id . '"');
if ($r) {
foreach ($r as $k => $v) {
$val = $rdata[$v];
$gv = ajx($_GET[$v], 1);
if ($v == "related" or $v == "float_img" or $v == "template" or $v == "folder") {
$vrf = ' ';
}
if ($v == "authlevel") {
if (rstr(21)) {
$vrf = "1";
} else {
$vrf = "all";
}
}
if ($v == "tracks") {
if (rstr(1)) {
$vrf = 'true';
} else {
$vrf = 'false';
}
$gv = $gv == 1 ? 'true' : 'false';
}
if ($v == "2cols") {
if (rstr(17)) {
$vrf = 'true';
} else {
$vrf = 'false';
}
$gv = $gv == 1 ? 'true' : 'false';
}
if ($v == "fav") {
if (rstr(52)) {
$vrf = 'true';
} else {
$vrf = 'false';
}
$gv = $gv == 1 ? 'true' : 'false';
}
if ($v == "like") {
if (rstr(90)) {
$vrf = 'true';
} else {
$vrf = 'false';
}
$gv = $gv == 1 ? 'true' : 'false';
}
if ($v == "poll") {
if (rstr(91)) {
$vrf = 'true';
} else {
$vrf = 'false';
}
$gv = $gv == 1 ? 'true' : 'false';
}
if ($v == "lang") {
$vrf = prmb(25);
$arr = explode(' ', prmb(26));
if ($arr) {
foreach ($arr as $ka => $va) {
$valb = $rdata['lang' . $va];
if ($_GET['lang' . $va] == $vrf && $val) {
$_GET['lang' . $va] = ' ';
}
if ($_GET['lang' . $va] && $_GET['lang' . $va] != $valb && $_GET['lang' . $va] != 'undefined') {
utag_sav($id, 'lang' . $va, $_GET['lang' . $va]);
}
}
}
}
if (!$val) {
$val = $vrf;
}
//.........这里部分代码省略.........
示例15: parsedtemplatepath
function parsedtemplatepath($templatetitle)
{
global $config;
return $config['dir_parsed'] . clean_title($templatetitle) . ".html";
}