Ejemplo n.º 1
0
/**
 * Function recursively check if $needle is present in $haystack
 *
 * @param mixed $needle
 * @param array $haystack
 * @return boolean
 */
function rcms_in_array_recursive($needle, $haystack)
{
    foreach ($haystack as $value) {
        if (is_array($value)) {
            return rcms_in_array_recursive($needle, $value);
        } else {
            return in_array($needle, $haystack);
        }
    }
}
Ejemplo n.º 2
0
        }
    }
}
foreach ($skin['menu_point'] as $column => $text) {
    if (!isset($current['/' . $column])) {
        $unused['/' . $column] = __('Column') . ': ' . $text;
    }
}
foreach ($system->modules['menu'] as $menu => $data) {
    if (!rcms_in_array_recursive(' > ' . $data['title'], $current)) {
        $unused[$menu] = ' > ' . $data['title'];
    }
}
$ucms = ucm_list();
foreach ($ucms as $menu => $data) {
    if (!rcms_in_array_recursive(' > ucm:' . $menu, $current)) {
        $unused['ucm:' . $menu] = ' > ucm:' . $menu;
    }
}
?>
<script language="javascript" src="<?php 
echo ADMIN_PATH;
?>
slmv.js"></script>
<form name="form1" onsubmit="on_submit_prepare(document.form1.elements['menus[]'])" action="" method="POST">
<input type="hidden" name="save" value="1">
<table cellpadding="2" cellspacing="1" border="0" align="center" width="100%">
<tr>
    <td valign="top" align="center" class='row1' width="45%">
        <select name="menus[]" size="15" style="width:100%" multiple>
            <?php 
Ejemplo n.º 3
0
function user_check_email_in_cache($username, $email, &$cache)
{
    if (!isset($cache) || !is_array($cache)) {
        if (!is_file(DATA_PATH . 'users.cache.dat')) {
            $cache = array();
        } else {
            $cache = @unserialize(@file_get_contents(DATA_PATH . 'users.cache.dat'));
        }
    }
    if (empty($cache['mails'])) {
        return true;
    }
    return !rcms_in_array_recursive($email, $cache['mails']);
}
Ejemplo n.º 4
0
        }
    }
}
foreach ($skin['menu_point'] as $column => $text) {
    if (!isset($current['/' . $column])) {
        $unused['/' . $column] = '<b>' . __('Column') . ': ' . $text . '</b>';
    }
}
foreach ($system->modules['menu'] as $menu => $data) {
    if (!rcms_in_array_recursive($subm . $data['title'], $current)) {
        $unused[$menu] = $subm . $data['title'];
    }
}
$ucms = ucm_list();
foreach ($ucms as $menu => $data) {
    if (!rcms_in_array_recursive($subm . 'ucm:' . $menu, $current)) {
        $unused['ucm:' . $menu] = $subm . 'ucm:' . $menu;
    }
}
?>
<style>
#menus, #unused {
	height:200px;
	overflow-y:auto;
}

#menus li, #unused li {
    font-size: 1.1em;
    margin: 0 3px 3px;
    padding: 3px;
	list-style-type: none;