本文整理汇总了PHP中notice::majNotices_clean_tags方法的典型用法代码示例。如果您正苦于以下问题:PHP notice::majNotices_clean_tags方法的具体用法?PHP notice::majNotices_clean_tags怎么用?PHP notice::majNotices_clean_tags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类notice
的用法示例。
在下文中一共展示了notice::majNotices_clean_tags方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pmb_mysql_query
if (!$count) {
$notices = pmb_mysql_query("SELECT count(1) FROM notices", $dbh);
$count = pmb_mysql_result($notices, 0, 0);
}
print "<br /><br /><h2 align='center'>" . htmlentities($msg["nettoyage_clean_tags"], ENT_QUOTES, $charset) . "</h2>";
$query = pmb_mysql_query("SELECT notice_id FROM notices LIMIT {$start}, {$lot}");
if (pmb_mysql_num_rows($query)) {
// définition de l'état de la jauge
$state = floor($start / ($count / $jauge_size));
// mise à jour de l'affichage de la jauge
print "<table border='0' align='center' width='{$jauge_size}' cellpadding='0' border='0'><tr><td class='jauge'>";
print "<img src='../../images/jauge.png' width='{$state}' height='16'></td></tr></table>";
// calcul pourcentage avancement
$percent = floor($start / $count * 100);
// affichage du % d'avancement et de l'état
print "<div align='center'>{$percent}%</div>";
while ($row = pmb_mysql_fetch_row($query)) {
notice::majNotices_clean_tags($row[0]);
}
pmb_mysql_free_result($query);
$next = $start + $lot;
print "\n\t<form class='form-{$current_module}' name='current_state' action='./clean.php' method='post'>\n\t\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t\t<input type='hidden' name='start' value=\"{$next}\">\n\t\t<input type='hidden' name='count' value=\"{$count}\">\n\t</form>\n\t<script type=\"text/javascript\">\n\t<!--\n\t\tdocument.forms['current_state'].submit();\n\t-->\n\t</script>";
} else {
$spec = $spec - NETTOYAGE_CLEAN_TAGS;
$v_state .= "<br /><img src=../../images/d.gif hspace=3>" . htmlentities($msg["nettoyage_clean_tags_status"], ENT_QUOTES, $charset);
$v_state .= $count . " " . htmlentities($msg["nettoyage_clean_tags_status_end"], ENT_QUOTES, $charset);
$opt = pmb_mysql_query('OPTIMIZE TABLE notices');
// mise à jour de l'affichage de la jauge
print "\n\t<table border='0' align='center' width='{$table_size}' cellpadding='0'><tr><td class='jauge'>\n\t<img src='../../images/jauge.png' width='{$jauge_size}' height='16'></td></tr></table>\n\t<div align='center'>100%</div>";
print "\n\t<form class='form-{$current_module}' name='process_state' action='./clean.php' method='post'>\n\t\t<input type='hidden' name='v_state' value=\"" . urlencode($v_state) . "\">\n\t\t<input type='hidden' name='spec' value=\"{$spec}\">\n\t</form>\n\t<script type=\"text/javascript\">\n\t<!--\n\t\tdocument.forms['process_state'].submit();\n\t-->\n\t</script>";
}
示例2: nettoyageCleanTags
function nettoyageCleanTags()
{
global $msg, $dbh, $charset, $PMBusername;
if (SESSrights & ADMINISTRATION_AUTH) {
$result .= "<h3>" . htmlentities($msg["nettoyage_clean_tags"], ENT_QUOTES, $charset) . "</h3>";
$query = mysql_query("SELECT notice_id FROM notices");
if (mysql_num_rows($query)) {
while ($row = mysql_fetch_row($query)) {
notice::majNotices_clean_tags($row[0]);
}
mysql_free_result($query);
}
$notices = mysql_query("SELECT count(1) FROM notices", $dbh);
$count = mysql_result($notices, 0, 0);
$result .= $count . " " . htmlentities($msg["nettoyage_clean_tags_status_end"], ENT_QUOTES, $charset);
$opt = mysql_query('OPTIMIZE TABLE notices');
} else {
$result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
}
return $result;
}
示例3: majNotices
static function majNotices($notice)
{
global $pmb_keyword_sep;
if ($notice) {
$query = pmb_mysql_query("SELECT notice_id,tparent_id,tit1,tit2,tit3,tit4,index_l, n_gen, n_contenu, n_resume, tnvol, indexation_lang FROM notices WHERE notice_id='" . $notice . "'");
if (pmb_mysql_num_rows($query)) {
//Nettoyage des mots clès
notice::majNotices_clean_tags($notice, false);
$row = pmb_mysql_fetch_object($query);
// titre de série
if ($row->tparent_id) {
$tserie = new serie($row->tparent_id);
$ind_serie = ' ' . strip_empty_words($tserie->name) . ' ';
} else {
$ind_serie = '';
}
$ind_wew = $ind_serie . " " . $row->tnvol . " " . $row->tit1 . " " . $row->tit2 . " " . $row->tit3 . " " . $row->tit4;
$ind_sew = strip_empty_words($ind_wew);
$row->index_l ? $ind_matieres = ' ' . strip_empty_words(str_replace($pmb_keyword_sep, " ", $row->index_l)) . ' ' : ($ind_matieres = '');
$row->n_gen ? $ind_n_gen = ' ' . strip_empty_words($row->n_gen) . ' ' : ($ind_n_gen = '');
$row->n_contenu ? $ind_n_contenu = ' ' . strip_empty_words($row->n_contenu) . ' ' : ($ind_n_contenu = '');
$row->n_resume ? $ind_n_resume = ' ' . strip_empty_words($row->n_resume) . ' ' : ($ind_n_resume = '');
$req_update = "UPDATE notices";
$req_update .= " SET index_wew='" . addslashes($ind_wew) . "'";
$req_update .= ", index_sew=' " . addslashes($ind_sew) . " '";
$req_update .= ", index_serie='" . addslashes($ind_serie) . "'";
$req_update .= ", index_n_gen='" . addslashes($ind_n_gen) . "'";
$req_update .= ", index_n_contenu='" . addslashes($ind_n_contenu) . "'";
$req_update .= ", index_n_resume='" . addslashes($ind_n_resume) . "'";
$req_update .= ", index_matieres='" . addslashes($ind_matieres) . "'";
$req_update .= " WHERE notice_id={$row->notice_id} ";
$update = pmb_mysql_query($req_update);
pmb_mysql_free_result($query);
}
}
}