Example #1
0
function display_columns_list($all_columns, $data)
{
    //text,file,按照通栏的来,别的走一半
    $full_li_class_types = array('text', 'split', 'group');
    $str = '';
    foreach ($all_columns as $name => $v) {
        $liclass = '';
        if (in_array($v['type'], $full_li_class_types)) {
            $liclass = 'clear full';
        }
        if (isset($v['hidden']) && ($v['hidden'] == 'detail' || $v['hidden'] == 'both' || $v['hidden'] == '1')) {
            $liclass .= ' hidden';
        }
        $str .= "<li class='column_display_li {$liclass}'>";
        if (!$v['type'] || $v['type'] == 'string' || $v['type'] == 'number' || $v['type'] == 'select' || $v['type'] == 'text' || $v['type'] == 'date') {
            $str .= display_text($v['display_name'], $name, $data[$name], $v['options'], $v['class'], $v['link'], $data, $all_columns, $liclass, $v['length'], $v['extra_type']);
        } else {
            if ($v['type'] == 'split') {
                $str .= display_split($v['display_name']);
            } else {
                if ($v['type'] == 'file') {
                    $str .= display_file($v['display_name'], $name, $data[$name], $v['param'], $v['class'], $v['link'], $data, $all_columns);
                } else {
                    if ($v['type'] == 'group') {
                        $str .= '<span class="column_title">' . $v['display_name'] . '</span><div class="span11 column_content">';
                        $str .= display_group($data[$name], $v['param']['options']);
                        $str .= '</div></li>';
                    }
                }
            }
        }
        $str .= '</li>';
    }
    return $str;
}
Example #2
0
<?php

