function listUniqueTerms($p = 0, $l = 0)
{
    global $conn;
    ?>
<ul><?php 
    $lista = $conn->getUniqueTerms($p);
    foreach ($lista as $row) {
        ?>
<li><a href="<?php 
        echo getScriptName();
        ?>
?idt=<?php 
        echo $row['term_id'];
        ?>
"><?php 
        echo_utf8($row['name']);
        ?>
</a>
		<?php 
        listUniqueTerms($row['term_id']);
        ?>
</li>
	    <?php 
    }
    ?>
</ul><?php 
}
<?php

// $Id$
include 'settings.php';
#read CSV-File
$script = strtolower(getScriptName());
$CSVArray = getCSV();
if (isset($CSVArray[$script])) {
    $links = $CSVArray[$script];
}
function cacheurl($url, $browser_req = true, $cookies = "", $browser = "Firefox")
{
    global $myconfig;
    #find cache file
    $hash = md5($url);
    $datei = "cache/" . $hash;
    if (file_exists($datei)) {
        if (time() - filemtime($datei) < $myconfig['cachetime']) {
            return implode('', file($datei));
        }
    }
    #no cache file exists send browser request
    if ($browser_req == true) {
        $objekt = new Browser($browser);
        if ($cookies != "") {
            $objekt->cookies_set($cookies);
        }
        $objekt->url = $url;
        $t_html = $objekt->read();
    } else {
        $t_html = implode('', file($url));
示例#3
0
             } elseif ($case[status] != "RUNNING") {
                 $failed++;
             }
             $caseArrTMP[$caseID] = $case;
         }
     }
     // both per module per category
 } elseif ($mod != "" && $cat != "") {
     $scriptsArr = array();
     foreach ($cases as $caseID => $case) {
         if ($case[component] == $mod && $case[category] == $cat) {
             $case[countID] = $i;
             $i++;
             $time += $case[time];
             $case[time] = date("i:s", mktime(0, 0, $case[time]));
             $case[scriptName] = getScriptName($caseID);
             array_push($scriptsArr, $case[scriptName]);
             if ($case[status] == "PASSED") {
                 $passed++;
             } elseif ($case[status] != "RUNNING") {
                 $failed++;
             }
             $caseArrTMP[$caseID] = $case;
         }
     }
 }
 if ($filter != "") {
     $i = 1;
     $caseArr = array();
     foreach ($caseArrTMP as $caseID => $case) {
         if ($filter == "PASSED" && $case[status] == $filter) {
示例#4
0
                <td><?php 
echo getScriptName("app1");
?>
</td>
              </tr>
              <tr>
                <td>app2</td>
                <td><?php 
echo getScriptName("app2");
?>
</td>
              </tr>
              <tr>
                <td>app3</td>
                <td><?php 
echo getScriptName("app3");
?>
</td>
              </tr>
            </table>
            </div>
         </article>
         <!-- Footer -->
         <footer>
            <div id="footer">
               &copy; scalabrine.
            </div>
         </footer>
      </div>

   <!-- Piwik -->
示例#5
0
function getScriptPath()
{
    $uri = getScriptName();
    return dirname($uri);
}
示例#6
0
/**
 * Loads and initializes the mcLanguage array based on config.
 *
 * @param Array $config Name/Value config array.
 */
function loadLanguagePack($config)
{
    global $mcImageManagerConfig, $mcLanguage;
    $language = $config['general.language'];
    $languageDefault = "en";
    $langReader =& new LanguageReader();
    $langReader->loadXML(realpath("langs/" . $language . ".xml"));
    $foreignLanguage = $langReader->_items;
    // Load default language and merge arrays
    if ($language != $languageDefault) {
        $defaultLangReader =& new LanguageReader();
        $defaultLangReader->loadXML(realpath("langs/" . $languageDefault . ".xml"));
        $defaultLanguage = $defaultLangReader->_items;
        // Merge arrays
        foreach ($foreignLanguage as $ftarget => $fvalue) {
            foreach ($fvalue as $iname => $ivalue) {
                $defaultLanguage[$ftarget][$iname] = $ivalue;
            }
        }
        $lang = isset($defaultLanguage[getScriptName()]) ? $defaultLanguage[getScriptName()] : array();
        $commonLang = isset($defaultLanguage["common"]) ? $defaultLanguage["common"] : array();
    } else {
        $lang = isset($foreignLanguage[getScriptName()]) ? $foreignLanguage[getScriptName()] : array();
        $commonLang = isset($foreignLanguage["common"]) ? $foreignLanguage["common"] : array();
    }
    $mcLanguage = array_merge($commonLang, $lang);
}
示例#7
0
function tng_getRightIcons()
{
    global $text, $tngconfig, $cms, $gotlastpage, $sitever;
    $addbookmark_url = getURL("ajx_addbookmark", 1);
    $right_icons = "";
    if ($tngconfig['showshare'] && $sitever != "mobile") {
        $right_icons .= tng_smallIcon(array('label' => $text['share'], 'id' => "share", 'onclick' => "jQuery('#shareicons').toggle(200); if(!share) { jQuery('#share-smicon').html('{$text['hide']}'); share=1;} else { jQuery('#share-smicon').html('{$text['share']}'); share=0; }; return false;"));
    }
    if (!$tngconfig['showprint'] && $sitever != "mobile") {
        $print_url = getScriptName();
        if (preg_match("/\\?/", $print_url)) {
            $print_url .= "&amp;tngprint=1";
        } else {
            $print_url .= "?tngprint=1";
        }
        $right_icons .= tng_smallIcon(array('label' => $text['tngprint'], 'id' => "print", 'rel' => "nofollow", 'onclick' => "newwindow=window.open('{$print_url}','tngprint','width=850,height=600,status=no,resizable=yes,scrollbars=yes'); newwindow.focus(); return false;"));
    }
    if (!$tngconfig['showbmarks'] && $gotlastpage) {
        $right_icons .= tng_smallIcon(array('label' => $text['bookmark'], 'id' => "bmk", 'onclick' => "tnglitbox = new LITBox('{$addbookmark_url}p=" . urlencode($cms['tngpath']) . "',{width:350,height:100}); return false;"));
        $tngconfig['menucount']++;
    }
    return $right_icons;
}