|
ZenCart_Documentation
1.5.0
http://www.collinsharper.com
|
00001 <?php 00009 if (!defined('IS_ADMIN_FLAG')) { 00010 die('Illegal Access'); 00011 } 00012 /* 00013 Example usage: 00014 00015 $heading = array(); 00016 $heading[] = array('params' => 'class="menuBoxHeading"', 00017 'text' => BOX_HEADING_TOOLS, 00018 'link' => zen_href_link(basename($PHP_SELF), zen_get_all_get_params(array('selected_box')) . 'selected_box=tools')); 00019 00020 $contents = array(); 00021 $contents[] = array('text' => SOME_TEXT); 00022 00023 $box = new box; 00024 echo $box->infoBox($heading, $contents); 00025 */ 00026 00027 class box extends tableBlock { 00028 function box() { 00029 $this->heading = array(); 00030 $this->contents = array(); 00031 } 00032 00033 function infoBox($heading, $contents) { 00034 $this->table_row_parameters = 'class="infoBoxHeading"'; 00035 $this->table_data_parameters = 'class="infoBoxHeading"'; 00036 $this->heading = $this->tableBlock($heading); 00037 00038 $this->table_row_parameters = ''; 00039 $this->table_data_parameters = 'class="infoBoxContent"'; 00040 $this->contents = $this->tableBlock($contents); 00041 00042 return $this->heading . $this->contents; 00043 } 00044 00045 function menuBox($heading, $contents) { 00046 $this->table_data_parameters = 'class="menuBoxHeading"'; 00047 if (isset($heading[0]['link'])) { 00048 $this->table_data_parameters .= ' onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . $heading[0]['link'] . '\'"'; 00049 $heading[0]['text'] = ' <a href="' . $heading[0]['link'] . '" class="menuBoxHeadingLink">' . $heading[0]['text'] . '</a> '; 00050 } else { 00051 $heading[0]['text'] = ' ' . $heading[0]['text'] . ' '; 00052 } 00053 $this->heading = $this->tableBlock($heading); 00054 00055 $this->table_data_parameters = 'class="menuBoxContent"'; 00056 $this->contents = $this->tableBlock($contents); 00057 00058 return $this->heading . $this->contents; 00059 } 00060 } 00061 ?>