function render_editor()
 {
     include_once wysiwygPro_DIR . 'config.php';
     include_once wysiwygPro_DIR . 'editor_class.php';
     $editor = new wysiwygPro();
     $editor->set_name($this->_process_name_attribute($this->get_attribute('name')));
     $editor->set_code($this->get_value());
     if (!($width = $this->get_attribute('width'))) {
         $width = RICHEDIT_DEFAULT_WIDTH;
     }
     if (!($height = $this->get_attribute('height'))) {
         $height = RICHEDIT_DEFAULT_HEIGHT;
     }
     if ($editor->is_ie55 || $editor->is_ie50) {
         echo "<script type='text/javascript' src='" . WP_WEB_DIRECTORY . "/js/LimbScriptIE.js'></script>";
         $editor->addbutton('Insert Image from Repository', 'after:image', 'open_limb_image_window(##name##, this)', '##directory##/images/limb_image.gif', 22, 22, 'limb_image');
         $editor->addbutton('Insert File from Repository', 'after:link', 'open_limb_file_window(##name##, this)', '##directory##/images/limb_file.gif', 22, 22, 'limb_file');
     } elseif ($editor->is_gecko) {
         echo "<script type='text/javascript' src='" . WP_WEB_DIRECTORY . "/js/LimbScriptMozilla.js'></script>";
         $editor->addbutton('Insert Image from Repository', 'after:image', 'open_limb_image_window(##name##, this)', '##directory##/images/limb_image.gif', 22, 22, 'limb_image');
         $editor->addbutton('Insert File from Repository', 'after:link', 'open_limb_file_window(##name##, this)', '##directory##/images/limb_file.gif', 22, 22, 'limb_file');
     }
     $editor->set_stylesheet('/design/main/styles/main.css');
     $editor->usep(true);
     $editor->print_editor($width, $height);
 }
