Ejemplo n.º 1
0
 function htmlshifter($klikit, $str = false)
 {
     global $browsers, $__lang, $tmplext;
     $string = gethatmpl($klikit, "index");
     if (!isset($_GET['cat']) || $_GET['cat'] == '') {
         $_GET['cat'] = 1;
     }
     if (!isset($_GET['ele'])) {
         if (!isset($_GET['fn'])) {
             $_GET['fn'] = '';
         }
         $_GET['ele'] = $_GET['fn'];
     }
     $arr[0] = '{langtag}';
     $arr[1] = dir_ls($GLOBALS['__the_cwd'] . "/" . $GLOBALS['_cfg']['folders']['language']);
     $arr[1] = $arr[1]['fd'];
     $langarr = getlanghtml($arr);
     $strraw[0] = ele_content($klikit);
     if (!isset($mmv)) {
         $mmv = '';
     }
     if (!isset($mmh)) {
         $mmh = '';
     }
     $strraw[1] = str_replace(array("{ext:ajaxurlvar:ension}"), array($GLOBALS['_cfg']['global']['ajax_urlvar']), guilang(str_replace(array("{ext:currentwd:ension}", "{ext:wwwroot:ension}", "{ext:def_request_folder:ension}", "{ext:mimemodesftlog:ension}", "{ext:colorshizzle:ension}", "{ext:language:ension}", "{ext:browsers:ension}", "{ext:memohori:ension}", "{ext:memoverti:ension}", "{ext:cat:ension}", "{ext:rawele_name:ension}", "{ext:ele_name:ension}", "{ext:cat_loop:ension}", "{ext:ele_loop:ension}", "{ext:cat_loop_sel:ension}", "{ext:inputtags:ension}", "{ext:inputtagsext:ension}"), array($GLOBALS['currentwd'], $GLOBALS['WIMPY_BASE']['path']['www'], urlencode(htmlentities($GLOBALS['_cfg']['global']['default_request_folder'])), editormimemode($GLOBALS['_cfg']['ext_links']), gethatmpl(0, "colors"), $langarr, getbrowsershtml($browsers), $mmh, $mmv, $_GET['cat'], htmlentities($_GET['ele']), urlencode(htmlentities($_GET['ele'])), getcathtml($klikit), getclixele($klikit, htmlentities($_GET['cat'])), getcathtml($klikit, "cat_sel"), gethatmpl(0, "inputtags"), gethatmpl(0, "inputtags" . $GLOBALS['current_extlink'])), $string), $__lang));
     # $strraw[1]=make_object(guilang(make_object(), $__lang), $guicfg, $hex);
     return $strraw;
 }
