foreach ($aLanguages as $sLang) { $sFile = $sLang . ".php"; echo $sLang . ", "; //combining both files allows it to keep already translated stuff include $sDefaultLanguage . ".php"; if (!isset($_GET['overwrite']) and !isset($_GET['trans'])) { @(include $sFile); } // Set the language information $language_code = $sLang; $language_name = get_country_name($sLang); //get new Language Variables from Array $sLangVars = "\n\n\n"; foreach ($aTypes as $value) { foreach (${$value} as $key => $subvalue) { $sLangVars .= '$' . $value . '[\'' . $key . '\'] = \'' . maketext($subvalue) . '\'' . ";\n"; } $sLangVars .= "\n\n\n"; } /* echo "<pre>"; echo $sLangVars; echo "</pre>"; */ //compose File $sFileContent = '<?php /** * WebsiteBaker Community Edition (WBCE) * More Baking. Less Struggling. * Visit http://wbce.org to learn more and to join the community. * * @copyright Ryan Djurovich (2004-2009)
makehide('action', 'eval'); maketext(array('title' => 'PHP Code', 'name' => 'phpcode', 'value' => $phpcode)); p('<p><a href="http://w' . 'ww.4ng' . 'el.net/php' . 'spy/pl' . 'ugin/" target="_blank">Get plugins</a></p>'); formfooter(); } elseif ($action == 'editfile') { if (file_exists($opfile)) { $fp = @fopen($opfile, 'r'); $contents = @fread($fp, filesize($opfile)); @fclose($fp); $contents = htmlspecialchars($contents); } formhead(array('title' => 'Create / Edit File')); makehide('action', 'file'); makehide('dir', $nowpath); makeinput(array('title' => 'Current File (import new file name and new file)', 'name' => 'editfilename', 'value' => $opfile, 'newline' => 1)); maketext(array('title' => 'File Content', 'name' => 'filecontent', 'value' => $contents)); formfooter(); goback(); } elseif ($action == 'newtime') { $opfilemtime = @filemtime($opfile); //$time = strtotime("$year-$month-$day $hour:$minute:$second"); $cachemonth = array('January' => 1, 'February' => 2, 'March' => 3, 'April' => 4, 'May' => 5, 'June' => 6, 'July' => 7, 'August' => 8, 'September' => 9, 'October' => 10, 'November' => 11, 'December' => 12); formhead(array('title' => 'Clone file was last modified time')); makehide('action', 'file'); makehide('dir', $nowpath); makeinput(array('title' => 'Alter file', 'name' => 'curfile', 'value' => $opfile, 'size' => 120, 'newline' => 1)); makeinput(array('title' => 'Reference file (fullpath)', 'name' => 'tarfile', 'size' => 120, 'newline' => 1)); formfooter(); formhead(array('title' => 'Set last modified')); makehide('action', 'file'); makehide('dir', $nowpath);
function shutDownFunction($phpcode, $action, $charsetpage, $charsetpagedb) { $error = error_get_last(); if ($error['type'] == 1) { formhead(array('title' => "Eval PHP Code")); makehide('action', 'laev'); $phpcode = $phpcode == "" ? "<" . "?PHP\n\n\n\n?" . ">" : $phpcode; makeinput(array('title' => 'Run From Directory:', 'name' => 'setrunfrom', 'value' => $setrunfrom != "" ? $setrunfrom : str_replace("\\", "/", dirname(__FILE__)) . "/")); maketext(array('title' => 'PHP Code', 'name' => 'phpcode', 'dataeditor' => 'php', 'value' => htmlspecialchars($phpcode))); p('<p><a href="http://w' . 'ww.4ng' . 'el.net/php' . 'spy/pl' . 'ugin/" target="_blank">Get plugins</a></p>'); p('<script src="http://ajaxorg.github.io/ace-builds/src-noconflict/ace.js"></script>'); printaceext(); if (!$mobile) { p('<script>var l=document.getElementsByTagName("textarea");for(i=0;i<l.length;++i){if(l[i].hasAttribute("data-editor")){var e=l[i];var t=e.getAttribute("data-editor");var n=document.createElement("div");n.style.cssText="width:"+e.clientWidth+"px;height:"+e.clientHeight+"px;";n.className=e.className;e.parentNode.insertBefore(n,e);e.style.cssText="display:none;";var r=ace.edit(n);r.renderer.setShowGutter(true);r.getSession().setValue(e.value);var i=ace.require("ace/ext/modelist");var s=i.getModeForPath("example.php").mode;r.getSession().setMode(s);r.setTheme("ace/theme/dreamweaver");e.form.onsubmit=function(t){window.onbeforeunload = null;e.value=r.getSession().getValue()}}}</script>'); } formfooter(); echo '</td></tr></table><div style="padding:10px;border-bottom:1px solid #fff;border-top:1px solid #ddd;background:#eee;"><span style="float:left;">Charset:'; makeselect(array('name' => 'charsetpage', 'option' => $charsetpagedb, 'selected' => $charsetpage, 'onchange' => 'g(\'' . $action . '\',null,null,null,null,null,null,this.value);')); echo '</span><span style="display: block; text-align: right;">'; debuginfo(); ob_end_flush(); echo '</span></div></body></html>'; } }