예제 #1
0
 public function show_html()
 {
     $sections = array('chamilo', 'php', 'database', 'webserver', 'paths');
     $currentSection = isset($_GET['section']) ? $_GET['section'] : 'chamilo';
     if (!in_array(trim($currentSection), $sections)) {
         $currentSection = 'chamilo';
     }
     $html = '<div class="tabbable"><ul class="nav nav-tabs">';
     foreach ($sections as $section) {
         if ($currentSection === $section) {
             $html .= '<li class="active">';
         } else {
             $html .= '<li>';
         }
         $params['section'] = $section;
         $html .= '<a href="system_status.php?section=' . $section . '">' . get_lang($section) . '</a></li>';
     }
     $html .= '</ul><div class="tab-pane">';
     $data = call_user_func(array($this, 'get_' . $currentSection . '_data'));
     echo $html;
     if ($currentSection != 'paths') {
         $table = new SortableTableFromArray($data, 1, 100);
         $table->set_header(0, '', false);
         $table->set_header(1, get_lang('Section'), false);
         $table->set_header(2, get_lang('Setting'), false);
         $table->set_header(3, get_lang('Current'), false);
         $table->set_header(4, get_lang('Expected'), false);
         $table->set_header(5, get_lang('Comment'), false);
         $table->display();
     } else {
         $headers = $data['headers'];
         $results = $data['data'];
         $table = new HTML_Table(array('class' => 'data_table'));
         $column = 0;
         foreach ($headers as $header) {
             $table->setHeaderContents(0, $column, $header);
             $column++;
         }
         $row = 1;
         foreach ($results as $index => $rowData) {
             $table->setCellContents($row, 0, $rowData);
             $table->setCellContents($row, 1, $index);
             $row++;
         }
         echo $table->display();
     }
     echo '</div></div>';
 }
