AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 18.224.44.207


Current Path : /var/www/lhjmq-records.qc.ca/public_html/administration/csr_evaluation/inc/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/administration/csr_evaluation/inc/tab.php

<?php
class component_tabs {
	//Properties
	var $tabs = array();
	var $width = '100%';
	var $content = '';
	
	//Constructor
	function component_tabs($width = '100%') {
		$this->width = $width;
	}
	
	//Methods
	function add_tab(&$tab) {
		$this->tabs[] = &$tab;
	}
	
	//Output function
	function draw_component() { ?>
		<table width="<?= $this->width ?>" border=0 cellpadding=0 cellspacing=0>
			<tr>
				<td colspan="3">
					<table border=0 cellpadding=0 cellspacing=0>
						<tr>
							<?php
							
							for($i=0; $i < count($this->tabs); $i++) {
								if (isset($this->tabs[$i+1])) {
									$iconstyle = 'between'; // Between icon
								} else {
									$iconstyle = 'end'; // End icon
								}
								
								if ($this->tabs[$i]->is_active == true) {
									$tab1style = 'on';
								} else {
									$tab1style = 'off';
								}
								
								if ($this->tabs[$i+1]->is_active == true) {
									$tab2style = 'on';
								} else {
									$tab2style = 'off';
								}
								
								if ($iconstyle == 'between') {
									$iconimgsrc='images/tab_between_'.$tab1style.'_'.$tab2style.'.gif';
								} else {
									$iconimgsrc='images/tab_end_'.$tab1style.'.gif';
								}
							?>
								<td bgcolor="#<?php if($this->tabs[$i]->is_active == true) {echo '546085'; } else {echo '868A96'; } ?>" class="whiteText10px" style="padding: 1px; font-weight: bold;">&nbsp;&nbsp;<A href="<?= $this->tabs[$i]->url ?>"><?= $this->tabs[$i]->caption ?></A>&nbsp;&nbsp;</TD>
								<td><img src="<?= $iconimgsrc ?>" width="15" height="15"></td>
							<?php } ?>
						</tr>
					</table>
				</td>
			</tr>
		</table>
<?php
	}
}

class component_tab {
	//Properties
	var $caption = 'default tab';
	var $url = '?';
	var $is_active = true;
	
	//Constructor
	function component_tab($caption, $url, $is_active = true) {
		$this->caption = $caption;
		$this->url = $url;
		$this->is_active = $is_active;
	}
}

?>