コード例 #1
0
    ?>
" />
    <table width="1" border="0" cellpadding="0" cellspacing="0" >
      <tr>
        <td>
    <?php 
    //Chinh dong LICH va XEM
    if ($cal->get_authorised_calendars($GO_SECURITY->user_id)) {
        $db = new db();
        $db->query("SELECT calendar_id FROM cal_config WHERE user_id='" . $GO_SECURITY->user_id . "'");
        while ($db->next_record()) {
            $subscribed[] = $db->f('calendar_id');
        }
        echo '<table border="0"><tr><td><h3>' . $sc_calendar . ':</h3></td><td>';
        $dropbox = new dropbox();
        $dropbox->add_optgroup($sc_calendars);
        #$dropbox->add_sql_data("cal","id","name");
        while ($cal->next_record()) {
            if (!isset($subscribed)) {
                $dropbox->add_value('calendar:' . $cal->f('id'), $cal->f('name'));
            } else {
                if (in_array($cal->f('id'), $subscribed)) {
                    $dropbox->add_value('calendar:' . $cal->f('id'), $cal->f('name'));
                }
            }
        }
    }
    if ($cal->get_authorised_views($GO_SECURITY->user_id)) {
        $db = new db();
        $db->query("SELECT view_id FROM cal_view_subscriptions WHERE user_id='" . $GO_SECURITY->user_id . "'");
        while ($db->next_record()) {