本文整理汇总了PHP中Functions::textareabbcode方法的典型用法代码示例。如果您正苦于以下问题:PHP Functions::textareabbcode方法的具体用法?PHP Functions::textareabbcode怎么用?PHP Functions::textareabbcode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Functions
的用法示例。
在下文中一共展示了Functions::textareabbcode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
// Poichè i processi di prima finivano con un exit, se siamo qui è solo perchè siamo loggati
$codice = $_COOKIE[$func->cookie()];
// Mi connetto al database
$db->connettidb();
$text = '
<form method="post" action="">
Titolo:<br /><input name="titolo" type="text" size="30"><br />
Categoria:<br /><select name="categoria">';
// Creo una select con tutte le categorie
$result = $db->query("SHOW COLUMNS FROM news LIKE 'categoria'");
// Conto i risultati
$righe = $db->conta($result);
for ($i = 0; $i < $righe; $i++) {
$row = mysql_fetch_row($result);
$options = explode("','", preg_replace("/(enum|set)\\('(.+?)'\\)/", "\\2", $row[1]));
$num = count($options);
for ($g = 0; $g < $num; $g++) {
$text .= '<option value="' . $func->rescape($options[$g]) . '">' . $func->rescape($options[$g]) . '</option>';
}
}
// Mi disconnetto dal database
$db->disconnettidb();
$text .= '</select><br />News<br />' . $func->textareabbcode('news', '') . '<br /><input name="creanews" type="submit" value="Invia"></form>';
$smarty->assign("titolo", "Crea news");
$smarty->assign("cookie", $db->auth($_COOKIE[$func->cookie()]));
$smarty->assign("grado", $db->grado($_COOKIE[$func->cookie()]));
$smarty->assign("contents", $text);
$smarty->assign("url_cms", $cms->url_cms());
$smarty->assign("url_smartytpl", $cms->url_smartytpl());
$smarty->assign("cmsversion", $cms->cmsversion());
$smarty->display("admin/index/index.tpl");
示例2: explode
}
$text = '
<form method="post" action="">
Titolo:<br /><input name="newtitolo" type="text" size="30" value="' . $titolo . '"><br />
Categoria:<br /><select name="newcategoria">';
// Creo una select con tutte le categorie
$result = $db->query("SHOW COLUMNS FROM news LIKE 'categoria'");
// Conto i risultati
$righe = $db->conta($result);
for ($i = 0; $i < $righe; $i++) {
$row = mysql_fetch_row($result);
$options = explode("','", preg_replace("/(enum|set)\\('(.+?)'\\)/", "\\2", $row[1]));
$num = count($options);
for ($g = 0; $g < $num; $g++) {
if ($categoria == $options[$g]) {
$text .= '<option value="' . $func->rescape($options[$g]) . '" SELECTED>' . $func->rescape($options[$g]) . '</option>';
}
$text .= '<option value="' . $func->rescape($options[$g]) . '" ' . $selected . '>' . $func->rescape($options[$g]) . '</option>';
}
}
// Mi disconnetto dal database
$db->disconnettidb();
$text .= '</select><br />News<br />' . $func->textareabbcode('newnews', $news) . '<br /><input type="hidden" name="minititolo" value="' . $func->escape($_POST['minititolo']) . '"><input name="modificanews" type="submit" value="Modifica"></form>';
$smarty->assign("titolo", "Modifica news");
$smarty->assign("cookie", $db->auth($_COOKIE[$func->cookie()]));
$smarty->assign("grado", $db->grado($_COOKIE[$func->cookie()]));
$smarty->assign("contents", $text);
$smarty->assign("url_cms", $cms->url_cms());
$smarty->assign("url_smartytpl", $cms->url_smartytpl());
$smarty->assign("cmsversion", $cms->cmsversion());
$smarty->display("admin/index/index.tpl");
示例3: annunci
$smarty->display("admin/index/index.tpl");
exit;
}
// Altrimenti invio la news al database
$query2 = $db->query("INSERT INTO annunci (autore, titolo, annuncio, data, ora) VALUES ('{$autore}', '{$titolo}', '{$annuncio}', '{$data}', '{$ora}')");
// Mi disconnessione dal database
$db->disconnettidb();
// Mando l' avviso
$text = 'L\' annuncio è stato creato.';
$smarty->assign("titolo", "Crea annuncio");
$smarty->assign("cookie", $db->auth($_COOKIE[$func->cookie()]));
$smarty->assign("grado", $db->grado($_COOKIE[$func->cookie()]));
$smarty->assign("contents", $text);
$smarty->assign("url_cms", $cms->url_cms());
$smarty->assign("url_smartytpl", $cms->url_smartytpl());
$smarty->assign("cmsversion", $cms->cmsversion());
$smarty->display("admin/index/index.tpl");
}
// Poichè i processi di prima finivano con un exit, se siamo qui è solo perchè siamo loggati
$text = 'Creando un annuncio potrai pubblicarlo nell\'area dedicata di Ocarina così che sia alla vista di tutti coloro che hanno il permesso di accederci.<br /><br />
<form method="post" action="">
Titolo:<br /><input name="titolo" type="text" size="30"><br />
Annuncio:<br />' . $func->textareabbcode('annuncio', '') . '<br /><input name="creaannuncio" type="submit" value="Invia"></form>';
$smarty->assign("titolo", "Crea annuncio");
$smarty->assign("cookie", $db->auth($_COOKIE[$func->cookie()]));
$smarty->assign("grado", $db->grado($_COOKIE[$func->cookie()]));
$smarty->assign("contents", $text);
$smarty->assign("url_cms", $cms->url_cms());
$smarty->assign("url_smartytpl", $cms->url_smartytpl());
$smarty->assign("cmsversion", $cms->cmsversion());
$smarty->display("admin/index/index.tpl");
示例4: explode
$text = '
<form method="post" action="">
Titolo:<br /><input name="newtitolo" type="text" size="30" value="' . $titolo . '"><br />
Minititolo:<br /><input name="newminititolo" type="text" size="30" value="' . $minititolo . '"><br />
Categoria:<br /><select name="newcategoria">';
// Creo una select con tutte le categorie
$result = $db->query("SHOW COLUMNS FROM pagine LIKE 'categoria'");
// Conto i risultati
$righe = $db->conta($result);
for ($i = 0; $i < $righe; $i++) {
$row = mysql_fetch_row($result);
$options = explode("','", preg_replace("/(enum|set)\\('(.+?)'\\)/", "\\2", $row[1]));
$num = count($options);
for ($g = 0; $g < $num; $g++) {
if ($categoria == $options[$g]) {
$text .= '<option value="' . $func->rescape($options[$g]) . '" SELECTED>' . $func->rescape($options[$g]) . '</option>';
}
$text .= '<option value="' . $func->rescape($options[$g]) . '" ' . $selected . '>' . $func->rescape($options[$g]) . '</option>';
}
}
// Mi disconnetto dal database
$db->disconnettidb();
$text .= '</select><br />Sezione<br />' . $func->textareabbcode('newcontenuto', $contenuto) . '<br /><input type="hidden" name="minititolo" value="' . $minititolo . '"><input name="modificasezione" type="submit" value="Modifica"></form>';
$smarty->assign("titolo", "Modifica sezione");
$smarty->assign("cookie", $db->auth($_COOKIE[$func->cookie()]));
$smarty->assign("grado", $db->grado($_COOKIE[$func->cookie()]));
$smarty->assign("contents", $text);
$smarty->assign("url_cms", $cms->url_cms());
$smarty->assign("url_smartytpl", $cms->url_smartytpl());
$smarty->assign("cmsversion", $cms->cmsversion());
$smarty->display("admin/index/index.tpl");
示例5:
$query3 = $db->query("SELECT * FROM commenti WHERE titolo='{$minititolo}'");
// Creo una tabella con i commenti e gli id
$text = '<div align="center"><table border="1">
<tr>
<td><b>Id</b></td>
<td><b>Autore</b></td>
<td><b>Commento</b></td>';
while (($riga = $db->estrai($query)) && ($riga2 = $db->estrai($query2)) && ($riga3 = $db->estrai($query3))) {
$text .= '<tr>';
$text .= '<td>' . $func->rescape($riga->id) . '</td>';
$text .= '<td>' . $func->rescape($riga2->autore) . '</td>';
$text .= '<td>' . $func->rescape($riga2->testo) . '</td>';
$text .= '</tr>';
}
$text .= '</table></div><br /><br />';
// Mi disconnetto dal database
$db->disconnettidb();
// Creo il form dove cancellare il commento dando l' id
$text .= '<form method="post" action="">
Scrivi l\'id relativo alla news che vuoi modificare<br /><input name="id" type="text"><br />
Nuovo commento<br /> ' . $func->textareabbcode('newcommento', '') . '<br />
<input name="modificaid" type="submit" value="Modifica">
</form>';
$smarty->assign("titolo", "Modifica commento");
$smarty->assign("cookie", $db->auth($_COOKIE[$func->cookie()]));
$smarty->assign("grado", $db->grado($_COOKIE[$func->cookie()]));
$smarty->assign("contents", $text);
$smarty->assign("url_cms", $cms->url_cms());
$smarty->assign("url_smartytpl", $cms->url_smartytpl());
$smarty->assign("cmsversion", $cms->cmsversion());
$smarty->display("admin/index/index.tpl");
示例6: explode
$codice = $_COOKIE[$func->cookie()];
// Mi connetto al database
$db->connettidb();
$text = '
<form method="post" action="">
Titolo:<br /><input name="titolo" type="text" size="30"><br />
Minititolo:<br /><input name="minititolo" type="text" size="30"><br />
Categoria:<br /><select name="categoria">';
// Creo una select con tutte le categorie
$result = $db->query("SHOW COLUMNS FROM pagine LIKE 'categoria'");
// Conto i risultati
$righe = $db->conta($result);
for ($i = 0; $i < $righe; $i++) {
$row = mysql_fetch_row($result);
$options = explode("','", preg_replace("/(enum|set)\\('(.+?)'\\)/", "\\2", $row[1]));
$num = count($options);
for ($g = 0; $g < $num; $g++) {
$text .= '<option value="' . $func->rescape($options[$g]) . '">' . $func->rescape($options[$g]) . '</option>';
}
}
// Mi disconnetto dal database
$db->disconnettidb();
$text .= '</select><br />Sezione<br />' . $func->textareabbcode('contenuto', '') . '<br /><input name="creasezione" type="submit" value="Invia"></form>';
$smarty->assign("titolo", "Crea sezione");
$smarty->assign("cookie", $db->auth($_COOKIE[$func->cookie()]));
$smarty->assign("grado", $db->grado($_COOKIE[$func->cookie()]));
$smarty->assign("contents", $text);
$smarty->assign("url_cms", $cms->url_cms());
$smarty->assign("url_smartytpl", $cms->url_smartytpl());
$smarty->assign("cmsversion", $cms->cmsversion());
$smarty->display("admin/index/index.tpl");