<span style="float: left">This newsletter will be sent to <b>' . $group_name . '</b></span> <span style="float: right"><b>' . $num_users . '</b> ' . _NUSERWILLRECEIVE . '</span><br /> <hr /> <span class="gen">' . $content . '</span> <hr /> </td> </tr>'; $submit = ' <input type="submit" name="send" value="' . _SEND . ' ' . _NEWSLETTER . '" class="mainoption"' . $status . ' /> <input type="submit" name="discard" value="' . _DISCARD . '" class="liteoption" /> <input type="hidden" name="n_group" value="' . $group . '" />'; } // Load the required wysiwyg class require CORE_PATH . 'wysiwyg/wysiwyg.inc'; // Create as many wysiwyg instances as you need $wysiwyg = new Wysiwyg('newsletter', 'content', '90%', '300px', $content); // Set all the required wysiwyg headers $wysiwyg->setHeader(); require 'header.php'; GraphicAdmin('_AMENU5'); OpenTable(); echo '<form name="newsletter" action="' . URL::admin() . '" method="post" enctype="multipart/form-data" accept-charset="utf-8"> ' . $wysiwyg->getSelect() . ' <table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline" style="margin:auto;"> <tr> <td align="center" class="catleft" colspan="2"><b><span class="gen">' . $title . '</span></b></td> </tr>' . $preview . '<tr> <td class="row1"><span class="gen">' . _SUBJECT . '</span></td> <td class="row2"><input type="text" name="subject" size="50" maxlength="255" value="' . htmlprepare($subject) . '" /></td> </tr><tr> <td class="row1"><span class="gen">' . _CONTENT . '</span></td>
<title> PHP Core tests </title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"/> <style type="text/css"> .panel, .alert{ max-width: 80%; } code { white-space: pre-wrap; } </style> </head> <body> <div class='page-header'><h1>PHP Core tests</h1></div> <?php require_once "../core.php"; echo "All is well in load-land.<br/>"; ?> <p>Beginning tests</p> <?php # Markdown echo "<section class='panel panel-primary center-block'><div class='panel-heading'>Markdown Tests</div>"; echo "Raw input:<br/><br/>"; $text = "Here is some **Markdown** text that I *really* want to parse. What about [b]Classic options[/b]? How about greek? [grk]npLl[/grk]"; echo "<code class='center-block text-center'>{$text}</code><br/>"; $html = Wysiwyg::toHtml($text); echo "<div class='alert alert-success center-block'>{$html}<br/><code>" . displayDebug($html, false) . "</code></div>"; echo "<br/>This de-parses as: <div class='alert alert-success center-block'><code>" . Wysiwyg::fromHtml($html) . "</code></div>"; echo "Full detail: <code>" . displayDebug(Wysiwyg::toHtml($text, true), false) . displayDebug(Wysiwyg::fromHtml($html, true), false) . "</code>"; echo "</section>"; ?> </body> </html>
$row['parent_id'] = 0; $row['title'] = ''; $row['comment'] = ''; $row['content'] = '<b>nothing</b> yet'; if (isset($_POST['wysiwyg']) || isset($_POST['preview'])) { $row['id'] = $_POST['page_id']; $row['parent_id'] = $_POST['parent_id']; $row['title'] = $_POST['title']; $row['comment'] = $_POST['comment']; if (isset($_POST['content'])) { $row['content'] = $_POST['content']; } } elseif (isset($_GET['id'])) { $page = $db->sql_ufetchrow("SELECT * FROM " . $module_prefix . "_pages WHERE id=" . intval($_GET['id']), SQL_ASSOC); if (!empty($page['id'])) { $row = $page; $row['content'] = $page['body']; unset($row['body']); } unset($page); } $wysiwyg = new Wysiwyg('wiki_content', 'content', '100%', '400px', $row['content']); $wysiwyg->setHeader(); require_once 'header.php'; if (isset($_POST['preview'])) { $cpgtpl->assign_block_vars('preview', array('S_TITLE' => $row['title'], 'S_COMMENT' => $row['comment'], 'S_BODY' => $row['content'])); } $cpgtpl->assign_vars(array('G_STARTFORM' => open_form(URL::index('&file=manage'), 'wiki_content', "Manage {$module_name} Content") . '<input type="hidden" name="page_id" value="' . $row['id'] . '" />', 'G_ENDFORM' => close_form(), 'S_WYSSEL' => $wysiwyg->getSelect(), 'S_TITLE' => 'Title: <input type="text" name="title" value="' . htmlspecialchars($row['title']) . '" style="width: 50%" />', 'S_COMMENT' => 'Comment: <input type="text" name="comment" value="' . htmlspecialchars($row['comment']) . '" style="width: 50%" />', 'S_PARENT' => 'Parent page: ' . wiki_create_select($row['parent_id']), 'S_WYSIWYG' => $wysiwyg->getHTML(), 'S_PREVIEW' => '<input type="submit" name="preview" value="Preview" />', 'S_SUBMIT' => isset($_POST['preview']) ? '<input type="submit" name="add_wiki" value="Submit" />' : '')); $cpgtpl->set_filenames(array('body' => 'wiki/manage.html')); $cpgtpl->display('body'); }
} } $CPG_SESS['submit_story'] = false; unset($CPG_SESS['submit_story']); list($waiting) = $db->sql_ufetchrow("SELECT COUNT(*) FROM {$prefix}_queue", SQL_NUM); cpg_error(_SUBTEXT . '<br />' . _WEHAVESUB . ' <strong>' . $waiting . '</strong> ' . _WAITING, _Submit_NewsLANG, URL::index('&file=submit')); } else { $CPG_SESS['submit_story'] = true; $story = isset($_POST['story']) ? $_POST['story'] : false; $storyext = isset($_POST['storyext']) ? $_POST['storyext'] : false; $subject = isset($_POST['subject']) ? htmlprepare($_POST['subject']) : false; $topic = isset($_POST['topic']) ? intval($_POST['topic']) : 0; $alanguage = isset($_POST['alanguage']) ? $_POST['alanguage'] : ''; require_once BASEDIR . 'includes/wysiwyg/wysiwyg.inc'; $story_editor = new Wysiwyg('submitnews', 'story', '100%', '200px', $story); $storyext_editor = new Wysiwyg('submitnews', 'storyext', '100%', '300px', $storyext); $story_editor->setHeader(); require_once 'header.php'; OpenTable(); if ($story) { $f_story = decode_bb_all(encode_bbcode($story), 1, true); $f_storyext = decode_bb_all(encode_bbcode($storyext), 1, true); if ($topic < 1) { $topicimage = 'AllTopics.gif'; $warning = '<div style="text-align:center;" class="option">' . _SELECTTOPIC . '</div>'; } else { $warning = ''; $result = $db->sql_query('SELECT topicimage, topictext FROM ' . $prefix . "_topics WHERE topicid='{$topic}'"); list($topicimage, $topictext) = $db->sql_fetchrow($result); } echo '<div style="text-align:center;" class="gen"><b>' . _NEWSUBPREVIEW . '</b></div><br />