Esempio n. 1
0
<?php

$NETCAT_FOLDER = realpath(dirname(__FILE__) . '/../../../../') . DIRECTORY_SEPARATOR;
require_once $NETCAT_FOLDER . 'vars.inc.php';
require_once $ADMIN_FOLDER . 'function.inc.php';
require_once $ADMIN_FOLDER . "catalogue/function.inc.php";
$favorites = array();
$catalogues = array();
if ($perm->isAccessSiteMap() || $perm->isGuest()) {
    $sub_ids = array();
    $all_favorites = GetFavorites();
    if (!empty($all_favorites)) {
        foreach ($all_favorites as $i => $row) {
            $row['link'] = 'subdivision/SubClass.php?phase=1&SubdivisionID=' . $row['Subdivision_ID'];
            $favorites[$row['Catalogue_ID']][$row['Subdivision_ID']] = $row;
            $catalogues[$row['Catalogue_ID']] = array('checked' => $row['CatalogueChecked'], 'name' => $row['Catalogue_Name'], 'link' => 'subdivision/full.php?CatalogueID=' . $row['Catalogue_ID'], 'domain_error' => checkDomain($row['Domain'], $row['Catalogue_ID'], true));
            $sub_ids[$row['Subdivision_ID']] = $row['Subdivision_ID'];
        }
        $result = $db->get_results("SELECT Sub_Class_ID, Subdivision_ID\n                    FROM Sub_Class\n                    WHERE Subdivision_ID IN (" . implode(', ', $sub_ids) . ") ORDER BY Priority");
    }
    $subclass_link = array();
    if (!empty($result)) {
        foreach ($result as $row) {
            // пропускаем 2,3,... компоненты
            if (isset($sub_classes[$row->Subdivision_ID])) {
                continue;
            }
            $subclass_link[$row->Subdivision_ID] = 'http://' . $EDIT_DOMAIN . $SUB_FOLDER . $HTTP_ROOT_PATH . '?inside_admin=1&cc=' . $row->Sub_Class_ID;
        }
    }
}
Esempio n. 2
0
        if (file_exists($MODULE_FOLDER . $module['Keyword'] . "/" . MAIN_LANG . ".lang.php")) {
            require_once $MODULE_FOLDER . $module['Keyword'] . "/" . MAIN_LANG . ".lang.php";
        } else {
            require_once $MODULE_FOLDER . $module['Keyword'] . "/en.lang.php";
        }
    }
}
include $ADMIN_FOLDER . "modules/module_list.inc.php";
?>

    </head>


    <body class='admin_form' style='margin: 0px;'>
        <?php 
