<?php
include("postget.php");
include_once("common.php");
$pagetitle = _ENABLE_AND_DISABLE_MODULES;

checklevel(4, $_REQUEST['clientid']);
if ($config[56][1] == 1) {
    $disabled = " disabled ";
    $mensaje = " " . _CHANGE_NOT_ALLOWED_IN_DEMO_MODE;
} else {
    $disabled = " ";
    $mensaje = "";
}


if ($sendclick == "" . _SEND . "") {

    if ($X641 == "on") {
        $X641 = 1;
    } else {
        $X641 = 0;
    }
    if ($X651 == "on") {
        $X651 = 1;
    } else {
        $X651 = 0;
    }
    if ($X671 == "on") {
        $X671 = 1;
    } else {
        $X671 = 0;
    }
    if ($X681 == "on") {
        $X681 = 1;
    } else {
        $X681 = 0;
    }
    if ($X691 == "on") {
        $X691 = 1;
    } else {
        $X691 = 0;
    }
    if ($X711 == "on") {
        $X711 = 1;
    } else {
        $X711 = 0;
    }

    if ($X642 == "on") {
        $X642 = 1;
    } else {
        $X642 = 0;
    }
    if ($X652 == "on") {
        $X652 = 1;
    } else {
        $X652 = 0;
    }
    if ($X672 == "on") {
        $X672 = 1;
    } else {
        $X672 = 0;
    }
    if ($X682 == "on") {
        $X682 = 1;
    } else {
        $X682 = 0;
    }
    if ($X692 == "on") {
        $X692 = 1;
    } else {
        $X692 = 0;
    }
    if ($X712 == "on") {
        $X712 = 1;
    } else {
        $X712 = 0;
    }


    mysql_query("UPDATE hd_config SET valor='$X641.$X642' WHERE ref='64'", $db_link);
    mysql_query("UPDATE hd_config SET valor='$X651.$X652' WHERE ref='65'", $db_link);
    mysql_query("UPDATE hd_config SET valor='$X671.$X672' WHERE ref='67'", $db_link);
    mysql_query("UPDATE hd_config SET valor='$X681.$X682' WHERE ref='68'", $db_link);
    mysql_query("UPDATE hd_config SET valor='$X691.$X692' WHERE ref='69'", $db_link);
    mysql_query("UPDATE hd_config SET valor='$X711.$X712' WHERE ref='71'", $db_link);


    messagetop(_THE_CHANGES_WHERE_MADE_SUCCESSFULLY, '', 'preferences12.php', 1);
}


$query = "SELECT * FROM hd_config ORDER BY ref";
$result = mysql_query($query, $db_link);
$fila = 0;
while ($row = mysql_fetch_array($result)) {
    $Config[$fila][0] = $row["variable"];
    $Config[$fila][1] = "'" . $row["valor"] . "'";
    $Config[$fila][1] = $row["valor"];
    $fila++;
}


