function struct_select_menu($counter = 0, $struct_id = 0, $selected_id = 0, $return = 'option')
{
    $struct_id = intval($struct_id);
    $selected_id = intval($selected_id);
    $counter = intval($counter) + 1;
    if ($return == 'array') {
        $structure = array();
    }
    $sql = "SELECT acat_id, acat_name, acat_aktiv, acat_regonly, acat_opengraph FROM " . DB_PREPEND . "phpwcms_articlecat WHERE acat_trash=0 AND acat_struct=" . $struct_id . " ORDER BY acat_sort";
    if ($result = mysql_query($sql, $GLOBALS['db']) or die("error while building struct select menu (ID:" . $struct_id)) {
        $sx = 0;
        while ($row = mysql_fetch_assoc($result)) {
            $row['acat_name'] = str_repeat('-', $counter) . ' ' . $row['acat_name'];
            $struct[$sx] = $row;
            $sx++;
        }
        mysql_free_result($result);
    }
    if (isset($struct[0])) {
        foreach ($struct as $value) {
            if ($return == 'array') {
                $structure[$value["acat_id"]] = $value["acat_name"];
                $substruct = struct_select_menu($counter, $value["acat_id"], 0, 'array');
                if (count($substruct)) {
                    $structure += $substruct;
                }
            } else {
                $value["acat_name"] = html($value["acat_name"]);
                if (!$value["acat_aktiv"] || $value["acat_regonly"]) {
                    $value['status'] = array();
                    if (!$value["acat_aktiv"]) {
                        $value['status'][] = $GLOBALS['BL']['be_inactive'];
                    }
                    if ($value["acat_regonly"]) {
                        $value['status'][] = $GLOBALS['BL']['be_locked'];
                    }
                    if (count($value['status'])) {
                        $value["acat_name"] .= ' (' . implode(', ', $value['status']) . ')';
                    }
                }
                echo '<option value="', $value["acat_id"], '"';
                if ($selected_id == $value["acat_id"]) {
                    define('ACAT_OPENGRAPH_STATUS', empty($value["acat_opengraph"]) ? false : true);
                    echo ' selected="selected"';
                }
                echo '>', $value["acat_name"], '</option>', LF;
                struct_select_menu($counter, $value["acat_id"], $selected_id, 'option');
            }
        }
    }
    if ($return == 'array') {
        return $structure;
    }
}
Ejemplo n.º 2
0
				<td width="88"><img src="img/leer.gif" alt="" width="88" height="4" /></td>
				<td width="450"><img src="img/leer.gif" alt="" width="450" height="1" /></td>
			</tr>
			<tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
      		<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>

		  	<tr>
				<td align="right" class="chatlist"><?php 
echo $BL['be_article_cat'];
?>
:&nbsp;</td>
				<td><select name="article_cid" id="article_cid" class="width325">
				<?php 
//keine definierte Kategorie = allgemeine Artikelkategorie
echo '<option value="0"' . (!$article["article_catid"] ? ' selected="selected"' : '') . ">" . $BL['be_admin_struct_index'] . "</option>\n";
struct_select_menu(0, 0, $article["article_catid"]);
?>
				</select></td>
			</tr>

			<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr>

			<tr>
				<td align="right" class="chatlist"><a href="#" id="cat-as-articletitle"><?php 
echo $BL['be_article_atitle'];
?>
</a>:&nbsp;</td>
				<td style="padding:2px 0 3px 0;"><table border="0" cellpadding="0" cellspacing="0" summary="">
				 <tr>
					<td><input name="article_title" type="text" class="f11b" id="article_title" style="width: 325px" value="<?php 
echo html($article["article_title"]);
Ejemplo n.º 3
0
	<td>&nbsp;</td>
    <td class="tdtop3 tdbottom5"><strong><?php 
echo $BL['be_cnt_sitecurrent'];
?>
</strong></td>
  </tr>
  <tr>
    <td><input name="calist_cat" type="radio" value="1" <?php 
is_checked(1, intval($content["alist"]["cat"]));
?>
></td>
	<td>&nbsp;</td>
    <td><select name="calist_catid" class="width325">
<?php 
echo "<option value='0'" . (!$content["alist"]["catid"] ? " selected" : "") . ">" . $BL['be_admin_struct_index'] . "</option>\n";
struct_select_menu(0, 0, $content["alist"]["catid"]);
?>
</select></td>
  </tr>

</table></td>
</tr>

<tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>

