コード例 #1
0
</select>&nbsp;<input type="submit" name="action" value="Select" class="btn btn-info" /></p>

<p>Subject:<br />
<input type="text" name="subject" value="<?php 
    echo $subject;
    ?>
" size="40"></p>

<p>Message:<br />
<script language="JavaScript" type="text/javascript">
//build new richTextEditor
var message = new richTextEditor('message');
<?php 
    //format content for preloading
    if (!empty($message)) {
        $message = rteSafe($message);
    }
    ?>
message.html = '<?php 
    echo $message;
    ?>
';
//rte1.toggleSrc = false;
message.build();
</script>
</p>

<p><input name="action" type="submit" value="Send Message" class="btn btn-info" /></p>
</form>
<?php 
}
コード例 #2
0
ファイル: rte.php プロジェクト: ubuntuguru/simplecm
	return true;
}

//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML)
initRTE("../cbrte/images/", "../cbrte/", "", true);
//-->
</script>
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>

<script language="JavaScript" type="text/javascript">
<!--
//build new richTextEditor
var rte1 = new richTextEditor('rte1');
<?php 
//format content for preloading
$content = rteSafe($data);
?>
rte1.html = '<?php 
echo $content;
?>
';
//rte1.toggleSrc = false;
rte1.build();
//-->
</script>
<p><input type="submit" name="submit" value="Submit" /></p>
</form>
<?php 
function rteSafe($strText)
{
    //returns safe code for preloading in the RTE
コード例 #3
0
ファイル: demo.php プロジェクト: ubuntuguru/simplecm
//-->
</script>
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>

<script language="JavaScript" type="text/javascript">
<!--
//build new richTextEditor
var rte1 = new richTextEditor('rte1');
<?php 
//format content for preloading
if (!isset($_POST["rte1"])) {
    $content = "here's the " . chr(13) . "\"preloaded <b>content</b>\"";
    $content = rteSafe($content);
} else {
    //retrieve posted value
    $content = rteSafe($_POST["rte1"]);
}
?>
rte1.html = '<?php 
echo $content;
?>
';
//rte1.toggleSrc = false;
rte1.build();
//-->
</script>
<p><input type="submit" name="submit" value="Submit" /></p>
</form>
<?php 
function rteSafe($strText)
{
コード例 #4
0
ファイル: prueba.php プロジェクト: seppo0010/i-prode
    //returns safe code for preloading in the RTE
    $tmpString = $strText;
    //convert all types of single quotes
    $tmpString = str_replace(chr(145), chr(39), $tmpString);
    $tmpString = str_replace(chr(146), chr(39), $tmpString);
    $tmpString = str_replace("'", "&#39;", $tmpString);
    //convert all types of double quotes
    $tmpString = str_replace(chr(147), chr(34), $tmpString);
    $tmpString = str_replace(chr(148), chr(34), $tmpString);
    //	$tmpString = str_replace("\"", "\"", $tmpString);
    //replace carriage returns & line feeds
    $tmpString = str_replace(chr(10), " ", $tmpString);
    $tmpString = str_replace(chr(13), " ", $tmpString);
    return $tmpString;
}
$_POST['rte1'] = stripslashes(rteSafe($_POST['rte1']));
include "../inc/conexion.php";
if ($_POST['fecha'] > 0 and $_POST['fecha'] <= 19) {
} else {
    $_POST['fecha'] = 1;
}
$posiciones = "<table cellspacing=\"2\" cellpadding=\"2\" bgcolor=\"#92c1d0\" border=\"1\" color:\"#ffffff\"><tbody>" . chr(13);
$posiciones .= "<tr><td valign=\"middle\" width=\"20\">Nº</td><td valign=\"middle\" width=\"80\">Usuario</td><td valign=\"middle\" width=\"20\">Pts</td><td valign=\"middle\" width=\"25\">Promedio</td></tr>" . chr(13);
$q_posicion = mysql_query("SELECT id_usuario, u.usuario, COUNT(pro.id_pronostico) AS puntos, ROUND(100 * COUNT(pro.id_pronostico) / COUNT(pr.id_pronostico),2) AS promedio FROM prode2_pronostico pr LEFT JOIN prode_partido pa ON pr.partido = pa.id_partido LEFT JOIN prode2_pronostico pro ON pr.id_pronostico = pro.id_pronostico AND pr.resultado = pa.resultado LEFT JOIN prode_usuario u ON pr.usuario = u.id_usuario WHERE pa.resultado IS NOT NULL AND pa.resultado != '' AND pr.resultado IS NOT NULL AND pr.resultado != '' GROUP BY usuario, id_usuario ORDER BY puntos DESC LIMIT 0, 10");
//$q_posicion = mysql_query("SELECT id_usuario, u.usuario, COUNT(pro.id_pronostico) AS puntos, ROUND(100 * COUNT(pro.id_pronostico) / COUNT(pr.id_pronostico),2) AS promedio FROM prode2_pronostico pr LEFT JOIN prode_partido pa ON pr.partido = pa.id_partido LEFT JOIN prode2_pronostico pro ON pr.id_pronostico = pro.id_pronostico AND pr.resultado = pa.resultado LEFT JOIN prode_usuario u ON pr.usuario = u.id_usuario WHERE pa.resultado IS NOT NULL AND pa.resultado != '' AND pr.resultado IS NOT NULL GROUP BY usuario, id_usuario ORDER BY puntos DESC LIMIT 0, 10");
for ($a = 1; $a <= mysql_num_rows($q_posicion); $a++) {
    $posicion = mysql_fetch_assoc($q_posicion);
    $posiciones .= "<tr>\r\n\t<td valign=\"middle\" align=\"center\">" . $a . "</td>" . "<td align=\"left\"><font onmouseover=\"this.style.color = \\'blue\\'; this.style.textDecorationUnderline = true;\" onmouseout=\"this.style.color = \\'\\'; this.style.textDecorationUnderline = false;\">" . $posicion['usuario'] . "</font></td>" . "<td valign=\"middle\" align=\"center\">" . $posicion['puntos'] . "</td>" . "<td valign=\"middle\" align=\"center\">" . $posicion['promedio'] . "%</td>" . "</tr>" . chr(13);
}
$posiciones .= "</tbody></table>";
ob_start();
コード例 #5
0
ファイル: rich-text-rte.php プロジェクト: bcneb/WebYep
    //replace carriage returns & line feeds
    $tmpString = str_replace(chr(10), " ", $tmpString);
    $tmpString = str_replace(chr(13), " ", $tmpString);
    return $tmpString;
}
$bOK = false;
$sResponse = WYTS("RichTextSaved");
$sHelpFile = "richtext-rte-element.php";
$oEditor = new WYEditor();
$oElement = new WYRichTextElement($oEditor->sFieldName, $oEditor->bGlobal, "", false);
if ($oEditor->bSave) {
    $oElement->setText($goApp->sFormFieldValue('RTE_FORM_ELEMENT'));
    $oElement->save();
    $bOK = true;
} else {
    $sContent = rteSafe($oElement->sText());
    $sCSSURL = $goApp->sFormFieldValue(WY_QK_RICH_TEXT_CSS);
}
$goApp->outputWarningPanels();
// give App a chance to say something
if (file_exists("../opt/rte/cbrte")) {
    $sRTEIncludePath = "../opt/rte/cbrte";
} else {
    $sRTEIncludePath = "../opt/rte";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

<title>
<?php 
コード例 #6
0
ファイル: critique_editor.php プロジェクト: homberghp/peerweb
$page->addHeadText("<script type='text/javascript'>\n" . "/*\n" . " * refresh parent page on close\n" . " */\n" . "function bye(){ \n" . "   opener.focus();\n" . "   opener.location.reload();\n" . "   self.close();\n" . "}\n" . "/*\n" . " * refresh parent page on close\n" . " */\n" . "function edit_submit(){ \n" . "   opener.location.reload();\n" . "  return true;\n" . "}\n" . "</script>");
// $page->addHeadText("<script language='JavaScript' type='text/javascript' src='js/html2xhtml.js'>".
// 		   "</script>");
// $page->addHeadText("<script language='JavaScript' type='text/javascript' ".
// 		   "src='js/richtext.js'>"."</script>");
$page->addHeadText('<script language="javascript" type="text/javascript" src="' . SITEROOT . '/js/tiny_mce/tiny_mce.js"></script>
 <script language="javascript" type="text/javascript">
   tinyMCE.init({
        theme: "advanced",
        theme_advanced_toolbar_location : "top",
	mode : "textareas"
    });
 </script>
');
$page->addHeadText("<style type='text/css'>\n" . " p {text-align: justify;}\n" . " p:first-letter {font-size:180%; font-family: script;font-weight:bold; color:#800;}\n" . " </style>");
$form1 = new HtmlContainer("<div id='main'>");
//$dbConn->log($sql);
$critique_text = stripslashes($critique_text);
$editor_result = $critique_text;
$critique_text_rte = rteSafe($critique_text);
$critique_id_text = $critique_id > 0 ? $critique_id : '\'<i>new</i>\'';
$templatefile = 'templates/critique_editor_form.html';
$template_text = file_get_contents($templatefile, true);
if ($template_text === false) {
    $form1->addText("<strong>cannot read template file {$templatefile}</strong>");
} else {
    eval("\$text = \"{$template_text}\";");
    $form1->addText($text);
}
$page->addBodyComponent($form1);
$page->show();
コード例 #7
0
<?php

// rte.php
// RTE
// Snippet to create a Rich Text Editor
// Use: Place a snippet call where the textarea should be in the form
//      [!RTE?rte=<field_name>&value=<data>!]
//      Usage requires inclusion of the onsubmit form attribute as noted below
// <form name="RTEDemo" action="" method="post" onsubmit="return submitForm();">
$rte = "ta";
$path = "./media/rte/";
//format content for preloading
$content['content'] = rteSafe($content['content']);
$script = <<<END
<script type="text/javascript" src="{$path}html2xhtml.js"></script>
<script type="text/javascript" src="{$path}richtext_compressed.js"></script>
<script type="text/javascript">
<!--
function submitForm() {
  //make sure hidden and iframe values are in sync for all rtes before submitting form
  updateRTEs();
  document.mutate.{$rte}.value = document.mutate.{$rte}.value.replace(/%5B%7E/g,'[~'); //FireFox encodes characters in URLs. Let's convert [~] back
  document.mutate.{$rte}.value = document.mutate.{$rte}.value.replace(/%7E%5D/g,'~]');
  document.mutate.{$rte}.value = document.mutate.{$rte}.value.replace(/<a href="[^"]+\\[~/gi, "<a href=\\"[~" ); //IE 6 tries to convert relative URLs to absolute but often fails. Let's make at least [~id~] relative again.
  return true;
}

//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML)
initRTE("{$path}images/", "{$path}", "", true);
//-->
</script>