<head> <title><?php echo $l->m('title'); ?> </title> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $l->getCharset(); ?> "> <link rel="stylesheet" type="text/css" href="<?php echo $theme_path . 'css/'; ?> dialog.css"> <?php if (SPAW_Util::getBrowser() == 'Gecko') { ?> <script language="javascript" src="utils.gecko.js"></script> <?php } else { ?> <script language="javascript" src="utils.js"></script> <?php } ?> <script language="javascript"> <!-- function selectClick() { if (document.getElementById('lib').selectedIndex>=0 && document.getElementById('imglist').selectedIndex>=0)
function getHtml() { global $spaw_dir; global $spaw_wysiwyg_instCount; global $spaw_active_toolbar; $n = $this->control_name; $orn = $this->original_name; // todo: make more customizable $buf = ''; if (SPAW_Util::checkBrowser()) { if ($spaw_wysiwyg_instCount == 1) { $buf .= $this->getCssScript(); } // theme based css file and javascript $buf .= '<script language="JavaScript" src="' . $spaw_dir . 'lib/themes/' . $this->theme . '/js/toolbar.js.php"></script>'; $buf .= '<link rel="stylesheet" type="text/css" href="' . $spaw_dir . 'lib/themes/' . $this->theme . '/css/toolbar.css">'; $buf .= '<table border="0" cellspacing="0" cellpadding="0" width="' . $this->getWidth() . '" height="' . $this->getHeight() . '">'; $buf .= '<tr>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_top_design" class="SPAW_' . $this->theme . '_toolbar" colspan="3">'; $buf .= $this->toolbars->get('top'); $buf .= '</td>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_top_html" class="SPAW_' . $this->theme . '_toolbar" colspan="3" style="display : none;">'; $buf .= $this->toolbars->get('top', 'html'); $buf .= '</td>'; $buf .= '</tr>'; $buf .= '<tr>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_left_design" valign="top" class="SPAW_' . $this->theme . '_toolbar" >'; $buf .= $this->toolbars->get('left'); $buf .= '</td>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_left_html" valign="top" class="SPAW_' . $this->theme . '_toolbar" style="display : none;">'; $buf .= $this->toolbars->get('left', 'html'); $buf .= '</td>'; $buf .= '<td align="left" valign="top" width="100%" height="100%">'; //$buf.= '<input type="hidden" id="'.$n.'" name="'.$n.'">'; $buf .= '<textarea id="' . $n . '" name="' . $orn . '" style="width:' . $this->getWidth() . '; height:' . $this->getHeight() . '; display:none;" class="SPAW_' . $this->theme . '_editarea"></textarea>'; $buf .= '<input type="hidden" id="SPAW_' . $n . '_editor_mode" name="SPAW_' . $n . '_editor_mode" value="design">'; $buf .= '<input type="hidden" id="SPAW_' . $n . '_lang" value="' . $this->lang->lang . '">'; $buf .= '<input type="hidden" id="SPAW_' . $n . '_theme" value="' . $this->theme . '">'; $buf .= '<input type="hidden" id="SPAW_' . $n . '_borders" value="on">'; $buf .= '<iframe id="' . $n . '_rEdit" style="width:100%; height:' . $this->getHeight() . '; direction:' . $this->lang->getDir() . ';" class="SPAW_' . $this->theme . '_editarea" frameborder="no" src="' . $spaw_dir . 'empty.html"></iframe><br>'; $buf .= "\n<script language=\"javascript\">\n<!--\n"; $tmpstr = str_replace("\r\n", "\n", $this->getValue()); $tmpstr = str_replace("\r", "\n", $tmpstr); $content = explode("\n", $tmpstr); $plus = ""; foreach ($content as $line) { $buf .= "setTimeout('document.getElementById(\"" . $n . "\").value " . $plus . "=\"" . str_replace('-->', '@@END_COMMENT', str_replace('<!--', '@@START_COMMENT', str_replace('"', '"', str_replace("'", "\\'", str_replace("\\", "\\\\\\\\", $line))))) . "\\\\n\";',0);\n"; $plus = "+"; } $buf .= "setTimeout('document.getElementById(\"" . $n . "\").value = document.getElementById(\"" . $n . "\").value.replace(/"/g,\\'\"\\');',0);" . "\n"; $buf .= "setTimeout('document.getElementById(\"" . $n . "\").value = document.getElementById(\"" . $n . "\").value.replace(/@@START_COMMENT/g,\\'<!--\\');',0);" . "\n"; $buf .= "setTimeout('document.getElementById(\"" . $n . "\").value = document.getElementById(\"" . $n . "\").value.replace(/@@END_COMMENT/g,\\'-->\\');',0);" . "\n"; // $buf.='setTimeout("alert(document.all.'.$n.'.value);",0);'."\n"; // $buf.='setTimeout("'.$n.'_rEdit.document.body.innerHTML += document.all.'.$n.'.value;",0);'."\n"; // $buf.='setTimeout("SPAW_toggle_borders(\''.$n.'\',this[\''.$n.'_rEdit\'].document.body,null);",0);'."\n"; // editor init $buf .= 'setTimeout("SPAW_editorInit(\'' . $n . '\',\'' . htmlspecialchars($this->getCssStyleSheet()) . '\',\'' . $this->lang->getDir() . '\');",0);' . "\n"; $buf .= '//--></script>'; $buf .= '</td>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_right_design" valign="top" class="SPAW_' . $this->theme . '_toolbar">'; $buf .= $this->toolbars->get('right'); $buf .= '</td>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_right_html" valign="top" class="SPAW_' . $this->theme . '_toolbar" style="display : none;">'; $buf .= $this->toolbars->get('right', 'html'); $buf .= '</td>'; $buf .= '</tr>'; $buf .= '<tr><td class="SPAW_' . $this->theme . '_toolbar"></td>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_bottom_design" class="SPAW_' . $this->theme . '_toolbar" width="100%">'; $buf .= $this->toolbars->get('bottom'); $buf .= '</td>'; $buf .= '<td id="SPAW_' . $n . '_toolbar_bottom_html" class="SPAW_' . $this->theme . '_toolbar" width="100%" style="display : none;">'; $buf .= $this->toolbars->get('bottom', 'html'); $buf .= '</td>'; $buf .= '<td class="SPAW_' . $this->theme . '_toolbar"></td></tr>'; $buf .= '</table>'; } else { // show simple text area $buf = '<textarea cols="20" rows="5" name="' . $n . '" style="width:' . $this->getWidth() . '; height:' . $this->getHeight() . '">' . htmlspecialchars($this->getValue()) . '</textarea>'; } return $buf; }
// SPAW PHP WYSIWYG editor control // ================================================ // Image properties dialog // ================================================ // Developed: Alan Mendelevich, alan@solmetra.lt // Copyright: Solmetra (c)2003 All rights reserved. // ------------------------------------------------ // www.solmetra.com // ================================================ // v.1.0, 2003-04-01 // ================================================ // include wysiwyg config include '../config/spaw_control.config.php'; include $spaw_root . 'class/util.class.php'; include $spaw_root . 'class/lang.class.php'; $SPAW_Util = new SPAW_Util(); $theme = $SPAW_Util->getGETVar('theme', $spaw_default_theme); $theme_path = $spaw_dir . 'lib/themes/' . $theme . '/'; $l = new SPAW_Lang($SPAW_Util->getGETVar('lang')); $l->setBlock('image_prop'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title><?php echo $l->m('title'); ?> </title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $l->getCharset();
function setMode($value) { global $spaw_dir; global $spaw_root; global $spaw_default_toolbars; if ($value == '') { $this->mode = $spaw_default_toolbars; } else { $this->mode = $value; } // try loading specific tollbar for this mode and browser type if (!@(include $spaw_root . 'lib/toolbars/' . $this->mode . '/' . $this->mode . '_toolbar_data.' . strtolower(SPAW_Util::getBrowser()) . '.inc.php')) { if (!@(include $spaw_root . 'lib/toolbars/' . $this->mode . '/' . $this->mode . '_toolbar_data.inc.php')) { // load default toolbar data @(include $spaw_root . 'lib/toolbars/' . $spaw_default_toolbars . '/' . $spaw_default_toolbars . '_toolbar_data.inc.php'); } } $this->toolbars = $spaw_toolbar_data; }
// SPAW PHP WYSIWYG editor control // ================================================ // Table cell properties dialog // ================================================ // Developed: Alan Mendelevich, alan@solmetra.lt // Copyright: Solmetra (c)2003 All rights reserved. // ------------------------------------------------ // www.solmetra.com // ================================================ // v.1.0, 2003-04-01 // ================================================ // include wysiwyg config include '../config/spaw_control.config.php'; include $spaw_root . 'class/util.class.php'; include $spaw_root . 'class/lang.class.php'; $SPAW_Util = new SPAW_Util(); $theme = $SPAW_Util->getGETVar('theme', $spaw_default_theme); $theme_path = $spaw_dir . 'lib/themes/' . $theme . '/'; $l = new SPAW_Lang($SPAW_Util->getGETVar('lang')); $l->setBlock('table_cell_prop'); $request_uri = urldecode($SPAW_Util->getPOSTVar('request_uri', $SPAW_Util->getGETVar('request_uri'))); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Pragma" content="no-cache"> <title><?php echo $l->m('title'); ?> </title>
// SPAW PHP WYSIWYG editor control // ================================================ // Confirmation dialog // ================================================ // Developed: Alan Mendelevich, alan@solmetra.lt // Copyright: Solmetra (c)2003 All rights reserved. // ------------------------------------------------ // www.solmetra.com // ================================================ // $Revision: 1.2 $, $Date: 2006/04/12 14:07:05 $ // ================================================ // include wysiwyg config include '../config/spaw_control.config.php'; include $spaw_root . 'class/util.class.php'; include $spaw_root . 'class/lang.class.php'; $SPAW_Util = new SPAW_Util(); $theme = $SPAW_Util->getGETVar('theme', $spaw_default_theme); $theme_path = $spaw_dir . 'lib/themes/' . $theme . '/'; $block = $SPAW_Util->getGETVar('block'); $message = $SPAW_Util->getGETVar('message'); $l = new SPAW_Lang($SPAW_Util->getGETVar('lang')); $l->setBlock($block); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Pragma" content="no-cache"> <title><?php echo $l->m('title'); ?>
// Developed: Alan Mendelevich, alan@solmetra.lt // Copyright: Solmetra (c)2003 All rights reserved. // ------------------------------------------------ // www.solmetra.com // ================================================ // $Revision: 1.17 $, $Date: 2007/01/19 06:54:44 $ // ================================================ // if $spaw_imglib_include is set - die if (isset($spaw_imglib_include)) { die('set this in configuration'); } // include wysiwyg config include '../config/spaw_control.config.php'; include $spaw_root . 'class/util.class.php'; include $spaw_root . 'class/lang.class.php'; $SPAW_Util = new SPAW_Util(); $theme = $SPAW_Util->getPOSTVar('theme', $SPAW_Util->getGETVar('theme', $spaw_default_theme)); $theme_path = $spaw_dir . 'lib/themes/' . $theme . '/'; $l = new SPAW_Lang($SPAW_Util->getPOSTVar('lang', $SPAW_Util->getGETVar('lang'))); $l->setBlock('image_insert'); $request_uri = urldecode($SPAW_Util->getPOSTVar('request_uri', $SPAW_Util->getGETVar('request_uri'))); // if set include file specified in $spaw_imglib_include if (!empty($spaw_imglib_include)) { include $spaw_imglib_include; } ?> <?php $imglib = $SPAW_Util->getPOSTVar('lib'); if (empty($imglib) && $SPAW_Util->getGETVar('lib') != '') { $imglib = $SPAW_Util->getGETVar('lib');
function deleteImg($cur_imglib, $img) { global $spaw_img_delete_allowed; global $errors; global $l; if (!$cur_imglib['delete_allowed'] || $cur_imglib['type'] != 'Dir') { $errors[] = $l->m('error_cant_delete'); return false; } if (!SPAW_Util::checkReferer('dialogs/img_library.php')) { $errors[] = $l->m('error_cant_delete'); return false; } $thumnail_img_name = SPAW_IMG_ROOT . $cur_imglib['thumb_dir'] . $cur_imglib['thumb_prefix'] . $img; if (file_exists($thumnail_img_name)) { @unlink($thumnail_img_name); } $full_img_name = SPAW_IMG_ROOT . $cur_imglib['value'] . $img; if (@unlink($full_img_name)) { return true; } else { $errors[] = $l->m('error_cant_delete'); return false; } }