//charge et initiale les bibliotheques globales
include 'setting.inc.php';
$command = get_command();
$routes = get_routes($command);
if ($routes[0] == '') {
    // lire le code de langue
    $the_lang = get_lang();
    redirect($the_lang . '/home');
} elseif ($routes[0] == 'fr') {
    switch_lang('fr');
    display_text();
    site_routing($routes);
} elseif ($routes[0] == 'en') {
    switch_lang('en');
    display_text();
    site_routing($routes);
} elseif ($routes[0] == 'es') {
    switch_lang('es');
    display_text();
    site_routing($routes);
} else {
    header('Status: 404 Not Found');
    error404_action();
}
Example #3
0
<?php 
} else {
    // before installing, ask user email (will be inserted on DB)
    if (isset($_POST['email'])) {
        $email = trim($_POST['email']);
    }
    // however, it can be changed later, so it won't be validated
    if (!isset($_POST['submit']) || isset($_POST['email']) && empty($email)) {
        include 'install-check.php';
        ?>
    <p class="mt">Please write your email address.
       It will be used to send you a new password if you lose/forget it, so please double-check it before continuing.</p>

    <?php 
        if (isset($_POST['email']) && empty($email)) {
            echo display_text($_displayType["ERROR"], 'Email address is empty.');
        }
        ?>
    
    <form action="install.php" method="post">
      <fieldset>
        <label for="email">Email</label>
        <input type="text" name="email" id="email" size="30" class="text" />
        <input type="submit" name="submit" value="Install" class="button round" />
      </fieldset>
    </form>
    
    <script type="text/javascript">
    //<![CDATA[
    $(function(){
      $('#email').focus();
Example #4
0
" name="barcode_drawer" method="post">
<?php 
$table = new LSTable(8, 2, '500', $null);
$table->setTitle('Configs for ' . $filename);
$table->addRowAttribute(0, 'class', 'table_title');
$table->addCellAttribute(0, 0, 'colspan', '2');
$table->addCellAttribute(0, 0, 'align', 'center');
$table->setText(0, 0, '<font color="#ffffff"><b>General Configs</b></font>');
$table->addCellAttribute(1, 0, 'width', '100');
$table->setText(1, 0, 'Type');
$table->setText(1, 1, display_select($filename));
$table->setText(2, 0, 'Output');
$table->setText(2, 1, display_output($output));
$table->setText(3, 0, 'Thickness');
$table->setText(3, 1, display_thickness($thickness));
$table->setText(4, 0, 'Resolution');
$table->setText(4, 1, display_res($res));
$table->setText(5, 0, 'Font Size');
$table->setText(5, 1, display_font($font));
$table->setText(6, 0, 'Text');
$table->setText(6, 1, display_text($text2display));
$table->addCellAttribute(7, 0, 'align', 'center');
$table->addCellAttribute(7, 0, 'colspan', '2');
$table->setText(7, 0, '<input type="submit" value="Generate" />');
if (!empty($text2display)) {
    $table->insertRows(8, 1);
    $table->addCellAttribute(8, 0, 'align', 'center');
    $table->addCellAttribute(8, 0, 'colspan', '2');
    $table->addRowAttribute(8, 'style', 'background-color: #ffffff');
    $table->setText(8, 0, '<img src="image.php?code=' . $filename . '&o=' . $output . '&t=' . $thickness . '&r=' . $res . '&text=' . urlencode($text2display) . '&f=' . $font . '&a1=' . $a1 . '&a2=' . $a2 . '" alt="Error? Can\'t display image!" />');
}
Example #5
0
?>

<?php 
// check dir
if (!is_dir(BACKUPDIR)) {
    if (!mkdir(BACKUPDIR)) {
        echo display_text($_displayType["ERROR"], BACKUPDIR . ' does not exist and it could not be created.
                       You must create <strong>' . BACKUPDIR . '</strong> dir or specify another directory to save database backups in <code>admin/ext/maintenance/index.php</code> file.');
    }
}
clearstatcache();
// ensure full access to backup dir (at least apache/IIS)
if (!is_writable(BACKUPDIR)) {
    $perms = substr(decoct(fileperms(BACKUPDIR)), 2);
    if (($perms != "775" || $perms != "777") && !chmod(BACKUPDIR, 0775)) {
        echo display_text($_displayType["ERROR"], 'Settings permissions to <strong>' . BACKUPDIR . '</strong> failed.
                       You must set write permissions (either 775 or 777) to that directory manually.');
    }
}
if ($ROOT) {
    ?>
<p>
  You can either <a href="backup.php?task=1">download</a> your <code><?php 
    echo DB_NAME;
    ?>
</code> database,
  <a href="backup.php?task=2">back it up</a> on the server,
  or just <a href="backup.php?task=0">look at the current data</a>.
</p>
<p>
  Note that in all cases the whole database will be dumped in SQL format.
  If you only want to export the interactions logs from the <code><?php 
    ?>
		<link rel="stylesheet" type="text/css" href="../../../portal/fileadmin/design/css/screen.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="../../../portal/fileadmin/design/css/print.css" media="print" />
	</head>
	<body id="top" class="popup">
	<div id="header_gray">
	<a href="javascript:window.print()">Drucken <img src="../../../portal/fileadmin/design/images/icon_print.gif" width="14" height="14" alt="" /></a>
	<a href="javascript:window.close()">Fenster schlie&szlig;en <img src="../../../portal/fileadmin/design/images/icon_close.gif" width="14" height="14" alt="" /></a>
	</div>
	<div id="header_redbottom"></div>
	<div id="header_red"></div>
	<div class="content">
<?php 
    echo "<img border=\"0\" src=\"img/inspire_tr_100.png\" alt=\"INSPIRE Logo\"><h1>INSPIRE Metadaten:</h1>";
    #define table
    echo "<html><table class='contenttable-0-wide'>";
    echo "<tr>";
    #loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
    foreach ($detail_keys as $detailkey) {
        if (in_array($detailkey, $ibus_names) == true) {
            if ($md_ident[array_search($detailkey, $ibus_names)]['inspiremandatory'] == 'true') {
                echo "<td>" . $md_ident[array_search($detailkey, $ibus_names)]['inspire'] . "</td>";
                echo "<td>";
                echo display_text($detail_array[$detailkey]);
                echo "</td></tr>";
            }
        }
    }
    echo "</table></html>";
    echo '<br><b>INSPIRE output not completly implemented!<b><br>';
}
$layer['Telefon'] = $row['contactvoicetelephone'];
$layer['Fax'] = $row['contactfacsimiletelephone'];
$layer['E-Mail'] = $row['contactelectronicmailaddress'];
$layer['Land'] = $row['country'];
$layer['Metadaten'] = $row['layer_metadataurl'];
$metadataUrl = $row['layer_metadataurl'];
if ($layer['Metadaten'] && $redirectToMetadataUrl) {
    header("Location: " . $layer['Metadaten']);
} else {
    $metadataStr .= "<table >\n";
    $t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
    $t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
    $t_c = "\n\t\t</td>\n\t</tr>\n";
    $keys = array_keys($layer);
    for ($j = 0; $j < count($layer); $j++) {
        $metadataStr .= $t_a . $keys[$j] . $t_b . display_text($layer[$keys[$j]]) . $t_c;
    }
    if (!$row['layer_pos'] && !$row['layer_parent']) {
        $wms_id = $row['wms_id'];
        $sql = "SELECT layer.layer_title, layer.layer_id FROM layer WHERE fkey_wms_id = \$1 AND layer_pos <> 0";
        $v = array($wms_id);
        $t = array('i');
        $res = db_prep_query($sql, $v, $t);
        $i = 0;
        $layerArray = array();
        while ($row = db_fetch_array($res)) {
            $layerArray[$i] = array();
            $layerArray[$i]['Titel'] = $row['layer_title'];
            $layerArray[$i]['id'] = $row['layer_id'];
            $i++;
        }
Example #8
0
/** 
 * Displays a <noscript> warning message. Useful for those extensions that require JavaScript functionality.
 * @param   string  $msg    custom warning message. Default: "Please enable JavaScript in order to work on this section."
 * @return  string          Message wrapped in a <noscript> tag   
 */
function check_noscript($msg = "")
{
    global $_displayType, $_notifyMsg;
    if (empty($msg)) {
        $msg = $_notifyMsg["NOSCRIPT"];
    }
    return '<noscript>' . display_text($_displayType["WARNING"], $msg) . '</noscript>';
}
Example #9
0
if (!is_dir(CACHE_DIR)) {
    echo display_text($_displayType["ERROR"], 'The cache dir does not exist.');
} else {
    $cache = count_dir_files(CACHE_DIR);
    if (!$cache) {
        echo display_text($_displayType["WARNING"], 'The log cache is empty.');
    }
    $dblog = db_records();
    if ($cache > $dblog) {
        echo display_text($_displayType["WARNING"], 'There are ' . $cache . ' logs in cache dir, but there are ' . $dblog . ' in database, which is something weird :/');
    }
    // ensure that logs can be written
    if (!is_writeable(CACHE_DIR)) {
        $perms = substr(decoct(fileperms(CACHE_DIR)), 2);
        if (($perms != "775" || $perms != "777") && !chmod(CACHE_DIR, 0775)) {
            echo display_text($_displayType["ERROR"], 'Settings permissions to <strong>' . CACHE_DIR . '</strong> failed.
                         You must set write permissions to that directory manually.');
        }
    }
}
if (is_admin()) {
    ?>

<h3>Tracking Code</h3>
<p>Put this snippet in the pages you'd wish to track:</p>
<code><pre><?php 
    //$code  = '<script type="text/javascript" src="'.ABS_PATH.'core/js/smt-aux.min.js"></script>'    . PHP_EOL;
    //$code .= '<script type="text/javascript" src="'.ABS_PATH.'core/js/smt-record.min.js"></script>' . PHP_EOL;
    $code = '<script type="text/javascript" src="' . ABS_PATH . 'core/js/smt2e.min.js"></script>' . PHP_EOL;
    $code .= '<script type="text/javascript">' . PHP_EOL;
    $code .= 'try { ' . PHP_EOL;
    $code .= '  smt2.record();' . PHP_EOL;
Example #10
0
function dt_generate_option_html($this_options)
{
    foreach ($this_options as $value) {
        switch ($value['type']) {
            case "section_start":
                display_section_start($value);
                break;
            case "options_group_start":
                display_options_group_start($value);
                break;
            case "home_html":
                display_home_html();
                break;
            case "text":
                display_text($value);
                break;
            case "multitext":
                display_multitext($value);
                break;
            case "textarea":
                display_textarea($value);
                break;
            case "image":
                display_image($value);
                break;
            case "checkbox":
                display_checkbox($value);
                break;
            case "radio":
                display_radio($value);
                break;
            case "radio_img":
                display_radio_img($value);
                break;
            case "color_picker":
                display_color_picker($value);
                break;
            case "select":
                display_select($value);
                break;
            case "checkbox_array_values":
                display_checkbox_array_values($value);
                break;
            case "html":
                display_html($value);
                break;
            case "options_group_end":
                display_options_group_end($value);
                break;
            case "section_end":
                display_section_end($value);
                break;
        }
    }
}
    $layer['Datum der Registrierung'] = "Keine Angabe";
}
$featuretype['Registrierende Stelle'] = $row_dep['mb_group_name'];
$featuretype['WFS ID'] = $row['wfs_id'];
$featuretype['WFS Titel'] = $row['wfs_title'];
$featuretype['WFS Zusammenfassung'] = $row['wfs_abstract'];
$featuretype['Geb&uuml;hren'] = $row['fees'];
$featuretype['Zugriffsbeschr&auml;nkung'] = $row['accessconstraints'];
$featuretype['Ansprechpartner'] = $row['individualname'];
$featuretype['Organisation'] = $row['providername'];
$featuretype['Adresse'] = $row['deliverypoint'];
$featuretype['Stadt'] = $row['city'];
$featuretype['PLZ'] = $row['postalcode'];
$featuretype['Telefon'] = $row['voice'];
$featuretype['Fax'] = $row['facsimile'];
$featuretype['E-Mail'] = $row['electronicmailaddress'];
$featuretype['Land'] = $row['country'];
echo "<table >\n";
$t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
$t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
$t_c = "\n\t\t</td>\n\t</tr>\n";
$keys = array_keys($featuretype);
for ($j = 0; $j < count($featuretype); $j++) {
    echo $t_a . utf8_encode($keys[$j]) . $t_b . display_text($featuretype[$keys[$j]]) . $t_c;
}
echo "</td></tr></table>\n";
?>

	</body>
</html>
    $layer['Datum der Registrierung'] = date("d.m.Y", $row_wfs['wfs_timestamp']);
} else {
    $layer['Datum der Registrierung'] = "Keine Angabe";
}
$wfs['Registrierende Stelle'] = $row_dep['mb_group_name'];
$wfs['Geb&uuml;hren'] = $row_wfs['fees'];
$wfs['Zugriffsbeschr&auml;nkung'] = $row_wfs['accessconstraints'];
$wfs['Ansprechpartner'] = $row_wfs['individualname'];
$wfs['Organisation'] = $row_wfs['providername'];
$wfs['Adresse'] = $row_wfs['deliverypoint'];
$wfs['Stadt'] = $row_wfs['city'];
$wfs['PLZ'] = $row_wfs['postalcode'];
$wfs['Telefon'] = $row_wfs['voice'];
$wfs['Fax'] = $row_wfs['facsimile'];
$wfs['E-Mail'] = $row_wfs['electronicmailaddress'];
$wfs['Land'] = $row_wfs['country'];
echo "<table class='contenttable-0-wide'>\n";
$t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
$t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
$t_c = "\n\t\t</td>\n\t</tr>\n";
$keys = array_keys($wfs);
for ($j = 0; $j < count($wfs); $j++) {
    echo $t_a . utf8_encode($keys[$j]) . $t_b . display_text($wfs[$keys[$j]]) . $t_c;
}
echo "</td></tr></table>\n";
?>
	</div>
	<div></div>
	</body>
</html>
            }
            $accessConstraints .= display_text($row['accessconstraints']);
            echo "<h2>" . $htmlHeader['accessConstraintsHeader'] . "</h2>";
            echo $accessConstraints . "<br>";
        }
        if (isset($row['termsofuse_id']) or strtoupper($row['fees']) != "NONE" & str_replace(" ", "", $row['fees']) != "" or $type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) {
            echo "<h2>" . $htmlHeader['feesHeader'] . "</h2>";
            if (isset($row['termsofuse_id'])) {
                $fees = $htmlHeader['licences'];
                #$fees .= $row['name']."<br>";
                $fees .= "<a href='" . $row['descriptionlink'] . "' target=_blank><img src='" . $row['symbollink'] . "' " . $row['name'] . "></a><br>";
                $fees .= $row['description'] . "<br>";
                echo $fees . "<br>";
            } else {
                if (isset($row['fees']) & (strtoupper($row['fees']) != 'NONE' or $row['fees'] != '')) {
                    $fees = display_text($row['fees']);
                    echo $fees . "<br>";
                }
            }
            if ($type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) {
                $priceExample = (int) $row['wms_pricevolume'] * 400 * 600 / 100000000;
                $priceInformation = $htmlHeader['priceInformation'][0] . (int) $row['wms_pricevolume'];
                $priceInformation .= $htmlHeader['priceInformation'][1] . $htmlHeader['priceInformation'][2] . $priceExample . $htmlHeader['priceInformation'][3] . " <a href=\"mailto:" . $rowOwner['mb_user_email'] . "\">" . $rowOwner['mb_user_email'] . "</a><br>";
                echo $priceInformation . "<br>";
            }
        }
    }
} else {
    /*//if nothing about restrictions is defined
    	if ($asTable){
    		echo $tableBegin;