public function edit($name, $id, $value) { $value = htmlentities($value); $strReturn = "<!-- TINYMCE -->"; $strReturn .= "<textarea name=\"{$name}\" id=\"{$id}\" rows=\"30\" cols=\"80\" style=\"width: 100%\">{$value}</textarea>"; $strReturn .= "<script type=\"text/javascript\">\n\t\t\t\ttinyMCE.init({\n\t\t\t\t\t// General options\n\t\t\t\t\tmode : \"exact\",\n\t\t\t\t\ttheme : \"advanced\",\n\t\t\t\t\telements : \"{$id}\",\n\t\t\t\t\tplugins : \"safari,pagebreak,style,layer,table,save,advhr,advimage,imgmap,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount\",\n\t\t\t\t\trelative_urls : false,\n\t\t\t\t\t\n\t\t\t\t\t// Theme options\n\t\t\t\t\ttheme_advanced_buttons1 : \"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect\",\n\t\t\t\t\ttheme_advanced_buttons2 : \"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,imgmap,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor\",\n\t\t\t\t\ttheme_advanced_buttons3 : \"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen\",\n\t\t\t\t\ttheme_advanced_buttons4 : \"insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak\",\n\t\t\t\t\ttheme_advanced_toolbar_location : \"top\",\n\t\t\t\t\ttheme_advanced_toolbar_align : \"left\",\n\t\t\t\t\ttheme_advanced_statusbar_location : \"bottom\",\n\t\t\t\t\ttheme_advanced_resizing : true,\n\t\t\t\t\t\n\t\t\t\t\t// Content CSS (should be your site CSS)\n\t\t\t\t\t"; if (file_exists(getRootPath() . "/styles/" . SettingsHelper::getSetting("Theme") . "/lib/editor.css")) { $strReturn .= "content_css : \"" . getRootURL() . "/styles/" . SettingsHelper::getSetting("Theme") . "/lib/editor.css\","; } else { $strReturn .= "content_css : \"lib/tinymce/css/content.css\","; } $strReturn .= "\n\t\t\t\t\t\n\t\t\t\t\t// Drop lists for link/image/media/template dialogs\n\t\t\t\t\texternal_link_list_url : \"lib/tinymce/lists.php?type=link\",\n\t\t\t\t\texternal_image_list_url : \"lib/tinymce/lists.php?type=image\",\n\t\t\t\t\tmedia_external_list_url : \"lib/tinymce/lists.php?type=media\"\n\t\t\t\t});\n\t\t</script>"; $strReturn .= "<!-- /TINYMCE -->"; return $strReturn; }
LayoutHelper::renderField($PAGE, "Keywords"); ?> "> <meta name="Description" content="<?php LayoutHelper::renderField($PAGE, "Description"); ?> "> <title><?php LayoutHelper::renderField($PAGE, "Title"); ?> « <?php echo SettingsHelper::getSetting("Site Name"); ?> </title> <link href="<?php echo getRootURL(); ?> /styles/<?php echo SettingsHelper::getSetting("Theme"); ?> /lib/style.css" rel="stylesheet" type="text/css"> <?php if (file_exists(getRootPath() . "/styles/" . SettingsHelper::getSetting("Theme") . "/head.php")) { include getRootPath() . "/styles/" . SettingsHelper::getSetting("Theme") . "/head.php"; } ?> </head> <body> <div id="page-wrapper"> <div id="page">
function getUploadURL() { global $UPLOAD_FOLDER; return getRootURL() . $UPLOAD_FOLDER; }
} if (array_key_exists("h", $_GET) && is_numeric($_GET["h"])) { $height = $_GET["h"]; } if ($path == null) { exit; } elseif ($width == null && $height == null) { header("location: {$path}"); exit; } $ext = strToLower(preg_replace("/^.*\\./", "", $path)); $image_path = realpath($path); $cache_name = "path=" . $path . ";w=" . $width . ";h=;" . $height; $cache_file = md5($cache_name) . "." . $ext; $cache_folder_path = getRootPath() . "/" . "_image_cache/"; $cache_folder_url = getRootURL() . "/" . "_image_cache/"; $cache_path = $cache_folder_path . $cache_file; $cache_url = $cache_folder_url . $cache_file; if (file_exists($cache_path)) { switch ($ext) { case "gif": header('Content-type: image/gif'); $cache = imageCreateFromGif($cache_path); imageGif($cache); break; case "jpg": header('Content-type: image/jpeg'); $cache = imageCreateFromJpeg($cache_path); imageJpeg($cache); break; case "jpeg":
$strUserFile = preg_replace($strExpression, $strReplace, $strUserFile); } else { $strUserFile = "<?php \$aryUsers = array(); {$strReplace} ?>"; } file_put_contents($strUserFilePath, $strUserFile); // create content folder if (!is_dir(getPath(""))) { mkdir(getPath("")); } // Create website tree if (!Page::isPage("/home")) { $home = Page::create("/home", "content"); $home->setField("Title", "Home"); $home->setField("Description", "Home page of a default installation of StructureCMS"); $home->setField("Keywords", "StructureCMS Content Management System"); $home->setField("Content", "<h2>Welcome to StructureCMS!</h2><p>Your site has been installed and is ready to use. The following links may be of assistance to you.</p><ul><li><a href=\"" . getRootURL() . "/admin\">Administration</a> (U:{$strUsername}, p:" . $_POST["password"] . ")</li><li><a href=\"" . getRootURL() . "/content/footer/search/\">Search</a></li><li><a href=\"" . getRootURL() . "/content/footer/contact/\">Contact</a></li><li><a href=\"" . getRootURL() . "/content/rss/latest/\">RSS Feed</a></li></ul>"); $home->setLayout("home"); $home->save(); } if (!Page::isPage("/home/about")) { $about = Page::create("/home/about", "content"); $about->setField("Title", "About"); $about->setField("Description", "About StructureCMS"); $about->setField("Keywords", "StructureCMS Content Management System"); $about->setField("Content", "<p>For more information, please visit <a href=\"http://code.google.com/p/structure-cms/\">the project home page</a></p>"); $about->save(); } // Create footer tree if (!Page::isPage("/footer")) { $footer = Page::create("/footer", "content"); $footer->setField("Title", "Footer");
public static function getPageURL($node) { $strPath = getRootURL() . "/content{$node}"; //$strPath = "index.php?path=$node"; return $strPath; }
<?php require "application.php"; header("content-type: text/javascript"); if (array_key_exists("type", $_GET) && array_key_exists($_GET["type"], $stcTypes)) { $stcType = $stcTypes[$_GET["type"]]; $strPath = getRootPath() . "/" . $stcType["path"]; $strPath = str_ireplace("\\", "/", $strPath); $strURL = getRootURL() . "/" . $stcType["path"]; $strURL = str_ireplace("\\", "/", $strURL); echo "var " . $stcType["tinyMceVarName"] . " = new Array("; if (file_exists($strPath)) { $aryEntries = scanDir($strPath); $blnComma = false; for ($i = 0; $i < count($aryEntries); $i++) { $strExt = preg_replace("/^.*\\./", "", $aryEntries[$i]); if (array_search($strExt, $stcType["extensions"], true)) { if ($blnComma) { echo ","; } $blnComma = true; echo "\r\n\t[\"" . $aryEntries[$i] . "\", \"" . $strURL . "/" . $aryEntries[$i] . "\"]"; } } } echo "\r\n);"; }
} else { $oURL = ''; } if (isset($_GET['lap'])) { $oLap = INT_post($_GET['lap']); } else { $oLap = 0; } if (isset($_GET['cim'])) { $CCim = getTXTtoURL($_GET['cim']); } else { $CCim = ''; } //ADATBÁZIS MEGNYITÁSA require_once "init/db/start.php"; $RootURL = getRootURL(); $TisztaOURL = getTisztaURL(); //require_once("php/DB/Adatbazis.php"); //require_once("php/Init.php"); //Alapadatok lekérdezése require_once "php/Alapbeallitasok.php"; $_SESSION['ErrorStr'] .= setAlapbeallitasok(); $AlapAdatok = getAlapbeallitasok(); //BE- vagy KIJELENTKEZÉS; FELHASZNÁLÓI ADATOK MÓDOSÍTÁSA require_once "php/Felhasznalo.php"; if ($_SESSION['AktFelhasznalo' . 'FSzint'] > 0) { $_SESSION['ErrorStr'] .= setBelepes(); $_SESSION['ErrorStr'] .= setKilepes(); $_SESSION['ErrorStr'] .= SetUjJelszo(); } if ($_SESSION['AktFelhasznalo' . 'FSzint'] > 4) {
public function render($value) { return getRootURL() . $this->options["path"] . "/" . $value; }