include("head_template.php");
?>
<div class="container">
    <div class="row">

        <form method='POST'>

            <table class="table">
                <tr>

                    <td width='50%' valign='top'>

                        <table class="table table-bordered">
                            <tr>
                                <td align="center" width="100%" class="btn-info">

                                    <?php print "<b>". lang('_FOR') . " " . (lang('-_UNREGISTERED_USER'))."</b>"; ?>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    <?php print("" . _ENABLE_DISABLE . ""); ?>
                                </td>
                            </tr>

                            <tr>	
                                <td>
                                    <input type="checkbox" name=X681
                                    <?php
                                    if (substr($Config[68][1], 0, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                           >

                                    <?php print('<b>' . ucfirst(_menu_ANNOUNCEMENTS) . '</b>
						<br><font size=1>' . ucfirst(_menu_ANNOUNCEMENTS_DESCRIPTION) . '</font>') ?>

                                </td>
                            </tr>


                            <tr>
                                <td align="center"><input type="checkbox" name=X641
                                    <?php
                                    if (substr($Config[64][1], 0, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >

                                    <?php print('<b>' . ucfirst(_menu_TICKETS) . '</b>
						<br><font size=1>' . ucfirst(_menu_TICKETS_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>



                            <tr>	
                                <td align="center"><input type="checkbox" name=X671
                                    <?php
                                    if (substr($Config[67][1], 0, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >

                                    <?php print('<b>' . ucfirst(_menu_FAQ) . '</b>
						<br><font size=1>' . ucfirst(_menu_FAQ_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>



                            <tr>	
                                <td align="center"><input type="checkbox" name=X711
                                    <?php
                                    if (substr($Config[71][1], 0, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >

                                    <?php print('<b>' . ucfirst(_menu_MANUALS) . '</b>
						<br><font size=1>' . ucfirst(_menu_MANUALS_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>




                            <tr>	
                                <td align="center"><input type="checkbox" name=X691
                                    <?php
                                    if (substr($Config[69][1], 0, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >

                                    <?php print('<b>' . ucfirst(_menu_DOWNLOADS) . '</b>
						<br><font size=1>' . ucfirst(_menu_DOWNLOADS_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>


                            <tr>	
                                <td align="center"><input type="checkbox" name=X651
                                    <?php
                                    if (substr($Config[65][1], 0, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >

                                    <?php print('<b>' . ucfirst(_menu_CONTACT) . '</b>
						<br><font size=1>' . ucfirst(_menu_CONTACT_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <?php print("<hr><a href='" . $serverurl . "/languages.php?original=_menu_'>" . ucfirst(_EDIT_TITLES_AND_DESCRIPTIONS) . "</a>");
                                    ?>
                                </td>
                            </tr>
                        </table>



                        <!--///////////////////////////////////////////////////////////////////////////////////////////////////////////////-->


                    <td width='50%' valign='top'>


                        <table class="table table-bordered">
                            <tr>
                                <td align="center" width="100%" class="btn-info">

                                    <?php print "<b>". lang('_FOR') . " " . (lang('-_CLIENT_ALREADY_REGISTERED'))."</b>"; ?>
                                </td>	
                            </tr>

                            <tr valign="top">
                                <td>
                                    <?php print("" . _ENABLE_DISABLE . ""); ?>
                                </td>
                            </tr>
                            <tr>	
                                <td align="center"><input type="checkbox" name=X682
                                    <?php
                                    if (substr($Config[68][1], 2, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >

                                    <?php print('<b>' . ucfirst(_menu_ANNOUNCEMENTS) . '</b>
						<br><font size=1>' . ucfirst(_menu_ANNOUNCEMENTS_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>


                            <tr>	
                                <td align="center"><input type="checkbox" name=X642
                                    <?php
                                    if (substr($Config[64][1], 2, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >

                                    <?php print('<b>' . ucfirst(_menu_TICKETS) . '</b>
						<br><font size=1>' . ucfirst(_menu_TICKETS_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>



                            <tr>	
                                <td align="center"><input type="checkbox" name=X672
                                    <?php
                                    if (substr($Config[67][1], 2, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >
                                                          <?php print('<b>' . ucfirst(_menu_FAQ) . '</b>
						<br><font size=1>' . ucfirst(_menu_FAQ_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>




                            <tr>
                                <td align="center"><input type="checkbox" name=X712
                                    <?php
                                    if (substr($Config[71][1], 2, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >
                                                          <?php print('<b>' . ucfirst(_menu_MANUALS) . '</b>
						<br><font size=1>' . ucfirst(_menu_MANUALS_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>





                            <tr>
                                <td align="center"><input type="checkbox" name=X692
                                    <?php
                                    if (substr($Config[69][1], 2, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >
                                                          <?php print('<b>' . ucfirst(_menu_DOWNLOADS) . '</b>
						<br><font size=1>' . ucfirst(_menu_DOWNLOADS_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>


                            <tr>
                                <td align="center"><input type="checkbox" name=X652
                                    <?php
                                    if (substr($Config[65][1], 2, 1) == '1') {
                                        print(" checked");
                                        $colorimg = '';
                                    } else {
                                        $colorimg = '2';
                                    };
                                    ?>
                                                          >
                                                          <?php print('<b>' . ucfirst(_menu_CONTACT) . '</b>
						<br><font size=1>' . ucfirst(_menu_CONTACT_DESCRIPTION) . '</font>'); ?>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <?php
                                    print("<hr><a href='" . $serverurl . "/languages.php?original=_menu_'>" . ucfirst(_EDIT_TITLES_AND_DESCRIPTIONS) . "</a>");
                                    ?>
                                </td>
                            </tr>
                        </table>


            </table>

            <?php
            print("<input type=submit name=sendclick value=" . _SEND . " $disabled>$mensaje</form>");
            ?>
    </div>
</div>

<?php
include("foot_template.php");
?>