$favorites = GetFavorites();
$nc_settings = $nc_core->get_settings();
if ($nc_settings['InstallationID']) {
    echo "<table border='0' width=100% id='main_page_table'><tr><td>";
    if ($nc_settings['ProductNumber'] && $nc_settings['Code']) {
        $text = sprintf(TOOLS_ACTIVATION_REMIND_UNCOMPLETED, $ADMIN_PATH . '/patch/activation.php');
        echo nc_print_status($text, 'info', null, true);
    } else {
        $text = str_replace("%DAY", intval((strtotime($nc_settings['InstallationDateOut']) - time()) / 86400 + 1), TOOLS_ACTIVATION_DAY);
        echo nc_print_status($text, 'error', null, true);
    }
    echo "</td></tr></table>";
}
echo "<table border='0' width=100% id='main_page_table'>\n";
echo "<tr>\n";
echo "<td width=48%>\n";
Esempio n. 3
0
function ShowFavorites()
{
    global $db, $UI_CONFIG, $nc_core;
    global $EDIT_DOMAIN, $HTTP_ROOT_PATH, $DOMAIN_NAME;
    global $loc, $perm, $ADMIN_PATH, $ADMIN_TEMPLATE, $SUB_FOLDER;
    $favorites = GetFavorites('OBJECT');
    if ($favorites) {
        $totrows = $db->num_rows;
        ?>
        <form method='post' action='favorites.php'>
            <table border='0' cellpadding='0' cellspacing='0' width='100%'>
                <tr>
                    <td>
                        <table class='admin_table' width='100%'>
                            <tr>
                                <th>ID</th>
								<th width='100%'><?php 
        echo CONTROL_CONTENT_SUBDIVISION_FUNCS_SECTION;
        ?>
</th>
								<th><?php 
        echo CONTROL_CONTENT_SUBDIVISION_FUNCS_SUBSECTIONS;
        ?>
</th>
								<th class='align-center'><?php 
        echo CONTROL_CONTENT_SUBDIVISION_FUNCS_GOTO;
        ?>
</th>
								<td class='align-center'><div class='icons icon_delete' title='<?php 
        echo CONTROL_CONTENT_SUBDIVISION_FUNCS_DELETE;
        ?>
'></div></td>
							</tr>

		<?php 
        $temp_group = "";
        foreach ($favorites as $Array) {
            if ($temp_group != $Array->Catalogue_ID) {
                print "<tr><td'><br></td><td colspan=5><a href=" . $ADMIN_PATH . "subdivision/full.php?CatalogueID=" . $Array->Catalogue_ID . " title='" . CONTROL_CONTENT_CATALOUGE_ONESITE . "'>" . (!$Array->CatalogueChecked ? "" : "") . $Array->Catalogue_Name . (!$Array->CatalogueChecked ? "" : "") . "</a></td></tr>";
            }
            print "<tr>\n                     <td>" . $Array->Subdivision_ID . "</td>\n                     <td><a href=\"index.php?phase=4&SubdivisionID=" . $Array->Subdivision_ID . "\">" . (!$Array->SubChecked ? "" : "") . $Array->Subdivision_Name . "</a></td>\n                     <td><a href=index.php?phase=1&ParentSubID=" . $Array->Subdivision_ID . ">" . (!$Array->SubChecked ? "" : "") . (!ChildrenNumber($Array->Subdivision_ID) ? CONTROL_CONTENT_SUBDIVISION_FUNCS_NONE : CONTROL_CONTENT_SUBDIVISION_FUNCS_LIST . " (" . ChildrenNumber($Array->Subdivision_ID) . ")") . "</a></td>\n                     <td align=center nowrap><a href=index.php?phase=5&SubdivisionID=" . $Array->Subdivision_ID . "><div class='icons icon_settings' title='" . CONTROL_CONTENT_SUBDIVISION_FUNCS_TOOPTIONS . "'></div></a>" . (!GetSubClassCount($Array->Subdivision_ID) ? "<img src=" . $ADMIN_TEMPLATE . "img/px.gif width=16 height=16 style='margin:0px 2px 0px 2px;'>" : "<a target=_blank href=http://" . $EDIT_DOMAIN . $HTTP_ROOT_PATH . "?catalogue=" . $Array->Catalogue_ID . "&sub=" . $Array->Subdivision_ID . (session_id() ? "?" . session_name() . "=" . session_id() : "") . "><div class='icons icon_pencil' title='" . CONTROL_CONTENT_SUBDIVISION_FUNCS_TOEDIT . "'></div></a>") . "<a href=" . nc_subdivision_preview_link($Array) . " target=_blank><div class='icons icon_preview' title='" . CONTROL_CONTENT_SUBDIVISION_FUNCS_TOVIEW . "'></div></a></td>\n                     <td align=center>" . nc_admin_checkbox_simple("Delete[" . $Array->Subdivision_ID . "]", $Array->Subdivision_ID) . "</td>\n\n                   </tr>\n";
            $temp_group = $Array->Catalogue_ID;
        }
        ?>
                                                                        </table>
                                                                        </td>
                                                                        </tr>
                                                                        </table>
                                                                        <input type='hidden' name='phase' value='6'>
                                                                        <input type='submit' class='hidden'>
                                                                        <?php 
        echo $nc_core->token->get_input();
        ?>
                                                                        </form>
                                                                        <?php 
        $UI_CONFIG->actionButtons[] = array("id" => "delete", "caption" => NETCAT_ADMIN_DELETE_SELECTED, "action" => "mainView.submitIframeForm()", "align" => "left", "red_border" => true);
    } else {
        nc_print_status(CONTROL_CONTENT_SUBDIVISION_FUNCS_NOONEFAVORITES, 'info');
    }
    $UI_CONFIG->actionButtons[] = array("id" => "submit", "caption" => CONTROL_CONTENT_SUBDIVISION_FUNCS_ADDSECTION, "action" => "window.open('" . $ADMIN_PATH . "subdivision/favorites.php?phase=4','LIST','top=50, left=100,directories=no,height=600,location=no,menubar=no,resizable=no,scrollbars=yes,status=yes,toolbar=no,width=400')");
}