예제 #2
0
    function getTable($res, $width = '850', $obj = '')
    {
        $extra_table_attr = array('width' => $width);
        $tbl = new HTML_Table(get_class($this), 'display', 0, 0, 2, $extra_table_attr);
        $frm = new HTML_Form();
        $kk_trick = array();
        $tbl->addRow('', $kk_trick, '<tfoot>');
        $tbl->addCell(tableFooter($obj), NULL, 'data', array('colspan' => '5'));
        $tbl->addRow('main_table');
        $tbl->addCell($frm->addInput('checkbox', 'checkboxall', '', array('class' => 'check-all')), 'first', 'header');
        $tbl->addCell('Location', null, 'header');
        $tbl->addCell('Time on site', null, 'header');
        $tbl->addCell('User', null, 'header');
        $tbl->addCell('On-Page', null, 'header');
        $tbl->addCell('Referer', null, 'header');
        $tbl->addCell('', null, 'header');
        if ($res) {
            $objGeoIP = new GeoIP();
            while ($res->fetch($res)) {
                $objGeoIP->search_ip($res->ip);
                if ($objGeoIP->found()) {
                    $country = $objGeoIP->getCountryName();
                } else {
                    $country = $res->ip;
                }
                $check_this = $frm->addInput('checkbox', 'check_row[]', $res->id, array('id' => 'check_row[]'));
                $tbl->addRow($class);
                $tbl->addCell($check_this);
                $tbl->addCell('<a href="http://www.geoiptool.com/es/?IP=' . $res->ip . '" target="_blank">' . $country . '</a>');
                $tbl->addCell(round(($res->hora - $res->conected_from) / 60, 2) . ' Min.');
                $tbl->addCell($res->user != '' ? $res->user : '******');
                $tbl->addCell('<a href="http://www.' . $web->domain . $res->page . '" target="_blank">' . $res->page . '</a>');
                $tbl->addCell('<a href="' . $res->referer . '" target="_blank">' . substr($res->referer, 0, 20) . '</a>');
                $tbl->addCell('<a href="admin-generic-edit.php?id=' . $res->id . '&fld=' . strtolower(get_class()) . '">
									<img src="/template/kadmin/images/icons/pencil.png" alt="Edit" />
									</a>&nbsp;&nbsp;&nbsp;
									<a href="admin-generic-list.php?id=' . $res->id . '&fld=' . strtolower(get_class()) . '&action=delete" 
											onClick="return confirmDel();">
									<img src="/template/kadmin/images/icons/cross.png" alt="Delete" />
									</a>');
            }
        }
        return $tbl->display();
    }
예제 #3
0
            <li><a href="<?php 
echo SITE_ROOT;
?>
"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">General Ledger</a></li>
            <li class="active">List Fiscal Years</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">

 <!-- Default box -->
          <div class="box">
            <div class="box-header with-border">
              <h3 class="box-title">Fiscal Years</h3>
              <div class="box-tools pull-right">
                <button class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
                <button class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>
              </div>
            </div>
            <div class="box-body">
				<?php 
echo $tbl->display();
?>
            </div><!-- /.box-body -->
            <div class="box-footer">
             <small> Please do not make changes to these unless you are really sure what you are doing. making changes here have system wide impact</small>
            </div><!-- /.box-footer-->
          </div><!-- /.box -->
     	 </section><!-- /.content -->
예제 #4
0
              </div>
            </div>
            <div class="box-body">
				<?php 
echo $tbl_draft->display();
?>
            </div><!-- /.box-body -->
            <div class="box-footer">
             
            </div>
          </div><!-- /First .box -->
		</section> 
		<section class="content">  <!-- Journal Vouchers Pending Approvel Section -->
		   <div class="box">   <!-- Journal Vouchers Pending Approvel Boox -->
            <div class="box-header with-border">
              <h3 class="box-title">Expense Voucher Pending Approvel</h3>
              <div class="box-tools pull-right">
                <button class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
                <button class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>
              </div>
            </div>
            <div class="box-body">
				<?php 
echo $tbl_pending->display();
?>
            </div><!-- /.box-body -->
            <div class="box-footer">
             
            </div><!-- /.box-footer-->
          </div><!-- /2nd .box -->
     	 </section><!-- /.content -->
예제 #5
0
if ($_GET['sortby'] == "date") {
    $sql = "SELECT `flmevent_date`,`flmevent_user`,MAX(`flmevent_feature`),count(*) FROM `flexlm_events` WHERE `flmevent_type`='OUT' GROUP BY `flmevent_date`,`flmevent_user` ORDER BY `flmevent_date`,`flmevent_user`,`flmevent_feature` DESC;";
} else {
    if ($_GET['sortby'] == "user") {
        $sql = "SELECT `flmevent_date`,`flmevent_user`,MAX(`flmevent_feature`),count(*) FROM `flexlm_events` WHERE `flmevent_type`='OUT' GROUP BY `flmevent_user`,`flmevent_date` ORDER BY `flmevent_user`,`flmevent_date`,`flmevent_feature` DESC;";
    } else {
        $sql = "SELECT `flmevent_date`,MAX(flmevent_user),`flmevent_feature`,count(*) FROM `flexlm_events` WHERE `flmevent_type`='OUT' GROUP BY `flmevent_feature`,`flmevent_date` ORDER BY `flmevent_feature`,`flmevent_date`,`flmevent_user` DESC;";
    }
}
if (isset($debug) && $debug == 1) {
    print_sql($sql);
}
$recordset = $db->query($sql);
if (DB::isError($recordset)) {
    die($recordset->getMessage());
}
while ($row = $recordset->fetchRow()) {
    $table->AddRow($row, "style=\"background: " . $features_color[$row[2]] . ";\"");
}
$table->updateColAttributes(3, "align=\"center\"");
$recordset->free();
$db->disconnect();
################################################################
# Right align the 3 column
################################################################
$table->updateColAttributes(2, "align=\"right\"");
$table->display();
include './version.php';
?>
</body></html>
예제 #6
0
            echo "<br/>";
            //-display the result of the array
            //  echo "<p><span><h4>" .$row['first_name']."".$row['last_name']."</h4></span>"
            //	."<span><h4>".$row['dob']."</h4></span>".
            //	"<span><h4>".$row['nationality']."</h4></span>".
            // 	"<span><h4>".$row['height_cm']."</h4></span>"."</p>";
            // echo "<ul>\n";
            // echo "<li>" . "<a  href =".$_SERVER['PHP_SELF']."?route=modules/talent/view_talent_profile&talent_id=".$talent['talent_id'].">" . $first_name . " " . $last_name ." ". $nationality . " " . $height_cm . " " . $dob . " " . $eye_color . " " . $sex . "</a></li>\n";
            // echo "</ul>";
        }
    } else {
        echo "<p>Please enter a search query.</p>";
    }
}
?>
			<div class="box-body">
				<?php 