Esempio n. 2
0
function editorArea($name, $content, $hiddenField, $width, $height, $col, $row)
{
    global $mosConfig_absolute_path;
    $content = str_replace("&lt;", "<", $content);
    $content = str_replace("&gt;", ">", $content);
    $content = str_replace("&amp;", "&", $content);
    $content = str_replace("&nbsp;", " ", $content);
    $content = str_replace("&quot;", "\"", $content);
    // include the config file and editor class:
    include_once $mosConfig_absolute_path . '/editor/wysiwygpro/config.php';
    include_once $mosConfig_absolute_path . '/editor/wysiwygpro/editor_class.php';
    // create a new instance of the wysiwygPro class:
    $name = new wysiwygPro();
    $name->set_name($hiddenField);
    if ($hiddenField == 'fulltext') {
        $name->subsequent(true);
    }
    $name->usep(true);
    // insert some HTML
    $name->set_code($content);
    // print the editor to the browser:
    $name->print_editor('100%', intval($height));
}
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td></tr></tbody></table></td>
<td width="50%" height="267">&nbsp;</td></tr></tbody></table>
<map name="Map">
<area shape="rect" target="_top" alt="" coords="182,107,256,122" href="../website_new/New%20Folder/mission.html">
<area shape="rect" target="_self" alt="" coords="182,311,254,326" href="../website_new/New%20Folder/programs.html"></map>
<map name="Map2">
<area shape="rect" target="_self" alt="" coords="186,108,255,123" href="mission.html">
<area shape="rect" target="_self" alt="" coords="186,313,255,328" href="programs.html"></map>
<map name="Map3">
<area shape="rect" target="_self" alt="" coords="107,35,255,49" href="index.html">
<area shape="rect" target="_self" alt="" coords="150,150,254,166" href="fostering_tran.html">
<area shape="rect" alt="" coords="101,176,215,192" href="slideshow.html"></map>
<map name="Map4">
<area shape="rect" target="_blank" alt="" coords="485,4,586,22" href="referral_form.pdf"></map>
</body>
</html>';
$editor->set_code($body);
// add a spacer:
$editor->addspacer('', 'after:cancel');
// print the editor to the browser:
$editor->print_editor('100%', 450);
?>
</div>
</body>
</html>
<?php 
ob_end_flush();
Esempio n. 4
0
            } else {
                $errors[] = 'Username does not exist!';
            }
        }
    }
    if ($subject == '') {
        $errors[] = 'Subject field cannot be empty!';
    } elseif ($message == '') {
        $errors[] = 'Email message cannot be empty!';
    }
    if (!$errors) {
        $mail = new VMail();
        $mail->set();
        $mail->Subject = $subject;
        $mail->AltBody = $message;
        $mail->Body = nl2br($message);
        $mail->AddAddress($rs->fields['email']);
        if ($mail->Send()) {
            $messages[] = 'Email was successfuly sent to <b>' . $username . '</b>!';
        } else {
            $errors[] = 'Failed to send email! Please check your <a href="index.php?m=mail">Mail Settings</a> and make sure the provided email is valid!';
        }
    }
}
$htmlCode = isset($_POST['htmlCode']) ? trim($_POST['htmlCode']) : NULL;
$editor->set_code($htmlCode);
$smarty->assign('email', $email);
$smarty->assign('username', $username);
$smarty->assign('specific', $specific);
$smarty->assign('subject', $subject);
$smarty->assign('editor_wp', $editor->return_editor('100%', 350));
Esempio n. 5
0
    } elseif (strlen($title) > 299) {
        $errors[] = 'Notice title field cannot contain more then 299 characters!';
    } else {
        $notice['title'] = $title;
    }
    if ($category == '0' or $category == '') {
        $errors[] = 'Please select a notice category!';
    } else {
        $notice['category'] = $category;
    }
    if ($content == '') {
        $errors[] = 'Notice content cannot be blank!';
    } else {
        $notice['content'] = $content;
    }
    if (!$errors) {
        $sql = "SELECT UID FROM signup WHERE username = '******' LIMIT 1";
        $rs = $conn->execute($sql);
        $uid = $rs->fields['UID'];
        $sql = "INSERT INTO notice (UID, category, title, content, addtime, adddate)\n                   VALUES (" . intval($uid) . ", " . intval($category) . ", '" . mysql_real_escape_string($title) . "',\n                           '" . mysql_real_escape_string($content) . "', " . time() . ", '" . date('Y-m-d') . "')";
        $conn->execute($sql);
        $_SESSION['message'] = 'Notice was successfully added!';
        VRedirect::go($config['BASE_URL'] . '/siteadmin/notices.php?m=list');
    }
}
$sql = "SELECT category_id, name FROM notice_categories\n               WHERE status = '1' ORDER BY name DESC";
$rs = $conn->execute($sql);
$categories = $rs->getrows();
$editor->set_code($notice['content']);
$smarty->assign('editor_wysiswyg', $editor->return_editor('100%', 350));
$smarty->assign('categories', $categories);
Esempio n. 6
0
        $rs = $conn->execute($sql);
        if ($conn->Affected_Rows()) {
            while (!$rs->EOF) {
                $mail = new VMail();
                $mail->set();
                $mail->Subject = $subject;
                $mail->AltBody = $message;
                $mail->Body = nl2br($message);
                $mail->AddAddress($rs->fields['email']);
                if (!$mail->Send()) {
                    $email_errors[] = $rs->fields['email'];
                }
                $mail->ClearAddresses();
                $rs->movenext();
            }
        } else {
            $errors[] = 'No users! Is this your new site? :-)';
        }
        if (!$errors) {
            if ($email_errors) {
                $_SESSION['email_errors'] = 'Could not send email to the following addresses: ' . implode(', ', $email_errors) . '!';
            } else {
                $messages[] = 'Email was sent successfuly!';
            }
        }
    }
}
$editor->set_code($message);
$smarty->assign('subject', $subject);
$smarty->assign('message', $message);
$smarty->assign('editor_wp', $editor->return_editor('100%', 350));
    } elseif ($_POST['htmlCode'] == "") {
        $err = "Please provide Message Body";
    }
    if ($err != "") {
        echo "<script language='Javascript'>\n                        alert('{$err}');\n                        </script>";
    } else {
        $code = stripslashes($_POST['htmlCode']);
        $code = longwordbreak($code, 40, ' ');
        $code = remove_tags($code, array('object' => true, 'embed' => true, 'applet' => true, 'script' => true));
        $code = fixcharacters($code);
        $dt = Date("Y-m-d H:i:s");
        $send = explode("-", $sendto);
        while (list($k, $v) = each($send)) {
            $sql = "Insert into msgboard(msgfrom,msgto,msgcaption,msgbody,msgdatetime,msgisread)\n                                values({$USERID},{$v},'{$msgcaption}','{$code}','{$dt}','no')";
            $conn->Execute($sql);
        }
        echo "<script language='JavaScript'>\n                        parent.location.href='msgsuccess.php?sendto={$sendto}';\n                        </script>";
        exit;
    }
}
$editor->set_code($_POST['htmlCode']);
$txt = $editor->return_editor('100%', 300);
//DECLARE COMMON SMARTY VALUES
STemplate::assign('url', $config[baseurl]);
STemplate::assign('imgurl', $config[imgurl]);
STemplate::assign('site', $config[site_title]);
STemplate::assign('txt', $txt);
STemplate::assign('sendto', $sendto);
STemplate::assign('mtype', $mtype);
STemplate::display('siteadmin/test.tpl');
ob_end_flush();
Esempio n. 8
0
            $sel = "";
        }
        $user_ops .= "<option value='" . $rs->fields[UID] . "' {$sel}>" . $rs->fields['username'] . "</option>";
        $rs->movenext();
    }
    $user_ops .= "<option value='All'>(Send to All)</option>";
    STemplate::assign('user_ops', $user_ops);
} elseif ($_REQUEST['a'] == 'group') {
    $sql = "select GID, gname from group_own order by gname";
    $rs = $conn->execute($sql);
    $group_ops = "<option value='0'>-- Select a group --</option>";
    while (!$rs->EOF) {
        if ($_REQUEST['GID'] == $rs->fields['GID']) {
            $sel = "selected";
        } else {
            $sel = "";
        }
        $group_ops .= "<option value='" . $rs->fields[GID] . "' {$sel}>" . $rs->fields['gname'] . "</option>";
        $rs->movenext();
    }
    STemplate::assign('group_ops', $group_ops);
}
$editor->set_code($_REQUEST['htmlCode']);
$txt = $editor->return_editor('100%', 350);
STemplate::assign('txt', $txt);
if ($_REQUEST[msg] != "") {
    $msg = $_REQUEST[msg];
}
STemplate::assign('msg', $msg);
STemplate::assign('err', $err);
STemplate::display("siteadmin/muser.tpl");