Ejemplo n.º 2
0
 if (file_exists($__the_cwd . "/core_clients/" . $_cfg['global']['current_client'] . "/index.php")) {
     include $__the_cwd . "/core_clients/" . $_cfg['global']['current_client'] . "/index.php";
 }
 if ($_cfg['global']['var_dump'] == "on") {
     echo "</span><br />end of core_client index.php loader<br />}<p />";
     echo "########### finishing touch<br />\n<span style=\"color:navy\">Check for anything we echoed previously.\nPutting that in respectively either \$strraw[0] or \$strrm also depending on which you have left empty (or in \$strr if cfg_vardump=on).\nCheck for and if found, run \$strraw[0]=edit_content(\$strraw[0]);\$strraw[1]=edit_template(\$strraw[1]).<br />\n\nThen make_object with settings from core_client index.php AND \$getguicss<br />\nor if no make object (or vars from core_client index.php) available , fill \$strrm with \$strraw[0] if it's not filled yet<br />AND THEN, show that vardump (below)<br /></span>";
     $strr = ob_get_contents();
 } elseif (!isset($strraw[0]) || strlen($strraw[0]) < 1) {
     $strraw[0] = ob_get_contents();
     if ($_cfg['global']['guilang'] == "on") {
         $strraw[0] = guilang($strraw[0], $__lang);
     }
 } elseif (!isset($strrm)) {
     $strrm = ob_get_contents();
     if ($_cfg['global']['guilang'] == "on") {
         $strrm = guilang($strrm, $__lang);
     }
 }
 @ob_end_clean();
 //print_r($strraw);
 ob_start();
 #carefully selected global order of execution for each core client
 #this is a seperated feature
 if (isset($_cfg['global']['ent_decode'])) {
     if ($_cfg['global']['ent_decode'] == "before_make_object" or $_cfg['global']['ent_decode'] == "on") {
         $strraw[0] = html_entity_decode($strraw[0]);
     }
 }
 #end
 if (function_exists("edit_content")) {
     $strraw[0] = edit_content($strraw[0], $_cfg['global']['default_request_folder']);
Ejemplo n.º 3
0
 function make_object($strr, $aa = "main", $langarr = false, $cont = false, $inglue = "", $outglue = "", $temp2 = false)
 {
     global $arr1timers;
     if (!is_array($arr1timers)) {
         $arr1timers = array();
     }
     #  echo "TESTETE";die();
     global $_cfg, $exacts, $lang;
     $skipthiscacheload = false;
     if ($cont != false) {
         global ${$cont};
     }
     $thiscfg =& $_cfg;
     if (!isset($strr)) {
         $strr = '';
     }
     if ($cont != false) {
         $passcont = $cont;
         if (isset(${$passcont}[$aa]) && strlen(${$passcont}[$aa]) > 0) {
             $skipthiscacheload = true;
         }
     } else {
         $passcont = false;
     }
     if (!isset($thiscfg[$aa]['min-userlevel'])) {
         $thiscfg[$aa]['min-userlevel'] = 0;
     }
     if (isset($thiscfg[$aa]['min-userlevel']) && $_SESSION[$_SESSION['rdmstring']] >= $thiscfg[$aa]['min-userlevel'] || is_array($exacts) && in_array($_SESSION[$_SESSION['rdmstring']], $exacts)) {
         #echo "# access granted";die();
         #echo "<pre>";print_r(${$passcont});
         #die();
         # find cached
         #echo "<pre>";print_r($thiscfg);die();
         if (!isset($thiscfg[$aa]['cachelife'])) {
             $timeofmylife = 0;
         } elseif (!is_numeric($thiscfg[$aa]['cachelife'])) {
             $timeofmylife = 60;
         } else {
             $timeofmylife = $thiscfg[$aa]['cachelife'];
         }
         #echo "<pre>";	print_r($thiscfg);  echo "<hr />";
         if (isset($thiscfg[$aa]['str']) && $strr != "") {
             #echo $thiscfg[$aa]['str']."<br />";
             #echo $thiscfg[$aa]['str']." -- $aa <br />";
             ##echo $thiscfg[$aa]['str']." ";
             $cache = gethe("cache", md5($thiscfg[$aa]['str'] . $lang), $timeofmylife);
         } else {
             $cache = false;
         }
         #	if ($GLOBALS['dbg']==true){ echo $thiscfg[$aa]['str'].$lang.$aa." -->";}
         if ($cache == false || $cache == true && $skipthiscacheload == false) {
             if ($strr != "") {
                 $cache = $strr;
             } else {
                 if (isset($thiscfg[$aa]['tmpl_inp'])) {
                     $cache = gethe("tmpl", $thiscfg[$aa]['tmpl_inp'], $timeofmylife);
                 } else {
                     $cache = '';
                 }
             }
             #	echo getcwd()."/".$thiscfg[$aa]['tmpl_inp'];
             if (function_exists("guilang") && is_array($langarr)) {
                 $cache = guilang($cache, $langarr, "{lang:", "/l}");
             }
             #      echo "WTF";die();
             #echo $aa."<br /><pre>";print_r($thiscfg[$aa]);die();
             #print_r(${$passcont});die();
             #if ($cont!=false && isset(${$passcont}[$aa])){echo "WTWF";die();}
             #echo ${$passcont}[$aa];die();
             if (isset($thiscfg[$aa]) && isset($thiscfg[$aa]['cnt_inp']) && strlen($thiscfg[$aa]['cnt_inp']) > 0) {
                 $conttemp = gethe("cont", $thiscfg[$aa]['cnt_inp'] . $lang . $aa, $timeofmylife);
                 $temp =& $conttemp;
             } elseif ($cont != false && isset(${$passcont}[$aa])) {
                 $conttemp = ${$passcont}[$aa];
                 $temp = $conttemp;
                 #	echo ${$passcont}[$aa];#conttemp;
                 #die();
             }
             #      echo "WTF";die();
             #	echo $conttemp;die();
             if (isset($thiscfg[$aa]['str']) && strstr($cache, $inglue . $thiscfg[$aa]['str'] . $outglue) && isset($conttemp)) {
                 $temp = str_replace($inglue . $thiscfg[$aa]['str'] . $outglue, $conttemp, $cache);
             } else {
                 #echo $cache."TWETWE";die();
                 $temp = $cache;
             }
             #echo $thiscfg[$aa]['str']." <p />".$thiscfg[$aa]['cachable'];#die();
             #echo "WTF";die();
             # MARKER
             if (isset($thiscfg[$aa]) && isset($thiscfg[$aa]['cachable']) && $thiscfg[$aa]['cachable'] != "off" && isset($conttemp)) {
                 if (!isset($thiscfg[$aa]['cachelife']) || !is_numeric($thiscfg[$aa]['cachelife'])) {
                     $timeofmylife = 60;
                 } else {
                     $timeofmylife = $thiscfg[$aa]['cachelife'];
                 }
                 #echo $conttemp;
                 writecache($conttemp, md5($thiscfg[$aa]['str'] . $lang), $timeofmylife);
                 if ($GLOBALS['dbg'] == true) {
                     echo $conttemp . " writing ..<br />";
                 }
             }
         } else {
             $temp = $cache;
             $conttemp = $temp;
             #	echo $temp;
             #die();
         }
         #$conttemp=str_replace($inglue.$thiscfg[$aa]['str'].$outglue, "", $conttemp);
         #      echo "WTF";die();
     } else {
         #access denied
         $temp = "";
         $do = 2;
     }
     #echo $temp."TLATA";die();
     if (isset($do) && $do < 2 || !isset($do)) {
         $do = 0;
     }
     if (isset($do) && $do == 0) {
         if ($temp2 == false) {
             $temp2 = $cache;
         }
         #echo "<pre>";    print_r(${$passcont});    echo "</pre><hr />";
         foreach ($thiscfg as $name => $abcd) {
             # echo $name . "<pre>".print_r($abcd)."</pre><hr />";
             #	if ($GLOBALS['dbg']==true){
             #	echo strlen($temp2)." --". isset($abcd['str'])." -- ".strlen($abcd['str'])." -- ".$aa." -- ".$abcd['str']." -- ".strstr($temp2, $inglue.$abcd['str'].$outglue)."<br />";
             #	}
             #    echo ${$passcont}[$abcd['str']]." - ". $abcd['str']."<hr />";
             if (strlen($temp2) > 0 && isset($abcd['str']) && strlen($abcd['str']) > 0 && $aa != $abcd['str'] && strstr($temp2, $inglue . $abcd['str'] . $outglue) && isset(${$passcont}[$abcd['str']])) {
                 $do = 3;
                 #echo $aa." - ".$abcd['str']."<p />".$conttemp."<hr />";
                 $temp2 = str_replace($inglue . $abcd['str'] . $outglue, "", $temp2);
                 #echo $abcd['str']."H".$langarr."E".$passcont."H";
                 #	echo #${$passcont}[
                 #$abcd['str']
                 #]."<hr />"
                 #;
                 #	print_r(${$passcont});
                 #	die();
                 $arr[$inglue . $abcd['str'] . $outglue] = make_object(${$passcont}[$abcd['str']], $abcd['str'], $langarr, $passcont, $inglue, $outglue, $temp2);
                 #	echo "<hr /><pre>";
                 #	print_r($arr[$inglue.$abcd['str'].$outglue]);
                 unset($thiscfg[$name][$abcd['str']]);
             }
         }
         #  echo"<pre>";
         #123".$aa."321";
         #print_r($arr);echo"<hr />";
         if (isset($arr) && is_array($arr)) {
             #    echo "LALALA";die();
             # print_r(array_keys($arr));
             #die();
             $return = str_replace(array_keys($arr), array_values($arr), $strr);
         } else {
             $return = $temp;
         }
     }
     if (!isset($return)) {
         $return = $temp;
     }
     #echo $return."<hr />";
     #die();
     return $return;
 }
Ejemplo n.º 4
0
<?php

// @(#) $Id$
// +-----------------------------------------------------------------------+
// | Copyright (C) 2009, http://freedomeditor.com/                         |
// +-----------------------------------------------------------------------+
// | This file 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 3 of the License, or     |
// | (at your option) any later version.                                   |
// | This file is distributed in the hope that it will be useful           |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of        |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          |
// | GNU General Public License for more details.                          |
// +-----------------------------------------------------------------------+
// | Author: Bart Bosma                                                    |
// +-----------------------------------------------------------------------+
//
return guilang(gethatmpl(0, "inputtags" . $GLOBALS['current_extlink']), $__lang);
?>

		
Ejemplo n.º 5
0
 function extension($source, $scrext, $_cfg, $langcss, $js = false, $donethatoncearray = array())
 {
     $returnjs = '';
     $cfg_gl = $_cfg;
     $resultingarray345 = repl_between($source, "", $_cfg['extension']['string_open'], $_cfg['extension']['string_close'], false, "sm", true);
     $amnt = count($resultingarray345[2]);
     $noloop = false;
     if (is_array($resultingarray345) && is_array($resultingarray345[2])) {
         foreach ($resultingarray345[2] as $boelieboelie) {
             if (strlen($boelieboelie) > 0) {
                 if (file_exists("cfg/custom/" . $boelieboelie . ".css")) {
                     $_cfgt = loadextcfg("cfg/custom/" . $boelieboelie . ".css");
                     if (isset($_cfgt)) {
                         $_cfg = mergecss($_cfg, $_cfgt);
                     }
                 }
                 $tmpl = "";
                 $emptytmpl = true;
                 $next = false;
                 if (isset($_cfg['extension_req_val']) && is_array($_cfg['extension_req_val']) && count($_cfg['extension_req_val']) > 0) {
                     foreach ($_cfg['extension_req_val'] as $var => $val) {
                         if (strlen($var) > 0) {
                             if (!isset($_REQUEST[$var])) {
                                 $next = true;
                             } else {
                                 if ($_cfg['extension']['ext_req_val'] == "matchvar") {
                                     if ($_cfg['extension']['ext_req_val_Casesens'] != "on") {
                                         if ($_REQUEST[strtolower($var)] != strtolower($val)) {
                                             $next = true;
                                         }
                                     } elseif ($_REQUEST[$var] != $val) {
                                         $next = true;
                                     }
                                 }
                             }
                         }
                     }
                 }
                 if ($js != false) {
                     $next = false;
                 }
                 if ($next == false && $_cfg['extension']['launch'] == "enabled") {
                     if (strtolower($_cfg["extension"]["core_client"]) != "any") {
                         $coreclients = explode(",", $_cfg["extension"]["core_client"]);
                         if (isset($_cfg['global']['select_client_by_urlvar']) && isset($_GET[$_cfg['global']['select_client_by_urlvar']]) && isset($coreclients[$_GET[$_cfg['global']['select_client_by_urlvar']]]) || !isset($_cfg['global']['select_client_by_urlvar']) && !isset($_GET[$_cfg['global']['select_client_by_urlvar']]) && !isset($coreclients[$_GET[$_cfg['global']['select_client_by_urlvar']]]) && isset($_cfg['global']['current_client']) && isset($coreclients[$_cfg['global']['current_client']])) {
                             $emptytmpl = false;
                         }
                     } elseif (strtolower($_cfg["extension"]["core_client"]) == "any") {
                         $emptytmpl = false;
                     }
                     if ($_cfg['extension']['languageload'] == "enabled") {
                         $__tssf = $GLOBALS['__tssf'];
                         if (file_exists($_cfg['folders']['language'] . "/" . $__tssf . "/custom/" . $boelieboelie . "/" . $__tssf . ".css")) {
                             $lang_t = loadextcfg($_cfg['folders']['language'] . "/" . $__tssf . "/custom/" . $boelieboelie . "/" . $__tssf . ".css");
                         }
                     }
                     if (isset($lang_t) && is_array($lang_t) && $_cfg['extension']['globallanguageload'] == "enabled") {
                         if (is_array($langcss)) {
                             $langcss = mergecss($langcss, $lang_t);
                         }
                     } else {
                         if ($_cfg['extension']['globallanguageload'] == "enabled") {
                         } else {
                             $langcss = parse_css($lang_t);
                         }
                     }
                     if (is_array($langcss["1"])) {
                         $__lang = piecele($langcss["1"], $_cfg['global']['default_gui_lang']);
                     }
                     #print_r($__lang);
                     if ($emptytmpl == false && $_cfg['extension']['tmplload'] == "enabled") {
                         $tmpl = gethatmpl(0, $boelieboelie);
                     }
                     if ($_cfg['extension']['phplaunch'] == "enabled" && file_exists("fc/customcallback/" . $boelieboelie . $scrext)) {
                         ob_start();
                         $tmpl = (include "fc/customcallback/" . $boelieboelie . $scrext);
                         if (strlen($tmpl) == 0 || $emptytmpl == false) {
                             if ($_cfg['extension']['phplaunch_output'] == "enabled") {
                                 if (strlen($tmpl) < 1) {
                                     $tmpl = ob_get_contents();
                                 }
                             } else {
                                 ob_clean();
                             }
                         }
                     }
                     if ($_cfg['extension']['srch_ext'] != "disabled" && strlen($tmpl) > 0 && isset($srch_ext) && is_array($srch_ext) && count($srch_ext) > 0) {
                         $tmpl = str_replace(array_keys(${$_cfg['extension']['srch_ext']}), array_values(${$_cfg['extension']['srch_ext']}), $tmpl);
                     }
                     #if (strlen($tmpl)>0){
                     if ($_cfg['extension']['languagereplace'] == "enabled") {
                         if (!in_array($boelieboelie, $donethatoncearray)) {
                             $return[$_cfg['extension']['level']][$_cfg['extension']['string_open'] . $boelieboelie . $_cfg['extension']['string_close']] = guilang($tmpl, $__lang);
                             #$source=str_replace("{ext:".$boelieboelie.":ension}", guilang($tmpl, $__lang), $source);
                         }
                     } else {
                         if (!in_array($boelieboelie, $donethatoncearray)) {
                             $return[$_cfg['extension']['level']][$_cfg['extension']['string_open'] . $boelieboelie . $_cfg['extension']['string_close']] = $tmpl;
                             #$source=str_replace("{ext:".$boelieboelie.":ension}", $tmpl, $source);
                         }
                     }
                     #		}
                     #		echo "<pre>";
                     #		print_r($source);
                     if (isset($_cfg['always_block_ext_scan_inside'][$boelieboelie])) {
                         $donethatoncearray[] = $boelieboelie;
                     }
                     /*
                     loop result for generating output cmd
                       {
                     load "cfg/custom/named*.css"; if found
                     load "lang/custom/named*.css"; if found
                     load tmpl/named*.html if found;
                     load tmpl/js/named*.js if found;
                     ob_start();
                     load "fc/customcallback/named*.php"; < 
                     repl {DEFAULTTAG} in html result if any, with ob_end_Clean() or what comes from return function;  result
                     result repl guilang
                     $rep[$cfgdepth]["named*"]=result
                     }
                     #gen output cmd exe
                     */
                     $_cfg = $cfg_gl;
                 }
             }
         }
     } else {
         $noloop = true;
     }
     # end prepare loop
     #start output gen loop
     if (isset($return) && is_array($return) && count($return) > 0) {
         if ($js != false) {
             $extensionjs = "";
         }
         //$source2=$source;
         foreach ($return as $ret) {
             $source = str_replace(array_keys($ret), array_values($ret), $source);
             foreach ($ret as $re => $turn) {
                 if ($js == 'print') {
                     if (file_exists($GLOBALS['__the_cwd'] . "/" . $_cfg['folders']['templates'] . "js/" . str_replace(array($_cfg['extension']['string_open'], $_cfg['extension']['string_close']), "", $re) . ".js")) {
                         $extensionjs .= "//" . $_cfg['folders']['templates'] . "js/" . str_replace(array($_cfg['extension']['string_open'], $_cfg['extension']['string_close']), "", $re) . ".js\n";
                         $extensionjs .= file_get_contents($GLOBALS['__the_cwd'] . "/" . $_cfg['folders']['templates'] . "js/" . str_replace(array($_cfg['extension']['string_open'], $_cfg['extension']['string_close']), "", $re) . ".js");
                         $extensionjs .= "\n\n//------------------------------//\n\n\n\n";
                     }
                 }
             }
         }
         ############## moved to this place @ 0.2.6
         if ($_cfg['extension']['loop_srch_ext'] != "disabled" && $js == false) {
             $source = extension($source, $scrext, $_cfg, $langcss, $js, $donethatoncearray);
         }
         ##############
         if ($js == "print") {
             @ob_end_clean();
             @ob_end_clean();
             @ob_end_clean();
             @ob_end_clean();
             if (strlen($extensionjs) == 0) {
                 die("Unable to determine javascript source files, no " . $_cfg['extension']['string_open'] . "*" . $_cfg['extension']['string_close'] . " tags found for the current coreclient or no corresponding js files.");
             }
             $returnjs .= $extensionjs;
         }
     } elseif ($js != false) {
         die("Unable to determine javascript source files, no " . $_cfg['extension']['string_open'] . "*" . $_cfg['extension']['string_close'] . " tags found for the current coreclient or no corresponding js files.");
     }
     if ($js != false) {
         return $returnjs;
     } else {
         return $source;
     }
 }
Ejemplo n.º 6
0
<?php

global $__lang;
return guilang($_GET['cat'], $__lang);