echo $tbl2->display();
?>
            </div><!-- /.box-body -->
                  </div><!-- /.row -->
                </div><!-- /.box-footer -->
              </div><!-- /.box -->
            </div><!-- /.col -->
			</div>
			
		</div><!-- /.box -->

	</div><!-- /.row -->

</section><!--  /.content -->
    public function mZ_mindbody_show_schedule($atts, $account = 0)
    {
        require_once MZ_MINDBODY_SCHEDULE_DIR . '/lib/html_table.class.php';
        global $add_mz_ajax_script;
        $add_mz_ajax_script = true;
        // optionally pass in a type parameter. Defaults to week.
        $atts = shortcode_atts(array('type' => 'week', 'location' => '1', 'account' => '0', 'filter' => '0', 'grid' => '0', 'hide' => ''), $atts);
        $type = $atts['type'];
        $location = $atts['location'];
        $account = $atts['account'];
        $filter = $atts['filter'];
        $grid = $atts['grid'];
        if ($grid == 1 && $type == 'day') {
            return '<div style="color:red"><h2>' . __('Grid Calendar Incompatible with Single Day Mode!', 'mz_mndbody_api') . '</h2></div>';
        }
        if ($grid == 0) {
            $mz_date = empty($_GET['mz_date']) ? date_i18n('Y-m-d') : mz_validate_date($_GET['mz_date']);
        } else {
            $hide = explode(', ', $atts['hide']);
            $mz_date = empty($_GET['mz_date']) ? date_i18n('Y-m-d', strtotime('last monday')) : mz_validate_date($_GET['mz_date']);
        }
        if ($type == __('day', 'mz-mindbody-api')) {
            $mz_timeframe = array_slice(mz_getDateRange($mz_date, 1), 0, 1);
            $mz_schedule_cache = "mz_schedule_day_cache_" . mt_rand(1, 10);
        } else {
            $mz_timeframe = array_slice(mz_getDateRange($mz_date, 7), 0, 1);
            $mz_schedule_cache = "mz_schedule_week_cache_" . mt_rand(1, 10);
        }
        //While we still need to support php 5.2 and can't use [0] on above
        $mz_timeframe = array_pop($mz_timeframe);
        // START caching
        $mz_cache_reset = isset($options['mz_mindbody_clear_cache']) ? "on" : "off";
        if ($mz_cache_reset == "on") {
            delete_transient($mz_schedule_cache);
        }
        $mz_schedule_data = get_transient($mz_schedule_cache);
        mz_pr('' == $mz_schedule_data);
        if (isset($_GET['mz_date']) || '' == $mz_schedule_data) {
            //Send the timeframe to the GetClasses class, unless already cached
            $mb = instantiate_mbo_API();
            if ($account == 0) {
                $mz_schedule_data = $mb->GetClasses($mz_timeframe);
            } else {
                $mb->sourceCredentials['SiteIDs'][0] = $account;
                $mz_schedule_data = $mb->GetClasses($mz_timeframe);
            }
            //Cache the mindbody call for 24 hours
            // TODO make cache timeout configurable.
            set_transient($mz_schedule_cache, $mz_schedule_data, 60 * 60 * 24);
        }
        $return = '';
        if (!empty($mz_schedule_data['GetClassesResult']['Classes']['Class'])) {
            $mz_days = $this->makeNumericArray($mz_schedule_data['GetClassesResult']['Classes']['Class']);
            if ($grid == 0) {
                $mz_days = sortClassesByDate($mz_days, $this->time_format, $location);
            } else {
                $mz_days = sortClassesByTimeThenDay($mz_days, $this->time_format, $location);
            }
            $return .= '<div id="mz_mbo_schedule" class="mz_mbo_schedule">';
            if ($type == __('week', 'mz-mindbody-api')) {
                $return .= mz_mbo_schedule_nav($mz_date, __('Week', 'mz-mindbody-api'));
            }
            if ($filter == 1) {
                $tbl = new HTML_Table('', 'mz-schedule-filter');
            } else {
                $tbl = new HTML_Table('', 'mz-schedule-table');
            }
            if ($grid == 0) {
                foreach ($mz_days as $classDate => $mz_classes) {
                    $tbl->addRow('header');
                    // arguments: cell content, class, type (default is 'data' for td, pass 'header' for th)
                    // can include associative array of optional additional attributes
                    $tbl->addCell(date_i18n($this->mz_date_display, strtotime($classDate)), '', 'header', array('scope' => 'header'));
                    $tbl->addCell(__('Class Name', 'mz-mindbody-api'), '', 'header', array('scope' => 'header'));
                    $tbl->addCell(__('Instructor', 'mz-mindbody-api'), '', 'header', array('scope' => 'header'));
                    $tbl->addCell(__('Class Type', 'mz-mindbody-api'), '', 'header', array('scope' => 'header'));
                    $tbl->addTSection('tbody');
                    foreach ($mz_classes as $class) {
                        // mz_pr($class);
                        $sDate = date_i18n('m/d/Y', strtotime($class['StartDateTime']));
                        $sLoc = $class['Location']['ID'];
                        $sTG = $class['ClassDescription']['Program']['ID'];
                        $studioid = $class['Location']['SiteID'];
                        $sclassid = $class['ClassScheduleID'];
                        $sclassidID = $class['ID'];
                        $classDescription = $class['ClassDescription']['Description'];
                        $sType = -7;
                        $showCancelled = $class['IsCanceled'] == 1 ? '<div class="mz_cancelled_class">' . __('Cancelled', 'mz-mindbody-api') . '</div>' : '';
                        $className = $class['ClassDescription']['Name'];
                        $startDateTime = date_i18n('Y-m-d H:i:s', strtotime($class['StartDateTime']));
                        $endDateTime = date_i18n('Y-m-d H:i:s', strtotime($class['EndDateTime']));
                        $staffName = $class['Staff']['Name'];
                        $sessionType = $class['ClassDescription']['SessionType']['Name'];
                        $isAvailable = $class['IsAvailable'];
                        $linkURL = "https://clients.mindbodyonline.com/ws.asp?sDate={$sDate}&amp;sLoc={$sLoc}&amp;sTG={$sTG}&amp;sType={$sType}&amp;sclassid={$sclassid}&amp;studioid={$studioid}";
                        if (date_i18n('H', strtotime($startDateTime)) < 12) {
                            $time_of_day = __('morning', 'mz-mindbody-api');
                        } else {
                            if (date_i18n('H', strtotime($startDateTime)) > 16) {
                                $time_of_day = __('evening', 'mz-mindbody-api');
                            } else {
                                $time_of_day = __('afternoon', 'mz-mindbody-api');
                            }
                        }
                        // start building table rows
                        $tbl->addRow('mz_description_holder');
                        $tbl->addCell($time_of_day, 'hidden', 'data');
                        if (isset($isAvailable) && $isAvailable != 0) {
                            $tbl->addCell(date_i18n($this->time_format, strtotime($startDateTime)) . ' - ' . date_i18n($this->time_format, strtotime($endDateTime)) . '<br/><a class="btn" href="' . $linkURL . '" target="_blank">' . __('Sign-Up', 'mz-mindbody-api') . '</a>');
                        } else {
                            $tbl->addCell(date_i18n($this->time_format, strtotime($startDateTime)) . ' - ' . date_i18n($this->time_format, strtotime($endDateTime)));
                        }
                        $tbl->addCell('<a data-toggle="modal" data-target="#mzModal" href="' . MZ_MINDBODY_SCHEDULE_URL . 'inc/modal_descriptions.php?classDescription=' . urlencode(substr($classDescription, 0, 1000)) . '&amp;className=' . urlencode(substr($className, 0, 1000)) . '">' . $className . '</a>' . '<br/><div id="visitMBO" class="btn visitMBO" style="display:none">' . '<a href="' . $linkURL . '" target="_blank">' . __('Manage on MindBody Site', ' mz-mindbody-api') . '</a></div>' . $showCancelled);
                        $tbl->addCell($staffName);
                        $tbl->addCell($sessionType);
                    }
                    // EOF foreach class
                }
                // EOF foreach day
                $tbl->addTSection('tfoot');
                $tbl->addRow();
                $tbl->addCell('', '', '', array('colspan' => 4));
                $return .= $tbl->display();
            } else {
                //Display grid
                $week_starting = date_i18n($this->date_format, strtotime($mz_date));
                //
                $return .= '<h4 class="mz_grid_date">';
                $return .= sprintf(__('Week of %1$s', 'mz-mindbody-api'), $week_starting);
                $return .= '</h4>';
                $tbl->addTSection('thead');
                $tbl->addRow();
                // arguments: cell content, class, type (default is 'data' for td, pass 'header' for th)
                // can include associative array of optional additional attributes
                $tbl->addCell('', '', 'header');
                $tbl->addCell(__('Monday', 'mz-mindbody-api'), '', 'header');
                $tbl->addCell(__('Tuesday', 'mz-mindbody-api'), '', 'header');
                $tbl->addCell(__('Wednesday', 'mz-mindbody-api'), '', 'header');
                $tbl->addCell(__('Thursday', 'mz-mindbody-api'), '', 'header');
                $tbl->addCell(__('Friday', 'mz-mindbody-api'), '', 'header');
                $tbl->addCell(__('Saturday', 'mz-mindbody-api'), '', 'header');
                $tbl->addCell(__('Sunday', 'mz-mindbody-api'), '', 'header');
                $tbl->addTSection('tbody');
                foreach ($mz_days as $classDate => $mz_classes) {
                    if ($classDate < 12) {
                        $time_of_day = __('morning', 'mz-mindbody-api');
                    } else {
                        if ($classDate > 16) {
                            $time_of_day = __('evening', 'mz-mindbody-api');
                        } else {
                            $time_of_day = __('afternoon', 'mz-mindbody-api');
                        }
                    }
                    $tbl->addRow();
                    $tbl->addCell($time_of_day, 'hidden', 'data');
                    $tbl->addCell($mz_classes['display_time']);
                    //mz_pr($mz_classes['display_time']);
                    foreach ($mz_classes['classes'] as $key => $classes) {
                        //mz_pr($key);
                        //mz_pr($classes);
                        //die();
                        if (empty($classes) || null === $classes[0]['ClassDescription']['Name']) {
                            $class_details = '';
                            $num_classes_min_one = 50;
                            //Set to a number that won't match key
                        } else {
                            $class_details = '';
                            $num_classes_min_one = count($classes) - 1;
                            foreach ($classes as $key => $class) {
                                $className = $class['ClassDescription']['Name'];
                                if (!in_array('teacher', $hide)) {
                                    $teacher = __('with', 'mz-mindbody-api') . '&nbsp;' . $class['Staff']['Name'] . '<br/>';
                                } else {
                                    $teacher = '';
                                }
                                $showCancelled = $class['IsCanceled'] == 1 ? '<div class="mz_cancelled_class">' . __('Cancelled') . '</div>' : '';
                                $classDescription = $class['ClassDescription']['Description'];
                                $sessionTypeName = $class['ClassDescription']['SessionType']['Name'];
                                $showCancelled = $class['IsCanceled'] == 1 ? '<div class="mz_cancelled_class">' . __('Cancelled') . '</div>' : '';
                                if (!in_array('duration', $hide) && $class['IsCanceled'] != 1) {
                                    $classStartTime = new DateTime($class['StartDateTime']);
                                    $classEndTime = new DateTime($class['EndDateTime']);
                                    if (phpversion() >= 5.3) {
                                        $classLength = $classEndTime->diff($classStartTime);
                                        $classLength = __('Duration:', 'mz-mindbody-api') . '<br/>&nbsp;' . $classLength->format('%H:%I');
                                    } else {
                                        $classLength = round($classEndTime->format('U') - $classStartTime->format('U'));
                                        $classLength = __('Duration:', 'mz-mindbody-api') . '<br/>&nbsp;' . gmdate("H:i", $classLength);
                                    }
                                } else {
                                    $classLength = '';
                                }
                                // Initialize $signupButton
                                $signupButton = '';
                                // Variables for class URL
                                $sDate = date_i18n('m/d/Y', strtotime($class['StartDateTime']));
                                $sLoc = $class['Location']['ID'];
                                $sTG = $class['ClassDescription']['Program']['ID'];
                                $studioid = $class['Location']['SiteID'];
                                $sclassid = $class['ClassScheduleID'];
                                $sclassidID = $class['ID'];
                                $sType = -7;
                                $isAvailable = $class['IsAvailable'];
                                $class_separator = $key == $num_classes_min_one ? '' : '<hr/>';
                                $linkURL = "https://clients.mindbodyonline.com/ws.asp?sDate={$sDate}&amp;sLoc={$sLoc}&amp;sTG={$sTG}&amp;sType={$sType}&amp;sclassid={$sclassid}&amp;studioid={$studioid}";
                                if (!in_array('signup', $hide)) {
                                    $signupButton = '&nbsp;<a href="' . $linkURL . '" target="_blank" title="' . __('Sign-Up', 'mz-mindbody-api') . '"><i class="fa fa-sign-in"></i></a><br/>';
                                } else {
                                    $signupButton = '';
                                }
                                $class_details .= '<div class="' . 'mz_' . sanitize_html_class($sessionTypeName, 'mz_session_type') . '">' . '<a data-toggle="modal" data-target="#mzModal" href="' . MZ_MINDBODY_SCHEDULE_URL . 'inc/modal_descriptions.php?classDescription=' . urlencode(substr($classDescription, 0, 1000)) . '&amp;className=' . urlencode(substr($className, 0, 1000)) . '">' . $className . '</a>' . '<br/>' . $teacher . $signupButton . $classLength . $showCancelled . '</div>' . $class_separator;
                            }
                        }
                        $tbl->addCell($class_details, 'mz_description_holder');
                    }
                    //end foreach mz_classes
                }
                //end foreach mz_days
                $return .= $tbl->display();
            }
            //End if grid
            if ($type == 'week') {
                // schedule navigation
                $return .= mz_mbo_schedule_nav($mz_date, __('Week', 'mz-mindbody-api'));
            }
            $return .= '<div id="mzModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mzSmallModalLabel" aria-hidden="true">
					 <div class="modal-content">

					</div>
			</div>';
            $return .= '</div>';
        } else {
            if (!empty($mz_schedule_data['GetClassesResult']['Message'])) {
                $return = $mz_schedule_data['GetClassesResult']['Message'];
            } else {
                $return = __('Error getting classes. Try re-loading the page.', ' mz-mindbody-api') . '<br />';
                $return .= '<pre>' . print_r($mz_schedule_data, 1) . '</pre>';
            }
        }
        //EOF If Result / Else
        $mz_schedule_display = 'mz_schedule_display_' . mt_rand(1, 1000000);
        mz_pr($mz_schedule_display);
        set_transient($mz_schedule_display, $return, 60 * 60 * 24);
        return get_transient($mz_schedule_display);
    }
            <div class="box-footer">
             <small> Explanation text for JV header</small>
            </div><!-- /.box-footer-->
          </div><!-- /.box -->
     	 </section><!-- /.content -->
 
          <section >
          <!-- title row -->
          <div class="box">
            <div class="box-header with-border">
              <h3 class="box-title">View Voucher Details</h3>
              <div class="box-tools pull-right">
<a class="pull btn btn-success btn-sm" href="<?php 
echo SITE_ROOT . "index.php?route=modules/gl/transactions/journal_vouchers/add_journal_voucher_detail&voucher_id=" . $voucher_id;
?>
">
			Add More Details &nbsp; <span class="fa fa-chevron-circle-right"></span> </a>
                
              </div>
            </div>
<div class="box-body">
        <?php 
echo $tbl_draft->display();
?>
          
</div><!-- /.box-body -->
            <div class="box-footer">
             <small> Explanation text for JV details</small>
            </div><!-- /.box-footer-->
          </div><!-- /.box -->
     	 </section><!-- /.content -->