<tr>
<td class="chatlist tdtop4" align="right" valign="top"><?php 
echo $BL['be_show_content'];
?>
:&nbsp;</td>
<td colspan="6"><table border="0" cellpadding="0" cellspacing="0" summary="">
Ejemplo n.º 4
0
    echo '<img src="' . $content["sitemap"]["articleimg"] . '" border="0">';
}
?>
</td></tr></table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8"></td></tr>

<tr>
	<td align="right" class="chatlist"><?php 
echo $BL['be_cnt_sitemap_startid'];
?>
:&nbsp;</td>
	<td><select name="csitemap_startid" id="csitemap_startid" class="width325">
<?php 
echo "<option value='0'" . (!$content["sitemap"]["startid"] ? " selected" : "") . ">" . $BL['be_admin_struct_index'] . "</option>\n";
struct_select_menu(0, 0, $content["sitemap"]["startid"]);
?>
</select></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6"></td></tr>

<tr>
  <td align="right" class="chatlist"><?php 
echo $BL['be_cnt_sitemap_display'];
?>
:&nbsp;</td>
  <td valign="top"><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB" summary="">
  <tr>
  	<td><input name="csitemap_display" id="csitemap_display0" type="radio" value="0" <?php 
is_checked(0, $content["sitemap"]["display"]);
?>
Ejemplo n.º 5
0
<?php

// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
    die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// set fields SBW gas rates
$plugin['fields'] = array('cnt_name' => 'STRING', 'cnt_text' => 'STRING', 'cnt_object-structure_level_id' => 'SELECT', 'cnt_object-article_template_detail' => 'SELECT', 'cnt_object-article_template_list' => 'SELECT', 'cnt_object-image_folder_id' => 'SELECT', 'cnt_object-image_url_replace' => 'STRING', 'cnt_object-feed_cache' => 'CHECK', 'cnt_object-feed_cache_timeout' => 'SELECT', 'cnt_object-activate_after_import' => 'CHECK', 'cnt_object-author_id' => 'SELECT', 'cnt_object-author_name' => 'STRING', 'cnt_object-source_link_add' => 'CHECK', 'cnt_object-source_link_text' => 'STRING', 'cnt_object-import_status_email' => 'STRING', 'cnt_status' => 'CHECK', 'cnt_prio' => 'HIDDEN');
$plugin['id'] = isset($_GET['edit']) ? intval($_GET['edit']) : 0;
$plugin['fields_cnt_object-structure_level_id'] = array('-2' => $BLM['cnt_object-structure_empty'], '-1' => ' ', 0 => $BL['be_admin_struct_index']) + struct_select_menu(0, 0, 0, 'array');
$plugin['fields_cnt_object-article_template_detail'] = feedimport_article_templates(PHPWCMS_TEMPLATE . 'inc_cntpart/articlesummary/article');
$plugin['fields_cnt_object-article_template_list'] = feedimport_article_templates(PHPWCMS_TEMPLATE . 'inc_cntpart/articlesummary/list');
$plugin['fields_cnt_object-author_id'] = feedimport_article_authors();
$plugin['fields_cnt_object-image_folder_id'] = feedimport_filestorage_dirlist();
$plugin['fields_cnt_object-feed_cache_timeout'] = array(60 => '1 ' . $BL['be_date_minute'], 300 => '5 ' . $BL['be_date_minutes'], 900 => '15 ' . $BL['be_date_minutes'], 1800 => '30 ' . $BL['be_date_minutes'], 3600 => '1 ' . $BL['be_date_hour'], 14400 => '4 ' . $BL['be_date_hours'] . ' (' . $BL['be_admin_tmpl_default'] . ')', 43200 => '12 ' . $BL['be_date_hours'], 86400 => '1 ' . $BL['be_date_day'], 172800 => '2 ' . $BL['be_date_days'], 604800 => '1 ' . $BL['be_date_week'], 1209600 => '2 ' . $BL['be_date_weeks'], 2592000 => '1 ' . $BL['be_date_month']);
// process post form
if (isset($_POST['cnt_name'])) {
    $plugin['data'] = array('id' => intval($_POST['id']), 'ref' => MODULE_KEY);
    foreach ($plugin['fields'] as $key => $value) {
        switch ($value) {
            case 'RADIO':
            case 'HIDDEN':
            case 'TEXTAREA':
            case 'SELECT':
            case 'STRING':
                $plugin['data'][$key] = isset($_POST[$key]) ? clean_slweg($_POST[$key]) : '';
                break;
            case 'CHECK':
                $plugin['data'][$key] = empty($_POST[$key]) ? 0 : 1;