-<?php
-/*
- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2009 The Nucleus Group
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * (see nucleus/documentation/index.html#license for more info)
- */
-/**
- * @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2009 The Nucleus Group
- * @version $Id$
- * $NucleusJP: PAGEFACTORY.php,v 1.8.2.2 2007/10/30 16:12:27 shizuki Exp $
- */
-
-/**
- * The formfactory class can be used to insert add/edit item forms into
- * admin area, bookmarklet, skins or any other places where such a form
- * might be needed
- */
+<?php\r
+/*\r
+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
+ * Copyright (C) 2002-2009 The Nucleus Group\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ * (see nucleus/documentation/index.html#license for more info)\r
+ */\r
+/**\r
+ * @license http://nucleuscms.org/license.txt GNU General Public License\r
+ * @copyright Copyright (C) 2002-2009 The Nucleus Group\r
+ * @version $Id$\r
+ * $NucleusJP: PAGEFACTORY.php,v 1.8.2.2 2007/10/30 16:12:27 shizuki Exp $\r
+ */\r
+\r
+/**\r
+ * The formfactory class can be used to insert add/edit item forms into\r
+ * admin area, bookmarklet, skins or any other places where such a form\r
+ * might be needed\r
+ */\r
class PAGEFACTORY extends BaseActions {\r
\r
// ref to the blog object for which an add:edit form is created\r
\r
function parse_checkedonval($value, $name) {\r
if ($this->variables[$name] == $value)\r
- echo "checked='checked'";\r
+ echo 'checked="checked"';\r
}\r
\r
// extra javascript for input and textarea fields\r
function parse_jsinput($which) {\r
global $CONF;\r
- ?>\r
- name="<?php echo $which?>"\r
- id="input<?php echo $which?>"\r
- <?php\r
+ $out = 'name="' . $which . '" id="input' . $which . '"';\r
if ($CONF['DisableJsTools'] != 1) {\r
- ?>\r
- onkeyup="storeCaret(this); updPreview('<?php echo $which?>'); doMonitor();"\r
- onclick="storeCaret(this);"\r
- onselect="storeCaret(this);"\r
-\r
- <?php\r
- }\r
- else if ($CONF['DisableJsTools'] == 0) {\r
- ?>\r
- onkeyup="doMonitor();"\r
- onkeypress="shortCuts();"\r
- <?php\r
- }\r
- else {\r
- ?>\r
- onkeyup="doMonitor();"\r
- <?php\r
+ $out .= 'onkeyup="storeCaret(this); updPreview(' . $which . '); doMonitor();"'\r
+ . 'onclick="storeCaret(this);"'\r
+ . 'onselect="storeCaret(this);"';\r
+ } elseif ($CONF['DisableJsTools'] == 0) {\r
+ $out .= ' onkeyup="doMonitor();" onkeypress="shortCuts();"';\r
+ } else {\r
+ $out .= ' onkeyup="doMonitor();"';\r
}\r
+ echo $out;\r
}\r
\r
// shows the javascript button bar\r
* convenience method\r
*/\r
function _jsbutton($type, $code ,$tooltip) {\r
- ?>\r
- <span class="jsbutton"\r
- onmouseover="BtnHighlight(this);"\r
- onmouseout="BtnNormal(this);"\r
- onclick="<?php echo $code?>" >\r
- <img src="images/button-<?php echo $type?>.gif" alt="<?php echo $tooltip?>" width="16" height="16"/>\r
+ echo <<<__JSBUTTON__\r
+ <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="{$code}">\r
+ <img src="images/button-{$type}.gif" alt="{$tooltip}" width="16" height="16" />\r
</span>\r
- <?php }\r
+\r
+__JSBUTTON__;\r
+ }\r
\r
function _jsbuttonspacer() {\r
- echo '<span class="jsbuttonspacer"></span>';\r
+ echo '<span class="jsbuttonspacer"> </span>';\r
}\r
\r
}\r
\r
- ?>
\ No newline at end of file
+?>
\ No newline at end of file